// 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,
GetSize(w,h);
}
-wxSize wxTopLevelWindowBase::GetMaxSize() const
-{
- wxSize size = wxWindow::GetMaxSize();
-
- int w, h;
- wxClientDisplayRect(NULL, NULL, &w, &h );
-
- if ( size.GetWidth() == wxDefaultCoord )
- size.SetWidth(w);
-
- if ( size.GetHeight() == wxDefaultCoord )
- size.SetHeight(h);
-
- return size;
-}
-
/* static */
wxSize wxTopLevelWindowBase::GetDefaultSize()
{