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

Handles general symbol-related functionality. More...

#include <hdicoreSymbol.h>

Inheritance diagram for hdi::core::Symbol:
Inheritance graph
[legend]
Collaboration diagram for hdi::core::Symbol:
Collaboration graph
[legend]

Public Member Functions

 Symbol ()
 Constructs an empty Symbol object.
 
 Symbol (const Symbol &sym_)
 Constructs a new Symbol object from an existing Symbol object (copy constructor)
 
virtual ~Symbol ()
 Symbol object destructor.
 
virtual Symboloperator= (const Symbol &rhs_)
 Assigns one Symbol object to another.
 
virtual bool dispose ()
 Removes the symbol from its document.
 
virtual bool valid () const
 Tests the validity of the target symbol by searching for it in the document.
 
virtual bool operator== (const Symbol &rhs_) const
 Tests whether a given Symbol object is the same as another.
 
virtual bool operator!= (const Symbol &rhs_) const
 Tests whether a given Symbol object is not the same as another.
 
virtual std::unique_ptr< ArtsourceArt () const
 Gets the Art object that defines the source art for the symbol.
 
virtual void setSourceArt (const Art &art_)
 Sets the Art object that defines the source art for the symbol.
 
virtual bool isBeingEdited () const
 Gets whether the target symbol is currently being edited in symbol editing mode.
 
virtual bool setBeingEdited (const Art *const inst_=NULL)
 Puts the document into symbol editing mode, with the target symbol being the one to edit.
 
virtual std::unique_ptr< ArtnewInstance (const ArtboardPoint &center_, const PaintOrder order_, const Art *const prep_=NULL) const
 Creates a new instance of the symbol in the current document.
 
- Public Member Functions inherited from hdi::core::Pattern
 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 Symbol create (const Art &src_)
 Creates a new Symbol object (and Illustrator symbol)
 
- Static Public Member Functions inherited from hdi::core::Pattern
static Pattern create ()
 Creates a new Pattern object (and Illustrator pattern); set the source art for it with the setSourceArt() method.
 

Friends

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

Additional Inherited Members

- Public Types inherited from hdi::core::Pattern
enum  Type { UnknownPatternType = 0 , NormalPatternType = 10 , SymbolPatternType = 20 , BrushPatternType = 30 }
 Indicates the type of "pattern" an object is representing.
 
- Protected Member Functions inherited from hdi::core::Pattern
void * _impl () const
 Internal use only.
 
- Protected Attributes inherited from hdi::core::Pattern
void * _data
 Private implementation data.
 

Detailed Description

Handles general symbol-related functionality.

Constructor & Destructor Documentation

◆ Symbol() [1/2]

hdi::core::Symbol::Symbol ( )

Constructs an empty Symbol object.

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

◆ Symbol() [2/2]

hdi::core::Symbol::Symbol ( const Symbol sym_)

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

Author
GW
Date
11/2013
Parameters
sym_Existing Symbol object

◆ ~Symbol()

virtual hdi::core::Symbol::~Symbol ( )
virtual

Symbol object destructor.

Author
GW
Date
11/2013

Member Function Documentation

◆ create()

static Symbol hdi::core::Symbol::create ( const Art src_)
static

Creates a new Symbol object (and Illustrator symbol)

Author
GW
Date
11/2013
Parameters
src_Source art for the symbol definition
Returns
A new Symbol object

◆ dispose()

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

Removes the symbol 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 symbol is gone, so obviously none of these methods will work after that.

Reimplemented from hdi::core::Pattern.

◆ isBeingEdited()

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

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

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

Reimplemented from hdi::core::Pattern.

◆ newInstance()

virtual std::unique_ptr< Art > hdi::core::Symbol::newInstance ( const ArtboardPoint center_,
const PaintOrder  order_,
const Art *const  prep_ = NULL 
) const
virtual

Creates a new instance of the symbol in the current document.

Author
GW
Date
11/2013
Parameters
center_Center point at which to place the instance
order_Order in which to create the art
prep_Prepositional piece of art to which order_ will apply
Returns
The newly created symbol art instance
Warning
This method does not assume responsibility of the memory for the prep_ argument.

◆ operator!=()

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

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

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

◆ operator=()

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

Assigns one Symbol object to another.

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

◆ operator==()

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

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

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

◆ setBeingEdited()

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

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

Author
GW
Date
11/2015
Parameters
inst_An optional instance of the pattern or symbol
Returns
true if symbol editing mode was entered successfully, false otherwise
Note
Illustrator will automatically create a prototype (i.e. temporary copy) of the symbol source art for in-place editing.
If inst_ is NULL, then editing will take place in the center of the artboard. Otherwise, editing will take place wherever the instance is located.

Reimplemented from hdi::core::Pattern.

◆ setSourceArt()

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

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

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

Reimplemented from hdi::core::Pattern.

◆ sourceArt()

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

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

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

Reimplemented from hdi::core::Pattern.

◆ valid()

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

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

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

Reimplemented from hdi::core::Pattern.