X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/0e92a846e4bb532856339f39cb10a0f65fc6055d..7344108e8a129a3f9b4df5ab0f98a1713db03b89:/interface/wx/sizer.h?ds=inline diff --git a/interface/wx/sizer.h b/interface/wx/sizer.h index 4021991990..8083caef3d 100644 --- a/interface/wx/sizer.h +++ b/interface/wx/sizer.h @@ -3,7 +3,7 @@ // Purpose: interface of wxStdDialogButtonSizer // Author: wxWidgets team // RCS-ID: $Id$ -// Licence: wxWindows license +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -49,12 +49,6 @@ window, the library wouldn't be able to delete such an orphan sizer and in this, and only this, case it should be deleted explicitly. - @beginWxPythonOnly - If you wish to create a sizer class in wxPython you should - derive the class from @c wxPySizer in order to get Python-aware - capabilities for the various virtual methods. - @endWxPythonOnly - @section wxsizer_flags wxSizer flags The "flag" argument accepted by wxSizeItem constructors and other @@ -88,7 +82,7 @@ @c wxFIXED_MINSIZE.} @itemdef{wxRESERVE_SPACE_EVEN_IF_HIDDEN, Normally wxSizers don't allocate space for hidden windows or other - items. This flag overrides this behavior so that sufficient space + items. This flag overrides this behaviour so that sufficient space is allocated for the window even if it isn't visible. This makes it possible to dynamically show and hide controls without resizing parent dialog, for example. (Available since 2.8.8.)} @@ -168,7 +162,7 @@ public: to make them grow and shrink equally with the sizer's horizontal dimension. @param flag - OR-combination of flags affecting sizer's behavior. See + OR-combination of flags affecting sizer's behaviour. See @ref wxsizer_flags "wxSizer flags list" for details. @param border Determines the border width, if the flag parameter is set to @@ -226,7 +220,7 @@ public: to make them grow and shrink equally with the sizer's horizontal dimension. @param flag - OR-combination of flags affecting sizer's behavior. See + OR-combination of flags affecting sizer's behaviour. See @ref wxsizer_flags "wxSizer flags list" for details. @param border Determines the border width, if the flag parameter is set to @@ -274,7 +268,7 @@ public: to make them grow and shrink equally with the sizer's horizontal dimension. @param flag - OR-combination of flags affecting sizer's behavior. See + OR-combination of flags affecting sizer's behaviour. See @ref wxsizer_flags "wxSizer flags list" for details. @param border Determines the border width, if the flag parameter is set to @@ -290,6 +284,8 @@ public: int border = 0, wxObject* userData = NULL); + wxSizerItem* Add(wxSizerItem* item); + /** This base function adds non-stretchable space to both the horizontal and vertical orientation of the sizer. @@ -406,6 +402,14 @@ public: */ void FitInside(wxWindow* window); + /** + Inform sizer about the first direction that has been decided (by + parent item). Returns true if it made use of the information (and + recalculated min size). + */ + virtual bool InformFirstDirection(int direction, int size, int availableOtherDir); + + //@{ /** Returns the list of the items in this sizer. @@ -568,6 +572,8 @@ public: int border = 0, wxObject* userData = NULL); + wxSizerItem* Insert(size_t index, wxSizerItem* item); + /** Inserts non-stretchable space to the sizer. More readable way of calling wxSizer::Insert(index, size, size). @@ -656,6 +662,8 @@ public: int border = 0, wxObject* userData = NULL); + wxSizerItem* Prepend(wxSizerItem* item); + /** Prepends non-stretchable space to the sizer. More readable way of calling wxSizer::Prepend(size, size, 0). @@ -843,7 +851,8 @@ public: the sizer's minimal size. For windows with managed scrollbars this will set them appropriately. - @deprecated @todo provide deprecation description + @deprecated This is exactly the same as FitInside() in wxWidgets 2.9 + and later, please replace calls to it with FitInside(). @see wxScrolled::SetScrollbars() */ @@ -966,6 +975,9 @@ public: outlined above. */ void SetNegativeButton(wxButton* button); + + virtual void RecalcSizes(); + virtual wxSize CalcMin(); }; @@ -989,27 +1001,27 @@ public: /** Construct a sizer item for tracking a spacer. */ - wxSizerItem(int width, int height, int proportion, int flag, - int border, wxObject* userData); + wxSizerItem(int width, int height, int proportion=0, int flag=0, + int border=0, wxObject* userData=NULL); //@{ /** Construct a sizer item for tracking a window. */ wxSizerItem(wxWindow* window, const wxSizerFlags& flags); - wxSizerItem(wxWindow* window, int proportion, int flag, - int border, - wxObject* userData); + wxSizerItem(wxWindow* window, int proportion=0, int flag=0, + int border=0, + wxObject* userData=NULL); //@} //@{ /** Construct a sizer item for tracking a subsizer. */ - wxSizerItem(wxSizer* window, const wxSizerFlags& flags); - wxSizerItem(wxSizer* sizer, int proportion, int flag, - int border, - wxObject* userData); + wxSizerItem(wxSizer* sizer, const wxSizerFlags& flags); + wxSizerItem(wxSizer* sizer, int proportion=0, int flag=0, + int border=0, + wxObject* userData=NULL); //@} /** @@ -1038,7 +1050,7 @@ public: Old spacer, if any, is deleted. */ void AssignSpacer(const wxSize& size); - void AssignSpacer(int w, int h) { AssignSpacer(wxSize(w, h)); } + void AssignSpacer(int w, int h); //@} /** @@ -1224,6 +1236,8 @@ public: */ void SetSpacer(const wxSize& size); + void SetUserData(wxObject* userData); + /** Set the window to be tracked by this item. @deprecated @todo provide deprecation description @@ -1361,7 +1375,7 @@ public: /** Set the @c wxRESERVE_SPACE_EVEN_IF_HIDDEN flag. Normally wxSizers don't allocate space for hidden windows or other items. This flag - overrides this behavior so that sufficient space is allocated for the + overrides this behaviour so that sufficient space is allocated for the window even if it isn't visible. This makes it possible to dynamically show and hide controls without resizing parent dialog, for example. @@ -1580,6 +1594,10 @@ public: Note that this method does not trigger relayout. */ void SetNonFlexibleGrowMode(wxFlexSizerGrowMode mode); + + virtual void RecalcSizes(); + virtual wxSize CalcMin(); + }; @@ -1702,6 +1720,9 @@ public: Sets the vertical gap (in pixels) between the cells in the sizer. */ void SetVGap(int gap); + + virtual wxSize CalcMin(); + virtual void RecalcSizes(); }; @@ -1762,6 +1783,9 @@ public: Returns the static box associated with the sizer. */ wxStaticBox* GetStaticBox() const; + + virtual wxSize CalcMin(); + virtual void RecalcSizes(); }; @@ -1826,6 +1850,6 @@ public: It is used internally only and must not be called by the user (call Layout() if you want to resize). Documented for information. */ - void RecalcSizes(); + virtual void RecalcSizes(); };