]> git.saurik.com Git - wxWidgets.git/commitdiff
moved toolbar adjustments for the client size from wxTLWMSW to wxFrameMSW to fix...
authorVadim Zeitlin <vadim@wxwidgets.org>
Thu, 10 Jan 2002 23:58:31 +0000 (23:58 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Thu, 10 Jan 2002 23:58:31 +0000 (23:58 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@13495 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/msw/toplevel.h
src/msw/frame.cpp
src/msw/toplevel.cpp

index f6a42ff4b7701b4445f6379088d4d94b576a0965..1bbcc2dcaa2c64008a7f7cdb475e38d843dc9929 100644 (file)
@@ -88,10 +88,6 @@ protected:
     // common part of Iconize(), Maximize() and Restore()
     void DoShowWindow(int nShowCmd);
 
-    // implement the geometry-related methods for a top level window
-    virtual void DoSetClientSize(int width, int height);
-    virtual void DoGetClientSize(int *width, int *height) const;
-
     // get the MSW window flags corresponding to wxWindows ones
     //
     // the functions returns the flags (WS_XXX) directly and puts the ext
index 76370db43478606ddbf68de804f93751456d3d87..1bf777979befb06acb6e62f1290e5dcff4264cf6 100644 (file)
@@ -157,6 +157,11 @@ void wxFrame::DoSetClientSize(int width, int height)
     }
 #endif // wxUSE_STATUSBAR
 
+    // call GetClientAreaOrigin() to take the toolbar into account
+    wxPoint pt = GetClientAreaOrigin();
+    width += pt.x;
+    height += pt.y;
+
     wxTopLevelWindow::DoSetClientSize(width, height);
 }
 
@@ -165,6 +170,14 @@ void wxFrame::DoGetClientSize(int *x, int *y) const
 {
     wxTopLevelWindow::DoGetClientSize(x, y);
 
+    // account for the possible toolbar
+    wxPoint pt = GetClientAreaOrigin();
+    if ( x )
+        *x -= pt.x;
+
+    if ( y )
+        *y -= pt.y;
+
 #if wxUSE_STATUSBAR
     // adjust client area height to take the status bar into account
     if ( y )
index 9aacc560173886664a59185f5c239b9ad794a003..5a6f77cf954e30b695e967fe819dbd5bc4b8108b 100644 (file)
@@ -170,8 +170,8 @@ long wxTopLevelWindowMSW::MSWGetCreateWindowFlags(long *exflags) const
             *exflags |= WS_EX_TOPMOST;
 
 #ifdef __WIN32__
-      if ( m_exStyle & wxFRAME_EX_CONTEXTHELP )
-        *exflags |= WS_EX_CONTEXTHELP;
+        if ( m_exStyle & wxFRAME_EX_CONTEXTHELP )
+            *exflags |= WS_EX_CONTEXTHELP;
 #endif // __WIN32__
     }
 
@@ -386,33 +386,6 @@ wxTopLevelWindowMSW::~wxTopLevelWindowMSW()
     }
 }
 
-// ----------------------------------------------------------------------------
-// wxTopLevelWindowMSW client size
-// ----------------------------------------------------------------------------
-
-void wxTopLevelWindowMSW::DoSetClientSize(int width, int height)
-{
-    // call GetClientAreaOrigin() to take the toolbar into account
-    wxPoint pt = GetClientAreaOrigin();
-    width += pt.x;
-    height += pt.y;
-
-    wxWindow::DoSetClientSize(width, height);
-}
-
-void wxTopLevelWindowMSW::DoGetClientSize(int *x, int *y) const
-{
-    wxWindow::DoGetClientSize(x, y);
-
-    wxPoint pt = GetClientAreaOrigin();
-
-    if ( x )
-        *x -= pt.x;
-
-    if ( y )
-        *y -= pt.y;
-}
-
 // ----------------------------------------------------------------------------
 // wxTopLevelWindowMSW showing
 // ----------------------------------------------------------------------------