Re: window above main menu bar
Re: window above main menu bar
- Subject: Re: window above main menu bar
- From: Jérome Foucher <email@hidden>
- Date: Thu, 6 Nov 2003 09:42:39 +0100
On 5 nov. 03, at 16:13, Godefroy wrote:
yes
you have to create a customWindow class
and put this on it
- (id)initWithContentRect:(NSRect)contentRect styleMask:(unsigned
int)styleMask backing:(NSBackingStoreType)bufferingType
defer:(BOOL)flag
{
NSWindow* result;
NSRect windowSizeRect;
SystemUIMode CurrentUIMode;
int mask = NSTexturedBackgroundWindowMask;
CurrentUIMode = 3;
mask = NSBorderlessWindowMask;
NSLog(@"CustomWindow::initWithContentRect");
windowSizeRect = [[NSScreen mainScreen] frame];
result = [super initWithContentRect:windowSizeRect styleMask:mask
backing:NSBackingStoreBuffered defer:NO];
[result setLevel:NSNormalWindowLevel];
[result setAlphaValue:1.0];
[result setOpaque:YES];
[result setHasShadow:NO];
[result setAcceptsMouseMovedEvents:YES];
return result;
}
for understanding CurrentUIMode = 3
see http://developer.apple.com/technotes/tn2002/tn2062.html
Your code won't do anything at all ;o)
A SystemUIMode has to be used in a SetSystemUIMode call
And with that all you can do is to prevent the menubar from appearing
in your own application.
From what I understand Benjamin just wants a window to appear on top of
the menubar with the menubar visible.
Which means the answer is to create a window and set its level to a
higher level than the menubar window.
[myWindow setLevel:NSPopUpMenuWindowLevel]
or [myWindow setLevel:NSScreenSaverWindowLevel]
shouod work IMO
Jirome
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.