X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/fc1fcd0edcc2b5840f3691f9454d3c990d8cad0f..1c0f361be288df133c766e04cc857b3e4682b31a:/include/wx/sizer.h diff --git a/include/wx/sizer.h b/include/wx/sizer.h index eeed12325b..ce907346bb 100644 --- a/include/wx/sizer.h +++ b/include/wx/sizer.h @@ -74,8 +74,16 @@ public: wxSize GetMinSize() const { return m_minSize; } + void SetMinSize(const wxSize& size) + { + if (IsWindow() && !(m_flag & wxFIXED_MINSIZE)) + m_window->SetSizeHints(size); + m_minSize = size; + } + void SetMinSize( int x, int y ) + { SetMinSize(wxSize(x, y)); } void SetInitSize( int x, int y ) - { m_minSize.x = x; m_minSize.y = y; } + { SetMinSize(wxSize(x, y)); } void SetRatio( int width, int height ) // if either of dimensions is zero, ratio is assumed to be 1 @@ -305,7 +313,7 @@ public: bool IsShown( size_t index ) const; // Recursively call wxWindow::Show () on all sizer items. - void ShowItems (bool show); + virtual void ShowItems (bool show); protected: wxSize m_size; @@ -497,6 +505,9 @@ public: wxStaticBox *GetStaticBox() const { return m_staticBox; } + // override to hide/show the static box as well + virtual void ShowItems (bool show); + protected: wxStaticBox *m_staticBox;