#include <curvegroup.h>


Public Member Functions | |
| a2dCurvesArea (const wxString curvesAreaName=wxT("")) | |
| constructor | |
| a2dCurvesArea (const a2dCurvesArea &other, CloneOptions options) | |
| constructor for cloning | |
| virtual a2dObject * | Clone (CloneOptions options) const |
| clone this | |
| wxString | GetAxisText () const |
| get text to display for axis label | |
| bool | SetAxisText (const wxString &name) |
| set text to display for axis label | |
| void | SetBoundaries (const a2dBoundingBox &extbox) |
| size of object in world coordinates, as displayed in the drawing. | |
| bool | IsRecursive () |
| returns if this object does have nested objects | |
| void | UpdateInternalBoundaries (const a2dBoundingBox &extbox) |
| update conversion matrix to/from curve to world coordinates | |
| void | SetInternalBoundaries (const a2dBoundingBox &extbox, const a2dBoundingBox &intbox) |
| set the internal curve boundaries, and update conversion to world matrix | |
| void | SetInternalBoundaries (const a2dBoundingBox &extbox, double ximin, double yimin, double ximax, double yimax) |
| set the internal curve boundaries, and update conversion to world matrix | |
| const a2dBoundingBox & | GetInternalBoundaries () const |
| get the plotting rectangle in curve coordinates | |
| const a2dAffineMatrix & | GetCurveAreaTransform () |
| void | AddCurve (a2dCurve *curve, const wxString curvename=_T("")) |
| add a curve to the end of the exisiting curves. | |
| void | AddMarker (a2dMarker *marker) |
| add a marker | |
| void | RemoveMarker (a2dMarker *marker) |
| remove a marker | |
| void | InsertCurve (size_t before, a2dCurve *curve, const wxString curvename=_T("")) |
| add a curve to the end of the existing curves. | |
| a2dCurve * | GetCurve (const wxString curvename) |
| return curve named curvename, if not available returns NULL | |
| const a2dCanvasObjectList * | GetCurves () const |
| returns the list where the curves are stored in. | |
| a2dCanvasObjectList * | GetCurves () |
| returns the list where the curves are stored in. | |
| void | World2Curve (double xw, double yw, double &xcurve, double &ycurve) |
| used by a2dCurve to transform its own curve coordinates to the curve plotting area | |
| void | Curve2World (double xcurve, double ycurve, double &xw, double &yw) |
| used by a2dCurve to transform its own curve coordinates to the curve plotting area | |
| a2dBoundingBox | GetCurvesBoundaries () |
| get the boundingbox in internal curve coordinates of all the curves | |
| a2dCurveAxis * | GetAxisY () |
| get Y axis of this curve area | |
| void | SetAxisY (a2dCurveAxis *axisY) |
| set Y axis of this curve area | |
| void | SetShowYaxis (bool showyaxis) |
| set show yaxis | |
| bool | GetShowYaxis (void) |
| get show yaxis | |
| void | SetAxes (const a2dBoundingBox &extbox, double x, double y, double &zerox, double &zeroy, double &ixmin, double &ixmax) |
| sets m_axisY values | |
| bool | IsCurvesHighlighted () const |
| if a curve in this area is set, true returned | |
| void | SetMarkerShow (a2dMarkerShow *showm) |
| void | SetMarkerShow2 (a2dMarkerShow *showm) |
| a2dMarkerShow * | GetMarkerShow (void) const |
| a2dMarkerShow * | GetMarkerShow2 (void) const |
| void | SetColor (const wxColour &color) |
| set color of axis text | |
| const wxColour & | GetColor () const |
| get color of axis text | |
| a2dMarker * | GetCursorMarker () const |
| search a marker ( placed to show a position on a curve ) | |
| a2dCanvasXYDisplayGroupAreas * | GetGroup (void) |
| the group of which the area is a part | |
| void | SetGroup (a2dCanvasXYDisplayGroupAreas *aGroup) |
| the group of which the area is a part | |
| a2dBoundingBox & | Expand (a2dBoundingBox &bbox) |
| void | DoAddPending (a2dIterC &ic) |
| called by addPending | |
| bool | ProcessCanvasObjectEvent (a2dIterC &ic, a2dHitEvent &hitEvent) |
| Hit objects will receive the event. | |
| void | DoWalker (wxObject *parent, a2dWalkerIOHandler &handler) |
| iterate over this object and its children | |
| a2dCanvasObject * | IsHitCurvesWorld (a2dIterC &ic, a2dHitEvent &hitEvent) |
| void | DependencyPending (a2dWalkerIOHandler *handler) |
| called by to check if this object becomes pending as a result of other objects | |
| bool | Update (UpdateMode mode) |
| Update the state of the object according to its current position etc. | |
Static Public Attributes | |
| static a2dPropertyIdCanvasObject * | PROPID_curvesarea = NULL |
| static a2dPropertyIdString * | PROPID_text = NULL |
Protected Member Functions | |
| void | DoUpdateViewDependentObjects (a2dIterC &ic) |
| update derived objects | |
| bool | DoUpdate (UpdateMode mode, const a2dBoundingBox &childbox, const a2dBoundingBox &clipbox, const a2dBoundingBox &propbox) |
| Update derived Object specific things ( mainly boundingbox). | |
| virtual void | DoSave (wxObject *parent, a2dIOHandlerXmlSerOut &out, a2dXmlSer_flag xmlparts, a2dObjectList *towrite) |
| Save settings. | |
| virtual void | DoLoad (wxObject *parent, a2dIOHandlerXmlSerIn &parser, a2dXmlSer_flag xmlparts) |
| Load settings. | |
Protected Attributes | |
| bool | m_showyaxis |
| if true show the Y axis object | |
| a2dSmrtPtr< a2dCurveAxis > | m_axisY |
| y axis object | |
| a2dBoundingBox | m_intrect |
| a2dAffineMatrix | m_iworld |
| internal coordinates used for curve plotting expressed as matrix | |
| a2dSmrtPtr< a2dMarkerShow > | m_markerShow |
| a2dSmrtPtr< a2dMarkerShow > | m_markerShow2 |
| wxColour | m_colour |
| color of axis text | |
| a2dCanvasXYDisplayGroupAreas * | m_group |
| the group of which the area is a part | |
Friends | |
| class | a2dCurvesAreaList |
A curve area is a rectangular area in curve coordinates that is displayed in e.g. a a2dCanvasXYDisplayGroups. The curve is defined in curve coordinates, and a curve area holds several curves. The range of curve coordinates in X and Y is choosen here.
Definition at line 52 of file curvegroup.h.
| a2dCurvesArea::a2dCurvesArea | ( | const wxString | curvesAreaName = wxT("") |
) |
constructor
Construct a curve area, used to place a2dCurve objects.
| curvesAreaName | name of the curve arae |
Definition at line 86 of file curvegroup.cpp.
| bool a2dCurvesArea::IsRecursive | ( | ) | [inline, virtual] |
returns if this object does have nested objects
If the object has children it is nested, but if not it can still have nested objects. This is when a derived a2dCanvasObject does have a2dCanvasObject's members itself. This function should return true if an object does have nested children or members.
Reimplemented from a2dCanvasObject.
Definition at line 83 of file curvegroup.h.
| const a2dAffineMatrix& a2dCurvesArea::GetCurveAreaTransform | ( | ) | [inline] |
get the plotting matrix in curve coordinates as matrix. The matrix is used to plot curve in m_intrect
Definition at line 110 of file curvegroup.h.
| const a2dCanvasObjectList* a2dCurvesArea::GetCurves | ( | ) | const [inline] |
returns the list where the curves are stored in.
Can be used to iterate over the curves, and/or add curves etc.
Definition at line 146 of file curvegroup.h.
| a2dCanvasObjectList* a2dCurvesArea::GetCurves | ( | ) | [inline] |
returns the list where the curves are stored in.
Can be used to iterate over the curves, and/or add curves etc.
Definition at line 153 of file curvegroup.h.
| a2dMarker * a2dCurvesArea::GetCursorMarker | ( | ) | const |
search a marker ( placed to show a position on a curve )
A a2dMarker is added as a child object on a a2dCurveArea.
Definition at line 445 of file curvegroup.cpp.
| bool a2dCurvesArea::ProcessCanvasObjectEvent | ( | a2dIterC & | ic, | |
| a2dHitEvent & | hitEvent | |||
| ) | [virtual] |
Hit objects will receive the event.
The event is first sent to the child objects, and if not processes there, testing for a hit on the object itself is done, and if true a2dEvtHandler::ProcessEvent is called. The function goes through the whole hierarchy, even if event is already processed. It maybe be that other events are generated while iterating over the document.
| ic | iteration context | |
| hitEvent | stores hit information |
Reimplemented from a2dCanvasObject.
Definition at line 261 of file curvegroup.cpp.
| void a2dCurvesArea::DoWalker | ( | wxObject * | parent, | |
| a2dWalkerIOHandler & | handler | |||
| ) | [virtual] |
iterate over this object and its children
This function allows you to extend the functionality of all a2dCanvasObject classes in a a2dCanvasDocument, without adding extra members to these objects.
Default functions are called on the a2dWalkerIOHandler, which redirect the calls to other functions based on this object its classname. On can register classes to a2dWalkerIOHandler or derived classes. This way for each unique object in the document there can be a function in a2dWalkerIOHandler.
Reimplemented from a2dCanvasObject.
Definition at line 268 of file curvegroup.cpp.
| void a2dCurvesArea::DependencyPending | ( | a2dWalkerIOHandler * | handler | ) | [virtual] |
called by to check if this object becomes pending as a result of other objects
You can Override DependencyPending() to set your object pending, when another object was set pending.
Reimplemented from a2dCanvasObject.
Definition at line 297 of file curvegroup.cpp.
| bool a2dCurvesArea::Update | ( | UpdateMode | mode | ) | [virtual] |
Update the state of the object according to its current position etc.
This usually does the following:
This function is usually called in a2dCanvasDocument::AddPendingUpdatesOldNew between adding the old and the new bounding box to the pending area. You should NOT do any change here that issues commands to the command processor, because such commands wouldn't have a proper context. Such things should be done in UpdateImmediate. Other things like updating the cache data need to be done here.
Takes into account associated child, properties and derived objects. If a2dCanvasObject::UpdateMode = updatemask_force all boundingboxes are invalidated and recalculated, else it only recalculates if invalid or one of the children is invalid.
This function calls DoUpdate(), when needed. The idea is to minimize the number of recalculated boudingboxes. So if an object is setpending or a child became pending, the boudingbox needs to be recalculated, but since this is a combination of property, child and derived object boundingboxes, this is optimized.
if overridden in derived class, also call baseclass Update
in derived classes DoUpdate() should be implemented to at least calculate the boundingbox of the object without children in m_childobjects, but including any referenced objects in the derived objects. Like arrow point objects on a line or polyline.
Reimplemented from a2dPolygonLClipper.
Definition at line 344 of file curvegroup.cpp.
| bool a2dCurvesArea::DoUpdate | ( | UpdateMode | mode, | |
| const a2dBoundingBox & | childbox, | |||
| const a2dBoundingBox & | clipbox, | |||
| const a2dBoundingBox & | propbox | |||
| ) | [protected, virtual] |
Update derived Object specific things ( mainly boundingbox).
Calculates the boundingbox of the object (exclusif base class child objects but with other nested objects).
| mode | way to update the objects | |
| childbox | size of children boundingbox | |
| clipbox | clip to this | |
| propbox | size of properties boundingbox |
force may or may not have direct influence on the object itself, if this function is called directly for some reason (e.g from derived objects), you must invalidate the boudingbox yourself. GetDrawerBox()->SetValid( false );
Reimplemented from a2dPolygonL.
Definition at line 370 of file curvegroup.cpp.