X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/9379c0d752144826342fa2688a77aa5cccea3d9b..e319bb30f7e88242f56144fcc279b57047566a6b:/src/common/toplvcmn.cpp diff --git a/src/common/toplvcmn.cpp b/src/common/toplvcmn.cpp index 88350bebcf..45ad2fc6fb 100644 --- a/src/common/toplvcmn.cpp +++ b/src/common/toplvcmn.cpp @@ -140,6 +140,16 @@ bool wxTopLevelWindowBase::IsLastBeforeExit() const // wxTopLevelWindow geometry // ---------------------------------------------------------------------------- +void wxTopLevelWindowBase::SetMinSize(const wxSize& minSize) +{ + SetSizeHints( minSize.x, minSize.y, GetMaxWidth(), GetMaxHeight() ); +} + +void wxTopLevelWindowBase::SetMaxSize(const wxSize& maxSize) +{ + SetSizeHints( GetMinWidth(), GetMinHeight(), maxSize.x, maxSize.y ); +} + // set the min/max size of the window void wxTopLevelWindowBase::DoSetSizeHints(int minW, int minH, int maxW, int maxH, @@ -163,22 +173,6 @@ void wxTopLevelWindowBase::GetRectForTopLevelChildren(int *x, int *y, int *w, in GetSize(w,h); } -wxSize wxTopLevelWindowBase::GetMaxSize() const -{ - wxSize size( GetMaxWidth(), GetMaxHeight() ); - int w, h; - - wxClientDisplayRect( 0, 0, &w, &h ); - - if( size.GetWidth() == wxDefaultCoord ) - size.SetWidth( w ); - - if( size.GetHeight() == wxDefaultCoord ) - size.SetHeight( h ); - - return size; -} - /* static */ wxSize wxTopLevelWindowBase::GetDefaultSize() {