From 5e62d4a5c7e36619ba642761917f82a47c9263a5 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Fri, 1 Oct 2004 01:46:14 +0000 Subject: [PATCH] extracted OnSize() body in a new DoLayout() method so that it can be called from wxFrame::SetXXXBar() git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29579 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/toplevel.h | 6 +++++- src/common/toplvcmn.cpp | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/include/wx/toplevel.h b/include/wx/toplevel.h index d4337bc783..a3b3afcce1 100644 --- a/include/wx/toplevel.h +++ b/include/wx/toplevel.h @@ -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). diff --git a/src/common/toplvcmn.cpp b/src/common/toplvcmn.cpp index 8d262e70b9..e23349fb52 100644 --- a/src/common/toplvcmn.cpp +++ b/src/common/toplvcmn.cpp @@ -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() ) -- 2.45.2