X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/8d3d5f067a7be01be3e8c81355883e2b2a23c0a5..92c0fc34c104c8d7c12d6a3b78ea232690fc23f4:/interface/wx/ribbon/panel.h diff --git a/interface/wx/ribbon/panel.h b/interface/wx/ribbon/panel.h index fd455fe32a..a7cae829f4 100644 --- a/interface/wx/ribbon/panel.h +++ b/interface/wx/ribbon/panel.h @@ -2,10 +2,44 @@ // Name: ribbon/panel.h // Purpose: interface of wxRibbonPage // Author: Peter Cawley -// RCS-ID: $Id$ // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// +/** + @class wxRibbonPanelEvent + + Event used to indicate various actions relating to a wxRibbonPanel. + + See wxRibbonPanel for available event types. + + @since 2.9.4 + + @library{wxribbon} + @category{events,ribbon} + + @see wxRibbonPanel +*/ +class wxRibbonPanelEvent : public wxCommandEvent +{ +public: + /** + Constructor. + */ + wxRibbonPanelEvent(wxEventType command_type = wxEVT_NULL, + int win_id = 0, + wxRibbonPanel* panel = NULL) + + /** + Returns the panel relating to this event. + */ + wxRibbonPanel* GetPanel(); + + /** + Sets the page relating to this event. + */ + void SetPanel(wxRibbonPanel* page); +}; + /** @class wxRibbonPanel @@ -45,8 +79,19 @@ minimises. @style{wxRIBBON_PANEL_STRETCH} Stretches a single panel to fit the parent page. + @style{wxRIBBON_PANEL_FLEXIBLE} + Allows the panel to size in both directions; currently only useful + when a single wxRibbonToolBar is the child of the panel, particularly + in vertical orientation where the number of rows is dependent on the + amount of horizontal space available. Set the minimum and maximum + toolbar rows to take full advantage of this wrapping behaviour. @endStyleTable + @beginEventEmissionTable{wxRibbonPanelEvent} + @event{EVT_RIBBONPANEL_EXTBUTTON_ACTIVATED(id, func)} + Triggered when the user activate the panel extension button. + @endEventTable + @library{wxribbon} @category{ribbon} */ @@ -117,6 +162,18 @@ public: wxBitmap& GetMinimisedIcon(); const wxBitmap& GetMinimisedIcon() const; + /** + Test if the panel has an extension button. + + Such button is shown in the top right corner of the panel if + @c wxRIBBON_PANEL_EXT_BUTTON style is used for it. + + @since 2.9.4 + + @return @true if the panel and its wxRibbonBar allow it in their styles. + */ + virtual bool HasExtButton() const; + /** Query if the panel is currently minimised. */ @@ -134,6 +191,16 @@ public: */ bool IsHovered() const; + /** + Query if the mouse is currently hovered over the extension button. + + Extension button is only shown for panels with @c + wxRIBBON_PANEL_EXT_BUTTON style. + + @since 2.9.4 + */ + bool IsExtButtonHovered() const; + /** Query if the panel can automatically minimise itself at small sizes. */