X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/98742322cdecc1f91bb90d9c804318058722eab0..92c0fc34c104c8d7c12d6a3b78ea232690fc23f4:/interface/wx/ribbon/panel.h diff --git a/interface/wx/ribbon/panel.h b/interface/wx/ribbon/panel.h index 0f91684637..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 @@ -53,6 +87,11 @@ 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} */ @@ -123,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. */ @@ -140,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. */