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
This commit is contained in:
Vadim Zeitlin
2004-10-01 01:46:14 +00:00
parent 6ad75f5393
commit 5e62d4a5c7
2 changed files with 6 additions and 2 deletions

View File

@@ -194,7 +194,7 @@ public:
// event handlers // event handlers
void OnCloseWindow(wxCloseEvent& event); 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, // this should go away, but for now it's called from docview.cpp,
// so should be there for all platforms // so should be there for all platforms
@@ -221,6 +221,10 @@ protected:
// send the iconize event, return true if processed // send the iconize event, return true if processed
bool SendIconizeEvent(bool iconized = true); 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 // 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 // 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). // as they are not too small for TLWs (and not larger than screen).

View File

@@ -187,7 +187,7 @@ void wxTopLevelWindowBase::DoClientToScreen(int *x, int *y) const
// default resizing behaviour - if only ONE subwindow, resize to fill the // default resizing behaviour - if only ONE subwindow, resize to fill the
// whole client area // whole client area
void wxTopLevelWindowBase::OnSize(wxSizeEvent& WXUNUSED(event)) void wxTopLevelWindowBase::DoLayout()
{ {
// if we're using constraints or sizers - do use them // if we're using constraints or sizers - do use them
if ( GetAutoLayout() ) if ( GetAutoLayout() )