X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/de243b058f059e1264c2d53346eab6190b3a11c2..77436c4cbac2269e564dc4fcf4494a58feca0af4:/include/wx/msw/frame.h?ds=sidebyside diff --git a/include/wx/msw/frame.h b/include/wx/msw/frame.h index 91c11c01c1..22509da920 100644 --- a/include/wx/msw/frame.h +++ b/include/wx/msw/frame.h @@ -1,6 +1,6 @@ ///////////////////////////////////////////////////////////////////////////// // Name: wx/msw/frame.h -// Purpose: wxFrame class +// Purpose: wxFrameMSW class // Author: Julian Smart // Modified by: // Created: 01/02/97 @@ -16,18 +16,18 @@ #pragma interface "frame.h" #endif -class WXDLLEXPORT wxFrame : public wxFrameBase +class WXDLLEXPORT wxFrameMSW : public wxFrameBase { public: // construction - wxFrame() { Init(); } - wxFrame(wxWindow *parent, - wxWindowID id, - const wxString& title, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, - long style = wxDEFAULT_FRAME_STYLE, - const wxString& name = wxFrameNameStr) + wxFrameMSW() { Init(); } + wxFrameMSW(wxWindow *parent, + wxWindowID id, + const wxString& title, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxDEFAULT_FRAME_STYLE, + const wxString& name = wxFrameNameStr) { Init(); @@ -42,7 +42,7 @@ public: long style = wxDEFAULT_FRAME_STYLE, const wxString& name = wxFrameNameStr); - virtual ~wxFrame(); + virtual ~wxFrameMSW(); // implement base class pure virtuals virtual void Maximize(bool maximize = TRUE); @@ -50,7 +50,6 @@ public: virtual void Iconize(bool iconize = TRUE); virtual bool IsIconized() const; virtual void Restore(); - virtual void SetMenuBar(wxMenuBar *menubar); virtual void SetIcon(const wxIcon& icon); virtual bool ShowFullScreen(bool show, long style = wxFULLSCREEN_ALL); virtual bool IsFullScreen() const { return m_fsIsShowing; }; @@ -61,8 +60,6 @@ public: // override some more virtuals virtual bool Show(bool show = TRUE); - virtual void RemoveChild( wxWindowBase *child ); - // event handlers void OnActivate(wxActivateEvent& event); void OnSysColourChanged(wxSysColourChangedEvent& event); @@ -118,6 +115,10 @@ public: // current size - this has an effect of refreshing the window layout void SendSizeEvent(); + // called by wxWindow whenever it gets focus + void SetLastFocus(wxWindow *win) { m_winLastFocused = win; } + wxWindow *GetLastFocus() const { return m_winLastFocused; } + protected: // common part of all ctors void Init(); @@ -132,12 +133,14 @@ protected: virtual void DoSetClientSize(int width, int height); - // helper - void DetachMenuBar(); +#if wxUSE_MENUS_NATIVE + // perform MSW-specific action when menubar is changed + virtual void AttachMenuBar(wxMenuBar *menubar); // a plug in for MDI frame classes which need to do something special when // the menubar is set virtual void InternalSetMenuBar(); +#endif // wxUSE_MENUS_NATIVE // propagate our state change to all child frames void IconizeChildFrames(bool bIconize); @@ -183,7 +186,6 @@ private: #endif // tooltips DECLARE_EVENT_TABLE() - DECLARE_DYNAMIC_CLASS(wxFrame) }; #endif