wxArt2D
layerinf.h
Go to the documentation of this file.
1 /*! \file wx/canvas/layerinf.h
2  \brief layer settings for a a2dCanvasDocument
3  Holds layers settings classes
4 
5  \author Klaas Holwerda
6 
7  Copyright: 2000-2004 (c) Klaas Holwerda
8 
9  Licence: wxWidgets Licence
10 
11  RCS-ID: $Id: layerinf.h,v 1.37 2009/04/02 19:31:58 titato Exp $
12 */
13 
14 #ifndef __LAYERINF_H__
15 #define __LAYERINF_H__
16 
17 #ifndef WX_PRECOMP
18 #include "wx/wx.h"
19 #endif
20 
21 #include "wx/geometry.h"
22 #include "wx/artbase/afmatrix.h"
23 //#include "wx/canvas/xmlpars.h"
24 #include "wx/artbase/liner.h"
25 #include "wx/artbase/bbox.h"
26 #include "wx/canvas/canglob.h"
27 #include "wx/canvas/canobj.h"
28 
29 /******************************************************************************
30 Layers settings
31 *******************************************************************************/
32 
33 const double LAYERINFO_WIDTH = 100;
34 const double LAYERINFO_HEIGHT = 100;
35 
36 //!contains the layer properties for one layer,
37 /*!settings for brush and stroke and other layer related settings.
38 
39  \ingroup canvasobject style
40 */
41 class A2DCANVASDLLEXP a2dLayerInfo : public a2dCanvasObject
42 {
43  DECLARE_DYNAMIC_CLASS( a2dLayerInfo )
44 
45 public:
46  //!constructor
47  a2dLayerInfo();
48 
49  //!constructor
50  /*!
51  The index of the layer should be between
52  <code>wxLAYER_USER_FIRST</code> and <code>wxLAYER_USER_LAST</code>
53  to avoid conflicts with predefined layers.
54 
55  \see wxLayerNames
56 
57  \param index layer index
58  \param name layer name
59  \parem parent of which layersetup this is a part.
60  */
61  a2dLayerInfo( wxUint16 index, wxString name );
62 
63  //!constructor
64  a2dLayerInfo( const a2dLayerInfo& other, CloneOptions options = clone_deep, a2dRefMap* refs = NULL );
65 
66  ~a2dLayerInfo();
67 
68  //! Get name for layer
69  virtual wxString GetName() const;
70 
71  //! Set name for layer
72  /*!If set the name will be returned for GetName() from now on.
73 
74  \param name name to be set for the object
75  */
76  virtual void SetName( const wxString& name );
77 
78  //! sent a sig_changedLayerInfo to a2dDrawing
79  void SignalChange();
80 
81  //! setpending to also set a2dLayers pending
82  void SetPending( bool pending );
83 
84  //!is the layer visible
85  bool GetVisible();
86 
87  //!can objects on this layer be selected
88  bool GetSelectable();
89 
90  //! order index for drawing order.
91  //! The layers are sorted on order before they or rendered.
92  //! Rendering in order of visibility, requires rendering in reverse order.
93  int GetOrder() const;
94 
95  //!does this layer need to be read in from a file.
96  bool GetRead();
97 
98  //!mapping of external file layer to internal layer index
99  int GetInMapping();
100 
101  //!mapping of internal layer index to external layer index
102  int GetOutMapping();
103 
104  //!stroke defined in pixels?
105  bool GetPixelStroke();
106 
107  //!are there objects on this layer
108  bool GetAvailable() { return m_layeravailable; }
109 
110  //! set layer available (will be rendered)
111  void SetAvailable( bool status ) { m_layeravailable = status; }
112 
113  //! return the default pin class of this layer
114  a2dPinClass* GetPinClass() const { return m_pinclass; }
115 
116  //! Set the default pin class for this layer
117  void SetPinClass( a2dPinClass* pinClass ) { m_pinclass = pinClass; }
118 
119  //! set layer visible
120  void SetVisible( bool status );
121  //! set layer selectable
122  void SetSelectable( bool status );
123  //! set drawing order for layer
124  void SetOrder( wxUint16 order );
125  //! read this layer from input files
126  void SetRead( bool status );
127  //! read this layer from the given layer in input files
128  void SetInMapping( wxUint16 layer );
129  //! write this layer from the given layer to output files
130  void SetOutMapping( wxUint16 layer );
131 
132  //! make stroke of layer a pixelstroke
133  void SetPixelStroke( bool pixel );
134 
135  //! this layer is part of a group of layers to present a feature ( metalized via etc. ).
136  const wxString& GetFeature() const { return m_feature; }
137 
138  //! this layer is part of a group of layers to present a feature ( metalized via etc. ).
139  void SetFeature( const wxString& feature ) { m_feature = feature; }
140 
141  //! extra as part of a feature.
142  const wxString& GetSubFeature() const { return m_subFeature; }
143 
144  //! extra as part of a feature.
145  void SetSubFeature( const wxString& subfeature ) { m_subFeature = subfeature; }
146 
147  //! type of layer (mask, holes etc.)
148  const wxString& GetType() const { return m_type; }
149 
150  //! type of layer (mask, holes etc.)
151  void SetType( const wxString& type ) { m_type = type; }
152 
153  //! which side of board
154  const wxString& GetSide() const { return m_side; }
155 
156  //! which side of board
157  void SetSide( const wxString& side ) { m_side = side; }
158 
159  //! two layer names seperated by :
160  /*!
161  Used to tell for layers of type hole, in between which other two layers this hole starts and ends.
162  */
163  const wxString& GetSpan() const { return m_span; }
164 
165  //! see GetSpan()
166  void SetSpan( const wxString& span ) { m_span = span; }
167 
168  //! what is this layer for.
169  wxString& GetDescription() { return m_description; }
170 
171  void SetDescription( const wxString& description ) { m_description = description; }
172 
173  //! used to save area occupied by all primitives on the layer
174  double GetArea() { return m_area; }
175 
176  //! used to save area occupied by all primitives on the layer
177  void SetArea( double area ) { m_area = area; }
178 
179  //! get if the mask is negative or positive
180  bool GetPolarity() { return m_polarity; }
181 
182  //! set if the mask is negative or positive
183  void SetPolarity( bool polarity ) { m_polarity = polarity; }
184 
185  //! in case of layers containing holes, what is the default hoel on the layer.
186  //! May be overruled by properties on holes.
187  bool GetPlated() { return m_plated; }
188 
189  //! in case of layers containing holes, what is the default hoel on the layer.
190  //! May be overruled by properties on holes.
191  void SetPlated( bool plated ) { m_plated = plated; }
192 
193  //! get currently counted number of objects on this layer inside a document.
194  wxUint32 GetObjectCount() { return m_canvasObjectCount; }
195 
196  //! set currently counted number of objects on this layer inside a document.
197  void SetObjectCount( wxUint32 numberOfObjects ) { m_canvasObjectCount = numberOfObjects; }
198 
199  //! increment currently counted number of objects on this layer inside a document.
200  void IncrementObjectCount() { m_canvasObjectCount++; }
201 
202  //! decrement currently counted number of objects on this layer inside a document.
203  void DecrementObjectCount() { m_canvasObjectCount--; }
204 
205  //! get currently counted number of objects on this layer inside a document.
206  wxUint32 GetPreviousObjectCount() { return m_canvasPreviousObjectCount; }
207 
208  //! set currently counted number of objects on this layer inside a document.
209  void SetPreviousObjectCount( wxUint32 numberOfObjects ) { m_canvasPreviousObjectCount = numberOfObjects; }
210 
211  //! layer became empty or filled?
212  bool StateChange()
213  {
214  return
215  (
216  m_canvasPreviousObjectCount != 0 && m_canvasObjectCount == 0 ||
217  m_canvasPreviousObjectCount == 0 && m_canvasObjectCount != 0
218  );
219  }
220 
221 protected:
222 
223  virtual a2dObject* DoClone( CloneOptions options, a2dRefMap* refs ) const;
224 
225  friend class a2dLayers;
226 
227 #if wxART2D_USE_CVGIO
228  void DoSave( wxObject* parent, a2dIOHandlerXmlSerOut& out, a2dXmlSer_flag xmlparts , a2dObjectList* towrite );
229 
230  void DoLoad( wxObject* parent, a2dIOHandlerXmlSerIn& parser, a2dXmlSer_flag xmlparts );
231 #endif //wxART2D_USE_CVGIO
232 
233  //virtual bool DoStartEdit( int editmode, wxEditStyle editstyle );
234 
235  //! called via a2dPropertyId SetPropertyToObject() etc.
236  void OnPropertyChanged( a2dComEvent& event );
237 
238  void DoRender( a2dIterC& ic, OVERLAP clipparent );
239 
240  bool DoIsHitWorld( a2dIterC& ic, a2dHitEvent& hitEvent );
241 
242  a2dBoundingBox DoGetUnTransformedBbox( a2dBboxFlags flags = a2dCANOBJ_BBOX_NON ) const;
243 
244  //!is the layer selectable
246 
247  //!is the layer visible
249 
250  //!will the layer be read from a file
252 
253  //! used to check if a layer is indeed available in a document or whatever strcuture.
254  //! a2dWalker_SetAvailable can set it
256 
257  //!drawing order number
258  wxUint16 m_order;
259 
260  //!mapping to this layer from the file layer in the input file
261  wxUint16 m_inmap;
262 
263  //!mapping to this layer from the file layer in the output file
264  wxUint16 m_outmap;
265 
266  //! width of rectangle
267  double m_width;
268 
269  //! height of rectangle
270  double m_height;
271 
272  //! name of the layer
273  wxString m_layername;
274 
275  //! this layer is part of a group of layers to present a feature ( metalized via etc. ).
276  wxString m_feature;
277 
278  //! extra as part of a feature.
279  wxString m_subFeature;
280 
281  //! type of layer (mask, holes etc.)
282  wxString m_type;
283 
284  //! which side of board
285  wxString m_side;
286 
287  //! Used to tell for layers of type hole, in between which other two layers this hole starts and ends.
288  wxString m_span;
289 
290  //! what is this layer for.
291  wxString m_description;
292 
293  //! used to save area occupied by all primitives on the layer
294  double m_area;
295 
296  //! negative or positive
298 
299  //! in case of layers containing holes, what is the default hoel on the layer.
300  //! May be overruled by properties on holes.
301  bool m_plated;
302 
303  //! The class defines to which other pins a pin on this layer can connect
304  /*!
305  Used for objects on this layer, when generating new default pins, see a2dPinClass::Any
306  */
308 
309  //! Gives the number of object on this layer in a document.
310  //! Only accurate after a SetAvailable
311  mutable wxUint32 m_canvasObjectCount;
312 
313  mutable wxUint32 m_canvasPreviousObjectCount;
314 
315 public:
316 
317  DECLARE_EVENT_TABLE()
318 
319 public:
320 
321  //! when one layer its a2dLayerInfo has changed ( e.g. visible or order of rendering )
322  static const a2dSignal sig_changedLayerInfo;
323 
324  //! member ids
325  static a2dPropertyIdString* PROPID_layerName;
326  static a2dPropertyIdBool* PROPID_layerSelectable;
327  static a2dPropertyIdBool* PROPID_layerVisible;
328  static a2dPropertyIdBool* PROPID_readlayer;
329  static a2dPropertyIdUint16* PROPID_order;
330  static a2dPropertyIdUint16* PROPID_inmap;
331  static a2dPropertyIdUint16* PROPID_outmap;
332 
334 
335 private:
336  //!this is a not implemented copy constructor that avoids automatic creation of one
337  //a2dLayerInfo( const a2dLayerInfo &other );
338 };
339 
340 #if defined(WXART2D_USINGDLL)
341 template class A2DCANVASDLLEXP std::allocator< a2dSmrtPtr<a2dLayerInfo> >;
342 template class A2DCANVASDLLEXP std::vector< a2dSmrtPtr<a2dLayerInfo> >;
343 #endif
344 
345 A2DCANVASDLLEXP_DATA( extern a2dSmrtPtr<a2dLayerInfo> ) wxNullLayerInfo;
346 
348 typedef std::vector<a2dLayerInfoPtr> a2dLayerIndex;
349 
351 
352 
353 //!contains the setup for the layers, the setup contains for each layer number
354 //!all settings like stroke and brush visibility.
355 /*!
356  The a2dLayers is derived from a2dCanvasObject, to be able to view/edit
357  a2dLayers as if it is a a2dCanvasDocument.
358 
359  To traverse the array based on the order set for each layer,
360  you ask for the orderarray, which gives layer number sorted on order
361 
362  \sa a2dLayerInfo
363 
364  \ingroup canvasobject style
365 */
366 class A2DCANVASDLLEXP a2dLayers : public a2dCanvasObject
367 {
368  DECLARE_DYNAMIC_CLASS( a2dLayers )
369 
370 public:
371 
372  enum Index
373  {
374  //! index on layer number
376  //! index on layer order
378  //! index on layer reverse order
380  };
381 
382  a2dLayers();
383 
384  a2dLayers( const a2dLayers& other, CloneOptions options, a2dRefMap* refs );
385 
386  ~a2dLayers();
387 
388  //! set filename based on file where layers were read from
389  /*!
390  If the layers are part of the document file, this is empty.
391  */
392  void SetFileName( const wxFileName& filename ) { m_filename = filename; }
393 
394  //! get filename of layers files from which this object was read.
395  wxFileName& GetFileName() { return m_filename; }
396 
397  //! next to base sets m_indexed false
398  void SetPending( bool pending );
399 
400  //! element operator
401  a2dLayerInfo* operator[] ( int indx );
402  //! element operator
403  const a2dLayerInfo* operator[] ( int indx ) const;
404  a2dLayerInfo* GetLayerInfo( int index );
405 
406  //! return array index on Layer
407  std::vector<a2dLayerInfoPtr>& GetLayerIndex();
408  //! return array index on Order
409  std::vector<a2dLayerInfoPtr>& GetOrderIndex();
410  //! return array index on ReverseOrder
411  std::vector<a2dLayerInfoPtr>& GetReverseOrderIndex();
412 
413  //! save layers to a file
414  bool LoadLayers( const wxString& filename );
415 
416  //! save layer object to CVG file
417  bool SaveLayers( const wxString& filename );
418 
419  void InitWith( int highlayer, bool blackWhite );
420 
421  wxString GetName( int layernumber );
422  int GetNumber( wxString name );
423  a2dStroke GetStroke( int layernumber );
424  bool GetVisible( int layernumber );
425  bool GetSelectable( int layernumber );
426  a2dFill GetFill( int layernumber );
427  int GetOrder( int layernumber );
428  bool GetRead( int layernumber );
429  int GetInMapping( int layernumber );
430  int GetOutMapping( int layernumber );
431 
432  bool GetPixelStroke( int layernumber );
433 
434  void SetName( int layernumber, wxString name );
435  void SetStroke( int layernumber, const a2dStroke& stroke );
436  void SetVisible( int layernumber, bool = true );
437  void SetAvailable( int layernumber, bool = true );
438  void SetSelectable( int layernumber, bool = true );
439  void SetFill( int layernumber, const a2dFill& fill );
440  void SetOrder( int layernumber, int status );
441  void SetRead( int layernumber, bool = true );
442  void SetInMapping( int layernumber, wxUint16 layer );
443  void SetOutMapping( int layernumber, wxUint16 layer );
444 
445  //! sets a a2dPatternFill to this stipple, if not a a2dPatternFill, it will be changed.
446  void SetPattern( int layernumber, const wxBitmap& stipple );
447 
448  void SetPixelStroke( int layernumber, bool = true );
449 
450  //! set all layers visible
451  void SetAll_Layers_Visible( bool onoff );
452 
453  //! set all layers read
454  void SetAll_Layers_Read( bool onoff );
455 
456  //! set all visible layers selectable
457  void SetAll_Layers_Selectable( bool onoff );
458 
459  //! set all visible layers outline
460  void SetAll_Layers_Outline( bool onoff );
461 
462  void SetAllLayersAvailable( bool onoff );
463 
464  //! set available flag based on given a2dDrawing
465  void SetAvailable( a2dDrawing* drawing );
466 
467  //! set available flag based on given other layersetup
468  void SetAvailable( a2dLayers* other );
469 
470  //! all non defined layers until wxMAXLAYER will be added a new childs.
471  /*!
472  When loading layer settings in some way, not all layers do have to be defined.
473  This will complete the missing layers numbers.
474 
475  At last update index array of Order, Layer and ReverseOrder
476  */
477  void UpdateIndexes();
478 
479 protected:
480 
481  virtual a2dObject* DoClone( CloneOptions options, a2dRefMap* refs ) const;
482 
483 #if wxART2D_USE_CVGIO
484  void DoLoad( wxObject* parent, a2dIOHandlerXmlSerIn& parser, a2dXmlSer_flag xmlparts );
485 
486  void DoSave( wxObject* parent, a2dIOHandlerXmlSerOut& out, a2dXmlSer_flag xmlparts , a2dObjectList* towrite );
487 #endif //wxART2D_USE_CVGIO
488 
489  bool DoUpdate( UpdateMode mode, const a2dBoundingBox& childbox, const a2dBoundingBox& clipbox, const a2dBoundingBox& propbox );
490 
491  a2dLayerIndex m_layerArrayOnOrder;
492  a2dLayerIndex m_layerArrayOnReverseOrder;
493  a2dLayerIndex m_layerArrayOnLayer;
494 
495  //! to test if index array are valid
496  bool m_indexed;
497 
498 public:
499  static a2dPropertyIdBool* PROPID_visibleAll;
500  static a2dPropertyIdBool* PROPID_readAll;
501  static a2dPropertyIdBool* PROPID_selectableAll;
502 
503  static const a2dSignal sig_visibleAll;
504  static const a2dSignal sig_selectAll;
505  static const a2dSignal sig_outlineAll;
506  static const a2dSignal sig_readAll;
507  static const a2dSignal sig_availableAll;
508 
510 
511 private:
512 
513  wxFileName m_filename;
514 
515  //!this is a not implemented copy constructor that avoids automatic creation of one
516  a2dLayers( const a2dLayers& other );
517 };
518 
519 extern bool LayerSorter( const a2dCanvasObjectPtr& x, const a2dCanvasObjectPtr& y );
520 
521 extern bool OrderSorter( const a2dCanvasObjectPtr& x, const a2dCanvasObjectPtr& y );
522 
523 
524 extern bool ReverseOrderSorter( const a2dCanvasObjectPtr& x, const a2dCanvasObjectPtr& y );
525 
526 
527 #if defined(WXART2D_USINGDLL)
528 template class A2DCANVASDLLEXP a2dSmrtPtr<a2dLayers>;
529 #endif
530 
531 #endif
532 
void SetSpan(const wxString &span)
see GetSpan()
Definition: layerinf.h:166
Base class for all types of strokes, understood by a2dDrawer2D classes.
Definition: stylebase.h:378
virtual bool DoIsHitWorld(a2dIterC &ic, a2dHitEvent &hitEvent)
Does hit test on the object (exclusif child objects)
Definition: canobj.cpp:3713
wxString m_layername
name of the layer
Definition: layerinf.h:273
void SetPreviousObjectCount(wxUint32 numberOfObjects)
set currently counted number of objects on this layer inside a document.
Definition: layerinf.h:209
index on layer reverse order
Definition: layerinf.h:379
void SetFileName(const wxFileName &filename)
set filename based on file where layers were read from
Definition: layerinf.h:392
a2dLayerInfo * operator[](int indx)
element operator
Definition: layerinf.cpp:681
void SetAll_Layers_Selectable(bool onoff)
set all visible layers selectable
Definition: layerinf.cpp:1023
virtual wxString GetName() const
Returns the name of this object, if no name is given the internal id will be returned.
Definition: gen.cpp:1310
const wxString & GetFeature() const
this layer is part of a group of layers to present a feature ( metalized via etc. )...
Definition: layerinf.h:136
virtual a2dObject * DoClone(CloneOptions options, a2dRefMap *refs) const
Clone this object and return a pointer to the new object.
Definition: canobj.cpp:1426
class to map references to objects stored in XML, in order to make the connection later on...
Definition: gen.h:3462
bool GetAvailable()
are there objects on this layer
Definition: layerinf.h:108
wxUint32 GetPreviousObjectCount()
get currently counted number of objects on this layer inside a document.
Definition: layerinf.h:206
bool m_readlayer
will the layer be read from a file
Definition: layerinf.h:251
void SetAll_Layers_Outline(bool onoff)
set all visible layers outline
Definition: layerinf.cpp:1038
wxUint16 m_outmap
mapping to this layer from the file layer in the output file
Definition: layerinf.h:264
This is a class/type description for a2dPin&#39;s.
Definition: canpin.h:628
void SetPlated(bool plated)
Definition: layerinf.h:191
Ref Counted base object.
Definition: gen.h:1045
void SetFeature(const wxString &feature)
this layer is part of a group of layers to present a feature ( metalized via etc. )...
Definition: layerinf.h:139
double m_height
height of rectangle
Definition: layerinf.h:270
a2dPinClass * m_pinclass
The class defines to which other pins a pin on this layer can connect.
Definition: layerinf.h:307
Input and output handler for the XmlSer format.
Definition: genxmlpars.h:819
UpdateMode
Various mode flags for Update.
Definition: canobj.h:1091
void SetPolarity(bool polarity)
set if the mask is negative or positive
Definition: layerinf.h:183
void SetSelectable(bool selectable)
Allows to select this object.
Definition: canobj.h:1664
virtual void SetPending(bool pending)
set this object pending for update
Definition: canobj.cpp:2585
OVERLAP
Result of a a2dBoundingBox intersection or hittest.
Definition: bbox.h:24
bool m_polarity
negative or positive
Definition: layerinf.h:297
wxString m_subFeature
extra as part of a feature.
Definition: layerinf.h:279
const wxString & GetSubFeature() const
extra as part of a feature.
Definition: layerinf.h:142
The base class for all drawable objects in a a2dCanvasDocument.
void SetArea(double area)
used to save area occupied by all primitives on the layer
Definition: layerinf.h:177
#define DECLARE_PROPERTIES()
check if class has the given id as a valid id for this object
Definition: gen.h:835
virtual void DoLoad(wxObject *parent, a2dIOHandlerXmlSerIn &parser, a2dXmlSer_flag xmlparts)
load object specific CVG data
Definition: canobj.cpp:5728
const wxString & GetSpan() const
two layer names seperated by :
Definition: layerinf.h:163
a2dCanvasObject is the base class for Canvas Objects.
Definition: canobj.h:371
std::vector< a2dLayerInfoPtr > & GetLayerIndex()
return array index on Layer
Definition: layerinf.cpp:555
void SetSide(const wxString &side)
which side of board
Definition: layerinf.h:157
wxString m_span
Used to tell for layers of type hole, in between which other two layers this hole starts and ends...
Definition: layerinf.h:288
bool SaveLayers(const wxString &filename)
save layer object to CVG file
Definition: layerinf.cpp:615
virtual void DoRender(a2dIterC &ic, OVERLAP clipparent)
render derived object
Definition: canobj.cpp:4695
virtual void SetName(const wxString &name)
Creates the a2dStringProperty PROPID_Name.
Definition: gen.cpp:1305
const wxString & GetSide() const
which side of board
Definition: layerinf.h:154
bool m_layervisible
is the layer visible
Definition: layerinf.h:248
void OnPropertyChanged(a2dComEvent &event)
Definition: canobj.cpp:2762
void SetPattern(int layernumber, const wxBitmap &stipple)
sets a a2dPatternFill to this stipple, if not a a2dPatternFill, it will be changed.
Definition: layerinf.cpp:975
bool m_layerselectable
is the layer selectable
Definition: layerinf.h:245
double m_area
used to save area occupied by all primitives on the layer
Definition: layerinf.h:294
wxUint32 m_canvasObjectCount
Definition: layerinf.h:311
bool StateChange()
layer became empty or filled?
Definition: layerinf.h:212
void IncrementObjectCount()
increment currently counted number of objects on this layer inside a document.
Definition: layerinf.h:200
bool GetPolarity()
get if the mask is negative or positive
Definition: layerinf.h:180
bool m_layeravailable
Definition: layerinf.h:255
const wxString & GetType() const
type of layer (mask, holes etc.)
Definition: layerinf.h:148
wxString m_feature
this layer is part of a group of layers to present a feature ( metalized via etc. )...
Definition: layerinf.h:276
bounding class for optimizing drawing speed.
wxUint32 GetObjectCount()
get currently counted number of objects on this layer inside a document.
Definition: layerinf.h:194
wxString & GetDescription()
what is this layer for.
Definition: layerinf.h:169
virtual void DoSave(wxObject *parent, a2dIOHandlerXmlSerOut &out, a2dXmlSer_flag xmlparts, a2dObjectList *towrite)
write object specific CVGL data
Definition: canobj.cpp:5569
wxString m_side
which side of board
Definition: layerinf.h:285
wxFileName & GetFileName()
get filename of layers files from which this object was read.
Definition: layerinf.h:395
contains the layer properties for one layer,
Definition: layerinf.h:41
Input and output handler for the XmlSer format.
Definition: genxmlpars.h:862
return full boundingbox of derived object
Definition: canobj.h:665
void UpdateIndexes()
all non defined layers until wxMAXLAYER will be added a new childs.
Definition: layerinf.cpp:695
void SetAll_Layers_Read(bool onoff)
set all layers read
Definition: layerinf.cpp:1008
a2dPinClass * GetPinClass() const
return the default pin class of this layer
Definition: layerinf.h:114
wxString m_description
what is this layer for.
Definition: layerinf.h:291
void SetAll_Layers_Visible(bool onoff)
set all layers visible
Definition: layerinf.cpp:994
bool m_indexed
to test if index array are valid
Definition: layerinf.h:496
void SetVisible(bool visible)
set if this object will visible (be rendered or not)
Definition: canobj.h:1303
bool LoadLayers(const wxString &filename)
save layers to a file
Definition: layerinf.cpp:576
A list class for reference counted objects.
Definition: smrtptr.h:623
double GetArea()
used to save area occupied by all primitives on the layer
Definition: layerinf.h:174
while iterating a a2dCanvasDocument, this holds the context.
Definition: canobj.h:3212
void DecrementObjectCount()
decrement currently counted number of objects on this layer inside a document.
Definition: layerinf.h:203
void SetStroke(const wxColour &strokecolor, double width=0, a2dStrokeStyle style=a2dSTROKE_SOLID)
Set a stroke for the object which will be used instead of the layer stroke.
Definition: canobj.cpp:2924
std::vector< a2dLayerInfoPtr > & GetReverseOrderIndex()
return array index on ReverseOrder
Definition: layerinf.cpp:569
void SetPinClass(a2dPinClass *pinClass)
Set the default pin class for this layer.
Definition: layerinf.h:117
void SetSubFeature(const wxString &subfeature)
extra as part of a feature.
Definition: layerinf.h:145
index on layer number
Definition: layerinf.h:375
wxUint16 m_order
drawing order number
Definition: layerinf.h:258
void SetObjectCount(wxUint32 numberOfObjects)
set currently counted number of objects on this layer inside a document.
Definition: layerinf.h:197
double m_width
width of rectangle
Definition: layerinf.h:267
see a2dComEvent
Definition: gen.h:371
bool GetVisible() const
get visibility (rendering depends on layer settings also)
Definition: canobj.h:1309
bool GetSelectable() const
is the object selectable flag set
Definition: canobj.h:1648
The a2dBoundingBox class stores one a2dBoundingBox of a a2dCanvasObject.
Definition: bbox.h:39
std::vector< a2dLayerInfoPtr > & GetOrderIndex()
return array index on Order
Definition: layerinf.cpp:562
virtual a2dBoundingBox DoGetUnTransformedBbox(a2dBboxFlags flags=a2dCANOBJ_BBOX_NON) const
In derived object this should be overriden to calculate the boundingbox of the object without its chi...
Definition: canobj.cpp:5031
affine matrix class
virtual bool DoUpdate(UpdateMode mode, const a2dBoundingBox &childbox, const a2dBoundingBox &clipbox, const a2dBoundingBox &propbox)
Update derived Object specific things ( mainly boundingbox)
Definition: canobj.cpp:5098
This template class is for property ids with a known data type.
Definition: id.h:477
bool m_plated
Definition: layerinf.h:301
wxUint16 m_inmap
mapping to this layer from the file layer in the input file
Definition: layerinf.h:261
bool GetPlated()
Definition: layerinf.h:187
void SetAvailable(bool status)
set layer available (will be rendered)
Definition: layerinf.h:111
void SetType(const wxString &type)
type of layer (mask, holes etc.)
Definition: layerinf.h:151
list of a2dObject&#39;s
Definition: gen.h:3157
A pointer class, that automatically calls SmrtPtrOwn/SmrtPtrRelease.
Definition: a2dlist.h:20
CloneOptions
options for cloning
Definition: gen.h:1200
wxString m_type
type of layer (mask, holes etc.)
Definition: layerinf.h:282
basic 2 point line class for intersection and contouring routines.
structure to give as parameter to member functions of a2dCanvasObject
Definition: canobj.h:252
Contain one drawing as hierarchical tree of a2dCanvasObject&#39;s.
Definition: drawing.h:434
void SetFill(const a2dFill &fill)
Set a fill for the object which will be used instead of the layer fill.
Definition: canobj.cpp:2874
index on layer order
Definition: layerinf.h:377
general canvas module declarations and classes
layerinf.h Source File -- Sun Oct 12 2014 17:04:21 -- Sun Oct 12 2014 -- 1.8.5 -- wxArt2D -- . -- Main Page Reference Documentation