wxArt2D
canglob.h
Go to the documentation of this file.
1 /*! \file wx/canvas/canglob.h
2  \brief general canvas module declarations and classes
3 
4  The event classes for an a2dCanvasObject are here.
5  And a2dCanvasGlobal holds settings for the canvas module.
6  Storing layers settings as a template for layer settings of new documents is a
7  typical use of wxCanvasGlobals.
8 
9  a2dTimer, is a wxTimes special for a2dCanvasObject
10 
11  \author Klaas Holwerda
12 
13  Copyright: 2000-2004 (c) Klaas Holwerda
14 
15  Licence: wxWidgets Licence
16 
17  Classes, functions and enumration for use in all othere files, are located here.
18 
19  RCS-ID: $Id: canglob.h,v 1.58 2009/09/03 20:09:53 titato Exp $
20 */
21 
22 #ifndef __WXCANGLOB_H__
23 #define __WXCANGLOB_H__
24 
25 #ifndef WX_PRECOMP
26 #include "wx/wx.h"
27 #endif
28 
29 #include <map>
30 
31 using namespace std;
32 
33 #include "wx/geometry.h"
34 
35 #include <wx/module.h>
36 
37 #include <wx/general/gen.h>
38 #include <wx/artbase/drawer2d.h>
39 
40 #include "wx/canvas/candefs.h"
41 
42 #include "wx/canvas/restrict.h"
43 #include "wx/canvas/canprim.h"
44 #include "wx/canvas/layerinf.h"
45 #include "wx/canvas/cantext.h"
46 #include "wx/canvas/objlist.h"
47 
48 //! OR-ing a2dDocumentRenderStyle is allowed
49 
51 {
52  return ( a2dDocumentRenderStyle ) ( ( wxUint32 ) a | ( wxUint32 ) b );
53 }
54 
55 //--------------------------------------------------------------------
56 // a2dLayerGroup
57 //--------------------------------------------------------------------
58 
59 //! holds a list of layers numbers
60 class a2dLayerGroup: public a2dlist< wxUint16 >
61 {
62 public:
63 
64  //! constructor
66 
67  //! return true if layer is part of the group
68  //! if group eqauls wxLAYER_ALL it return true always
69  bool InGroup( wxUint16 layer );
70 };
71 
72 class A2DARTBASEDLLEXP a2dAffineMatrix;
73 
74 //--------------------------------------------------------------------
75 // a2dCanvasModule
76 //--------------------------------------------------------------------
77 
78 #if wxUSE_PRINTING_ARCHITECTURE
79 #include "wx/paper.h"
80 #include "wx/print.h"
81 #endif
82 
83 //! initiation module for the wxArt2D library
84 /*!
85  One instance of is used to initiate global settings.
86 
87  Like a2dCanvasGlobals and a2dCanvasInitializeStockObjects()
88 
89  \ingroup global
90 */
91 class A2DCANVASDLLEXP a2dCanvasModule : public wxModule
92 {
93 public:
94 
96 
97  virtual bool OnInit();
98  virtual void OnExit();
99 
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; }
104 
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; }
109 
110 private:
111 
112  static a2dFont* m_FontMedBold;
113  static a2dFont* m_FontMed;
114  static a2dFont* m_FontMini;
115  static a2dFont* m_FontSmall;
116 
117 #if wxUSE_PRINTING_ARCHITECTURE
118  wxPrintPaperDatabase* m_wxThePrintPaperDatabase;
119 #endif
120 
121  DECLARE_DYNAMIC_CLASS( a2dCanvasModule )
122 
123 };
124 
125 class A2DCANVASDLLEXP a2dIterC;
126 class A2DCANVASDLLEXP a2dCanvasObject;
127 class A2DCANVASDLLEXP a2dCanvasObjectList;
128 
129 class A2DARTBASEDLLEXP a2dAffineMatrix;
130 class A2DGENERALDLLEXP a2dWalkerIOHandler;
131 class A2DCANVASDLLEXP a2dText;
132 
133 
134 BEGIN_DECLARE_EVENT_TYPES()
135 //!see a2dCanvasObjectMouseEvent \ingroup eventid
136 DECLARE_EXPORTED_EVENT_TYPE( A2DCANVASDLLEXP, wxEVT_CANVASOBJECT_MOUSE_EVENT, 1 )
137 //!see a2dCanvasObjectEvent \ingroup eventid
138 DECLARE_EXPORTED_EVENT_TYPE( A2DCANVASDLLEXP, wxEVT_CANVASOBJECT_ENTER_EVENT, 1 )
139 //!see a2dCanvasObjectEvent \ingroup eventid
140 DECLARE_EXPORTED_EVENT_TYPE( A2DCANVASDLLEXP, wxEVT_CANVASOBJECT_LEAVE_EVENT, 1 )
141 //! see a2dHandleMouseEvent \ingroup eventid
142 DECLARE_EXPORTED_EVENT_TYPE( A2DCANVASDLLEXP, wxEVT_CANVASHANDLE_MOUSE_EVENT, 1 )
143 //! see a2dHandleMouseEvent \ingroup eventid
144 DECLARE_EXPORTED_EVENT_TYPE( A2DCANVASDLLEXP, wxEVT_CANVASHANDLE_MOUSE_EVENT_ENTER, 1 )
145 //! see a2dHandleMouseEvent \ingroup eventid
146 DECLARE_EXPORTED_EVENT_TYPE( A2DCANVASDLLEXP, wxEVT_CANVASHANDLE_MOUSE_EVENT_LEAVE, 1 )
147 //!see a2dCanvasObjectEvent \ingroup eventid
148 DECLARE_EXPORTED_EVENT_TYPE( A2DCANVASDLLEXP, wxEVT_CANVASOBJECT_RESIZE_EVENT, 1 )
149 //!see a2dCanvasObjectEvent \ingroup eventid
150 DECLARE_EXPORTED_EVENT_TYPE( A2DCANVASDLLEXP, wxEVT_CANVASOBJECT_POPUPMENU_EVENT, 1 )
151 END_DECLARE_EVENT_TYPES()
152 
153 //! general event sent from a2dCanvasObject to itself
154 /*!
155  It contains the accumulated matrix to reach the position etc. of the object.
156  This is important for editing childobjects of a2dCanvasObject directly.
157 
158  Currently the following Id's:
159 
160 */
161 class A2DCANVASDLLEXP a2dCanvasObjectEvent : public wxEvent
162 {
163 public:
164 
165  //! constructor
166  a2dCanvasObjectEvent( a2dIterC* ic, wxEventType type, a2dCanvasObject* object, double x, double y, int id = 0 );
167 
168  a2dCanvasObjectEvent( a2dCanvasObject* object, const a2dBoundingBox& box, int id = 0 );
169 
171 
172  //! clone the event
173  virtual wxEvent* Clone() const { return new a2dCanvasObjectEvent( *this ); }
174 
175  a2dCanvasObject* GetCanvasObject() { return ( a2dCanvasObject* ) GetEventObject(); }
176 
177  double GetX() { return m_x; }
178  double GetY() { return m_y; }
179 
180  //! in case of wxEVT_CANVASOBJECT_RESIZE_EVENT event get boundingbox which was sent
181  a2dBoundingBox& GetBbox() { return m_box; }
182 
183  a2dIterC* GetIterC() { return m_ic; }
184  // This is used when sending a2dCanvasObjectEvent's from a simple (handle less) tool
185  void SetIterC( a2dIterC* ic ) { wxASSERT( !m_ic ); m_ic = ic; }
186 
187 private:
188 
189  DECLARE_CLASS( a2dCanvasObjectEvent )
190 
191  //! x position of event
192  double m_x;
193 
194  //! y position of event
195  double m_y;
196 
197  //! the interative context, for getting matrix for conversion to absolute
198  a2dIterC* m_ic;
199 
200  //! for storing info used in wxEVT_CANVASOBJECT_RESIZE_EVENT
201  a2dBoundingBox m_box;
202 };
203 
204 //! mouse event sent from a2dCanvasObject to itself
205 /*!
206  It contains the accumulated matrix to reach the position etc. of the object.
207  This is important for editing childobjects of a2dCanvasObject directly.
208  The original mouse event ( e.g. as sent from the a2dCanvasView its a2dCanvas ),
209  is also stored as part of the event.
210 
211  Currently the following Id's:
212 
213  - ::wxEVT_CANVASOBJECT_MOUSE_EVENT
214 
215  - ::wxEVT_CANVASOBJECT_ENTER_EVENT when entering a a2dCanvasObject (also children)
216 
217  - ::wxEVT_CANVASOBJECT_LEAVE_EVENT when leaving a a2dCanvasObject (also children)
218 
219  - ::wxEVT_CANVASOBJECT_POPUPMENU_EVENT Right Mouse Down default handling
220 
221  \ingroup events
222 */
223 class A2DCANVASDLLEXP a2dCanvasObjectMouseEvent : public a2dCanvasObjectEvent
224 {
225 public:
226 
227  //! constructor
228  a2dCanvasObjectMouseEvent( a2dIterC* ic, a2dCanvasObject* object, a2dHit& how, double x, double y, const wxMouseEvent& event );
229 
230  //! constructor
231  a2dCanvasObjectMouseEvent( a2dIterC* ic, a2dCanvasObject* object, wxEventType type, double x, double y, const wxMouseEvent& event );
232 
233  //! constructor
235 
236  //! clone the event
237  virtual wxEvent* Clone( bool WXUNUSED( deep ) = true ) const { return new a2dCanvasObjectMouseEvent( *this ); }
238 
239  //! return the object hit
240  a2dCanvasObject* GetCanvasObject() { return ( a2dCanvasObject* ) GetEventObject(); }
241 
242  //! return the original mouse event that was redirected to the a2dCanvasObject
243  wxMouseEvent& GetMouseEvent() { return m_mouseevent; }
244 
245  //! in what manner the a2dCanvasObject was hit.
246  a2dHit& GetHow() { return m_how; }
247 
248 private:
249 
250  DECLARE_CLASS( a2dCanvasObjectMouseEvent )
251 
252  //! original mouse event
253  wxMouseEvent m_mouseevent;
254 
255  //! in what manner the a2dCanvasObject was hit.
256  a2dHit m_how;
257 };
258 
259 //! general event sent from a2dHandle to its parent a2dCanvasObject
260 /*!
261  This event can be intercepted, to implement an action when a a2dHandle is hit.
262  The original mouse event ( e.g. as sent from the a2dCanvasView its a2dCanvas ),
263  is also stored as part of the event.
264 
265  Currently the following Id's:
266 
267  - ::wxEVT_CANVASHANDLE_MOUSE_EVENT
268  - ::wxEVT_CANVASHANDLE_MOUSE_EVENT_ENTER
269  - ::wxEVT_CANVASHANDLE_MOUSE_EVENT_LEAVE
270 
271  \ingroup events
272 */
273 class A2DCANVASDLLEXP a2dHandleMouseEvent : public a2dCanvasObjectEvent
274 {
275 public:
276 
277  //! constructor
278  a2dHandleMouseEvent( a2dIterC* ic, a2dHandle* handle, double x, double y, const wxMouseEvent& event, wxEventType type = wxEVT_CANVASHANDLE_MOUSE_EVENT );
279 
280  //! constructor
282 
283  //! clone the event
284  virtual wxEvent* Clone( bool WXUNUSED( deep ) = true ) const { return new a2dHandleMouseEvent( *this ); }
285 
286  //! return the handle object hit
287  a2dHandle* GetCanvasHandle() { return ( a2dHandle* ) GetEventObject(); }
288 
289  //! return the original mouse event that was redirected to the a2dHandle
290  wxMouseEvent& GetMouseEvent() { return m_mouseevent; }
291 
292 private:
293 
294  DECLARE_CLASS( a2dHandleMouseEvent )
295 
296  //! original mouse event
297  wxMouseEvent m_mouseevent;
298 };
299 
300 //! event function for a2dCanvasObjectEvent
301 typedef void ( wxEvtHandler::*a2dCanvasObjectEventFunction ) ( a2dCanvasObjectEvent& );
302 //! event function for a2dHandleMouseEvent
303 typedef void ( wxEvtHandler::*a2dCanvasHandleMouseEventFunction ) ( a2dHandleMouseEvent& );
304 //! event function for a2dCanvasObjectMouseEvent
306 
307 /*! \addtogroup eventhandlers
308 * @{
309 */
310 
311 //! static event table macro for a2dCanvasObject mouse event
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 ),
313 //! static event table macro for a2dCanvasObject mouse enter event
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 ),
315 //! static event table macro for a2dCanvasObject mouse leave event
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 ),
317 //! static event table macro for a2dHandle mouse event
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 ),
319 //! static event table macro for a2dHandle mouse enter event
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 ),
321 //! static event table macro for a2dHandle mouse leave event
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 ),
323 //! static event table macro for a2dCanvasObject mouse Right Down event
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 ),
325 
326 //! static event table macro for a2dCanvasObject resize event
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 ),
328 
329 //! @} eventhandlers
330 
331 typedef unsigned int a2dCursorId;
332 typedef unsigned int a2dImageId;
333 
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;
362 
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;
384 
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;
390 
391 A2DCANVASDLLEXP extern const a2dCursorId a2dCURSOR_CanvasObjectHit;
392 A2DCANVASDLLEXP extern const a2dCursorId a2dCURSOR_CanvasObjectEnter;
393 A2DCANVASDLLEXP extern const a2dCursorId a2dCURSOR_CanvasObjectLeave;
394 
395 
396 
397 A2DCANVASDLLEXP extern const a2dImageId a2dBitmap_EditRectangleFill;
398 
399 //! provide cursors etc.
400 class A2DCANVASDLLEXP a2dArtProvider : public wxObject
401 {
402 public:
403 
404  a2dArtProvider();
405 
406  ~a2dArtProvider();
407 
408  virtual wxCursor& GetCursor( a2dCursorId id );
409 
410  virtual wxBitmap& GetImage( a2dImageId id );
411 
412  // when a cursor is not in here it will be loaded and stored in here for caching.
413  map<a2dCursorId, wxCursor> m_cursorsLoaded;
414 
415  // when a bitmap is not in here it will be loaded and stored in here for caching.
416  map<a2dImageId, wxBitmap> m_imageLoaded;
417 
418 };
419 
420 //forward decl
421 class A2DCANVASDLLEXP a2dDrawing;
422 
423 
424 enum a2dNextSeg
425 {
426  WIREEND_STRAIGHT,
427  WIREEND_MANHATTAN_X,
428  WIREEND_MANHATTAN_Y
429 };
430 
431 //! defines common settinsg for a habitat for a set of a2dCameleons.
432 /*!
433  To centralize common settings to be used by all a2dCameleons and nested objects,
434  which are contained in the same habitat. This last is at least the a2dDrawing in
435  which they are placed.
436 
437  \ingroup global
438 */
439 class A2DCANVASDLLEXP a2dHabitat: public a2dObject
440 {
441 
442 public:
443  a2dHabitat( wxUint16 maximumLayers = wxDEFAULTMAXLAYER );
444  virtual ~a2dHabitat();
445 
446  void Init( a2dLayers* layers = NULL );
447 
448  void SetDefaultUnitsScale( double scale ) { m_defaultUnitsScale = scale; }
449  double GetDefaultUnitsScale() { return m_defaultUnitsScale; }
450 
451  //!how accurate is the drawing
452  double USERUNITS();
453  //!how many meters is 1 unit in the database
454  double PHYSUNITS();
455 
456  //!how accurate is the drawing
457  void USERUNITS( double userunit );
458  //!how many meters is 1 unit in the database
459  void PHYSUNITS( double physicalunit );
460 
461  //!entry of data
462  double ENTRYUNITS();
463 
464  double POLYTOARCRMIN();
465  double POLYTOARCRMAX();
466  double POLYTOARCABER();
467 
468  double ARCTOPOLYABER();
469 
470  double ACCUR();
471 
472  //!Get the central layersettings for the canvas library.
473  /*!
474  New a2dCanvasDocument's are initialized with this layer settings.
475  A default Layer Setting is created in the constructor,
476  but this one can be changed.
477  */
478  a2dLayers* GetLayerSetup() { return m_layersetup; }
479 
480  //!set the layersettings for the canvas library.
481  /*! old layer setting will be deleted, and new one is owned.
482  */
483  void SetLayerSetup( a2dLayers* layersetup );
484 
485  void SetSymbolLayer( wxUint16 layerId ) { m_symbolLayer = layerId; }
486  wxUint16 GetSymbolLayer() { return m_symbolLayer; }
487 
488  void SetMaxLayer( wxUint16 nrLayers ) { m_maximumLayers = nrLayers; }
489  wxUint16 GetMaxLayer() { return m_maximumLayers; }
490 
491  //! load a layer set in CVG format from a file, which will be used as a template
492  //! for a2dCanvasDocument's its layer settings
493  bool LoadLayers( const wxString& filename );
494 
495  void SetPinSize( double size ) { m_defPinSize = size; }
496 
497  double GetPinSize() { return m_defPinSize; }
498 
499  void SetHandleSize( double size ) { m_defHandleSize = size; }
500 
501  double GetHandleSize() { return m_defHandleSize; }
502 
503  //! set default pin for graph like structure
504  void SetPin( a2dPin* newpin );
505 
506  //! get default pin for graph like structure
507  a2dPin* GetPin();
508 
509  //! \see GetPinCanConnect()
510  void SetPinCanConnect( a2dPin* newpin );
511 
512  //! represents the pin styles for pins that can connect right now
513  /*! This pin is usually bigger than the default pin and green */
514  a2dPin* GetPinCanConnect();
515 
516  //! \see GetPinCannotConnect()
517  void SetPinCannotConnect( a2dPin* newpin );
518 
519  //! represnts the pin styles for pins that cannot connect right now
520  /*! This pin is usually smaller than the default pin and red */
521  a2dPin* GetPinCannotConnect();
522 
523  //! set default handle for editing
524  void SetHandle( a2dHandle* newhandle );
525 
526  //! get default handle for editing
527  a2dHandle* GetHandle();
528 
529  //! default text for displaying properties.
530  a2dText* GetPropertyText();
531 
532  //! Get Stroke to use for Highlighted a2dCanvasObject's
533  a2dStroke& GetHighLightStroke();
534 
535  //! Get Fill to use for Highlighted a2dCanvasObject's
536  a2dFill& GetHighLightFill();
537 
538  //! Set Stroke to use for Highlighted a2dCanvasObject's
539  void SetHighLightStroke( const a2dStroke& stroke );
540 
541  //! Set Fill to use for Highlighted a2dCanvasObject's
542  void SetHighLightFill( const a2dFill& fill );
543 
544  //! Get Stroke to use for Selected a2dCanvasObject's
545  a2dStroke& GetSelectStroke();
546 
547  //! Get Fill to use for Selected a2dCanvasObject's
548  a2dFill& GetSelectFill();
549 
550  //! Get Stroke to use for Selected2 a2dCanvasObject's
551  a2dStroke& GetSelect2Stroke();
552 
553  //! Get Fill to use for Selected2 a2dCanvasObject's
554  a2dFill& GetSelect2Fill();
555 
556  //! Set Stroke to use for Selected a2dCanvasObject's
557  void SetSelectStroke( const a2dStroke& stroke );
558 
559  //! Set Fill to use for Selected a2dCanvasObject's
560  void SetSelectFill( const a2dFill& fill );
561 
562  //! Set Stroke to use for Selected2 a2dCanvasObject's
563  void SetSelect2Stroke( const a2dStroke& stroke );
564 
565  //! Set Fill to use for Selected2 a2dCanvasObject's
566  void SetSelect2Fill( const a2dFill& fill );
567 
568  //! sets draw style to be used for selected object
569  void SetSelectDrawStyle( a2dDocumentRenderStyle drawstyle ) { m_SelectDrawStyle = drawstyle; }
570 
571  //! returns draw style to be used for selected object
572  a2dDocumentRenderStyle GetSelectDrawStyle() const { return m_SelectDrawStyle; }
573 
574  void SetDrawStyle( wxUint32 drawstyle );
575 
576  //!get drawstyles used for drawing the document
577  wxUint32 GetDrawStyle() { return m_documentDrawStyle; }
578 
579  //! Get Stroke to use for non layered a2dCanvasObject's
580  a2dStroke& GetDefaultStroke();
581 
582  //! Get Fill to use for non layered a2dCanvasObject's
583  a2dFill& GetDefaultFill();
584 
585  //! Set Stroke to use for non layered a2dCanvasObject's
586  void SetDefaultStroke( const a2dStroke& stroke );
587 
588  //! Set Fill to use for non layered a2dCanvasObject's
589  void SetDefaultFill( const a2dFill& fill );
590 
591  //! Set restriction engine (grid snapping) used normally
592  void SetRestrictionEngine( a2dRestrictionEngine* restrict ) { m_restrictionEngine = restrict; }
593 
594  //! Get restriction engine (grid snapping)
595  a2dRestrictionEngine* GetRestrictionEngine();
596 
597  //! Set class for generating new connection objects between object and pins
598  void SetConnectionGenerator( a2dConnectionGenerator* connectionGenerator ) { m_connectionGenerator = connectionGenerator; };
599 
600  //! Get class for generating new connection objects between object and pins
601  a2dConnectionGenerator* GetConnectionGenerator() const { return m_connectionGenerator; }
602 
603  //! hit marging in pixels.
604  /*! This is used in editing, where a drawer is known and conversion from
605  pixels to world units is possible.
606  a2dCanvasView copies this value in its constructor and it can be changes
607  in a2dCanvasView as well
608  */
609  wxUint16 GetHitMarginDevice() const { return m_hitmargin_device; }
610 
611  //! hit marging in pixels.
612  /*! \see GetHitMarginDevice */
613  void SetHitMarginDevice( wxUint16 val ) { m_hitmargin_device = val; }
614 
615  //! hit marging in world units.
616  /*! This is used during command processing, where a drawer is not known.
617  */
618  double GetHitMarginWorld() const { return m_hitmargin_world; }
619 
620  //! hit marging in world units.
621  /*! \see GetHitMarginWorld */
622  void SetHitMarginWorld( double val ) { m_hitmargin_world = val; }
623 
624  //! get minimum distance of copied object from original
625  double GetCopyMinDistance() const { return m_copymindistance; }
626 
627  //! set minimum distance of copied object from original
628  void SetCopyMinDistance( double val ) { m_copymindistance = val; }
629 
630  //! coordinates below this distance will be trated as equal
631  /*! This is used e.g. to check if two pins have the same location.
632  This should be the machine presition with the used coordinate resolution
633  */
634  double GetCoordinateEpsilon() const { return m_coordinateepsilon; }
635 
636  //! \see GetCoordinateEpsilon
637  void SetCoordinateEpsilon( double val ) { m_coordinateepsilon = val; }
638 
639  //!Set to draw layers in reverse order
640  void SetReverseOrder( bool reverse_order ) { m_reverse_order = reverse_order; }
641 
642  //!Get Setting for draw layers in reverse order
643  bool GetReverseOrder() const { return m_reverse_order; }
644 
645  //! set true result in having straight lines rerouted between begin and end pin
646  void SetRouteOneLine( bool oneLine ) { m_oneLine = oneLine; }
647 
648  //! see SetRouteOneLine()
649  bool GetRouteOneLine() const { return m_oneLine; }
650 
651  //! sets operand A in layer operation
652  void SetGroupA( const a2dLayerGroup& groupA ) { m_groupA = groupA; }
653 
654  //! sets operand B in layer operation
655  void SetGroupB( const a2dLayerGroup& groupB ) { m_groupB = groupB; }
656 
657  //! return group A layers
658  a2dLayerGroup& GetGroupA() { return m_groupA; }
659 
660  //! return group B layers
661  a2dLayerGroup& GetGroupB() { return m_groupB; }
662 
663  //! add layer to group A layers
664  void AddGroupA( wxUint16 layer ) { m_groupA.push_back( layer ); }
665 
666  //! add layer to group B layers
667  void AddGroupB( wxUint16 layer ) { m_groupB.push_back( layer ); }
668 
669  //! set target layer in operation
670  void SetTarget( wxUint16 target );
671 
672  //! get target layer in operation
673  wxUint16 GetTarget() { return m_target; }
674 
675  //! set selectedOnlyA in group operations
676  void SetSelectedOnlyA( bool selectedOnlyA ) { m_selectedOnlyA = selectedOnlyA; }
677 
678  //! get selectedOnlyA in group operations
679  bool GetSelectedOnlyA() const { return m_selectedOnlyA; }
680 
681  //! set selectedOnlyB in group operations
682  void SetSelectedOnlyB( bool selectedOnlyB ) { m_selectedOnlyB = selectedOnlyB; }
683 
684  //! get selectedOnlyB in group operations
685  bool GetSelectedOnlyB() const { return m_selectedOnlyB; }
686 
687  //! boolean engine setting
688  void SetBooleanEngineMarge( const a2dDoMu& marge ) { m_MARGE = marge; }
689  //! boolean engine setting
690  void SetBooleanEngineGrid( long grid ) { m_GRID = grid; }
691  //! boolean engine setting
692  void SetBooleanEngineDGrid( double dgrid ) { m_DGRID = dgrid; }
693  //! boolean engine setting
694  void SetBooleanEngineCorrectionAber( const a2dDoMu& aber ) { m_CORRECTIONABER = aber; }
695  //! boolean engine setting
696  void SetBooleanEngineCorrectionFactor( const a2dDoMu& aber ) { m_CORRECTIONFACTOR = aber; }
697  //! boolean engine setting
698  void SetBooleanEngineMaxlinemerge( const a2dDoMu& maxline ) { m_MAXLINEMERGE = maxline; }
699  //! boolean engine setting
700  void SetBooleanEngineWindingRule( bool rule ) { m_WINDINGRULE = rule; }
701  //! boolean engine setting
702  void SetBooleanEngineRoundfactor( double roundfac ) { m_ROUNDFACTOR = roundfac; }
703  void SetBooleanEngineSmoothAber( const a2dDoMu& aber ) { m_SmoothAber = aber; }
704  void SetBooleanEngineLinkHoles( bool doLinkHoles ) { m_LinkHoles = doLinkHoles; }
705  //! Polygon/polyline to Arc Minimum radius to test
706  void SetRadiusMin( const a2dDoMu& radiusMin ) { m_radiusMin = radiusMin; }
707  //! Polygon/polyline to Arc Maximum radius to test
708  void SetRadiusMax( const a2dDoMu& radiusMax ) { m_radiusMax = radiusMax; }
709  //! Polygon/polyline to Arc Maximum abberation
710  void SetAberPolyToArc( const a2dDoMu& aber );
711  //! Arc to Polygon/polyline Maximum abberation
712  void SetAberArcToPoly( const a2dDoMu& aber );
713  //! detection of small object, smaller than this
714  void SetSmall( const a2dDoMu& smallest );
715 
716  bool GdsIoSaveTextAsPolygon( bool onOff );
717  bool KeyIoSaveTextAsPolygon( bool onOff );
718 
719  bool GetGdsIoSaveTextAsPolygon() const;
720  bool GetKeyIoSaveTextAsPolygon() const;
721 
722  //! Polygon/polyline to Arc Minimum radius to test
723  const a2dDoMu& GetRadiusMin() const { return m_radiusMin; }
724  //! Polygon/polyline to Arc Maximum radius to test
725  const a2dDoMu& GetRadiusMax() const { return m_radiusMax; }
726  //! Polygon/polyline to Arc Maximum abberation
727  const a2dDoMu& GetAberPolyToArc() const { return m_AberPolyToArc; }
728  //! Arc to Polygon/polyline Maximum abberation
729  const a2dDoMu& GetAberArcToPoly() const { return m_AberArcToPoly; }
730  //! detection of small object, smaller than this
731  const a2dDoMu& GetSmall() const { return m_small; }
732 
733  //! grid setting X
734  void SetGridX( const a2dDoMu& gridX );
735  //! grid setting Y
736  void SetGridY( const a2dDoMu& gridY );
737 
738  //! boolean engine setting
739  const a2dDoMu& GetBooleanEngineMarge() const { return m_MARGE; }
740  //! boolean engine setting
741  long GetBooleanEngineGrid() const { return m_GRID; }
742  //! boolean engine setting
743  double GetBooleanEngineDGrid() const { return m_DGRID; }
744  //! boolean engine setting
745  const a2dDoMu& GetBooleanEngineCorrectionAber() const { return m_CORRECTIONABER; }
746  //! boolean engine setting
747  const a2dDoMu& GetBooleanEngineCorrectionFactor() const { return m_CORRECTIONFACTOR; }
748  //! boolean engine setting
749  const a2dDoMu& GetBooleanEngineMaxlinemerge() const { return m_MAXLINEMERGE; }
750  //! boolean engine setting
751  bool GetBooleanEngineWindingRule() const { return m_WINDINGRULE; }
752  //! boolean engine setting
753  double GetBooleanEngineRoundfactor() const { return m_ROUNDFACTOR; }
754  //! boolean engine setting
755  const a2dDoMu& GetBooleanEngineSmoothAber() const { return m_SmoothAber; }
756  //! boolean engine setting
757  bool GetBooleanEngineLinkHoles() const { return m_LinkHoles; }
758 
759  //! set clear of target in group operations
760  /*!
761  if set, in boolean operation the target layer will be cleared before adding results ot it.
762  */
763  void SetClearTarget( bool clearTarget ) { m_clearTarget = clearTarget; }
764 
765  //! get clear of target in group operations
766  bool GetClearTarget() const { return m_clearTarget; }
767 
768  //! set last mouse X position in world coordinates, as set by tools.
769  /*!
770  This position is used to set cursor position relative to the last entered position.
771  The position can be set by drawing tools, when it makes sence to draw a next coordinates
772  relative to the current/last entered coordinate.
773  */
774  void SetLastXyEntry( double x, double y ) { m_lastX = x; m_lastY = y; }
775 
776  //! holds last mouse X position in world coordinates, as set by tools.
777  double GetLastXEntry() const { return m_lastX; }
778  //! holds last mouse Y position in world coordinates, as set by tools.
779  double GetLastYEntry() const { return m_lastY; }
780 
781  //! set RelativeStart measurement X and Y position in world coordinates
782  /*!
783  The RelativeStart start is used when mesuring using a tool, or from the commandline.
784  */
785  void SetRelativeStart( double x, double y ) { m_RelativeStartX = x; m_RelativeStartY = y; }
786 
787  //! holds last RelativeStart measurement X position in world coordinates
788  double GetRelativeStartX() const { return m_RelativeStartX; }
789  //! holds last RelativeStart measurement Y position in world coordinates
790  double GetRelativeStartY() const { return m_RelativeStartY; }
791 
792  //!get the current stroke
793  /*!
794  Return the current stroke of the current document,
795  if there is no document, return a2dBLACK_STROKE
796  */
797  const a2dStroke& GetStroke() const { return m_currentstroke; }
798 
799  //!get the current fill
800  /*!
801  Return the current fill of the current document,
802  if there is no document, return a2dBLACK_FILL
803  */
804  const a2dFill& GetFill() const { return m_currentfill; }
805 
806  //!used for new objects etc. to set the stroke
807  void SetStroke( const a2dStroke& stroke );
808 
809  //!used for new objects etc. to set the stroke
810  void SetStroke( const unsigned char red, const unsigned char green, const unsigned char blue );
811 
812  //!used for new objects etc. to set the fill
813  /*!
814  \param fill to set, if NULL a2dNullFILL will be used
815  */
816  void SetFill( const a2dFill& fill );
817 
818  //!used for new objects etc. to set the fill
819  void SetFill( const unsigned char red, const unsigned char green, const unsigned char blue );
820 
821  //!certain drawing tools like polygon drawing use this setting
822  bool GetSpline() const {return m_spline;}
823 
824  void SetSpline( bool spline ) { m_spline = spline; }
825 
826  //!get current line begin object for line and polyline.
827  /*!\return NULL if not set. */
828  a2dCanvasObject* GetLineBegin() const { return m_currentBegin;}
829 
830  //!get current line end object for line and polyline.
831  /*!\return NULL if not set. */
832  a2dCanvasObject* GetLineEnd() const { return m_currentEnd;}
833 
834  //!set current line begin object for line and polyline.
835  void SetLineBegin( a2dCanvasObject* begin ) { m_currentBegin = begin; }
836 
837  //!set current line end object for line and polyline.
838  void SetLineEnd( a2dCanvasObject* end ) { m_currentEnd = end; }
839 
840  //!scaling in X for begin and end objects of lines and polylines
841  void SetEndScaleX( double xs ) { m_currentXscale = xs; }
842 
843  //!scaling in Y for begin and end objects of lines and polylines
844  void SetEndScaleY( double ys ) { m_currentYscale = ys; }
845 
846  //!get scaling in X for begin and end objects of lines and polylines
847  double GetEndScaleX() const {return m_currentXscale;}
848 
849  //!get scaling in Y for begin and end objects of lines and polylines
850  double GetEndScaleY() const {return m_currentYscale;}
851 
852  //!set the Contour width of shapes defined in database units
853  /*
854  m_currentContourWidth is always defined in meters, on the basis of the current document,
855  it will be converted from databasunits.
856  */
857  void SetContourWidthInDataBaseUnits( double width );
858 
859  //!set the Contour width of shapes
860  /*
861  */
862  void SetContourWidth( const a2dDoMu& currentContourWidth );
863 
864  //!get the Contour width of shapes in the document its units
865  /*
866  m_currentContourWidth is always defined in meters, on the basis of the current document,
867  it will be converted to databasunits.
868  */
869  double GetContourWidthInDataBaseUnits() const;
870 
871  //!get the Contour width of shapes in meters
872  const a2dDoMu& GetContourWidth() const { return m_currentContourWidth; }
873 
874  //! Set when m_contourwidth != 0 what is the end of the line should be.
875  void SetPathType( a2dPATH_END_TYPE pathtype );
876 
877  //! get when m_contourwidth != 0 what is the end of the line looks like.
878  a2dPATH_END_TYPE GetPathType() { return m_pathtype; }
879 
880  //!used for to set the font for non Text objects
881  void SetFont( const a2dFont& font );
882 
883  //! get current font active font.
884  const a2dFont& GetFont() const { return m_font; }
885 
886  //!If set, the text objects will use their own style ( GetTextStroke() etc. )
887  void SetTextOwnStyle( bool ownStyle ) { m_textOwnStyle = ownStyle; }
888 
889  //!get the current text stroke
890  bool GetTextOwnStyle() const { return m_textOwnStyle; }
891 
892  //!used for new text objects etc. to set the stroke
893  void SetTextStroke( const a2dStroke& stroke );
894 
895  //!get the current text stroke
896  /*!
897  Return the current text stroke.
898  */
899  a2dStroke GetTextStroke() const;
900 
901  //!used for new text objects etc. to set the fill
902  /*!
903  \param fill to set, if NULL a2dNullFILL will be used
904  */
905  void SetTextFill( const a2dFill& fill );
906 
907  //!get the current text fill
908  /*!
909  Return the current text fill.
910  */
911  a2dFill GetTextFill() const;
912 
913  //!used for new text objects etc. to set the font
914  void SetTextFont( const a2dFont& font );
915 
916  //! get current font active text font ( like used in text tool ).
917  a2dFont GetTextFont() const;
918 
919  //! set template for line object
920  a2dText* GetTextTemplateObject() { return m_textTemplateObject; }
921 
922  //! get template for text objects
923  void SetTextTemplateObject( a2dText* textTemplateobject ) { m_textTemplateObject = textTemplateobject; }
924 
925  //!layer to be set for new objects.
926  //!Default is layer wxLAYER_DEFAULT (colours etc taken from layer list)
927  void SetLayer( wxUint16 layer, bool setStyleOfLayer = false );
928 
929  //!layer set for new objects.
930  inline wxUint16 GetLayer() const { return m_layer; }
931 
932  //! used for objects which depend in size on this grid
933  /*!
934  The size of such object can be modified
935  */
936  void SetObjectGridSize( double objectGridSize ) { m_objectGridSize = objectGridSize; }
937 
938  //! used for objects which depend in size on this grid
939  double GetObjectGridSize() { return m_objectGridSize; }
940 
941  void SetDrawingTemplate( a2dDrawing* drawingTemplate);
942 
943  a2dDrawing* GetDrawingTemplate() const;
944 
945  void SetSymbolDrawingTemplate( a2dDrawing* drawingTemplate);
946 
947  a2dDrawing* GetSymbolDrawingTemplate() const;
948 
949  void SetBuildInDrawingTemplate( a2dDrawing* drawingTemplate);
950 
951  a2dDrawing* GetBuildInDrawingTemplate() const;
952 
953  void SetDiagramDrawingTemplate( a2dDrawing* drawingTemplate);
954 
955  a2dDrawing* GetDiagramDrawingTemplate() const;
956 
957  void SetGuiDrawingTemplate( a2dDrawing* drawingTemplate);
958 
959  a2dDrawing* GetGuiDrawingTemplate() const;
960 
961  //! a2dDrawWirePolylineLTool segment mode initilization
962  a2dNextSeg GetEndSegmentMode() { return m_endSegmentMode; }
963 
964  //! a2dDrawWirePolylineLTool segment mode initilization
965  void SetEndSegmentMode( a2dNextSeg mode ) { m_endSegmentMode = mode; }
966 
967 protected:
968 
969  //!default setup for layers in a2dCanvasDocument's
971 
972  a2dSmrtPtr<a2dDrawing> m_drawingTemplate;
973 
974  a2dSmrtPtr<a2dDrawing> m_drawingTemplateSymbol;
975 
976  a2dSmrtPtr<a2dDrawing> m_drawingTemplateDiagram;
977 
978  a2dSmrtPtr<a2dDrawing> m_drawingTemplateBuildIn;
979 
980  a2dSmrtPtr<a2dDrawing> m_drawingTemplateGui;
981 
982  a2dNextSeg m_endSegmentMode;
983 
984  //! object to clone to use as start
986 
987  bool m_textOwnStyle;
988 
989  double m_defPinSize;
990  double m_defHandleSize;
991 
992  a2dPinPtr m_defPin;
993  a2dPinPtr m_defCanConnectPin;
994  a2dPinPtr m_defCannotConnectPin;
995 
996  a2dHandlePtr m_defHandle;
997 
998  a2dSmrtPtr<a2dText> m_propertytext;
999 
1000  double m_userunits;
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;
1008 
1009  double m_defaultUnitsScale;
1010 
1011  //! Stroke to use for Highlighted a2dCanvasObject's
1013 
1014  //! Fill to use for Highlighted a2dCanvasObject's
1016 
1017  //! Stroke to use for selected a2dCanvasObject's
1019 
1020  //! Fill to use for selected a2dCanvasObject's
1022 
1023  //! Stroke to use for selected2 a2dCanvasObject's
1025 
1026  //! Fill to use for selected2 a2dCanvasObject's
1028 
1029  //! Stroke to use for non layered a2dCanvasObject's
1031 
1032  //! Fill to use for non layered a2dCanvasObject's
1034 
1035  //! draw style to be used for selected object
1037 
1038  //! draw style to be used for drawing with e.g. a2dDrawingPart.
1040 
1041  //! restriction engine to be used usually (if zero don't restrict)
1043 
1044  //! generator for new connections
1046 
1047  //! hit marging in pixels.
1048  /*! This is used in editing, where a drawer is known and conversion from
1049  pixels to world units is possible.
1050  a2dCanvasView copies this value in its constructor and it can be changes
1051  in a2dCanvasView as well
1052  */
1054 
1055  //! hit marging in world units.
1056  /*! This is used during command processing, where a drawer is not known.
1057  */
1059 
1060  //! the minimum distance in world units of a copied object from the original
1062 
1063  //! \see GetCoordinateEpsilon
1065 
1066  //!draw document in reverse order if set, used as default value for a2dCanvasDocument.
1068 
1069  //! used in routing wires to be straight or manhatten
1071 
1072  wxUint16 m_symbolLayer;
1073 
1074  //! used for objects which depend in size on this grid
1076 
1077 public:
1078 
1079  static wxUint16 m_maximumLayers;
1080 
1081  //! for operation on groups of layers
1083 
1084  //! for operation on groups of layers
1086 
1087  //! target layer in operations
1088  wxUint16 m_target;
1089 
1090  //! operations on m_groupA but only selected objects
1092  //! operations on m_groupB but only selected objects
1094  //! clear target layer before adding results of an operation
1096  //! boolean operation setting
1097 
1099  //! boolean operation setting
1100  long m_GRID;
1101  //! boolean operation setting
1102  double m_DGRID;
1103  //! boolean operation setting
1105  //! boolean operation setting
1107  //! boolean operation setting
1109  //! boolean operation setting
1111  //! boolean operation setting
1113  //! boolean operation setting
1115  //! boolean operation setting
1117  //! boolean operation setting
1119  //! Polygon/polyline to Arc Minimum radius to test
1121  //! Polygon/polyline to Arc Maximum radius to test
1123  //! Polygon/polyline to Arc Maximum abberation
1125  //! Arc to Polygon/polyline Maximum abberation
1127  //! detect samll objects
1129 
1130  //! canvas default grid in X
1132  //! canvas default grid in Y
1134 
1135  //! spline polygons
1136  bool m_spline;
1137 
1138  //!begin point scaling
1140 
1141  //!end point scaling
1143 
1144  //! current contour width e.g for polyline with width.
1146 
1147  //! when m_contourwidth != 0 what is the end of the line/polyline.
1149 
1150  //! layer to be set for new objects
1151  wxUint16 m_layer;
1152 
1153  //!current font set
1155 
1156  //! holds last mouse X position in world coordinates, as set by tools.
1157  double m_lastX;
1158  //! holds last mouse Y position in world coordinates, as set by tools.
1159  double m_lastY;
1160 
1161  //! The RelativeStart start is used when mesuring using a tool, or from the commandline.
1163 
1164  //! The RelativeStart start is used when mesuring using a tool, or from the commandline.
1166 
1167  bool m_keySaveTextAsPolygon;
1168  bool m_gdsiiSaveTextAsPolygon;
1169  bool m_keySaveFromView;
1170  bool m_gdsiiSaveFromView;
1171 
1172  //! fill to be set for new objects
1174 
1175  //! stroke to be set for new objects
1177 
1178  //! current beginobject for lines and polylines
1180 
1181  //! current endobject for lines and polylines
1183 
1184 public:
1185 
1186  //! when active drawing is set, this signal is send to the drawing.
1187  static const a2dSignal sig_changedFill;
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;
1194 
1195  static const a2dSignal sig_changedTextFill;
1196  static const a2dSignal sig_changedTextStroke;
1197  static const a2dSignal sig_changedTextFont;
1198 
1199 protected:
1200 
1201  virtual a2dObject* DoClone( CloneOptions options, a2dRefMap* refs ) const
1202  {
1203  return NULL;
1204  }
1205 };
1206 
1208 
1209 //! contains global settings for the a2dCanvas library
1210 /*!
1211  Settings and function using those settings or stored here.
1212  There is only ONE a2dCanvasGlobals instance for the whole a2dCanvas Library.
1213 
1214  \ingroup global
1215 
1216 */
1217 class A2DCANVASDLLEXP a2dCanvasGlobal: public a2dGeneralGlobal
1218 {
1219 
1220  DECLARE_CLASS( a2dCanvasGlobal )
1221 
1222 public:
1223  a2dCanvasGlobal();
1224  virtual ~a2dCanvasGlobal();
1225 
1226  wxPoint m_initialDocChildFramePos;
1227  wxSize m_initialDocChildFrameSize;
1228  long m_initialDocChildFrameStyle;
1229  long m_initialWorldCanvasStyle;
1230 
1231  bool WINDINGRULE;
1232 
1233  //! Path for Icons and small bitmaps
1234  a2dPathList& GetLayersPathList() const { return m_layersPath; }
1235 
1236  a2dArtProvider* GetArtProvider() { return m_artProvider; }
1237 
1238  void SetArtProvider( a2dArtProvider* artProvider );
1239 
1240  wxCursor& GetCursor( a2dCursorId id ) { return m_artProvider->GetCursor( id ); }
1241 
1242  void SetPopBeforePush( bool popBeforePush ) { m_popBeforePush = popBeforePush; }
1243 
1244  bool GetPopBeforePush() { return m_popBeforePush; }
1245 
1246  //! when set, tools are pushed in one shotmode in PushTool()
1247  void SetOneShotTools( bool oneShotTools ) { m_oneShotTools = oneShotTools; }
1248 
1249  //! see SetOneShotTools()
1250  bool GetOneShotTools() { return m_oneShotTools; }
1251 
1252  //! when set, drawing tools are going into edit mode after drawing
1253  void SetEditAtEndTools( bool editAtEndTools ) { m_editAtEndTools = editAtEndTools; }
1254 
1255  //! see SetEditAtEndTools
1256  bool GetEditAtEndTools() { return m_editAtEndTools; }
1257 
1258  //! get the drawing part that has the focus/is active in a window.
1259  void SetActiveDrawingPart( a2dDrawingPart* part );
1260 
1261  //! return the currently/last active drawing part.
1262  a2dDrawingPart* GetActiveDrawingPart() { return m_activeDrawingPart; }
1263 
1264  a2dHabitat* GetHabitat() const { return m_habitat; }
1265 
1266  void SetHabitat( a2dHabitat* habitat ) { m_habitat = habitat; }
1267 
1268 private:
1269 
1270  a2dHabitatPtr m_habitat;
1271 
1272  a2dDrawingPart* m_activeDrawingPart;
1273 
1274  a2dArtProvider* m_artProvider;
1275 
1276  //! pop a tool before a new one is pushed
1277  bool m_popBeforePush;
1278 
1279  //! tools only do one action then they are poped
1280  bool m_oneShotTools;
1281 
1282  //! drawing tools and with directly pushing the edit tool.
1283  bool m_editAtEndTools;
1284 
1285  static a2dPathList m_layersPath;
1286 
1287 public:
1288 
1289  static const a2dPropertyIdPathList PROPID_layerPathList;
1290 
1291  //! when active drawing is set, this signal is send to the drawing.
1292  static const a2dSignal sig_changedActiveDrawing;
1293 };
1294 
1295 //! global a2dCanvasGlobal to have easy access to global settings
1296 A2DCANVASDLLEXP_DATA( extern a2dCanvasGlobal* ) a2dCanvasGlobals;
1297 
1298 // ----------------------------------------------------------------------------
1299 //
1300 // ----------------------------------------------------------------------------
1301 
1302 
1303 //! a2dEvtHandler event function for wxTimerEvent
1304 typedef void ( wxEvtHandler::*wxCanvasObjectTimerEventFunction )( wxTimerEvent& );
1305 
1306 /*! \addtogroup eventhandlers
1307 * @{
1308 */
1309 
1310 //! timer event for a2dCanvasObject from a2dTimer
1311 #define EVT_CANVASOBJECT_TIMER(timerid, func) \
1312  DECLARE_EVENT_TABLE_ENTRY( wxEVT_TIMER, timerid, -1, (wxObjectEventFunction) wxStaticCastEvent( wxCanvasObjectTimerEventFunction, & func ), NULL),
1313 
1314 //! @} eventhandlers
1315 
1316 //! wxArt2D specific a2dTimer which notifies a2dCanvasObject's
1317 /*!
1318  \ingroup events
1319 */
1320 class a2dTimer : public wxTimer
1321 {
1322 public:
1323 
1324  a2dTimer()
1325  {
1326  Init();
1327  m_canvasObjectOwner = NULL; m_id = 0;
1328  }
1329 
1330  //! constructor
1331  /*!
1332  \param owner to which a2dCanvasObject/a2dEvtHandler should the event be sent.
1333  \param id event id
1334  */
1335  a2dTimer( wxEvtHandler* owner, int id = -1 )
1336  {
1337  m_canvasObjectOwner = owner;
1338  m_id = id;
1339  }
1340 
1341  //! set object to recieve timer event.
1342  /*!
1343  \param owner to which a2dCanvasObject/a2dEvtHandler should the event be sent.
1344  \param id event id
1345  */
1346  void SetOwner( wxEvtHandler* owner, int id = -1 )
1347  {
1348  m_canvasObjectOwner = owner;
1349  m_id = id;
1350  }
1351 
1352  //! called by a2dTimer when time event is issued.
1353  //! This sents the event to the m_owner
1354  virtual void Notify()
1355  {
1356  wxCHECK_RET( m_canvasObjectOwner, _T( "a2dTimer::Notify() should be overridden." ) );
1357 
1358 #if !wxCHECK_VERSION(2,9,0)
1359  wxTimerEvent event( m_id, m_milli );
1360 #else
1361  wxTimerEvent event( *this );
1362 #endif
1363  m_canvasObjectOwner->ProcessEvent( event );
1364  }
1365 
1366 protected:
1367 
1368  unsigned long m_id;
1369  wxEvtHandler* m_canvasObjectOwner;
1370 };
1371 
1372 
1373 #endif
Display Part of a a2dDrawing, in which a2dCanvasObjects are shown.
Definition: drawer.h:470
bool GetTextOwnStyle() const
get the current text stroke
Definition: canglob.h:890
double GetObjectGridSize()
used for objects which depend in size on this grid
Definition: canglob.h:939
a2dDoMu m_currentContourWidth
current contour width e.g for polyline with width.
Definition: canglob.h:1145
void(wxEvtHandler::* wxCanvasObjectTimerEventFunction)(wxTimerEvent &)
a2dEvtHandler event function for wxTimerEvent
Definition: canglob.h:1304
a2dText derived from a2dCanvasObject, holds multiline text
a2dPATH_END_TYPE
defines the way a polyline with a contour width is ended.
Definition: polyver.h:31
a2dDoMu m_AberPolyToArc
Polygon/polyline to Arc Maximum abberation.
Definition: canglob.h:1124
all basic primitives derived from a2dCanvasObject
Base class for all types of strokes, understood by a2dDrawer2D classes.
Definition: stylebase.h:378
wxUint16 GetLayer() const
layer set for new objects.
Definition: canglob.h:930
double m_coordinateepsilon
Definition: canglob.h:1064
void SetRouteOneLine(bool oneLine)
set true result in having straight lines rerouted between begin and end pin
Definition: canglob.h:646
a2dDoMu m_CORRECTIONABER
boolean operation setting
Definition: canglob.h:1104
a2dLayerGroup()
constructor
Definition: canglob.h:65
static const a2dSignal sig_changedFill
when active drawing is set, this signal is send to the drawing.
Definition: canglob.h:1187
double m_hitmargin_world
hit marging in world units.
Definition: canglob.h:1058
a2dHandle is used inside editing versions of a certain objects.
Definition: canpin.h:30
void SetEditAtEndTools(bool editAtEndTools)
when set, drawing tools are going into edit mode after drawing
Definition: canglob.h:1253
a2dLayerGroup & GetGroupA()
return group A layers
Definition: canglob.h:658
mouse event sent from a2dCanvasObject to itself
Definition: canglob.h:223
a2dCanvasObjectPtr m_currentEnd
current endobject for lines and polylines
Definition: canglob.h:1182
void SetEndScaleX(double xs)
scaling in X for begin and end objects of lines and polylines
Definition: canglob.h:841
#define wxDEFAULTMAXLAYER
maximum number of layers allowed
Definition: candefs.h:62
a2dCanvasObject * GetLineEnd() const
get current line end object for line and polyline.
Definition: canglob.h:832
bool m_LinkHoles
boolean operation setting
Definition: canglob.h:1118
fundamental classes used by all other modules.
virtual void Notify()
Definition: canglob.h:1354
void SetLineEnd(a2dCanvasObject *end)
set current line end object for line and polyline.
Definition: canglob.h:838
a2dDoMu m_SMOOTHABER
boolean operation setting
Definition: canglob.h:1108
class to map references to objects stored in XML, in order to make the connection later on...
Definition: gen.h:3462
a2dDocumentRenderStyle operator|(a2dDocumentRenderStyle a, a2dDocumentRenderStyle b)
OR-ing a2dDocumentRenderStyle is allowed.
Definition: canglob.h:50
wxUint32 GetDrawStyle()
get drawstyles used for drawing the document
Definition: canglob.h:577
void SetTextTemplateObject(a2dText *textTemplateobject)
get template for text objects
Definition: canglob.h:923
const a2dDoMu & GetContourWidth() const
get the Contour width of shapes in meters
Definition: canglob.h:872
a2dStroke m_SelectStroke
Stroke to use for selected a2dCanvasObject&#39;s.
Definition: canglob.h:1018
bool m_WINDINGRULE
boolean operation setting
Definition: canglob.h:1112
virtual wxEvent * Clone() const
clone the event
Definition: canglob.h:173
One Global instance of this class exists, in order to get to global needed objects.
Definition: comevt.h:1099
a2dFill m_SelectFill
Fill to use for selected a2dCanvasObject&#39;s.
Definition: canglob.h:1021
a2dFill m_HighLightFill
Fill to use for Highlighted a2dCanvasObject&#39;s.
Definition: canglob.h:1015
a2dPin is used in a2dCanvasObject to add pins to it.
Definition: canpin.h:233
void SetCoordinateEpsilon(double val)
Definition: canglob.h:637
Ref Counted base object.
Definition: gen.h:1045
bool GetSelectedOnlyB() const
get selectedOnlyB in group operations
Definition: canglob.h:685
void SetOneShotTools(bool oneShotTools)
when set, tools are pushed in one shotmode in PushTool()
Definition: canglob.h:1247
double m_ROUNDFACTOR
boolean operation setting
Definition: canglob.h:1114
void SetBooleanEngineCorrectionFactor(const a2dDoMu &aber)
boolean engine setting
Definition: canglob.h:696
a2dCanvasObjectPtr m_currentBegin
current beginobject for lines and polylines
Definition: canglob.h:1179
void(wxEvtHandler::* a2dCanvasHandleMouseEventFunction)(a2dHandleMouseEvent &)
event function for a2dHandleMouseEvent
Definition: canglob.h:303
contains global settings for the a2dCanvas library
Definition: canglob.h:1217
wxUint16 GetHitMarginDevice() const
hit marging in pixels.
Definition: canglob.h:609
double m_lastX
holds last mouse X position in world coordinates, as set by tools.
Definition: canglob.h:1157
wxUint16 m_hitmargin_device
hit marging in pixels.
Definition: canglob.h:1053
Defines a font to be set to a2dDrawer2D or stored in a2dCanvsObject etc.
Definition: stylebase.h:779
a2dDoMu m_AberArcToPoly
Arc to Polygon/polyline Maximum abberation.
Definition: canglob.h:1126
Path searching.
Definition: gen.h:2926
a2dPATH_END_TYPE GetPathType()
get when m_contourwidth != 0 what is the end of the line looks like.
Definition: canglob.h:878
a2dSmrtPtr< a2dText > m_textTemplateObject
object to clone to use as start
Definition: canglob.h:985
void SetSelectedOnlyB(bool selectedOnlyB)
set selectedOnlyB in group operations
Definition: canglob.h:682
double m_DGRID
boolean operation setting
Definition: canglob.h:1102
a2dDoMu m_radiusMax
Polygon/polyline to Arc Maximum radius to test.
Definition: canglob.h:1122
a2dDoMu m_CORRECTIONFACTOR
boolean operation setting
Definition: canglob.h:1106
a2dDoMu m_MAXLINEMERGE
boolean operation setting
Definition: canglob.h:1110
snapping engine, for snapping while editing a drawing
a2dDoMu m_small
detect samll objects
Definition: canglob.h:1128
double m_objectGridSize
used for objects which depend in size on this grid
Definition: canglob.h:1075
a2dCanvasObject * GetLineBegin() const
get current line begin object for line and polyline.
Definition: canglob.h:828
a2dPATH_END_TYPE m_pathtype
when m_contourwidth != 0 what is the end of the line/polyline.
Definition: canglob.h:1148
a2dCanvasObject is the base class for Canvas Objects.
Definition: canobj.h:371
void(wxEvtHandler::* a2dCanvasObjectEventFunction)(a2dCanvasObjectEvent &)
event function for a2dCanvasObjectEvent
Definition: canglob.h:301
wxUint16 GetTarget()
get target layer in operation
Definition: canglob.h:673
wxUint16 m_target
target layer in operations
Definition: canglob.h:1088
a2dFill m_DefaultFill
Fill to use for non layered a2dCanvasObject&#39;s.
Definition: canglob.h:1033
defenitions an no more
double m_currentYscale
end point scaling
Definition: canglob.h:1142
double GetBooleanEngineRoundfactor() const
boolean engine setting
Definition: canglob.h:753
a2dTimer(wxEvtHandler *owner, int id=-1)
constructor
Definition: canglob.h:1335
bool GetSpline() const
certain drawing tools like polygon drawing use this setting
Definition: canglob.h:822
void SetEndScaleY(double ys)
scaling in Y for begin and end objects of lines and polylines
Definition: canglob.h:844
store and convert number to number with unit and visa versa. e.g. 1.23e-6 =&gt; 1.23 * 1e-6 ...
Definition: artglob.h:208
a2dDrawingPart * GetActiveDrawingPart()
return the currently/last active drawing part.
Definition: canglob.h:1262
double m_copymindistance
the minimum distance in world units of a copied object from the original
Definition: canglob.h:1061
double GetHitMarginWorld() const
hit marging in world units.
Definition: canglob.h:618
const a2dDoMu & GetRadiusMin() const
Polygon/polyline to Arc Minimum radius to test.
Definition: canglob.h:723
a2dDocumentRenderStyle m_SelectDrawStyle
draw style to be used for selected object
Definition: canglob.h:1036
a2dDoMu m_radiusMin
Polygon/polyline to Arc Minimum radius to test.
Definition: canglob.h:1120
bool m_oneLine
used in routing wires to be straight or manhatten
Definition: canglob.h:1070
virtual wxEvent * Clone(bool deep=true) const
clone the event
Definition: canglob.h:237
double m_RelativeStartY
The RelativeStart start is used when mesuring using a tool, or from the commandline.
Definition: canglob.h:1165
void SetOwner(wxEvtHandler *owner, int id=-1)
set object to recieve timer event.
Definition: canglob.h:1346
void SetHitMarginWorld(double val)
hit marging in world units.
Definition: canglob.h:622
const a2dDoMu & GetBooleanEngineCorrectionAber() const
boolean engine setting
Definition: canglob.h:745
a2dNextSeg GetEndSegmentMode()
a2dDrawWirePolylineLTool segment mode initilization
Definition: canglob.h:962
Io handler to iterate through a a2dDocument.
Definition: gen.h:3911
double m_currentXscale
begin point scaling
Definition: canglob.h:1139
wxUint16 m_layer
layer to be set for new objects
Definition: canglob.h:1151
wxMouseEvent & GetMouseEvent()
return the original mouse event that was redirected to the a2dHandle
Definition: canglob.h:290
void SetBooleanEngineCorrectionAber(const a2dDoMu &aber)
boolean engine setting
Definition: canglob.h:694
double GetRelativeStartY() const
holds last RelativeStart measurement Y position in world coordinates
Definition: canglob.h:790
bool m_clearTarget
clear target layer before adding results of an operation
Definition: canglob.h:1095
a2dRestrictionEnginePtr m_restrictionEngine
restriction engine to be used usually (if zero don&#39;t restrict)
Definition: canglob.h:1042
a2dDoMu m_SmoothAber
boolean operation setting
Definition: canglob.h:1116
a2dText is an abstract base class.
Definition: cantext.h:93
bool GetClearTarget() const
get clear of target in group operations
Definition: canglob.h:766
std list compatible list
Definition: a2dlist.h:42
see a2dCanvasObjectMouseEvent
Definition: canglob.h:161
void SetRadiusMax(const a2dDoMu &radiusMax)
Polygon/polyline to Arc Maximum radius to test.
Definition: canglob.h:708
void SetClearTarget(bool clearTarget)
set clear of target in group operations
Definition: canglob.h:763
bool GetOneShotTools()
see SetOneShotTools()
Definition: canglob.h:1250
bool GetEditAtEndTools()
see SetEditAtEndTools
Definition: canglob.h:1256
static const a2dSignal sig_changedActiveDrawing
when active drawing is set, this signal is send to the drawing.
Definition: canglob.h:1292
const a2dStroke & GetStroke() const
get the current stroke
Definition: canglob.h:797
void SetGroupA(const a2dLayerGroup &groupA)
sets operand A in layer operation
Definition: canglob.h:652
double GetRelativeStartX() const
holds last RelativeStart measurement X position in world coordinates
Definition: canglob.h:788
double GetCoordinateEpsilon() const
coordinates below this distance will be trated as equal
Definition: canglob.h:634
layer settings for a a2dCanvasDocument Holds layers settings classes
a2dHit & GetHow()
in what manner the a2dCanvasObject was hit.
Definition: canglob.h:246
provide cursors etc.
Definition: canglob.h:400
bool GetRouteOneLine() const
see SetRouteOneLine()
Definition: canglob.h:649
double GetCopyMinDistance() const
get minimum distance of copied object from original
Definition: canglob.h:625
double GetLastYEntry() const
holds last mouse Y position in world coordinates, as set by tools.
Definition: canglob.h:779
bool m_spline
spline polygons
Definition: canglob.h:1136
double GetLastXEntry() const
holds last mouse X position in world coordinates, as set by tools.
Definition: canglob.h:777
general event sent from a2dHandle to its parent a2dCanvasObject
Definition: canglob.h:273
a2dFont m_font
current font set
Definition: canglob.h:1154
Restriction engine for editing restrictions like snapping.
Definition: restrict.h:88
void SetBooleanEngineDGrid(double dgrid)
boolean engine setting
Definition: canglob.h:692
void SetBooleanEngineMaxlinemerge(const a2dDoMu &maxline)
boolean engine setting
Definition: canglob.h:698
void SetEndSegmentMode(a2dNextSeg mode)
a2dDrawWirePolylineLTool segment mode initilization
Definition: canglob.h:965
bool GetReverseOrder() const
Get Setting for draw layers in reverse order.
Definition: canglob.h:643
void SetConnectionGenerator(a2dConnectionGenerator *connectionGenerator)
Set class for generating new connection objects between object and pins.
Definition: canglob.h:598
a2dLayerGroup m_groupB
for operation on groups of layers
Definition: canglob.h:1085
void SetTextOwnStyle(bool ownStyle)
If set, the text objects will use their own style ( GetTextStroke() etc. )
Definition: canglob.h:887
a2dFill m_Select2Fill
Fill to use for selected2 a2dCanvasObject&#39;s.
Definition: canglob.h:1027
void SetBooleanEngineRoundfactor(double roundfac)
boolean engine setting
Definition: canglob.h:702
a2dHandle * GetCanvasHandle()
return the handle object hit
Definition: canglob.h:287
bool m_selectedOnlyB
operations on m_groupB but only selected objects
Definition: canglob.h:1093
bool GetBooleanEngineWindingRule() const
boolean engine setting
Definition: canglob.h:751
a2dBoundingBox & GetBbox()
in case of wxEVT_CANVASOBJECT_RESIZE_EVENT event get boundingbox which was sent
Definition: canglob.h:181
initiation module for the wxArt2D library
Definition: canglob.h:91
defines common settinsg for a habitat for a set of a2dCameleons.
Definition: canglob.h:439
void SetLastXyEntry(double x, double y)
set last mouse X position in world coordinates, as set by tools.
Definition: canglob.h:774
A 2x3 affine matrix class for 2D transformations.
Definition: afmatrix.h:53
wxMouseEvent & GetMouseEvent()
return the original mouse event that was redirected to the a2dCanvasObject
Definition: canglob.h:243
void SetRelativeStart(double x, double y)
set RelativeStart measurement X and Y position in world coordinates
Definition: canglob.h:785
a2dDoMu m_gridY
canvas default grid in Y
Definition: canglob.h:1133
void AddGroupB(wxUint16 layer)
add layer to group B layers
Definition: canglob.h:667
a2dStroke m_HighLightStroke
Stroke to use for Highlighted a2dCanvasObject&#39;s.
Definition: canglob.h:1012
bool m_selectedOnlyA
operations on m_groupA but only selected objects
Definition: canglob.h:1091
while iterating a a2dCanvasDocument, this holds the context.
Definition: canobj.h:3212
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
Definition: polyver.h:38
void AddGroupA(wxUint16 layer)
add layer to group A layers
Definition: canglob.h:664
double GetEndScaleY() const
get scaling in Y for begin and end objects of lines and polylines
Definition: canglob.h:850
double m_RelativeStartX
The RelativeStart start is used when mesuring using a tool, or from the commandline.
Definition: canglob.h:1162
const a2dFill & GetFill() const
get the current fill
Definition: canglob.h:804
void SetObjectGridSize(double objectGridSize)
used for objects which depend in size on this grid
Definition: canglob.h:936
a2dConnectionGenerator * GetConnectionGenerator() const
Get class for generating new connection objects between object and pins.
Definition: canglob.h:601
void SetRadiusMin(const a2dDoMu &radiusMin)
Polygon/polyline to Arc Minimum radius to test.
Definition: canglob.h:706
const a2dDoMu & GetBooleanEngineCorrectionFactor() const
boolean engine setting
Definition: canglob.h:747
void SetBooleanEngineGrid(long grid)
boolean engine setting
Definition: canglob.h:690
const a2dDoMu & GetSmall() const
detection of small object, smaller than this
Definition: canglob.h:731
const a2dDoMu & GetBooleanEngineMarge() const
boolean engine setting
Definition: canglob.h:739
a2dConnectionGeneratorPtr m_connectionGenerator
generator for new connections
Definition: canglob.h:1045
void(wxEvtHandler::* a2dCanvasObjectMouseEventFunction)(a2dCanvasObjectMouseEvent &)
event function for a2dCanvasObjectMouseEvent
Definition: canglob.h:305
a2dLayers * GetLayerSetup()
Get the central layersettings for the canvas library.
Definition: canglob.h:478
double GetBooleanEngineDGrid() const
boolean engine setting
Definition: canglob.h:743
bool m_reverse_order
draw document in reverse order if set, used as default value for a2dCanvasDocument.
Definition: canglob.h:1067
a2dDocumentRenderStyle m_documentDrawStyle
draw style to be used for drawing with e.g. a2dDrawingPart.
Definition: canglob.h:1039
wxArt2D specific a2dTimer which notifies a2dCanvasObject&#39;s
Definition: canglob.h:1320
void SetBooleanEngineMarge(const a2dDoMu &marge)
boolean engine setting
Definition: canglob.h:688
const a2dFont & GetFont() const
get current font active font.
Definition: canglob.h:884
long GetBooleanEngineGrid() const
boolean engine setting
Definition: canglob.h:741
a2dDocumentRenderStyle GetSelectDrawStyle() const
returns draw style to be used for selected object
Definition: canglob.h:572
list for a2dCanvasObject
a2dStroke m_Select2Stroke
Stroke to use for selected2 a2dCanvasObject&#39;s.
Definition: canglob.h:1024
void SetLineBegin(a2dCanvasObject *begin)
set current line begin object for line and polyline.
Definition: canglob.h:835
virtual wxEvent * Clone(bool deep=true) const
clone the event
Definition: canglob.h:284
const a2dDoMu & GetBooleanEngineSmoothAber() const
boolean engine setting
Definition: canglob.h:755
a2dPathList & GetLayersPathList() const
Path for Icons and small bitmaps.
Definition: canglob.h:1234
const a2dDoMu & GetRadiusMax() const
Polygon/polyline to Arc Maximum radius to test.
Definition: canglob.h:725
holds a list of layers numbers
Definition: canglob.h:60
long m_GRID
boolean operation setting
Definition: canglob.h:1100
void SetGroupB(const a2dLayerGroup &groupB)
sets operand B in layer operation
Definition: canglob.h:655
a2dStroke m_currentstroke
stroke to be set for new objects
Definition: canglob.h:1176
The a2dBoundingBox class stores one a2dBoundingBox of a a2dCanvasObject.
Definition: bbox.h:39
void SetSelectDrawStyle(a2dDocumentRenderStyle drawstyle)
sets draw style to be used for selected object
Definition: canglob.h:569
a2dCanvasObject * GetCanvasObject()
return the object hit
Definition: canglob.h:240
void SetHitMarginDevice(wxUint16 val)
hit marging in pixels.
Definition: canglob.h:613
a2dCanvasGlobal * a2dCanvasGlobals
global a2dCanvasGlobal to have easy access to global settings
Definition: canglob.cpp:1234
bool GetBooleanEngineLinkHoles() const
boolean engine setting
Definition: canglob.h:757
void SetRestrictionEngine(a2dRestrictionEngine *restrict)
Set restriction engine (grid snapping) used normally.
Definition: canglob.h:592
a2dFill m_currentfill
fill to be set for new objects
Definition: canglob.h:1173
This template class is for property ids with a known data type.
Definition: id.h:477
void SetCopyMinDistance(double val)
set minimum distance of copied object from original
Definition: canglob.h:628
a2dDoMu m_gridX
canvas default grid in X
Definition: canglob.h:1131
void SetBooleanEngineWindingRule(bool rule)
boolean engine setting
Definition: canglob.h:700
const a2dDoMu & GetAberPolyToArc() const
Polygon/polyline to Arc Maximum abberation.
Definition: canglob.h:727
a2dLayerGroup m_groupA
for operation on groups of layers
Definition: canglob.h:1082
double m_lastY
holds last mouse Y position in world coordinates, as set by tools.
Definition: canglob.h:1159
a2dLayerGroup & GetGroupB()
return group B layers
Definition: canglob.h:661
a2dDocumentRenderStyle
Define the manner in which a2dCanvasView draws the document to the device.
Definition: candefs.h:84
a2dStroke m_DefaultStroke
Stroke to use for non layered a2dCanvasObject&#39;s.
Definition: canglob.h:1030
void SetReverseOrder(bool reverse_order)
Set to draw layers in reverse order.
Definition: canglob.h:640
a2dDoMu m_MARGE
boolean operation setting
Definition: canglob.h:1098
const a2dDoMu & GetAberArcToPoly() const
Arc to Polygon/polyline Maximum abberation.
Definition: canglob.h:729
void SetSelectedOnlyA(bool selectedOnlyA)
set selectedOnlyA in group operations
Definition: canglob.h:676
bool GetSelectedOnlyA() const
get selectedOnlyA in group operations
Definition: canglob.h:679
const a2dDoMu & GetBooleanEngineMaxlinemerge() const
boolean engine setting
Definition: canglob.h:749
a2dText * GetTextTemplateObject()
set template for line object
Definition: canglob.h:920
CloneOptions
options for cloning
Definition: gen.h:1200
when a new wire or other connection object needs to be created,
Definition: connectgen.h:153
Contain one drawing as hierarchical tree of a2dCanvasObject&#39;s.
Definition: drawing.h:434
double GetEndScaleX() const
get scaling in X for begin and end objects of lines and polylines
Definition: canglob.h:847
a2dSmrtPtr< a2dLayers > m_layersetup
default setup for layers in a2dCanvasDocument&#39;s
Definition: canglob.h:970
canglob.h Source File -- Sun Oct 12 2014 17:04:13 -- Sun Oct 12 2014 -- 1.8.5 -- wxArt2D -- . -- Main Page Reference Documentation