- DECLARE_DYNAMIC_CLASS(wxMDIParentFrame)
-
- friend class WXDLLEXPORT wxMDIChildFrame;
- public:
-
- wxMDIParentFrame(void);
- inline wxMDIParentFrame(wxWindow *parent,
- const wxWindowID id,
- const wxString& title,
- const wxPoint& pos = wxDefaultPosition,
- const wxSize& size = wxDefaultSize,
- const long style = wxDEFAULT_FRAME_STYLE | wxVSCROLL | wxHSCROLL,
- const wxString& name = wxFrameNameStr)
- {
- Create(parent, id, title, pos, size, style, name);
- }
-
- ~wxMDIParentFrame(void);
-
- bool Create(wxWindow *parent,
- const wxWindowID id,
- const wxString& title,
- const wxPoint& pos = wxDefaultPosition,
- const wxSize& size = wxDefaultSize,
- const long style = wxDEFAULT_FRAME_STYLE | wxVSCROLL | wxHSCROLL,
- const wxString& name = wxFrameNameStr);
-
-#if WXWIN_COMPATIBILITY
- virtual void OldOnActivate(bool flag);
- virtual void OldOnSize(int x, int y);
-#endif
+public:
+ wxMDIParentFrame();
+ wxMDIParentFrame(wxWindow *parent,
+ wxWindowID id,
+ const wxString& title,
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize,
+ long style = wxDEFAULT_FRAME_STYLE | wxVSCROLL | wxHSCROLL,
+ const wxString& name = wxFrameNameStr)
+ {
+ Create(parent, id, title, pos, size, style, name);
+ }
+
+ virtual ~wxMDIParentFrame();
+
+ bool Create(wxWindow *parent,
+ wxWindowID id,
+ const wxString& title,
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize,
+ long style = wxDEFAULT_FRAME_STYLE | wxVSCROLL | wxHSCROLL,
+ const wxString& name = wxFrameNameStr);
+
+ // accessors
+ // ---------
+
+ // Get the active MDI child window (Windows only)
+ wxMDIChildFrame *GetActiveChild() const;
+
+ // Get the client window
+ wxMDIClientWindow *GetClientWindow() const { return m_clientWindow; }
+
+ // Create the client window class (don't Create the window,
+ // just return a new class)
+ virtual wxMDIClientWindow *OnCreateClient(void);
+
+ // MDI windows menu
+ wxMenu* GetWindowMenu() const { return m_windowMenu; }
+ void SetWindowMenu(wxMenu* menu) ;
+ virtual void DoMenuUpdates(wxMenu* menu = NULL);
+
+ // MDI operations
+ // --------------
+ virtual void Cascade();
+ virtual void Tile(wxOrientation orient = wxHORIZONTAL);
+ virtual void ArrangeIcons();
+ virtual void ActivateNext();
+ virtual void ActivatePrevious();
+
+ // handlers
+ // --------
+
+ // Responds to colour changes
+ void OnSysColourChanged(wxSysColourChangedEvent& event);
+
+ void OnSize(wxSizeEvent& event);
+ void OnIconized(wxIconizeEvent& event);
+
+ bool HandleActivate(int state, bool minimized, WXHWND activate);
+ bool HandleCommand(WXWORD id, WXWORD cmd, WXHWND control);
+
+ // override window proc for MDI-specific message processing
+ virtual WXLRESULT MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam);
+
+ virtual WXLRESULT MSWDefWindowProc(WXUINT, WXWPARAM, WXLPARAM);
+ virtual bool MSWTranslateMessage(WXMSG* msg);
+
+ // override wxFrameBase function to also look in the active child menu bar
+ virtual const wxMenuItem *FindItemInMenuBar(int menuId) const;