Hot Door CORE  0.7.0
Adobe® Illustrator® Plug-in Library
hdicoreLiveEffect.h
Go to the documentation of this file.
1 
7 #ifndef __HDI_CORE_LIVE_EFFECT__
8 #define __HDI_CORE_LIVE_EFFECT__
9 
10 #include "hdicorePathStyle.h"
11 #include "hdicoreTransformMatrix.h"
12 #include "hdicoreTypes.h"
13 
14 namespace hdi
15 {
16  namespace core
17  {
18  class LiveEffect
19  {
20  public:
24  class Parameters
25  {
26  public:
38  Parameters();
39 
47  Parameters(const Parameters& p_);
48 
54  virtual ~Parameters();
55 
65  virtual Parameters& operator=(const Parameters& rhs_);
66 
75  virtual bool isEmpty() const;
76 
89  virtual AILiveEffectParameters aiLiveEffectParams() const;
90 
100  virtual bool operator==(const Parameters& rhs_) const;
101 
111  virtual bool operator!=(const Parameters& rhs_) const;
112 
121  virtual std::string displayString() const;
122 
131  virtual std::string extraString() const;
132 
141  virtual bool fillStyle(FillStyle& fs__) const;
142 
156  virtual bool fillStyleMatrix(TransformMatrix& m__) const;
157 
167  virtual bool xformedFillStyle(FillStyle& fs__) const;
168 
177  virtual bool strokeStyle(StrokeStyle& ss__) const;
178 
192  virtual bool strokeStyleMatrix(TransformMatrix& m__) const;
193 
203  virtual bool xformedStrokeStyle(StrokeStyle& ss__) const;
204 
212  virtual bool evenOdd() const;
213 
221  virtual double scaleFactor() const;
222 
223 
224  private:
225  friend void* __accessImpl(const Parameters&);
226  friend Parameters __accessCtor(AILiveEffectParameters);
227 
231  void* __data;
232 
238  void* __impl() const;
239 
245  Parameters(AILiveEffectParameters);
246  };
247 
248  typedef std::auto_ptr<Parameters> ParametersAP;
249 
250  enum PreferredInputArtType
251  {
252  InputArtTypeDynamic = 0,
253  InputArtTypeGroup = 1 << 0,
254  InputArtTypePath = 1 << 1,
255  InputArtTypeCompoundPath = 1 << 2,
256  InputArtTypePlaced = 1 << 3,
257  InputArtTypeRaster = 1 << 4,
258  InputArtTypeCustomPlugin = 1 << 5,
259  InputArtTypeMesh = 1 << 6,
260  InputArtTypeText = 1 << 7,
261  InputArtTypeSymbol = 1 << 8,
262  InputArtTypeForeign = 1 << 9,
263  InputArtTypeTextLegacy = 1 << 10,
264  InputArtTypeAll = ~0L
265  };
266 
271  {
272  NoStyleFlags = 0,
273 
274  // Applied by default before the object is painted with fill or stroke
275  PreEffectFilter = 1,
276 
277  // Applied by default after the object is painted with fill or stroke
278  PostEffectFilter = 2,
279 
280  // Replaces the default stroke behavior. Brushes are an example of an effect of this type.
281  StrokeFilter = 3,
282 
283  // Replaces the default fill behavior
284  FillFilter = 4,
285 
286  // A mask to OR with the filter-style value to retrieve specific bit flags. Don't use when
287  // registering a live effect.
288  FilterTypeMask = 0xFFFF,
289 
290  // Parameters can be scaled
291  HasScalableParams = 1 << 17,
292 
293  // Supports automatic rasterization
294  UsesAutoRasterize = 1 << 18,
295 
296  // Supports the generation of an SVG filter
297  CanGenerateSVGFilter = 1 << 19,
298 
299  // Has parameters that can be modified by a LiveEffectAdjustColorsMessageType message
300  HandlesAdjustColorMsg = 1 << 20,
301 
302  // Handles LiveEffectIsCompatibleMessageType messages. If this flag is not set the message will not
303  // be sent.
304  HandlesIsCompatibleMsg = 1 << 21
305  };
306 
311  {
312  UnknownMergeAction = 0,
313  AppendMergeAction = 10,
314  ReplaceFillMergeAction = 20,
315  ReplaceStrokeMergeAction = 30
316  };
317 
329  LiveEffect();
330 
338  LiveEffect(const LiveEffect& le_);
339 
347  LiveEffect(const AILiveEffectHandle aiLiveEff_);
348 
354  virtual ~LiveEffect();
355 
365  virtual LiveEffect& operator=(const LiveEffect& rhs_);
366 
374  virtual bool isEmpty() const;
375 
387  virtual AILiveEffectHandle aiLiveEffectHandle() const;
388 
397  virtual bool operator==(const LiveEffect& rhs_) const;
398 
407  virtual bool operator!=(const LiveEffect& rhs_) const;
408 
416  virtual std::string name() const;
417 
425  virtual std::string title() const;
426 
436  virtual bool version(int32_t& major__, int32_t& minor__) const;
437 
445  virtual PreferredInputArtType inputArtPreference() const;
446 
454  virtual StyleFlags styleFlags() const;
455 
464  virtual bool mergeIntoSelection(const MergeAction act_);
465 
479  virtual bool getEarliestAppVersion(int16_t& rgbVers__, int16_t& cmykVers__) const;
480 
492  virtual void setEarliestAppVersion(const int16_t rgbVers_, const int16_t cmykVers_);
493 
494 
495  private:
496  friend void* __accessImpl(const LiveEffect&);
497 
501  void* __data;
502 
508  void* __impl() const;
509  };
510 
511  typedef std::auto_ptr<LiveEffect> LiveEffectAP;
512 
513  extern void* __accessImpl(const LiveEffect::Parameters&);
514  extern LiveEffect::Parameters __accessCtor(AILiveEffectParameters);
515  extern void* __accessImpl(const LiveEffect&);
516  }
517 }
518 
519 hdi::core::LiveEffect::PreferredInputArtType operator|(
520  const hdi::core::LiveEffect::PreferredInputArtType lhs_,
521  const hdi::core::LiveEffect::PreferredInputArtType rhs_
522 );
523 
524 hdi::core::LiveEffect::PreferredInputArtType& operator|=(
525  hdi::core::LiveEffect::PreferredInputArtType& lhs__,
526  const hdi::core::LiveEffect::PreferredInputArtType rhs_
527 );
528 
529 #endif
530 // __HDI_CORE_LIVE_EFFECT__
virtual std::string displayString() const
Gets the string that is displayed by the panel in reference to the filter name, if it is set...
virtual bool operator!=(const LiveEffect &rhs_) const
Tests whether a given LiveEffect object is not the same as another.
Describes the parameters of an Illustrator live effect.
Definition: hdicoreLiveEffect.h:24
Parameters()
Constructs an empty Parameters object.
virtual bool operator==(const LiveEffect &rhs_) const
Tests whether a given LiveEffect object is the same as another.
virtual bool isEmpty() const
Gets whether the target LiveEffect object is empty (constructed with the default ctor) ...
virtual bool operator==(const Parameters &rhs_) const
Tests whether a given Parameters object is the same as another.
MergeAction
Describes the merge action of a live effect.
Definition: hdicoreLiveEffect.h:310
virtual std::string name() const
Gets the unique name of the target effect.
virtual bool isEmpty() const
Gets whether the target Parameters object is empty (constructed with the default ctor) ...
virtual bool fillStyleMatrix(TransformMatrix &m__) const
Gets the fill transform for the target param.
virtual bool evenOdd() const
Gets the even-odd fill rule for the target param.
Definition: hdicoreLiveEffect.h:18
virtual std::string title() const
Gets the UI-visible title of the effect.
virtual ~LiveEffect()
LiveEffect object destructor.
Header file for describing a 2D transformation matrix.
Describes the stroke styling of a path.
Definition: hdicorePathStyle.h:249
virtual bool xformedStrokeStyle(StrokeStyle &ss__) const
Gets the stroke style for the target param, but with the object's style matrix multiplied in for grad...
virtual ~Parameters()
Parameters object destructor.
LiveEffect()
Constructs an empty LiveEffect object.
Allows for 2-dimensional transformations in a single application via matrix math. ...
Definition: hdicoreTransformMatrix.h:26
virtual bool fillStyle(FillStyle &fs__) const
Gets the fill style for the target param.
Header file for a wide variety of necessary typedefs, enums, and forwards declarations.
virtual bool mergeIntoSelection(const MergeAction act_)
Merges the target effect into the existing style of all selected objects.
Header file for path style-related classes.
virtual Parameters & operator=(const Parameters &rhs_)
Assigns one Parameters object to another.
virtual bool strokeStyleMatrix(TransformMatrix &m__) const
Gets the stroke transform for the target param.
Definition: hdicoreaiArray.h:12
virtual bool version(int32_t &major__, int32_t &minor__) const
Gets the version info for the target live effect.
virtual AILiveEffectParameters aiLiveEffectParams() const
Gets the live effect param ref around which the target object is wrapped.
virtual StyleFlags styleFlags() const
Gets the style flags of the target effect.
virtual LiveEffect & operator=(const LiveEffect &rhs_)
Assigns one LiveEffect object to another.
virtual AILiveEffectHandle aiLiveEffectHandle() const
Gets the live effect handle around which the target object is wrapped.
virtual bool xformedFillStyle(FillStyle &fs__) const
Gets the fill style for the target param, but with the object's style matrix multiplied in for gradie...
virtual bool operator!=(const Parameters &rhs_) const
Tests whether a given Parameters object is not the same as another.
virtual PreferredInputArtType inputArtPreference() const
Gets the preferred input art types of the target effect.
virtual std::string extraString() const
Gets the string that gives extra information for the panel to display for this filter, e.g. as a tool tip.
virtual bool getEarliestAppVersion(int16_t &rgbVers__, int16_t &cmykVers__) const
Gets the earliest Illustrator version that an effect supports.
StyleFlags
Describes the style of a live effect.
Definition: hdicoreLiveEffect.h:270
virtual bool strokeStyle(StrokeStyle &ss__) const
Gets the stroke style for the target param.
virtual double scaleFactor() const
Gets the scale factor for the target param.
Describes the fill styling of a path.
Definition: hdicorePathStyle.h:140
virtual void setEarliestAppVersion(const int16_t rgbVers_, const int16_t cmykVers_)
Sets the earliest Illustrator version that an effect supports.