Hot Door CORE 0.8.2
Adobe® Illustrator® Plug-in Library
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
hdi::core::Pattern Class Reference

Handles general pattern-related functionality. More...

#include <hdicorePattern.h>

Inheritance diagram for hdi::core::Pattern:
Inheritance graph
[legend]

Public Types

enum  Type { UnknownPatternType = 0 , NormalPatternType = 10 , SymbolPatternType = 20 , BrushPatternType = 30 }
 Indicates the type of "pattern" an object is representing.
 

Public Member Functions

 Pattern ()
 Constructs an empty Pattern object.
 
 Pattern (const Pattern &patt_)
 Constructs a new Pattern object from an existing Pattern object (copy constructor)
 
virtual ~Pattern ()
 Pattern object destructor.
 
virtual Patternoperator= (const Pattern &rhs_)
 Assigns one Pattern object to another.
 
virtual bool dispose ()
 Removes the pattern from its document.
 
virtual AIPatternHandle aiPatternHandle () const
 Gets the pattern handle around which the target object is wrapped.
 
virtual bool isEmpty () const
 Gets whether the target Pattern object is empty (constructed with the default ctor)
 
virtual bool valid () const
 Tests the validity of the target pattern by searching for it in the document.
 
virtual Type patternType () const
 Gets the type of pattern the target object is representing.
 
virtual bool operator== (const Pattern &rhs_) const
 Tests whether a given Pattern object is the same as another.
 
virtual bool operator!= (const Pattern &rhs_) const
 Tests whether a given Pattern object is not the same as another.
 
virtual std::unique_ptr< ArtsourceArt () const
 Gets the Art object that defines the source art for the pattern.
 
virtual void setSourceArt (const Art &art_)
 Sets the Art object that defines the source art for the pattern.
 
virtual std::string name () const
 Gets the name of the pattern.
 
virtual void setName (const std::string &name_)
 Sets the name of the pattern.
 
virtual ArtboardRect bounds () const
 Gets the bounds rect for the target pattern.
 
virtual bool isBeingEdited () const
 Gets whether the target pattern is currently being edited in pattern editing mode.
 
virtual bool setBeingEdited (const Art *const inst_=NULL)
 Puts the document into pattern editing mode, with the target pattern being the one to edit.
 

Static Public Member Functions

static Pattern create ()
 Creates a new Pattern object (and Illustrator pattern); set the source art for it with the setSourceArt() method.
 

Protected Member Functions

void * _impl () const
 Internal use only.
 

Protected Attributes

void * _data
 Private implementation data.
 

Friends

aip::Pattern * __accessImpl (const Pattern &)
 
Pattern __accessCtor (aip::Pattern *&)
 

Detailed Description

Handles general pattern-related functionality.

Constructor & Destructor Documentation

◆ Pattern() [1/2]

hdi::core::Pattern::Pattern ( )

Constructs an empty Pattern object.

Author
GW
Date
11/2013
Note
To test if a Pattern object is empty, call isEmpty() on it
Empty Pattern objects do not relate to any pattern in a Illustrator document; they are designed to be "receivers" of some other Pattern object via the overloaded assignment operator. Empty Pattern objects are useless until such time (though it is safe to call any of their methods).

◆ Pattern() [2/2]

hdi::core::Pattern::Pattern ( const Pattern patt_)

Constructs a new Pattern object from an existing Pattern object (copy constructor)

Author
GW
Date
11/2013
Parameters
patt_Existing Pattern object

◆ ~Pattern()

virtual hdi::core::Pattern::~Pattern ( )
virtual

Pattern object destructor.

Author
GW
Date
11/2013

Member Function Documentation

◆ _impl()

void * hdi::core::Pattern::_impl ( ) const
protected

Internal use only.

Author
GW
Date
11/2013

◆ aiPatternHandle()

virtual AIPatternHandle hdi::core::Pattern::aiPatternHandle ( ) const
virtual

Gets the pattern handle around which the target object is wrapped.

Author
GW
Date
11/2013
Returns
AIPatternHandle for this object
Note
Generally, you shouldn't need to call this method. Only use it if you know what you're doing. If a specific piece of functionality provided by Illustrator is not handled by this class (or related classes), then it should probably be added to the hdi_core library.

◆ bounds()

virtual ArtboardRect hdi::core::Pattern::bounds ( ) const
virtual

Gets the bounds rect for the target pattern.

Author
GW
Date
11/2013
Returns
A rect object describing the pattern's bounds

◆ create()

static Pattern hdi::core::Pattern::create ( )
static

Creates a new Pattern object (and Illustrator pattern); set the source art for it with the setSourceArt() method.

Author
GW
Date
11/2013
Returns
A new Pattern object

◆ dispose()

virtual bool hdi::core::Pattern::dispose ( )
virtual

Removes the pattern from its document.

Author
GW
Date
11/2013
Returns
true for successful disposal, false otherwise
Note
After calling dispose(), this object is basically useless! The actual pattern is gone, so obviously none of these methods will work after that.

Reimplemented in hdi::core::Symbol.

◆ isBeingEdited()

virtual bool hdi::core::Pattern::isBeingEdited ( ) const
virtual

Gets whether the target pattern is currently being edited in pattern editing mode.

Author
GW
Date
11/2015
Returns
true if currently being edited, false otherwise

Reimplemented in hdi::core::Symbol.

◆ isEmpty()

virtual bool hdi::core::Pattern::isEmpty ( ) const
virtual

Gets whether the target Pattern object is empty (constructed with the default ctor)

Author
GW
Date
11/2013
Returns
true if the target Pattern object is empty, false otherwise

◆ name()

virtual std::string hdi::core::Pattern::name ( ) const
virtual

Gets the name of the pattern.

Author
GW
Date
11/2013
Returns
The pattern's name, as UTF-8

◆ operator!=()

virtual bool hdi::core::Pattern::operator!= ( const Pattern rhs_) const
virtual

Tests whether a given Pattern object is not the same as another.

Author
GW
Date
11/2013
Parameters
rhs_Pattern to compare against (righthand side of inequality operator)
Returns
true for the target and rhs_ being different patterns, false otherwise

◆ operator=()

virtual Pattern & hdi::core::Pattern::operator= ( const Pattern rhs_)
virtual

Assigns one Pattern object to another.

Author
GW
Date
11/2013
Parameters
rhs_Existing Pattern object to copy values from
Returns
The target Pattern object, but with its values updated to match that of the rhs_ argument

◆ operator==()

virtual bool hdi::core::Pattern::operator== ( const Pattern rhs_) const
virtual

Tests whether a given Pattern object is the same as another.

Author
GW
Date
11/2013
Parameters
rhs_Pattern to compare against (righthand side of equality operator)
Returns
true for the target and rhs_ being the same pattern, false otherwise

◆ patternType()

virtual Type hdi::core::Pattern::patternType ( ) const
virtual

Gets the type of pattern the target object is representing.

Author
GW
Date
12/2013
Returns
A Type enum value indicating the type of the underlying pattern
Note
Typically, when SymbolPatternType is returned, you can cast the target to a Symbol object for more refined manipulation. However, it is recommended that you still use dynamic_cast() to be certain the cast is warranted.

◆ setBeingEdited()

virtual bool hdi::core::Pattern::setBeingEdited ( const Art *const  inst_ = NULL)
virtual

Puts the document into pattern editing mode, with the target pattern being the one to edit.

Author
GW
Date
11/2015
Parameters
inst_Ignored
Returns
true if pattern editing mode was entered successfully, false otherwise

Reimplemented in hdi::core::Symbol.

◆ setName()

virtual void hdi::core::Pattern::setName ( const std::string &  name_)
virtual

Sets the name of the pattern.

Author
GW
Date
11/2013
Parameters
name_New name for the pattern, as UTF-8

◆ setSourceArt()

virtual void hdi::core::Pattern::setSourceArt ( const Art art_)
virtual

Sets the Art object that defines the source art for the pattern.

Author
GW
Date
11/2013
Parameters
art_New source art for the target Pattern object

Reimplemented in hdi::core::Symbol.

◆ sourceArt()

virtual std::unique_ptr< Art > hdi::core::Pattern::sourceArt ( ) const
virtual

Gets the Art object that defines the source art for the pattern.

Author
GW
Date
11/2013
Returns
An Art object for the source definition of the pattern

Reimplemented in hdi::core::Symbol.

◆ valid()

virtual bool hdi::core::Pattern::valid ( ) const
virtual

Tests the validity of the target pattern by searching for it in the document.

Author
GW
Date
11/2013
Returns
true for a valid pattern, false otherwise

Reimplemented in hdi::core::Symbol.