X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/a885d89ae9c9d6ff5275cb5b1ea3087132aacf8c..af01f1ba0d697c07173f436ab661b4c833258a91:/include/wx/os2/frame.h?ds=sidebyside diff --git a/include/wx/os2/frame.h b/include/wx/os2/frame.h index c61b9100ab..6f85949b97 100644 --- a/include/wx/os2/frame.h +++ b/include/wx/os2/frame.h @@ -12,19 +12,24 @@ #ifndef _WX_FRAME_H_ #define _WX_FRAME_H_ +// +// Get the default resource ID's for frames +// +#include "wx/os2/wxOs2.h" + class WXDLLEXPORT wxFrame : 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 - ) + ,wxWindowID vId + ,const wxString& rsTitle + ,const wxPoint& rPos = wxDefaultPosition + ,const wxSize& rSize = wxDefaultSize + ,long lStyle = wxDEFAULT_FRAME_STYLE + ,const wxString& rsName = wxFrameNameStr + ) { Init(); @@ -48,7 +53,9 @@ public: virtual void Iconize(bool bIconize = TRUE); virtual bool IsIconized(void) const; virtual void Restore(void); +#if wxUSE_MENUS_NATIVE virtual void SetMenuBar(wxMenuBar* pMenubar); +#endif virtual void SetIcon(const wxIcon& rIcon); virtual bool ShowFullScreen( bool bShow ,long lStyle = wxFULLSCREEN_ALL @@ -59,6 +66,7 @@ public: // implementation only from now on // ------------------------------- + void AlterChildPos(void); // override some more virtuals virtual bool Show(bool bShow = TRUE); @@ -135,6 +143,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); @@ -156,13 +178,15 @@ protected: ,int nWeight ); +#if wxUSE_MENUS_NATIVE // helper void DetachMenuBar(void); - + // 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); @@ -191,12 +215,38 @@ protected: int m_nFsToolBarHeight; bool m_bFsIsMaximized; bool m_bFsIsShowing; + bool m_bWasMinimized; + bool m_bIsShown; + wxWindow* m_pWinLastFocused; private: #if wxUSE_TOOLTIPS WXHWND m_hWndToolTip; #endif // tooltips + // + // 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; + WXHWND m_hTitleBar; + WXHWND m_hHScroll; + WXHWND m_hVScroll; + + // + // Swp structures for various client data + // DW: Better off in attached RefData? + // + SWP m_vSwp; + SWP m_vSwpClient; + SWP m_vSwpTitleBar; + SWP m_vSwpMenuBar; + SWP m_vSwpHScroll; + SWP m_vSwpVScroll; + SWP m_vSwpStatusBar; + SWP m_vSwpToolBar; + DECLARE_EVENT_TABLE() DECLARE_DYNAMIC_CLASS(wxFrame) };