IMPLEMENT_ABSTRACT_CLASS(wxSizer, wxObject);
IMPLEMENT_ABSTRACT_CLASS(wxBoxSizer, wxSizer);
IMPLEMENT_ABSTRACT_CLASS(wxStaticBoxSizer, wxBoxSizer);
+#if wxUSE_NOTEBOOK
IMPLEMENT_ABSTRACT_CLASS(wxNotebookSizer, wxSizer);
+#endif
//---------------------------------------------------------------------------
// wxSizerItem
m_children.Insert( new wxSizerItem( width, height, option, flag, border, userData ) );
}
+void wxSizer::Insert( int before, wxWindow *window, int option, int flag, int border, wxObject* userData )
+{
+ m_children.Insert( before, new wxSizerItem( window, option, flag, border, userData ) );
+}
+
+void wxSizer::Insert( int before, wxSizer *sizer, int option, int flag, int border, wxObject* userData )
+{
+ m_children.Insert( before, new wxSizerItem( sizer, option, flag, border, userData ) );
+}
+
+void wxSizer::Insert( int before, int width, int height, int option, int flag, int border, wxObject* userData )
+{
+ m_children.Insert( before, new wxSizerItem( width, height, option, flag, border, userData ) );
+}
+
bool wxSizer::Remove( wxWindow *window )
{
wxASSERT( window );
if (m_orient == wxVERTICAL)
{
- long height = size.y;
+ wxCoord height = size.y;
if (item->GetOption())
{
height = (delta * weight) + extra;
}
else
{
- long width = size.x;
+ wxCoord width = size.x;
if (item->GetOption())
{
width = (delta * weight) + extra;
wxSize wxBoxSizer::CalcMin()
{
if (m_children.GetCount() == 0)
- return wxSize(2,2);
+ return wxSize(10,10);
m_stretchable = 0;
m_minWidth = 0;
int other_border = 5;
wxSize ret( wxBoxSizer::CalcMin() );
- ret.x += 2*top_border;
+ ret.x += 2*other_border;
ret.y += other_border + top_border;
return ret;
// wxNotebookSizer
//---------------------------------------------------------------------------
+#if wxUSE_NOTEBOOK
+
wxNotebookSizer::wxNotebookSizer( wxNotebook *nb )
{
wxASSERT_MSG( nb, wxT("wxNotebookSizer needs a notebook") );
return wxSize( borderX + maxX, borderY + maxY );
}
-
+#endif // wxUSE_NOTEBOOK