Hot Door CORE  0.7.0
Adobe® Illustrator® Plug-in Library
hdicorePattern.h
Go to the documentation of this file.
1 
7 #ifndef __HDI_CORE_PATTERN__
8 #define __HDI_CORE_PATTERN__
9 
10 #include "hdicoreArtboardRect.h"
11 #include "hdicoreTypes.h"
12 
13 namespace hdi
14 {
15  namespace plugin
16  {
17  class Pattern;
18  }
19 
20  namespace core
21  {
22  class Art;
23 
27  class Pattern
28  {
29  public:
33  enum Type
34  {
35  UnknownPatternType = 0,
36  NormalPatternType = 10,
37  SymbolPatternType = 20,
38  BrushPatternType = 30
39  };
40 
52  Pattern();
53 
61  Pattern(const Pattern& patt_);
62 
71  static Pattern create();
72 
78  virtual ~Pattern();
79 
88  virtual Pattern& operator=(const Pattern& rhs_);
89 
100  virtual bool dispose();
101 
113  virtual AIPatternHandle aiPatternHandle() const;
114 
122  virtual bool isEmpty() const;
123 
131  virtual bool valid() const;
132 
144  virtual Type patternType() const;
145 
154  virtual bool operator==(const Pattern& rhs_) const;
155 
164  virtual bool operator!=(const Pattern& rhs_) const;
165 
173  virtual std::auto_ptr<Art> sourceArt() const;
174 
182  virtual void setSourceArt(const Art& art_);
183 
191  virtual std::string name() const;
192 
200  virtual void setName(const std::string& name_);
201 
209  virtual ArtboardRect bounds() const;
210 
218  virtual bool isBeingEdited() const;
219 
228  virtual bool setBeingEdited(const Art* const inst_ = NULL);
229 
230 
231  protected:
235  void* _data;
236 
242  void* _impl() const;
243 
244 
245  private:
246  friend plugin::Pattern* __accessImpl(const Pattern&);
247  friend Pattern __accessCtor(plugin::Pattern*&);
248 
254  Pattern(plugin::Pattern*&);
255  };
256 
257  typedef std::auto_ptr<Pattern> PatternAP;
258 
259  extern plugin::Pattern* __accessImpl(const Pattern&);
260  extern Pattern __accessCtor(plugin::Pattern*&);
261  }
262 }
263 
264 #endif
265 // __HDI_CORE_PATTERN__
Handles general art-related functionality.
Definition: hdicoreArt.h:47
virtual ~Pattern()
Pattern object destructor.
virtual bool setBeingEdited(const Art *const inst_=NULL)
Puts the document into pattern editing mode, with the target pattern being the one to edit...
virtual std::string name() const
Gets the name of the pattern.
virtual bool valid() const
Tests the validity of the target pattern by searching for it in the document.
virtual bool operator==(const Pattern &rhs_) const
Tests whether a given Pattern object is the same as another.
Pattern()
Constructs an empty Pattern object.
Handles general pattern-related functionality.
Definition: hdicorePattern.h:27
Describes a rectangular area on the Illustrator artboard.
Definition: hdicoreArtboardRect.h:25
virtual Type patternType() const
Gets the type of pattern the target object is representing.
virtual void setName(const std::string &name_)
Sets the name of the pattern.
virtual bool isEmpty() const
Gets whether the target Pattern object is empty (constructed with the default ctor) ...
Header file for geometric rectangle manipulation on the Illustrator artboard.
virtual ArtboardRect bounds() const
Gets the bounds rect for the target pattern.
virtual void setSourceArt(const Art &art_)
Sets the Art object that defines the source art for the pattern.
Header file for a wide variety of necessary typedefs, enums, and forwards declarations.
virtual bool isBeingEdited() const
Gets whether the target pattern is currently being edited in pattern editing mode.
virtual Pattern & operator=(const Pattern &rhs_)
Assigns one Pattern object to another.
Definition: hdicoreaiArray.h:12
virtual std::auto_ptr< Art > sourceArt() const
Gets the Art object that defines the source art for the pattern.
Type
Indicates the type of "pattern" an object is representing.
Definition: hdicorePattern.h:33
virtual bool operator!=(const Pattern &rhs_) const
Tests whether a given Pattern object is not the same as another.
void * _data
Private implementation data.
Definition: hdicorePattern.h:235
virtual AIPatternHandle aiPatternHandle() const
Gets the pattern handle around which the target object is wrapped.
void * _impl() const
Internal use only.
static Pattern create()
Creates a new Pattern object (and Illustrator pattern); set the source art for it with the setSourceA...
virtual bool dispose()
Removes the pattern from its document.