Window group hierarchy
Window group hierarchy
- Subject: Window group hierarchy
- From: Izidor Jerebic <email@hidden>
- Date: Mon, 5 May 2003 11:57:57 +0200
Hello!
I am trying to create a two-level window hierarchy in my application -
normal windows and top-level windows. I do not want to have floating
panels, because that works on a system level. I want to have hierarchy
just within my application. So I thought I would achieve that with
window groups. But nothing happens - windows from normal level, when
clicked, move in front of top level windows...
I have checked and windows do have correct groups - normal have normal
group and top level do have top level window group...
Could some nice soul explain to me what is wrong with my code?
Regards,
izidor
@implementation NSWindow(WindowGroups)
//
static BOOL initialized ;
static WindowGroupRef normalGroup ;
static WindowGroupRef topLevelGroup ;
//
- (void)setGroupAsTopLevel:(BOOL)isTopLevelWindow
{
if( !initialized ) {
CreateWindowGroup( 0, &normalGroup ) ;
SetWindowGroupParent ( normalGroup,
GetWindowGroupOfClass(kDocumentWindowClass) ) ;
CreateWindowGroup( 0, &topLevelGroup ) ;
SetWindowGroupParent ( topLevelGroup,
GetWindowGroupOfClass(kDocumentWindowClass) ) ;
SendWindowGroupBehind( topLevelGroup, normalGroup ) ;
initialized = YES ;
}
SetWindowGroup( (WindowRef)[self windowRef], isTopLevelWindow ?
topLevelGroup : normalGroup ) ;
}
@end
_______________________________________________
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.