Provide shorter synonyms for wxEVT_XXX constants.
Use the same short names as are used by the event table macros for the event type constants themselves. This makes them much more comfortable to use, e.g. Bind(wxEVT_BUTTON) compared to Bind(wxEVT_COMMAND_BUTTON_CLICKED). The old long names are still kept for backwards compatibility and shouldn't be removed as it doesn't really cost anything to continue providing them, but all new event types should only use the short versions. Closes #10661. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73850 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -173,7 +173,7 @@ private:
|
||||
|
||||
#ifndef SWIG
|
||||
|
||||
wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_RIBBON, wxEVT_COMMAND_RIBBONPANEL_EXTBUTTON_ACTIVATED, wxRibbonPanelEvent);
|
||||
wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_RIBBON, wxEVT_RIBBONPANEL_EXTBUTTON_ACTIVATED, wxRibbonPanelEvent);
|
||||
|
||||
typedef void (wxEvtHandler::*wxRibbonPanelEventFunction)(wxRibbonPanelEvent&);
|
||||
|
||||
@@ -181,17 +181,20 @@ typedef void (wxEvtHandler::*wxRibbonPanelEventFunction)(wxRibbonPanelEvent&);
|
||||
wxEVENT_HANDLER_CAST(wxRibbonPanelEventFunction, func)
|
||||
|
||||
#define EVT_RIBBONPANEL_EXTBUTTON_ACTIVATED(winid, fn) \
|
||||
wx__DECLARE_EVT1(wxEVT_COMMAND_RIBBONPANEL_EXTBUTTON_ACTIVATED, winid, wxRibbonPanelEventHandler(fn))
|
||||
wx__DECLARE_EVT1(wxEVT_RIBBONPANEL_EXTBUTTON_ACTIVATED, winid, wxRibbonPanelEventHandler(fn))
|
||||
#else
|
||||
|
||||
// wxpython/swig event work
|
||||
%constant wxEventType wxEVT_COMMAND_RIBBONPANEL_ACTIVATED;
|
||||
%constant wxEventType wxEVT_RIBBONPANEL_EXTBUTTON_ACTIVATED;
|
||||
|
||||
%pythoncode {
|
||||
EVT_RIBBONPANEL_EXTBUTTON_ACTIVATED = wx.PyEventBinder( wxEVT_COMMAND_RIBBONPANEL_EXTBUTTON_ACTIVATED, 1 )
|
||||
EVT_RIBBONPANEL_EXTBUTTON_ACTIVATED = wx.PyEventBinder( wxEVT_RIBBONPANEL_EXTBUTTON_ACTIVATED, 1 )
|
||||
}
|
||||
#endif
|
||||
|
||||
// old wxEVT_COMMAND_* constants
|
||||
#define wxEVT_COMMAND_RIBBONPANEL_EXTBUTTON_ACTIVATED wxEVT_RIBBONPANEL_EXTBUTTON_ACTIVATED
|
||||
|
||||
#endif // wxUSE_RIBBON
|
||||
|
||||
#endif // _WX_RIBBON_PANEL_H_
|
||||
|
Reference in New Issue
Block a user