23 #include "wx/geometry.h"
52 void SetConnectionInfo(
58 a2dPinClass* GetStartPinClass()
const {
return m_wireBegin; }
59 void SetStartPinClass(
a2dPinClass* startPinClass ) { m_wireBegin = startPinClass; }
61 a2dPinClass* GetEndPinClass()
const {
return m_wireEnd; }
62 void SetEndPinClass(
a2dPinClass* endPinClass ) { m_wireEnd = endPinClass; }
83 void SetPriority( wxUint8 priority ) { m_priority = priority; }
92 void AdjustBeginEndPinAngle();
133 #if wxART2D_USE_CVGIO
136 #endif //wxART2D_USE_CVGIO
139 void SetEndPoint(
int iEnd,
int iNext,
double x,
double y,
bool final );
158 void OptimizeRerouteWires(
a2dCanvasObject* parent,
bool removeZero =
true,
bool allowredirect =
true );
165 void OnChar( wxKeyEvent& event );
167 virtual
bool DoStartEdit( wxUint16 editmode,
wxEditStyle editstyle );
178 bool m_wasVertical: 1;
186 bool m_rerouteAdd: 1;
188 wxUint8 m_priority: 8;
277 bool m_secondRedirect;
345 void SetVirtWireName(
const wxString& VirtWireName ) { m_VirtWireName = VirtWireName; }
346 const wxString GetVirtWireName()
const {
return m_VirtWireName; }
352 virtual bool DoStartEdit( wxUint16 editmode,
wxEditStyle editstyle );
362 wxString m_VirtWireName;
375 wxDECLARE_EVENT_TABLE();
382 void CreateControls();
384 a2dVirtWire* GetVirtWire()
const {
return m_virtWire; }
389 wxComboBox *m_CBName;
437 void ComputeConToWireVertex(
a2dPin* outPad,
double xw,
double yw,
double angle );
457 void Connect (
double xo,
double yo,
int diro,
double xi,
double yi,
int diri );
458 void Correct (
double x,
double y,
double w,
double h );
459 void Transform (
int mode,
int dout,
double xout,
double yout,
double x,
double y,
double* tx,
double* ty );
460 void Shape3P (
double xi,
double yi );
461 void Shape4PD (
double xi,
double yi );
462 void Shape4PU (
double xi,
double yi );
463 void Shape5PB (
double xi,
double yi,
int sign );
464 void Shape5PT (
double xi,
double yi,
int sign );
465 void Shape6P (
double xi,
double yi,
int sign );
466 int Overcross (
double x,
double y,
double w,
double h,
double x1,
double y1,
double x2,
double y2 );
virtual bool IsVirtConnect() const
object is a virtual connection (connects invisible with other objects without using wires ) ...
Temporary object used in editing connected objects.
all basic primitives derived from a2dCanvasObject
a2dConnectTask
flags for searching a connecting a2dpinClass, for the connecting task at hand.
#define a2dACCUR
accuracy used to have some limit to calculation like hittesting
class to map references to objects stored in XML, in order to make the connection later on...
a2dPin is used in a2dCanvasObject to add pins to it.
This is a class/type description for a2dPin's.
void DoSave(wxObject *parent, a2dIOHandlerXmlSerOut &out, a2dXmlSer_flag xmlparts, a2dObjectList *towrite)
write object specific CVGL data
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.
Input and output handler for the XmlSer format.
a command processor specially designed to work with a a2dCanvasDocument
OVERLAP
Result of a a2dBoundingBox intersection or hittest.
The base class for all drawable objects in a a2dCanvasDocument.
void SetReroute(bool onOff)
indicated if the wire still needs to be rerouted, used in routing algorithms of wire between objects...
a2dCanvasObject is the base class for Canvas Objects.
void SetRouteOneLine(bool oneLine)
set true result in having straight lines rerouted between begin and end pin
vertex list of line and arc segments.
double m_smax
object min half size
a2dWirePolylineL is a polyline that adjusts itself when the objects it connects move ...
a2dText is an abstract base class.
void SetPriority(wxUint8 priority)
used to set order of rerouting in a set of lines.
polyline defined with list of points.
bounding class for optimizing drawing speed.
#define wxStaticCast(obj, className)
The wxWindows 2.4.2 wxStaticCast is buggy. It evaluates its argument twice.
Input and output handler for the XmlSer format.
double m_offset
first & last segment min size
Contains a2dDrawing Class to hold a drawing.
bool GetRerouteAdded() const
see SetRerouteAdded()
void SetParent(a2dCanvasObject *parent)
set parent object of the pin or some other objects that needs a parent
Each a2dCommand is given a command id at construction.
A 2x3 affine matrix class for 2D transformations.
void DoLoad(wxObject *parent, a2dIOHandlerXmlSerIn &parser, a2dXmlSer_flag xmlparts)
load object specific CVG data
while iterating a a2dCanvasDocument, this holds the context.
virtual bool AdjustAfterChange(bool final)
adjust the polygon after a point change
static a2dPinClass * Standard
Pins of this class can only connect to pins of the same class.
bool GetRouteOneLine()
see SetRouteOneLine()
a2dCanvasObject * GetParent() const
void SetRerouteAdded(bool onOff)
indicated if the wire is added recently to be rerouted, used in routing algorithms of wire between ob...
all polygon and polyline a2dCanvasObject are here.
virtual bool NeedsUpdateWhenConnected() const
used in case of flexible canvas objects (wires).
wxUint8 GetPriority() const
See SetPriority()
virtual bool IsConnect() const
return true, if this object is used to connect other object's using rubberband like structures...
CloneOptions
options for cloning
bool GetReroute() const
see SetReroute()
virtual a2dObject * DoClone(CloneOptions options, a2dRefMap *refs) const
Clone this object and return a pointer to the new object.
a base command for the a2dCommandProcessor