#endif //WX_PRECOMP
#include "wx/cocoa/autorelease.h"
+#include "wx/cocoa/string.h"
+#include "wx/cocoa/mbarman.h"
#import <AppKit/NSView.h>
#import <AppKit/NSWindow.h>
// above alloc and thus the retain count will be 1.
[m_cocoaNSWindow release];
+ [m_cocoaNSWindow setTitle:wxNSStringWithWxString(title)];
return TRUE;
}
void wxTopLevelWindowCocoa::CocoaDelegate_windowDidBecomeKey(void)
{
wxLogDebug("wxTopLevelWindowCocoa=%p::CocoaDelegate_windowDidBecomeKey",this);
+ wxMenuBarManager::GetInstance()->WindowDidBecomeKey(this);
wxActivateEvent event(wxEVT_ACTIVATE, TRUE, GetId());
event.SetEventObject(this);
GetEventHandler()->ProcessEvent(event);
wxActivateEvent event(wxEVT_ACTIVATE, FALSE, GetId());
event.SetEventObject(this);
GetEventHandler()->ProcessEvent(event);
+ wxMenuBarManager::GetInstance()->WindowDidResignKey(this);
+}
+
+void wxTopLevelWindowCocoa::CocoaDelegate_windowDidBecomeMain(void)
+{
+ wxLogDebug("wxTopLevelWindowCocoa=%p::CocoaDelegate_windowDidBecomeMain",this);
+ wxMenuBarManager::GetInstance()->WindowDidBecomeMain(this);
+}
+
+void wxTopLevelWindowCocoa::CocoaDelegate_windowDidResignMain(void)
+{
+ wxLogDebug("wxTopLevelWindowCocoa=%p::CocoaDelegate_windowDidResignMain",this);
+ wxMenuBarManager::GetInstance()->WindowDidResignMain(this);
}
void wxTopLevelWindowCocoa::Cocoa_close(void)