a2dWirePolylineL Class Reference
[a2dCanvasObject related objects]

a2dWirePolylineL is a polyline that adjusts itself when the objects it connects move More...

#include <wire.h>

Inheritance diagram for a2dWirePolylineL:

Inheritance graph
[legend]
Collaboration diagram for a2dWirePolylineL:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 a2dWirePolylineL (a2dVertexList *points, bool spline=false)
 a2dWirePolylineL (const a2dWirePolylineL &poly, CloneOptions options)
void SetConnectionInfo (bool inverted, a2dPinClass *objBegin, a2dPinClass *objEnd)
a2dPinClassGetStartPinClass () const
void SetStartPinClass (a2dPinClass *startPinClass)
a2dPinClassGetEndPinClass () const
void SetEndPinClass (a2dPinClass *endPinClass)
virtual a2dObjectClone (CloneOptions options) const
 Clone this object and return a pointer to the new object.
void SetRouteOneLine (bool oneLine)
 set true result in having straight lines rerouted between begin and end pin
bool GetRouteOneLine ()
 see SetRouteOneLine()
virtual bool IsConnect () const
 return true, if this object is used to connect other object's using rubberband like structures.
virtual bool NeedsUpdateWhenConnected () const
 used in case of flexible canvas objects (wires).
virtual void DoUpdateImmediate (a2dDoUpdateImmediateData *data)
 See UpdateImediate().
virtual bool AdjustAfterChange (bool final)
virtual void DoLoad (wxObject *parent, a2dIOHandlerXmlSerIn &parser, a2dXmlSer_flag xmlparts)
 load object specific CVG data
virtual void DoSave (wxObject *parent, a2dIOHandlerXmlSerOut &out, a2dXmlSer_flag xmlparts, a2dObjectList *towrite)
 write object specific CVGL data
void SetEndPoint (int iEnd, int iNext, double x, double y, bool final)
 Set position of an end point and possibly one adjacent point.
bool IsDislocated ()
 Check if the begin or end pin of the wire is dislocated.

Static Public Attributes

static a2dPropertyIdBoolPROPID_Reroute = NULL
 A property in which is stored if the wire is to be rerouted.
static a2dPropertyIdBoolPROPID_Rerouteadded = NULL
 A property in which is stored if the wire is added to the routers occupation array.

Protected Member Functions

virtual void EditFeedback (a2dIterC &ic, const a2dFeedbackId *id, a2dCanvasObject *currentEdit=0, int depth=INT_MAX, a2dCanvasObjectFlagsMask flags=0, double x=0, double y=0)
 tool editing feedback
virtual bool GeneratePins (a2dPinClass *toConnectTo, a2dConnectTask task, double x, double y)

Protected Attributes

bool m_wasVertical
 This is used temporarily during editing and need not be saved.
bool m_inverted
 The wire is inverted (drawn from end to begin).
a2dPinClassm_objBegin
 The pin class in the pin of the object at the start of the wire.
a2dPinClassm_objEnd
 The pin class in the pin of the object at the end of the wire.
a2dPinClassm_wireBegin
 The pin class in the pin of the wire at the start of the wire.
a2dPinClassm_wireEnd
 The pin class in the pin of the wire at the end of the wire.
bool m_oneLine


Detailed Description

a2dWirePolylineL is a polyline that adjusts itself when the objects it connects move

This is done by taking the position of the pins of the connected a2dCanvasObject's, and based on that recalculate the position of the polyline points

See also:
a2dWires

Definition at line 406 of file wire.h.


Member Function Documentation

void a2dWirePolylineL::SetConnectionInfo ( bool  inverted,
a2dPinClass objBegin,
a2dPinClass objEnd 
)

Parameters:
inverted  The wire is inverted (drawn from end to begin)
objBegin  The required pin class in the pin of the object at the start of the wire
objEnd  The required pin class in the pin of the object at the end of the wire

Definition at line 1296 of file wire.cpp.

bool a2dWirePolylineL::NeedsUpdateWhenConnected (  )  const [virtual]

used in case of flexible canvas objects (wires).

If another object connected to this object changes, and that has an effect on this object, return true;

Reimplemented from a2dCanvasObject.

Definition at line 1312 of file wire.cpp.

bool a2dWirePolylineL::AdjustAfterChange ( bool  final  )  [virtual]

a tool designed for editing a a2dPolylineL, can in principle be used for a a2dWirePolylineL, if it makes sure that the pins on it, are synchronized with the segments which change because of the editing. Therefore in a2dPolylineL, at the right points AdjustAfterChange is called to achieve this.

Reimplemented from a2dPolygonL.

Definition at line 1743 of file wire.cpp.

void a2dWirePolylineL::DoLoad ( wxObject *  parent,
a2dIOHandlerXmlSerIn parser,
a2dXmlSer_flag  xmlparts 
) [virtual]

load object specific CVG data

todo ignore until this down here is fully converted.

Reimplemented from a2dPolylineL.

Definition at line 1813 of file wire.cpp.

void a2dWirePolylineL::EditFeedback ( a2dIterC ic,
const a2dFeedbackId id,
a2dCanvasObject currentEdit = 0,
int  depth = INT_MAX,
a2dCanvasObjectFlagsMask  flags = 0,
double  x = 0,
double  y = 0 
) [protected, virtual]

tool editing feedback

Parameters:
ic iteration context
id the id for the editing situation.
currentEdit the currently edited object or another hint object
depth recursion depth (0=this object, 1=this object+childs, ...)
flags objects with this flag set ignore the depth limit
x x world coordinate of mouse
y y world coordinate of mouse

Reimplemented from a2dCanvasObject.

Definition at line 1889 of file wire.cpp.

bool a2dWirePolylineL::GeneratePins ( a2dPinClass toConnectTo,
a2dConnectTask  task,
double  x,
double  y 
) [protected, virtual]

pins on the begin and end of the wire are created, and after that point along the line if possible at position x,y

Reimplemented from a2dPolylineL.

Definition at line 1894 of file wire.cpp.


The documentation for this class was generated from the following files:
a2dWirePolylineL Class Reference -- Tue Aug 31 18:38:41 2010 -- 31 Aug 2010 -- 1.5.5 -- wxArt2D -- . -- Main Page Reference Documentation