- (void)windowDidBecomeMain: (NSNotification *)notification;
- (void)windowDidResignMain: (NSNotification *)notification;
- (BOOL)windowShouldClose: (id)sender;
+- (void)windowWillClose: (NSNotification *)notification;
@end //interface wxNSWindowDelegate
@implementation wxNSWindowDelegate : NSObject
return YES;
}
+- (void)windowWillClose: (NSNotification *)notification
+{
+ wxCocoaNSWindow *win = wxCocoaNSWindow::GetFromCocoa([notification object]);
+ wxCHECK_RET(win,"windowWillClose received but no wxWindow exists");
+ win->CocoaDelegate_windowWillClose();
+}
+
@end //implementation wxNSWindowDelegate
// ============================================================================
}
}
+wxMenuBar* wxCocoaNSWindow::GetAppMenuBar(wxCocoaNSWindow *win)
+{
+ return NULL;
+}
+
// ============================================================================
// @class wxPoserNSWindow
// ============================================================================
{
}
-- (void)close;
- (BOOL)canBecomeMainWindow;
@end // wxPoserNSwindow
WX_IMPLEMENT_POSER(wxPoserNSWindow);
@implementation wxPoserNSWindow : NSWindow
-- (void)close
-{
- wxLogDebug("close");
- wxCocoaNSWindow *tlw = wxCocoaNSWindow::GetFromCocoa(self);
- if(tlw)
- tlw->Cocoa_close();
- [super close];
-}
-
- (BOOL)canBecomeMainWindow
{
bool canBecome = false;