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