restored int (instea of size_t) in Remove() and Detach(); TRUE/FALSE -> true/false

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@18926 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2003-01-25 12:50:32 +00:00
parent d162a7ee7d
commit e0d8fb4572
2 changed files with 40 additions and 40 deletions

View File

@@ -141,7 +141,7 @@ protected:
int m_border; int m_border;
int m_flag; 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. // calculation. Otherwise, it is skipped over.
bool m_show; bool m_show;
@@ -233,13 +233,13 @@ public:
// use Detach instead. // use Detach instead.
wxDEPRECATED( virtual bool Remove( wxWindow *window ) ); wxDEPRECATED( virtual bool Remove( wxWindow *window ) );
virtual bool Remove( wxSizer *sizer ); virtual bool Remove( wxSizer *sizer );
virtual bool Remove( size_t index ); virtual bool Remove( int index );
virtual bool Detach( wxWindow *window ); virtual bool Detach( wxWindow *window );
virtual bool Detach( wxSizer *sizer ); 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(); virtual void DeleteWindows();
void SetMinSize( int width, int height ) void SetMinSize( int width, int height )
@@ -289,16 +289,16 @@ public:
// Manage whether individual scene items are considered // Manage whether individual scene items are considered
// in the layout calculations or not. // in the layout calculations or not.
void Show( wxWindow *window, bool show = TRUE ); void Show( wxWindow *window, bool show = true );
void Show( wxSizer *sizer, bool show = TRUE ); void Show( wxSizer *sizer, bool show = true );
void Show( size_t index, bool show = TRUE ); void Show( size_t index, bool show = true );
void Hide( wxSizer *sizer ) void Hide( wxSizer *sizer )
{ Show( sizer, FALSE ); } { Show( sizer, false ); }
void Hide( wxWindow *window ) void Hide( wxWindow *window )
{ Show( window, FALSE ); } { Show( window, false ); }
void Hide( size_t index ) void Hide( size_t index )
{ Show( index, FALSE ); } { Show( index, false ); }
bool IsShown( wxWindow *window ) const; bool IsShown( wxWindow *window ) const;
bool IsShown( wxSizer *sizer ) const; bool IsShown( wxSizer *sizer ) const;

View File

@@ -56,7 +56,7 @@ wxSizerItem::wxSizerItem( int width, int height, int proportion, int flag, int b
, m_proportion( proportion ) , m_proportion( proportion )
, m_border( border ) , m_border( border )
, m_flag( flag ) , m_flag( flag )
, m_show( TRUE ) , m_show( true )
, m_userData( userData ) , m_userData( userData )
{ {
SetRatio( m_size ); SetRatio( m_size );
@@ -69,7 +69,7 @@ wxSizerItem::wxSizerItem( wxWindow *window, int proportion, int flag, int border
, m_proportion( proportion ) , m_proportion( proportion )
, m_border( border ) , m_border( border )
, m_flag( flag ) , m_flag( flag )
, m_show( TRUE ) , m_show( true )
, m_userData( userData ) , m_userData( userData )
{ {
// aspect ratio calculated from initial size // aspect ratio calculated from initial size
@@ -84,7 +84,7 @@ wxSizerItem::wxSizerItem( wxSizer *sizer, int proportion, int flag, int border,
, m_proportion( proportion ) , m_proportion( proportion )
, m_border( border ) , m_border( border )
, m_flag( flag ) , m_flag( flag )
, m_show( TRUE ) , m_show( true )
, m_ratio( 0.0 ) , m_ratio( 0.0 )
, m_userData( userData ) , m_userData( userData )
{ {
@@ -277,7 +277,7 @@ int wxSizerItem::GetOption() const
wxSizer::wxSizer() wxSizer::wxSizer()
: m_minSize( wxSize( 0, 0 ) ) : m_minSize( wxSize( 0, 0 ) )
{ {
m_children.DeleteContents( TRUE ); m_children.DeleteContents( true );
} }
wxSizer::~wxSizer() wxSizer::~wxSizer()
@@ -396,20 +396,20 @@ bool wxSizer::Remove( wxSizer *sizer )
node = node->GetNext(); node = node->GetNext();
} }
return FALSE; return false;
} }
bool wxSizer::Remove( size_t index ) bool wxSizer::Remove( int index )
{ {
wxCHECK_MSG( index < m_children.GetCount(), wxCHECK_MSG( index >= 0 && (size_t)index < m_children.GetCount(),
FALSE, false,
_T("Remove index is out of range") ); _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() ) if( item->IsWindow() )
item->GetWindow()->SetContainingSizer( NULL ); item->GetWindow()->SetContainingSizer( NULL );
@@ -434,7 +434,7 @@ bool wxSizer::Detach( wxSizer *sizer )
node = node->GetNext(); node = node->GetNext();
} }
return FALSE; return false;
} }
bool wxSizer::Detach( wxWindow *window ) bool wxSizer::Detach( wxWindow *window )
@@ -454,20 +454,20 @@ bool wxSizer::Detach( wxWindow *window )
node = node->GetNext(); node = node->GetNext();
} }
return FALSE; return false;
} }
bool wxSizer::Detach( size_t index ) bool wxSizer::Detach( int index )
{ {
wxCHECK_MSG( index < m_children.GetCount(), wxCHECK_MSG( index >= 0 && (size_t)index < m_children.GetCount(),
FALSE, false,
_T("Detach index is out of range") ); _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() ) if( item->IsSizer() )
item->DetachSizer(); item->DetachSizer();
@@ -670,7 +670,7 @@ bool wxSizer::DoSetItemMinSize( wxWindow *window, int width, int height )
if (item->GetWindow() == window) if (item->GetWindow() == window)
{ {
item->SetInitSize( width, height ); item->SetInitSize( width, height );
return TRUE; return true;
} }
node = node->GetNext(); node = node->GetNext();
} }
@@ -686,12 +686,12 @@ bool wxSizer::DoSetItemMinSize( wxWindow *window, int width, int height )
item->GetSizer()->DoSetItemMinSize( window, width, height ) ) item->GetSizer()->DoSetItemMinSize( window, width, height ) )
{ {
// A child sizer found the requested windw, exit. // A child sizer found the requested windw, exit.
return TRUE; return true;
} }
node = node->GetNext(); node = node->GetNext();
} }
return FALSE; return false;
} }
bool wxSizer::DoSetItemMinSize( wxSizer *sizer, int width, int height ) bool wxSizer::DoSetItemMinSize( wxSizer *sizer, int width, int height )
@@ -708,7 +708,7 @@ bool wxSizer::DoSetItemMinSize( wxSizer *sizer, int width, int height )
if (item->GetSizer() == sizer) if (item->GetSizer() == sizer)
{ {
item->GetSizer()->DoSetMinSize( width, height ); item->GetSizer()->DoSetMinSize( width, height );
return TRUE; return true;
} }
node = node->GetNext(); node = node->GetNext();
} }
@@ -724,19 +724,19 @@ bool wxSizer::DoSetItemMinSize( wxSizer *sizer, int width, int height )
item->GetSizer()->DoSetItemMinSize( sizer, width, height ) ) item->GetSizer()->DoSetItemMinSize( sizer, width, height ) )
{ {
// A child found the requested sizer, exit. // A child found the requested sizer, exit.
return TRUE; return true;
} }
node = node->GetNext(); node = node->GetNext();
} }
return FALSE; return false;
} }
bool wxSizer::DoSetItemMinSize( size_t index, int width, int height ) bool wxSizer::DoSetItemMinSize( size_t index, int width, int height )
{ {
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();
@@ -751,7 +751,7 @@ bool wxSizer::DoSetItemMinSize( size_t index, int width, int height )
item->SetInitSize( width, height ); item->SetInitSize( width, height );
} }
return TRUE; return true;
} }
void wxSizer::Show( wxWindow *window, bool show ) void wxSizer::Show( wxWindow *window, bool show )
@@ -824,7 +824,7 @@ bool wxSizer::IsShown( wxWindow *window ) const
wxFAIL_MSG( _T("IsShown failed to find sizer item") ); wxFAIL_MSG( _T("IsShown failed to find sizer item") );
return FALSE; return false;
} }
bool wxSizer::IsShown( wxSizer *sizer ) const bool wxSizer::IsShown( wxSizer *sizer ) const
@@ -843,13 +843,13 @@ bool wxSizer::IsShown( wxSizer *sizer ) const
wxFAIL_MSG( _T("IsShown failed to find sizer item") ); wxFAIL_MSG( _T("IsShown failed to find sizer item") );
return FALSE; return false;
} }
bool wxSizer::IsShown( size_t index ) const bool wxSizer::IsShown( size_t index ) const
{ {
wxCHECK_MSG( index < m_children.GetCount(), wxCHECK_MSG( index < m_children.GetCount(),
FALSE, false,
_T("IsShown index is out of range") ); _T("IsShown index is out of range") );
return m_children.Item( index )->GetData()->IsShown(); return m_children.Item( index )->GetData()->IsShown();