• 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
Window group hierarchy
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Follow-Ups:
    • Re: Window group hierarchy
      • From: Eric Schlegel <email@hidden>
  • Prev by Date: Re: I think I get it
  • Next by Date: Re: I think I get it
  • Previous by thread: Re: I think I get it
  • Next by thread: Re: Window group hierarchy
  • Index(es):
    • Date
    • Thread