Add support for auto-orientable toolbars to AUI.
Allow wxAUI to change the toolbar orientation depending on where is it docked. It is also now possible to specify wxAUI_TB_VERTICAL or HORIZONTAL to force the toolbar to be always oriented in the given sense and to prevent it from being docked at the sides incompatible with it. Closes #11712. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65061 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -222,6 +222,8 @@ public:
|
||||
source.window = window;
|
||||
source.frame = frame;
|
||||
source.buttons = buttons;
|
||||
wxCHECK_RET(source.IsValid(),
|
||||
"window settings and pane settings are incompatible");
|
||||
// now assign
|
||||
*this = source;
|
||||
}
|
||||
@@ -253,7 +255,15 @@ public:
|
||||
#ifdef SWIG
|
||||
%typemap(out) wxAuiPaneInfo& { $result = $self; Py_INCREF($result); }
|
||||
#endif
|
||||
wxAuiPaneInfo& Window(wxWindow* w) { window = w; return *this; }
|
||||
wxAuiPaneInfo& Window(wxWindow* w)
|
||||
{
|
||||
wxAuiPaneInfo test(*this);
|
||||
test.window = w;
|
||||
wxCHECK_MSG(test.IsValid(), *this,
|
||||
"window settings and pane settings are incompatible");
|
||||
*this = test;
|
||||
return *this;
|
||||
}
|
||||
wxAuiPaneInfo& Name(const wxString& n) { name = n; return *this; }
|
||||
wxAuiPaneInfo& Caption(const wxString& c) { caption = c; return *this; }
|
||||
wxAuiPaneInfo& Left() { dock_direction = wxAUI_DOCK_LEFT; return *this; }
|
||||
@@ -308,10 +318,14 @@ public:
|
||||
|
||||
wxAuiPaneInfo& DefaultPane()
|
||||
{
|
||||
state |= optionTopDockable | optionBottomDockable |
|
||||
wxAuiPaneInfo test(*this);
|
||||
test.state |= optionTopDockable | optionBottomDockable |
|
||||
optionLeftDockable | optionRightDockable |
|
||||
optionFloatable | optionMovable | optionResizable |
|
||||
optionCaption | optionPaneBorder | buttonClose;
|
||||
wxCHECK_MSG(test.IsValid(), *this,
|
||||
"window settings and pane settings are incompatible");
|
||||
*this = test;
|
||||
return *this;
|
||||
}
|
||||
|
||||
@@ -334,10 +348,14 @@ public:
|
||||
|
||||
wxAuiPaneInfo& SetFlag(int flag, bool option_state)
|
||||
{
|
||||
wxAuiPaneInfo test(*this);
|
||||
if (option_state)
|
||||
state |= flag;
|
||||
test.state |= flag;
|
||||
else
|
||||
state &= ~flag;
|
||||
test.state &= ~flag;
|
||||
wxCHECK_MSG(test.IsValid(), *this,
|
||||
"window settings and pane settings are incompatible");
|
||||
*this = test;
|
||||
return *this;
|
||||
}
|
||||
|
||||
@@ -416,6 +434,8 @@ public:
|
||||
wxAuiPaneButtonArray buttons; // buttons on the pane
|
||||
|
||||
wxRect rect; // current rectangle (populated by wxAUI)
|
||||
|
||||
bool IsValid() const;
|
||||
};
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user