• 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: window above main menu bar
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

References: 
 >window above main menu bar (From: Benjámin Salánki <email@hidden>)

  • Prev by Date: Re: NSTableDataSources and multi-threading
  • Next by Date: How to use color capabilities in panther's Font Panel ?
  • Previous by thread: Re: window above main menu bar
  • Next by thread: Panther missing software?
  • Index(es):
    • Date
    • Thread