Hot Door CORE  0.7.1
Adobe® Illustrator® Plug-in Library
hdicoreLayer.h
Go to the documentation of this file.
1 
7 #ifndef __HDI_CORE_LAYER__
8 #define __HDI_CORE_LAYER__
9 
10 #include "hdicoreTypes.h"
11 #include "hdicoreColor.h"
12 
13 namespace hdi
14 {
15  namespace plugin
16  {
17  class Layer;
18  }
19 
20  namespace core
21  {
22  class Art;
23 
27  class Layer
28  {
29  public:
49  class Iterator
50  {
51  public:
59  Iterator(const Iterator& iter_);
60 
66  ~Iterator();
67 
77  Iterator& operator=(const Iterator& rhs_);
78 
87  bool operator==(const Iterator& rhs_) const;
88 
97  bool operator!=(const Iterator& rhs_) const;
98 
106  Iterator& operator++();
107 
115  Iterator operator++(int);
116 
124  Iterator& operator--();
125 
133  Iterator operator--(int);
134 
143  bool atEnd() const;
144 
153  std::auto_ptr<Layer> layer() const;
154 
155 
156  private:
157  // Only Layer can construct a new Iterator object
158  friend class Layer;
159 
163  void* __data;
164 
170  Iterator();
171 
180  explicit Iterator(const Layer& layer_);
181  };
182 
183  typedef std::auto_ptr<Iterator> IteratorAP;
184 
196  Layer();
197 
205  Layer(const Layer& layer_);
206 
214  Layer(const AILayerHandle aiLayer_);
215 
226  Layer(const PaintOrder order_, const Layer* const prep_ = NULL);
227 
233  virtual ~Layer();
234 
243  virtual Layer& operator=(const Layer& rhs_);
244 
256  virtual AILayerHandle aiLayerHandle() const;
257 
265  virtual bool isEmpty() const;
266 
277  virtual bool dispose();
278 
288  virtual bool editable() const;
289 
299  virtual void setEditable(const bool editable_);
300 
310  virtual bool locked() const;
311 
321  virtual void setLocked(const bool locked_);
322 
330  virtual std::string name() const;
331 
339  virtual void setName(const std::string& name_);
340 
346  virtual void show();
347 
353  virtual void hide();
354 
362  virtual bool visible() const;
363 
373  virtual void setVisible(const bool visible_);
374 
383  virtual std::auto_ptr<Art> group() const;
384 
392  virtual bool active() const;
393 
401  virtual bool hasArt() const;
402 
410  virtual bool hasSelectedArt() const;
411 
419  virtual void deselectArt() const;
420 
428  virtual Color color() const;
429 
437  virtual void setColor(const Color& color_);
438 
446  virtual std::auto_ptr<Layer> parent() const;
447 
455  virtual std::auto_ptr<Layer> firstChild() const;
456 
464  virtual std::auto_ptr<Layer> sibling() const;
465 
473  virtual std::auto_ptr<Layer> priorSibling() const;
474 
483  virtual std::auto_ptr<Layer> nextPreorderLayer() const;
484 
492  virtual bool preview() const;
493 
501  virtual void setPreview(const bool preview_);
502 
510  virtual bool printed() const;
511 
519  virtual void setPrinted(const bool printed_);
520 
528  virtual bool dimsPlacedImages() const;
529 
537  virtual void setDimsPlacedImages(const bool dim_);
538 
552  virtual bool convertToGroup();
553 
562  virtual bool operator==(const Layer& rhs_) const;
563 
572  virtual bool operator!=(const Layer& rhs_) const;
573 
581  virtual bool valid() const;
582 
608  Iterator begin() const;
609 
610 
611  private:
612  friend class CurrentDocument;
613 
614  friend plugin::Layer* __accessImpl(const Layer&);
615  friend Layer __accessCtor(plugin::Layer*&);
616 
620  void* __data;
621 
627  void* __impl() const;
628 
634  Layer(plugin::Layer*&);
635  };
636 
637  typedef std::auto_ptr<Layer> LayerAP;
638 
639  extern plugin::Layer* __accessImpl(const Layer&);
640  extern Layer __accessCtor(plugin::Layer*&);
641  }
642 }
643 
644 #endif
645 // __HDI_CORE_LAYER__
Describes an RGB color, with opacity, typically for UI purposes.
Definition: hdicoreColor.h:24
Color color()
Gets the current annotation color.
Header file for describing Illustrator UI colors.
PaintOrder
Indicates the position of art or layers when during creation or reordering.
Definition: hdicoreTypes.h:250
void setColor(const Color &color_)
Sets the current annotation color.
Header file for a wide variety of necessary typedefs, enums, and forwards declarations.
Allows for layer metadata access, visibility manipulation, locking, sibling access, etc.
Definition: hdicoreLayer.h:27
Current (focused) document class to allow for metadata access, updating, dictionary access...
Definition: hdicoreCurrentDocument.h:50
Definition: hdicoreaiArray.h:12
Allows for iteration through the siblings of a layer, a la std::vector iteration. ...
Definition: hdicoreLayer.h:49