Add more precise wxRibbonBar::ShowPanels() overload.

The existing overload taking bool didn't allow to specify whether the panel
should be just expanded or expanded and pinned, add a new one supporting this.

Also fix a bug with not updating the ribbon state in the old method.

Closes #16133.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76277 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2014-04-04 15:28:51 +00:00
parent c87dd9ceb0
commit 4c76ae6707
3 changed files with 53 additions and 31 deletions

View File

@@ -348,6 +348,14 @@ public:
*/
void RemovePageHighlight(size_t page);
/**
Shows or hide the panel area of the ribbon bar according to the
given display mode.
@since 3.1.0
*/
void ShowPanels(wxRibbonDisplayMode mode);
/**
Shows or hides the panel area of the ribbon bar.
@@ -355,6 +363,10 @@ public:
be shown. This is useful for giving the user more screen space to work
with when he/she doesn't need to see the ribbon's options.
If the panel is currently shown, this method pins it, use the other
overload of this method to specify the exact panel display mode to
avoid it.
@since 2.9.2
*/
void ShowPanels(bool show = true);
@@ -362,7 +374,7 @@ public:
/**
Hides the panel area of the ribbon bar.
This method simply calls ShowPanels() with @false argument.
This method behaves like ShowPanels() with @false argument.
@since 2.9.2
*/
@@ -377,6 +389,16 @@ public:
*/
bool ArePanelsShown() const;
/**
Returns the current display mode of the panel area.
@see ShowPanels()
@since 3.1.0
*/
wxRibbonDisplayMode GetDisplayMode() const;
/**
Perform initial layout and size calculations of the bar and its
children. This must be called after all of the bar's children have been