Hot Door CORE  0.7.0
Adobe® Illustrator® Plug-in Library
Public Types | Public Member Functions | Friends | List of all members
hdi::core::Artboard Class Reference

Represents an individual artboard in the current document. More...

#include <hdicoreArtboard.h>

Public Types

typedef std::vector< Art * > ArtVector
 

Public Member Functions

 Artboard ()
 Constructs an empty Artboard object. More...
 
 Artboard (const Artboard &a_)
 Constructs a new Artboard object from an existing Artboard object (copy constructor) More...
 
virtual ~Artboard ()
 Destructs an Artboard object. More...
 
virtual Artboardoperator= (const Artboard &rhs_)
 Assigns one Artboard object to another. More...
 
virtual bool isEmpty () const
 Gets whether the target Artboard object is empty (constructed with the default ctor) More...
 
virtual bool valid () const
 Tests the validity of the target artboard. More...
 
virtual bool dispose ()
 Removes the artboard from the document. More...
 
virtual bool operator== (const Artboard &rhs_) const
 Tests whether a given Artboard object is the same as another. More...
 
virtual bool operator!= (const Artboard &rhs_) const
 Tests whether a given Artboard object is not the same as another. More...
 
virtual ArtboardRect bounds () const
 Gets the position (bounds) of the artboard. More...
 
virtual void setBounds (const ArtboardRect &bounds_)
 Sets the position (bounds) of the artboard. More...
 
virtual ArtboardPoint rulerOrigin () const
 Gets the ruler origin point of the artboard, relative to the artboard itself. More...
 
virtual void setRulerOrigin (const ArtboardPoint &origin_)
 Sets the ruler origin point of the artboard, relative to the artboard itself. More...
 
virtual std::string name () const
 Gets the artboard's name. More...
 
virtual void setName (const std::string &name_)
 Sets the artboard's name. More...
 
virtual bool active () const
 Gets whether the target artboard is the current one in the current document. More...
 
virtual ArtVector allArtObjects () const
 Gets all the art objects that "touch" the target artboard. More...
 

Friends

plugin::Artboard * __accessImpl (const Artboard &)
 
Artboard __accessCtor (plugin::Artboard *&)
 

Detailed Description

Represents an individual artboard in the current document.

Constructor & Destructor Documentation

hdi::core::Artboard::Artboard ( )

Constructs an empty Artboard object.

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

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

Author
GW
Date
08/2013
Parameters
art_Existing Artboard object
virtual hdi::core::Artboard::~Artboard ( )
virtual

Destructs an Artboard object.

Author
GW
Date
08/2013

Member Function Documentation

virtual bool hdi::core::Artboard::active ( ) const
virtual

Gets whether the target artboard is the current one in the current document.

Author
GW
Date
08/2013
Returns
true if the target artboard is currently selected
virtual ArtVector hdi::core::Artboard::allArtObjects ( ) const
virtual

Gets all the art objects that "touch" the target artboard.

Author
GW
Date
01/2015
Returns
A vector of art objects whose bounds intersect the bounds of the target artboard in any way
Warning
The caller assumes responsibility for the memory of the contained Art objects.
virtual ArtboardRect hdi::core::Artboard::bounds ( ) const
virtual

Gets the position (bounds) of the artboard.

Author
GW
Date
08/2013
Returns
Bounds rect of the target artboard, relative to the document's absolute (0,0) coordinate
virtual bool hdi::core::Artboard::dispose ( )
virtual

Removes the artboard from the document.

Author
GW
Date
08/2013
Returns
true for successful disposal, false otherwise
Note
After calling dispose(), the target object is useless! The actual artboard is gone, so obviously none of these methods will work after that.
virtual bool hdi::core::Artboard::isEmpty ( ) const
virtual

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

Author
GW
Date
08/2013
Returns
true if the target Artboard object is empty, false otherwise
virtual std::string hdi::core::Artboard::name ( ) const
virtual

Gets the artboard's name.

Author
GW
Date
08/2013
Returns
Name of the target artboard, as UTF-8
virtual bool hdi::core::Artboard::operator!= ( const Artboard rhs_) const
virtual

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

Author
GW
Date
08/2013
Parameters
rhs_Artboard to compare against
Returns
true for the target and rhs_ being different artboards, false otherwise
virtual Artboard& hdi::core::Artboard::operator= ( const Artboard rhs_)
virtual

Assigns one Artboard object to another.

Author
GW
Date
08/2013
Parameters
rhs_Existing Artboard object to copy values from
Returns
The target Artboard object, but with its values updated to match that of the rhs_ argument
virtual bool hdi::core::Artboard::operator== ( const Artboard rhs_) const
virtual

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

Author
GW
Date
08/2013
Parameters
rhs_Artboard to compare against
Returns
true for the target and rhs_ being the same artboard, false otherwise
virtual ArtboardPoint hdi::core::Artboard::rulerOrigin ( ) const
virtual

Gets the ruler origin point of the artboard, relative to the artboard itself.

Author
GW
Date
08/2013
Returns
Origin point of the artboard, typically the top-left
Note
Artboard ruler origins have been known to be the cause of some confusion. This method gives the ruler origin relative to the artboard's position in the document and NOT relative to the document's absolute (0,0) coordinate. If you had an artboard located at (200,100) relative to the document (0,0) and the artboard had its individual ruler origin set to (20,10) relative to the artboard, then the ruler origin relative to the document's absolute (0,0) coordinate is (220,110). Got it?
virtual void hdi::core::Artboard::setBounds ( const ArtboardRect bounds_)
virtual

Sets the position (bounds) of the artboard.

Author
GW
Date
08/2013
Parameters
bounds_New artboard bounds, relative to the document's absolute (0,0) coordinate
virtual void hdi::core::Artboard::setName ( const std::string &  name_)
virtual

Sets the artboard's name.

Author
GW
Date
08/2013
Parameters
name_New name for the artboard, as UTF-8
virtual void hdi::core::Artboard::setRulerOrigin ( const ArtboardPoint origin_)
virtual

Sets the ruler origin point of the artboard, relative to the artboard itself.

Author
GW
Date
08/2013
Parameters
origin_New artboard origin
virtual bool hdi::core::Artboard::valid ( ) const
virtual

Tests the validity of the target artboard.

Author
GW
Date
08/2013
Returns
true for a valid artboard, false otherwise