Added GetMaxSize virtual method for use by sizers.
Modified wxSizer to use it instead of crushing all windows to the display size. Currently only top level windows are limited to display size, all other windows are unlimited (inside the clipping region of their tlw). git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@14511 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -73,6 +73,22 @@ bool wxTopLevelWindowBase::Destroy()
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
wxSize wxTopLevelWindowBase::GetMaxSize() const
|
||||
{
|
||||
wxSize size( GetMaxWidth(), GetMaxHeight() );
|
||||
int w, h;
|
||||
|
||||
wxClientDisplayRect( 0, 0, &w, &h );
|
||||
|
||||
if( size.GetWidth() == -1 )
|
||||
size.SetWidth( w );
|
||||
|
||||
if( size.GetHeight() == -1 )
|
||||
size.SetHeight( h );
|
||||
|
||||
return size;
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxTopLevelWindow size management: we exclude the areas taken by
|
||||
// menu/status/toolbars from the client area, so the client area is what's
|
||||
@@ -175,3 +191,5 @@ bool wxTopLevelWindowBase::SendIconizeEvent(bool iconized)
|
||||
|
||||
return GetEventHandler()->ProcessEvent(event);
|
||||
}
|
||||
|
||||
// vi:sts=4:sw=4:et
|
||||
|
||||
Reference in New Issue
Block a user