1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: provide wxSizer class for layout
4 // Author: Robert Roebling and Robin Dunn
5 // Modified by: Ron Lee, Vadim Zeitlin (wxSizerFlags)
8 // Copyright: (c) Robin Dunn, Robert Roebling
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
15 #if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
16 #pragma interface "sizer.h"
21 #include "wx/button.h"
22 #include "wx/window.h"
24 #include "wx/dialog.h"
25 #include "wx/bookctrl.h"
27 //---------------------------------------------------------------------------
29 //---------------------------------------------------------------------------
31 class WXDLLEXPORT wxSizerItem
;
32 class WXDLLEXPORT wxSizer
;
33 class WXDLLEXPORT wxBoxSizer
;
36 // ----------------------------------------------------------------------------
37 // wxSizerFlags: flags used for an item in the sizer
38 // ----------------------------------------------------------------------------
40 class WXDLLEXPORT wxSizerFlags
43 // construct the flags object initialized with the given proportion (0 by
45 wxSizerFlags(int proportion
= 0) : m_proportion(proportion
)
51 // setters for all sizer flags, they all return the object itself so that
52 // calls to them can be chained
54 wxSizerFlags
& Proportion(int proportion
)
56 m_proportion
= proportion
;
60 wxSizerFlags
& Align(int alignment
) // combination of wxAlignment values
68 // some shortcuts for Align()
69 wxSizerFlags
& Expand() { return Align(wxEXPAND
); }
70 wxSizerFlags
& Centre() { return Align(wxCENTRE
); }
71 wxSizerFlags
& Center() { return Centre(); }
72 wxSizerFlags
& Left() { return Align(wxALIGN_LEFT
); }
73 wxSizerFlags
& Right() { return Align(wxALIGN_RIGHT
); }
76 wxSizerFlags
& Border(int direction
, int borderInPixels
)
81 m_borderInPixels
= borderInPixels
;
86 wxSizerFlags
& Border(int direction
= wxALL
)
88 // FIXME: default border size shouldn't be hardcoded
89 return Border(direction
, 5);
93 // accessors for wxSizer only
94 int GetProportion() const { return m_proportion
; }
95 int GetFlags() const { return m_flags
; }
96 int GetBorderInPixels() const { return m_borderInPixels
; }
101 int m_borderInPixels
;
105 //---------------------------------------------------------------------------
107 //---------------------------------------------------------------------------
109 class WXDLLEXPORT wxSizerItem
: public wxObject
113 wxSizerItem(wxWindow
*window
, const wxSizerFlags
& flags
)
121 wxSizerItem(wxSizer
*sizer
, const wxSizerFlags
& flags
)
129 wxSizerItem( wxWindow
*window
,
133 wxObject
* userData
);
136 wxSizerItem( wxSizer
*sizer
,
140 wxObject
* userData
);
143 wxSizerItem( int width
,
151 virtual ~wxSizerItem();
153 virtual void DeleteWindows();
155 // Enable deleting the SizerItem without destroying the contained sizer.
159 virtual wxSize
GetSize() const;
160 virtual wxSize
CalcMin();
161 virtual void SetDimension( wxPoint pos
, wxSize size
);
163 wxSize
GetMinSize() const
164 { return m_minSize
; }
165 wxSize
GetMinSizeWithBorder() const;
167 void SetMinSize(const wxSize
& size
)
169 if (IsWindow()) m_window
->SetMinSize(size
);
172 void SetMinSize( int x
, int y
)
173 { SetMinSize(wxSize(x
, y
)); }
174 void SetInitSize( int x
, int y
)
175 { SetMinSize(wxSize(x
, y
)); }
177 void SetRatio( int width
, int height
)
178 // if either of dimensions is zero, ratio is assumed to be 1
179 // to avoid "divide by zero" errors
180 { m_ratio
= (width
&& height
) ? ((float) width
/ (float) height
) : 1; }
181 void SetRatio( wxSize size
)
182 { m_ratio
= (size
.x
&& size
.y
) ? ((float) size
.x
/ (float) size
.y
) : 1; }
183 void SetRatio( float ratio
)
185 float GetRatio() const
188 virtual wxRect
GetRect() { return m_zoneRect
; }
190 bool IsWindow() const;
191 bool IsSizer() const;
192 bool IsSpacer() const;
194 // Deprecated in 2.6, use {G,S}etProportion instead.
195 wxDEPRECATED( void SetOption( int option
) );
196 wxDEPRECATED( int GetOption() const );
198 void SetProportion( int proportion
)
199 { m_proportion
= proportion
; }
200 int GetProportion() const
201 { return m_proportion
; }
202 void SetFlag( int flag
)
206 void SetBorder( int border
)
207 { m_border
= border
; }
208 int GetBorder() const
211 wxWindow
*GetWindow() const
213 void SetWindow( wxWindow
*window
)
214 { m_window
= window
; m_minSize
= window
->GetSize(); }
215 wxSizer
*GetSizer() const
217 void SetSizer( wxSizer
*sizer
)
219 const wxSize
&GetSpacer() const
221 void SetSpacer( const wxSize
&size
)
222 { m_size
= size
; m_minSize
= size
; }
224 void Show ( bool show
);
228 wxObject
* GetUserData() const
229 { return m_userData
; }
230 wxPoint
GetPosition() const
234 // common part of several ctors
237 // common part of ctors taking wxSizerFlags
238 void Init(const wxSizerFlags
& flags
);
249 wxRect m_zoneRect
; // Rectangle for window or item (not including borders)
251 // If true, then this item is considered in the layout
252 // calculation. Otherwise, it is skipped over.
255 // Aspect ratio can always be calculated from m_size,
256 // but this would cause precision loss when the window
257 // is shrunk. It is safer to preserve the initial value.
260 wxObject
*m_userData
;
263 DECLARE_CLASS(wxSizerItem
)
264 DECLARE_NO_COPY_CLASS(wxSizerItem
)
267 WX_DECLARE_EXPORTED_LIST( wxSizerItem
, wxSizerItemList
);
270 //---------------------------------------------------------------------------
272 //---------------------------------------------------------------------------
274 class WXDLLEXPORT wxSizer
: public wxObject
, public wxClientDataContainer
280 // methods for adding elements to the sizer: there are Add/Insert/Prepend
281 // overloads for each of window/sizer/spacer/wxSizerItem
282 inline wxSizerItem
* Add( wxWindow
*window
,
286 wxObject
* userData
= NULL
);
287 inline wxSizerItem
* Add( wxSizer
*sizer
,
291 wxObject
* userData
= NULL
);
292 inline wxSizerItem
* Add( int width
,
297 wxObject
* userData
= NULL
);
298 inline wxSizerItem
* Add( wxWindow
*window
, const wxSizerFlags
& flags
);
299 inline wxSizerItem
* Add( wxSizer
*sizer
, const wxSizerFlags
& flags
);
300 inline wxSizerItem
* Add( wxSizerItem
*item
);
302 inline wxSizerItem
* AddSpacer(int size
);
303 inline wxSizerItem
* AddStretchSpacer(int prop
= 1);
305 inline wxSizerItem
* Insert( size_t index
,
310 wxObject
* userData
= NULL
);
311 inline wxSizerItem
* Insert( size_t index
,
316 wxObject
* userData
= NULL
);
317 inline wxSizerItem
* Insert( size_t index
,
323 wxObject
* userData
= NULL
);
324 inline wxSizerItem
* Insert( size_t index
,
326 const wxSizerFlags
& flags
);
327 inline wxSizerItem
* Insert( size_t index
,
329 const wxSizerFlags
& flags
);
330 virtual wxSizerItem
* Insert( size_t index
, wxSizerItem
*item
);
332 inline wxSizerItem
* InsertSpacer(size_t index
, int size
);
333 inline wxSizerItem
* InsertStretchSpacer(size_t index
, int prop
= 1);
335 inline wxSizerItem
* Prepend( wxWindow
*window
,
339 wxObject
* userData
= NULL
);
340 inline wxSizerItem
* Prepend( wxSizer
*sizer
,
344 wxObject
* userData
= NULL
);
345 inline wxSizerItem
* Prepend( int width
,
350 wxObject
* userData
= NULL
);
351 inline wxSizerItem
* Prepend( wxWindow
*window
, const wxSizerFlags
& flags
);
352 inline wxSizerItem
* Prepend( wxSizer
*sizer
, const wxSizerFlags
& flags
);
353 inline wxSizerItem
* Prepend( wxSizerItem
*item
);
355 inline wxSizerItem
* PrependSpacer(int size
);
356 inline wxSizerItem
* PrependStretchSpacer(int prop
= 1);
359 // Deprecated in 2.6 since historically it does not delete the window,
360 // use Detach instead.
361 wxDEPRECATED( virtual bool Remove( wxWindow
*window
) );
362 virtual bool Remove( wxSizer
*sizer
);
363 virtual bool Remove( int index
);
365 virtual bool Detach( wxWindow
*window
);
366 virtual bool Detach( wxSizer
*sizer
);
367 virtual bool Detach( int index
);
369 virtual void Clear( bool delete_windows
= false );
370 virtual void DeleteWindows();
372 void SetMinSize( int width
, int height
)
373 { DoSetMinSize( width
, height
); }
374 void SetMinSize( wxSize size
)
375 { DoSetMinSize( size
.x
, size
.y
); }
377 /* Searches recursively */
378 bool SetItemMinSize( wxWindow
*window
, int width
, int height
)
379 { return DoSetItemMinSize( window
, width
, height
); }
380 bool SetItemMinSize( wxWindow
*window
, wxSize size
)
381 { return DoSetItemMinSize( window
, size
.x
, size
.y
); }
383 /* Searches recursively */
384 bool SetItemMinSize( wxSizer
*sizer
, int width
, int height
)
385 { return DoSetItemMinSize( sizer
, width
, height
); }
386 bool SetItemMinSize( wxSizer
*sizer
, wxSize size
)
387 { return DoSetItemMinSize( sizer
, size
.x
, size
.y
); }
389 bool SetItemMinSize( size_t index
, int width
, int height
)
390 { return DoSetItemMinSize( index
, width
, height
); }
391 bool SetItemMinSize( size_t index
, wxSize size
)
392 { return DoSetItemMinSize( index
, size
.x
, size
.y
); }
394 wxSize
GetSize() const
396 wxPoint
GetPosition() const
397 { return m_position
; }
399 /* Calculate the minimal size or return m_minSize if bigger. */
402 virtual void RecalcSizes() = 0;
403 virtual wxSize
CalcMin() = 0;
405 virtual void Layout();
407 wxSize
Fit( wxWindow
*window
);
408 void FitInside( wxWindow
*window
);
409 void SetSizeHints( wxWindow
*window
);
410 void SetVirtualSizeHints( wxWindow
*window
);
412 wxSizerItemList
& GetChildren()
413 { return m_children
; }
415 void SetDimension( int x
, int y
, int width
, int height
);
417 wxSizerItem
* GetItem( wxWindow
*window
, bool recursive
= false );
418 wxSizerItem
* GetItem( wxSizer
*sizer
, bool recursive
= false );
419 wxSizerItem
* GetItem( size_t index
);
421 // Manage whether individual scene items are considered
422 // in the layout calculations or not.
423 bool Show( wxWindow
*window
, bool show
= true, bool recursive
= false );
424 bool Show( wxSizer
*sizer
, bool show
= true, bool recursive
= false );
425 bool Show( size_t index
, bool show
= true );
427 bool Hide( wxSizer
*sizer
, bool recursive
= false )
428 { return Show( sizer
, false, recursive
); }
429 bool Hide( wxWindow
*window
, bool recursive
= false )
430 { return Show( window
, false, recursive
); }
431 bool Hide( size_t index
)
432 { return Show( index
, false ); }
434 bool IsShown( wxWindow
*window
) const;
435 bool IsShown( wxSizer
*sizer
) const;
436 bool IsShown( size_t index
) const;
438 // Recursively call wxWindow::Show () on all sizer items.
439 virtual void ShowItems (bool show
);
445 wxSizerItemList m_children
;
447 wxSize
GetMaxWindowSize( wxWindow
*window
) const;
448 wxSize
GetMinWindowSize( wxWindow
*window
);
449 wxSize
GetMaxClientSize( wxWindow
*window
) const;
450 wxSize
GetMinClientSize( wxWindow
*window
);
451 wxSize
FitSize( wxWindow
*window
);
452 wxSize
VirtualFitSize( wxWindow
*window
);
454 virtual void DoSetMinSize( int width
, int height
);
455 virtual bool DoSetItemMinSize( wxWindow
*window
, int width
, int height
);
456 virtual bool DoSetItemMinSize( wxSizer
*sizer
, int width
, int height
);
457 virtual bool DoSetItemMinSize( size_t index
, int width
, int height
);
460 DECLARE_CLASS(wxSizer
)
463 //---------------------------------------------------------------------------
465 //---------------------------------------------------------------------------
467 class WXDLLEXPORT wxGridSizer
: public wxSizer
470 wxGridSizer( int rows
, int cols
, int vgap
, int hgap
);
471 wxGridSizer( int cols
, int vgap
= 0, int hgap
= 0 );
473 virtual void RecalcSizes();
474 virtual wxSize
CalcMin();
476 void SetCols( int cols
) { m_cols
= cols
; }
477 void SetRows( int rows
) { m_rows
= rows
; }
478 void SetVGap( int gap
) { m_vgap
= gap
; }
479 void SetHGap( int gap
) { m_hgap
= gap
; }
480 int GetCols() const { return m_cols
; }
481 int GetRows() const { return m_rows
; }
482 int GetVGap() const { return m_vgap
; }
483 int GetHGap() const { return m_hgap
; }
491 // return the number of total items and the number of columns and rows
492 int CalcRowsCols(int& rows
, int& cols
) const;
494 void SetItemBounds( wxSizerItem
*item
, int x
, int y
, int w
, int h
);
497 DECLARE_CLASS(wxGridSizer
)
500 //---------------------------------------------------------------------------
502 //---------------------------------------------------------------------------
504 // the bevaiour for resizing wxFlexGridSizer cells in the "non-flexible"
506 enum wxFlexSizerGrowMode
508 // don't resize the cells in non-flexible direction at all
509 wxFLEX_GROWMODE_NONE
,
511 // uniformly resize only the specified ones (default)
512 wxFLEX_GROWMODE_SPECIFIED
,
514 // uniformly resize all cells
518 class WXDLLEXPORT wxFlexGridSizer
: public wxGridSizer
522 wxFlexGridSizer( int rows
, int cols
, int vgap
, int hgap
);
523 wxFlexGridSizer( int cols
, int vgap
= 0, int hgap
= 0 );
524 virtual ~wxFlexGridSizer();
527 // set the rows/columns which will grow (the others will remain of the
528 // constant initial size)
529 void AddGrowableRow( size_t idx
, int proportion
= 0 );
530 void RemoveGrowableRow( size_t idx
);
531 void AddGrowableCol( size_t idx
, int proportion
= 0 );
532 void RemoveGrowableCol( size_t idx
);
535 // the sizer cells may grow in both directions, not grow at all or only
536 // grow in one direction but not the other
538 // the direction may be wxVERTICAL, wxHORIZONTAL or wxBOTH (default)
539 void SetFlexibleDirection(int direction
) { m_flexDirection
= direction
; }
540 int GetFlexibleDirection() const { return m_flexDirection
; }
542 // note that the grow mode only applies to the direction which is not
544 void SetNonFlexibleGrowMode(wxFlexSizerGrowMode mode
) { m_growMode
= mode
; }
545 wxFlexSizerGrowMode
GetNonFlexibleGrowMode() const { return m_growMode
; }
547 // Read-only access to the row heights and col widths arrays
548 const wxArrayInt
& GetRowHeights() const { return m_rowHeights
; }
549 const wxArrayInt
& GetColWidths() const { return m_colWidths
; }
552 virtual void RecalcSizes();
553 virtual wxSize
CalcMin();
556 void AdjustForFlexDirection();
557 void AdjustForGrowables(const wxSize
& sz
, const wxSize
& minsz
,
558 int nrows
, int ncols
);
560 // the heights/widths of all rows/columns
561 wxArrayInt m_rowHeights
,
564 // indices of the growable columns and rows
565 wxArrayInt m_growableRows
,
568 // proportion values of the corresponding growable rows and columns
569 wxArrayInt m_growableRowsProportions
,
570 m_growableColsProportions
;
572 // parameters describing whether the growable cells should be resized in
573 // both directions or only one
575 wxFlexSizerGrowMode m_growMode
;
577 // saves CalcMin result to optimize RecalcSizes
578 wxSize m_calculatedMinSize
;
581 DECLARE_CLASS(wxFlexGridSizer
)
582 DECLARE_NO_COPY_CLASS(wxFlexGridSizer
)
585 //---------------------------------------------------------------------------
587 //---------------------------------------------------------------------------
589 class WXDLLEXPORT wxBoxSizer
: public wxSizer
592 wxBoxSizer( int orient
);
597 int GetOrientation() const
600 void SetOrientation(int orient
)
601 { m_orient
= orient
; }
612 DECLARE_CLASS(wxBoxSizer
)
615 //---------------------------------------------------------------------------
617 //---------------------------------------------------------------------------
621 class WXDLLEXPORT wxStaticBox
;
623 class WXDLLEXPORT wxStaticBoxSizer
: public wxBoxSizer
626 wxStaticBoxSizer(wxStaticBox
*box
, int orient
);
627 wxStaticBoxSizer(int orient
, wxWindow
*win
, const wxString
& label
= wxEmptyString
);
632 wxStaticBox
*GetStaticBox() const
633 { return m_staticBox
; }
635 // override to hide/show the static box as well
636 virtual void ShowItems (bool show
);
639 wxStaticBox
*m_staticBox
;
642 DECLARE_CLASS(wxStaticBoxSizer
)
643 DECLARE_NO_COPY_CLASS(wxStaticBoxSizer
)
646 #endif // wxUSE_STATBOX
650 class WXDLLEXPORT wxStdDialogButtonSizer
: public wxBoxSizer
653 // Constructor just creates a new wxBoxSizer, not much else.
654 // Box sizer orientation is automatically determined here:
655 // vertical for PDAs, horizontal for everything else?
656 wxStdDialogButtonSizer();
658 // Checks button ID against system IDs and sets one of the pointers below
659 // to this button. Does not do any sizer-related things here.
660 void AddButton(wxButton
*button
);
662 // Use these if no standard ID can/should be used
663 void SetAffirmativeButton( wxButton
*button
);
664 void SetNegativeButton( wxButton
*button
);
665 void SetCancelButton( wxButton
*button
);
667 // All platform-specific code here, checks which buttons exist and add
668 // them to the sizer accordingly.
669 // Note - one potential hack on Mac we could use here,
670 // if m_buttonAffirmative is wxID_SAVE then ensure wxID_SAVE
671 // is set to _("Save") and m_buttonNegative is set to _("Don't Save")
672 // I wouldn't add any other hacks like that into here,
673 // but this one I can see being useful.
676 wxButton
*GetAffirmativeButton() const { return m_buttonAffirmative
; }
677 wxButton
*GetApplyButton() const { return m_buttonApply
; }
678 wxButton
*GetNegativeButton() const { return m_buttonNegative
; }
679 wxButton
*GetCancelButton() const { return m_buttonCancel
; }
680 wxButton
*GetHelpButton() const { return m_buttonHelp
; }
683 wxButton
*m_buttonAffirmative
; // wxID_OK, wxID_YES, wxID_SAVE go here
684 wxButton
*m_buttonApply
;
685 wxButton
*m_buttonNegative
; // wxID_NO
686 wxButton
*m_buttonCancel
;
687 wxButton
*m_buttonHelp
;
690 DECLARE_CLASS(wxStdDialogButtonSizer
)
691 DECLARE_NO_COPY_CLASS(wxStdDialogButtonSizer
)
694 #endif // wxUSE_BUTTON
696 #if WXWIN_COMPATIBILITY_2_4
697 // NB: wxBookCtrlSizer and wxNotebookSizer are deprecated, they
698 // don't do anything. wxBookCtrlBase::DoGetBestSize does the job now.
700 // ----------------------------------------------------------------------------
702 // ----------------------------------------------------------------------------
706 // this sizer works with wxNotebook/wxListbook/... and sizes the control to
708 class WXDLLEXPORT wxBookCtrlBase
;
710 class WXDLLEXPORT wxBookCtrlSizer
: public wxSizer
713 wxDEPRECATED( wxBookCtrlSizer(wxBookCtrlBase
*bookctrl
) );
715 wxBookCtrlBase
*GetControl() const { return m_bookctrl
; }
717 virtual void RecalcSizes();
718 virtual wxSize
CalcMin();
721 // this protected ctor lets us mark the real one above as deprecated
722 // and still have warning-free build of the library itself:
725 wxBookCtrlBase
*m_bookctrl
;
728 DECLARE_CLASS(wxBookCtrlSizer
)
729 DECLARE_NO_COPY_CLASS(wxBookCtrlSizer
)
735 // before wxBookCtrlBase we only had wxNotebookSizer, keep it for backwards
737 class WXDLLEXPORT wxNotebook
;
739 class WXDLLEXPORT wxNotebookSizer
: public wxBookCtrlSizer
742 wxDEPRECATED( wxNotebookSizer(wxNotebook
*nb
) );
744 wxNotebook
*GetNotebook() const { return (wxNotebook
*)m_bookctrl
; }
747 DECLARE_CLASS(wxNotebookSizer
)
748 DECLARE_NO_COPY_CLASS(wxNotebookSizer
)
751 #endif // wxUSE_NOTEBOOK
753 #endif // wxUSE_BOOKCTRL
755 #endif // WXWIN_COMPATIBILITY_2_4
757 // ----------------------------------------------------------------------------
758 // inline functions implementation
759 // ----------------------------------------------------------------------------
762 wxSizer::Add( wxWindow
*window
, int proportion
, int flag
, int border
, wxObject
* userData
)
764 return Add( new wxSizerItem( window
, proportion
, flag
, border
, userData
) );
768 wxSizer::Add( wxSizer
*sizer
, int proportion
, int flag
, int border
, wxObject
* userData
)
770 return Add( new wxSizerItem( sizer
, proportion
, flag
, border
, userData
) );
774 wxSizer::Add( int width
, int height
, int proportion
, int flag
, int border
, wxObject
* userData
)
776 return Add( new wxSizerItem( width
, height
, proportion
, flag
, border
, userData
) );
780 wxSizer::Add( wxWindow
*window
, const wxSizerFlags
& flags
)
782 return Add( new wxSizerItem(window
, flags
) );
786 wxSizer::Add( wxSizer
*sizer
, const wxSizerFlags
& flags
)
788 return Add( new wxSizerItem(sizer
, flags
) );
792 wxSizer::Add( wxSizerItem
*item
)
794 return Insert( m_children
.GetCount(), item
);
798 wxSizer::AddSpacer(int size
)
800 return Add(size
, size
);
804 wxSizer::AddStretchSpacer(int prop
)
806 return Add(0, 0, prop
);
810 wxSizer::Prepend( wxWindow
*window
, int proportion
, int flag
, int border
, wxObject
* userData
)
812 return Prepend( new wxSizerItem( window
, proportion
, flag
, border
, userData
) );
816 wxSizer::Prepend( wxSizer
*sizer
, int proportion
, int flag
, int border
, wxObject
* userData
)
818 return Prepend( new wxSizerItem( sizer
, proportion
, flag
, border
, userData
) );
822 wxSizer::Prepend( int width
, int height
, int proportion
, int flag
, int border
, wxObject
* userData
)
824 return Prepend( new wxSizerItem( width
, height
, proportion
, flag
, border
, userData
) );
828 wxSizer::Prepend( wxSizerItem
*item
)
830 return Insert( 0, item
);
834 wxSizer::PrependSpacer(int size
)
836 return Prepend(size
, size
);
840 wxSizer::PrependStretchSpacer(int prop
)
842 return Prepend(0, 0, prop
);
846 wxSizer::Prepend( wxWindow
*window
, const wxSizerFlags
& flags
)
848 return Prepend( new wxSizerItem(window
, flags
) );
852 wxSizer::Prepend( wxSizer
*sizer
, const wxSizerFlags
& flags
)
854 return Prepend( new wxSizerItem(sizer
, flags
) );
858 wxSizer::Insert( size_t index
,
865 return Insert( index
, new wxSizerItem( window
, proportion
, flag
, border
, userData
) );
869 wxSizer::Insert( size_t index
,
876 return Insert( index
, new wxSizerItem( sizer
, proportion
, flag
, border
, userData
) );
880 wxSizer::Insert( size_t index
,
888 return Insert( index
, new wxSizerItem( width
, height
, proportion
, flag
, border
, userData
) );
892 wxSizer::Insert( size_t index
, wxWindow
*window
, const wxSizerFlags
& flags
)
894 return Insert( index
, new wxSizerItem(window
, flags
) );
898 wxSizer::Insert( size_t index
, wxSizer
*sizer
, const wxSizerFlags
& flags
)
900 return Insert( index
, new wxSizerItem(sizer
, flags
) );
904 wxSizer::InsertSpacer(size_t index
, int size
)
906 return Insert(index
, size
, size
);
910 wxSizer::InsertStretchSpacer(size_t index
, int prop
)
912 return Insert(index
, 0, 0, prop
);
916 #endif // __WXSIZER_H__