13 #ifndef __WXCONNECTGEN_H__
14 #define __WXCONNECTGEN_H__
26 class A2DCANVASDLLEXP
a2dPin;
44 a2d_StartWire_BasedOnClassStartPin,
45 a2d_StartWire_BasedOnWireClassRequired,
46 a2d_StartWire_BasedOnObjectClassRequired,
169 ManhattanEndSegmentsConvertAndStay
244 a2dPinClass* GetReturnPinClass()
const {
return m_returnPinClass; }
317 void OptimizeRerouteWires(
bool removeZero =
false );
323 void ResetCloneBrother();
325 void ResetPositionsToOrignals();
335 void RerouteWires(
bool final =
false,
bool fromOriginal =
true );
346 RouteMethod GetRouteMethod() {
return m_routeMethod; }
348 wxString GetRouteMethodAsString();
351 void RotateRouteMethod();
360 void SetGeneratePins(
bool onOff ) { m_generatePins = onOff; }
362 bool GetGeneratePins()
const {
return m_generatePins; }
364 void SetNoEditCopy(
bool noEditCopy ) { m_noEditCopy = noEditCopy; }
366 bool GetNoEditCopy() {
return m_noEditCopy; }
368 void SetOffSet(
double offset ) { m_offset = offset; }
369 double GetOffSet()
const {
return m_offset; }
378 bool m_routeWhenDrag;
379 RouteMethod m_routeMethod;
394 bool m_allowredirect;
409 void PrepareGridRoute();
410 void AutoConnect(
a2dWirePolylineL* wire,
bool allowreconnectbegin,
bool allowreconnectend );
414 #if wxART2D_USE_CVGIO
416 virtual void DoLoad( wxObject* WXUNUSED( parent ),
a2dIOHandlerXmlSerIn& WXUNUSED( parser ), a2dXmlSer_flag WXUNUSED( xmlparts ) ) { wxASSERT( 0 ); }
417 #endif //wxART2D_USE_CVGIO
453 #if wxART2D_USE_CVGIO
454 virtual void DoSave( wxObject* WXUNUSED( parent ),
a2dIOHandlerXmlSerOut& WXUNUSED( out ), a2dXmlSer_flag WXUNUSED( xmlparts ),
a2dObjectList* WXUNUSED( towrite ) ) { wxASSERT( 0 ); }
455 virtual void DoLoad( wxObject* WXUNUSED( parent ),
a2dIOHandlerXmlSerIn& WXUNUSED( parser ), a2dXmlSer_flag WXUNUSED( xmlparts ) ) { wxASSERT( 0 ); }
456 #endif //wxART2D_USE_CVGIO
488 #if wxART2D_USE_CVGIO
489 virtual void DoSave( wxObject* WXUNUSED( parent ),
a2dIOHandlerXmlSerOut& WXUNUSED( out ), a2dXmlSer_flag WXUNUSED( xmlparts ),
a2dObjectList* WXUNUSED( towrite ) ) { wxASSERT( 0 ); }
490 virtual void DoLoad( wxObject* WXUNUSED( parent ),
a2dIOHandlerXmlSerIn& WXUNUSED( parser ), a2dXmlSer_flag WXUNUSED( xmlparts ) ) { wxASSERT( 0 ); }
491 #endif //wxART2D_USE_CVGIO
528 #if wxART2D_USE_CVGIO
529 virtual void DoSave( wxObject* WXUNUSED( parent ),
a2dIOHandlerXmlSerOut& WXUNUSED( out ), a2dXmlSer_flag WXUNUSED( xmlparts ),
a2dObjectList* WXUNUSED( towrite ) ) { wxASSERT( 0 ); }
530 virtual void DoLoad( wxObject* WXUNUSED( parent ),
a2dIOHandlerXmlSerIn& WXUNUSED( parser ), a2dXmlSer_flag WXUNUSED( xmlparts ) ) { wxASSERT( 0 ); }
531 #endif //wxART2D_USE_CVGIO
592 #if wxART2D_USE_CVGIO
593 virtual void DoSave( wxObject* WXUNUSED( parent ),
a2dIOHandlerXmlSerOut& WXUNUSED( out ), a2dXmlSer_flag WXUNUSED( xmlparts ),
a2dObjectList* WXUNUSED( towrite ) ) { wxASSERT( 0 ); }
594 virtual void DoLoad( wxObject* WXUNUSED( parent ),
a2dIOHandlerXmlSerIn& WXUNUSED( parser ), a2dXmlSer_flag WXUNUSED( xmlparts ) ) { wxASSERT( 0 ); }
595 #endif //wxART2D_USE_CVGIO
Display Part of a a2dDrawing, in which a2dCanvasObjects are shown.
bool GetLastConnectCreationDirection() const
when a wire was created, this return the direction is was created ( first to last pin or visa versa )...
a2dConnectTask
flags for searching a connecting a2dpinClass, for the connecting task at hand.
static a2dPinClass * WireOutput
Pins of this class can only connect to ObjectOutput pins.
a2dCanvasObjectPtr m_tmplObjectFlowB
Template for created object which represents a connection. e.g a2dWirePolylineL.
Remove original and replace with one straight segment, dynamic pins move with segment.
generate pins, given Connect/wire pinclass
class to map references to objects stored in XML, in order to make the connection later on...
static a2dPinClass * Output
Pins of this class can only connect to Input pins.
Add manhattan lines to end.
void SetAnyPinClass(a2dPinClass *pinClass)
see GetAnyPinClass()
a2dPin is used in a2dCanvasObject to add pins to it.
This is a class/type description for a2dPin's.
static a2dPinClass * Input
Pins of this class can only connect to Output pins.
generate pins, given Connect/wire pinclass
static a2dPinClass * Object
Pins of this class can only connect to Wire pins.
Input and output handler for the XmlSer format.
static a2dPinClass * FlowAWireInput
Pins of this class can only connect to FlowAWireOutput and FlowAOutput pins.
specialized generator for two flow on one a2dcanvasObject
Remove original and replace with manhattan lines.
specialized generator for flow on one a2dcanvasObject using wires
a2dCanvasObject is the base class for Canvas Objects.
bool GetRouteWhenDrag()
route also while dragging object
vertex list of line and arc segments.
specialized generator for flow on one a2dcanvasObject using wires
static a2dPinClass * ObjectInput
Pins of this class can only connect to WireInput pins.
static a2dPinClass * FlowBWireInput
Pins of this class can only connect to FlowBWireOutput and FlowBOutput pins.
virtual a2dObject * Clone(CloneOptions options) const
Some stuff needed by the ref counting base class.
static a2dPinClass * FlowBWireOutput
Pins of this class can only connect to FlowBInput and FlowBWireInput pins.
find wire/connect pinclass, given start pinclass of start pin
wxUint64 a2dCanvasObjectFlagsMask
mask flags for a2dCanvasObject
a2dWirePolylineL is a polyline that adjusts itself when the objects it connects move ...
a2dPinClass * GetAnyPinClass() const
return the pin class for GetPinClassForTask( a2dPinClass::Any )
a2dCanvasObjectPtr m_tmplObject
Template for created object which represents a connection. e.g a2dWirePolylineL.
void SetRouteMethod(RouteMethod routing)
set the way routing will be done
virtual a2dObject * Clone(CloneOptions options) const
Some stuff needed by the ref counting base class.
Normal straight line segment in a2dVertexList and a2dVertexArray.
virtual void DoSave(wxObject *parent, a2dIOHandlerXmlSerOut &out, a2dXmlSer_flag xmlparts, a2dObjectList *towrite)
Save settings.
static a2dPinClass * FlowAInput
Pins of this class can only connect to FlowAWireOutput and FlowAOutput pins.
Input and output handler for the XmlSer format.
static a2dPinClass * FlowBOutput
Pins of this class can only connect to FlowBWireInput and FlowBInput pins.
Keep manhattan lines at end intact.
defines common settinsg for a habitat for a set of a2dCameleons.
Same as StraightSegment, unless there are dynamic pins on segment.
static a2dPinClass * FlowAWireOutput
Pins of this class can only connect to FlowAInput and FlowAWireInput pins.
bool m_reverseCreate
how to create a connection
virtual void DoLoad(wxObject *parent, a2dIOHandlerXmlSerIn &parser, a2dXmlSer_flag xmlparts)
Load settings.
general modules header files all together.
Reuse last straight segment at begin or end of line, dynamic pins move with segment.
static const a2dCanvasObjectFlagsMask VISIBLE
a2dPinClass * m_anypinclass
template pinclass
virtual a2dObject * Clone(CloneOptions options) const
Some stuff needed by the ref counting base class.
Same as StraightEndSegment, unless there are dynamic pins on segment.
specialized generator for flow on one a2dcanvasObject using wires
static a2dPinClass * FlowAOutput
Pins of this class can only connect to FlowAWireInput and FlowAInput pins.
void SetAllowRedirect(bool allowredirect)
find normal object pinclass, given Connect/wire pinclass
virtual a2dObject * Clone(CloneOptions options) const
Some stuff needed by the ref counting base class.
static a2dPinClass * ObjectOutput
Pins of this class can only connect to WireOutput pins.
void SetRouteWhenDrag(bool routeWhenDrag)
route also while dragging object
Reroute using Lee routing.
static a2dPinClass * Wire
Pins of this class can only connect to Object pins.
static a2dPinClass * FlowBInput
Pins of this class can only connect to FlowBWireOutput and FlowBOutput pins.
CloneOptions
options for cloning
find normal object pinclass, given Connect/wire pinclass
bool GetAllowRedirect()
see SetAllowRedirect()
when a new wire or other connection object needs to be created,
static a2dPinClass * WireInput
Pins of this class can only connect to ObjectInput pins.