Hot Door CORE  0.7.0
Adobe® Illustrator® Plug-in Library
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. More...
 
 Symbol (const Symbol &sym_)
 Constructs a new Symbol object from an existing Symbol object (copy constructor) More...
 
virtual ~Symbol ()
 Symbol object destructor. More...
 
virtual Symboloperator= (const Symbol &rhs_)
 Assigns one Symbol object to another. More...
 
virtual bool dispose ()
 Removes the symbol from its document. More...
 
virtual bool valid () const
 Tests the validity of the target symbol by searching for it in the document. More...
 
virtual bool operator== (const Symbol &rhs_) const
 Tests whether a given Symbol object is the same as another. More...
 
virtual bool operator!= (const Symbol &rhs_) const
 Tests whether a given Symbol object is not the same as another. More...
 
virtual std::auto_ptr< ArtsourceArt () const
 Gets the Art object that defines the source art for the symbol. More...
 
virtual void setSourceArt (const Art &art_)
 Sets the Art object that defines the source art for the symbol. More...
 
virtual bool isBeingEdited () const
 Gets whether the target symbol is currently being edited in symbol editing mode. More...
 
virtual bool setBeingEdited (const Art *const inst_=NULL)
 Puts the document into symbol editing mode, with the target symbol being the one to edit. More...
 
virtual std::auto_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. More...
 
- Public Member Functions inherited from hdi::core::Pattern
 Pattern ()
 Constructs an empty Pattern object. More...
 
 Pattern (const Pattern &patt_)
 Constructs a new Pattern object from an existing Pattern object (copy constructor) More...
 
virtual ~Pattern ()
 Pattern object destructor. More...
 
virtual Patternoperator= (const Pattern &rhs_)
 Assigns one Pattern object to another. More...
 
virtual AIPatternHandle aiPatternHandle () const
 Gets the pattern handle around which the target object is wrapped. More...
 
virtual bool isEmpty () const
 Gets whether the target Pattern object is empty (constructed with the default ctor) More...
 
virtual Type patternType () const
 Gets the type of pattern the target object is representing. More...
 
virtual bool operator== (const Pattern &rhs_) const
 Tests whether a given Pattern object is the same as another. More...
 
virtual bool operator!= (const Pattern &rhs_) const
 Tests whether a given Pattern object is not the same as another. More...
 
virtual std::string name () const
 Gets the name of the pattern. More...
 
virtual void setName (const std::string &name_)
 Sets the name of the pattern. More...
 
virtual ArtboardRect bounds () const
 Gets the bounds rect for the target pattern. More...
 

Static Public Member Functions

static Symbol create (const Art &src_)
 Creates a new Symbol object (and Illustrator symbol) More...
 
- 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. More...
 

Friends

plugin::Symbol * __accessImpl (const Symbol &)
 
Symbol __accessCtor (plugin::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. More...
 
- Protected Attributes inherited from hdi::core::Pattern
void * _data
 Private implementation data.
 

Detailed Description

Handles general symbol-related functionality.

Constructor & Destructor Documentation

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).
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
virtual hdi::core::Symbol::~Symbol ( )
virtual

Symbol object destructor.

Author
GW
Date
11/2013

Member Function Documentation

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
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.

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.

virtual std::auto_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.
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
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
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
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.

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.

virtual std::auto_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.

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.