X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/27b1df435f11bde2531ee4e8d432eba0b6c74161..822e690b221486b63895b5f14a7fbee2bc966fe5:/contrib/include/wx/plot/plot.h?ds=sidebyside diff --git a/contrib/include/wx/plot/plot.h b/contrib/include/wx/plot/plot.h index d031f77dd6..f805a22a7d 100644 --- a/contrib/include/wx/plot/plot.h +++ b/contrib/include/wx/plot/plot.h @@ -12,7 +12,7 @@ #ifndef _WX_PLOT_H_ #define _WX_PLOT_H_ -#ifdef __GNUG__ +#if defined(__GNUG__) && !defined(__APPLE__) #pragma interface "plot.h" #endif @@ -22,20 +22,31 @@ #include "wx/event.h" #include "wx/dynarray.h" +#ifdef WXMAKINGDLL_PLOT + #define WXDLLIMPEXP_PLOT WXEXPORT + #define WXDLLIMPEXP_DATA_PLOT(type) WXEXPORT type +#elif defined(WXUSINGDLL) + #define WXDLLIMPEXP_PLOT WXIMPORT + #define WXDLLIMPEXP_DATA_PLOT(type) WXIMPORT type +#else // not making nor using DLL + #define WXDLLIMPEXP_PLOT + #define WXDLLIMPEXP_DATA_PLOT(type) type +#endif + //----------------------------------------------------------------------------- // classes //----------------------------------------------------------------------------- -class WXDLLEXPORT wxPlotEvent; -class WXDLLEXPORT wxPlotCurve; -class WXDLLEXPORT wxPlotValues; -class WXDLLEXPORT wxPlotArea; -class WXDLLEXPORT wxPlotXAxisArea; -class WXDLLEXPORT wxPlotYAxisArea; -class WXDLLEXPORT wxPlotWindow; +class WXDLLIMPEXP_PLOT wxPlotEvent; +class WXDLLIMPEXP_PLOT wxPlotCurve; +class WXDLLIMPEXP_PLOT wxPlotValues; +class WXDLLIMPEXP_PLOT wxPlotArea; +class WXDLLIMPEXP_PLOT wxPlotXAxisArea; +class WXDLLIMPEXP_PLOT wxPlotYAxisArea; +class WXDLLIMPEXP_PLOT wxPlotWindow; //----------------------------------------------------------------------------- -// classes +// consts //----------------------------------------------------------------------------- extern const int wxEVT_PLOT_SEL_CHANGING; @@ -60,9 +71,6 @@ 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 @@ -77,7 +85,7 @@ extern const int wxEVT_PLOT_AREA_CREATE; // wxPlotEvent //----------------------------------------------------------------------------- -class WXDLLEXPORT wxPlotEvent: public wxNotifyEvent +class WXDLLIMPEXP_PLOT wxPlotEvent: public wxNotifyEvent { public: wxPlotEvent( wxEventType commandType = wxEVT_NULL, int id = 0 ); @@ -107,7 +115,7 @@ private: // wxPlotCurve //----------------------------------------------------------------------------- -class WXDLLEXPORT wxPlotCurve: public wxObject +class WXDLLIMPEXP_PLOT wxPlotCurve: public wxObject { public: wxPlotCurve( int offsetY, double startY, double endY ); @@ -149,7 +157,7 @@ private: // wxPlotOnOffCurve //----------------------------------------------------------------------------- -class WXDLLEXPORT wxPlotOnOff +class WXDLLIMPEXP_PLOT wxPlotOnOff { public: wxPlotOnOff() { } @@ -159,9 +167,10 @@ public: void *m_clientData; }; -WX_DECLARE_EXPORTED_OBJARRAY(wxPlotOnOff, wxArrayPlotOnOff); +WX_DECLARE_OBJARRAY_WITH_DECL(wxPlotOnOff, wxArrayPlotOnOff, + class WXDLLIMPEXP_PLOT); -class WXDLLEXPORT wxPlotOnOffCurve: public wxObject +class WXDLLIMPEXP_PLOT wxPlotOnOffCurve: public wxObject { public: wxPlotOnOffCurve( int offsetY ); @@ -201,7 +210,7 @@ private: // wxPlotArea //----------------------------------------------------------------------------- -class WXDLLEXPORT wxPlotArea: public wxWindow +class WXDLLIMPEXP_PLOT wxPlotArea: public wxWindow { public: wxPlotArea() {} @@ -228,7 +237,7 @@ private: // wxPlotXAxisArea //----------------------------------------------------------------------------- -class WXDLLEXPORT wxPlotXAxisArea: public wxWindow +class WXDLLIMPEXP_PLOT wxPlotXAxisArea: public wxWindow { public: wxPlotXAxisArea() {} @@ -248,7 +257,7 @@ private: // wxPlotYAxisArea //----------------------------------------------------------------------------- -class WXDLLEXPORT wxPlotYAxisArea: public wxWindow +class WXDLLIMPEXP_PLOT wxPlotYAxisArea: public wxWindow { public: wxPlotYAxisArea() {} @@ -268,7 +277,7 @@ private: // wxPlotWindow //----------------------------------------------------------------------------- -class WXDLLEXPORT wxPlotWindow: public wxScrolledWindow +class WXDLLIMPEXP_PLOT wxPlotWindow: public wxScrolledWindow { public: wxPlotWindow() {} @@ -284,8 +293,8 @@ public: size_t GetCount(); wxPlotCurve *GetAt( size_t n ); - void SetCurrent( wxPlotCurve* current ); - wxPlotCurve *GetCurrent(); + void SetCurrentCurve( wxPlotCurve* current ); + wxPlotCurve *GetCurrentCurve(); // mark list accessors // ------------------- @@ -377,6 +386,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 +410,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) wxStaticCastEvent( 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) wxStaticCastEvent( 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) wxStaticCastEvent( wxPlotEventFunction, & fn ), (wxObject *) NULL ), +#define EVT_PLOT_CLICKED(id, fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_PLOT_CLICKED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) (wxNotifyEventFunction) wxStaticCastEvent( wxPlotEventFunction, & fn ), (wxObject *) NULL ), +#define EVT_PLOT_DOUBLECLICKED(id, fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_PLOT_DOUBLECLICKED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) (wxNotifyEventFunction) wxStaticCastEvent( 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) wxStaticCastEvent( 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) wxStaticCastEvent( 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) wxStaticCastEvent( 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) wxStaticCastEvent( 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) wxStaticCastEvent( 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) wxStaticCastEvent( 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) wxStaticCastEvent( 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) wxStaticCastEvent( 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) wxStaticCastEvent( 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) wxStaticCastEvent( 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) wxStaticCastEvent( 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) wxStaticCastEvent( 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) wxStaticCastEvent( 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) wxStaticCastEvent( 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) wxStaticCastEvent( 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) wxStaticCastEvent( wxPlotEventFunction, & fn ), (wxObject *) NULL ), + +#endif + #endif // _WX_PLOT_H_