X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/760ac9abdd63651ec8e30e7b365b8d4a9ad927e6..2b260bc3e2f269de090eefdaefc1450207a7734e:/include/wx/os2/frame.h?ds=sidebyside diff --git a/include/wx/os2/frame.h b/include/wx/os2/frame.h index be8181910a..ed2be61380 100644 --- a/include/wx/os2/frame.h +++ b/include/wx/os2/frame.h @@ -17,19 +17,19 @@ // #include "wx/os2/wxOs2.h" -class WXDLLEXPORT wxFrame : public wxFrameBase +class WXDLLEXPORT wxFrameOS2 : public wxFrameBase { public: // construction - wxFrame() { Init(); } - wxFrame( wxWindow* pParent - ,wxWindowID vId - ,const wxString& rsTitle - ,const wxPoint& rPos = wxDefaultPosition - ,const wxSize& rSize = wxDefaultSize - ,long lStyle = wxDEFAULT_FRAME_STYLE - ,const wxString& rsName = wxFrameNameStr - ) + wxFrameOS2() { Init(); } + wxFrameOS2( wxWindow* pParent + ,wxWindowID vId + ,const wxString& rsTitle + ,const wxPoint& rPos = wxDefaultPosition + ,const wxSize& rSize = wxDefaultSize + ,long lStyle = wxDEFAULT_FRAME_STYLE + ,const wxString& rsName = wxFrameNameStr + ) { Init(); @@ -45,7 +45,7 @@ public: ,const wxString& rsName = wxFrameNameStr ); - virtual ~wxFrame(); + virtual ~wxFrameOS2(); // implement base class pure virtuals virtual void Maximize(bool bMaximize = TRUE); @@ -102,7 +102,6 @@ public: #endif // wxUSE_STATUSBAR WXHMENU GetWinMenu() const { return m_hMenu; } - WXHWND GetFrame() const { return m_hFrame; } // Returns the origin of client area (may be different from (0,0) if the // frame has a toolbar) @@ -141,6 +140,20 @@ public: void SetToolTipCtrl(WXHWND hHwndTT) { m_hWndToolTip = hHwndTT; } #endif // tooltips + // + // Called by wxWindow whenever it gets focus + // + void SetLastFocus(wxWindow* pWin) { m_pWinLastFocused = pWin; } + wxWindow *GetLastFocus(void) const { return m_pWinLastFocused; } + + void SetClient(WXHWND c_Hwnd); + void SetClient(wxWindow* c_Window); + wxWindow *GetClient(); + HWND GetFrame(void) const { return m_hFrame; } + + friend MRESULT EXPENTRY wxFrameWndProc(HWND hWnd,ULONG ulMsg, MPARAM wParam, MPARAM lParam); + friend MRESULT EXPENTRY wxFrameMainWndProc(HWND hWnd,ULONG ulMsg, MPARAM wParam, MPARAM lParam); + protected: // common part of all ctors void Init(void); @@ -165,10 +178,13 @@ protected: // helper void DetachMenuBar(void); +#if wxUSE_MENUS_NATIVE + // perform MSW-specific action when menubar is changed + virtual void AttachMenuBar(wxMenuBar* pMenubar); // a plug in for MDI frame classes which need to do something special when // the menubar is set virtual void InternalSetMenuBar(void); - +#endif // propagate our state change to all child frames void IconizeChildFrames(bool bIconize); @@ -206,15 +222,11 @@ private: #endif // tooltips // - // The main handle of a frame window, that used for message processing - // is the client handle under PM. But we still need the frame handle - // as well + // Handles to child windows of the Frame, and the frame itself, + // that we don't have child objects for (m_hWnd in wxWindow is the + // handle of the Frame's client window! // WXHWND m_hFrame; - - // - // Handles to child windows of the Frame that we don't have child objects for - // WXHWND m_hTitleBar; WXHWND m_hHScroll; WXHWND m_hVScroll; @@ -233,7 +245,6 @@ private: SWP m_vSwpToolBar; DECLARE_EVENT_TABLE() - DECLARE_DYNAMIC_CLASS(wxFrame) }; #endif