22 #ifndef __WXCANGLOB_H__
23 #define __WXCANGLOB_H__
33 #include "wx/geometry.h"
35 #include <wx/module.h>
69 bool InGroup( wxUint16 layer );
78 #if wxUSE_PRINTING_ARCHITECTURE
97 virtual bool OnInit();
98 virtual void OnExit();
100 static const a2dFont& GetFontMedBold() {
return *m_FontMedBold; }
101 static const a2dFont& GetFontMed() {
return *m_FontMed; }
102 static const a2dFont& GetFontSmall() {
return *m_FontSmall; }
103 static const a2dFont& GetFontMini() {
return *m_FontMini; }
105 static void SetFontMedBold(
a2dFont& font ) { *m_FontMedBold = font; }
106 static void SetFontMed(
a2dFont& font ) { *m_FontMed = font; }
107 static void SetFontSmall(
a2dFont& font ) { *m_FontSmall = font; }
108 static void SetFontMini(
a2dFont& font ) { *m_FontMini = font; }
117 #if wxUSE_PRINTING_ARCHITECTURE
118 wxPrintPaperDatabase* m_wxThePrintPaperDatabase;
134 BEGIN_DECLARE_EVENT_TYPES()
136 DECLARE_EXPORTED_EVENT_TYPE( A2DCANVASDLLEXP, wxEVT_CANVASOBJECT_MOUSE_EVENT, 1 )
138 DECLARE_EXPORTED_EVENT_TYPE( A2DCANVASDLLEXP, wxEVT_CANVASOBJECT_ENTER_EVENT, 1 )
140 DECLARE_EXPORTED_EVENT_TYPE( A2DCANVASDLLEXP, wxEVT_CANVASOBJECT_LEAVE_EVENT, 1 )
142 DECLARE_EXPORTED_EVENT_TYPE( A2DCANVASDLLEXP, wxEVT_CANVASHANDLE_MOUSE_EVENT, 1 )
144 DECLARE_EXPORTED_EVENT_TYPE( A2DCANVASDLLEXP, wxEVT_CANVASHANDLE_MOUSE_EVENT_ENTER, 1 )
146 DECLARE_EXPORTED_EVENT_TYPE( A2DCANVASDLLEXP, wxEVT_CANVASHANDLE_MOUSE_EVENT_LEAVE, 1 )
148 DECLARE_EXPORTED_EVENT_TYPE( A2DCANVASDLLEXP, wxEVT_CANVASOBJECT_RESIZE_EVENT, 1 )
150 DECLARE_EXPORTED_EVENT_TYPE( A2DCANVASDLLEXP, wxEVT_CANVASOBJECT_POPUPMENU_EVENT, 1 )
151 END_DECLARE_EVENT_TYPES()
177 double GetX() {
return m_x; }
178 double GetY() {
return m_y; }
183 a2dIterC* GetIterC() {
return m_ic; }
185 void SetIterC(
a2dIterC* ic ) { wxASSERT( !m_ic ); m_ic = ic; }
253 wxMouseEvent m_mouseevent;
297 wxMouseEvent m_mouseevent;
312 #define EVT_CANVASOBJECT_MOUSE_EVENT(func) DECLARE_EVENT_TABLE_ENTRY( wxEVT_CANVASOBJECT_MOUSE_EVENT, wxID_ANY, wxID_ANY, (wxObjectEventFunction) static_cast < a2dCanvasObjectMouseEventFunction > ( & func ), (wxObject *) NULL ),
314 #define EVT_CANVASOBJECT_ENTER_EVENT(func) DECLARE_EVENT_TABLE_ENTRY( wxEVT_CANVASOBJECT_ENTER_EVENT, wxID_ANY, wxID_ANY, (wxObjectEventFunction) static_cast < a2dCanvasObjectMouseEventFunction > ( & func ), (wxObject *) NULL ),
316 #define EVT_CANVASOBJECT_LEAVE_EVENT(func) DECLARE_EVENT_TABLE_ENTRY( wxEVT_CANVASOBJECT_LEAVE_EVENT, wxID_ANY, wxID_ANY, (wxObjectEventFunction) static_cast < a2dCanvasObjectMouseEventFunction > ( & func ), (wxObject *) NULL ),
318 #define EVT_CANVASHANDLE_MOUSE_EVENT(func) DECLARE_EVENT_TABLE_ENTRY( wxEVT_CANVASHANDLE_MOUSE_EVENT, wxID_ANY, wxID_ANY, (wxObjectEventFunction) static_cast < a2dCanvasHandleMouseEventFunction > ( & func ), (wxObject *) NULL ),
320 #define EVT_CANVASHANDLE_MOUSE_EVENT_ENTER(func) DECLARE_EVENT_TABLE_ENTRY( wxEVT_CANVASHANDLE_MOUSE_EVENT_ENTER, wxID_ANY, wxID_ANY, (wxObjectEventFunction) static_cast < a2dCanvasHandleMouseEventFunction > ( & func ), (wxObject *) NULL ),
322 #define EVT_CANVASHANDLE_MOUSE_EVENT_LEAVE(func) DECLARE_EVENT_TABLE_ENTRY( wxEVT_CANVASHANDLE_MOUSE_EVENT_LEAVE, wxID_ANY, wxID_ANY, (wxObjectEventFunction) static_cast < a2dCanvasHandleMouseEventFunction > ( & func ), (wxObject *) NULL ),
324 #define EVT_CANVASOBJECT_POPUPMENU_EVENT(func) DECLARE_EVENT_TABLE_ENTRY( wxEVT_CANVASOBJECT_POPUPMENU_EVENT, wxID_ANY, wxID_ANY, (wxObjectEventFunction) static_cast < a2dCanvasObjectMouseEventFunction > ( & func ), (wxObject *) NULL ),
327 #define EVT_CANVASOBJECT_RESIZE_EVENT(func) DECLARE_EVENT_TABLE_ENTRY( wxEVT_CANVASOBJECT_RESIZE_EVENT, wxID_ANY, wxID_ANY, (wxObjectEventFunction) static_cast < a2dCanvasObjectEventFunction > ( & func ), (wxObject *) NULL ),
331 typedef unsigned int a2dCursorId;
332 typedef unsigned int a2dImageId;
334 A2DCANVASDLLEXP
extern const a2dCursorId a2dCURSOR_NONE;
335 A2DCANVASDLLEXP
extern const a2dCursorId a2dCURSOR_ARROW;
336 A2DCANVASDLLEXP
extern const a2dCursorId a2dCURSOR_RIGHT_ARROW;
337 A2DCANVASDLLEXP
extern const a2dCursorId a2dCURSOR_BULLSEYE;
338 A2DCANVASDLLEXP
extern const a2dCursorId a2dCURSOR_CHAR;
339 A2DCANVASDLLEXP
extern const a2dCursorId a2dCURSOR_CROSS;
340 A2DCANVASDLLEXP
extern const a2dCursorId a2dCURSOR_HAND;
341 A2DCANVASDLLEXP
extern const a2dCursorId a2dCURSOR_IBEAM;
342 A2DCANVASDLLEXP
extern const a2dCursorId a2dCURSOR_LEFT_BUTTON;
343 A2DCANVASDLLEXP
extern const a2dCursorId a2dCURSOR_MAGNIFIER;
344 A2DCANVASDLLEXP
extern const a2dCursorId a2dCURSOR_MIDDLE_BUTTON;
345 A2DCANVASDLLEXP
extern const a2dCursorId a2dCURSOR_NO_ENTRY;
346 A2DCANVASDLLEXP
extern const a2dCursorId a2dCURSOR_PAINT_BRUSH;
347 A2DCANVASDLLEXP
extern const a2dCursorId a2dCURSOR_PENCIL;
348 A2DCANVASDLLEXP
extern const a2dCursorId a2dCURSOR_POINT_LEFT;
349 A2DCANVASDLLEXP
extern const a2dCursorId a2dCURSOR_POINT_RIGHT;
350 A2DCANVASDLLEXP
extern const a2dCursorId a2dCURSOR_QUESTION_ARROW;
351 A2DCANVASDLLEXP
extern const a2dCursorId a2dCURSOR_RIGHT_BUTTON;
352 A2DCANVASDLLEXP
extern const a2dCursorId a2dCURSOR_SIZENESW;
353 A2DCANVASDLLEXP
extern const a2dCursorId a2dCURSOR_SIZENS;
354 A2DCANVASDLLEXP
extern const a2dCursorId a2dCURSOR_SIZENWSE;
355 A2DCANVASDLLEXP
extern const a2dCursorId a2dCURSOR_SIZEWE;
356 A2DCANVASDLLEXP
extern const a2dCursorId a2dCURSOR_SIZING;
357 A2DCANVASDLLEXP
extern const a2dCursorId a2dCURSOR_SPRAYCAN;
358 A2DCANVASDLLEXP
extern const a2dCursorId a2dCURSOR_WAIT;
359 A2DCANVASDLLEXP
extern const a2dCursorId a2dCURSOR_WATCH;
360 A2DCANVASDLLEXP
extern const a2dCursorId a2dCURSOR_BLANK;
361 A2DCANVASDLLEXP
extern const a2dCursorId a2dCURSOR_ARROWWAIT;
363 A2DCANVASDLLEXP
extern const a2dCursorId a2dCURSOR_Select;
364 A2DCANVASDLLEXP
extern const a2dCursorId a2dCURSOR_Select2;
365 A2DCANVASDLLEXP
extern const a2dCursorId a2dCURSOR_Zoom;
366 A2DCANVASDLLEXP
extern const a2dCursorId a2dCURSOR_Drag;
367 A2DCANVASDLLEXP
extern const a2dCursorId a2dCURSOR_Move;
368 A2DCANVASDLLEXP
extern const a2dCursorId a2dCURSOR_Copy;
369 A2DCANVASDLLEXP
extern const a2dCursorId a2dCURSOR_DrawWire;
370 A2DCANVASDLLEXP
extern const a2dCursorId a2dCURSOR_EditWire;
371 A2DCANVASDLLEXP
extern const a2dCursorId a2dCURSOR_EditWireVertex;
372 A2DCANVASDLLEXP
extern const a2dCursorId a2dCURSOR_EditWireDeleteVertex;
373 A2DCANVASDLLEXP
extern const a2dCursorId a2dCURSOR_EditWireSegment;
374 A2DCANVASDLLEXP
extern const a2dCursorId a2dCURSOR_EditWireSegmentHorizontal;
375 A2DCANVASDLLEXP
extern const a2dCursorId a2dCURSOR_EditWireSegmentVertical;
376 A2DCANVASDLLEXP
extern const a2dCursorId a2dCURSOR_WireSegmentInsert;
377 A2DCANVASDLLEXP
extern const a2dCursorId a2dCURSOR_Edit;
378 A2DCANVASDLLEXP
extern const a2dCursorId a2dCURSOR_EditVertex;
379 A2DCANVASDLLEXP
extern const a2dCursorId a2dCURSOR_EditDeleteVertex;
380 A2DCANVASDLLEXP
extern const a2dCursorId a2dCURSOR_EditSegment;
381 A2DCANVASDLLEXP
extern const a2dCursorId a2dCURSOR_EditSegmentHorizontal;
382 A2DCANVASDLLEXP
extern const a2dCursorId a2dCURSOR_EditSegmentVertical;
383 A2DCANVASDLLEXP
extern const a2dCursorId a2dCURSOR_SegmentInsert;
385 A2DCANVASDLLEXP
extern const a2dCursorId a2dCURSOR_HandleLeftDown;
386 A2DCANVASDLLEXP
extern const a2dCursorId a2dCURSOR_HandleMove;
387 A2DCANVASDLLEXP
extern const a2dCursorId a2dCURSOR_HandleDrag;
388 A2DCANVASDLLEXP
extern const a2dCursorId a2dCURSOR_HandleEnter;
389 A2DCANVASDLLEXP
extern const a2dCursorId a2dCURSOR_HandleLeave;
391 A2DCANVASDLLEXP
extern const a2dCursorId a2dCURSOR_CanvasObjectHit;
392 A2DCANVASDLLEXP
extern const a2dCursorId a2dCURSOR_CanvasObjectEnter;
393 A2DCANVASDLLEXP
extern const a2dCursorId a2dCURSOR_CanvasObjectLeave;
397 A2DCANVASDLLEXP
extern const a2dImageId a2dBitmap_EditRectangleFill;
408 virtual wxCursor& GetCursor( a2dCursorId
id );
410 virtual wxBitmap& GetImage( a2dImageId
id );
413 map<a2dCursorId, wxCursor> m_cursorsLoaded;
416 map<a2dImageId, wxBitmap> m_imageLoaded;
448 void SetDefaultUnitsScale(
double scale ) { m_defaultUnitsScale = scale; }
449 double GetDefaultUnitsScale() {
return m_defaultUnitsScale; }
457 void USERUNITS(
double userunit );
459 void PHYSUNITS(
double physicalunit );
464 double POLYTOARCRMIN();
465 double POLYTOARCRMAX();
466 double POLYTOARCABER();
468 double ARCTOPOLYABER();
483 void SetLayerSetup(
a2dLayers* layersetup );
485 void SetSymbolLayer( wxUint16 layerId ) { m_symbolLayer = layerId; }
486 wxUint16 GetSymbolLayer() {
return m_symbolLayer; }
488 void SetMaxLayer( wxUint16 nrLayers ) { m_maximumLayers = nrLayers; }
489 wxUint16 GetMaxLayer() {
return m_maximumLayers; }
493 bool LoadLayers(
const wxString& filename );
495 void SetPinSize(
double size ) { m_defPinSize = size; }
497 double GetPinSize() {
return m_defPinSize; }
499 void SetHandleSize(
double size ) { m_defHandleSize = size; }
501 double GetHandleSize() {
return m_defHandleSize; }
504 void SetPin(
a2dPin* newpin );
510 void SetPinCanConnect(
a2dPin* newpin );
514 a2dPin* GetPinCanConnect();
517 void SetPinCannotConnect(
a2dPin* newpin );
521 a2dPin* GetPinCannotConnect();
539 void SetHighLightStroke(
const a2dStroke& stroke );
542 void SetHighLightFill(
const a2dFill& fill );
557 void SetSelectStroke(
const a2dStroke& stroke );
560 void SetSelectFill(
const a2dFill& fill );
563 void SetSelect2Stroke(
const a2dStroke& stroke );
566 void SetSelect2Fill(
const a2dFill& fill );
574 void SetDrawStyle( wxUint32 drawstyle );
586 void SetDefaultStroke(
const a2dStroke& stroke );
589 void SetDefaultFill(
const a2dFill& fill );
664 void AddGroupA( wxUint16 layer ) { m_groupA.push_back( layer ); }
667 void AddGroupB( wxUint16 layer ) { m_groupB.push_back( layer ); }
670 void SetTarget( wxUint16 target );
703 void SetBooleanEngineSmoothAber(
const a2dDoMu& aber ) { m_SmoothAber = aber; }
704 void SetBooleanEngineLinkHoles(
bool doLinkHoles ) { m_LinkHoles = doLinkHoles; }
710 void SetAberPolyToArc(
const a2dDoMu& aber );
712 void SetAberArcToPoly(
const a2dDoMu& aber );
714 void SetSmall(
const a2dDoMu& smallest );
716 bool GdsIoSaveTextAsPolygon(
bool onOff );
717 bool KeyIoSaveTextAsPolygon(
bool onOff );
719 bool GetGdsIoSaveTextAsPolygon()
const;
720 bool GetKeyIoSaveTextAsPolygon()
const;
734 void SetGridX(
const a2dDoMu& gridX );
736 void SetGridY(
const a2dDoMu& gridY );
785 void SetRelativeStart(
double x,
double y ) { m_RelativeStartX = x; m_RelativeStartY = y; }
807 void SetStroke(
const a2dStroke& stroke );
810 void SetStroke(
const unsigned char red,
const unsigned char green,
const unsigned char blue );
816 void SetFill(
const a2dFill& fill );
819 void SetFill(
const unsigned char red,
const unsigned char green,
const unsigned char blue );
824 void SetSpline(
bool spline ) { m_spline = spline; }
857 void SetContourWidthInDataBaseUnits(
double width );
862 void SetContourWidth(
const a2dDoMu& currentContourWidth );
869 double GetContourWidthInDataBaseUnits()
const;
881 void SetFont(
const a2dFont& font );
893 void SetTextStroke(
const a2dStroke& stroke );
905 void SetTextFill(
const a2dFill& fill );
914 void SetTextFont(
const a2dFont& font );
927 void SetLayer( wxUint16 layer,
bool setStyleOfLayer =
false );
930 inline wxUint16
GetLayer()
const {
return m_layer; }
941 void SetDrawingTemplate(
a2dDrawing* drawingTemplate);
945 void SetSymbolDrawingTemplate(
a2dDrawing* drawingTemplate);
949 void SetBuildInDrawingTemplate(
a2dDrawing* drawingTemplate);
951 a2dDrawing* GetBuildInDrawingTemplate()
const;
953 void SetDiagramDrawingTemplate(
a2dDrawing* drawingTemplate);
955 a2dDrawing* GetDiagramDrawingTemplate()
const;
957 void SetGuiDrawingTemplate(
a2dDrawing* drawingTemplate);
982 a2dNextSeg m_endSegmentMode;
990 double m_defHandleSize;
1001 double m_physicalunits;
1002 double m_default_acc;
1003 double m_displayaberration;
1004 double m_arc2polyaber;
1005 double m_poly2arcMin;
1006 double m_poly2arcMax;
1007 double m_poly2arcAber;
1009 double m_defaultUnitsScale;
1072 wxUint16 m_symbolLayer;
1079 static wxUint16 m_maximumLayers;
1167 bool m_keySaveTextAsPolygon;
1168 bool m_gdsiiSaveTextAsPolygon;
1169 bool m_keySaveFromView;
1170 bool m_gdsiiSaveFromView;
1188 static const a2dSignal sig_changedStroke;
1189 static const a2dSignal sig_changedFont;
1190 static const a2dSignal sig_changedLayer;
1191 static const a2dSignal sig_changedTarget;
1192 static const a2dSignal sig_SetPathType;
1193 static const a2dSignal sig_SetContourWidth;
1195 static const a2dSignal sig_changedTextFill;
1196 static const a2dSignal sig_changedTextStroke;
1197 static const a2dSignal sig_changedTextFont;
1226 wxPoint m_initialDocChildFramePos;
1227 wxSize m_initialDocChildFrameSize;
1228 long m_initialDocChildFrameStyle;
1229 long m_initialWorldCanvasStyle;
1240 wxCursor& GetCursor( a2dCursorId
id ) {
return m_artProvider->GetCursor(
id ); }
1242 void SetPopBeforePush(
bool popBeforePush ) { m_popBeforePush = popBeforePush; }
1244 bool GetPopBeforePush() {
return m_popBeforePush; }
1264 a2dHabitat* GetHabitat()
const {
return m_habitat; }
1266 void SetHabitat(
a2dHabitat* habitat ) { m_habitat = habitat; }
1270 a2dHabitatPtr m_habitat;
1277 bool m_popBeforePush;
1280 bool m_oneShotTools;
1283 bool m_editAtEndTools;
1311 #define EVT_CANVASOBJECT_TIMER(timerid, func) \
1312 DECLARE_EVENT_TABLE_ENTRY( wxEVT_TIMER, timerid, -1, (wxObjectEventFunction) wxStaticCastEvent( wxCanvasObjectTimerEventFunction, & func ), NULL),
1327 m_canvasObjectOwner = NULL; m_id = 0;
1337 m_canvasObjectOwner = owner;
1348 m_canvasObjectOwner = owner;
1356 wxCHECK_RET( m_canvasObjectOwner, _T(
"a2dTimer::Notify() should be overridden." ) );
1358 #if !wxCHECK_VERSION(2,9,0)
1359 wxTimerEvent event( m_id, m_milli );
1361 wxTimerEvent event( *
this );
1363 m_canvasObjectOwner->ProcessEvent( event );
1369 wxEvtHandler* m_canvasObjectOwner;
Display Part of a a2dDrawing, in which a2dCanvasObjects are shown.
bool GetTextOwnStyle() const
get the current text stroke
double GetObjectGridSize()
used for objects which depend in size on this grid
a2dDoMu m_currentContourWidth
current contour width e.g for polyline with width.
void(wxEvtHandler::* wxCanvasObjectTimerEventFunction)(wxTimerEvent &)
a2dEvtHandler event function for wxTimerEvent
a2dText derived from a2dCanvasObject, holds multiline text
a2dPATH_END_TYPE
defines the way a polyline with a contour width is ended.
a2dDoMu m_AberPolyToArc
Polygon/polyline to Arc Maximum abberation.
all basic primitives derived from a2dCanvasObject
Base class for all types of strokes, understood by a2dDrawer2D classes.
wxUint16 GetLayer() const
layer set for new objects.
double m_coordinateepsilon
void SetRouteOneLine(bool oneLine)
set true result in having straight lines rerouted between begin and end pin
a2dDoMu m_CORRECTIONABER
boolean operation setting
a2dLayerGroup()
constructor
static const a2dSignal sig_changedFill
when active drawing is set, this signal is send to the drawing.
double m_hitmargin_world
hit marging in world units.
a2dHandle is used inside editing versions of a certain objects.
void SetEditAtEndTools(bool editAtEndTools)
when set, drawing tools are going into edit mode after drawing
a2dLayerGroup & GetGroupA()
return group A layers
mouse event sent from a2dCanvasObject to itself
a2dCanvasObjectPtr m_currentEnd
current endobject for lines and polylines
void SetEndScaleX(double xs)
scaling in X for begin and end objects of lines and polylines
#define wxDEFAULTMAXLAYER
maximum number of layers allowed
a2dCanvasObject * GetLineEnd() const
get current line end object for line and polyline.
bool m_LinkHoles
boolean operation setting
fundamental classes used by all other modules.
void SetLineEnd(a2dCanvasObject *end)
set current line end object for line and polyline.
a2dDoMu m_SMOOTHABER
boolean operation setting
class to map references to objects stored in XML, in order to make the connection later on...
a2dDocumentRenderStyle operator|(a2dDocumentRenderStyle a, a2dDocumentRenderStyle b)
OR-ing a2dDocumentRenderStyle is allowed.
wxUint32 GetDrawStyle()
get drawstyles used for drawing the document
void SetTextTemplateObject(a2dText *textTemplateobject)
get template for text objects
const a2dDoMu & GetContourWidth() const
get the Contour width of shapes in meters
a2dStroke m_SelectStroke
Stroke to use for selected a2dCanvasObject's.
bool m_WINDINGRULE
boolean operation setting
virtual wxEvent * Clone() const
clone the event
One Global instance of this class exists, in order to get to global needed objects.
a2dFill m_SelectFill
Fill to use for selected a2dCanvasObject's.
a2dFill m_HighLightFill
Fill to use for Highlighted a2dCanvasObject's.
a2dPin is used in a2dCanvasObject to add pins to it.
void SetCoordinateEpsilon(double val)
bool GetSelectedOnlyB() const
get selectedOnlyB in group operations
void SetOneShotTools(bool oneShotTools)
when set, tools are pushed in one shotmode in PushTool()
double m_ROUNDFACTOR
boolean operation setting
void SetBooleanEngineCorrectionFactor(const a2dDoMu &aber)
boolean engine setting
a2dCanvasObjectPtr m_currentBegin
current beginobject for lines and polylines
void(wxEvtHandler::* a2dCanvasHandleMouseEventFunction)(a2dHandleMouseEvent &)
event function for a2dHandleMouseEvent
contains global settings for the a2dCanvas library
wxUint16 GetHitMarginDevice() const
hit marging in pixels.
double m_lastX
holds last mouse X position in world coordinates, as set by tools.
wxUint16 m_hitmargin_device
hit marging in pixels.
Defines a font to be set to a2dDrawer2D or stored in a2dCanvsObject etc.
a2dDoMu m_AberArcToPoly
Arc to Polygon/polyline Maximum abberation.
a2dPATH_END_TYPE GetPathType()
get when m_contourwidth != 0 what is the end of the line looks like.
a2dSmrtPtr< a2dText > m_textTemplateObject
object to clone to use as start
void SetSelectedOnlyB(bool selectedOnlyB)
set selectedOnlyB in group operations
double m_DGRID
boolean operation setting
a2dDoMu m_radiusMax
Polygon/polyline to Arc Maximum radius to test.
a2dDoMu m_CORRECTIONFACTOR
boolean operation setting
a2dDoMu m_MAXLINEMERGE
boolean operation setting
snapping engine, for snapping while editing a drawing
a2dDoMu m_small
detect samll objects
double m_objectGridSize
used for objects which depend in size on this grid
a2dCanvasObject * GetLineBegin() const
get current line begin object for line and polyline.
a2dPATH_END_TYPE m_pathtype
when m_contourwidth != 0 what is the end of the line/polyline.
a2dCanvasObject is the base class for Canvas Objects.
void(wxEvtHandler::* a2dCanvasObjectEventFunction)(a2dCanvasObjectEvent &)
event function for a2dCanvasObjectEvent
wxUint16 GetTarget()
get target layer in operation
wxUint16 m_target
target layer in operations
a2dFill m_DefaultFill
Fill to use for non layered a2dCanvasObject's.
double m_currentYscale
end point scaling
double GetBooleanEngineRoundfactor() const
boolean engine setting
a2dTimer(wxEvtHandler *owner, int id=-1)
constructor
bool GetSpline() const
certain drawing tools like polygon drawing use this setting
void SetEndScaleY(double ys)
scaling in Y for begin and end objects of lines and polylines
store and convert number to number with unit and visa versa. e.g. 1.23e-6 => 1.23 * 1e-6 ...
a2dDrawingPart * GetActiveDrawingPart()
return the currently/last active drawing part.
double m_copymindistance
the minimum distance in world units of a copied object from the original
double GetHitMarginWorld() const
hit marging in world units.
const a2dDoMu & GetRadiusMin() const
Polygon/polyline to Arc Minimum radius to test.
a2dDocumentRenderStyle m_SelectDrawStyle
draw style to be used for selected object
a2dDoMu m_radiusMin
Polygon/polyline to Arc Minimum radius to test.
bool m_oneLine
used in routing wires to be straight or manhatten
virtual wxEvent * Clone(bool deep=true) const
clone the event
double m_RelativeStartY
The RelativeStart start is used when mesuring using a tool, or from the commandline.
void SetOwner(wxEvtHandler *owner, int id=-1)
set object to recieve timer event.
void SetHitMarginWorld(double val)
hit marging in world units.
const a2dDoMu & GetBooleanEngineCorrectionAber() const
boolean engine setting
a2dNextSeg GetEndSegmentMode()
a2dDrawWirePolylineLTool segment mode initilization
Io handler to iterate through a a2dDocument.
double m_currentXscale
begin point scaling
wxUint16 m_layer
layer to be set for new objects
wxMouseEvent & GetMouseEvent()
return the original mouse event that was redirected to the a2dHandle
void SetBooleanEngineCorrectionAber(const a2dDoMu &aber)
boolean engine setting
double GetRelativeStartY() const
holds last RelativeStart measurement Y position in world coordinates
bool m_clearTarget
clear target layer before adding results of an operation
a2dRestrictionEnginePtr m_restrictionEngine
restriction engine to be used usually (if zero don't restrict)
a2dDoMu m_SmoothAber
boolean operation setting
a2dText is an abstract base class.
bool GetClearTarget() const
get clear of target in group operations
see a2dCanvasObjectMouseEvent
void SetRadiusMax(const a2dDoMu &radiusMax)
Polygon/polyline to Arc Maximum radius to test.
void SetClearTarget(bool clearTarget)
set clear of target in group operations
bool GetOneShotTools()
see SetOneShotTools()
bool GetEditAtEndTools()
see SetEditAtEndTools
static const a2dSignal sig_changedActiveDrawing
when active drawing is set, this signal is send to the drawing.
const a2dStroke & GetStroke() const
get the current stroke
void SetGroupA(const a2dLayerGroup &groupA)
sets operand A in layer operation
double GetRelativeStartX() const
holds last RelativeStart measurement X position in world coordinates
double GetCoordinateEpsilon() const
coordinates below this distance will be trated as equal
layer settings for a a2dCanvasDocument Holds layers settings classes
a2dHit & GetHow()
in what manner the a2dCanvasObject was hit.
bool GetRouteOneLine() const
see SetRouteOneLine()
double GetCopyMinDistance() const
get minimum distance of copied object from original
double GetLastYEntry() const
holds last mouse Y position in world coordinates, as set by tools.
bool m_spline
spline polygons
double GetLastXEntry() const
holds last mouse X position in world coordinates, as set by tools.
general event sent from a2dHandle to its parent a2dCanvasObject
a2dFont m_font
current font set
Restriction engine for editing restrictions like snapping.
void SetBooleanEngineDGrid(double dgrid)
boolean engine setting
void SetBooleanEngineMaxlinemerge(const a2dDoMu &maxline)
boolean engine setting
void SetEndSegmentMode(a2dNextSeg mode)
a2dDrawWirePolylineLTool segment mode initilization
bool GetReverseOrder() const
Get Setting for draw layers in reverse order.
void SetConnectionGenerator(a2dConnectionGenerator *connectionGenerator)
Set class for generating new connection objects between object and pins.
a2dLayerGroup m_groupB
for operation on groups of layers
void SetTextOwnStyle(bool ownStyle)
If set, the text objects will use their own style ( GetTextStroke() etc. )
a2dFill m_Select2Fill
Fill to use for selected2 a2dCanvasObject's.
void SetBooleanEngineRoundfactor(double roundfac)
boolean engine setting
a2dHandle * GetCanvasHandle()
return the handle object hit
bool m_selectedOnlyB
operations on m_groupB but only selected objects
bool GetBooleanEngineWindingRule() const
boolean engine setting
a2dBoundingBox & GetBbox()
in case of wxEVT_CANVASOBJECT_RESIZE_EVENT event get boundingbox which was sent
initiation module for the wxArt2D library
defines common settinsg for a habitat for a set of a2dCameleons.
void SetLastXyEntry(double x, double y)
set last mouse X position in world coordinates, as set by tools.
A 2x3 affine matrix class for 2D transformations.
wxMouseEvent & GetMouseEvent()
return the original mouse event that was redirected to the a2dCanvasObject
void SetRelativeStart(double x, double y)
set RelativeStart measurement X and Y position in world coordinates
a2dDoMu m_gridY
canvas default grid in Y
void AddGroupB(wxUint16 layer)
add layer to group B layers
a2dStroke m_HighLightStroke
Stroke to use for Highlighted a2dCanvasObject's.
bool m_selectedOnlyA
operations on m_groupA but only selected objects
while iterating a a2dCanvasDocument, this holds the context.
Contains graphical drawing context specific classes. a2dDrawer2D and derived classes are used for dra...
struct for how a single object on one layer was hit
void AddGroupA(wxUint16 layer)
add layer to group A layers
double GetEndScaleY() const
get scaling in Y for begin and end objects of lines and polylines
double m_RelativeStartX
The RelativeStart start is used when mesuring using a tool, or from the commandline.
const a2dFill & GetFill() const
get the current fill
void SetObjectGridSize(double objectGridSize)
used for objects which depend in size on this grid
a2dConnectionGenerator * GetConnectionGenerator() const
Get class for generating new connection objects between object and pins.
void SetRadiusMin(const a2dDoMu &radiusMin)
Polygon/polyline to Arc Minimum radius to test.
const a2dDoMu & GetBooleanEngineCorrectionFactor() const
boolean engine setting
void SetBooleanEngineGrid(long grid)
boolean engine setting
const a2dDoMu & GetSmall() const
detection of small object, smaller than this
const a2dDoMu & GetBooleanEngineMarge() const
boolean engine setting
a2dConnectionGeneratorPtr m_connectionGenerator
generator for new connections
void(wxEvtHandler::* a2dCanvasObjectMouseEventFunction)(a2dCanvasObjectMouseEvent &)
event function for a2dCanvasObjectMouseEvent
a2dLayers * GetLayerSetup()
Get the central layersettings for the canvas library.
double GetBooleanEngineDGrid() const
boolean engine setting
bool m_reverse_order
draw document in reverse order if set, used as default value for a2dCanvasDocument.
a2dDocumentRenderStyle m_documentDrawStyle
draw style to be used for drawing with e.g. a2dDrawingPart.
wxArt2D specific a2dTimer which notifies a2dCanvasObject's
void SetBooleanEngineMarge(const a2dDoMu &marge)
boolean engine setting
const a2dFont & GetFont() const
get current font active font.
long GetBooleanEngineGrid() const
boolean engine setting
a2dDocumentRenderStyle GetSelectDrawStyle() const
returns draw style to be used for selected object
a2dStroke m_Select2Stroke
Stroke to use for selected2 a2dCanvasObject's.
void SetLineBegin(a2dCanvasObject *begin)
set current line begin object for line and polyline.
virtual wxEvent * Clone(bool deep=true) const
clone the event
const a2dDoMu & GetBooleanEngineSmoothAber() const
boolean engine setting
a2dPathList & GetLayersPathList() const
Path for Icons and small bitmaps.
const a2dDoMu & GetRadiusMax() const
Polygon/polyline to Arc Maximum radius to test.
holds a list of layers numbers
long m_GRID
boolean operation setting
void SetGroupB(const a2dLayerGroup &groupB)
sets operand B in layer operation
a2dStroke m_currentstroke
stroke to be set for new objects
The a2dBoundingBox class stores one a2dBoundingBox of a a2dCanvasObject.
void SetSelectDrawStyle(a2dDocumentRenderStyle drawstyle)
sets draw style to be used for selected object
a2dCanvasObject * GetCanvasObject()
return the object hit
void SetHitMarginDevice(wxUint16 val)
hit marging in pixels.
a2dCanvasGlobal * a2dCanvasGlobals
global a2dCanvasGlobal to have easy access to global settings
bool GetBooleanEngineLinkHoles() const
boolean engine setting
void SetRestrictionEngine(a2dRestrictionEngine *restrict)
Set restriction engine (grid snapping) used normally.
a2dFill m_currentfill
fill to be set for new objects
This template class is for property ids with a known data type.
void SetCopyMinDistance(double val)
set minimum distance of copied object from original
a2dDoMu m_gridX
canvas default grid in X
void SetBooleanEngineWindingRule(bool rule)
boolean engine setting
const a2dDoMu & GetAberPolyToArc() const
Polygon/polyline to Arc Maximum abberation.
a2dLayerGroup m_groupA
for operation on groups of layers
double m_lastY
holds last mouse Y position in world coordinates, as set by tools.
a2dLayerGroup & GetGroupB()
return group B layers
a2dDocumentRenderStyle
Define the manner in which a2dCanvasView draws the document to the device.
a2dStroke m_DefaultStroke
Stroke to use for non layered a2dCanvasObject's.
void SetReverseOrder(bool reverse_order)
Set to draw layers in reverse order.
a2dDoMu m_MARGE
boolean operation setting
const a2dDoMu & GetAberArcToPoly() const
Arc to Polygon/polyline Maximum abberation.
void SetSelectedOnlyA(bool selectedOnlyA)
set selectedOnlyA in group operations
bool GetSelectedOnlyA() const
get selectedOnlyA in group operations
const a2dDoMu & GetBooleanEngineMaxlinemerge() const
boolean engine setting
a2dText * GetTextTemplateObject()
set template for line object
CloneOptions
options for cloning
when a new wire or other connection object needs to be created,
Contain one drawing as hierarchical tree of a2dCanvasObject's.
double GetEndScaleX() const
get scaling in X for begin and end objects of lines and polylines
a2dSmrtPtr< a2dLayers > m_layersetup
default setup for layers in a2dCanvasDocument's