X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/975dd469bab7c0ca1d0b6c5c25e0396b27f2fb54..e4a23857ec9c4f4e3f3e1251f566f55df31e4177:/include/wx/mdi.h diff --git a/include/wx/mdi.h b/include/wx/mdi.h index 2a7bbc2cfa..1f5d56e647 100644 --- a/include/wx/mdi.h +++ b/include/wx/mdi.h @@ -81,15 +81,18 @@ public: #if wxUSE_MENUS // return the pointer to the current window menu or NULL if we don't have // because of wxFRAME_NO_WINDOW_MENU style - wxMenu* GetWindowMenu() const { return m_windowMenu; }; + wxMenu* GetWindowMenu() const { return m_windowMenu; } // use the given menu instead of the default window menu // // menu can be NULL to disable the window menu completely virtual void SetWindowMenu(wxMenu *menu) { - delete m_windowMenu; - m_windowMenu = menu; + if ( menu != m_windowMenu ) + { + delete m_windowMenu; + m_windowMenu = menu; + } } #endif // wxUSE_MENUS @@ -173,6 +176,11 @@ public: // level windows too virtual bool IsTopLevel() const { return false; } + // In all ports keyboard navigation must stop at MDI child frame level and + // can't cross its boundary. Indicate this by overriding this function to + // return true. + virtual bool IsTopNavigationDomain() const { return true; } + protected: wxMDIParentFrame *m_mdiParent; };