]> git.saurik.com Git - wxWidgets.git/blobdiff - interface/wx/ribbon/panel.h
Make storing non-trivial data in wxThreadSpecificInfo possible.
[wxWidgets.git] / interface / wx / ribbon / panel.h
index 0f91684637f6c2f8d14fe03bd79953da4071bc5b..a7cae829f49915f3f73187d8338b732a2b2fe350 100644 (file)
@@ -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
 
         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.
     */