}
-wxSize wxWindowBase::GetBestFittingSize() const
+wxSize wxWindowBase::GetEffectiveMinSize() const
{
// merge the best size with the min size, giving priority to the min size
wxSize min = GetMinSize();
}
-void wxWindowBase::SetBestFittingSize(const wxSize& size)
+void wxWindowBase::SetInitialSize(const wxSize& size)
{
// Set the min size to the size passed in. This will usually either be
// wxDefaultSize or the size passed to this window's ctor/Create function.
SetMinSize(size);
// Merge the size with the best size if needed
- wxSize best = GetBestFittingSize();
+ wxSize best = GetEffectiveMinSize();
// If the current size doesn't match then change it
if (GetSize() != best)
return wxPoint(0,0);
}
-// set the min/max size of the window
-void wxWindowBase::DoSetSizeHints(int minW, int minH,
- int maxW, int maxH,
- int WXUNUSED(incW), int WXUNUSED(incH))
-{
- // setting min width greater than max width leads to infinite loops under
- // X11 and generally doesn't make any sense, so don't allow it
- wxCHECK_RET( (minW == wxDefaultCoord || maxW == wxDefaultCoord || minW <= maxW) &&
- (minH == wxDefaultCoord || maxH == wxDefaultCoord || minH <= maxH),
- _T("min width/height must be less than max width/height!") );
-
- m_minWidth = minW;
- m_maxWidth = maxW;
- m_minHeight = minH;
- m_maxHeight = maxH;
-}
-
void wxWindowBase::SetWindowVariant( wxWindowVariant variant )
{
if ( m_windowVariant != variant )
SetFont(font);
}
+void wxWindowBase::DoSetSizeHints( int minW, int minH,
+ int maxW, int maxH,
+ int WXUNUSED(incW), int WXUNUSED(incH) )
+{
+ wxCHECK_RET( (minW == wxDefaultCoord || maxW == wxDefaultCoord || minW <= maxW) &&
+ (minH == wxDefaultCoord || maxH == wxDefaultCoord || minH <= maxH),
+ _T("min width/height must be less than max width/height!") );
+
+ m_minWidth = minW;
+ m_maxWidth = maxW;
+ m_minHeight = minH;
+ m_maxHeight = maxH;
+}
+
+
void wxWindowBase::SetVirtualSizeHints( int minW, int minH,
int maxW, int maxH )
{
{
// setting an invalid cursor is ok, it means that we don't have any special
// cursor
- if ( m_cursor == cursor )
+ if ( m_cursor.IsSameAs(cursor) )
{
// no change
return false;