X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/4c51a665c649f7579fb39e62070cef4f66b3210d..50d4763f1710f6e45ac6af7112d1ce9effe93bc4:/interface/wx/sizer.h diff --git a/interface/wx/sizer.h b/interface/wx/sizer.h index ec02ec9e3c..7bc97a6e78 100644 --- a/interface/wx/sizer.h +++ b/interface/wx/sizer.h @@ -290,6 +290,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 +408,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 +578,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 +668,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). @@ -967,6 +981,9 @@ public: outlined above. */ void SetNegativeButton(wxButton* button); + + virtual void RecalcSizes(); + virtual wxSize CalcMin(); }; @@ -990,27 +1007,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); //@} /** @@ -1039,7 +1056,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); //@} /** @@ -1225,6 +1242,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 @@ -1581,6 +1600,10 @@ public: Note that this method does not trigger relayout. */ void SetNonFlexibleGrowMode(wxFlexSizerGrowMode mode); + + virtual void RecalcSizes(); + virtual wxSize CalcMin(); + }; @@ -1703,6 +1726,9 @@ public: Sets the vertical gap (in pixels) between the cells in the sizer. */ void SetVGap(int gap); + + virtual wxSize CalcMin(); + virtual void RecalcSizes(); }; @@ -1763,6 +1789,9 @@ public: Returns the static box associated with the sizer. */ wxStaticBox* GetStaticBox() const; + + virtual wxSize CalcMin(); + virtual void RecalcSizes(); }; @@ -1827,6 +1856,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(); };