]> git.saurik.com Git - wxWidgets.git/commitdiff
Add some missing methods
authorDavid Webster <Dave.Webster@bhmi.com>
Fri, 28 Dec 2001 23:06:51 +0000 (23:06 +0000)
committerDavid Webster <Dave.Webster@bhmi.com>
Fri, 28 Dec 2001 23:06:51 +0000 (23:06 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@13221 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/os2/window.h
src/os2/window.cpp

index 75d804f8e0e9692750594e6b987a8a91a50d0570..6508c25f6ed8443bc63aca6ff8b9407698755a1b 100644 (file)
@@ -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
 // ---------------------------------------------------------------------------
index b9633091a441c03b62d6a87f00beb69f6b842c90..e06c94650cf99c62b33d38a0fe524f8e98928b5c 100644 (file)
@@ -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
 // ===========================================================================