- DECLARE_DYNAMIC_CLASS(wxMDIParentFrame)
-
- friend class WXDLLEXPORT wxMDIChildFrame;
- public:
-
- wxMDIParentFrame(void);
- inline 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);
- }
-
- ~wxMDIParentFrame(void);
-
- 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);
-
-/*
-#if WXWIN_COMPATIBILITY
- virtual void OldOnActivate(bool flag);
- virtual void OldOnSize(int x, int y);
-#endif
-*/
-
- void OnSize(wxSizeEvent& event);
- void OnActivate(wxActivateEvent& event);
-
- void SetMenuBar(wxMenuBar *menu_bar);
-
- // Gets the size available for subwindows after menu size, toolbar size
- // and status bar size have been subtracted. If you want to manage your own
- // toolbar(s), don't call SetToolBar.
- void GetClientSize(int *width, int *height) const;
- wxSize GetClientSize() const { return wxWindow::GetClientSize(); }
-
- // Get the active MDI child window (Windows only)
- wxMDIChildFrame *GetActiveChild(void) const ;
-
- // Get the client window
- inline wxMDIClientWindow *GetClientWindow(void) const ;
-
- // Create the client window class (don't Create the window,
- // just return a new class)
- virtual wxMDIClientWindow *OnCreateClient(void) ;
-
- inline WXHMENU GetWindowMenu(void) const ;
-
- // MDI operations
- virtual void Cascade(void);
- virtual void Tile(void);
- virtual void ArrangeIcons(void);
- virtual void ActivateNext(void);
- virtual void ActivatePrevious(void);
-
- // Handlers
- void MSWOnSize(int x, int y, WXUINT flag);
- bool MSWOnCommand(WXWORD id, WXWORD cmd, WXHWND control);
- void MSWOnMenuHighlight(WXWORD item, WXWORD flags, WXHMENU sysmenu);
- bool MSWProcessMessage(WXMSG *msg);
- bool MSWTranslateMessage(WXMSG *msg);
- void MSWOnCreate(WXLPCREATESTRUCT cs);
- long MSWDefWindowProc(WXUINT message, WXWPARAM wParam, WXLPARAM lParam);
- bool MSWOnEraseBkgnd(WXHDC pDC);
- bool MSWOnDestroy(void);
- bool MSWOnActivate(int state, bool minimized, WXHWND activate);
-
- // Responds to colour changes
- void OnSysColourChanged(wxSysColourChangedEvent& event);
-
- protected:
+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);
+ }
+
+ ~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) ;
+
+ // MDI operations
+ // --------------
+ virtual void Cascade();
+ virtual void Tile();
+ virtual void ArrangeIcons();
+ virtual void ActivateNext();
+ virtual void ActivatePrevious();
+
+ // handlers
+ // --------
+
+ // Responds to colour changes
+ void OnSysColourChanged(wxSysColourChangedEvent& event);
+
+ void OnSize(wxSizeEvent& 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);
+
+protected:
+#if wxUSE_MENUS_NATIVE
+ virtual void InternalSetMenuBar();
+#endif // wxUSE_MENUS_NATIVE
+
+ virtual WXHICON GetDefaultIcon() const;
+