From 06519806e3f197125ef0609752088272a345b2db Mon Sep 17 00:00:00 2001 From: David Webster Date: Fri, 28 Dec 2001 23:06:51 +0000 Subject: [PATCH] Add some missing methods git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@13221 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/os2/window.h | 10 ++++++++++ src/os2/window.cpp | 36 ++++++++++++++++++++++++++++++++++++ 2 files changed, 46 insertions(+) diff --git a/include/wx/os2/window.h b/include/wx/os2/window.h index 75d804f8e0..6508c25f6e 100644 --- a/include/wx/os2/window.h +++ b/include/wx/os2/window.h @@ -98,6 +98,9 @@ public: ,const wxRect* pRect = (const wxRect *)NULL ); virtual void Clear(void); + virtual void Freeze(void); + virtual void Update(void); + virtual void Thaw(void); virtual bool SetCursor(const wxCursor& rCursor); virtual bool SetFont(const wxFont& rFont); virtual int GetCharHeight(void) const; @@ -570,6 +573,13 @@ private: { return(wxWindowBase::Reparent(pNewParent));}; }; // end of wxWindow +class wxWindowCreationHook +{ +public: + wxWindowCreationHook(wxWindow* pWinBeingCreated); + ~wxWindowCreationHook(); +}; // end of CLASS wxWindowCreationHook + // --------------------------------------------------------------------------- // global functions // --------------------------------------------------------------------------- diff --git a/src/os2/window.cpp b/src/os2/window.cpp index b9633091a4..e06c94650c 100644 --- a/src/os2/window.cpp +++ b/src/os2/window.cpp @@ -147,6 +147,9 @@ static void TranslateKbdEventToMouse( wxWindow* pWin // static inline bool IsShiftDown() { return (::WinGetKeyState(HWND_DESKTOP, VK_SHIFT) & 0x8000) != 0; } static inline bool IsCtrlDown() { return (::WinGetKeyState(HWND_DESKTOP, VK_CTRL) & 0x8000) != 0; } + +static wxWindow* gpWinBeingCreated = NULL; + // --------------------------------------------------------------------------- // event tables // --------------------------------------------------------------------------- @@ -1305,6 +1308,27 @@ void wxWindowOS2::Clear() vDc.Clear(); } // end of wxWindowOS2::Clear +void wxWindowOS2::Update() +{ + ::WinUpdateWindow(GetHwnd()); +} // end of wxWindowOS2::Update + +void wxWindowOS2::Freeze() +{ + ::WinSendMsg(GetHwnd(), WM_VRNDISABLED, (MPARAM)0, (MPARAM)0); +} // end of wxWindowOS2::Freeze + +void wxWindowOS2::Thaw() +{ + ::WinSendMsg(GetHwnd(), WM_VRNENABLED, (MPARAM)TRUE, (MPARAM)0); + + // + // We need to refresh everything or otherwise he invalidated area is not + // repainted. + // + Refresh(); +} // end of wxWindowOS2::Thaw + void wxWindowOS2::Refresh( bool bEraseBack , const wxRect* pRect @@ -4105,6 +4129,18 @@ int wxWindowOS2::GetOS2ParentHeight( return(0L); } // end of wxWindowOS2::GetOS2ParentHeight +wxWindowCreationHook::wxWindowCreationHook( + wxWindow* pWinBeingCreated +) +{ + gpWinBeingCreated = pWinBeingCreated; +} // end of wxWindowCreationHook::wxWindowCreationHook + +wxWindowCreationHook::~wxWindowCreationHook() +{ + gpWinBeingCreated = NULL; +} // end of wxWindowCreationHook::~wxWindowCreationHook + // =========================================================================== // global functions // =========================================================================== -- 2.47.2