]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/ribbon/buttonbar.h
Add support for wxRibbonBar and related controls to XRC.
[wxWidgets.git] / include / wx / ribbon / buttonbar.h
index 502814381779fa3853a1ad90e85c098e8bc32e0e..6dd002b0c205312e2794da7960eb0d113559500c 100644 (file)
@@ -81,8 +81,7 @@ public:
                 const wxBitmap& bitmap_disabled = wxNullBitmap,
                 const wxBitmap& bitmap_small_disabled = wxNullBitmap,
                 wxRibbonButtonKind kind = wxRIBBON_BUTTON_NORMAL,
-                const wxString& help_string = wxEmptyString,
-                wxObject* client_data = NULL);
+                const wxString& help_string = wxEmptyString);
 
     virtual wxRibbonButtonBarButtonBase* InsertButton(
                 size_t pos,
@@ -122,8 +121,12 @@ public:
                 const wxBitmap& bitmap_disabled = wxNullBitmap,
                 const wxBitmap& bitmap_small_disabled = wxNullBitmap,
                 wxRibbonButtonKind kind = wxRIBBON_BUTTON_NORMAL,
-                const wxString& help_string = wxEmptyString,
-                wxObject* client_data = NULL);
+                const wxString& help_string = wxEmptyString);
+
+    void SetItemClientObject(wxRibbonButtonBarButtonBase* item, wxClientData* data);
+    wxClientData* GetItemClientObject(const wxRibbonButtonBarButtonBase* item) const;
+    void SetItemClientData(wxRibbonButtonBarButtonBase* item, void* data);
+    void* GetItemClientData(const wxRibbonButtonBarButtonBase* item) const;
 
     virtual size_t GetButtonCount() const;
     virtual wxRibbonButtonBarButtonBase *GetItem(size_t n) const;
@@ -195,25 +198,30 @@ class WXDLLIMPEXP_RIBBON wxRibbonButtonBarEvent : public wxCommandEvent
 public:
     wxRibbonButtonBarEvent(wxEventType command_type = wxEVT_NULL,
                        int win_id = 0,
-                       wxRibbonButtonBar* bar = NULL)
+                       wxRibbonButtonBar* bar = NULL,
+                       wxRibbonButtonBarButtonBase* button = NULL)
         : wxCommandEvent(command_type, win_id)
-        , m_bar(bar)
+        , m_bar(bar), m_button(button)
     {
     }
 #ifndef SWIG
     wxRibbonButtonBarEvent(const wxRibbonButtonBarEvent& e) : wxCommandEvent(e)
     {
         m_bar = e.m_bar;
+        m_button = e.m_button;
     }
 #endif
     wxEvent *Clone() const { return new wxRibbonButtonBarEvent(*this); }
 
     wxRibbonButtonBar* GetBar() {return m_bar;}
+    wxRibbonButtonBarButtonBase *GetButton() { return m_button; }
     void SetBar(wxRibbonButtonBar* bar) {m_bar = bar;}
+    void SetButton(wxRibbonButtonBarButtonBase* button) { m_button = button; }
     bool PopupMenu(wxMenu* menu);
 
 protected:
     wxRibbonButtonBar* m_bar;
+    wxRibbonButtonBarButtonBase *m_button;
 
 #ifndef SWIG
 private: