use a virtual function instead of wxDynamicCast(wxMDIParentFrame) in wxFrame code: this not only makes the code cleaner but should also remove the last dependency on MDI code when linking wx applications not using MDI
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@58443 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -63,8 +63,12 @@ public:
|
||||
virtual void SetWindowMenu(wxMenu* menu);
|
||||
|
||||
virtual void DoMenuUpdates(wxMenu* menu = NULL);
|
||||
|
||||
// return the active child menu, if any
|
||||
virtual WXHMENU MSWGetActiveMenu() const;
|
||||
#endif // wxUSE_MENUS
|
||||
|
||||
|
||||
// implementation only from now on
|
||||
|
||||
// MDI helpers
|
||||
@@ -94,8 +98,10 @@ public:
|
||||
virtual WXLRESULT MSWDefWindowProc(WXUINT, WXWPARAM, WXLPARAM);
|
||||
virtual bool MSWTranslateMessage(WXMSG* msg);
|
||||
|
||||
#if wxUSE_MENUS
|
||||
// override wxFrameBase function to also look in the active child menu bar
|
||||
virtual const wxMenuItem *FindItemInMenuBar(int menuId) const;
|
||||
#endif // wxUSE_MENUS
|
||||
|
||||
protected:
|
||||
#if wxUSE_MENUS_NATIVE
|
||||
@@ -112,13 +118,20 @@ protected:
|
||||
bool m_parentFrameActive;
|
||||
|
||||
private:
|
||||
#if wxUSE_MENUS
|
||||
// add/remove window menu if we have it (i.e. m_windowMenu != NULL)
|
||||
void AddWindowMenu();
|
||||
void RemoveWindowMenu();
|
||||
|
||||
// update the window menu (if we have it) to enable or disable the commands
|
||||
// which only make sense when we have more than one child
|
||||
void UpdateWindowMenu(bool enable);
|
||||
#endif // wxUSE_MENUS
|
||||
|
||||
// return the number of child frames we currently have (maybe 0)
|
||||
int GetChildFramesCount() const;
|
||||
|
||||
|
||||
friend class WXDLLIMPEXP_FWD_CORE wxMDIChildFrame;
|
||||
|
||||
DECLARE_EVENT_TABLE()
|
||||
|
Reference in New Issue
Block a user