removed SetVirtualSizeHints() and related code
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@50717 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -604,7 +604,10 @@ public:
|
|||||||
wxSize Fit( wxWindow *window );
|
wxSize Fit( wxWindow *window );
|
||||||
void FitInside( wxWindow *window );
|
void FitInside( wxWindow *window );
|
||||||
void SetSizeHints( 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()
|
wxSizerItemList& GetChildren()
|
||||||
{ return m_children; }
|
{ return m_children; }
|
||||||
|
@@ -425,16 +425,14 @@ public:
|
|||||||
const wxSize& incSize=wxDefaultSize)
|
const wxSize& incSize=wxDefaultSize)
|
||||||
{ DoSetSizeHints(minSize.x, minSize.y, maxSize.x, maxSize.y, incSize.x, incSize.y); }
|
{ 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,
|
#if WXWIN_COMPATIBILITY_2_8
|
||||||
int maxW = wxDefaultCoord, int maxH = wxDefaultCoord );
|
// these are useless and do nothing since wxWidgets 2.9
|
||||||
void SetVirtualSizeHints( const wxSize& minSize,
|
wxDEPRECATED( virtual void SetVirtualSizeHints( int minW, int minH,
|
||||||
const wxSize& maxSize=wxDefaultSize)
|
int maxW = wxDefaultCoord, int maxH = wxDefaultCoord ) );
|
||||||
{
|
wxDEPRECATED( void SetVirtualSizeHints( const wxSize& minSize,
|
||||||
SetVirtualSizeHints(minSize.x, minSize.y, maxSize.x, maxSize.y);
|
const wxSize& maxSize=wxDefaultSize) );
|
||||||
}
|
#endif // WXWIN_COMPATIBILITY_2_8
|
||||||
|
|
||||||
|
|
||||||
// Call these to override what GetBestSize() returns. This
|
// Call these to override what GetBestSize() returns. This
|
||||||
@@ -1461,11 +1459,6 @@ protected:
|
|||||||
|
|
||||||
wxScrollHelper *m_scrollHelper;
|
wxScrollHelper *m_scrollHelper;
|
||||||
|
|
||||||
int m_minVirtualWidth; // VirtualSizeHints
|
|
||||||
int m_minVirtualHeight;
|
|
||||||
int m_maxVirtualWidth;
|
|
||||||
int m_maxVirtualHeight;
|
|
||||||
|
|
||||||
wxWindowVariant m_windowVariant ;
|
wxWindowVariant m_windowVariant ;
|
||||||
|
|
||||||
// override this to change the default (i.e. used when no style is
|
// override this to change the default (i.e. used when no style is
|
||||||
|
@@ -907,18 +907,12 @@ void wxSizer::SetSizeHints( wxWindow *window )
|
|||||||
window->GetMaxHeight() );
|
window->GetMaxHeight() );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if WXWIN_COMPATIBILITY_2_8
|
||||||
void wxSizer::SetVirtualSizeHints( wxWindow *window )
|
void wxSizer::SetVirtualSizeHints( wxWindow *window )
|
||||||
{
|
{
|
||||||
// Preserve the window's max size hints, but set the
|
|
||||||
// lower bound according to the sizer calculations.
|
|
||||||
|
|
||||||
FitInside( window );
|
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
|
wxSize wxSizer::GetMaxWindowSize( wxWindow *window ) const
|
||||||
{
|
{
|
||||||
|
@@ -193,11 +193,6 @@ wxWindowBase::wxWindowBase()
|
|||||||
|
|
||||||
m_scrollHelper = (wxScrollHelper *) NULL;
|
m_scrollHelper = (wxScrollHelper *) NULL;
|
||||||
|
|
||||||
m_minVirtualWidth =
|
|
||||||
m_maxVirtualWidth = wxDefaultCoord;
|
|
||||||
m_minVirtualHeight =
|
|
||||||
m_maxVirtualHeight = wxDefaultCoord;
|
|
||||||
|
|
||||||
m_windowVariant = wxWINDOW_VARIANT_NORMAL;
|
m_windowVariant = wxWINDOW_VARIANT_NORMAL;
|
||||||
#if wxUSE_SYSTEM_OPTIONS
|
#if wxUSE_SYSTEM_OPTIONS
|
||||||
if ( wxSystemOptions::HasOption(wxWINDOW_DEFAULT_VARIANT) )
|
if ( wxSystemOptions::HasOption(wxWINDOW_DEFAULT_VARIANT) )
|
||||||
@@ -771,26 +766,20 @@ void wxWindowBase::DoSetSizeHints( int minW, int minH,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void wxWindowBase::SetVirtualSizeHints( int minW, int minH,
|
#if WXWIN_COMPATIBILITY_2_8
|
||||||
int maxW, int maxH )
|
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::SetVirtualSizeHints(const wxSize& WXUNUSED(minsize),
|
||||||
|
const wxSize& WXUNUSED(maxsize))
|
||||||
|
{
|
||||||
|
}
|
||||||
|
#endif // WXWIN_COMPATIBILITY_2_8
|
||||||
|
|
||||||
void wxWindowBase::DoSetVirtualSize( int x, int y )
|
void wxWindowBase::DoSetVirtualSize( int x, int y )
|
||||||
{
|
{
|
||||||
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;
|
|
||||||
|
|
||||||
m_virtualSize = wxSize(x, y);
|
m_virtualSize = wxSize(x, y);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user