added shortcut functions AddSpacer and AddStretchSpacer (plus Prepend and Insert variants)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@28486 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -366,6 +366,16 @@ void wxSizer::Add( wxSizerItem *item )
|
||||
item->GetWindow()->SetContainingSizer( this );
|
||||
}
|
||||
|
||||
void wxSizer::AddSpacer(int size)
|
||||
{
|
||||
Add(size, size);
|
||||
}
|
||||
|
||||
void wxSizer::AddStretchSpacer(int prop)
|
||||
{
|
||||
Add(0, 0, prop);
|
||||
}
|
||||
|
||||
void wxSizer::Prepend( wxWindow *window, int proportion, int flag, int border, wxObject* userData )
|
||||
{
|
||||
m_children.Insert( new wxSizerItem( window, proportion, flag, border, userData ) );
|
||||
@@ -390,6 +400,16 @@ void wxSizer::Prepend( wxSizerItem *item )
|
||||
item->GetWindow()->SetContainingSizer( this );
|
||||
}
|
||||
|
||||
void wxSizer::PrependSpacer(int size)
|
||||
{
|
||||
Prepend(size, size);
|
||||
}
|
||||
|
||||
void wxSizer::PrependStretchSpacer(int prop)
|
||||
{
|
||||
Prepend(0, 0, prop);
|
||||
}
|
||||
|
||||
void wxSizer::Insert( size_t index,
|
||||
wxWindow *window,
|
||||
int proportion,
|
||||
@@ -433,6 +453,16 @@ void wxSizer::Insert( size_t index, wxSizerItem *item )
|
||||
item->GetWindow()->SetContainingSizer( this );
|
||||
}
|
||||
|
||||
void wxSizer::InsertSpacer(size_t index, int size)
|
||||
{
|
||||
Insert(index, size, size);
|
||||
}
|
||||
|
||||
void wxSizer::InsertStretchSpacer(size_t index, int prop)
|
||||
{
|
||||
Insert(index, 0, 0, prop);
|
||||
}
|
||||
|
||||
bool wxSizer::Remove( wxWindow *window )
|
||||
{
|
||||
return Detach( window );
|
||||
|
Reference in New Issue
Block a user