]>
Commit | Line | Data |
---|---|---|
8556b795 RR |
1 | ///////////////////////////////////////////////////////////////////////////// |
2 | // Name: plot.h | |
3 | // Purpose: wxPlotWindow | |
4 | // Author: Robert Roebling | |
5 | // Modified by: | |
6 | // Created: 12/1/2000 | |
7 | // Copyright: (c) Robert Roebling | |
8 | // RCS-ID: $Id$ | |
9 | // Licence: wxWindows licence | |
10 | ///////////////////////////////////////////////////////////////////////////// | |
11 | ||
12 | #ifndef _WX_PLOT_H_ | |
13 | #define _WX_PLOT_H_ | |
14 | ||
ab7ce33c | 15 | #if defined(__GNUG__) && !defined(__APPLE__) |
8556b795 RR |
16 | #pragma interface "plot.h" |
17 | #endif | |
18 | ||
19 | #include "wx/defs.h" | |
20 | ||
21 | #include "wx/scrolwin.h" | |
22 | #include "wx/event.h" | |
23 | #include "wx/dynarray.h" | |
24 | ||
15e8daec VS |
25 | #ifdef WXMAKINGDLL_PLOT |
26 | #define WXDLLIMPEXP_PLOT WXEXPORT | |
27 | #define WXDLLIMPEXP_DATA_PLOT(type) WXEXPORT type | |
28 | #elif defined(WXUSINGDLL) | |
29 | #define WXDLLIMPEXP_PLOT WXIMPORT | |
30 | #define WXDLLIMPEXP_DATA_PLOT(type) WXIMPORT type | |
31 | #else // not making nor using DLL | |
32 | #define WXDLLIMPEXP_PLOT | |
33 | #define WXDLLIMPEXP_DATA_PLOT(type) type | |
34 | #endif | |
35 | ||
8556b795 RR |
36 | //----------------------------------------------------------------------------- |
37 | // classes | |
38 | //----------------------------------------------------------------------------- | |
39 | ||
15e8daec VS |
40 | class WXDLLIMPEXP_PLOT wxPlotEvent; |
41 | class WXDLLIMPEXP_PLOT wxPlotCurve; | |
42 | class WXDLLIMPEXP_PLOT wxPlotValues; | |
43 | class WXDLLIMPEXP_PLOT wxPlotArea; | |
44 | class WXDLLIMPEXP_PLOT wxPlotXAxisArea; | |
45 | class WXDLLIMPEXP_PLOT wxPlotYAxisArea; | |
46 | class WXDLLIMPEXP_PLOT wxPlotWindow; | |
8556b795 RR |
47 | |
48 | //----------------------------------------------------------------------------- | |
b9e5acef | 49 | // consts |
8556b795 RR |
50 | //----------------------------------------------------------------------------- |
51 | ||
46e145fa | 52 | BEGIN_DECLARE_EVENT_TYPES() |
97ee90ee MB |
53 | DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_PLOT, wxEVT_PLOT_SEL_CHANGING, 941) |
54 | DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_PLOT, wxEVT_PLOT_SEL_CHANGED, 921) | |
55 | DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_PLOT, wxEVT_PLOT_CLICKED, 922) | |
56 | DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_PLOT, wxEVT_PLOT_DOUBLECLICKED, 923) | |
57 | DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_PLOT, wxEVT_PLOT_ZOOM_IN, 924) | |
58 | DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_PLOT, wxEVT_PLOT_ZOOM_OUT, 925) | |
59 | DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_PLOT, wxEVT_PLOT_VALUE_SEL_CREATING, 926) | |
60 | DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_PLOT, wxEVT_PLOT_VALUE_SEL_CREATED, 927) | |
61 | DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_PLOT, wxEVT_PLOT_VALUE_SEL_CHANGING, 928) | |
62 | DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_PLOT, wxEVT_PLOT_VALUE_SEL_CHANGED, 929) | |
63 | DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_PLOT, wxEVT_PLOT_AREA_SEL_CREATING, 930) | |
64 | DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_PLOT, wxEVT_PLOT_AREA_SEL_CREATED, 931) | |
65 | DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_PLOT, wxEVT_PLOT_AREA_SEL_CHANGING, 932) | |
66 | DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_PLOT, wxEVT_PLOT_AREA_SEL_CHANGED, 933) | |
67 | DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_PLOT, wxEVT_PLOT_BEGIN_X_LABEL_EDIT, 934) | |
68 | DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_PLOT, wxEVT_PLOT_END_X_LABEL_EDIT, 935) | |
69 | DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_PLOT, wxEVT_PLOT_BEGIN_Y_LABEL_EDIT, 936) | |
70 | DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_PLOT, wxEVT_PLOT_END_Y_LABEL_EDIT, 937) | |
71 | DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_PLOT, wxEVT_PLOT_BEGIN_TITLE_EDIT, 938) | |
72 | DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_PLOT, wxEVT_PLOT_END_TITLE_EDIT, 939) | |
73 | DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_PLOT, wxEVT_PLOT_AREA_CREATE, 940) | |
46e145fa | 74 | END_DECLARE_EVENT_TYPES() |
8556b795 RR |
75 | |
76 | #define wxPLOT_X_AXIS 0x0004 | |
77 | #define wxPLOT_Y_AXIS 0x0008 | |
78 | #define wxPLOT_BUTTON_MOVE 0x0010 | |
79 | #define wxPLOT_BUTTON_ZOOM 0x0020 | |
80 | #define wxPLOT_BUTTON_ENLARGE 0x0040 | |
81 | ||
82 | #define wxPLOT_BUTTON_ALL (wxPLOT_BUTTON_MOVE|wxPLOT_BUTTON_ZOOM|wxPLOT_BUTTON_ENLARGE) | |
83 | #define wxPLOT_DEFAULT (wxPLOT_X_AXIS|wxPLOT_Y_AXIS | wxPLOT_BUTTON_ALL) | |
84 | ||
85 | //----------------------------------------------------------------------------- | |
86 | // wxPlotEvent | |
87 | //----------------------------------------------------------------------------- | |
88 | ||
15e8daec | 89 | class WXDLLIMPEXP_PLOT wxPlotEvent: public wxNotifyEvent |
8556b795 RR |
90 | { |
91 | public: | |
92 | wxPlotEvent( wxEventType commandType = wxEVT_NULL, int id = 0 ); | |
93 | ||
94 | wxPlotCurve *GetCurve() | |
95 | { return m_curve; } | |
96 | void SetCurve( wxPlotCurve *curve ) | |
97 | { m_curve = curve; } | |
98 | ||
99 | double GetZoom() | |
100 | { return m_zoom; } | |
101 | void SetZoom( double zoom ) | |
102 | { m_zoom = zoom; } | |
103 | ||
104 | wxInt32 GetPosition() | |
105 | { return m_position; } | |
106 | void SetPosition( wxInt32 pos ) | |
107 | { m_position = pos; } | |
108 | ||
109 | private: | |
110 | wxPlotCurve *m_curve; | |
111 | double m_zoom; | |
112 | wxInt32 m_position; | |
113 | }; | |
114 | ||
115 | //----------------------------------------------------------------------------- | |
116 | // wxPlotCurve | |
117 | //----------------------------------------------------------------------------- | |
118 | ||
15e8daec | 119 | class WXDLLIMPEXP_PLOT wxPlotCurve: public wxObject |
8556b795 RR |
120 | { |
121 | public: | |
122 | wxPlotCurve( int offsetY, double startY, double endY ); | |
123 | ||
124 | virtual wxInt32 GetStartX() = 0; | |
125 | virtual wxInt32 GetEndX() = 0; | |
126 | ||
127 | virtual double GetY( wxInt32 x ) = 0; | |
128 | ||
129 | void SetStartY( double startY ) | |
130 | { m_startY = startY; } | |
131 | double GetStartY() | |
132 | { return m_startY; } | |
133 | void SetEndY( double endY ) | |
134 | { m_endY = endY; } | |
135 | double GetEndY() | |
136 | { return m_endY; } | |
137 | void SetOffsetY( int offsetY ) | |
138 | { m_offsetY = offsetY; } | |
139 | int GetOffsetY() | |
140 | { return m_offsetY; } | |
298a3f2e | 141 | |
8556b795 RR |
142 | void SetPenNormal( const wxPen &pen ) |
143 | { m_penNormal = pen; } | |
144 | void SetPenSelected( const wxPen &pen ) | |
145 | { m_penSelected = pen; } | |
146 | ||
147 | private: | |
148 | int m_offsetY; | |
149 | double m_startY; | |
150 | double m_endY; | |
151 | wxPen m_penNormal; | |
152 | wxPen m_penSelected; | |
153 | ||
154 | DECLARE_ABSTRACT_CLASS(wxPlotCurve) | |
155 | }; | |
156 | ||
157 | //----------------------------------------------------------------------------- | |
158 | // wxPlotOnOffCurve | |
159 | //----------------------------------------------------------------------------- | |
160 | ||
15e8daec | 161 | class WXDLLIMPEXP_PLOT wxPlotOnOff |
8556b795 RR |
162 | { |
163 | public: | |
164 | wxPlotOnOff() { } | |
165 | ||
166 | wxInt32 m_on; | |
167 | wxInt32 m_off; | |
168 | void *m_clientData; | |
169 | }; | |
170 | ||
15e8daec VS |
171 | WX_DECLARE_OBJARRAY_WITH_DECL(wxPlotOnOff, wxArrayPlotOnOff, |
172 | class WXDLLIMPEXP_PLOT); | |
8556b795 | 173 | |
15e8daec | 174 | class WXDLLIMPEXP_PLOT wxPlotOnOffCurve: public wxObject |
8556b795 RR |
175 | { |
176 | public: | |
177 | wxPlotOnOffCurve( int offsetY ); | |
178 | ||
179 | wxInt32 GetStartX() | |
180 | { return m_minX; } | |
181 | wxInt32 GetEndX() | |
182 | { return m_maxX; } | |
183 | ||
184 | void SetOffsetY( int offsetY ) | |
185 | { m_offsetY = offsetY; } | |
186 | int GetOffsetY() | |
187 | { return m_offsetY; } | |
298a3f2e | 188 | |
8556b795 RR |
189 | void Add( wxInt32 on, wxInt32 off, void *clientData = NULL ); |
190 | size_t GetCount(); | |
298a3f2e | 191 | |
8556b795 RR |
192 | wxInt32 GetOn( size_t index ); |
193 | wxInt32 GetOff( size_t index ); | |
194 | void* GetClientData( size_t index ); | |
195 | wxPlotOnOff *GetAt( size_t index ); | |
196 | ||
197 | virtual void DrawOnLine( wxDC &dc, wxCoord y, wxCoord start, wxCoord end, void *clientData ); | |
198 | virtual void DrawOffLine( wxDC &dc, wxCoord y, wxCoord start, wxCoord end ); | |
199 | ||
200 | private: | |
201 | int m_offsetY; | |
202 | wxInt32 m_minX; | |
203 | wxInt32 m_maxX; | |
298a3f2e | 204 | |
8556b795 RR |
205 | wxArrayPlotOnOff m_marks; |
206 | ||
207 | DECLARE_CLASS(wxPlotOnOffCurve) | |
208 | }; | |
209 | ||
210 | //----------------------------------------------------------------------------- | |
211 | // wxPlotArea | |
212 | //----------------------------------------------------------------------------- | |
213 | ||
15e8daec | 214 | class WXDLLIMPEXP_PLOT wxPlotArea: public wxWindow |
8556b795 RR |
215 | { |
216 | public: | |
217 | wxPlotArea() {} | |
218 | wxPlotArea( wxPlotWindow *parent ); | |
219 | ||
220 | void OnPaint( wxPaintEvent &event ); | |
221 | void OnMouse( wxMouseEvent &event ); | |
222 | ||
223 | void DrawCurve( wxDC *dc, wxPlotCurve *curve, int from = -1, int to = -1 ); | |
224 | void DrawOnOffCurve( wxDC *dc, wxPlotOnOffCurve *curve, int from = -1, int to = -1 ); | |
225 | void DeleteCurve( wxPlotCurve *curve, int from = -1, int to = -1 ); | |
226 | ||
227 | virtual void ScrollWindow( int dx, int dy, const wxRect *rect ); | |
228 | ||
229 | private: | |
230 | wxPlotWindow *m_owner; | |
231 | bool m_zooming; | |
232 | ||
233 | DECLARE_CLASS(wxPlotArea) | |
234 | DECLARE_EVENT_TABLE() | |
235 | }; | |
236 | ||
237 | //----------------------------------------------------------------------------- | |
238 | // wxPlotXAxisArea | |
239 | //----------------------------------------------------------------------------- | |
240 | ||
15e8daec | 241 | class WXDLLIMPEXP_PLOT wxPlotXAxisArea: public wxWindow |
8556b795 RR |
242 | { |
243 | public: | |
244 | wxPlotXAxisArea() {} | |
245 | wxPlotXAxisArea( wxPlotWindow *parent ); | |
246 | ||
247 | void OnPaint( wxPaintEvent &event ); | |
248 | void OnMouse( wxMouseEvent &event ); | |
249 | ||
250 | private: | |
251 | wxPlotWindow *m_owner; | |
252 | ||
253 | DECLARE_CLASS(wxPlotXAxisArea) | |
254 | DECLARE_EVENT_TABLE() | |
255 | }; | |
256 | ||
257 | //----------------------------------------------------------------------------- | |
258 | // wxPlotYAxisArea | |
259 | //----------------------------------------------------------------------------- | |
260 | ||
15e8daec | 261 | class WXDLLIMPEXP_PLOT wxPlotYAxisArea: public wxWindow |
8556b795 RR |
262 | { |
263 | public: | |
264 | wxPlotYAxisArea() {} | |
265 | wxPlotYAxisArea( wxPlotWindow *parent ); | |
266 | ||
267 | void OnPaint( wxPaintEvent &event ); | |
268 | void OnMouse( wxMouseEvent &event ); | |
269 | ||
270 | private: | |
271 | wxPlotWindow *m_owner; | |
272 | ||
273 | DECLARE_CLASS(wxPlotYAxisArea) | |
274 | DECLARE_EVENT_TABLE() | |
275 | }; | |
276 | ||
277 | //----------------------------------------------------------------------------- | |
278 | // wxPlotWindow | |
279 | //----------------------------------------------------------------------------- | |
280 | ||
15e8daec | 281 | class WXDLLIMPEXP_PLOT wxPlotWindow: public wxScrolledWindow |
8556b795 RR |
282 | { |
283 | public: | |
284 | wxPlotWindow() {} | |
285 | wxPlotWindow( wxWindow *parent, wxWindowID id, const wxPoint &pos, const wxSize &size, int flags = wxPLOT_DEFAULT ); | |
286 | ~wxPlotWindow(); | |
287 | ||
288 | // curve accessors | |
289 | // --------------- | |
290 | ||
291 | void Add( wxPlotCurve *curve ); | |
292 | void Delete( wxPlotCurve* curve ); | |
293 | ||
294 | size_t GetCount(); | |
295 | wxPlotCurve *GetAt( size_t n ); | |
296 | ||
6c43b66e DS |
297 | void SetCurrentCurve( wxPlotCurve* current ); |
298 | wxPlotCurve *GetCurrentCurve(); | |
8556b795 RR |
299 | |
300 | // mark list accessors | |
301 | // ------------------- | |
302 | ||
303 | void Add( wxPlotOnOffCurve *curve ); | |
304 | void Delete( wxPlotOnOffCurve* curve ); | |
298a3f2e | 305 | |
8556b795 RR |
306 | size_t GetOnOffCurveCount(); |
307 | wxPlotOnOffCurve *GetOnOffCurveAt( size_t n ); | |
308 | ||
309 | // vertical representation | |
310 | // ----------------------- | |
311 | ||
312 | void Move( wxPlotCurve* curve, int pixels_up ); | |
313 | void Enlarge( wxPlotCurve *curve, double factor ); | |
314 | ||
315 | // horizontal representation | |
316 | // ------------------------- | |
317 | ||
318 | void SetUnitsPerValue( double upv ); | |
319 | double GetUnitsPerValue() | |
320 | { return m_xUnitsPerValue; } | |
321 | ||
322 | void SetZoom( double zoom ); | |
323 | double GetZoom() | |
324 | { return m_xZoom; } | |
325 | ||
326 | // options | |
327 | // ------- | |
328 | ||
298a3f2e | 329 | void SetScrollOnThumbRelease( bool scrollOnThumbRelease = true ) |
8556b795 RR |
330 | { m_scrollOnThumbRelease = scrollOnThumbRelease; } |
331 | bool GetScrollOnThumbRelease() | |
332 | { return m_scrollOnThumbRelease; } | |
333 | ||
298a3f2e | 334 | void SetEnlargeAroundWindowCentre( bool enlargeAroundWindowCentre = true ) |
8556b795 RR |
335 | { m_enlargeAroundWindowCentre = enlargeAroundWindowCentre; } |
336 | bool GetEnlargeAroundWindowCentre() | |
337 | { return m_enlargeAroundWindowCentre; } | |
338 | ||
339 | // events (may be overridden) | |
340 | // -------------------------- | |
341 | ||
342 | void OnMoveUp( wxCommandEvent& event ); | |
343 | void OnMoveDown( wxCommandEvent& event ); | |
344 | ||
345 | void OnEnlarge( wxCommandEvent& event ); | |
346 | void OnShrink( wxCommandEvent& event ); | |
347 | void OnZoomIn( wxCommandEvent& event ); | |
348 | void OnZoomOut( wxCommandEvent& event ); | |
349 | ||
350 | void OnScroll2( wxScrollWinEvent& event ); | |
351 | ||
352 | // utilities | |
353 | // --------- | |
354 | ||
355 | void RedrawEverything(); | |
356 | void RedrawXAxis(); | |
357 | void RedrawYAxis(); | |
358 | ||
359 | void ResetScrollbar(); | |
360 | ||
361 | private: | |
362 | friend class wxPlotArea; | |
363 | friend class wxPlotXAxisArea; | |
364 | friend class wxPlotYAxisArea; | |
365 | ||
366 | double m_xUnitsPerValue; | |
367 | double m_xZoom; | |
368 | ||
369 | wxList m_curves; | |
370 | wxList m_onOffCurves; | |
298a3f2e | 371 | |
8556b795 RR |
372 | wxPlotArea *m_area; |
373 | wxPlotXAxisArea *m_xaxis; | |
374 | wxPlotYAxisArea *m_yaxis; | |
375 | wxPlotCurve *m_current; | |
376 | ||
377 | bool m_scrollOnThumbRelease; | |
378 | bool m_enlargeAroundWindowCentre; | |
379 | ||
380 | DECLARE_CLASS(wxPlotWindow) | |
381 | DECLARE_EVENT_TABLE() | |
382 | }; | |
383 | ||
384 | // ---------------------------------------------------------------------------- | |
385 | // plot event macros | |
386 | // ---------------------------------------------------------------------------- | |
387 | ||
388 | typedef void (wxEvtHandler::*wxPlotEventFunction)(wxPlotEvent&); | |
389 | ||
b9e5acef JS |
390 | #if WXWIN_COMPATIBILITY_EVENT_TYPES |
391 | ||
298a3f2e WS |
392 | #define EVT_PLOT(id, fn) { wxEVT_PLOT_DOUBLECLICKED, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) (wxNotifyEventFunction) (wxPlotEventFunction) & fn, (wxObject *) NULL }, |
393 | #define EVT_PLOT_SEL_CHANGING(id, fn) { wxEVT_PLOT_SEL_CHANGING, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) (wxNotifyEventFunction) (wxPlotEventFunction) & fn, (wxObject *) NULL }, | |
394 | #define EVT_PLOT_SEL_CHANGED(id, fn) { wxEVT_PLOT_SEL_CHANGED, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) (wxNotifyEventFunction) (wxPlotEventFunction) & fn, (wxObject *) NULL }, | |
395 | #define EVT_PLOT_CLICKED(id, fn) { wxEVT_PLOT_CLICKED, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) (wxNotifyEventFunction) (wxPlotEventFunction) & fn, (wxObject *) NULL }, | |
396 | #define EVT_PLOT_DOUBLECLICKED(id, fn) { wxEVT_PLOT_DOUBLECLICKED, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) (wxNotifyEventFunction) (wxPlotEventFunction) & fn, (wxObject *) NULL }, | |
397 | #define EVT_PLOT_ZOOM_IN(id, fn) { wxEVT_PLOT_ZOOM_IN, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) (wxNotifyEventFunction) (wxPlotEventFunction) & fn, (wxObject *) NULL }, | |
398 | #define EVT_PLOT_ZOOM_OUT(id, fn) { wxEVT_PLOT_ZOOM_OUT, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) (wxNotifyEventFunction) (wxPlotEventFunction) & fn, (wxObject *) NULL }, | |
399 | #define EVT_PLOT_VALUE_SEL_CREATING(id, fn) { wxEVT_PLOT_VALUE_SEL_CREATING, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) (wxNotifyEventFunction) (wxPlotEventFunction) & fn, (wxObject *) NULL }, | |
400 | #define EVT_PLOT_VALUE_SEL_CREATED(id, fn) { wxEVT_PLOT_VALUE_SEL_CREATED, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) (wxNotifyEventFunction) (wxPlotEventFunction) & fn, (wxObject *) NULL }, | |
401 | #define EVT_PLOT_VALUE_SEL_CHANGING(id, fn) { wxEVT_PLOT_VALUE_SEL_CHANGING, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) (wxNotifyEventFunction) (wxPlotEventFunction) & fn, (wxObject *) NULL }, | |
402 | #define EVT_PLOT_VALUE_SEL_CHANGED(id, fn) { wxEVT_PLOT_VALUE_SEL_CHANGED, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) (wxNotifyEventFunction) (wxPlotEventFunction) & fn, (wxObject *) NULL }, | |
403 | #define EVT_PLOT_AREA_SEL_CREATING(id, fn) { wxEVT_PLOT_AREA_SEL_CREATING, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) (wxNotifyEventFunction) (wxPlotEventFunction) & fn, (wxObject *) NULL }, | |
404 | #define EVT_PLOT_AREA_SEL_CREATED(id, fn) { wxEVT_PLOT_AREA_SEL_CREATED, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) (wxNotifyEventFunction) (wxPlotEventFunction) & fn, (wxObject *) NULL }, | |
405 | #define EVT_PLOT_AREA_SEL_CHANGING(id, fn) { wxEVT_PLOT_AREA_SEL_CHANGING, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) (wxNotifyEventFunction) (wxPlotEventFunction) & fn, (wxObject *) NULL }, | |
406 | #define EVT_PLOT_AREA_SEL_CHANGED(id, fn) { wxEVT_PLOT_AREA_SEL_CHANGED, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) (wxNotifyEventFunction) (wxPlotEventFunction) & fn, (wxObject *) NULL }, | |
407 | #define EVT_PLOT_BEGIN_X_LABEL_EDIT(id, fn) { wxEVT_PLOT_BEGIN_X_LABEL_EDIT, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) (wxNotifyEventFunction) (wxPlotEventFunction) & fn, (wxObject *) NULL }, | |
408 | #define EVT_PLOT_END_X_LABEL_EDIT(id, fn) { wxEVT_PLOT_END_X_LABEL_EDIT, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) (wxNotifyEventFunction) (wxPlotEventFunction) & fn, (wxObject *) NULL }, | |
409 | #define EVT_PLOT_BEGIN_Y_LABEL_EDIT(id, fn) { wxEVT_PLOT_BEGIN_Y_LABEL_EDIT, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) (wxNotifyEventFunction) (wxPlotEventFunction) & fn, (wxObject *) NULL }, | |
410 | #define EVT_PLOT_END_Y_LABEL_EDIT(id, fn) { wxEVT_PLOT_END_Y_LABEL_EDIT, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) (wxNotifyEventFunction) (wxPlotEventFunction) & fn, (wxObject *) NULL }, | |
411 | #define EVT_PLOT_BEGIN_TITLE_EDIT(id, fn) { wxEVT_PLOT_BEGIN_TITLE_EDIT, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) (wxNotifyEventFunction) (wxPlotEventFunction) & fn, (wxObject *) NULL }, | |
412 | #define EVT_PLOT_END_TITLE_EDIT(id, fn) { wxEVT_PLOT_END_TITLE_EDIT, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) (wxNotifyEventFunction) (wxPlotEventFunction) & fn, (wxObject *) NULL }, | |
8556b795 | 413 | |
b9e5acef JS |
414 | #else |
415 | ||
298a3f2e WS |
416 | #define EVT_PLOT(id, fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_PLOT_DOUBLECLICKED, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) (wxNotifyEventFunction) wxStaticCastEvent( wxPlotEventFunction, & fn ), (wxObject *) NULL ), |
417 | #define EVT_PLOT_SEL_CHANGING(id, fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_PLOT_SEL_CHANGING, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) (wxNotifyEventFunction) wxStaticCastEvent( wxPlotEventFunction, & fn ), (wxObject *) NULL ), | |
418 | #define EVT_PLOT_SEL_CHANGED(id, fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_PLOT_SEL_CHANGED, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) (wxNotifyEventFunction) wxStaticCastEvent( wxPlotEventFunction, & fn ), (wxObject *) NULL ), | |
419 | #define EVT_PLOT_CLICKED(id, fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_PLOT_CLICKED, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) (wxNotifyEventFunction) wxStaticCastEvent( wxPlotEventFunction, & fn ), (wxObject *) NULL ), | |
420 | #define EVT_PLOT_DOUBLECLICKED(id, fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_PLOT_DOUBLECLICKED, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) (wxNotifyEventFunction) wxStaticCastEvent( wxPlotEventFunction, & fn ), (wxObject *) NULL ), | |
421 | #define EVT_PLOT_ZOOM_IN(id, fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_PLOT_ZOOM_IN, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) (wxNotifyEventFunction) wxStaticCastEvent( wxPlotEventFunction, & fn ), (wxObject *) NULL ), | |
422 | #define EVT_PLOT_ZOOM_OUT(id, fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_PLOT_ZOOM_OUT, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) (wxNotifyEventFunction) wxStaticCastEvent( wxPlotEventFunction, & fn ), (wxObject *) NULL ), | |
423 | #define EVT_PLOT_VALUE_SEL_CREATING(id, fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_PLOT_VALUE_SEL_CREATING, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) (wxNotifyEventFunction) wxStaticCastEvent( wxPlotEventFunction, & fn ), (wxObject *) NULL ), | |
424 | #define EVT_PLOT_VALUE_SEL_CREATED(id, fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_PLOT_VALUE_SEL_CREATED, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) (wxNotifyEventFunction) wxStaticCastEvent( wxPlotEventFunction, & fn ), (wxObject *) NULL ), | |
425 | #define EVT_PLOT_VALUE_SEL_CHANGING(id, fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_PLOT_VALUE_SEL_CHANGING, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) (wxNotifyEventFunction) wxStaticCastEvent( wxPlotEventFunction, & fn ), (wxObject *) NULL ), | |
426 | #define EVT_PLOT_VALUE_SEL_CHANGED(id, fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_PLOT_VALUE_SEL_CHANGED, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) (wxNotifyEventFunction) wxStaticCastEvent( wxPlotEventFunction, & fn ), (wxObject *) NULL ), | |
427 | #define EVT_PLOT_AREA_SEL_CREATING(id, fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_PLOT_AREA_SEL_CREATING, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) (wxNotifyEventFunction) wxStaticCastEvent( wxPlotEventFunction, & fn ), (wxObject *) NULL ), | |
428 | #define EVT_PLOT_AREA_SEL_CREATED(id, fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_PLOT_AREA_SEL_CREATED, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) (wxNotifyEventFunction) wxStaticCastEvent( wxPlotEventFunction, & fn ), (wxObject *) NULL ), | |
429 | #define EVT_PLOT_AREA_SEL_CHANGING(id, fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_PLOT_AREA_SEL_CHANGING, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) (wxNotifyEventFunction) wxStaticCastEvent( wxPlotEventFunction, & fn ), (wxObject *) NULL ), | |
430 | #define EVT_PLOT_AREA_SEL_CHANGED(id, fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_PLOT_AREA_SEL_CHANGED, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) (wxNotifyEventFunction) wxStaticCastEvent( wxPlotEventFunction, & fn ), (wxObject *) NULL ), | |
431 | #define EVT_PLOT_BEGIN_X_LABEL_EDIT(id, fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_PLOT_BEGIN_X_LABEL_EDIT, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) (wxNotifyEventFunction) wxStaticCastEvent( wxPlotEventFunction, & fn ), (wxObject *) NULL ), | |
432 | #define EVT_PLOT_END_X_LABEL_EDIT(id, fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_PLOT_END_X_LABEL_EDIT, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) (wxNotifyEventFunction) wxStaticCastEvent( wxPlotEventFunction, & fn ), (wxObject *) NULL ), | |
433 | #define EVT_PLOT_BEGIN_Y_LABEL_EDIT(id, fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_PLOT_BEGIN_Y_LABEL_EDIT, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) (wxNotifyEventFunction) wxStaticCastEvent( wxPlotEventFunction, & fn ), (wxObject *) NULL ), | |
434 | #define EVT_PLOT_END_Y_LABEL_EDIT(id, fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_PLOT_END_Y_LABEL_EDIT, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) (wxNotifyEventFunction) wxStaticCastEvent( wxPlotEventFunction, & fn ), (wxObject *) NULL ), | |
435 | #define EVT_PLOT_BEGIN_TITLE_EDIT(id, fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_PLOT_BEGIN_TITLE_EDIT, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) (wxNotifyEventFunction) wxStaticCastEvent( wxPlotEventFunction, & fn ), (wxObject *) NULL ), | |
436 | #define EVT_PLOT_END_TITLE_EDIT(id, fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_PLOT_END_TITLE_EDIT, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) (wxNotifyEventFunction) wxStaticCastEvent( wxPlotEventFunction, & fn ), (wxObject *) NULL ), | |
b9e5acef JS |
437 | |
438 | #endif | |
439 | ||
8556b795 RR |
440 | #endif |
441 | // _WX_PLOT_H_ |