X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/24c7767fc8e093be0f0790c78daeb12b4e58579b..f5386212fe03480a33e395a7fd5aad3b3d0ef64e:/src/cocoa/frame.mm diff --git a/src/cocoa/frame.mm b/src/cocoa/frame.mm index 9d3ff26566..9e529f1187 100644 --- a/src/cocoa/frame.mm +++ b/src/cocoa/frame.mm @@ -59,13 +59,13 @@ wxFrame::~wxFrame() void wxFrame::AttachMenuBar(wxMenuBar *mbar) { wxFrameBase::AttachMenuBar(mbar); - wxMenuBarManager::GetInstance()->UpdateWindowMenuBar(this); + wxMenuBarManager::GetInstance()->UpdateMenuBar(); } void wxFrame::DetachMenuBar() { wxFrameBase::DetachMenuBar(); - wxMenuBarManager::GetInstance()->UpdateWindowMenuBar(this); + wxMenuBarManager::GetInstance()->UpdateMenuBar(); } void wxFrame::SetMenuBar(wxMenuBar *menubar) @@ -78,7 +78,14 @@ void wxFrame::SetMenuBar(wxMenuBar *menubar) wxFrameBase::DetachMenuBar(); wxFrameBase::AttachMenuBar(menubar); - wxMenuBarManager::GetInstance()->UpdateWindowMenuBar(this); + wxMenuBarManager::GetInstance()->UpdateMenuBar(); +} + +wxMenuBar* wxFrame::GetAppMenuBar(wxCocoaNSWindow *win) +{ + if(GetMenuBar()) + return GetMenuBar(); + return wxFrameBase::GetAppMenuBar(win); } wxPoint wxFrame::GetClientAreaOrigin() const @@ -97,6 +104,13 @@ void wxFrame::CocoaSetWxWindowSize(int width, int height) wxTopLevelWindow::CocoaSetWxWindowSize(width,height); } +WX_NSView wxFrame::GetNonClientNSView() +{ + if(m_frameNSView) + return m_frameNSView; + return GetNSViewForSuperview(); +} + void wxFrame::CocoaReplaceView(WX_NSView oldView, WX_NSView newView) { // If we have the additional toolbar/statbar view, then the