int m_border;
int m_flag;
- // If TRUE, then this item is considered in the layout
+ // If true, then this item is considered in the layout
// calculation. Otherwise, it is skipped over.
bool m_show;
// use Detach instead.
wxDEPRECATED( virtual bool Remove( wxWindow *window ) );
virtual bool Remove( wxSizer *sizer );
- virtual bool Remove( size_t index );
+ virtual bool Remove( int index );
virtual bool Detach( wxWindow *window );
virtual bool Detach( wxSizer *sizer );
- virtual bool Detach( size_t index );
+ virtual bool Detach( int index );
- virtual void Clear( bool delete_windows=FALSE );
+ virtual void Clear( bool delete_windows = false );
virtual void DeleteWindows();
void SetMinSize( int width, int height )
// Manage whether individual scene items are considered
// in the layout calculations or not.
- void Show( wxWindow *window, bool show = TRUE );
- void Show( wxSizer *sizer, bool show = TRUE );
- void Show( size_t index, bool show = TRUE );
+ void Show( wxWindow *window, bool show = true );
+ void Show( wxSizer *sizer, bool show = true );
+ void Show( size_t index, bool show = true );
void Hide( wxSizer *sizer )
- { Show( sizer, FALSE ); }
+ { Show( sizer, false ); }
void Hide( wxWindow *window )
- { Show( window, FALSE ); }
+ { Show( window, false ); }
void Hide( size_t index )
- { Show( index, FALSE ); }
+ { Show( index, false ); }
bool IsShown( wxWindow *window ) const;
bool IsShown( wxSizer *sizer ) const;
, m_proportion( proportion )
, m_border( border )
, m_flag( flag )
- , m_show( TRUE )
+ , m_show( true )
, m_userData( userData )
{
SetRatio( m_size );
, m_proportion( proportion )
, m_border( border )
, m_flag( flag )
- , m_show( TRUE )
+ , m_show( true )
, m_userData( userData )
{
// aspect ratio calculated from initial size
, m_proportion( proportion )
, m_border( border )
, m_flag( flag )
- , m_show( TRUE )
+ , m_show( true )
, m_ratio( 0.0 )
, m_userData( userData )
{
wxSizer::wxSizer()
: m_minSize( wxSize( 0, 0 ) )
{
- m_children.DeleteContents( TRUE );
+ m_children.DeleteContents( true );
}
wxSizer::~wxSizer()
node = node->GetNext();
}
- return FALSE;
+ return false;
}
-bool wxSizer::Remove( size_t index )
+bool wxSizer::Remove( int index )
{
- wxCHECK_MSG( index < m_children.GetCount(),
- FALSE,
+ wxCHECK_MSG( index >= 0 && (size_t)index < m_children.GetCount(),
+ false,
_T("Remove index is out of range") );
- wxSizerItemList::Node *node = m_children.Item( index );
+ wxSizerItemList::Node *node = m_children.Item( index );
- wxCHECK_MSG( node, FALSE, _T("Failed to find child node") );
+ wxCHECK_MSG( node, false, _T("Failed to find child node") );
- wxSizerItem *item = node->GetData();
+ wxSizerItem *item = node->GetData();
if( item->IsWindow() )
item->GetWindow()->SetContainingSizer( NULL );
node = node->GetNext();
}
- return FALSE;
+ return false;
}
bool wxSizer::Detach( wxWindow *window )
node = node->GetNext();
}
- return FALSE;
+ return false;
}
-bool wxSizer::Detach( size_t index )
+bool wxSizer::Detach( int index )
{
- wxCHECK_MSG( index < m_children.GetCount(),
- FALSE,
+ wxCHECK_MSG( index >= 0 && (size_t)index < m_children.GetCount(),
+ false,
_T("Detach index is out of range") );
- wxSizerItemList::Node *node = m_children.Item( index );
+ wxSizerItemList::Node *node = m_children.Item( index );
- wxCHECK_MSG( node, FALSE, _T("Failed to find child node") );
+ wxCHECK_MSG( node, false, _T("Failed to find child node") );
- wxSizerItem *item = node->GetData();
+ wxSizerItem *item = node->GetData();
if( item->IsSizer() )
item->DetachSizer();
if (item->GetWindow() == window)
{
item->SetInitSize( width, height );
- return TRUE;
+ return true;
}
node = node->GetNext();
}
item->GetSizer()->DoSetItemMinSize( window, width, height ) )
{
// A child sizer found the requested windw, exit.
- return TRUE;
+ return true;
}
node = node->GetNext();
}
- return FALSE;
+ return false;
}
bool wxSizer::DoSetItemMinSize( wxSizer *sizer, int width, int height )
if (item->GetSizer() == sizer)
{
item->GetSizer()->DoSetMinSize( width, height );
- return TRUE;
+ return true;
}
node = node->GetNext();
}
item->GetSizer()->DoSetItemMinSize( sizer, width, height ) )
{
// A child found the requested sizer, exit.
- return TRUE;
+ return true;
}
node = node->GetNext();
}
- return FALSE;
+ return false;
}
bool wxSizer::DoSetItemMinSize( size_t index, int width, int height )
{
wxSizerItemList::Node *node = m_children.Item( index );
- wxCHECK_MSG( node, FALSE, _T("Failed to find child node") );
+ wxCHECK_MSG( node, false, _T("Failed to find child node") );
wxSizerItem *item = node->GetData();
item->SetInitSize( width, height );
}
- return TRUE;
+ return true;
}
void wxSizer::Show( wxWindow *window, bool show )
wxFAIL_MSG( _T("IsShown failed to find sizer item") );
- return FALSE;
+ return false;
}
bool wxSizer::IsShown( wxSizer *sizer ) const
wxFAIL_MSG( _T("IsShown failed to find sizer item") );
- return FALSE;
+ return false;
}
bool wxSizer::IsShown( size_t index ) const
{
wxCHECK_MSG( index < m_children.GetCount(),
- FALSE,
+ false,
_T("IsShown index is out of range") );
return m_children.Item( index )->GetData()->IsShown();