Hot Door CORE 0.8.2
Adobe® Illustrator® Plug-in Library
Loading...
Searching...
No Matches
hdicorePattern.h
Go to the documentation of this file.
1
7#ifndef __HDI_CORE_PATTERN__
8#define __HDI_CORE_PATTERN__
9
10#if defined(HDI_CORE_AIP_MODE)
11
12#include "hdicoreArtboardRect.h"
13#include "hdicoreTypes.h"
14
15namespace hdi
16{
17 namespace aip
18 {
19 class Pattern;
20 }
21
22 namespace core
23 {
24 class Art;
25
29 class Pattern
30 {
31 public:
35 enum Type
36 {
37 UnknownPatternType = 0,
38 NormalPatternType = 10,
39 SymbolPatternType = 20,
40 BrushPatternType = 30
41 };
42
55
63 Pattern(const Pattern& patt_);
64
73 static Pattern create();
74
80 virtual ~Pattern();
81
90 virtual Pattern& operator=(const Pattern& rhs_);
91
102 virtual bool dispose();
103
115 virtual AIPatternHandle aiPatternHandle() const;
116
124 virtual bool isEmpty() const;
125
133 virtual bool valid() const;
134
146 virtual Type patternType() const;
147
156 virtual bool operator==(const Pattern& rhs_) const;
157
166 virtual bool operator!=(const Pattern& rhs_) const;
167
175 virtual std::unique_ptr<Art> sourceArt() const;
176
184 virtual void setSourceArt(const Art& art_);
185
193 virtual std::string name() const;
194
202 virtual void setName(const std::string& name_);
203
211 virtual ArtboardRect bounds() const;
212
220 virtual bool isBeingEdited() const;
221
230 virtual bool setBeingEdited(const Art* const inst_ = NULL);
231
232
233 protected:
237 void* _data;
238
244 void* _impl() const;
245
246
247 private:
248 friend aip::Pattern* __accessImpl(const Pattern&);
249 friend Pattern __accessCtor(aip::Pattern*&);
250
256 Pattern(aip::Pattern*&);
257 };
258
259 typedef std::unique_ptr<Pattern> PatternUP;
260 typedef std::shared_ptr<Pattern> PatternSP;
261 typedef std::weak_ptr<Pattern> PatternWP;
262
263 extern aip::Pattern* __accessImpl(const Pattern&);
264 extern Pattern __accessCtor(aip::Pattern*&);
265 }
266}
267
268#endif
269// HDI_CORE_AIP_MODE
270
271#endif
272// __HDI_CORE_PATTERN__
Handles general art-related functionality.
Definition: hdicoreArt.h:51
Describes a rectangular area on the Illustrator artboard.
Definition: hdicoreArtboardRect.h:28
Handles general pattern-related functionality.
Definition: hdicorePattern.h:30
virtual void setSourceArt(const Art &art_)
Sets the Art object that defines the source art for the pattern.
static Pattern create()
Creates a new Pattern object (and Illustrator pattern); set the source art for it with the setSourceA...
void * _impl() const
Internal use only.
virtual bool valid() const
Tests the validity of the target pattern by searching for it in the document.
Type
Indicates the type of "pattern" an object is representing.
Definition: hdicorePattern.h:36
virtual void setName(const std::string &name_)
Sets the name of the pattern.
virtual bool operator==(const Pattern &rhs_) const
Tests whether a given Pattern object is the same as another.
virtual Pattern & operator=(const Pattern &rhs_)
Assigns one Pattern object to another.
void * _data
Private implementation data.
Definition: hdicorePattern.h:237
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 Type patternType() const
Gets the type of pattern the target object is representing.
virtual bool isEmpty() const
Gets whether the target Pattern object is empty (constructed with the default ctor)
virtual bool dispose()
Removes the pattern from its document.
virtual std::string name() const
Gets the name of the pattern.
virtual ArtboardRect bounds() const
Gets the bounds rect for the target pattern.
virtual AIPatternHandle aiPatternHandle() const
Gets the pattern handle around which the target object is wrapped.
virtual ~Pattern()
Pattern object destructor.
virtual bool isBeingEdited() const
Gets whether the target pattern is currently being edited in pattern editing mode.
Pattern(const Pattern &patt_)
Constructs a new Pattern object from an existing Pattern object (copy constructor)
Pattern()
Constructs an empty Pattern object.
virtual std::unique_ptr< Art > sourceArt() const
Gets the Art object that defines the source art for the pattern.
virtual bool operator!=(const Pattern &rhs_) const
Tests whether a given Pattern object is not the same as another.
Header file for geometric rectangle manipulation on the Illustrator artboard.
Header file for a wide variety of necessary typedefs, enums, and forwards declarations.