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

Classes

class  Parameters
 Describes the parameters of an Illustrator live effect. More...
 

Public Types

enum  PreferredInputArtType {
  InputArtTypeDynamic = 0, InputArtTypeGroup = 1 << 0, InputArtTypePath = 1 << 1, InputArtTypeCompoundPath = 1 << 2,
  InputArtTypePlaced = 1 << 3, InputArtTypeRaster = 1 << 4, InputArtTypeCustomPlugin = 1 << 5, InputArtTypeMesh = 1 << 6,
  InputArtTypeText = 1 << 7, InputArtTypeSymbol = 1 << 8, InputArtTypeForeign = 1 << 9, InputArtTypeTextLegacy = 1 << 10,
  InputArtTypeAll = ~0L
}
 
enum  StyleFlags {
  NoStyleFlags = 0, PreEffectFilter = 1, PostEffectFilter = 2, StrokeFilter = 3,
  FillFilter = 4, FilterTypeMask = 0xFFFF, HasScalableParams = 1 << 17, UsesAutoRasterize = 1 << 18,
  CanGenerateSVGFilter = 1 << 19, HandlesAdjustColorMsg = 1 << 20, HandlesIsCompatibleMsg = 1 << 21
}
 Describes the style of a live effect.
 
enum  MergeAction { UnknownMergeAction = 0, AppendMergeAction = 10, ReplaceFillMergeAction = 20, ReplaceStrokeMergeAction = 30 }
 Describes the merge action of a live effect.
 
typedef std::auto_ptr< ParametersParametersAP
 

Public Member Functions

 LiveEffect ()
 Constructs an empty LiveEffect object. More...
 
 LiveEffect (const LiveEffect &le_)
 Constructs a new LiveEffect object from an existing LiveEffect object (copy constructor) More...
 
 LiveEffect (const AILiveEffectHandle aiLiveEff_)
 Constructs a new LiveEffect object from an AILiveEffectHandle. More...
 
virtual ~LiveEffect ()
 LiveEffect object destructor. More...
 
virtual LiveEffectoperator= (const LiveEffect &rhs_)
 Assigns one LiveEffect object to another. More...
 
virtual bool isEmpty () const
 Gets whether the target LiveEffect object is empty (constructed with the default ctor) More...
 
virtual AILiveEffectHandle aiLiveEffectHandle () const
 Gets the live effect handle around which the target object is wrapped. More...
 
virtual bool operator== (const LiveEffect &rhs_) const
 Tests whether a given LiveEffect object is the same as another. More...
 
virtual bool operator!= (const LiveEffect &rhs_) const
 Tests whether a given LiveEffect object is not the same as another. More...
 
virtual std::string name () const
 Gets the unique name of the target effect. More...
 
virtual std::string title () const
 Gets the UI-visible title of the effect. More...
 
virtual bool version (int32_t &major__, int32_t &minor__) const
 Gets the version info for the target live effect. More...
 
virtual PreferredInputArtType inputArtPreference () const
 Gets the preferred input art types of the target effect. More...
 
virtual StyleFlags styleFlags () const
 Gets the style flags of the target effect. More...
 
virtual bool mergeIntoSelection (const MergeAction act_)
 Merges the target effect into the existing style of all selected objects. More...
 
virtual bool getEarliestAppVersion (int16_t &rgbVers__, int16_t &cmykVers__) const
 Gets the earliest Illustrator version that an effect supports. More...
 
virtual void setEarliestAppVersion (const int16_t rgbVers_, const int16_t cmykVers_)
 Sets the earliest Illustrator version that an effect supports. More...
 

Friends

void * __accessImpl (const LiveEffect &)
 

Constructor & Destructor Documentation

hdi::core::LiveEffect::LiveEffect ( )

Constructs an empty LiveEffect object.

Author
GW
Date
08/2014
Note
To test if a LiveEffect object is empty, call isEmpty() on it
Empty LiveEffect objects do not relate to any actual Illustrator live effects; they are designed to be "receivers" of some other LiveEffect object via the overloaded assignment operator. Empty LiveEffect objects are useless until such time (though it is safe to call any of their methods)
hdi::core::LiveEffect::LiveEffect ( const LiveEffect le_)

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

Author
GW
Date
08/2014
Parameters
le_Existing LiveEffect object
hdi::core::LiveEffect::LiveEffect ( const AILiveEffectHandle  aiLiveEff_)

Constructs a new LiveEffect object from an AILiveEffectHandle.

Author
GW
Date
12/2014
Parameters
aiLiveEff_Raw Illustrator AILiveEffectHandle
virtual hdi::core::LiveEffect::~LiveEffect ( )
virtual

LiveEffect object destructor.

Author
GW
Date
08/2014

Member Function Documentation

virtual AILiveEffectHandle hdi::core::LiveEffect::aiLiveEffectHandle ( ) const
virtual

Gets the live effect handle around which the target object is wrapped.

Author
GW
Date
08/2014
Returns
AILiveEffectHandle 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.
virtual bool hdi::core::LiveEffect::getEarliestAppVersion ( int16_t &  rgbVers__,
int16_t &  cmykVers__ 
) const
virtual

Gets the earliest Illustrator version that an effect supports.

Author
GW
Date
08/2014
Parameters
rgbVers__Return-by-reference for the earliest version number that the effect supports for RGB documents
cmykVers__Return-by-reference for the earliest version number that the effect supports for CMYK documents
Returns
true if the version numbers could be acquired, false otherwise
Note
The version number directly corresponds to the major version of Illustrator.
virtual PreferredInputArtType hdi::core::LiveEffect::inputArtPreference ( ) const
virtual

Gets the preferred input art types of the target effect.

Author
GW
Date
08/2014
Returns
The input art preferences, a bitwise OR of PreferredInputArtType values
virtual bool hdi::core::LiveEffect::isEmpty ( ) const
virtual

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

Author
GW
Date
08/2014
Returns
true if the target LiveEffect object is empty, false otherwise
virtual bool hdi::core::LiveEffect::mergeIntoSelection ( const MergeAction  act_)
virtual

Merges the target effect into the existing style of all selected objects.

Author
GW
Date
08/2014
Parameters
act_The merge method (append, or replace fill and/or stroke)
Returns
true if the merge could take place, false otherwise
virtual std::string hdi::core::LiveEffect::name ( ) const
virtual

Gets the unique name of the target effect.

Author
GW
Date
08/2014
Returns
Unique name given to the effect when it was created, as UTF-8
virtual bool hdi::core::LiveEffect::operator!= ( const LiveEffect rhs_) const
virtual

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

Author
GW
Date
08/2014
Parameters
rhs_LiveEffect to compare against (righthand side of inequality operator)
Returns
true for the target and rhs_ being different live effects, false otherwise
virtual LiveEffect& hdi::core::LiveEffect::operator= ( const LiveEffect rhs_)
virtual

Assigns one LiveEffect object to another.

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

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

Author
GW
Date
08/2014
Parameters
rhs_LiveEffect to compare against (righthand side of equality operator)
Returns
true for the target and rhs_ being the same live effect, false otherwise
virtual void hdi::core::LiveEffect::setEarliestAppVersion ( const int16_t  rgbVers_,
const int16_t  cmykVers_ 
)
virtual

Sets the earliest Illustrator version that an effect supports.

Author
GW
Date
08/2014
Parameters
rgbVers_The earliest version number that the effect supports for RGB documents
cmykVers_The earliest version number that the effect supports for CMYK documents
Note
The version number directly corresponds to the major version of Illustrator, and must be at least 9.
virtual StyleFlags hdi::core::LiveEffect::styleFlags ( ) const
virtual

Gets the style flags of the target effect.

Author
GW
Date
08/2014
Returns
The style flags, a bitwise OR of StyleFlags values
virtual std::string hdi::core::LiveEffect::title ( ) const
virtual

Gets the UI-visible title of the effect.

Author
GW
Date
08/2014
Returns
The effect title, as UTF-8
virtual bool hdi::core::LiveEffect::version ( int32_t &  major__,
int32_t &  minor__ 
) const
virtual

Gets the version info for the target live effect.

Author
GW
Date
08/2014
Parameters
major__Return-by-reference for the major version
minor__Return-by-reference for the minor version
Returns
true if the version info could be acquired