X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c0c133e13b36a923c65f94499554e432bc3a0daa..032e024c1c6ab6a20226604baab9d00558620e72:/include/wx/msw/mdi.h?ds=inline diff --git a/include/wx/msw/mdi.h b/include/wx/msw/mdi.h index a2931c069c..caf235fd56 100644 --- a/include/wx/msw/mdi.h +++ b/include/wx/msw/mdi.h @@ -24,7 +24,7 @@ class WXDLLIMPEXP_FWD_CORE wxAcceleratorTable; class WXDLLIMPEXP_CORE wxMDIParentFrame : public wxMDIParentFrameBase { public: - wxMDIParentFrame() { } + wxMDIParentFrame() { Init(); } wxMDIParentFrame(wxWindow *parent, wxWindowID id, const wxString& title, @@ -33,6 +33,8 @@ public: long style = wxDEFAULT_FRAME_STYLE | wxVSCROLL | wxHSCROLL, const wxString& name = wxFrameNameStr) { + Init(); + Create(parent, id, title, pos, size, style, name); } @@ -94,7 +96,6 @@ public: 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); @@ -109,6 +110,9 @@ public: #endif // wxUSE_MENUS protected: + // override to pass menu/toolbar events to the active child first + virtual bool TryBefore(wxEvent& event); + #if wxUSE_MENUS_NATIVE virtual void InternalSetMenuBar(); #endif // wxUSE_MENUS_NATIVE @@ -119,6 +123,9 @@ protected: void UpdateClientSize(); private: + // common part of all ctors + void Init(); + #if wxUSE_MENUS // "Window" menu commands event handlers void OnMDICommand(wxCommandEvent& event); @@ -210,6 +217,7 @@ public: protected: virtual void DoGetScreenPosition(int *x, int *y) const; virtual void DoGetPosition(int *x, int *y) const; + virtual void DoSetSize(int x, int y, int width, int height, int sizeFlags); virtual void DoSetClientSize(int width, int height); virtual void InternalSetMenuBar(); virtual bool IsMDIChild() const { return true; }