X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/7f08b8283b9ad93aca84a69a4091094c50f44940..66c2bf7b1d9326fb650acfaae22ec50528cfbf7c:/include/wx/ribbon/buttonbar.h diff --git a/include/wx/ribbon/buttonbar.h b/include/wx/ribbon/buttonbar.h index 7334d4d14b..ab637a104e 100644 --- a/include/wx/ribbon/buttonbar.h +++ b/include/wx/ribbon/buttonbar.h @@ -4,7 +4,6 @@ // Author: Peter Cawley // Modified by: // Created: 2009-07-01 -// RCS-ID: $Id$ // Copyright: (C) Peter Cawley // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// @@ -81,8 +80,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 +120,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; @@ -144,6 +146,10 @@ public: virtual bool IsSizingContinuous() const; virtual wxSize GetMinSize() const; + + void SetShowToolTipsForDisabled(bool show); + bool GetShowToolTipsForDisabled() const; + protected: friend class wxRibbonButtonBarEvent; virtual wxSize DoGetBestSize() const; @@ -183,6 +189,7 @@ protected: int m_current_layout; bool m_layouts_valid; bool m_lock_active_state; + bool m_show_tooltips_for_disabled; #ifndef SWIG DECLARE_CLASS(wxRibbonButtonBar) @@ -228,8 +235,8 @@ private: #ifndef SWIG -wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_RIBBON, wxEVT_COMMAND_RIBBONBUTTON_CLICKED, wxRibbonButtonBarEvent); -wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_RIBBON, wxEVT_COMMAND_RIBBONBUTTON_DROPDOWN_CLICKED, wxRibbonButtonBarEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_RIBBON, wxEVT_RIBBONBUTTONBAR_CLICKED, wxRibbonButtonBarEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_RIBBON, wxEVT_RIBBONBUTTONBAR_DROPDOWN_CLICKED, wxRibbonButtonBarEvent); typedef void (wxEvtHandler::*wxRibbonButtonBarEventFunction)(wxRibbonButtonBarEvent&); @@ -237,21 +244,25 @@ typedef void (wxEvtHandler::*wxRibbonButtonBarEventFunction)(wxRibbonButtonBarEv wxEVENT_HANDLER_CAST(wxRibbonButtonBarEventFunction, func) #define EVT_RIBBONBUTTONBAR_CLICKED(winid, fn) \ - wx__DECLARE_EVT1(wxEVT_COMMAND_RIBBONBUTTON_CLICKED, winid, wxRibbonButtonBarEventHandler(fn)) + wx__DECLARE_EVT1(wxEVT_RIBBONBUTTONBAR_CLICKED, winid, wxRibbonButtonBarEventHandler(fn)) #define EVT_RIBBONBUTTONBAR_DROPDOWN_CLICKED(winid, fn) \ - wx__DECLARE_EVT1(wxEVT_COMMAND_RIBBONBUTTON_DROPDOWN_CLICKED, winid, wxRibbonButtonBarEventHandler(fn)) + wx__DECLARE_EVT1(wxEVT_RIBBONBUTTONBAR_DROPDOWN_CLICKED, winid, wxRibbonButtonBarEventHandler(fn)) #else // wxpython/swig event work -%constant wxEventType wxEVT_COMMAND_RIBBONBUTTON_CLICKED; -%constant wxEventType wxEVT_COMMAND_RIBBONBUTTON_DROPDOWN_CLICKED; +%constant wxEventType wxEVT_RIBBONBUTTONBAR_CLICKED; +%constant wxEventType wxEVT_RIBBONBUTTONBAR_DROPDOWN_CLICKED; %pythoncode { - EVT_RIBBONBUTTONBAR_CLICKED = wx.PyEventBinder( wxEVT_COMMAND_RIBBONBUTTON_CLICKED, 1 ) - EVT_RIBBONBUTTONBAR_DROPDOWN_CLICKED = wx.PyEventBinder( wxEVT_COMMAND_RIBBONBUTTON_DROPDOWN_CLICKED, 1 ) + EVT_RIBBONBUTTONBAR_CLICKED = wx.PyEventBinder( wxEVT_RIBBONBUTTONBAR_CLICKED, 1 ) + EVT_RIBBONBUTTONBAR_DROPDOWN_CLICKED = wx.PyEventBinder( wxEVT_RIBBONBUTTONBAR_DROPDOWN_CLICKED, 1 ) } #endif +// old wxEVT_COMMAND_* constants +#define wxEVT_COMMAND_RIBBONBUTTON_CLICKED wxEVT_RIBBONBUTTONBAR_CLICKED +#define wxEVT_COMMAND_RIBBONBUTTON_DROPDOWN_CLICKED wxEVT_RIBBONBUTTONBAR_DROPDOWN_CLICKED + #endif // wxUSE_RIBBON #endif // _WX_RIBBON_BUTTON_BAR_H_