On screens with restricted space, it's useful to be able to add controls

to e.g. the wxChoice control of a wxChoicebook. GetControlSizer
allows an app to do that, and we also add a control margin which
may or may not be respected by individual book controls.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@38698 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart
2006-04-13 14:22:32 +00:00
parent 7a9f5d5a79
commit 87cf52d8ac
4 changed files with 64 additions and 28 deletions

View File

@@ -128,6 +128,10 @@ public:
m_internalBorder = internalBorder;
}
// Sets/gets the margin around the controller
void SetControlMargin(int margin) { m_controlMargin = margin; }
int GetControlMargin() const { return m_controlMargin; }
// returns true if we have wxCHB_TOP or wxCHB_BOTTOM style
bool IsVertical() const { return HasFlag(wxBK_BOTTOM | wxBK_TOP); }
@@ -135,6 +139,9 @@ public:
void SetFitToCurrentPage(bool fit) { m_fitToCurrentPage = fit; }
bool GetFitToCurrentPage() const { return m_fitToCurrentPage; }
// returns the sizer containing the control, if any
wxSizer* GetControlSizer() const { return m_controlSizer; }
// operations
// ----------
@@ -236,6 +243,12 @@ protected:
// Whether to shrink to fit current page
bool m_fitToCurrentPage;
// the sizer containing the choice control
wxSizer* m_controlSizer;
// the margin around the choice control
int m_controlMargin;
private:
// common part of all ctors