+
+//---------------------------------------------------------------------------
+// wxStaticBoxSizer
+//---------------------------------------------------------------------------
+
+#if wxUSE_STATBOX
+
+class WXDLLEXPORT wxStaticBox;
+
+class WXDLLEXPORT wxStaticBoxSizer: public wxBoxSizer
+{
+public:
+ wxStaticBoxSizer( wxStaticBox *box, int orient );
+
+ void RecalcSizes();
+ wxSize CalcMin();
+
+ wxStaticBox *GetStaticBox() const
+ { return m_staticBox; }
+
+ // override to hide/show the static box as well
+ virtual void ShowItems (bool show);
+
+protected:
+ wxStaticBox *m_staticBox;
+
+private:
+ DECLARE_CLASS(wxStaticBoxSizer)
+ DECLARE_NO_COPY_CLASS(wxStaticBoxSizer)
+};
+
+#endif // wxUSE_STATBOX
+
+
+#if WXWIN_COMPATIBILITY_2_4
+// NB: wxBookCtrlSizer and wxNotebookSizer are deprecated, they
+// don't do anything. wxBookCtrl::DoGetBestSize does the job now.
+
+// ----------------------------------------------------------------------------
+// wxBookCtrlSizer
+// ----------------------------------------------------------------------------
+
+#if wxUSE_BOOKCTRL
+
+// this sizer works with wxNotebook/wxListbook/... and sizes the control to
+// fit its pages
+class WXDLLEXPORT wxBookCtrl;
+
+class WXDLLEXPORT wxBookCtrlSizer : public wxSizer
+{
+public:
+ wxDEPRECATED( wxBookCtrlSizer(wxBookCtrl *bookctrl) );
+
+ wxBookCtrl *GetControl() const { return m_bookctrl; }
+
+ virtual void RecalcSizes();
+ virtual wxSize CalcMin();
+
+protected:
+ // this protected ctor lets us mark the real one above as deprecated
+ // and still have warning-free build of the library itself:
+ wxBookCtrlSizer() {}
+
+ wxBookCtrl *m_bookctrl;
+
+private:
+ DECLARE_CLASS(wxBookCtrlSizer)
+ DECLARE_NO_COPY_CLASS(wxBookCtrlSizer)
+};
+
+
+#if wxUSE_NOTEBOOK
+
+// before wxBookCtrl we only had wxNotebookSizer, keep it for backwards
+// compatibility
+class WXDLLEXPORT wxNotebook;
+
+class WXDLLEXPORT wxNotebookSizer : public wxBookCtrlSizer
+{
+public:
+ wxDEPRECATED( wxNotebookSizer(wxNotebook *nb) );
+
+ wxNotebook *GetNotebook() const { return (wxNotebook *)m_bookctrl; }
+
+private:
+ DECLARE_CLASS(wxNotebookSizer)
+ DECLARE_NO_COPY_CLASS(wxNotebookSizer)
+};
+
+#endif // wxUSE_NOTEBOOK
+
+#endif // wxUSE_BOOKCTRL
+
+#endif // WXWIN_COMPATIBILITY_2_4
+
+// ----------------------------------------------------------------------------
+// inline functions implementation
+// ----------------------------------------------------------------------------
+
+inline void
+wxSizer::Add( wxWindow *window, int proportion, int flag, int border, wxObject* userData )
+{
+ Add( new wxSizerItem( window, proportion, flag, border, userData ) );
+}
+
+inline void
+wxSizer::Add( wxSizer *sizer, int proportion, int flag, int border, wxObject* userData )
+{
+ Add( new wxSizerItem( sizer, proportion, flag, border, userData ) );
+}
+
+inline void
+wxSizer::Add( int width, int height, int proportion, int flag, int border, wxObject* userData )
+{
+ Add( new wxSizerItem( width, height, proportion, flag, border, userData ) );
+}
+
+inline void
+wxSizer::Add( wxWindow *window, const wxSizerFlags& flags )
+{
+ Add( new wxSizerItem(window, flags) );
+}
+
+inline void
+wxSizer::Add( wxSizer *sizer, const wxSizerFlags& flags )
+{
+ Add( new wxSizerItem(sizer, flags) );
+}
+
+inline void
+wxSizer::Add( wxSizerItem *item )
+{
+ Insert( m_children.GetCount(), item );
+}
+
+inline void
+wxSizer::AddSpacer(int size)
+{
+ Add(size, size);
+}
+
+inline void
+wxSizer::AddStretchSpacer(int prop)
+{
+ Add(0, 0, prop);
+}
+
+inline void
+wxSizer::Prepend( wxWindow *window, int proportion, int flag, int border, wxObject* userData )
+{
+ Prepend( new wxSizerItem( window, proportion, flag, border, userData ) );
+}
+
+inline void
+wxSizer::Prepend( wxSizer *sizer, int proportion, int flag, int border, wxObject* userData )
+{
+ Prepend( new wxSizerItem( sizer, proportion, flag, border, userData ) );
+}
+
+inline void
+wxSizer::Prepend( int width, int height, int proportion, int flag, int border, wxObject* userData )
+{
+ Prepend( new wxSizerItem( width, height, proportion, flag, border, userData ) );
+}
+
+inline void
+wxSizer::Prepend( wxSizerItem *item )
+{
+ Insert( 0, item );
+}
+
+inline void
+wxSizer::PrependSpacer(int size)
+{
+ Prepend(size, size);
+}
+
+inline void
+wxSizer::PrependStretchSpacer(int prop)
+{
+ Prepend(0, 0, prop);
+}
+
+inline void
+wxSizer::Prepend( wxWindow *window, const wxSizerFlags& flags )
+{
+ Prepend( new wxSizerItem(window, flags) );
+}
+
+inline void
+wxSizer::Prepend( wxSizer *sizer, const wxSizerFlags& flags )
+{
+ Prepend( new wxSizerItem(sizer, flags) );
+}
+
+inline void
+wxSizer::Insert( size_t index,
+ wxWindow *window,
+ int proportion,
+ int flag,
+ int border,
+ wxObject* userData )
+{
+ Insert( index, new wxSizerItem( window, proportion, flag, border, userData ) );
+}
+
+inline void
+wxSizer::Insert( size_t index,
+ wxSizer *sizer,
+ int proportion,
+ int flag,
+ int border,
+ wxObject* userData )
+{
+ Insert( index, new wxSizerItem( sizer, proportion, flag, border, userData ) );
+}
+
+inline void
+wxSizer::Insert( size_t index,
+ int width,
+ int height,
+ int proportion,
+ int flag,
+ int border,
+ wxObject* userData )
+{
+ Insert( index, new wxSizerItem( width, height, proportion, flag, border, userData ) );
+}
+
+inline void
+wxSizer::Insert( size_t index, wxWindow *window, const wxSizerFlags& flags )
+{
+ Insert( index, new wxSizerItem(window, flags) );
+}
+
+inline void
+wxSizer::Insert( size_t index, wxSizer *sizer, const wxSizerFlags& flags )
+{
+ Insert( index, new wxSizerItem(sizer, flags) );
+}
+
+inline void
+wxSizer::InsertSpacer(size_t index, int size)
+{
+ Insert(index, size, size);
+}
+
+inline void
+wxSizer::InsertStretchSpacer(size_t index, int prop)
+{
+ Insert(index, 0, 0, prop);
+}
+
+
+#endif // __WXSIZER_H__
+