wxArt2D
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Static Protected Attributes | List of all members
a2dPin Class Reference

a2dPin is used in a2dCanvasObject to add pins to it. More...

#include <canpin.h>

Inheritance diagram for a2dPin:
Inheritance graph
[legend]
Collaboration diagram for a2dPin:
Collaboration graph
[legend]

Public Types

enum  a2dPinFlags {
  NON = 0x0, dynamic = 0x0001, temporary = 0x0002, objectPin = 0x0004,
  internal = 0x0008, temporaryObjectPin = temporary | objectPin, ALLSET = 0xFFFFFFFF
}
 
typedef wxUint16 a2dPinFlagsMask
 
- Public Types inherited from a2dCanvasObject
enum  a2dBboxFlag { a2dCANOBJ_BBOX_NON = 0x0000, a2dCANOBJ_BBOX_EDIT = 0x0001, a2dCANOBJ_BBOX_CHILDREN = 0x0002 }
 flags for calculating boundingbox of derived object More...
 
typedef unsigned int a2dBboxFlags
 
enum  UpdateMode {
  update_save = 0x0001, update_includebboxprop = 0x0002, updatemask_countObjects = 0x0004, updatemask_save_includebboxprop,
  updatemask_force, updatemask_normal, updatemask_force_and_count
}
 Various mode flags for Update. More...
 
- Public Types inherited from a2dObject
enum  CloneOptions {
  clone_members = 0x00000001, clone_properties = 0x00000002, clone_childs = 0x00000004, clone_unused = 0x00000008,
  clone_setoriginal = 0x00000010, clone_seteditcopy = 0x00000020, clone_noReference = 0x00000040, clone_noCameleonRef = 0x00000080,
  clone_toDrag = 0x00000100, clone_flat = 0x00000000, clone_deep = clone_members | clone_properties | clone_childs
}
 options for cloning More...
 
typedef a2dAutoZeroPtr< a2dObjectTAutoZeroPtrListClass
 this is needed inside the smart pointer template code
 

Public Member Functions

 a2dPin ()
 constructor
 
 a2dPin (a2dCanvasObject *parent, const wxString &name, a2dPinClass *pinclass, double xc, double yc, double angle=0, double w=0, double h=0, double radius=0)
 constructor
 
 a2dPin (const a2dPin &other, CloneOptions options, a2dRefMap *refs)
 copy constructor
 
 ~a2dPin ()
 destructor
 
void SetRenderConnected (bool RenderConnected)
 flag to render connected pin More...
 
bool GetRenderConnected ()
 
virtual void SetPending (bool pending)
 set this object pending for update More...
 
virtual void SetParent (a2dCanvasObject *parent)
 set parent object of the pin
 
a2dCanvasObjectGetParent () const
 get parent object of the pin
 
double GetWidth () const
 return width
 
double GetHeight () const
 return height
 
double GetRadius () const
 return radius
 
void SetMode (int mode)
 default used to modify rendering
 
int GetMode () const
 get current mode
 
wxString GetName () const
 get the name given to the pin.
 
void SetName (const wxString &name)
 set the name of the pin (must be unique)
 
void Set (double xc, double yc, double angle=0, const wxString &name=wxT(""), bool dynamic=false)
 set postion angle and name of the pin More...
 
a2dPoint2D GetAbsXY () const
 get absolute position of the pin ( after applying the parent's matrix and its own matrix )
 
double GetAbsX () const
 get absolute X position of the pin ( after applying the parent's matrix and its own matrix )
 
double GetAbsY () const
 get absolute Y position of the pin ( after applying the parent's matrix and its own matrix )
 
void SetAbsXY (double x, double y)
 set the absolute X,Y position of the pin ( after applying the parent's matrix and its own matrix )
 
void SetAbsXY (const a2dPoint2D &point)
 set the absolute X,Y position of the pin ( after applying the parent's matrix and its own matrix )
 
double GetAbsAngle () const
 get absolute angle of the pin ( after applying the parent its matrix and it own matrix )
 
a2dPinClassGetPinClass () const
 return the pin class of this pin
 
void SetPinClass (a2dPinClass *pinClass)
 Set the pin class.
 
virtual bool MayConnectTo (a2dPin *connectto)
 Is given pin allowed to connect to this pin. More...
 
bool Disconnect (a2dPin *pin=a2dAnyPin, bool forceErase=false)
 
void ConnectTo (a2dPin *connectto)
 connect this pin to the given pin
 
a2dPinIsConnectedTo (a2dPin *pin=a2dAnyPin) const
 Return the pin to which this pin is connected. More...
 
a2dPinFindNonWirePin (a2dCanvasObjectFlagsMask mask=a2dCanvasOFlags::ALL)
 
a2dPinFindWirePin (a2dCanvasObjectFlagsMask mask=a2dCanvasOFlags::ALL)
 
a2dPinFindConnectablePin (a2dCanvasObject *root, double margin, bool autocreate)
 Find a connectable pin. More...
 
void AutoConnect (a2dCanvasObject *root, double margin)
 Try to connect this pin to another pin at the same location.
 
a2dPinIsDislocated () const
 
bool IsSameLocation (a2dPin *other, double margin=0) const
 Check if this pin is at same location.
 
bool IsDynamicPin () const
 return true if this pin is a dynamic pin More...
 
void SetDynamicPin (bool dynamicPin)
 set when pin is a dynamic pin
 
bool IsTemporaryPin () const
 return true if this pin is a temporary pin More...
 
void SetTemporaryPin (bool temporaryPin)
 
void SetInternal (bool internal)
 set when pin is within the border of its parent More...
 
bool IsInternal () const
 see SetInternal()
 
void SetObjectPin (bool objectPin)
 set when pin is an object pin
 
bool IsObjectPin () const
 return true if the pin is on object instead of wire/connects
 
a2dPinFlagsMask GetPinFlags () const
 
void SetPinFlags (a2dPinFlagsMask which, bool value)
 
void SetPinFlags (a2dPinFlagsMask which)
 
a2dlist< a2dDumbPtr< a2dPin > > & GetConnectedPins ()
 Return list fo connected pins.
 
wxUint32 GetConnectedPinsNr () const
 Get the number of connected pins.
 
void CleanUpNonConnected ()
 
void DuplicateConnectedToOtherPins (bool undo=false)
 all connections to this pins, will become available in those connected pins too.
 
void DuplicateConnectedPins (a2dPin *other, bool undo=false)
 pins connected to given other pin, will become part of this pin.
 
void RemoveDuplicateConnectedPins (a2dPin *other)
 pins connected to given other pin, will be removed on this pin.
 
virtual bool IsTemporary_DontSave () const
 Check if this is a temporary object, which should not be saved.
 
virtual bool AlwaysWriteSerializationId () const
 If true, always write an id. More...
 
virtual bool LinkReference (a2dObject *other)
 link a reference in the object to the given value More...
 
- Public Member Functions inherited from a2dCanvasObject
virtual a2dCanvasObjectListGetAsCanvasVpaths (bool transform=true) const
 when implemented the object without its children, is converted to More...
 
virtual a2dCanvasObjectListGetAsPolygons (bool transform=true) const
 convert to a list of polygons. More...
 
virtual a2dCanvasObjectListGetAsPolylines (bool transform=true) const
 convert to a list of polylines. More...
 
virtual a2dVertexListGetAsVertexList (bool &returnIsPolygon) const
 convert to a polygon. More...
 
void SetTemplate (bool b=true)
 
void SetExternal (bool b=true)
 
void SetUsed (bool b=true)
 
bool GetTemplate () const
 
bool GetExternal () const
 
bool GetUsed () const
 
virtual bool DoStartEdit (wxUint16 editmode, wxEditStyle editstyle)
 only used for editable objects and under control of a editing tool. More...
 
void Rotate (double rotation)
 Rotates this object clockwise. More...
 
void SetRotation (double rotation)
 Sets a rotation of this object. More...
 
void Scale (double scalex, double scaley)
 Scale in x and y ( > zero) More...
 
void Mirror (bool x=true, bool y=false)
 Mirrors this object in x or y orientation. More...
 
void SkewX (double angle)
 Skew in X. More...
 
void SkewY (double angle)
 Skew in Y. More...
 
const a2dAffineMatrixGetTransformMatrix () const
 get the matrix used to position the object
 
a2dAffineMatrix GetTransform () const
 
void SetTransform (a2dAffineMatrix mat=a2dIDENTITY_MATRIX)
 
void SetTransformMatrix (const a2dAffineMatrix &mat=a2dIDENTITY_MATRIX)
 Returns the matrix used to position the object. More...
 
void SetTransformMatrix (double xt, double yt, double scalex=1, double scaley=1, double degrees=0)
 Sets the matrix used to position the object. More...
 
double GetPosX () const
 get x position from affine matrix
 
double GetPosY () const
 get y position from affine matrix
 
a2dPoint2D GetPosXY () const
 get position of object
 
void SetPosXY (double x, double y, bool restrict=false)
 set position to x,y More...
 
void SetPosXyPoint (const a2dPoint2D &pos)
 set position to x,y More...
 
bool SetPosXYRestrict (double &x, double &y)
 set position to x,y but restricted, returns new values More...
 
void Translate (double x, double y)
 relative translate the object to position x,y in world coordinates More...
 
void Transform (const a2dAffineMatrix &tworld)
 transform the object using the given matrix More...
 
virtual bool EliminateMatrix ()
 reduce matrix to identity More...
 
virtual bool RestrictToObject (a2dIterC &ic, const a2dPoint2D &pointToSnapTo, a2dPoint2D &bestPointSofar, a2dSnapToWhatMask snapToWhat, double thresHoldWorld)
 called from an a2dRestrictionEngine, to restrict vertexes, lines, object to this object. More...
 
virtual a2dCanvasObjectListGetSnapVpath (a2dSnapToWhatMask snapToWhat)
 return a vectorpath indicating on which point/segments the object likes to be snapped. More...
 
virtual a2dVertexArrayGetAlignmentPoints ()
 Return a list of points to align object with others. More...
 
a2dBoundingBox GetAlignmentBbox ()
 calls GetAlignmentPoints()
 
a2dDrawingGetRoot () const
 get a2dCanvasDocument of the object. More...
 
void SetRoot (a2dDrawing *root, bool recurse=true)
 Sets this object to a a2dCanvasDocument. More...
 
void Prepend (a2dCanvasObject *obj)
 prepend a a2dCanvasObject to the childobjects
 
void Append (a2dCanvasObject *obj)
 append a a2dCanvasObject to the childobjects
 
void Insert (size_t before, a2dCanvasObject *obj, bool ignoreReleased=true)
 insert a a2dCanvasObject to the childobjects
 
a2dCanvasObjectListGetChildObjectList ()
 get the list where the child objects are stored in. More...
 
const a2dCanvasObjectListGetChildObjectList () const
 
a2dCanvasObjectListCreateChildObjectList ()
 create and get the list where the child objects are stored in. More...
 
unsigned int GetChildObjectsCount () const
 get number of child objects More...
 
a2dCanvasObjectCreateHierarchy (a2dCanvasObjectFlagsMask mask, bool createref=true)
 object with the same given mask are made into a group. More...
 
virtual void RemoveHierarchy ()
 move childs of childs and members which have hierarchy one level up to this object its child list. More...
 
int ReleaseChild (a2dCanvasObject *obj, bool backwards=false, bool all=false, bool now=false, bool undoCommands=false)
 remove the given object from the childobjects More...
 
bool ReleaseChildObjects (a2dCanvasObjectFlagsMask mask=a2dCanvasOFlags::ALL)
 removes and release only from the childobjects the objects with the given mask More...
 
int IndexOf (a2dCanvasObject *obj) const
 returns index of the given a2dCanvasObject in this childobjects
 
a2dCanvasObjectFind (const wxString &objectname, const wxString &classname=wxT(""), a2dCanvasObjectFlagsMask mask=a2dCanvasOFlags::ALL, const a2dPropertyId *propid=NULL, const wxString &valueAsString=wxT(""), wxUint32 id=0) const
 return the object which fits the filter. More...
 
a2dCanvasObjectFind (a2dCanvasObject *obj) const
 return the child object if it is part of this object More...
 
bool SwitchChildNamed (const wxString &objectname, a2dCanvasObject *newobject)
 the object with the given name is released and switched in place to newobject More...
 
int CollectObjects (a2dCanvasObjectList *total, const wxString &classname=wxT(""), a2dCanvasObjectFlagsMask mask=a2dCanvasOFlags::ALL, const a2dPropertyId *id=0, const a2dBoundingBox &bbox=wxNonValidBbox) const
 Copy objects with the right conditions to the total list. More...
 
void SetEditable (bool editable)
 Sets if this object may be edited. More...
 
bool GetEditable () const
 get if the object may be edited
 
void SetFixedStyle (bool fixedStyle)
 Set object to fixed style ot not.
 
bool GetFixedStyle () const
 Get object fixed style setting.
 
bool IsEditable () const
 get if the object may be edited More...
 
bool GetSelected () const
 is the object selected flag set More...
 
bool IsSelected () const
 Is the object selected flag set. More...
 
void SetSelected (bool selected)
 Set the object selected flag if allowed. More...
 
bool GetSelected2 () const
 is the object selected2 flag set More...
 
void SetSelected2 (bool selected)
 Set the object selected2 flag if allowed. More...
 
bool GetSelectable () const
 is the object selectable flag set More...
 
bool IsSelectable () const
 Is the object selectable flag set. More...
 
void SetSelectable (bool selectable)
 Allows to select this object. More...
 
void SetDraggable (bool draggable)
 Sets if this object may be dragged. More...
 
bool GetDraggable () const
 get if the object can be dragged
 
bool IsDraggable () const
 get if the object can be dragged More...
 
bool GetSnap () const
 is snap flag set?
 
void SetSnap (bool snap)
 Sets snap flag. More...
 
void SetSnapTo (bool snap)
 Sets snap_to flag. More...
 
bool GetSnapTo () const
 is snap_to flag set?
 
virtual a2dCanvasObjectStartEdit (a2dBaseTool *tool, wxUint16 editmode, wxEditStyle editstyle=wxEDITSTYLE_COPY, a2dRefMap *refs=NULL)
 create an editcopy and initialize editing of the editcopy More...
 
virtual void EndEdit ()
 cleanup an editcopy object More...
 
void ReStartEdit (wxUint16 editmode)
 to restart editing in a different mode
 
a2dCanvasObjectGetOriginal ()
 if this is an editcopy, return the orginal else NULL
 
a2dHandleSetHandlePos (wxString name, double x, double y)
 set a2dHandle position with the given name
 
void CaptureMouse (a2dIterC &ic)
 redirect all mouse events for the canvas to this object
 
void ReleaseMouse (a2dIterC &ic)
 release the mouse capture for this object
 
bool IsCapturedMouse (a2dIterC &ic) const
 is the mouse captured for this object
 
bool GetHasSelectedObjectsBelow () const
 selected object itself or one of its recursive children
 
void SetHasSelectedObjectsBelow (bool value)
 selected object itself or one of its recursive children
 
bool GetHasToolObjectsBelow () const
 tool object itself or one of its recursive children
 
void SetHasToolObjectsBelow (bool value)
 selected object itself or one of its recursive children
 
wxUint16 GetLayer () const
 Returns the layer index where this object is drawn upon. More...
 
virtual void SetLayer (wxUint16 layer)
 set layer index where this object is drawn upon. More...
 
 a2dCanvasObject (double x=0, double y=0)
 constructor called by derived objects
 
 a2dCanvasObject (const a2dCanvasObject &other, CloneOptions options, a2dRefMap *refs)
 constructor using reference to existing canvas object
 
a2dCanvasObjectTClone (CloneOptions options, a2dRefMap *refs=NULL)
 
virtual ~a2dCanvasObject ()
 destructor called by derived objects
 
a2dHabitatGetHabitat () const
 
virtual void Initialize ()
 
virtual bool IsRecursive ()
 returns if this object does have nested objects More...
 
virtual void MakeReferencesUnique ()
 All direct a2dCanvasObject which are part of this one are made unique. More...
 
double GetBboxMinX ()
 get minimum X of the boundingbox in world coordinates relative to its parents More...
 
double GetBboxMinY ()
 get minimum Y of the boundingbox in world coordinates relative to its parents More...
 
double GetBboxMaxX ()
 get maximum X of the boundingbox in world coordinates relative to its parents More...
 
double GetBboxMaxY ()
 get maximum Y of the boundingbox in world coordinates relative to its parents More...
 
double GetBboxWidth ()
 get width of the boundingbox in world coordinates relative to its parents More...
 
double GetBboxHeight ()
 get height of the boundingbox in world coordinates relative to its parents More...
 
a2dBoundingBoxGetBbox ()
 get boundingbox in world coordinates exclusive stroke width relative to its parent More...
 
virtual a2dBoundingBox GetUnTransformedBbox (a2dBboxFlags flags=a2dCANOBJ_BBOX_CHILDREN) const
 Get boundingbox without the affine matrix transform included. More...
 
a2dBoundingBox GetCalculatedBoundingBox (int nChildLevels)
 Like GetBbox, but it always calculcates the bounding box from scratch. More...
 
a2dBoundingBox GetMappedBbox (a2dIterC &ic, bool withExtend=true)
 first translate boundingbox with cworld and recalculate at new position More...
 
a2dBoundingBox GetMappedBbox (const a2dAffineMatrix &cworld)
 first translate boundingbox with cworld and recalculate at new position More...
 
wxRect GetAbsoluteArea (a2dIterC &ic, int inflate=2)
 Get absolute occupied area in the device coordinates. More...
 
float GetWorldExtend () const
 get world extend More...
 
int GetPixelExtend () const
 get pixel extend More...
 
OVERLAP GetClipStatus (a2dIterC &ic, OVERLAP clipparent)
 used for deciding if the object needs to be rendered against the current clipping area of the active drawer. More...
 
a2dBoundingBox GetClipBox (a2dIterC &ic)
 returns boundingbox clipping object if clipping property is set More...
 
a2dCanvasObjectChildIsHitWorld (a2dIterC &ic, a2dHitEvent &hitEvent, bool filterSelectableLayers=false)
 Do hittest on children. More...
 
a2dCanvasObjectIsHitWorld (a2dIterC &ic, a2dHitEvent &hitEvent)
 If the position (x,y) is within the object return this. More...
 
void SetHitFlags (a2dCanvasObjectHitFlags mask)
 set hit flags More...
 
a2dCanvasObjectFlagsMask GetHitFlags () const
 return hitflags as mask
 
virtual bool ProcessCanvasObjectEvent (a2dIterC &ic, a2dHitEvent &hitEvent)
 Hit objects will receive the event. More...
 
void OnCanvasObjectMouseEvent (a2dCanvasObjectMouseEvent &event)
 default handler for mouse events, sent to the object from the a2dDrawingPart. More...
 
void OnChar (wxKeyEvent &event)
 default handler for character events
 
void OnPopUpEvent (a2dCanvasObjectMouseEvent &event)
 called on Right Down by default.
 
void OnEnterObject (a2dCanvasObjectMouseEvent &event)
 called when the mouse enters the object
 
void OnLeaveObject (a2dCanvasObjectMouseEvent &event)
 called when the mouse leaves the object
 
void LeaveInObjects (a2dIterC &ic, a2dHitEvent &hitEvent)
 
void OnHandleEvent (a2dHandleMouseEvent &event)
 called if a mouse event occured on a child object, that is a handle
 
bool RemoveReleased ()
 child objects which have relesed flag set, are removed as child, called recursive on rleased child objects.
 
virtual bool Update (UpdateMode mode)
 Update the state of the object according to its current position etc. More...
 
bool GetPending () const
 is this object pending for update? More...
 
void AddPending (a2dIterC &ic)
 search objects ( if nested recursive ) that have the pending flag Set More...
 
virtual void DependencyPending (a2dWalkerIOHandler *handler)
 called by to check if this object becomes pending as a result of other objects More...
 
virtual void DependentCommands (a2dCanvasObject *parent, a2dCommand *command)
 call this when a a2dCommands should result in extra commands, to become part of a parent a2dCommandGroup. More...
 
virtual void Render (a2dIterC &ic, OVERLAP clipparent)
 Render this object to the active a2dDrawingPart. More...
 
void UpdateViewDependentObjects (a2dIterC &ic)
 update the transform matrix for objects with property 'PROPID_viewDependent' More...
 
void SetVisible (bool visible)
 set if this object will visible (be rendered or not) More...
 
bool GetVisible () const
 get visibility (rendering depends on layer settings also)
 
bool IsVisible () const
 get visibility (rendering depends on layer settings also) More...
 
void SetFill (const a2dFill &fill)
 Set a fill for the object which will be used instead of the layer fill. More...
 
a2dFill GetFill () const
 
void SetFill (const wxColour &fillcolor, a2dFillStyle style=a2dFILL_SOLID)
 Set a fill color for the object which will be used instead of the layer fill. More...
 
void SetFill (const wxColour &fillcolor, const wxColour &fillcolor2, a2dFillStyle style=a2dFILL_SOLID)
 Set a fill color for the object which will be used instead of the layer fill. More...
 
void SetFillColour (const wxColour &colour)
 set first colour of fill
 
wxColour GetFillColour () const
 get first colour of fill
 
void SetStroke (const wxColour &strokecolor, double width=0, a2dStrokeStyle style=a2dSTROKE_SOLID)
 Set a stroke for the object which will be used instead of the layer stroke. More...
 
void SetStroke (const wxColour &strokecolor, int width, a2dStrokeStyle style=a2dSTROKE_SOLID)
 Set a stroke for the object which will be used instead of the layer stroke. More...
 
void SetStroke (const a2dStroke &stroke)
 Set stroke using pointer to a stroke. More...
 
a2dStroke GetStroke () const
 
void SetStrokeColour (const wxColour &colour)
 set first colour of stroke
 
wxColour GetStrokeColour () const
 get first colour of stroke
 
virtual void SetContourWidth (double width)
 set the Contour width of the shape More...
 
virtual double GetContourWidth () const
 get the Contour width of the shape
 
void SetDrawerStyle (a2dIterC &ic, a2dStyleProperty *style)
 sets fill and stroke of object to a2dDrawingPart More...
 
void SetChildrenOnSameLayer (bool samelayer)
 if set children are rendered on the same layer as this object. More...
 
bool GetChildrenOnSameLayer () const
 are children rendered on the same layer as this object?
 
void SetViewDependent (a2dDrawingPart *aView, bool viewdependent, bool viewspecific=false, bool onlyinternalarea=false, bool deep=false)
 set the object view dependent and maybe process all children to set these flags More...
 
void SetChildOnlyTranslate (bool onlytranslate)
 How a child is placed towards its parent object. More...
 
bool GetChildOnlyTranslate () const
 are children rendered using just the translation of the parent or also rotation and scale.
 
void SetPreRenderAsChild (bool prerender)
 If set, this object has a higher priority in rendering than other children objects. More...
 
bool GetPreRenderAsChild () const
 Returns if this object should be rendered before other children objects.
 
bool GetFilled () const
 
void SetFilled (bool filled)
 set the filled flag to render only outlines More...
 
bool GetShowShadow () const
 If True shadow object is visible (if property is there)
 
void SetShowShadow (bool showshadow)
 If True shadow object is visible (if property is there)
 
bool GetResizeOnChildBox () const
 see SetResizeOnChildBox()
 
void SetResizeOnChildBox (bool resizeToChilds)
 If True resize to child boundingbox. More...
 
const a2dShadowStylePropertyGetShadowStyle () const
 quick way to get the style property containing Shadow property More...
 
void CallDoRender (a2dIterC &ic, OVERLAP clipparent)
 
virtual a2dCanvasObjectPushInto (a2dCanvasObject *parent)
 when wanting to traverse hierarchy what level is down here.
 
virtual a2dCanvasObjectGetCommandProcessor ()
 
virtual a2dLayersGetLayerSetup ()
 
virtual bool IsConnect () const
 return true, if this object is used to connect other object's using rubberband like structures.
 
virtual bool IsVirtConnect () const
 object is a virtual connection (connects invisible with other objects without using wires )
 
virtual bool NeedsUpdateWhenConnected () const
 used in case of flexible canvas objects (wires). More...
 
bool DoConnect ()
 if return true, connection with other object on this object its pins is allowed. More...
 
void DoConnect (bool doconnect)
 If set to true this object may be connected to other object on its pins. More...
 
bool CanConnectWith (a2dIterC &ic, a2dCanvasObject *toConnect, bool autocreate)
 check connect to other object More...
 
a2dPinCanConnectWith (a2dIterC &ic, a2dPin *pin, double margin, bool autocreate)
 is the given pin close enough to another a2dPin to allow connection? More...
 
bool IsConnected (bool needsupdate, a2dCanvasObject *toConnect=0)
 Is the object connected ( Optinal to specific object ) ? More...
 
virtual bool FindConnectedPins (a2dCanvasObjectList &result, a2dPin *pin=NULL, bool walkWires=true, a2dPinClass *searchPinClass=NULL, a2dCanvasObject *isConnectedTo=NULL)
 Find pins in other object which are connected to this object. More...
 
bool FindConnectedWires (a2dCanvasObjectList &result, a2dPin *pin, bool walkWires=true, bool selectedEnds=false, bool stopAtSelectedWire=false, bool addToResult=false)
 find wires on pins of this objects. More...
 
bool GetConnected (a2dCanvasObjectList *connected, bool needsupdate)
 get connected objects that are connected to this object via its pins. More...
 
virtual bool ConnectWith (a2dCanvasObject *parent, a2dCanvasObject *toconnect, const wxString &pinname=wxT(""), double margin=1, bool undo=false)
 Do connect with another a2dCanvasObject by pinname. More...
 
virtual bool ConnectWith (a2dCanvasObject *parent, a2dPin *pin, double margin=1, bool undo=false)
 Do connect with another a2dCanvasObject by pin pointer. More...
 
virtual void ConnectPinsCreateConnect (a2dCanvasObject *parent, a2dPin *pinc, a2dPin *pinother, bool undo=false)
 connect two pins More...
 
bool CleanWires (a2dCanvasObjectFlagsMask mask=a2dCanvasOFlags::ALL)
 pins one wires to the same kind of wire are removed.
 
void ConnectPins (a2dCanvasObject *parent, a2dPin *pinc, a2dPin *pinother, bool undo=false)
 connect two pins which must be unconnected and at the same position More...
 
virtual bool DisConnectWith (a2dCanvasObject *toDisConnect=NULL, const wxString &pinname=wxT(""), bool undo=false)
 Do Disconnect from another a2dCanvasObject by pin name. More...
 
virtual bool DisConnectAt (a2dPin *pin, bool undo=false)
 Do Disconnect from another a2dCanvasObject by pin pointer. More...
 
void ReWireConnected (a2dCanvasObject *parent, bool undo=false)
 rewire the object to keep connection or to make connection with other objects More...
 
bool CreateWiresOnPins (a2dCanvasObject *parent, bool undo, bool onlyNonSelected=false)
 create wires on pins which do not have wires, but directly are connected to other objects. More...
 
bool SetConnectedPending (bool onoff, bool needsupdateonly)
 set connected pending or not pending More...
 
bool HasPins (bool realcheck=false)
 are there a2dPin derived children More...
 
a2dPinHasPinNamed (const wxString pinName, bool NotConnected=false)
 are there a2dPin derived children which matches the given pin name? More...
 
int GetPinCount ()
 How many a2dPin derived children are there.
 
virtual bool GeneratePinsPossibleConnections (a2dPinClass *pinClass, a2dConnectTask task, double x, double y, double margin=0)
 generates pins on all possible locations where the object can be connected. More...
 
virtual bool GeneratePins (a2dPinClass *toConnectTo, a2dConnectTask task, double x, double y, double margin=0)
 create pins in derived objects. More...
 
virtual bool AdjustPinLocation ()
 Allow change in pin location when wiring things up.
 
virtual a2dCanvasObjectGetConnectTemplate (a2dPinClass *mapThis, a2dCanvasObject *other, a2dPinClass *mapOther) const
 based on the a2dPinClass's of eventually a2dPin's wanted in both objects, a More...
 
virtual a2dCanvasObjectCreateConnectObject (a2dCanvasObject *parent, a2dPin *pinThis, a2dPin *pinOther, bool undo=false) const
 generates a connection object with pins and all. More...
 
a2dPinAddPin (const wxString name, double x, double y, wxUint32 a2dpinFlags, a2dPinClass *pinClass, bool undo=false)
 add a a2dPin as child More...
 
void RemovePins (bool NotConnected=false, bool onlyTemporary=false, bool now=false)
 Remove all a2dPin children. More...
 
void ShowPins (bool onoff)
 Set a2dPin children visible or not.
 
void SetRenderConnectedPins (bool onoff)
 Calls a2dPin::SetRenderConnected() for all pins. More...
 
virtual void ClearAllPinConnections (bool withundo=true)
 Remove all pin connections by issuing a2dCommand_DisConnectPins commands. More...
 
void SetIsProperty (bool IsProperty)
 
bool GetIsProperty () const
 
a2dTextSetObjectTip (const wxString &tip, double x, double y, double size=30, double angle=0, const a2dFont &font=*a2dDEFAULT_CANVASFONT)
 quickly set a property name OBJECTTIP More...
 
void SetTipWindow (const wxString &tip)
 quickly set a property a2dTipWindowProperty More...
 
a2dObjectGetObjectTip ()
 quickly get first property with name OBJECTTIP
 
virtual bool EditProperties (const a2dPropertyId *id, bool withUndo)
 edit properties of the object More...
 
void SetSpecificFlags (bool setOrClear, a2dCanvasObjectFlagsMask which)
 set all bit flags in object that or true in mask to true or false More...
 
bool CheckMask (a2dCanvasObjectFlagsMask mask) const
 Compares all flags in object to the given mask and return true is the same.
 
void SetFlags (a2dCanvasObjectFlagsMask newmask)
 set bit flags of object (true or false) to given newmask values More...
 
bool GetFlag (const a2dCanvasObjectFlagsMask which) const
 get specific bitflag value
 
a2dCanvasObjectFlagsMask GetFlags () const
 get bitflags as an integer
 
void SetBin (bool bin)
 general flag use at will. More...
 
bool GetBin () const
 general flag use at will.
 
bool GetGroupA () const
 get the groupA flag More...
 
void SetGroupA (bool value)
 set the groupA flag More...
 
bool GetGroupB () const
 get the groupA flag More...
 
void SetGroupB (bool value)
 set the groupA flag More...
 
bool GetGeneratePins () const
 get the GeneratePins flag More...
 
void SetGeneratePins (bool value)
 set the GeneratePins flag More...
 
void SetIgnoreSetpending (bool value=true)
 set IgnoreSetpending flag More...
 
bool GetIgnoreSetpending () const
 get IgnoreSetpending flag More...
 
void SetIgnoreLayer (bool value=true)
 
bool GetIgnoreLayer () const
 
void SetSubEdit (bool value)
 
bool GetSubEdit () const
 
void SetSubEditAsChild (bool value)
 
bool GetSubEditAsChild () const
 
void SetShowshadow (bool value)
 
bool GetShowshadow () const
 
void SetPushin (bool value)
 
bool GetPushin () const
 
void SetBin2 (bool value)
 
bool GetBin2 () const
 
void SetPrerenderaschild (bool value)
 
bool GetPrerenderaschild () const
 
void SetVisiblechilds (bool value)
 
bool GetVisiblechilds () const
 
void SetEditing (bool value)
 
bool GetEditing () const
 
void SetEditingRender (bool value)
 
bool GetEditingRender () const
 
void SetDoConnect (bool value)
 
bool GetDoConnect () const
 
void SetIsOnCorridorPath (bool value)
 
bool GetIsOnCorridorPath () const
 
void SetHasPins (bool value)
 
bool GetHasPins () const
 
void SetMouseInObject (bool value)
 
bool GetMouseInObject () const
 
void SetHighLight (bool value)
 
bool GetHighLight () const
 
void SetAlgoSkip (bool value)
 
bool GetAlgoSkip () const
 
void foreach_f (void(*fp)(a2dCanvasObject *item))
 call fp for each object
 
void foreach_mf (void(a2dCanvasObject::*mfp)())
 call fp for each object
 
virtual bool UserBaseFunction ()
 can be used by the user to implement a function that affects all a2dCanvas derived objects
 
virtual bool UserBaseFunctionEx (int function, a2dIOHandler *handler=NULL)
 can be used by the user to implement a function that affects all a2dCanvas derived objects More...
 
virtual bool UserBaseFunctionVar (...)
 can be used by the user to implement a function using a variable argument list that affects all a2dCanvas derived objects
 
virtual bool UserBaseFunctionFormat (wxString format,...)
 can be used by the user to implement a function using a variable argument list and format string that affects all a2dCanvas derived objects
 
void WalkerWithContext (a2dIterC &ic, wxObject *parent, a2dWalkerIOHandlerWithContext &handler)
 This is used to recursively walk through an object tree.
 
- Public Member Functions inherited from a2dObject
virtual bool ProcessEvent (wxEvent &event)
 
bool SearchDynamicEventTable (wxEvent &event)
 
void Connect (int winid, int lastId, int eventType, wxObjectEventFunction func, wxObject *userData=(wxObject *) NULL, wxEvtHandler *eventSink=(wxEvtHandler *) NULL)
 
bool Disconnect (int winid, int lastId, wxEventType eventType, wxObjectEventFunction func=NULL, wxObject *userData=(wxObject *) NULL, wxEvtHandler *eventSink=(wxEvtHandler *) NULL)
 
void ProcessConnectedEvent (wxEvent &event)
 wxCHECK_VERSION(2,9,0) More...
 
void ConnectEvent (wxEventType type, wxEvtHandler *eventSink)
 
bool DisconnectEvent (wxEventType type, wxEvtHandler *eventSink)
 
bool DisconnectEventAll (wxEvtHandler *eventSink)
 Remove all dynamic events in classA, going to classB (eventSink) More...
 
 a2dObject ()
 constructor
 
virtual ~a2dObject ()
 destructor
 
void operator= (const a2dObject &other)
 assignment operator
 
int GetOwnedBy ()
 like it to be protected, but this does not work with wxList macros More...
 
virtual a2dObjectSetNonDynamic ()
 Call to mark this object as non-dynamic (static/local/auto) More...
 
void CheckReferences ()
 Check zero reference count and delete if count is 0. More...
 
a2dObjectClone (CloneOptions options, a2dRefMap *refs=NULL) const
 create an exact copy of this property
 
 a2dObject (const a2dObject &other, CloneOptions options, a2dRefMap *refs)
 
void SaveAsDocument (a2dIOHandlerXmlSerOut &out)
 Save this object and all below as an XML document. More...
 
virtual void Save (wxObject *parent, a2dIOHandlerXmlSerOut &out, a2dObjectList *towrite)
 write all needed to an XML type of file called the CVG format More...
 
void LoadFromDocument (a2dIOHandlerXmlSerIn &parser)
 Load this object and all below from an XML document. More...
 
virtual void Load (wxObject *parent, a2dIOHandlerXmlSerIn &parser)
 load object from CVG file More...
 
wxInt64 GetUniqueSerializationId () const
 return a unique id for this object More...
 
virtual void ResolveInform ()
 inform an object that reference resolution was done More...
 
void Walker (wxObject *parent, a2dWalkerIOHandler &handler)
 This is used to recursively walk through an object tree.
 
void SetCheck (bool check)
 general flag use at will. More...
 
bool GetCheck () const
 general flag use at will.
 
void SetRelease (bool value)
 set release flag More...
 
bool GetRelease () const
 get release flag More...
 
a2dAutoZeroPtr< a2dObject > ** GetAutoZeroPtrList ()
 return the list head pointer for autozero pointers to this object More...
 
 DECLARE_PROPERTIES ()
 
a2dNamedPropertyGetProperty (const a2dPropertyId *propertyId, a2dPropertyId::Flags flags=a2dPropertyId::flag_none) const
 get property on this object More...
 
void SetProperty (a2dNamedProperty *propertyHolder, a2dPropertyId::SetFlags flags=a2dPropertyId::set_none)
 Set the property to the this object. More...
 
void SetProperty (const a2dNamedProperty &propertyHolder, a2dPropertyId::SetFlags flags=a2dPropertyId::set_none)
 Set the property to the this object and if enabled, to all childs and object members. More...
 
virtual a2dNamedPropertyFindProperty (const a2dPropertyId *id, a2dPropertyId::Flags flags=a2dPropertyId::flag_none)
 Find a dynamic property with given id in the property list. More...
 
virtual const a2dNamedPropertyFindProperty (const a2dPropertyId *id, a2dPropertyId::Flags flags=a2dPropertyId::flag_none) const
 Find a dynamic property with given id in the property list. More...
 
virtual bool HasProperty (const a2dPropertyId *id, const wxString &stringvalue=wxEmptyString) const
 Check if the object has a property with given id and string representation. More...
 
virtual void OnPropertyChanged (const a2dPropertyId *id)
 This function is called after a property changed. More...
 
void TakeOverProperties (a2dObject *from, a2dPropertyIdList *listOfIds)
 Properties in the id list are taken from the given object, en set to this. More...
 
wxURI GetURI () const
 quick way to get to PROPID_URI property More...
 
void SetURI (const wxURI &url)
 quickly set a property PROPID_URI More...
 
const a2dNamedPropertyListGetPropertyList () const
 Get the Property List. More...
 
bool HasDynamicProperties () const
 test if there are dynamic properties in the m_propertylist
 
virtual bool RemoveProperty (const a2dPropertyId *id, bool all=true)
 This function is called by a2dPropertyId to remove a property from the list. More...
 
void RemoveTemporaryProperties ()
 remove all temporary properties
 
virtual bool AddProperty (a2dNamedProperty *property)
 This function is called by a2dPropertyId to add a property to the list. More...
 

Static Public Member Functions

static void SetWorldBased (bool worldBased)
 set if pins its size is in world coordinates, else it is in pixels.
 
static bool GetWorldBased ()
 get if pin sizes are in world coordinates, else it is in pixels.
 
static void SetDoRender (bool doRender)
 
static bool GetDoRender ()
 
- Static Public Member Functions inherited from a2dCanvasObject
static void SetIgnoreAllSetpending (bool value=true)
 set static IgnoreAllSetpending flag More...
 
static bool GetIgnoreAllSetpending ()
 get static IgnoreSetpending flag More...
 

Static Public Attributes

Rendering mode, set by connection feedback in e.g. a wire tool
static const long sm_PinUnConnected = wxGenNewId()
 Pin is not connected rendering mode.
 
static const long sm_PinConnected = wxGenNewId()
 Pin is connected rendering mode.
 
static const long sm_PinCanConnect = wxGenNewId()
 Pin can be connected rendering mode.
 
static const long sm_PinCannotConnect = wxGenNewId()
 Pin can NOT be connected rendering mode.
 
static const long sm_PinCanConnectToPinClass = wxGenNewId()
 Pin can connect to supplied a2dPinClass.
 
- Static Public Attributes inherited from a2dCanvasObject
static bool m_ignoreAllSetpending = false
 when set all SetPending() calss are supressed.
 
static a2dPropertyIdMatrixPROPID_TransformMatrix = NULL
 
static a2dPropertyIdPoint2DPROPID_Position = NULL
 
static a2dPropertyIdUint16PROPID_Layer = NULL
 
static a2dPropertyIdBoolPROPID_Selected = NULL
 
static a2dPropertyIdBoolPROPID_Selectable = NULL
 
static a2dPropertyIdBoolPROPID_SubEdit = NULL
 
static a2dPropertyIdBoolPROPID_SubEditAsChild = NULL
 
static a2dPropertyIdBoolPROPID_Visible = NULL
 
static a2dPropertyIdBoolPROPID_Draggable = NULL
 
static a2dPropertyIdBoolPROPID_Showshadow = NULL
 
static a2dPropertyIdBoolPROPID_Filled = NULL
 
static a2dPropertyIdBoolPROPID_GroupA = NULL
 
static a2dPropertyIdBoolPROPID_GroupB = NULL
 
static a2dPropertyIdBoolPROPID_GeneratePins = NULL
 
static a2dPropertyIdBoolPROPID_Bin = NULL
 
static a2dPropertyIdBoolPROPID_Bin2 = NULL
 
static a2dPropertyIdBoolPROPID_Pending = NULL
 
static a2dPropertyIdBoolPROPID_Snap = NULL
 
static a2dPropertyIdBoolPROPID_SnapTo = NULL
 
static a2dPropertyIdBoolPROPID_Pushin = NULL
 
static a2dPropertyIdBoolPROPID_Prerenderaschild = NULL
 
static a2dPropertyIdBoolPROPID_Visiblechilds = NULL
 
static a2dPropertyIdBoolPROPID_Editable = NULL
 
static a2dPropertyIdBoolPROPID_Editing = NULL
 
static a2dPropertyIdBoolPROPID_EditingRender = NULL
 
static a2dPropertyIdBoolPROPID_ChildrenOnSameLayer = NULL
 
static a2dPropertyIdBoolPROPID_DoConnect = NULL
 
static a2dPropertyIdBoolPROPID_IsOnCorridorPath = NULL
 
static a2dPropertyIdBoolPROPID_HasPins = NULL
 
static a2dPropertyIdBoolPROPID_IsProperty = NULL
 
static a2dPropertyIdBoolPROPID_MouseInObject = NULL
 
static a2dPropertyIdBoolPROPID_HighLight = NULL
 
static a2dPropertyIdBoolPROPID_Template = NULL
 
static a2dPropertyIdBoolPROPID_External = NULL
 
static a2dPropertyIdBoolPROPID_Used = NULL
 
static a2dPropertyIdBoolPROPID_Release = NULL
 
static a2dPropertyIdCanvasObjectPROPID_Begin = NULL
 
static a2dPropertyIdCanvasObjectPROPID_End = NULL
 
static a2dPropertyIdDoublePROPID_EndScaleX = NULL
 
static a2dPropertyIdDoublePROPID_EndScaleY = NULL
 
static a2dPropertyIdBoolPROPID_Spline = NULL
 
static a2dPropertyIdDoublePROPID_ContourWidth = NULL
 
static a2dPropertyIdBoolPROPID_DisableFeedback = NULL
 
static a2dPropertyIdBoolPROPID_Allowrotation = NULL
 
static a2dPropertyIdBoolPROPID_Allowsizing = NULL
 
static a2dPropertyIdBoolPROPID_Allowskew = NULL
 
static a2dPropertyIdBoolPROPID_IncludeChildren = NULL
 
static
a2dPropertyIdRefObjectAutoZero
PROPID_Controller = NULL
 
static a2dPropertyIdCanvasObjectPROPID_Original = NULL
 
static a2dPropertyIdCanvasObjectPROPID_Editcopy = NULL
 
static a2dPropertyIdCanvasObjectPROPID_Parent = NULL
 
static a2dPropertyIdCanvasObjectPROPID_Objecttip = NULL
 
static a2dPropertyIdUint16PROPID_Editmode = NULL
 
static a2dPropertyIdUint16PROPID_Editstyle = NULL
 
static a2dPropertyIdUint16PROPID_Index = NULL
 
static
a2dPropertyIdCanvasShadowStyle
PROPID_Shadowstyle = NULL
 
static a2dPropertyIdFillPROPID_Fill = NULL
 
static a2dPropertyIdStrokePROPID_Stroke = NULL
 
static a2dPropertyIdUint32PROPID_RefDesCount = NULL
 
static a2dPropertyIdUint32PROPID_RefDesNr = NULL
 
static a2dPropertyIdBoolPROPID_ToolDecoration = NULL
 set for objects that act as tool decorations, when a tool is in action.
 
static a2dPropertyIdVoidPtrPROPID_ToolObject = NULL
 set for objects that act as tool object, when a tool is in action.
 
static a2dPropertyIdBoolPROPID_TemporaryObject = NULL
 set for objects that do not have to be saved
 
static a2dPropertyIdBoundingBoxPROPID_BoundingBox = NULL
 used to store state ( redraw area) of the object as it was before a change
 
static a2dPropertyIdColourPROPID_StrokeColour = NULL
 
static a2dPropertyIdColourPROPID_FillColour = NULL
 
static a2dPropertyIdRefObjectPROPID_ViewSpecific = NULL
 
static a2dPropertyIdBoolPROPID_FirstEventInObject = NULL
 set in Startedit(), to be used to detect first (mouse)event sent to object.
 
static a2dPropertyIdUint16PROPID_Datatype = NULL
 used in GDSII and KEY format to specify the DATATYPE of elements More...
 
static a2dPropertyIdRefObjectPROPID_ViewDependent = NULL
 used for objects that depend on 'aView' view when it comes to size.
 
static a2dPropertyIdMatrixPROPID_IntViewDependTransform = NULL
 used for objects with* PROPID_viewDependent but only for internal area
 
static a2dPropertyIdDateTimePROPID_DateTime = NULL
 some time property which a user wants to store
 
static a2dPropertyIdDateTimePROPID_ModificationDateTime = NULL
 
static a2dPropertyIdDateTimePROPID_AccessDateTime = NULL
 
static a2dPropertyIdMenuPROPID_PopupMenu = NULL
 when set used for popup menu by default in OnPopUpEvent()
 
static a2dPropertyIdWindowPROPID_TipWindow = NULL
 when set used for tip window by default in OnCanvasMouseEvent()
 
static a2dPropertyIdTagVecPROPID_Tags = NULL
 used in tool when grouping using tags
 
- Static Public Attributes inherited from a2dObject
static a2dPropertyIdBoolPROPID_Check = NULL
 used for linking multiple referenced objects when serializing
 
static a2dPropertyIdUriPROPID_URI = NULL
 attach an URL to the object
 
static a2dPropertyIdStringPROPID_Name = NULL
 Name property, to return name of this object.
 
static a2dPropertyIdVoidPtrPROPID_autozeroptrlist = NULL
 
static const a2dSignal sm_Edit_properties = wxNewId()
 edit properties event, see EditProperties()
 

Protected Member Functions

virtual a2dObjectDoClone (CloneOptions options, a2dRefMap *refs) const
 
virtual void DoLoad (wxObject *parent, a2dIOHandlerXmlSerIn &parser, a2dXmlSer_flag xmlparts)
 load object specific CVG data More...
 
virtual void DoSave (wxObject *parent, a2dIOHandlerXmlSerOut &out, a2dXmlSer_flag xmlparts, a2dObjectList *towrite)
 write object specific CVGL data
 
bool DoIsHitWorld (a2dIterC &ic, a2dHitEvent &hitEvent)
 Does hit test on the object (exclusif child objects) More...
 
void OnCanvasObjectMouseEvent (a2dCanvasObjectMouseEvent &event)
 
void OnEnterObject (a2dCanvasObjectMouseEvent &event)
 
void OnLeaveObject (a2dCanvasObjectMouseEvent &event)
 
virtual void DrawHighLighted (a2dIterC &ic)
 called by Render() if m_flags.m_HighLight is set More...
 
void DoRender (a2dIterC &ic, OVERLAP clipparent)
 render derived object More...
 
a2dBoundingBox DoGetUnTransformedBbox (a2dBboxFlags flags=a2dCANOBJ_BBOX_NON) const
 In derived object this should be overriden to calculate the boundingbox of the object without its children. More...
 
bool DoUpdate (UpdateMode mode, const a2dBoundingBox &childbox, const a2dBoundingBox &clipbox, const a2dBoundingBox &propbox)
 Update derived Object specific things ( mainly boundingbox) More...
 
- Protected Member Functions inherited from a2dCanvasObject
bool ProcessCanvasEventChild (a2dIterC &ic, RenderChild &whichchilds, a2dHitEvent &hitEvent)
 
bool ProcessCanvasEventChildOneLayer (a2dIterC &ic, RenderChild &whichchilds, a2dHitEvent &hitEvent)
 
virtual bool DoIgnoreIfNotMember (const a2dPropertyId &id)
 
bool ParseCvgTransForm (a2dAffineMatrix &result, a2dIOHandlerXmlSerIn &parser)
 parse Cvg transform of object
 
virtual void DoAddPending (a2dIterC &ic)
 called by addPending
 
virtual void DoEndEdit ()
 only used for editable objects and under control of a editing tool. More...
 
bool LocalHit (a2dIterC &ic, a2dHitEvent &hitEvent)
 
a2dCanvasObjectIsHitWorldChildObjects (a2dIterC &ic, RenderChild &whichchilds, a2dHitEvent &hitEvent)
 This is an internal function used by IsHitWorld(). Don't use it directly.
 
a2dCanvasObjectHitChildObjectsOneLayer (a2dIterC &ic, RenderChild &whichchilds, a2dHitEvent &hitEvent)
 This is an internal function used by IsHitWorldChildObjects(). Don't use it directly.
 
const a2dFillMX_GetFill () const
 
void MX_SetFill (const a2dFill &value)
 
const a2dStrokeMX_GetStroke () const
 
void MX_SetStroke (const a2dStroke &value)
 
virtual void DoUpdateViewDependentTransform (a2dIterC &ic)
 update transform matrix klion: I'm not sure that this function necessary as virtual
 
virtual void DoUpdateViewDependentObjects (a2dIterC &ic)
 update derived objects
 
virtual void RenderChildObjects (a2dIterC &ic, RenderChild &whichchilds, OVERLAP clipparent)
 render only the child objects More...
 
virtual void RenderChildObjectsOneLayer (a2dIterC &ic, RenderChild &whichchilds, OVERLAP clipparent)
 to render the child objects More...
 
virtual bool DoCanConnectWith (a2dIterC &ic, a2dPin *pin, double margin, bool autocreate)
 prepare an object for being connected to a given pin More...
 
void OnPropertyChanged (a2dComEvent &event)
 
virtual void DoWalker (wxObject *parent, a2dWalkerIOHandler &handler)
 iterate over this object and its children More...
 
virtual void DoWalkerWithContext (a2dIterC &ic, wxObject *parent, a2dWalkerIOHandlerWithContext &handler)
 
- Protected Member Functions inherited from a2dObject
virtual bool DoIgnoreIfNotMember (const a2dPropertyId *id) const
 used to decide if a property shall be ignored, if it is not a member More...
 

Protected Attributes

wxString m_name
 name of the handle
 
double m_width
 width in pixels
 
double m_height
 height in pixels
 
double m_radius
 radius of rectangle that will be rendered
 
int m_mode
 modifies rendering
 
a2dCanvasObjectm_parent
 what is the a2dCanvasObject that i am part of
 
a2dPinClassm_pinclass
 The class defines to which other pins this pin can connect.
 
bool m_dynamicPin: 1
 set when this pin is a temporary pin for editing feedback
 
bool m_temporaryPin: 1
 
bool m_RenderConnected: 1
 flag to render or not when connected
 
bool m_internal: 1
 true when pin is internal to object border.
 
bool m_objectPin: 1
 is true when pin is on an object instead of a wire/connect
 
a2dlist< a2dDumbPtr< a2dPin > > m_connectedPins
 to which a2dPin is this pin connected with other canvas objects its pins. More...
 
- Protected Attributes inherited from a2dCanvasObject
a2dDrawingm_root
 root group for rendering and accessing the canvas's also contains layer settings
 
a2dCanvasOFlags m_flags
 holds flags for objects
 
a2dCanvasOHitFlags m_hitflags
 allow hits on basis of those flags
 
a2dBoundingBox m_bbox
 boundingbox in world coordinates
 
float m_worldExtend
 world extend in world coordinates. More...
 
wxUint16 m_pixelExtend
 Pixel extend. More...
 
wxUint16 m_layer
 layer of object, default wxLAYER_DEFAULT
 
a2dAffineMatrix m_lworld
 used for positioning the object (x,y,ang,scale etc.)
 
a2dCanvasObjectListm_childobjects
 holds child objects
 
- Protected Attributes inherited from a2dObject
a2dNamedPropertyList m_propertylist
 properties
 
int m_refcount
 how many references to this object do exist
 
bool m_check: 1
 used for linking multiple referenced objects when serializing
 
bool m_release: 1
 when set object is treated as being deleted, and wil be deleted in idle time.
 
bool m_recursion_active: 1
 this is used as a recursion stopper
 
bool m_pendingDisconnects: 1
 
unsigned int m_iteratorCount
 
a2dAutoZeroPtr< a2dObject > * m_autozeroptrlist
 this is a list of all a2dAutoZeroPtr object pointing to this object
 

Static Protected Attributes

static bool m_worldBased = false
 pins are world based or not.
 
static bool m_doRender = true
 when set disables rending of pin objects
 
- Static Protected Attributes inherited from a2dCanvasObject
static a2dCanvasOFlags m_flagsInit
 holds value for flags to initialize m_flags More...
 

Additional Inherited Members

- Protected Types inherited from a2dObject
enum  { refcount_nondynamic = 0x76543210 }
 special refcount value for non-dynamic objects
 

Detailed Description

a2dPin is used in a2dCanvasObject to add pins to it.

This class is meant to be added as child object to a a2dCanvasObject, there it is treated in a special manner to connect the parent a2dCanvasObject to other a2dCanvasObject's. Using pins one can create graph/diagram structures of connected a2dCanvasObjects. Pins can connect one canvas object to another via two connected pins. The Pin can be connected to several other Pins. Special connection canvas objects like a2dWirePolylineL and a2dWires, can be used to create wires between canvas objects. The connection objects also have pins, which they use to connect to other a2dCanvasObjects. Fro instance a2dWirePolylineL is a wire, which can have many pins along it, which are connected to othere canvas objects. Those wire line objects do recalculate the wires when moving a connected a2dCanvasObject. This is often called rubberbanding. A wire connection objects are used in dedicated reroute algorithms. a2dConnectionGenerator is used to implement those algorithms. It work on sets of wires which are connected to other objects. Moving the objects, leads to rewiring the connection objects.

One can traverse connected a2dCanvasObject's via its pins, since the Pin has a parent pointer to the a2dCanvasObject it belongs to. This way one can find groups of connected objects.

a2dCanvasObject has member functions to manipulate the a2dPin's it has. A pin itself is created by its parent, and therefore parent object decides where pins are located, and what needs to happen when one wants to connect to one of its pins. This is/can be specific for each derived a2dCanvasObject and each of its pins. To achieve different behaviour for pins without deriving new pin classes, a pin has a a2dPinClass member. The a2dPinClass is used to specialize a pin for a certain connection purpose. Think of input and output pins on objects. One can for instance not connect an input pin of one object to the input pin of another object. All these constraints can be stored in the pin its a2dPinClass. So in general there will be no need to derive your own MyCanvasPin, unless you want to e.g. change rendering.

a2dPinClass is not stored into CVG format, only its name is stored, the list of available pinclasses is assumed to be specific to the application.

A pin does have an angle, this make the relative angle to a connected Pin of another a2dCanvasObject well defined. Certain application require object to be connected at the same angles.

Pins with the visible fag set false, will not be connected in routines where connections are being made.

Definition at line 233 of file canpin.h.

Member Enumeration Documentation

Enumerator
NON 

no flag set

dynamic 

dynamic pins can walk along a line

temporary 

temporary pins are created to indicate possible connection, and deleted or cloned when connected

objectPin 

set when pin is on an object and not a wire or connect.

internal 

true when pin is internal to object border.

temporaryObjectPin 

temporary and objectPin set

ALLSET 

For Xor ing and all set

Definition at line 242 of file canpin.h.

Member Function Documentation

bool a2dPin::AlwaysWriteSerializationId ( ) const
virtual

If true, always write an id.

Usually an id is only written if the object is multiple referenced and refcount is >= 2. Some objects, namely a2dPin objects, are multiple referenced even if refcount = 1.

Reimplemented from a2dObject.

Definition at line 1613 of file canpin.cpp.

void a2dPin::CleanUpNonConnected ( )

Items in m_connectedPins which are NULL will be erased. The NULL items is how Disconnect() does disconnect pins, if erase is not forced.

Definition at line 726 of file canpin.cpp.

bool a2dPin::Disconnect ( a2dPin pin = a2dAnyPin,
bool  forceErase = false 
)

If pin is connected to given pin, it will be disconnected from that other pin. Next to that the rendering mode will be set to sm_PinUnConnected. The connection entries are set to NULL in m_connectedPins and pin->m_connectedPins. They are not erased from the list, in order to not interupt ongoing iterations at a higher level. Call CleanUpNonConnected() to really erase them, or it will be done at destruction of pin.

Parameters
pinif not NULL, this pin connected is removed or set to NULL.
forceEraseif true, the pin connections is removed from the connection list else, only set to NULL.

Definition at line 789 of file canpin.cpp.

a2dObject * a2dPin::DoClone ( CloneOptions  options,
a2dRefMap refs 
) const
protectedvirtual
Remarks
the parent of the pin is taken over, but its connection pin only via refs to resolve

Reimplemented from a2dCanvasObject.

Reimplemented in a2dParPin.

Definition at line 1169 of file canpin.cpp.

a2dBoundingBox a2dPin::DoGetUnTransformedBbox ( a2dBboxFlags  flags = a2dCANOBJ_BBOX_NON) const
protectedvirtual

In derived object this should be overriden to calculate the boundingbox of the object without its children.

The default return a non Valid boundingbox.

The real boundingbox of the object is often less desirable for editing. e.g. a rectangle with a contour, one does not want editing handles on the contour, instead they should still be on the basic rectangle.

Reimplemented from a2dCanvasObject.

Definition at line 1174 of file canpin.cpp.

bool a2dPin::DoIsHitWorld ( a2dIterC ic,
a2dHitEvent hitEvent 
)
protectedvirtual

Does hit test on the object (exclusif child objects)

DoIsHitWorld() should return the way the object is hit by filling a2dHitEvent::m_how with the correct info.

Parameters
iciterative context ( e.g. current transform WITH the local transform applied )
hitEventstores hit information
Returns
true if hit

Reimplemented from a2dCanvasObject.

Definition at line 1576 of file canpin.cpp.

void a2dPin::DoLoad ( wxObject *  parent,
a2dIOHandlerXmlSerIn parser,
a2dXmlSer_flag  xmlparts 
)
protectedvirtual

load object specific CVG data

todo ignore until this down here is fully converted.

Reimplemented from a2dCanvasObject.

Reimplemented in a2dParPin.

Definition at line 1526 of file canpin.cpp.

void a2dPin::DoRender ( a2dIterC ic,
OVERLAP  clipparent 
)
protectedvirtual

render derived object

if the object has sub objects (apart from the childobject which are handled here), those subobject most rendered by iterating on layer when needed/wanted, simular to child objects. We do not iterate here, since that is only needed if indeed there or subobjects. This will be know in a "wxDerivedCanvasObject DoRender".

SO parent objects that call this function, must:

\li 1-  clip object against area to redraw.
\li 2-  iterate on layers when needed.

A a2dCanvasObject is rendered as a + (plus sign) when there or no children.

Reimplemented from a2dCanvasObject.

Definition at line 1282 of file canpin.cpp.

bool a2dPin::DoUpdate ( UpdateMode  mode,
const a2dBoundingBox childbox,
const a2dBoundingBox clipbox,
const a2dBoundingBox propbox 
)
protectedvirtual

Update derived Object specific things ( mainly boundingbox)

Calculates the boundingbox of the object (exclusif base class child objects but with other nested objects).

Parameters
modeway to update the objects
childboxsize of children boundingbox
clipboxclip to this
propboxsize of properties boundingbox
Remarks
in a derived class this function can also be used to update object specific cache data.
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 a2dCanvasObject.

Definition at line 1202 of file canpin.cpp.

void a2dPin::DrawHighLighted ( a2dIterC ic)
protectedvirtual

called by Render() if m_flags.m_HighLight is set

Parameters
iciteration context (has a2dDrawingPart accumulative matrix to calculate absolute position of the object)

Reimplemented from a2dCanvasObject.

Definition at line 1266 of file canpin.cpp.

a2dPin * a2dPin::FindConnectablePin ( a2dCanvasObject root,
double  margin,
bool  autocreate 
)

Find a connectable pin.

This only searches for pins of child objects of the root given

todo One bad thing about this is, that the margin is given in world units

Definition at line 1046 of file canpin.cpp.

a2dPin * a2dPin::FindNonWirePin ( a2dCanvasObjectFlagsMask  mask = a2dCanvasOFlags::ALL)

find connecting pin which is not a wire. Return NULL if non found /param mask the connected object must have given mask.

Definition at line 1012 of file canpin.cpp.

a2dPin * a2dPin::FindWirePin ( a2dCanvasObjectFlagsMask  mask = a2dCanvasOFlags::ALL)

find connecting pin which is a wire. Return NULL if non found /param mask the connected object must have given mask.

Definition at line 1029 of file canpin.cpp.

bool a2dPin::GetRenderConnected ( )
inline
Returns
true is connected pins are rendered

Definition at line 287 of file canpin.h.

a2dPin * a2dPin::IsConnectedTo ( a2dPin pin = a2dAnyPin) const

Return the pin to which this pin is connected.

Parameters
pinlook for connection to this pin, if not given, first connected pin is returned.

Definition at line 751 of file canpin.cpp.

a2dPin * a2dPin::IsDislocated ( ) const

Check if this pin is Dislocated ( pin pos different from connected pins pos ) returns connected pin which is dislocated the most.

Definition at line 1089 of file canpin.cpp.

bool a2dPin::IsDynamicPin ( ) const
inline

return true if this pin is a dynamic pin

Pins like this are create automatically by some objects, when they are able to connect. The location is dynamic, and therefore they are called dynamic. When moving connected objects/wires, the pins may move in position.

Definition at line 418 of file canpin.h.

bool a2dPin::IsTemporaryPin ( ) const
inline

return true if this pin is a temporary pin

Pins like this are created automatically by some objects, when they are able to connect. Since for Undo actions, commands are normally used to create extra pins inside tools. But a temporary pin is in general for editing feedback, and therefore it only will stay alive when the tools attempt to connect a second pin to it. At that moment it becomes clear that a command is needed to create and connect the temporary pin using commands. If not, the temporary pin will be deleted in the end, as if it did never existed, and no commands on the command stack were issued.

Definition at line 433 of file canpin.h.

bool a2dPin::LinkReference ( a2dObject other)
virtual

link a reference in the object to the given value

This is intended for e.g. paired links as in a2dPin, where the usual a2dResolveIdInfo mechanism cannot be used.

Reimplemented from a2dObject.

Reimplemented in a2dParPin.

Definition at line 1618 of file canpin.cpp.

bool a2dPin::MayConnectTo ( a2dPin connectto)
virtual

Is given pin allowed to connect to this pin.

Override this function to make restriction on connecting pins. E.g You might make restriction for pins on one layer, not to connect with pins on other layers.

The default implementation checks if the two pins have a2dPinClass which a2dPinClass::CanConnectTo() to eachother.

todo is a seperate task needed?

Definition at line 997 of file canpin.cpp.

void a2dPin::Set ( double  xc,
double  yc,
double  angle = 0,
const wxString &  name = wxT( "" ),
bool  dynamic = false 
)

set postion angle and name of the pin

Parameters
xcx-position
ycy-position
anglethe angle
nameempty means leave name as is
dynamicwhen true pin is only a temporary pin.

Definition at line 663 of file canpin.cpp.

void a2dPin::SetInternal ( bool  internal)
inline

set when pin is within the border of its parent

Used when routing wires to a pin which is within the object and not on the border. Meaning wires must be able to route within the object that contains the pin.

Definition at line 444 of file canpin.h.

void a2dPin::SetPending ( bool  pending)
virtual

set this object pending for update

This flag is set when an object has changed, which means that it needs to be redrawn. Since an object can be Referenced also, it can be drawn at several positions. Therefore the redrawing needs to be done indirectly from the top, and for each a2dDrawingPart displaying the object. In general old and new boundingbox areas are updated on the display.

  • Step 1 add pending objects occupied areas to drawer.
  • Step 2 The new boundingbox is calculated.
  • Step 3 add pending objects occupied areas to draweronce more.
  • Step 4 reset all pending flags for objects.
Remarks
Does also inform the a2dCanvasDocument that there are pending objects.
If because of this object becoming pending other objects should become pending also, one should override this function to set those other objects pending.
If redefined in derived object always call base also.
See Also
DependencyPending()
Parameters
pendingif true set object pending

Reimplemented from a2dCanvasObject.

Definition at line 945 of file canpin.cpp.

void a2dPin::SetRenderConnected ( bool  RenderConnected)
inline

flag to render connected pin

Remarks
set the object its pending flag and inform root about this
default false
Parameters
RenderConnectedif true connected pin is rendered visible

Definition at line 284 of file canpin.h.

void a2dPin::SetTemporaryPin ( bool  temporaryPin)
inline

set when pin is only a temporary pin, which will be deleted by the application if not connected to another pin later.

Definition at line 437 of file canpin.h.

Member Data Documentation

a2dlist< a2dDumbPtr<a2dPin> > a2dPin::m_connectedPins
protected

to which a2dPin is this pin connected with other canvas objects its pins.

Added connections can be set to NULL or erased. When not possible to erase (several ieraters on the list), you can use CleanUpNonConnected() to clean the NULL items later on.

Definition at line 586 of file canpin.h.

bool a2dPin::m_temporaryPin
protected

set when this pin is a temporary pin for editing feedback, this pin will be replaced by a normal pin or its flag will be reset, to make it so.

Definition at line 569 of file canpin.h.


The documentation for this class was generated from the following files:
a2dPin Class Reference -- Sun Oct 12 2014 17:04:45 -- Sun Oct 12 2014 -- 1.8.5 -- wxArt2D -- . -- Main Page Reference Documentation