+wxSizer::wxSizer()
+ : m_minSize( wxSize( 0, 0 ) )
+{
+ m_children.DeleteContents( true );
+}
+
+wxSizer::~wxSizer()
+{
+ Clear();
+}
+
+void wxSizer::Add( wxWindow *window, int proportion, int flag, int border, wxObject* userData )
+{
+ m_children.Append( new wxSizerItem( window, proportion, flag, border, userData ) );
+ window->SetContainingSizer( this );
+}
+
+void wxSizer::Add( wxSizer *sizer, int proportion, int flag, int border, wxObject* userData )
+{
+ m_children.Append( new wxSizerItem( sizer, proportion, flag, border, userData ) );
+}
+
+void wxSizer::Add( int width, int height, int proportion, int flag, int border, wxObject* userData )
+{
+ m_children.Append( new wxSizerItem( width, height, proportion, flag, border, userData ) );
+}
+
+void wxSizer::Add( wxSizerItem *item )
+{
+ m_children.Append( item );
+
+ if( item->GetWindow() )
+ item->GetWindow()->SetContainingSizer( this );
+}
+
+void wxSizer::Prepend( wxWindow *window, int proportion, int flag, int border, wxObject* userData )
+{
+ m_children.Insert( new wxSizerItem( window, proportion, flag, border, userData ) );
+ window->SetContainingSizer( this );
+}
+
+void wxSizer::Prepend( wxSizer *sizer, int proportion, int flag, int border, wxObject* userData )
+{
+ m_children.Insert( new wxSizerItem( sizer, proportion, flag, border, userData ) );
+}
+
+void wxSizer::Prepend( int width, int height, int proportion, int flag, int border, wxObject* userData )
+{
+ m_children.Insert( new wxSizerItem( width, height, proportion, flag, border, userData ) );
+}
+
+void wxSizer::Prepend( wxSizerItem *item )
+{
+ m_children.Insert( item );
+
+ if( item->GetWindow() )
+ item->GetWindow()->SetContainingSizer( this );
+}
+
+void wxSizer::Insert( size_t index,
+ wxWindow *window,
+ int proportion,
+ int flag,
+ int border,
+ wxObject* userData )
+{
+ m_children.Insert( index,
+ new wxSizerItem( window, proportion, flag, border, userData ) );
+ window->SetContainingSizer( this );
+}
+
+void wxSizer::Insert( size_t index,
+ wxSizer *sizer,
+ int proportion,
+ int flag,
+ int border,
+ wxObject* userData )
+{
+ m_children.Insert( index,
+ new wxSizerItem( sizer, proportion, flag, border, userData ) );
+}
+
+void wxSizer::Insert( size_t index,
+ int width,
+ int height,
+ int proportion,
+ int flag,
+ int border,
+ wxObject* userData )
+{
+ m_children.Insert( index,
+ new wxSizerItem( width, height, proportion, flag, border, userData ) );
+}
+
+void wxSizer::Insert( size_t index, wxSizerItem *item )
+{
+ m_children.Insert( index, item );
+
+ if( item->GetWindow() )
+ item->GetWindow()->SetContainingSizer( this );
+}
+
+bool wxSizer::Remove( wxWindow *window )
+{
+ return Detach( window );
+}
+
+bool wxSizer::Remove( wxSizer *sizer )
+{
+ wxASSERT_MSG( sizer, _T("Removing NULL sizer") );
+
+ wxSizerItemList::Node *node = m_children.GetFirst();
+ while (node)
+ {
+ wxSizerItem *item = node->GetData();
+
+ if (item->GetSizer() == sizer)
+ return m_children.DeleteNode( node );
+
+ node = node->GetNext();
+ }
+
+ return false;
+}
+
+bool wxSizer::Remove( int index )
+{
+ 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 );
+
+ wxCHECK_MSG( node, false, _T("Failed to find child node") );
+
+ wxSizerItem *item = node->GetData();
+
+ if( item->IsWindow() )
+ item->GetWindow()->SetContainingSizer( NULL );
+
+ return m_children.DeleteNode( node );
+}
+
+bool wxSizer::Detach( wxSizer *sizer )
+{
+ wxASSERT_MSG( sizer, _T("Detaching NULL sizer") );
+
+ wxSizerItemList::Node *node = m_children.GetFirst();
+ while (node)
+ {
+ wxSizerItem *item = node->GetData();
+
+ if (item->GetSizer() == sizer)
+ {
+ item->DetachSizer();
+ return m_children.DeleteNode( node );
+ }
+ node = node->GetNext();
+ }
+
+ return false;
+}
+
+bool wxSizer::Detach( wxWindow *window )