16 #ifndef __WXMARKER_H__
17 #define __WXMARKER_H__
37 a2dBaseMarker(
const wxString& format,
double atx,
double height = 0 );
56 void Set(
double xt,
double yt,
double l1,
double l2,
double b );
63 void Set(
double l1,
double l2,
double b );
65 void SetFont(
const a2dFont& font )
70 void SetStep(
double step ) { m_step = step;
SetPending(
true ); }
72 void SetPrompt(
a2dText* prompttext );
79 void SetPromptFormat(
const wxString& promptFromat )
81 m_promptFormat = promptFromat;
SetPending(
true );
83 virtual const wxString& GetMarkerString();
85 double GetL1()
const {
return m_l1; }
87 double GetL2()
const {
return m_l2; }
89 double GetBase()
const {
return m_b; }
91 bool GetSpline()
const {
return m_spline; }
93 void SetPosition(
double position ) { m_position = position;
SetPending(
true ); }
95 double GetPosition()
const {
return m_position; }
105 #if wxART2D_USE_CVGIO
109 #endif //wxART2D_USE_CVGIO
151 wxString m_promptString;
152 wxString m_promptFormat;
165 #if defined(WXART2D_USINGDLL)
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> >;
199 virtual const wxString& GetMarkerString();
203 DECLARE_EVENT_TABLE()
224 #if wxART2D_USE_CVGIO
228 #endif //wxART2D_USE_CVGIO
266 a2dMarker(
const wxString& format,
a2dCurve* curve,
double atx,
double height = 0 );
282 void CalculatePositionMarker(
double& xw,
double& yw );
289 bool GetPositionCurvePoint(
a2dPoint2D& point );
291 void SetCurve(
a2dCurve* curve ) { m_curve = curve; }
297 virtual const wxString& GetMarkerString();
301 DECLARE_EVENT_TABLE()
312 void OnChar( wxKeyEvent& event );
324 #if wxART2D_USE_CVGIO
328 #endif //wxART2D_USE_CVGIO
341 #if defined(WXART2D_USINGDLL)
367 void CalculatePositionMarker(
double& xw,
double& yw );
374 bool GetPositionCurvePoint(
a2dPoint2D& point );
382 #if wxART2D_USE_CVGIO
386 #endif //wxART2D_USE_CVGIO
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 );
421 void SetMarker(
a2dMarker* marker ) { m_marker = marker; }
423 a2dMarker* GetMarker()
const {
return m_marker; }
435 DECLARE_EVENT_TABLE()
444 bool DoStartEdit( wxUint16 editmode,
wxEditStyle editstyle );
448 #if wxART2D_USE_CVGIO
452 #endif //wxART2D_USE_CVGIO
464 wxString m_XValueformat;
466 wxString m_YValueformat;
521 void SetHSize(
double hsize )
523 if( m_hsize != hsize )
529 void SetWSize(
double wsize )
531 if( m_wsize != wsize )
538 void SetCSize(
double csize )
540 if( m_csize != csize )
551 void RemoveMarkers();
553 void SetPosition(
double posx,
double posy,
const a2dAffineMatrix& mat );
555 bool GetPosition(
double& posx,
double& posy );
558 void SetIntPosX(
bool onlyIntPosX ) {m_onlyIntPosX = onlyIntPosX; }
560 void SetIntPosY(
bool onlyIntPosY ) {m_onlyIntPosY = onlyIntPosY; }
562 double ConvertAxis2World(
double percentValue );
564 bool CheckPosition(
double posx );
566 virtual void UpdatePosition(
double minx,
double miny,
const a2dAffineMatrix& mat );
572 DECLARE_EVENT_TABLE()
577 a2dBoundingBox DoGetUnTransformedBbox( a2dBboxFlags flags = a2dCANOBJ_BBOX_NON );
578 void DoUpdateViewDependentTransform(
a2dIterC& ic );
622 a2dCursor* GetCursor()
const {
return m_cursor; }
624 void SetPositionY(
double posY ) { m_positionY = posY;}
635 #if wxART2D_USE_CVGIO
639 #endif //wxART2D_USE_CVGIO
cursor on curve plot as a vertical line with markers
wxPoint2DDouble a2dPoint2D
this to define if coordinate numbers are integer or doubles
virtual bool DoIsHitWorld(a2dIterC &ic, a2dHitEvent &hitEvent)
Does hit test on the object (exclusif child objects)
void OnEnterObject(a2dCanvasObjectMouseEvent &event)
called when the mouse enters the object
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
double m_step
step to move when dragging/moving marker
void OnCanvasObjectMouseEvent(a2dCanvasObjectMouseEvent &event)
default handler for mouse events, sent to the object from the a2dDrawingPart.
class to map references to objects stored in XML, in order to make the connection later on...
void SetTextHeight(double height)
height of text used by format string
virtual void DependencyPending(a2dWalkerIOHandler *handler)
called by to check if this object becomes pending as a result of other objects
double m_l2
length from top of arrow to inside point in X
Defines a font to be set to a2dDrawer2D or stored in a2dCanvsObject etc.
Input and output handler for the XmlSer format.
UpdateMode
Various mode flags for Update.
a2dCurve * GetCurve() const
return curve of the marker
virtual void SetPending(bool pending)
set this object pending for update
OVERLAP
Result of a a2dBoundingBox intersection or hittest.
bool m_prompting
prompting when OnEnterObject
For Showing Marker position of Markers on a Curve.
#define DECLARE_PROPERTIES()
check if class has the given id as a valid id for this object
base class for axis in a2dCanvasXYDisplayGroup
virtual void DoLoad(wxObject *parent, a2dIOHandlerXmlSerIn &parser, a2dXmlSer_flag xmlparts)
load object specific CVG data
a2dCanvasObject is the base class for Canvas Objects.
virtual void DoRender(a2dIterC &ic, OVERLAP clipparent)
render derived object
a2dCurveObject for objects needing to know its parent a2dCurvesArea.
marker for two value in one curve, called a a2dBandCurve.
Io handler to iterate through a a2dDocument.
void SetMarkerUpLow(bool markerUpLow)
marker on upper side of curve if true, else low
a2dText is an abstract base class.
bool DoUpdate(UpdateMode mode, const a2dBoundingBox &childbox, const a2dBoundingBox &clipbox, const a2dBoundingBox &propbox)
Update derived Object specific things ( mainly boundingbox)
bool m_spline
draw splined?
void SetIntPosX(bool onlyIntPosX)
position is rounded to whole number if true
void SetIntPosY(bool onlyIntPosY)
position is rounded to whole number
virtual void DoSave(wxObject *parent, a2dIOHandlerXmlSerOut &out, a2dXmlSer_flag xmlparts, a2dObjectList *towrite)
write object specific CVGL data
void OnLeaveObject(a2dCanvasObjectMouseEvent &event)
called when the mouse leaves the object
Input and output handler for the XmlSer format.
virtual bool DoStartEdit(wxUint16 editmode, wxEditStyle editstyle)
only used for editable objects and under control of a editing tool.
A 2x3 affine matrix class for 2D transformations.
while iterating a a2dCanvasDocument, this holds the context.
virtual void DoAddPending(a2dIterC &ic)
called by addPending
Curve represented by a number of vertexes.
The a2dBoundingBox class stores one a2dBoundingBox of a a2dCanvasObject.
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...
double m_position
the current X where the marker is located
a2dFont m_font
marker font
This template class is for property ids with a known data type.
void SetTextHeight(double height)
CloneOptions
options for cloning
double m_l1
length from top of arrow to outside points in X
structure to give as parameter to member functions of a2dCanvasObject
virtual void DoWalker(wxObject *parent, a2dWalkerIOHandler &handler)
iterate over this object and its children