X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d8fd7acb8b877599b410e07a4c26dde92a676a82..ee6dd41a508c2bf598c178696a43bb665e0d4c01:/include/wx/bookctrl.h diff --git a/include/wx/bookctrl.h b/include/wx/bookctrl.h index 9b4f51632b..ea8784a5db 100644 --- a/include/wx/bookctrl.h +++ b/include/wx/bookctrl.h @@ -131,6 +131,10 @@ public: // returns true if we have wxCHB_TOP or wxCHB_BOTTOM style bool IsVertical() const { return HasFlag(wxBK_BOTTOM | wxBK_TOP); } + // set/get option to shrink to fit current page + void SetShrinkMode(bool shrink) { m_shrinkToFit = shrink; } + bool GetShrinkMode() const { return m_shrinkToFit; } + // operations // ---------- @@ -207,6 +211,9 @@ protected: // Always rely on GetBestSize, which will look at all the pages virtual void SetInitialBestSize(const wxSize& WXUNUSED(size)) { } + // Lay out controls + void DoSize(); + // the array of all pages of this control wxArrayPages m_pages; @@ -226,6 +233,9 @@ protected: // controller buddy if available, NULL otherwise (usually for native book controls like wxNotebook) wxControl *m_bookctrl; + // Whether to shrink to fit current page + bool m_shrinkToFit; + private: // common part of all ctors @@ -249,10 +259,17 @@ public: wxBookCtrlBaseEvent(wxEventType commandType = wxEVT_NULL, int winid = 0, int nSel = -1, int nOldSel = -1) : wxNotifyEvent(commandType, winid) - { - m_nSel = nSel; - m_nOldSel = nOldSel; - } + { + m_nSel = nSel; + m_nOldSel = nOldSel; + } + + wxBookCtrlBaseEvent(const wxBookCtrlBaseEvent& event) + : wxNotifyEvent(event) + { + m_nSel = event.m_nSel; + m_nOldSel = event.m_nOldSel; + } // accessors // the currently selected page (-1 if none)