]> git.saurik.com Git - wxWidgets.git/commitdiff
extracted OnSize() body in a new DoLayout() method so that it can be called from...
authorVadim Zeitlin <vadim@wxwidgets.org>
Fri, 1 Oct 2004 01:46:14 +0000 (01:46 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Fri, 1 Oct 2004 01:46:14 +0000 (01:46 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29579 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/toplevel.h
src/common/toplvcmn.cpp

index d4337bc783db176997605bd598a25b484a6351ed..a3b3afcce1c801ecfdcb6e5c427edb0c2936c61f 100644 (file)
@@ -194,7 +194,7 @@ public:
 
     // event handlers
     void OnCloseWindow(wxCloseEvent& event);
-    void OnSize(wxSizeEvent& event);
+    void OnSize(wxSizeEvent& WXUNUSED(event)) { DoLayout(); }
 
     // this should go away, but for now it's called from docview.cpp,
     // so should be there for all platforms
@@ -221,6 +221,10 @@ protected:
     // send the iconize event, return true if processed
     bool SendIconizeEvent(bool iconized = true);
 
+    // do TLW-specific layout: we resize our unique child to fill the entire
+    // client area
+    void DoLayout();
+
     // Get the default size for the new window if no explicit size given. If
     // there are better default sizes then these can be changed, just as long
     // as they are not too small for TLWs (and not larger than screen).
index 8d262e70b942b64d78dae1dbee4f95ffbae59079..e23349fb52d94f83718aa5ed821e5d81ba8e410c 100644 (file)
@@ -187,7 +187,7 @@ void wxTopLevelWindowBase::DoClientToScreen(int *x, int *y) const
 
 // default resizing behaviour - if only ONE subwindow, resize to fill the
 // whole client area
-void wxTopLevelWindowBase::OnSize(wxSizeEvent& WXUNUSED(event))
+void wxTopLevelWindowBase::DoLayout()
 {
     // if we're using constraints or sizers - do use them
     if ( GetAutoLayout() )