On Jun 1, 2011, at 3:14 PM, Michael Diehr wrote: > On Jun 1, 2011, at 8:51 AM, Christian Schmitz wrote: > >> >> Am 01.06.2011 um 17:49 schrieb Michael Diehr: >> >>> * In Carbon, this works (with regular REALbasic window class): >> >> The WindowGroup API is what we use in Carbon. It does not work in Cocoa. >> >>> * It looks fairly easy to get notifications if another window moves using >>> NSWindowDidResizeNotification >>> Here's an example of a cocoa window that attaches to another window: >>> http://mattgemmell.com/2007/10/03/maattachedwindow-nswindow-subclass >>> perhaps you can use that technique? >> >> Well, I expect Real Studio listens for this notification to implement the >> resize event. Maybe you could simply move there? > > Oops, nevermind that stuff, I'm not thinking correctly. > There is a way to attach child windows in cocoa, and it's very simple: > > [NSWindow addChildWindow:ordered] > [NSWindow removeChildWindow] > [NSWindow setParentWindow] > > etc. > > Christian, it seems that using these calls it should be fairly easy to update > OverlayWindowMBS.AttachToWindow to work in Cocoa, no? > > See > http://developer.apple.com/library/mac/#documentation/Cocoa/Reference/ApplicationKit/Classes/NSWindow_Class/Reference/Reference.html
FYI, here's the code written using declares: Sub AttachChildWindow(childWindow as window) 'see http://developer.apple.com/library/mac/#documentation/Cocoa/Reference/ApplicationKit/Classes/NSWindow_Class/Reference/Reference.html const NSWindowAbove = 1 const NSWindowBelow = -1 const NSWindowOut = 0 declare sub NSWindowAttachWindowOrdered lib "AppKit" selector "addChildWindow:ordered:" (obj as ptr, childWindow as ptr, order as integer) NSWindowAttachWindowOrdered(ptr(self.Handle), ptr(childWindow.handle), NSWindowAbove) _______________________________________________ Mbsplugins_monkeybreadsoftware.info mailing list [email protected] https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info
