mac: untested code but i'll fall asleep at night with this in the codebase compared to the other thing
All checks were successful
pyrite-dev/milsko/pipeline/head This commit looks good
All checks were successful
pyrite-dev/milsko/pipeline/head This commit looks good
This commit is contained in:
parent
14e908488c
commit
f44a70d4ec
2 changed files with 12 additions and 40 deletions
|
|
@ -104,7 +104,6 @@
|
||||||
- (void)destroy;
|
- (void)destroy;
|
||||||
- (NSBitmapImageRep*)getRep;
|
- (NSBitmapImageRep*)getRep;
|
||||||
- (void)setChild;
|
- (void)setChild;
|
||||||
- (void)drawRectSub:(NSRect)dirtyRect;
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
@interface MilskoCocoaSubView : MilskoCocoaView {
|
@interface MilskoCocoaSubView : MilskoCocoaView {
|
||||||
|
|
|
||||||
|
|
@ -669,51 +669,24 @@ static void recursive_dispatch_key_released(MwLL handle, int* k) {
|
||||||
NSArray* subviews = [self subviews];
|
NSArray* subviews = [self subviews];
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
if(!self->rep) {
|
if(self->rep) {
|
||||||
if(dirtyRect.size.width && dirtyRect.size.height) {
|
[self->rep release];
|
||||||
[self initRepAndContextWithWidth:dirtyRect.size.width
|
}
|
||||||
Height:dirtyRect.size.height];
|
if(dirtyRect.size.width && dirtyRect.size.height) {
|
||||||
self->width = dirtyRect.size.width;
|
[self initRepAndContextWithWidth:dirtyRect.size.width
|
||||||
self->height = dirtyRect.size.height;
|
Height:dirtyRect.size.height];
|
||||||
} else {
|
self->width = dirtyRect.size.width;
|
||||||
[pool release];
|
self->height = dirtyRect.size.height;
|
||||||
return;
|
} else {
|
||||||
}
|
[pool release];
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!_child)
|
[self->rep drawInRect:[self bounds]];
|
||||||
[self->rep drawInRect:[self bounds]];
|
|
||||||
|
|
||||||
for(i = 0; i < [subviews count]; i++) {
|
|
||||||
MilskoCocoaView* subview = [subviews objectAtIndex:i];
|
|
||||||
NSRect bounds = [subview bounds];
|
|
||||||
if([subview respondsToSelector:@selector(drawRectSub:)]) {
|
|
||||||
[subview drawRectSub:bounds];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
[pool release];
|
[pool release];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)drawRectSub:(NSRect)dirtyRect {
|
|
||||||
NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init];
|
|
||||||
|
|
||||||
if(!self->rep) {
|
|
||||||
if(dirtyRect.size.width && dirtyRect.size.height) {
|
|
||||||
[self initRepAndContextWithWidth:dirtyRect.size.width
|
|
||||||
Height:dirtyRect.size.height];
|
|
||||||
self->width = dirtyRect.size.width;
|
|
||||||
self->height = dirtyRect.size.height;
|
|
||||||
} else {
|
|
||||||
[pool release];
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
[self->rep drawInRect:dirtyRect];
|
|
||||||
|
|
||||||
[pool release];
|
|
||||||
};
|
|
||||||
|
|
||||||
- (void)initRepAndContextWithWidth:(float)w Height:(float)h {
|
- (void)initRepAndContextWithWidth:(float)w Height:(float)h {
|
||||||
NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init];
|
NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init];
|
||||||
self->rep =
|
self->rep =
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue