• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: how to make an NSWindow unmovable...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: how to make an NSWindow unmovable...


  • Subject: Re: how to make an NSWindow unmovable...
  • From: Philip George <email@hidden>
  • Date: Sun, 12 Jun 2005 20:43:34 -0500

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


  • Follow-Ups:
    • Re: how to make an NSWindow unmovable...
      • From: Jonathan Hess <email@hidden>
References: 
 >how to make an NSWindow unmovable... (From: Philip George <email@hidden>)
 >Re: how to make an NSWindow unmovable... (From: Scott Thompson <email@hidden>)
 >Re: how to make an NSWindow unmovable... (From: Philip George <email@hidden>)
 >Re: how to make an NSWindow unmovable... (From: Eric Brunstad <email@hidden>)
 >Re: how to make an NSWindow unmovable... (From: Philip George <email@hidden>)
 >Re: how to make an NSWindow unmovable... (From: Philip George <email@hidden>)
 >Re: how to make an NSWindow unmovable... (From: Jeff Ganyard <email@hidden>)
 >Re: how to make an NSWindow unmovable... (From: Philip George <email@hidden>)
 >Re: how to make an NSWindow unmovable... (From: Philip George <email@hidden>)
 >Re: how to make an NSWindow unmovable... (From: Philip George <email@hidden>)
 >Re: how to make an NSWindow unmovable... (From: Philip George <email@hidden>)
 >Re: how to make an NSWindow unmovable... (From: Eric Brunstad <email@hidden>)

  • Prev by Date: Re: how to make an NSWindow unmovable...
  • Next by Date: Re: how to make an NSWindow unmovable...
  • Previous by thread: Re: how to make an NSWindow unmovable...
  • Next by thread: Re: how to make an NSWindow unmovable...
  • Index(es):
    • Date
    • Thread