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(); } 
  74     wxSizerFlags
& Border(int direction
, int borderInPixels
) 
  79         m_borderInPixels 
= borderInPixels
; 
  84     wxSizerFlags
& Border(int direction 
= wxALL
) 
  86         // FIXME: default border size shouldn't be hardcoded 
  87         return Border(direction
, 5); 
  91     // accessors for wxSizer only 
  92     int GetProportion() const { return m_proportion
; } 
  93     int GetFlags() const { return m_flags
; } 
  94     int GetBorderInPixels() const { return m_borderInPixels
; } 
 103 //--------------------------------------------------------------------------- 
 105 //--------------------------------------------------------------------------- 
 107 class WXDLLEXPORT wxSizerItem
: public wxObject
 
 111     wxSizerItem(wxWindow 
*window
, const wxSizerFlags
& flags
) 
 119     wxSizerItem(wxSizer 
*sizer
, const wxSizerFlags
& flags
) 
 127     wxSizerItem( wxWindow 
*window
, 
 131                  wxObject
* userData 
); 
 134     wxSizerItem( wxSizer 
*sizer
, 
 138                  wxObject
* userData 
); 
 141     wxSizerItem( int width
, 
 149     virtual ~wxSizerItem(); 
 151     virtual void DeleteWindows(); 
 153     // Enable deleting the SizerItem without destroying the contained sizer. 
 157     virtual wxSize 
GetSize() const; 
 158     virtual wxSize 
CalcMin(); 
 159     virtual void SetDimension( wxPoint pos
, wxSize size 
); 
 161     wxSize 
GetMinSize() const 
 162         { return m_minSize
; } 
 163     wxSize 
GetMinSizeWithBorder() const; 
 165     void SetMinSize(const wxSize
& size
) 
 167             if (IsWindow()) m_window
->SetMinSize(size
); 
 170     void SetMinSize( int x
, int y 
) 
 171         { SetMinSize(wxSize(x
, y
)); } 
 172     void SetInitSize( int x
, int y 
) 
 173         { SetMinSize(wxSize(x
, y
)); } 
 175     void SetRatio( int width
, int height 
) 
 176         // if either of dimensions is zero, ratio is assumed to be 1 
 177         // to avoid "divide by zero" errors 
 178         { m_ratio 
= (width 
&& height
) ? ((float) width 
/ (float) height
) : 1; } 
 179     void SetRatio( wxSize size 
) 
 180         { m_ratio 
= (size
.x 
&& size
.y
) ? ((float) size
.x 
/ (float) size
.y
) : 1; } 
 181     void SetRatio( float ratio 
) 
 183     float GetRatio() const 
 186     virtual wxRect 
GetRect() { return m_zoneRect
; } 
 188     bool IsWindow() const; 
 189     bool IsSizer() const; 
 190     bool IsSpacer() const; 
 192     // Deprecated in 2.6, use {G,S}etProportion instead. 
 193     wxDEPRECATED( void SetOption( int option 
) ); 
 194     wxDEPRECATED( int GetOption() const ); 
 196     void SetProportion( int proportion 
) 
 197         { m_proportion 
= proportion
; } 
 198     int GetProportion() const 
 199         { return m_proportion
; } 
 200     void SetFlag( int flag 
) 
 204     void SetBorder( int border 
) 
 205         { m_border 
= border
; } 
 206     int GetBorder() const 
 209     wxWindow 
*GetWindow() const 
 211     void SetWindow( wxWindow 
*window 
) 
 212         { m_window 
= window
; m_minSize 
= window
->GetSize(); } 
 213     wxSizer 
*GetSizer() const 
 215     void SetSizer( wxSizer 
*sizer 
) 
 217     const wxSize 
&GetSpacer() const 
 219     void SetSpacer( const wxSize 
&size 
) 
 220         { m_size 
= size
; m_minSize 
= size
; } 
 222     void Show ( bool show 
); 
 226     wxObject
* GetUserData() const 
 227         { return m_userData
; } 
 228     wxPoint 
GetPosition() const 
 232     // common part of several ctors 
 235     // common part of ctors taking wxSizerFlags 
 236     void Init(const wxSizerFlags
& flags
); 
 247     wxRect       m_zoneRect
; // Rectangle for window or item (not including borders) 
 249     // If true, then this item is considered in the layout 
 250     // calculation.  Otherwise, it is skipped over. 
 253     // Aspect ratio can always be calculated from m_size, 
 254     // but this would cause precision loss when the window 
 255     // is shrunk.  It is safer to preserve the initial value. 
 258     wxObject    
*m_userData
; 
 261     DECLARE_CLASS(wxSizerItem
) 
 262     DECLARE_NO_COPY_CLASS(wxSizerItem
) 
 265 WX_DECLARE_EXPORTED_LIST( wxSizerItem
, wxSizerItemList 
); 
 268 //--------------------------------------------------------------------------- 
 270 //--------------------------------------------------------------------------- 
 272 class WXDLLEXPORT wxSizer
: public wxObject
, public wxClientDataContainer
 
 278     // methods for adding elements to the sizer: there are Add/Insert/Prepend 
 279     // overloads for each of window/sizer/spacer/wxSizerItem 
 280     inline wxSizerItem
* Add( wxWindow 
*window
, 
 284                              wxObject
* userData 
= NULL 
); 
 285     inline wxSizerItem
* Add( wxSizer 
*sizer
, 
 289                              wxObject
* userData 
= NULL 
); 
 290     inline wxSizerItem
* Add( int width
, 
 295                              wxObject
* userData 
= NULL 
); 
 296     inline wxSizerItem
* Add( wxWindow 
*window
, const wxSizerFlags
& flags 
); 
 297     inline wxSizerItem
* Add( wxSizer 
*sizer
, const wxSizerFlags
& flags 
); 
 298     inline wxSizerItem
* Add( wxSizerItem 
*item 
); 
 300     inline wxSizerItem
* AddSpacer(int size
); 
 301     inline wxSizerItem
* AddStretchSpacer(int prop 
= 1); 
 303     inline wxSizerItem
* Insert( size_t index
, 
 308                                 wxObject
* userData 
= NULL 
); 
 309     inline wxSizerItem
* Insert( size_t index
, 
 314                                 wxObject
* userData 
= NULL 
); 
 315     inline wxSizerItem
* Insert( size_t index
, 
 321                                 wxObject
* userData 
= NULL 
); 
 322     inline wxSizerItem
* Insert( size_t index
, 
 324                                 const wxSizerFlags
& flags 
); 
 325     inline wxSizerItem
* Insert( size_t index
, 
 327                                 const wxSizerFlags
& flags 
); 
 328     virtual wxSizerItem
* Insert( size_t index
, wxSizerItem 
*item 
); 
 330     inline wxSizerItem
* InsertSpacer(size_t index
, int size
); 
 331     inline wxSizerItem
* InsertStretchSpacer(size_t index
, int prop 
= 1); 
 333     inline wxSizerItem
* Prepend( wxWindow 
*window
, 
 337                                  wxObject
* userData 
= NULL 
); 
 338     inline wxSizerItem
* Prepend( wxSizer 
*sizer
, 
 342                                  wxObject
* userData 
= NULL 
); 
 343     inline wxSizerItem
* Prepend( int width
, 
 348                                  wxObject
* userData 
= NULL 
); 
 349     inline wxSizerItem
* Prepend( wxWindow 
*window
, const wxSizerFlags
& flags 
); 
 350     inline wxSizerItem
* Prepend( wxSizer 
*sizer
, const wxSizerFlags
& flags 
); 
 351     inline wxSizerItem
* Prepend( wxSizerItem 
*item 
); 
 353     inline wxSizerItem
* PrependSpacer(int size
); 
 354     inline wxSizerItem
* PrependStretchSpacer(int prop 
= 1); 
 357     // Deprecated in 2.6 since historically it does not delete the window, 
 358     // use Detach instead. 
 359     wxDEPRECATED( virtual bool Remove( wxWindow 
*window 
) ); 
 360     virtual bool Remove( wxSizer 
*sizer 
); 
 361     virtual bool Remove( int index 
); 
 363     virtual bool Detach( wxWindow 
*window 
); 
 364     virtual bool Detach( wxSizer 
*sizer 
); 
 365     virtual bool Detach( int index 
); 
 367     virtual void Clear( bool delete_windows 
= false ); 
 368     virtual void DeleteWindows(); 
 370     void SetMinSize( int width
, int height 
) 
 371         { DoSetMinSize( width
, height 
); } 
 372     void SetMinSize( wxSize size 
) 
 373         { DoSetMinSize( size
.x
, size
.y 
); } 
 375     /* Searches recursively */ 
 376     bool SetItemMinSize( wxWindow 
*window
, int width
, int height 
) 
 377         { return DoSetItemMinSize( window
, width
, height 
); } 
 378     bool SetItemMinSize( wxWindow 
*window
, wxSize size 
) 
 379         { return DoSetItemMinSize( window
, size
.x
, size
.y 
); } 
 381     /* Searches recursively */ 
 382     bool SetItemMinSize( wxSizer 
*sizer
, int width
, int height 
) 
 383         { return DoSetItemMinSize( sizer
, width
, height 
); } 
 384     bool SetItemMinSize( wxSizer 
*sizer
, wxSize size 
) 
 385         { return DoSetItemMinSize( sizer
, size
.x
, size
.y 
); } 
 387     bool SetItemMinSize( size_t index
, int width
, int height 
) 
 388         { return DoSetItemMinSize( index
, width
, height 
); } 
 389     bool SetItemMinSize( size_t index
, wxSize size 
) 
 390         { return DoSetItemMinSize( index
, size
.x
, size
.y 
); } 
 392     wxSize 
GetSize() const 
 394     wxPoint 
GetPosition() const 
 395         { return m_position
; } 
 397     /* Calculate the minimal size or return m_minSize if bigger. */ 
 400     virtual void RecalcSizes() = 0; 
 401     virtual wxSize 
CalcMin() = 0; 
 403     virtual void Layout(); 
 405     wxSize 
Fit( wxWindow 
*window 
); 
 406     void FitInside( wxWindow 
*window 
); 
 407     void SetSizeHints( wxWindow 
*window 
); 
 408     void SetVirtualSizeHints( wxWindow 
*window 
); 
 410     wxSizerItemList
& GetChildren() 
 411         { return m_children
; } 
 413     void SetDimension( int x
, int y
, int width
, int height 
); 
 415     wxSizerItem
* GetItem( wxWindow 
*window
, bool recursive 
= false ); 
 416     wxSizerItem
* GetItem( wxSizer 
*sizer
, bool recursive 
= false ); 
 417     wxSizerItem
* GetItem( size_t index 
); 
 419     // Manage whether individual scene items are considered 
 420     // in the layout calculations or not. 
 421     bool Show( wxWindow 
*window
, bool show 
= true, bool recursive 
= false ); 
 422     bool Show( wxSizer 
*sizer
, bool show 
= true, bool recursive 
= false ); 
 423     bool Show( size_t index
, bool show 
= true ); 
 425     bool Hide( wxSizer 
*sizer
, bool recursive 
= false ) 
 426         { return Show( sizer
, false, recursive 
); } 
 427     bool Hide( wxWindow 
*window
, bool recursive 
= false ) 
 428         { return Show( window
, false, recursive 
); } 
 429     bool Hide( size_t index 
) 
 430         { return Show( index
, false ); } 
 432     bool IsShown( wxWindow 
*window 
) const; 
 433     bool IsShown( wxSizer 
*sizer 
) const; 
 434     bool IsShown( size_t index 
) const; 
 436     // Recursively call wxWindow::Show () on all sizer items. 
 437     virtual void ShowItems (bool show
); 
 443     wxSizerItemList     m_children
; 
 445     wxSize 
GetMaxWindowSize( wxWindow 
*window 
) const; 
 446     wxSize 
GetMinWindowSize( wxWindow 
*window 
); 
 447     wxSize 
GetMaxClientSize( wxWindow 
*window 
) const; 
 448     wxSize 
GetMinClientSize( wxWindow 
*window 
); 
 449     wxSize 
FitSize( wxWindow 
*window 
); 
 450     wxSize 
VirtualFitSize( wxWindow 
*window 
); 
 452     virtual void DoSetMinSize( int width
, int height 
); 
 453     virtual bool DoSetItemMinSize( wxWindow 
*window
, int width
, int height 
); 
 454     virtual bool DoSetItemMinSize( wxSizer 
*sizer
, int width
, int height 
); 
 455     virtual bool DoSetItemMinSize( size_t index
, int width
, int height 
); 
 458     DECLARE_CLASS(wxSizer
) 
 461 //--------------------------------------------------------------------------- 
 463 //--------------------------------------------------------------------------- 
 465 class WXDLLEXPORT wxGridSizer
: public wxSizer
 
 468     wxGridSizer( int rows
, int cols
, int vgap
, int hgap 
); 
 469     wxGridSizer( int cols
, int vgap 
= 0, int hgap 
= 0 ); 
 471     virtual void RecalcSizes(); 
 472     virtual wxSize 
CalcMin(); 
 474     void SetCols( int cols 
)    { m_cols 
= cols
; } 
 475     void SetRows( int rows 
)    { m_rows 
= rows
; } 
 476     void SetVGap( int gap 
)     { m_vgap 
= gap
; } 
 477     void SetHGap( int gap 
)     { m_hgap 
= gap
; } 
 478     int GetCols() const         { return m_cols
; } 
 479     int GetRows() const         { return m_rows
; } 
 480     int GetVGap() const         { return m_vgap
; } 
 481     int GetHGap() const         { return m_hgap
; } 
 489     // return the number of total items and the number of columns and rows 
 490     int CalcRowsCols(int& rows
, int& cols
) const; 
 492     void SetItemBounds( wxSizerItem 
*item
, int x
, int y
, int w
, int h 
); 
 495     DECLARE_CLASS(wxGridSizer
) 
 498 //--------------------------------------------------------------------------- 
 500 //--------------------------------------------------------------------------- 
 502 // the bevaiour for resizing wxFlexGridSizer cells in the "non-flexible" 
 504 enum wxFlexSizerGrowMode
 
 506     // don't resize the cells in non-flexible direction at all 
 507     wxFLEX_GROWMODE_NONE
, 
 509     // uniformly resize only the specified ones (default) 
 510     wxFLEX_GROWMODE_SPECIFIED
, 
 512     // uniformly resize all cells 
 516 class WXDLLEXPORT wxFlexGridSizer
: public wxGridSizer
 
 520     wxFlexGridSizer( int rows
, int cols
, int vgap
, int hgap 
); 
 521     wxFlexGridSizer( int cols
, int vgap 
= 0, int hgap 
= 0 ); 
 522     virtual ~wxFlexGridSizer(); 
 525     // set the rows/columns which will grow (the others will remain of the 
 526     // constant initial size) 
 527     void AddGrowableRow( size_t idx
, int proportion 
= 0 ); 
 528     void RemoveGrowableRow( size_t idx 
); 
 529     void AddGrowableCol( size_t idx
, int proportion 
= 0 ); 
 530     void RemoveGrowableCol( size_t idx 
); 
 533     // the sizer cells may grow in both directions, not grow at all or only 
 534     // grow in one direction but not the other 
 536     // the direction may be wxVERTICAL, wxHORIZONTAL or wxBOTH (default) 
 537     void SetFlexibleDirection(int direction
) { m_flexDirection 
= direction
; } 
 538     int GetFlexibleDirection() const { return m_flexDirection
; } 
 540     // note that the grow mode only applies to the direction which is not 
 542     void SetNonFlexibleGrowMode(wxFlexSizerGrowMode mode
) { m_growMode 
= mode
; } 
 543     wxFlexSizerGrowMode 
GetNonFlexibleGrowMode() const { return m_growMode
; } 
 545     // Read-only access to the row heights and col widths arrays 
 546     const wxArrayInt
& GetRowHeights() const { return m_rowHeights
; } 
 547     const wxArrayInt
& GetColWidths() const  { return m_colWidths
; } 
 550     virtual void RecalcSizes(); 
 551     virtual wxSize 
CalcMin(); 
 554     void AdjustForFlexDirection(); 
 555     void AdjustForGrowables(const wxSize
& sz
, const wxSize
& minsz
, 
 556                             int nrows
, int ncols
); 
 558     // the heights/widths of all rows/columns 
 559     wxArrayInt  m_rowHeights
, 
 562     // indices of the growable columns and rows 
 563     wxArrayInt  m_growableRows
, 
 566     // proportion values of the corresponding growable rows and columns 
 567     wxArrayInt  m_growableRowsProportions
, 
 568                 m_growableColsProportions
; 
 570     // parameters describing whether the growable cells should be resized in 
 571     // both directions or only one 
 573     wxFlexSizerGrowMode m_growMode
; 
 575     // saves CalcMin result to optimize RecalcSizes 
 576     wxSize m_calculatedMinSize
; 
 579     DECLARE_CLASS(wxFlexGridSizer
) 
 580     DECLARE_NO_COPY_CLASS(wxFlexGridSizer
) 
 583 //--------------------------------------------------------------------------- 
 585 //--------------------------------------------------------------------------- 
 587 class WXDLLEXPORT wxBoxSizer
: public wxSizer
 
 590     wxBoxSizer( int orient 
); 
 595     int GetOrientation() const 
 598     void SetOrientation(int orient
) 
 599         { m_orient 
= orient
; } 
 610     DECLARE_CLASS(wxBoxSizer
) 
 613 //--------------------------------------------------------------------------- 
 615 //--------------------------------------------------------------------------- 
 619 class WXDLLEXPORT wxStaticBox
; 
 621 class WXDLLEXPORT wxStaticBoxSizer
: public wxBoxSizer
 
 624     wxStaticBoxSizer(wxStaticBox 
*box
, int orient
); 
 625     wxStaticBoxSizer(int orient
, wxWindow 
*win
, const wxString
& label 
= wxEmptyString
); 
 630     wxStaticBox 
*GetStaticBox() const 
 631         { return m_staticBox
; } 
 633     // override to hide/show the static box as well 
 634     virtual void ShowItems (bool show
); 
 637     wxStaticBox   
*m_staticBox
; 
 640     DECLARE_CLASS(wxStaticBoxSizer
) 
 641     DECLARE_NO_COPY_CLASS(wxStaticBoxSizer
) 
 644 #endif // wxUSE_STATBOX 
 648 class WXDLLEXPORT wxStdDialogButtonSizer
: public wxBoxSizer
 
 651     // Constructor just creates a new wxBoxSizer, not much else. 
 652     // Box sizer orientation is automatically determined here: 
 653     // vertical for PDAs, horizontal for everything else? 
 654     wxStdDialogButtonSizer(); 
 656     // Checks button ID against system IDs and sets one of the pointers below 
 657     // to this button. Does not do any sizer-related things here. 
 658     void AddButton(wxButton 
*button
); 
 660     // Use these if no standard ID can/should be used 
 661     void SetAffirmativeButton( wxButton 
*button 
); 
 662     void SetNegativeButton( wxButton 
*button 
); 
 663     void SetCancelButton( wxButton 
*button 
); 
 665     // All platform-specific code here, checks which buttons exist and add 
 666     // them to the sizer accordingly. 
 667     // Note - one potential hack on Mac we could use here, 
 668     // if m_buttonAffirmative is wxID_SAVE then ensure wxID_SAVE 
 669     // is set to _("Save") and m_buttonNegative is set to _("Don't Save") 
 670     // I wouldn't add any other hacks like that into here, 
 671     // but this one I can see being useful. 
 674     wxButton 
*GetAffirmativeButton() const { return m_buttonAffirmative
; } 
 675     wxButton 
*GetApplyButton() const { return m_buttonApply
; } 
 676     wxButton 
*GetNegativeButton() const { return m_buttonNegative
; } 
 677     wxButton 
*GetCancelButton() const { return m_buttonCancel
; } 
 678     wxButton 
*GetHelpButton() const { return m_buttonHelp
; } 
 681     wxButton 
*m_buttonAffirmative
;  // wxID_OK, wxID_YES, wxID_SAVE go here 
 682     wxButton 
*m_buttonApply
; 
 683     wxButton 
*m_buttonNegative
;     // wxID_NO 
 684     wxButton 
*m_buttonCancel
; 
 685     wxButton 
*m_buttonHelp
; 
 688     DECLARE_CLASS(wxStdDialogButtonSizer
) 
 689     DECLARE_NO_COPY_CLASS(wxStdDialogButtonSizer
) 
 692 #endif // wxUSE_BUTTON 
 694 #if WXWIN_COMPATIBILITY_2_4 
 695 // NB: wxBookCtrlSizer and wxNotebookSizer are deprecated, they 
 696 //     don't do anything. wxBookCtrlBase::DoGetBestSize does the job now. 
 698 // ---------------------------------------------------------------------------- 
 700 // ---------------------------------------------------------------------------- 
 704 // this sizer works with wxNotebook/wxListbook/... and sizes the control to 
 706 class WXDLLEXPORT wxBookCtrlBase
; 
 708 class WXDLLEXPORT wxBookCtrlSizer 
: public wxSizer
 
 711     wxDEPRECATED( wxBookCtrlSizer(wxBookCtrlBase 
*bookctrl
) ); 
 713     wxBookCtrlBase 
*GetControl() const { return m_bookctrl
; } 
 715     virtual void RecalcSizes(); 
 716     virtual wxSize 
CalcMin(); 
 719     // this protected ctor lets us mark the real one above as deprecated 
 720     // and still have warning-free build of the library itself: 
 723     wxBookCtrlBase 
*m_bookctrl
; 
 726     DECLARE_CLASS(wxBookCtrlSizer
) 
 727     DECLARE_NO_COPY_CLASS(wxBookCtrlSizer
) 
 733 // before wxBookCtrlBase we only had wxNotebookSizer, keep it for backwards 
 735 class WXDLLEXPORT wxNotebook
; 
 737 class WXDLLEXPORT wxNotebookSizer 
: public wxBookCtrlSizer
 
 740     wxDEPRECATED( wxNotebookSizer(wxNotebook 
*nb
) ); 
 742     wxNotebook 
*GetNotebook() const { return (wxNotebook 
*)m_bookctrl
; } 
 745     DECLARE_CLASS(wxNotebookSizer
) 
 746     DECLARE_NO_COPY_CLASS(wxNotebookSizer
) 
 749 #endif // wxUSE_NOTEBOOK 
 751 #endif // wxUSE_BOOKCTRL 
 753 #endif // WXWIN_COMPATIBILITY_2_4 
 755 // ---------------------------------------------------------------------------- 
 756 // inline functions implementation 
 757 // ---------------------------------------------------------------------------- 
 760 wxSizer::Add( wxWindow 
*window
, int proportion
, int flag
, int border
, wxObject
* userData 
) 
 762     return Add( new wxSizerItem( window
, proportion
, flag
, border
, userData 
) ); 
 766 wxSizer::Add( wxSizer 
*sizer
, int proportion
, int flag
, int border
, wxObject
* userData 
) 
 768     return Add( new wxSizerItem( sizer
, proportion
, flag
, border
, userData 
) ); 
 772 wxSizer::Add( int width
, int height
, int proportion
, int flag
, int border
, wxObject
* userData 
) 
 774     return Add( new wxSizerItem( width
, height
, proportion
, flag
, border
, userData 
) ); 
 778 wxSizer::Add( wxWindow 
*window
, const wxSizerFlags
& flags 
) 
 780     return Add( new wxSizerItem(window
, flags
) ); 
 784 wxSizer::Add( wxSizer 
*sizer
, const wxSizerFlags
& flags 
) 
 786     return Add( new wxSizerItem(sizer
, flags
) ); 
 790 wxSizer::Add( wxSizerItem 
*item 
) 
 792     return Insert( m_children
.GetCount(), item 
); 
 796 wxSizer::AddSpacer(int size
) 
 798     return Add(size
, size
); 
 802 wxSizer::AddStretchSpacer(int prop
) 
 804     return Add(0, 0, prop
); 
 808 wxSizer::Prepend( wxWindow 
*window
, int proportion
, int flag
, int border
, wxObject
* userData 
) 
 810     return Prepend( new wxSizerItem( window
, proportion
, flag
, border
, userData 
) ); 
 814 wxSizer::Prepend( wxSizer 
*sizer
, int proportion
, int flag
, int border
, wxObject
* userData 
) 
 816     return Prepend( new wxSizerItem( sizer
, proportion
, flag
, border
, userData 
) ); 
 820 wxSizer::Prepend( int width
, int height
, int proportion
, int flag
, int border
, wxObject
* userData 
) 
 822     return Prepend( new wxSizerItem( width
, height
, proportion
, flag
, border
, userData 
) ); 
 826 wxSizer::Prepend( wxSizerItem 
*item 
) 
 828     return Insert( 0, item 
); 
 832 wxSizer::PrependSpacer(int size
) 
 834     return Prepend(size
, size
); 
 838 wxSizer::PrependStretchSpacer(int prop
) 
 840     return Prepend(0, 0, prop
); 
 844 wxSizer::Prepend( wxWindow 
*window
, const wxSizerFlags
& flags 
) 
 846     return Prepend( new wxSizerItem(window
, flags
) ); 
 850 wxSizer::Prepend( wxSizer 
*sizer
, const wxSizerFlags
& flags 
) 
 852     return Prepend( new wxSizerItem(sizer
, flags
) ); 
 856 wxSizer::Insert( size_t index
, 
 863     return Insert( index
, new wxSizerItem( window
, proportion
, flag
, border
, userData 
) ); 
 867 wxSizer::Insert( size_t index
, 
 874     return Insert( index
, new wxSizerItem( sizer
, proportion
, flag
, border
, userData 
) ); 
 878 wxSizer::Insert( size_t index
, 
 886     return Insert( index
, new wxSizerItem( width
, height
, proportion
, flag
, border
, userData 
) ); 
 890 wxSizer::Insert( size_t index
, wxWindow 
*window
, const wxSizerFlags
& flags 
) 
 892     return Insert( index
, new wxSizerItem(window
, flags
) ); 
 896 wxSizer::Insert( size_t index
, wxSizer 
*sizer
, const wxSizerFlags
& flags 
) 
 898     return Insert( index
, new wxSizerItem(sizer
, flags
) ); 
 902 wxSizer::InsertSpacer(size_t index
, int size
) 
 904     return Insert(index
, size
, size
); 
 908 wxSizer::InsertStretchSpacer(size_t index
, int prop
) 
 910     return Insert(index
, 0, 0, prop
); 
 914 #endif // __WXSIZER_H__