X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e5e10e234e2325fa6e25b23098470c5015e07a01..cbabf356ce00eb70f677e8483f54062805730e14:/interface/wx/sizer.h?ds=sidebyside diff --git a/interface/wx/sizer.h b/interface/wx/sizer.h index 8083caef3d..e4dde3e694 100644 --- a/interface/wx/sizer.h +++ b/interface/wx/sizer.h @@ -2,7 +2,6 @@ // Name: sizer.h // Purpose: interface of wxStdDialogButtonSizer // Author: wxWidgets team -// RCS-ID: $Id$ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -283,6 +282,19 @@ public: int flag = 0, int border = 0, wxObject* userData = NULL); + + /** + Appends a spacer child to the sizer. + + @param width + Width of the spacer. + @param height + Height of the spacer. + @param flags + A wxSizerFlags object that enables you to specify most of the other + parameters more conveniently. + */ + wxSizerItem* Add( int width, int height, const wxSizerFlags& flags); wxSizerItem* Add(wxSizerItem* item); @@ -426,6 +438,11 @@ public: */ wxWindow* GetContainingWindow() const; + /** + Set the window this sizer is used in. + */ + void SetContainingWindow(wxWindow *window); + /** Returns the number of items in the sizer. @@ -571,6 +588,15 @@ public: int flag = 0, int border = 0, wxObject* userData = NULL); + /** + Insert a child into the sizer before any existing item at @a index. + + See Add() for the meaning of the other parameters. + */ + wxSizerItem* Insert(size_t index, + int width, + int height, + const wxSizerFlags& flags); wxSizerItem* Insert(size_t index, wxSizerItem* item); @@ -615,7 +641,7 @@ public: bool IsShown(size_t index) const; /** - Call this to force layout of the children anew, e.g. after having added a child + Call this to force layout of the children anew, e.g.\ after having added a child to or removed a child (window, other sizer or space) from the sizer while keeping the current dimension. */ @@ -662,6 +688,12 @@ public: int border = 0, wxObject* userData = NULL); + /** + Same as Add(), but prepends the items to the beginning of the + list of items (windows, subsizers or spaces) owned by this sizer. + */ + wxSizerItem* Prepend(int width, int height, const wxSizerFlags& flags); + wxSizerItem* Prepend(wxSizerItem* item); /** @@ -893,6 +925,13 @@ public: @see Hide(), IsShown() */ bool Show(size_t index, bool show = true); + + + /** + Show or hide all items managed by the sizer. + */ + virtual void ShowItems(bool show); + }; @@ -1843,6 +1882,12 @@ public: */ int GetOrientation() const; + /** + Sets the orientation of the box sizer, either wxVERTICAL + or wxHORIZONTAL. + */ + void SetOrientation(int orient); + /** Implements the calculation of a box sizer's dimensions and then sets the size of its children (calling wxWindow::SetSize if the child is a window).