X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/3c3ead1d1513a5eb79091a604f4e42b45d1bdf5d..a7689c49fe02c0c065facf736ab28b19f5997b7c:/include/wx/ribbon/page.h diff --git a/include/wx/ribbon/page.h b/include/wx/ribbon/page.h index 80d8e6f1cf..5d3fed58c3 100644 --- a/include/wx/ribbon/page.h +++ b/include/wx/ribbon/page.h @@ -46,7 +46,6 @@ public: wxBitmap& GetIcon() {return m_icon;} virtual wxSize GetMinSize() const; - virtual wxSize DoGetBestSize() const; void SetSizeWithScrollButtonAdjustment(int x, int y, int width, int height); void AdjustRectToIncludeScrollButtons(wxRect* rect) const; @@ -62,10 +61,14 @@ public: virtual void RemoveChild(wxWindowBase *child); + void HideIfExpanded(); + protected: + virtual wxSize DoGetBestSize() const; virtual wxBorder GetDefaultBorder() const { return wxBORDER_NONE; } void DoSetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO); + bool DoActualLayout(); void OnEraseBackground(wxEraseEvent& evt); void OnPaint(wxPaintEvent& evt); void OnSize(wxSizeEvent& evt); @@ -76,6 +79,7 @@ protected: void HideScrollButtons(); void CommonInit(const wxString& label, const wxBitmap& icon); + void PopulateSizeCalcArray(wxSize (wxWindow::*get_size)(void) const); wxArrayRibbonControl m_collapse_stack; wxBitmap m_icon; @@ -83,6 +87,8 @@ protected: // NB: Scroll button windows are siblings rather than children (to get correct clipping of children) wxRibbonPageScrollButton* m_scroll_left_btn; wxRibbonPageScrollButton* m_scroll_right_btn; + wxSize* m_size_calc_array; + size_t m_size_calc_array_size; int m_scroll_amount; int m_scroll_amount_limit; int m_size_in_major_axis_for_children;