Moved overridden SetMinSize() to base class.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@42719 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robert Roebling
2006-10-30 13:25:00 +00:00
parent a1b05a60e1
commit cda5834e9d
4 changed files with 16 additions and 14 deletions

View File

@@ -121,10 +121,6 @@ protected:
int width, int height,
int sizeFlags = wxSIZE_AUTO);
// a different API for SetSizeHints
virtual void SetMinSize(const wxSize& minSize);
virtual void SetMaxSize(const wxSize& maxSize);
// give hints to the Window Manager for how the size
// of the TLW can be changed by dragging
virtual void DoSetSizeHints( int minW, int minH,

View File

@@ -250,6 +250,12 @@ public:
virtual void DoUpdateWindowUI(wxUpdateUIEvent& event) ;
protected:
// a different API for SetSizeHints
virtual void SetMinSize(const wxSize& minSize);
virtual void SetMaxSize(const wxSize& maxSize);
// set size hints for "window manager"
virtual void DoSetSizeHints( int minW, int minH,
int maxW = wxDefaultCoord, int maxH = wxDefaultCoord,
int incW = wxDefaultCoord, int incH = wxDefaultCoord );

View File

@@ -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,

View File

@@ -958,16 +958,6 @@ void wxTopLevelWindowGTK::DoSetClientSize( int width, int height )
width + m_miniEdge*2, height + m_miniEdge*2 + m_miniTitle, 0);
}
void wxTopLevelWindowGTK::SetMinSize(const wxSize& minSize)
{
SetSizeHints( minSize.x, minSize.y, GetMaxWidth(), GetMaxHeight() );
}
void wxTopLevelWindowGTK::SetMaxSize(const wxSize& maxSize)
{
SetSizeHints( GetMinWidth(), GetMinHeight(), maxSize.x, maxSize.y );
}
void wxTopLevelWindowGTK::DoSetSizeHints( int minW, int minH,
int maxW, int maxH,
int incW, int incH )