Re: how to make an NSWindow unmovable...
Re: how to make an NSWindow unmovable...
- Subject: Re: how to make an NSWindow unmovable...
- From: Jonathan Hess <email@hidden>
- Date: Sun, 12 Jun 2005 18:47:46 -0700
Hey Philip -
Try [window setOpaque:NO];
Good Luck -
Jon Hess
On Jun 12, 2005, at 6:43 PM, Philip George wrote:
thanks. i'm getting reeeeeally close. now, instead of pinstripes,
everything that should be clear is jet black.
to keep it simple, i'm just using one picture here, but otherwise
this is the exact code.
can you see the problem?
@interface XXXWindowBackgroundView : NSView { NSImage *
window_template; }
@end
@implementation XXXWindowBackgroundView
- (id)initWithFrame:(NSRect)frameRect {
self = [super initWithFrame:frameRect];
if (self) {
window_template = [[NSImage alloc] initWithContentsOfFile:
[[NSBundle mainBundle] pathForResource:@"win_template"
ofType:@"png"]];
}
return self;
}
- (void)drawRect:(NSRect)rect {
[[NSColor clearColor] set];
NSRectFill([self frame]);
[window_template compositeToPoint:NSZeroPoint
operation:NSCompositeSourceOver];
[[self window] setHasShadow:NO];
[[self window] setHasShadow:YES];
}
@end
@interface XXXWindow : NSWindow { XXXWindowBackgroundView *
content_view; }
- (id)initWithFrame:(NSRect)frameRect;
@end
@implementation XXXWindow
- (id)initWithFrame:(NSRect)frameRect {
self = [super initWithContentRect:frameRect
styleMask:NSBorderlessWindowMask backing:NSBackingStoreBuffered
defer:NO];
if (self) {
content_view = [[XXXWindowBackgroundView alloc]
initWithFrame:frameRect];
[self setContentView:content_view];
[self setBackgroundColor:[NSColor clearColor]];
[self setOpaque:NO];
[self setHasShadow:YES];
}
return self;
}
@end
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden