X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/8556b795c369382a1f5f2ed9405138a450ecc4a6..4f61e22c77b1a7cb148f6567996d816f72ac854f:/contrib/include/wx/plot/plot.h?ds=inline diff --git a/contrib/include/wx/plot/plot.h b/contrib/include/wx/plot/plot.h index 68b948d17b..4afcb1966f 100644 --- a/contrib/include/wx/plot/plot.h +++ b/contrib/include/wx/plot/plot.h @@ -35,34 +35,31 @@ class WXDLLEXPORT wxPlotYAxisArea; class WXDLLEXPORT wxPlotWindow; //----------------------------------------------------------------------------- -// classes +// consts //----------------------------------------------------------------------------- -extern int wxEVT_PLOT_SEL_CHANGING; -extern int wxEVT_PLOT_SEL_CHANGED; -extern int wxEVT_PLOT_CLICKED; -extern int wxEVT_PLOT_DOUBLECLICKED; -extern int wxEVT_PLOT_ZOOM_IN; -extern int wxEVT_PLOT_ZOOM_OUT; -extern int wxEVT_PLOT_VALUE_SEL_CREATING; -extern int wxEVT_PLOT_VALUE_SEL_CREATED; -extern int wxEVT_PLOT_VALUE_SEL_CHANGING; -extern int wxEVT_PLOT_VALUE_SEL_CHANGED; -extern int wxEVT_PLOT_AREA_SEL_CREATING; -extern int wxEVT_PLOT_AREA_SEL_CREATED; -extern int wxEVT_PLOT_AREA_SEL_CHANGING; -extern int wxEVT_PLOT_AREA_SEL_CHANGED; -extern int wxEVT_PLOT_BEGIN_X_LABEL_EDIT; -extern int wxEVT_PLOT_END_X_LABEL_EDIT; -extern int wxEVT_PLOT_BEGIN_Y_LABEL_EDIT; -extern int wxEVT_PLOT_END_Y_LABEL_EDIT; -extern int wxEVT_PLOT_BEGIN_TITLE_EDIT; -extern int wxEVT_PLOT_END_TITLE_EDIT; -extern int wxEVT_PLOT_AREA_CREATE; +extern const int wxEVT_PLOT_SEL_CHANGING; +extern const int wxEVT_PLOT_SEL_CHANGED; +extern const int wxEVT_PLOT_CLICKED; +extern const int wxEVT_PLOT_DOUBLECLICKED; +extern const int wxEVT_PLOT_ZOOM_IN; +extern const int wxEVT_PLOT_ZOOM_OUT; +extern const int wxEVT_PLOT_VALUE_SEL_CREATING; +extern const int wxEVT_PLOT_VALUE_SEL_CREATED; +extern const int wxEVT_PLOT_VALUE_SEL_CHANGING; +extern const int wxEVT_PLOT_VALUE_SEL_CHANGED; +extern const int wxEVT_PLOT_AREA_SEL_CREATING; +extern const int wxEVT_PLOT_AREA_SEL_CREATED; +extern const int wxEVT_PLOT_AREA_SEL_CHANGING; +extern const int wxEVT_PLOT_AREA_SEL_CHANGED; +extern const int wxEVT_PLOT_BEGIN_X_LABEL_EDIT; +extern const int wxEVT_PLOT_END_X_LABEL_EDIT; +extern const int wxEVT_PLOT_BEGIN_Y_LABEL_EDIT; +extern const int wxEVT_PLOT_END_Y_LABEL_EDIT; +extern const int wxEVT_PLOT_BEGIN_TITLE_EDIT; +extern const int wxEVT_PLOT_END_TITLE_EDIT; +extern const int wxEVT_PLOT_AREA_CREATE; -//----------------------------------------------------------------------------- -// consts -//----------------------------------------------------------------------------- #define wxPLOT_X_AXIS 0x0004 #define wxPLOT_Y_AXIS 0x0008 @@ -377,6 +374,8 @@ private: typedef void (wxEvtHandler::*wxPlotEventFunction)(wxPlotEvent&); +#if WXWIN_COMPATIBILITY_EVENT_TYPES + #define EVT_PLOT(id, fn) { wxEVT_PLOT_DOUBLECLICKED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) (wxNotifyEventFunction) (wxPlotEventFunction) & fn, (wxObject *) NULL }, #define EVT_PLOT_SEL_CHANGING(id, fn) { wxEVT_PLOT_SEL_CHANGING, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) (wxNotifyEventFunction) (wxPlotEventFunction) & fn, (wxObject *) NULL }, #define EVT_PLOT_SEL_CHANGED(id, fn) { wxEVT_PLOT_SEL_CHANGED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) (wxNotifyEventFunction) (wxPlotEventFunction) & fn, (wxObject *) NULL }, @@ -399,5 +398,31 @@ typedef void (wxEvtHandler::*wxPlotEventFunction)(wxPlotEvent&); #define EVT_PLOT_BEGIN_TITLE_EDIT(id, fn) { wxEVT_PLOT_BEGIN_TITLE_EDIT, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) (wxNotifyEventFunction) (wxPlotEventFunction) & fn, (wxObject *) NULL }, #define EVT_PLOT_END_TITLE_EDIT(id, fn) { wxEVT_PLOT_END_TITLE_EDIT, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) (wxNotifyEventFunction) (wxPlotEventFunction) & fn, (wxObject *) NULL }, +#else + +#define EVT_PLOT(id, fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_PLOT_DOUBLECLICKED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) (wxNotifyEventFunction) (wxPlotEventFunction) & fn, (wxObject *) NULL ), +#define EVT_PLOT_SEL_CHANGING(id, fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_PLOT_SEL_CHANGING, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) (wxNotifyEventFunction) (wxPlotEventFunction) & fn, (wxObject *) NULL ), +#define EVT_PLOT_SEL_CHANGED(id, fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_PLOT_SEL_CHANGED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) (wxNotifyEventFunction) (wxPlotEventFunction) & fn, (wxObject *) NULL ), +#define EVT_PLOT_CLICKED(id, fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_PLOT_CLICKED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) (wxNotifyEventFunction) (wxPlotEventFunction) & fn, (wxObject *) NULL ), +#define EVT_PLOT_DOUBLECLICKED(id, fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_PLOT_DOUBLECLICKED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) (wxNotifyEventFunction) (wxPlotEventFunction) & fn, (wxObject *) NULL ), +#define EVT_PLOT_ZOOM_IN(id, fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_PLOT_ZOOM_IN, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) (wxNotifyEventFunction) (wxPlotEventFunction) & fn, (wxObject *) NULL ), +#define EVT_PLOT_ZOOM_OUT(id, fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_PLOT_ZOOM_OUT, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) (wxNotifyEventFunction) (wxPlotEventFunction) & fn, (wxObject *) NULL ), +#define EVT_PLOT_VALUE_SEL_CREATING(id, fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_PLOT_VALUE_SEL_CREATING, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) (wxNotifyEventFunction) (wxPlotEventFunction) & fn, (wxObject *) NULL ), +#define EVT_PLOT_VALUE_SEL_CREATED(id, fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_PLOT_VALUE_SEL_CREATED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) (wxNotifyEventFunction) (wxPlotEventFunction) & fn, (wxObject *) NULL ), +#define EVT_PLOT_VALUE_SEL_CHANGING(id, fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_PLOT_VALUE_SEL_CHANGING, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) (wxNotifyEventFunction) (wxPlotEventFunction) & fn, (wxObject *) NULL ), +#define EVT_PLOT_VALUE_SEL_CHANGED(id, fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_PLOT_VALUE_SEL_CHANGED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) (wxNotifyEventFunction) (wxPlotEventFunction) & fn, (wxObject *) NULL ), +#define EVT_PLOT_AREA_SEL_CREATING(id, fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_PLOT_AREA_SEL_CREATING, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) (wxNotifyEventFunction) (wxPlotEventFunction) & fn, (wxObject *) NULL ), +#define EVT_PLOT_AREA_SEL_CREATED(id, fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_PLOT_AREA_SEL_CREATED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) (wxNotifyEventFunction) (wxPlotEventFunction) & fn, (wxObject *) NULL ), +#define EVT_PLOT_AREA_SEL_CHANGING(id, fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_PLOT_AREA_SEL_CHANGING, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) (wxNotifyEventFunction) (wxPlotEventFunction) & fn, (wxObject *) NULL ), +#define EVT_PLOT_AREA_SEL_CHANGED(id, fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_PLOT_AREA_SEL_CHANGED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) (wxNotifyEventFunction) (wxPlotEventFunction) & fn, (wxObject *) NULL ), +#define EVT_PLOT_BEGIN_X_LABEL_EDIT(id, fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_PLOT_BEGIN_X_LABEL_EDIT, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) (wxNotifyEventFunction) (wxPlotEventFunction) & fn, (wxObject *) NULL ), +#define EVT_PLOT_END_X_LABEL_EDIT(id, fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_PLOT_END_X_LABEL_EDIT, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) (wxNotifyEventFunction) (wxPlotEventFunction) & fn, (wxObject *) NULL ), +#define EVT_PLOT_BEGIN_Y_LABEL_EDIT(id, fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_PLOT_BEGIN_Y_LABEL_EDIT, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) (wxNotifyEventFunction) (wxPlotEventFunction) & fn, (wxObject *) NULL ), +#define EVT_PLOT_END_Y_LABEL_EDIT(id, fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_PLOT_END_Y_LABEL_EDIT, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) (wxNotifyEventFunction) (wxPlotEventFunction) & fn, (wxObject *) NULL ), +#define EVT_PLOT_BEGIN_TITLE_EDIT(id, fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_PLOT_BEGIN_TITLE_EDIT, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) (wxNotifyEventFunction) (wxPlotEventFunction) & fn, (wxObject *) NULL ), +#define EVT_PLOT_END_TITLE_EDIT(id, fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_PLOT_END_TITLE_EDIT, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) (wxNotifyEventFunction) (wxPlotEventFunction) & fn, (wxObject *) NULL ), + +#endif + #endif // _WX_PLOT_H_