X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/1737dac20acc5819ce5a855d4587eb1967247cff..54ce9ebbd667147a18f119177422ce25011fe113:/include/wx/sizer.h diff --git a/include/wx/sizer.h b/include/wx/sizer.h index 53dde1a4bf..bbab8447f9 100644 --- a/include/wx/sizer.h +++ b/include/wx/sizer.h @@ -252,8 +252,11 @@ public: { return m_kind == Item_Sizer ? m_sizer : NULL; } wxSize GetSpacer() const; - void Show(bool show); + // this function behaves obviously for the windows and spacers but for the + // sizers it returns true if any sizer element is shown and only returns + // false if all of them are hidden bool IsShown() const; + void Show(bool show); void SetUserData(wxObject* userData) { delete m_userData; m_userData = userData; } @@ -276,6 +279,8 @@ protected: // common part of ctors taking wxSizerFlags void Init(const wxSizerFlags& flags); + + // discriminated union: depending on m_kind one of the fields is valid enum { Item_None, @@ -322,7 +327,7 @@ WX_DECLARE_EXPORTED_LIST( wxSizerItem, wxSizerItemList ); class WXDLLEXPORT wxSizer: public wxObject, public wxClientDataContainer { public: - wxSizer(); + wxSizer() { } ~wxSizer(); // methods for adding elements to the sizer: there are Add/Insert/Prepend @@ -486,18 +491,13 @@ public: // Recursively call wxWindow::Show () on all sizer items. virtual void ShowItems (bool show); - void Show(bool show) - { m_isShown = show; - ShowItems(show); - } - bool IsShown() const { return m_isShown; } + void Show(bool show) { ShowItems(show); } protected: wxSize m_size; wxSize m_minSize; wxPoint m_position; wxSizerItemList m_children; - bool m_isShown; wxSize GetMaxWindowSize( wxWindow *window ) const; wxSize GetMinWindowSize( wxWindow *window );