Deprecated wxSizer::Remove( wxWindow* ), s/Remove/Detach/ in most places.

Made wxSizer child list typesafe.  I've not added the wxList implicit
conversion kludge yet, let's see who complains first perhaps..

Deprecated wxSizer::{G,S}etOption in favour of {G,S}etProportion in line
with the parameter name change in the docs.

Added {G,S}etSpacer consistent with the accessors for windows/sizers.

Made all wxSizer index parameters size_t -- we support no sensible
interpretation for negative indexes in them.  Hopefully this will
cause no real problems, but code doing (eg. Remove( 0 )) will need
to change to use 0u to resolve the ambiguity with overloaded members.
This is probably a Good Thing though, ymmv.

s/FALSE/false/g ; s/TRUE/true/g ; s/wxASSERT/wxASSERT_MSG/g in sizer.{cpp,h}

Fixed (I hope) the brokenness in wxSizer::Show -- I have no code to test
this yet, so it's a blind change, but spacers should now be hidden correctly
instead of ignored, and it should be properly reversable over multiple
calls now too.

removed pointless private scoping around DECLARE_CLASS macros.

Replace 0's I added previously with NULL -- not like that will end the
email thread either..

Added Add( wxSizerItem * ) & co.  There are probably a couple of other
places we can usefully do something like this too.  Stopped short of
refactoring everything to raise some issues about sizer method recursion
on -dev.

Updated wxSizer docs some more, they are still incomplete but getting
better.

wrapped KeyCode in wxDEPRECATED, converted all (gtk build) instances
to GetKeyCode.  There may be a few left for other ports.

Fixed a couple of other random compile warnings along the way.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@18616 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Ron Lee
2003-01-07 10:22:07 +00:00
parent db50ec5a50
commit 12a3f2275c
37 changed files with 569 additions and 381 deletions

View File

@@ -266,7 +266,7 @@ void ButtonWidgetsPage::CreateButton()
size_t count = m_sizerButton->GetChildren().GetCount();
for ( size_t n = 0; n < count; n++ )
{
m_sizerButton->Remove(0);
m_sizerButton->Remove( 0u );
}
delete m_button;

View File

@@ -340,7 +340,7 @@ void ComboboxWidgetsPage::CreateCombo()
items.Add(m_combobox->GetString(n));
}
m_sizerCombo->Remove(m_combobox);
m_sizerCombo->Detach( m_combobox );
delete m_combobox;
}

View File

@@ -271,7 +271,7 @@ void GaugeWidgetsPage::CreateGauge()
{
val = m_gauge->GetValue();
m_sizerGauge->Remove(m_gauge);
m_sizerGauge->Detach( m_gauge );
delete m_gauge;
}

View File

@@ -351,7 +351,7 @@ void ListboxWidgetsPage::CreateLbox()
items.Add(m_lbox->GetString(n));
}
m_sizerLbox->Remove(m_lbox);
m_sizerLbox->Detach( m_lbox );
delete m_lbox;
}

View File

@@ -397,7 +397,7 @@ void NotebookWidgetsPage::CreateNotebook()
notebook->GetPageImage(n));
}
m_sizerNotebook->Remove(notebook);
m_sizerNotebook->Detach( notebook );
delete notebook;
// restore selection

View File

@@ -288,7 +288,7 @@ void RadioWidgetsPage::CreateRadio()
{
sel = m_radio->GetSelection();
m_sizerRadio->Remove(m_radio);
m_sizerRadio->Detach( m_radio );
delete m_radio;
}

View File

@@ -315,13 +315,13 @@ void SliderWidgetsPage::CreateSlider()
val = valOld;
}
m_sizerSlider->Remove(m_slider);
m_sizerSlider->Detach( m_slider );
if ( m_sizerSlider->GetChildren().GetCount() )
{
// we have 2 spacers, remove them too
m_sizerSlider->Remove((int)0);
m_sizerSlider->Remove((int)0);
m_sizerSlider->Remove( 0u );
m_sizerSlider->Remove( 0u );
}
delete m_slider;

View File

@@ -285,13 +285,13 @@ void SpinBtnWidgetsPage::CreateSpin()
val = valOld;
}
m_sizerSpin->Remove(m_spinbtn);
m_sizerSpin->Remove(m_spinctrl);
m_sizerSpin->Detach( m_spinbtn );
m_sizerSpin->Detach( m_spinctrl );
// there are 3 spacers left
m_sizerSpin->Remove((int)0);
m_sizerSpin->Remove((int)0);
m_sizerSpin->Remove((int)0);
m_sizerSpin->Remove( 0u );
m_sizerSpin->Remove( 0u );
m_sizerSpin->Remove( 0u );
delete m_spinbtn;
delete m_spinctrl;

View File

@@ -542,7 +542,7 @@ void TextWidgetsPage::CreateText()
{
valueOld = m_text->GetValue();
m_sizerText->Remove(m_text);
m_sizerText->Detach( m_text );
delete m_text;
}
else