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

@@ -140,9 +140,11 @@ public:
void AddPageHighlight(size_t page, bool highlight = true);
void RemovePageHighlight(size_t page) { AddPageHighlight(page, false); }
void ShowPanels(wxRibbonDisplayMode mode);
void ShowPanels(bool show = true);
void HidePanels() { ShowPanels(false); }
void HidePanels() { ShowPanels(wxRIBBON_BAR_MINIMIZED); }
bool ArePanelsShown() const { return m_arePanelsShown; }
wxRibbonDisplayMode GetDisplayMode() const { return m_ribbon_state; }
virtual bool HasMultiplePages() const wxOVERRIDE { return true; }