wxSize Fit( wxWindow *window );
void FitInside( wxWindow *window );
void SetSizeHints( wxWindow *window );
- void SetVirtualSizeHints( wxWindow *window );
+#if WXWIN_COMPATIBILITY_2_8
+ // This only calls FitInside() since 2.9
+ wxDEPRECATED( void SetVirtualSizeHints( wxWindow *window ) );
+#endif
wxSizerItemList& GetChildren()
{ return m_children; }
const wxSize& incSize=wxDefaultSize)
{ DoSetSizeHints(minSize.x, minSize.y, maxSize.x, maxSize.y, incSize.x, incSize.y); }
- // Methods for setting virtual size hints
- // FIXME: What are virtual size hints?
- virtual void SetVirtualSizeHints( int minW, int minH,
- int maxW = wxDefaultCoord, int maxH = wxDefaultCoord );
- void SetVirtualSizeHints( const wxSize& minSize,
- const wxSize& maxSize=wxDefaultSize)
- {
- SetVirtualSizeHints(minSize.x, minSize.y, maxSize.x, maxSize.y);
- }
+#if WXWIN_COMPATIBILITY_2_8
+ // these are useless and do nothing since wxWidgets 2.9
+ wxDEPRECATED( virtual void SetVirtualSizeHints( int minW, int minH,
+ int maxW = wxDefaultCoord, int maxH = wxDefaultCoord ) );
+ wxDEPRECATED( void SetVirtualSizeHints( const wxSize& minSize,
+ const wxSize& maxSize=wxDefaultSize) );
+#endif // WXWIN_COMPATIBILITY_2_8
// Call these to override what GetBestSize() returns. This
wxScrollHelper *m_scrollHelper;
- int m_minVirtualWidth; // VirtualSizeHints
- int m_minVirtualHeight;
- int m_maxVirtualWidth;
- int m_maxVirtualHeight;
-
wxWindowVariant m_windowVariant ;
// override this to change the default (i.e. used when no style is
window->GetMaxHeight() );
}
+#if WXWIN_COMPATIBILITY_2_8
void wxSizer::SetVirtualSizeHints( wxWindow *window )
{
- // Preserve the window's max size hints, but set the
- // lower bound according to the sizer calculations.
-
FitInside( window );
- wxSize size( window->GetVirtualSize() );
- window->SetVirtualSizeHints( size.x,
- size.y,
- window->GetMaxWidth(),
- window->GetMaxHeight() );
}
+#endif // WXWIN_COMPATIBILITY_2_8
wxSize wxSizer::GetMaxWindowSize( wxWindow *window ) const
{
m_scrollHelper = (wxScrollHelper *) NULL;
- m_minVirtualWidth =
- m_maxVirtualWidth = wxDefaultCoord;
- m_minVirtualHeight =
- m_maxVirtualHeight = wxDefaultCoord;
-
m_windowVariant = wxWINDOW_VARIANT_NORMAL;
#if wxUSE_SYSTEM_OPTIONS
if ( wxSystemOptions::HasOption(wxWINDOW_DEFAULT_VARIANT) )
}
-void wxWindowBase::SetVirtualSizeHints( int minW, int minH,
- int maxW, int maxH )
+#if WXWIN_COMPATIBILITY_2_8
+void wxWindowBase::SetVirtualSizeHints(int WXUNUSED(minW), int WXUNUSED(minH),
+ int WXUNUSED(maxW), int WXUNUSED(maxH))
{
- m_minVirtualWidth = minW;
- m_maxVirtualWidth = maxW;
- m_minVirtualHeight = minH;
- m_maxVirtualHeight = maxH;
}
-void wxWindowBase::DoSetVirtualSize( int x, int y )
+void wxWindowBase::SetVirtualSizeHints(const wxSize& WXUNUSED(minsize),
+ const wxSize& WXUNUSED(maxsize))
{
- if ( m_minVirtualWidth != wxDefaultCoord && m_minVirtualWidth > x )
- x = m_minVirtualWidth;
- if ( m_maxVirtualWidth != wxDefaultCoord && m_maxVirtualWidth < x )
- x = m_maxVirtualWidth;
- if ( m_minVirtualHeight != wxDefaultCoord && m_minVirtualHeight > y )
- y = m_minVirtualHeight;
- if ( m_maxVirtualHeight != wxDefaultCoord && m_maxVirtualHeight < y )
- y = m_maxVirtualHeight;
+}
+#endif // WXWIN_COMPATIBILITY_2_8
+void wxWindowBase::DoSetVirtualSize( int x, int y )
+{
m_virtualSize = wxSize(x, y);
}