wxArt2D
marker.h
Go to the documentation of this file.
1 /*! \file wx/curves/marker.h
2  \brief classes for plotting curve and pie data, and editing them.
3 
4  Data stored in a derived a2dCanvasObject, can be plotted as a curve of pie chart.
5  One can add markers on the curves, and several curves can be plot as a group in one plot.
6 
7  \author Klaas Holwerda
8 
9  Copyright: 2000-2004 (c) Klaas Holwerda
10 
11  Licence: wxWidgets Licence
12 
13  RCS-ID: $Id: marker.h,v 1.17 2008/09/05 19:01:12 titato Exp $
14 */
15 
16 #ifndef __WXMARKER_H__
17 #define __WXMARKER_H__
18 
19 #ifndef WX_PRECOMP
20 #include "wx/wx.h"
21 #endif
22 
23 #include "wx/curves/meta.h"
24 
25 //! For Markers on a Plot
26 /*!
27 Markers can be dragged along the curve
28 
29 \ingroup canvasobject meta curve
30 */
31 class A2DCURVESDLLEXP a2dBaseMarker: public a2dCurveObject
32 {
33 public:
34  // !!!! The cast in the initialization is bad
35  a2dBaseMarker( const wxString& format = _T( "%f" ) );
36 
37  a2dBaseMarker( const wxString& format, double atx, double height = 0 );
38 
39  a2dBaseMarker( const wxString& format, double atx, const a2dFont& font );
40 
41  a2dBaseMarker( const a2dBaseMarker& other, CloneOptions options, a2dRefMap* refs );
42 
43  virtual ~a2dBaseMarker();
44 
45  //!height of text at marker according to format string
46  //! \remark 0 height means no text displayed.
47  void SetTextHeight ( double height ) { m_textheight = height; SetPending( true ); }
48 
49  /*! set all parameters
50  \param xt: x top of arrow (normal 0)
51  \param yt: y top of arrow (normal 0)
52  \param l1: How long is the arrow.
53  \param l2: Distance from top to the inside of the arrow.
54  \param b: How broad is the basis of the arrow.
55  */
56  void Set( double xt, double yt, double l1, double l2, double b );
57 
58  /*! set parameters
59  \param l1: How long is the arrow.
60  \param l2: Distance from top to the inside of the arrow.
61  \param b: How broad is the basis of the arrow.
62  */
63  void Set( double l1, double l2, double b );
64 
65  void SetFont( const a2dFont& font )
66  {
67  m_font = font; SetPending( true );
68  }
69 
70  void SetStep( double step ) { m_step = step; SetPending( true ); }
71 
72  void SetPrompt( a2dText* prompttext );
73 
74  a2dSmrtPtr<a2dText> GetPrompt() const
75  {
76  return m_promptText;
77  }
78 
79  void SetPromptFormat( const wxString& promptFromat )
80  {
81  m_promptFormat = promptFromat; SetPending( true );
82  }
83  virtual const wxString& GetMarkerString();
84 
85  double GetL1() const { return m_l1; }
86 
87  double GetL2() const { return m_l2; }
88 
89  double GetBase() const { return m_b; }
90 
91  bool GetSpline() const { return m_spline; }
92 
93  void SetPosition( double position ) { m_position = position; SetPending( true ); }
94 
95  double GetPosition() const { return m_position; }
96 
97  DECLARE_DYNAMIC_CLASS( a2dBaseMarker )
98 
99  DECLARE_EVENT_TABLE()
100 
101 protected:
102 
103  virtual a2dObject* DoClone( CloneOptions options, a2dRefMap* refs ) const;
104 
105 #if wxART2D_USE_CVGIO
106  virtual void DoSave( wxObject* parent, a2dIOHandlerXmlSerOut& out, a2dXmlSer_flag xmlparts , a2dObjectList* towrite );
107 
108  void DoLoad( wxObject* parent, a2dIOHandlerXmlSerIn& parser, a2dXmlSer_flag xmlparts );
109 #endif //wxART2D_USE_CVGIO
110 
113 
114  a2dBoundingBox DoGetUnTransformedBbox( a2dBboxFlags flags = a2dCANOBJ_BBOX_NON ) const;
115 
116  bool DoIsHitWorld( a2dIterC& ic, a2dHitEvent& hitEvent );
117 
118  bool DoStartEdit( wxUint16 editmode, wxEditStyle editstyle );
119 
120  void DoRender( a2dIterC& ic, OVERLAP clipparent );
121 
122  wxString m_format;
123 
124  double m_textheight;
125 
126  //! length from top of arrow to outside points in X
127  double m_l1;
128 
129  //! length from top of arrow to inside point in X
130  double m_l2;
131 
132  //! base of arrow
133  double m_b;
134 
135  //! draw splined?
136  bool m_spline;
137 
138  //! marker font
140 
141  //! step to move when dragging/moving marker
142  double m_step;
143 
144  //! prompting when OnEnterObject
146 
147  //! the current X where the marker is located
148  double m_position;
149 
150  a2dSmrtPtr<a2dText> m_promptText;
151  wxString m_promptString;
152  wxString m_promptFormat;
153 
154 public:
155 
156  static a2dPropertyIdDouble* PROPID_PositionMarker;
157 
159 
160 private:
161  //!this is a not implemented copy constructor that avoids automatic creation of one
162  a2dBaseMarker( const a2dBaseMarker& other );
163 };
164 
165 #if defined(WXART2D_USINGDLL)
166 template class A2DCURVESDLLEXP a2dSmrtPtr<a2dBaseMarker>;
167 template class A2DCURVESDLLEXP std::allocator<class a2dSmrtPtr<class a2dBaseMarker> >;
168 template class A2DCURVESDLLEXP std::allocator< std::_List_nod<class a2dSmrtPtr<class a2dBaseMarker>, std::allocator<class a2dSmrtPtr<class a2dBaseMarker> > >::_Node >;
169 template class A2DCURVESDLLEXP std::allocator< std::_List_ptr<class a2dSmrtPtr<class a2dBaseMarker>, std::allocator<class a2dSmrtPtr<class a2dBaseMarker> > >::_Nodeptr >;
170 template class A2DCURVESDLLEXP std::list<class a2dSmrtPtr<class a2dBaseMarker> >;
171 template class A2DCURVESDLLEXP a2dlist<class a2dSmrtPtr<class a2dBaseMarker> >;
172 template class A2DCURVESDLLEXP a2dSmrtPtrList<a2dBaseMarker>;
173 #endif
174 
175 //! For Markers on an Axis
176 /*!
177 Markers can draw self value on an axis
178 
179 \ingroup canvasobject meta curve
180 */
181 class A2DCURVESDLLEXP a2dAxisMarker : public a2dBaseMarker
182 {
183 public:
184  // !!!! The cast in the initialization is bad
185  a2dAxisMarker( const wxString& format = _T( "%f" ) , a2dCurveAxis* axis = 0 );
186 
187  a2dAxisMarker( const wxString& format, a2dCurveAxis* curve, double atx, double height = 0 );
188 
189  a2dAxisMarker( const wxString& format, a2dCurveAxis* curve , double atx, const a2dFont& font );
190 
191  a2dAxisMarker( const a2dAxisMarker& other, CloneOptions options, a2dRefMap* refs );
192 
193  virtual ~a2dAxisMarker();
194 
195  void SetAxis( a2dCurveAxis* curve ) { m_axis = curve; SetPending( true ); }
196 
197  a2dCurveAxis* GetAxis() const { return m_axis; }
198 
199  virtual const wxString& GetMarkerString();
200 
201  DECLARE_DYNAMIC_CLASS( a2dAxisMarker )
202 
203  DECLARE_EVENT_TABLE()
204 
205 public:
206  static a2dPropertyIdCanvasObject* PROPID_axis;
207 
209 
210 protected:
211 
212  virtual a2dObject* DoClone( CloneOptions options, a2dRefMap* refs ) const;
213 
214  void DoWalker( wxObject* parent, a2dWalkerIOHandler& handler );
215 
216  void DoAddPending( a2dIterC& ic );
217 
218  //void OnEnterObject(a2dCanvasObjectMouseEvent &event);
219 
220  //void OnLeaveObject(a2dCanvasObjectMouseEvent &event);
221 
223 
224 #if wxART2D_USE_CVGIO
225  virtual void DoSave( wxObject* parent, a2dIOHandlerXmlSerOut& out, a2dXmlSer_flag xmlparts , a2dObjectList* towrite );
226 
227  void DoLoad( wxObject* parent, a2dIOHandlerXmlSerIn& parser, a2dXmlSer_flag xmlparts );
228 #endif //wxART2D_USE_CVGIO
229 
230  void DependencyPending( a2dWalkerIOHandler* WXUNUSED( handler ) );
231 
232  bool DoUpdate( UpdateMode mode, const a2dBoundingBox& childbox, const a2dBoundingBox& clipbox, const a2dBoundingBox& propbox );
233 
235 
236 private:
237  //!this is a not implemented copy constructor that avoids automatic creation of one
238  a2dAxisMarker( const a2dAxisMarker& other );
239 };
240 
241 //! For Markers on a Curve
242 /*!
243  A marker is a shape which can be dragged along the curve.
244  The marker has a pointer to the curve, but is placed one level higher in a a2dCurveArea.
245 
246  \ingroup canvasobject meta curve
247 */
248 class A2DCURVESDLLEXP a2dMarker : public a2dBaseMarker
249 {
250 public:
251 
252  //! marker formatted
253  /*!
254  \param format printf format string for position of marker
255  \param curve pointer to curve object to follow
256  */
257  a2dMarker( const wxString& format = _T( "%f %f" ) , a2dCurve* curve = 0 );
258 
259  //! marker formatted
260  /*!
261  \param format printf format string for position of marker
262  \param curve pointer to curve object to follow
263  \param atx x position on curve
264  \param height text height for format string
265  */
266  a2dMarker( const wxString& format, a2dCurve* curve, double atx, double height = 0 );
267 
268  //! marker formatted
269  /*!
270  \param format printf format string for position of marker
271  \param curve pointer to curve object to follow
272  \param atx x position on curve
273  \param font text font for format string
274  */
275  a2dMarker( const wxString& format, a2dCurve* curve , double atx, const a2dFont& font );
276 
277  //! clone constructor
278  a2dMarker( const a2dMarker& other, CloneOptions options, a2dRefMap* refs );
279 
280  virtual ~a2dMarker();
281 
282  void CalculatePositionMarker( double& xw, double& yw );
283 
284  //! get point at position of marker.
285  /*!
286  If x,y on curve is a function of frequency, m_position stands for the frequency.
287  What is returned, is the x,y at m_position in curve coordinates.
288  */
289  bool GetPositionCurvePoint( a2dPoint2D& point );
290 
291  void SetCurve( a2dCurve* curve ) { m_curve = curve; }
292 
293  //! return curve of the marker
294  a2dCurve* GetCurve() const { return m_curve; }
295 
296  //! string for maker, as is rendered when entering marker with cursor.
297  virtual const wxString& GetMarkerString();
298 
299  DECLARE_DYNAMIC_CLASS( a2dMarker )
300 
301  DECLARE_EVENT_TABLE()
302 
303 public:
304  static a2dPropertyIdCanvasObject* PROPID_curve;
305 
307 
308 protected:
309 
310  virtual a2dObject* DoClone( CloneOptions options, a2dRefMap* refs ) const;
311 
312  void OnChar( wxKeyEvent& event );
313 
314  void DoWalker( wxObject* parent, a2dWalkerIOHandler& handler );
315 
316  void DoAddPending( a2dIterC& ic );
317 
318  //void OnEnterObject(a2dCanvasObjectMouseEvent &event);
319 
320  //void OnLeaveObject(a2dCanvasObjectMouseEvent &event);
321 
322  void OnCanvasObjectMouseEvent( a2dCanvasObjectMouseEvent& event );
323 
324 #if wxART2D_USE_CVGIO
325  virtual void DoSave( wxObject* parent, a2dIOHandlerXmlSerOut& out, a2dXmlSer_flag xmlparts , a2dObjectList* towrite );
326 
327  void DoLoad( wxObject* parent, a2dIOHandlerXmlSerIn& parser, a2dXmlSer_flag xmlparts );
328 #endif //wxART2D_USE_CVGIO
329 
330  void DependencyPending( a2dWalkerIOHandler* WXUNUSED( handler ) );
331 
332  bool DoUpdate( UpdateMode mode, const a2dBoundingBox& childbox, const a2dBoundingBox& clipbox, const a2dBoundingBox& propbox );
333 
334  a2dSmrtPtr<a2dCurve> m_curve;
335 
336 private:
337  //!this is a not implemented copy constructor that avoids automatic creation of one
338  a2dMarker( const a2dMarker& other );
339 };
340 
341 #if defined(WXART2D_USINGDLL)
342 template class A2DCURVESDLLEXP a2dSmrtPtr<a2dMarker>;
343 #endif
344 
345 //! marker for two value in one curve, called a a2dBandCurve.
346 /*!
347  The marker travels up and down the band curve, and one can display
348  the value on the upper or lower side of the curve.
349 */
350 class A2DCURVESDLLEXP a2dBandMarker : public a2dMarker
351 {
352 public:
353  // !!!! The cast in the initialization is bad
354  a2dBandMarker( const wxString& format = _T( "%f" ) , a2dBandCurve* curve = 0 );
355 
356  a2dBandMarker( const wxString& format, a2dBandCurve* curve, double atx, double height = 0 );
357 
358  a2dBandMarker( const wxString& format, a2dBandCurve* curve , double atx, const a2dFont& font );
359 
360  a2dBandMarker( const a2dBandMarker& other, CloneOptions options, a2dRefMap* refs );
361 
362  virtual ~a2dBandMarker();
363 
364  //! marker on upper side of curve if true, else low
365  void SetMarkerUpLow( bool markerUpLow ) { m_markerUpLow = markerUpLow; }
366 
367  void CalculatePositionMarker( double& xw, double& yw );
368 
369  //! get point at position of marker.
370  /*!
371  If x,y on curve is a function of frequency, m_position stands for the frequency.
372  What is returned, is the x,y at m_position in curve coordinates.
373  */
374  bool GetPositionCurvePoint( a2dPoint2D& point );
375 
376  DECLARE_DYNAMIC_CLASS( a2dBandMarker )
377 
378 protected:
379 
380  virtual a2dObject* DoClone( CloneOptions options, a2dRefMap* refs ) const;
381 
382 #if wxART2D_USE_CVGIO
383  virtual void DoSave( wxObject* parent, a2dIOHandlerXmlSerOut& out, a2dXmlSer_flag xmlparts , a2dObjectList* towrite );
384 
385  void DoLoad( wxObject* parent, a2dIOHandlerXmlSerIn& parser, a2dXmlSer_flag xmlparts );
386 #endif //wxART2D_USE_CVGIO
387 
388 private:
389 
390  void DoRender( a2dIterC& ic, OVERLAP clipparent );
391 
392  //!this is a not implemented copy constructor that avoids automatic creation of one
393  a2dBandMarker( const a2dBandMarker& other );
394 
395  bool m_markerUpLow;
396 
397  a2dSmrtPtr<a2dBandCurve> m_curveBand;
398 };
399 
400 
401 //! For Showing Marker position of Markers on a Curve
402 /*!
403  Markers can be dragged along the curve, and the current value will be shown by
404  this object
405 
406  \ingroup canvasobject meta curve
407 */
408 class A2DCURVESDLLEXP a2dMarkerShow: public a2dCanvasObject
409 {
410 public:
411  // !!!! The cast in the initialization is bad
412  a2dMarkerShow( double x = 0, double y = 0,
413  const wxString& XLabel = _T( "X = " ), const wxString& YLabel = _T( "Y = " ),
414  const wxString& XValueformat = _T( "%f" ), const wxString& YValueformat = _T( "%f" ),
415  a2dMarker* marker = 0, double height = 0 );
416 
417  a2dMarkerShow( const a2dMarkerShow& other, CloneOptions options, a2dRefMap* refs );
418 
419  virtual ~a2dMarkerShow();
420 
421  void SetMarker( a2dMarker* marker ) { m_marker = marker; }
422 
423  a2dMarker* GetMarker() const { return m_marker; }
424 
425  //!height of text used by format string
426  void SetTextHeight ( double height ) { m_textheight = height; SetPending( true ); }
427 
428  a2dSmrtPtr<a2dText>& GetXLabel() { return m_Xlabel; }
429  a2dSmrtPtr<a2dText>& GetYLabel() { return m_Ylabel; }
430  a2dSmrtPtr<a2dText>& GetXText() { return m_xText; }
431  a2dSmrtPtr<a2dText>& GetYText() { return m_yText; }
432 
433  DECLARE_DYNAMIC_CLASS( a2dMarkerShow )
434 
435  DECLARE_EVENT_TABLE()
436 
437 protected:
438  virtual a2dObject* DoClone( CloneOptions options, a2dRefMap* refs ) const;
439 
440  void OnPropertyChanged( a2dComEvent& event );
441 
442  void DoWalker( wxObject* parent, a2dWalkerIOHandler& handler );
443 
444  bool DoStartEdit( wxUint16 editmode, wxEditStyle editstyle );
445 
446  void OnCanvasObjectMouseEvent( a2dCanvasObjectMouseEvent& event );
447 
448 #if wxART2D_USE_CVGIO
449  virtual void DoSave( wxObject* parent, a2dIOHandlerXmlSerOut& out, a2dXmlSer_flag xmlparts , a2dObjectList* towrite );
450 
451  void DoLoad( wxObject* parent, a2dIOHandlerXmlSerIn& parser, a2dXmlSer_flag xmlparts );
452 #endif //wxART2D_USE_CVGIO
453 
454  a2dBoundingBox DoGetUnTransformedBbox( a2dBboxFlags flags = a2dCANOBJ_BBOX_NON ) const;
455 
456  void DependencyPending( a2dWalkerIOHandler* WXUNUSED( handler ) );
457 
458  bool DoUpdate( UpdateMode mode, const a2dBoundingBox& childbox, const a2dBoundingBox& clipbox, const a2dBoundingBox& propbox );
459 
460  void DoRender( a2dIterC& ic, OVERLAP clipparent );
461 
462  bool DoIsHitWorld( a2dIterC& ic, a2dHitEvent& hitEvent );
463 
464  wxString m_XValueformat;
465 
466  wxString m_YValueformat;
467 
468  double m_textheight;
469 
470  a2dSmrtPtr<a2dMarker> m_marker;
471 
472  a2dSmrtPtr<a2dText> m_xText;
473 
474  a2dSmrtPtr<a2dText> m_yText;
475 
476  a2dSmrtPtr<a2dText> m_Xlabel;
477 
478  a2dSmrtPtr<a2dText> m_Ylabel;
479 
480 public:
481  static a2dPropertyIdCanvasObject* PROPID_marker;
482  static a2dPropertyIdCanvasObject* PROPID_xText;
483  static a2dPropertyIdCanvasObject* PROPID_yText;
484  static a2dPropertyIdCanvasObject* PROPID_Xlabel;
485  static a2dPropertyIdCanvasObject* PROPID_Ylabel;
486 
488 
489 private:
490  //!this is a not implemented copy constructor that avoids automatic creation of one
491  a2dMarkerShow( const a2dMarkerShow& other );
492 };
493 
494 //! List of markers
495 /*!
496  Used in a2dCursor to store several markers on a vertical cursor line.
497 */
498 class A2DCURVESDLLEXP a2dCursorMarkerList: public a2dSmrtPtrList<a2dBaseMarker>
499 {
500 public:
502 
504 
505 protected:
506 
508 
509 };
510 
511 //! cursor on curve plot as a vertical line with markers
512 class A2DCURVESDLLEXP a2dCursor : public a2dCanvasObject
513 {
514 public:
515  a2dCursor( double csize = 0. );
516 
517  a2dCursor( const a2dCursor& other, CloneOptions options, a2dRefMap* refs );
518 
519  virtual ~a2dCursor();
520 
521  void SetHSize( double hsize )
522  {
523  if( m_hsize != hsize )
524  {
525  m_hsize = hsize;
526  SetPending( true );
527  }
528  }
529  void SetWSize( double wsize )
530  {
531  if( m_wsize != wsize )
532  {
533  m_wsize = wsize;
534  SetPending( true );
535  }
536  }
537 
538  void SetCSize( double csize )
539  {
540  if( m_csize != csize )
541  {
542  m_csize = csize;
543  SetPending( true );
544  }
545  }
546 
547  void AddMarker( a2dBaseMarker* marker );
548 
549  void RemoveMarker( a2dBaseMarker* marker );
550 
551  void RemoveMarkers();
552 
553  void SetPosition( double posx, double posy, const a2dAffineMatrix& mat );
554 
555  bool GetPosition( double& posx, double& posy );
556 
557  //! position is rounded to whole number if true
558  void SetIntPosX( bool onlyIntPosX ) {m_onlyIntPosX = onlyIntPosX; }
559  //! position is rounded to whole number
560  void SetIntPosY( bool onlyIntPosY ) {m_onlyIntPosY = onlyIntPosY; }
561 
562  double ConvertAxis2World( double percentValue );
563 
564  bool CheckPosition( double posx );
565 
566  virtual void UpdatePosition( double minx, double miny, const a2dAffineMatrix& mat );
567 
568  virtual void SetPending( bool pending );
569 
570  DECLARE_DYNAMIC_CLASS( a2dCursor )
571 
572  DECLARE_EVENT_TABLE()
573 
574 protected:
575 
576  virtual a2dObject* DoClone( CloneOptions options, a2dRefMap* refs ) const;
577  a2dBoundingBox DoGetUnTransformedBbox( a2dBboxFlags flags = a2dCANOBJ_BBOX_NON );
578  void DoUpdateViewDependentTransform( a2dIterC& ic );
579 
580  void DoRender( a2dIterC& ic, OVERLAP clipparent );
581 
582  double m_csize;
583  double m_hsize;
584  double m_wsize;
585  double m_posx;
586  double m_posy;
587 
588  //! position is rounded to whole number
589  bool m_onlyIntPosX;
590  //! position is rounded to whole number
591  bool m_onlyIntPosY;
592 
593  //! list of markers on cursor line
595 
596  //! Untransformed bounding box.
597  a2dBoundingBox m_untransbbox;
598 
599 private:
600  //!this is a not implemented copy constructor that avoids automatic creation of one
601  a2dCursor( const a2dCursor& other );
602 };
603 
605 
606 class A2DCURVESDLLEXP a2dCursorAxisMarker : public a2dAxisMarker
607 {
608 public:
609  // !!!! The cast in the initialization is bad
610  a2dCursorAxisMarker( const wxString& format = _T( "%f" ) , a2dCurveAxis* axis = 0, a2dCursor* cursor = 0 );
611 
612  a2dCursorAxisMarker( const wxString& format, a2dCurveAxis* curve, a2dCursor* cursor, double atx, double aty, double height = 0 );
613 
614  a2dCursorAxisMarker( const wxString& format, a2dCurveAxis* curve, a2dCursor* cursor, double atx, double aty, const a2dFont& font );
615 
616  a2dCursorAxisMarker( const a2dCursorAxisMarker& other, CloneOptions options, a2dRefMap* refs );
617 
618  virtual ~a2dCursorAxisMarker();
619 
620  void SetCursor( a2dCursor* cursor ) { m_cursor = cursor; SetPending( true ); }
621 
622  a2dCursor* GetCursor() const { return m_cursor; }
623 
624  void SetPositionY( double posY ) { m_positionY = posY;}
625 
626  DECLARE_DYNAMIC_CLASS( a2dCursorAxisMarker )
627 
628  static a2dPropertyIdCanvasObject* PROPID_cursor;
629 
631 
632 protected:
633  virtual a2dObject* DoClone( CloneOptions options, a2dRefMap* refs ) const;
634 
635 #if wxART2D_USE_CVGIO
636  virtual void DoSave( wxObject* parent, a2dIOHandlerXmlSerOut& out, a2dXmlSer_flag xmlparts , a2dObjectList* towrite );
637 
638  void DoLoad( wxObject* parent, a2dIOHandlerXmlSerIn& parser, a2dXmlSer_flag xmlparts );
639 #endif //wxART2D_USE_CVGIO
640 
641  void DependencyPending( a2dWalkerIOHandler* WXUNUSED( handler ) );
642 
643  bool DoUpdate( UpdateMode mode, const a2dBoundingBox& childbox, const a2dBoundingBox& clipbox, const a2dBoundingBox& propbox );
644 
645  double m_positionY;
646  a2dSmrtPtr<a2dCursor> m_cursor;
647 
648 private:
649  //!this is a not implemented copy constructor that avoids automatic creation of one
651 };
652 
653 #endif
654 
cursor on curve plot as a vertical line with markers
Definition: marker.h:512
wxPoint2DDouble a2dPoint2D
this to define if coordinate numbers are integer or doubles
Definition: artglob.h:47
virtual bool DoIsHitWorld(a2dIterC &ic, a2dHitEvent &hitEvent)
Does hit test on the object (exclusif child objects)
Definition: canobj.cpp:3713
classes for plotting curve and pie data, and editing them.
void OnEnterObject(a2dCanvasObjectMouseEvent &event)
called when the mouse enters the object
Definition: canobj.cpp:1940
virtual a2dObject * DoClone(CloneOptions options, a2dRefMap *refs) const =0
This is here so that this class cannot be used directly.
mouse event sent from a2dCanvasObject to itself
Definition: canglob.h:223
double m_step
step to move when dragging/moving marker
Definition: marker.h:142
void OnCanvasObjectMouseEvent(a2dCanvasObjectMouseEvent &event)
default handler for mouse events, sent to the object from the a2dDrawingPart.
Definition: canobj.cpp:2391
For Markers on a Curve.
Definition: marker.h:248
class to map references to objects stored in XML, in order to make the connection later on...
Definition: gen.h:3462
void SetTextHeight(double height)
height of text used by format string
Definition: marker.h:426
Ref Counted base object.
Definition: gen.h:1045
virtual void DependencyPending(a2dWalkerIOHandler *handler)
called by to check if this object becomes pending as a result of other objects
Definition: canobj.cpp:4680
double m_l2
length from top of arrow to inside point in X
Definition: marker.h:130
Defines a font to be set to a2dDrawer2D or stored in a2dCanvsObject etc.
Definition: stylebase.h:779
Input and output handler for the XmlSer format.
Definition: genxmlpars.h:819
UpdateMode
Various mode flags for Update.
Definition: canobj.h:1091
a2dCurve * GetCurve() const
return curve of the marker
Definition: marker.h:294
virtual void SetPending(bool pending)
set this object pending for update
Definition: canobj.cpp:2585
OVERLAP
Result of a a2dBoundingBox intersection or hittest.
Definition: bbox.h:24
bool m_prompting
prompting when OnEnterObject
Definition: marker.h:145
For Showing Marker position of Markers on a Curve.
Definition: marker.h:408
#define DECLARE_PROPERTIES()
check if class has the given id as a valid id for this object
Definition: gen.h:835
base class for axis in a2dCanvasXYDisplayGroup
Definition: axis.h:102
virtual void DoLoad(wxObject *parent, a2dIOHandlerXmlSerIn &parser, a2dXmlSer_flag xmlparts)
load object specific CVG data
Definition: canobj.cpp:5728
a2dCanvasObject is the base class for Canvas Objects.
Definition: canobj.h:371
double m_b
base of arrow
Definition: marker.h:133
virtual void DoRender(a2dIterC &ic, OVERLAP clipparent)
render derived object
Definition: canobj.cpp:4695
List of markers.
Definition: marker.h:498
a2dCurveObject for objects needing to know its parent a2dCurvesArea.
Definition: curve.h:42
marker for two value in one curve, called a a2dBandCurve.
Definition: marker.h:350
Io handler to iterate through a a2dDocument.
Definition: gen.h:3911
void SetMarkerUpLow(bool markerUpLow)
marker on upper side of curve if true, else low
Definition: marker.h:365
a2dText is an abstract base class.
Definition: cantext.h:93
std list compatible list
Definition: a2dlist.h:42
bool DoUpdate(UpdateMode mode, const a2dBoundingBox &childbox, const a2dBoundingBox &clipbox, const a2dBoundingBox &propbox)
Update derived Object specific things ( mainly boundingbox)
Definition: curve.cpp:437
bool m_spline
draw splined?
Definition: marker.h:136
void SetIntPosX(bool onlyIntPosX)
position is rounded to whole number if true
Definition: marker.h:558
void SetIntPosY(bool onlyIntPosY)
position is rounded to whole number
Definition: marker.h:560
virtual void DoSave(wxObject *parent, a2dIOHandlerXmlSerOut &out, a2dXmlSer_flag xmlparts, a2dObjectList *towrite)
write object specific CVGL data
Definition: canobj.cpp:5569
void OnLeaveObject(a2dCanvasObjectMouseEvent &event)
called when the mouse leaves the object
Definition: canobj.cpp:1997
Input and output handler for the XmlSer format.
Definition: genxmlpars.h:862
For Markers on a Plot.
Definition: marker.h:31
virtual bool DoStartEdit(wxUint16 editmode, wxEditStyle editstyle)
only used for editable objects and under control of a editing tool.
Definition: canobj.cpp:1739
A 2x3 affine matrix class for 2D transformations.
Definition: afmatrix.h:53
Base class for curves.
Definition: curve.h:107
while iterating a a2dCanvasDocument, this holds the context.
Definition: canobj.h:3212
virtual void DoAddPending(a2dIterC &ic)
called by addPending
Definition: canobj.cpp:4601
see a2dComEvent
Definition: gen.h:371
Curve represented by a number of vertexes.
Definition: curve.h:703
The a2dBoundingBox class stores one a2dBoundingBox of a a2dCanvasObject.
Definition: bbox.h:39
virtual a2dBoundingBox DoGetUnTransformedBbox(a2dBboxFlags flags=a2dCANOBJ_BBOX_NON) const
In derived object this should be overriden to calculate the boundingbox of the object without its chi...
Definition: canobj.cpp:5031
double m_position
the current X where the marker is located
Definition: marker.h:148
a2dFont m_font
marker font
Definition: marker.h:139
This template class is for property ids with a known data type.
Definition: id.h:477
void SetTextHeight(double height)
Definition: marker.h:47
For Markers on an Axis.
Definition: marker.h:181
list of a2dObject&#39;s
Definition: gen.h:3157
CloneOptions
options for cloning
Definition: gen.h:1200
double m_l1
length from top of arrow to outside points in X
Definition: marker.h:127
structure to give as parameter to member functions of a2dCanvasObject
Definition: canobj.h:252
virtual void DoWalker(wxObject *parent, a2dWalkerIOHandler &handler)
iterate over this object and its children
Definition: canobj.cpp:5504
wxEditStyle
Definition: canobj.h:109
marker.h Source File -- Sun Oct 12 2014 17:04:22 -- Sun Oct 12 2014 -- 1.8.5 -- wxArt2D -- . -- Main Page Reference Documentation