Hot Door CORE 0.8.4
Adobe® Illustrator® Plug-in Library
Loading...
Searching...
No Matches
hdicoreArrayPref.h
Go to the documentation of this file.
1
6
7#ifndef __HDI_CORE_ARRAY_PREF__
8#define __HDI_CORE_ARRAY_PREF__
9
10#include <vector>
11
12#include "hdicorePathStyle.h"
13#include "hdicorePrefData.h"
14
15namespace hdi
16{
17 namespace core
18 {
19 class Color;
20 class Font;
21 class Point;
22 class Rect;
23 class Size;
24
25 class BoolPref;
26 class ColorPref;
27 class DictionaryPref;
28 class FontPref;
29 class NumberPref;
30 class PointPref;
31 class RectPref;
32 class SizePref;
33 class StringPref;
34
35 #if defined(HDI_CORE_AIP_MODE)
36 class ArtboardPoint;
37 class ArtboardRect;
38 class ArtColor;
39 class TransformMatrix;
40
42 class ArtboardRectPref;
43 class ArtColorPref;
44 class DashStylePref;
45 class DashStyleMapPref;
46 class FillStylePref;
47 class FillStyleMapPref;
48 class PathStylePref;
49 class PathStyleMapPref;
50 class StrokeStylePref;
53 #endif
54
59 class ArrayPref : public PrefData
60 {
61 public:
62 typedef std::vector< std::shared_ptr<PrefData> > PrefDataVector;
63
71 ArrayPref(const ArrayPref& array_);
72
84 ArrayPref(const PrefDataVector* elements_ = NULL, const std::string& name_ = "");
85
91 virtual ~ArrayPref();
92
101 virtual ArrayPref& operator=(const ArrayPref& rhs_);
102
116 virtual ArrayPref* clone() const;
117
125 virtual uint32_t count() const;
126
139 virtual bool element(const uint32_t index_, std::unique_ptr<PrefData>& data__) const;
140
149 virtual bool pushElement(const PrefData& data_);
150
162 virtual bool popElement(std::unique_ptr<PrefData>& data__);
163
175 virtual bool insertElement(const uint32_t index_, const PrefData& data_);
176
191 virtual bool removeElement(const uint32_t index_, std::unique_ptr<PrefData>& data__);
192
198 virtual void clear();
199
210 virtual bool getArrayElement(const uint32_t index_, ArrayPref& array__) const;
211
228 const uint32_t index_,
229 const PrefDataVector* elements_,
230 ArrayPref& array__
231 );
232
233 #if defined(HDI_CORE_AIP_MODE)
244 virtual bool getArtboardPointElement(const uint32_t index_, ArtboardPointPref& abp__) const;
245
259 const uint32_t index_,
260 const ArtboardPoint& default_,
261 ArtboardPointPref& abp__
262 );
263
274 virtual bool getArtboardRectElement(const uint32_t index_, ArtboardRectPref& abr__) const;
275
289 const uint32_t index_,
290 const ArtboardRect& default_,
291 ArtboardRectPref& abr__
292 );
293
304 virtual bool getArtColorElement(const uint32_t index_, ArtColorPref& ac__) const;
305
319 const uint32_t index_,
320 const ArtColor& default_,
321 ArtColorPref& ac__
322 );
323 #endif
324 // HDI_CORE_AIP_MODE
325
336 virtual bool getBoolElement(const uint32_t index_, BoolPref& b__) const;
337
349 virtual bool getOrCreateBoolElement(const uint32_t index_, const bool default_, BoolPref& b__);
350
361 virtual bool getColorElement(const uint32_t index_, ColorPref& c__) const;
362
374 virtual bool getOrCreateColorElement(const uint32_t index_, const Color& default_, ColorPref& c__);
375
376 #if defined(HDI_CORE_AIP_MODE)
387 virtual bool getDashStyleElement(const uint32_t index_, DashStylePref& ds__);
388
402 const uint32_t index_,
403 const DashStyle& default_,
404 DashStylePref& ds__
405 );
406
417 virtual bool getDashStyleMapElement(const uint32_t index_, DashStyleMapPref& ds__);
418
432 const uint32_t index_,
433 const DashStyle::Map& default_,
434 DashStyleMapPref& ds__
435 );
436 #endif
437 // HDI_CORE_AIP_MODE
438
449 virtual bool getDictElement(const uint32_t index_, DictionaryPref& dict__) const;
450
468 const uint32_t index_,
469 const PrefDataVector* members_,
470 DictionaryPref& dict__
471 );
472
473 #if defined(HDI_CORE_AIP_MODE)
484 virtual bool getFillStyleElement(const uint32_t index_, FillStylePref& fs__);
485
499 const uint32_t index_,
500 const FillStyle& default_,
501 FillStylePref& fs__
502 );
503
514 virtual bool getFillStyleMapElement(const uint32_t index_, FillStyleMapPref& fs__);
515
529 const uint32_t index_,
530 const FillStyle::Map& default_,
531 FillStyleMapPref& fs__
532 );
533 #endif
534 // HDI_CORE_AIP_MODE
535
546 virtual bool getFontElement(const uint32_t index_, FontPref& font__) const;
547
561 const uint32_t index_,
562 const Font& defaultFont_,
563 const double defaultSize_,
564 FontPref& font__
565 );
566
567 #if defined(HDI_CORE_AIP_MODE)
578 virtual bool getTransformMatrixElement(const uint32_t index_, TransformMatrixPref& tm__) const;
579
593 const uint32_t index_,
594 const TransformMatrix& default_,
596 );
597 #endif
598 // HDI_CORE_AIP_MODE
599
610 virtual bool getNumberElement(const uint32_t index_, NumberPref& n__) const;
611
624 virtual bool getOrCreateIntElement(const uint32_t index_, const int64_t default_, NumberPref& n__);
625
638 virtual bool getOrCreateFloatElement(const uint32_t index_, const double default_, NumberPref& n__);
639
640 #if defined(HDI_CORE_AIP_MODE)
651 virtual bool getPathStyleElement(const uint32_t index_, PathStylePref& ps__);
652
666 const uint32_t index_,
667 const PathStyle& default_,
668 PathStylePref& ps__
669 );
670
681 virtual bool getPathStyleMapElement(const uint32_t index_, PathStyleMapPref& ps__);
682
696 const uint32_t index_,
697 const PathStyle::Map& default_,
698 PathStyleMapPref& ps__
699 );
700 #endif
701 // HDI_CORE_AIP_MODE
702
713 virtual bool getPointElement(const uint32_t index_, PointPref& p__) const;
714
727 virtual bool getOrCreatePointElement(const uint32_t index_, const Point& default_, PointPref& p__);
728
739 virtual bool getRectElement(const uint32_t index_, RectPref& r__) const;
740
752 virtual bool getOrCreateRectElement(const uint32_t index_, const Rect& default_, RectPref& r__);
753
764 virtual bool getSizeElement(const uint32_t index_, SizePref& s__) const;
765
777 virtual bool getOrCreateSizeElement(const uint32_t index_, const Size& default_, SizePref& s__);
778
789 virtual bool getStringElement(const uint32_t index_, StringPref& str__) const;
790
804 const uint32_t index_,
805 const std::string& default_,
806 StringPref& str__
807 );
808
809 #if defined(HDI_CORE_AIP_MODE)
820 virtual bool getStrokeStyleElement(const uint32_t index_, StrokeStylePref& ss__);
821
835 const uint32_t index_,
836 const StrokeStyle& default_,
837 StrokeStylePref& ss__
838 );
839
850 virtual bool getStrokeStyleMapElement(const uint32_t index_, StrokeStyleMapPref& ss__);
851
865 const uint32_t index_,
866 const StrokeStyle::Map& default_,
868 );
869 #endif
870 // HDI_CORE_AIP_MODE
871 };
872
873 typedef std::unique_ptr<ArrayPref> ArrayPrefUP;
874 typedef std::shared_ptr<ArrayPref> ArrayPrefSP;
875 typedef std::weak_ptr<ArrayPref> ArrayPrefWP;
876 }
877}
878
879#endif
880// __HDI_CORE_ARRAY_PREF__
virtual bool getPathStyleMapElement(const uint32_t index_, PathStyleMapPref &ps__)
Gets a persistent path style map object from the dictionary.
virtual bool getPathStyleElement(const uint32_t index_, PathStylePref &ps__)
Gets a persistent path style object from the dictionary.
virtual bool element(const uint32_t index_, std::unique_ptr< PrefData > &data__) const
Gets a single element object from the array data tree.
virtual bool getFillStyleMapElement(const uint32_t index_, FillStyleMapPref &fs__)
Gets a persistent fill style map object from the dictionary.
virtual bool getArtboardRectElement(const uint32_t index_, ArtboardRectPref &abr__) const
Gets a persistent artboard rect object from the array.
virtual bool getOrCreateFontElement(const uint32_t index_, const Font &defaultFont_, const double defaultSize_, FontPref &font__)
Similar to getFontElement(), except that, if the element does not already exist, it will be created a...
virtual bool getOrCreatePathStyleElement(const uint32_t index_, const PathStyle &default_, PathStylePref &ps__)
Similar to getPathStyleElement(), except that, if the element does not already exist,...
virtual bool getArtColorElement(const uint32_t index_, ArtColorPref &ac__) const
Gets a persistent art color object from the array.
virtual bool getDictElement(const uint32_t index_, DictionaryPref &dict__) const
Gets a persistent dictionary object from the array.
virtual bool getTransformMatrixElement(const uint32_t index_, TransformMatrixPref &tm__) const
Gets a persistent matrix object from the array.
virtual uint32_t count() const
Gets the count of elements in the top-level of the array.
virtual bool getArrayElement(const uint32_t index_, ArrayPref &array__) const
Gets a persistent array object from the containing array.
virtual bool getDashStyleMapElement(const uint32_t index_, DashStyleMapPref &ds__)
Gets a persistent dash style map object from the dictionary.
virtual bool getOrCreateStrokeStyleMapElement(const uint32_t index_, const StrokeStyle::Map &default_, StrokeStyleMapPref &ss__)
Similar to getStrokeStyleMapElement(), except that, if the element does not already exist,...
virtual bool getDashStyleElement(const uint32_t index_, DashStylePref &ds__)
Gets a persistent dash style object from the dictionary.
virtual bool getOrCreateStrokeStyleElement(const uint32_t index_, const StrokeStyle &default_, StrokeStylePref &ss__)
Similar to getStrokeStyleElement(), except that, if the element does not already exist,...
virtual bool getRectElement(const uint32_t index_, RectPref &r__) const
Gets a persistent rect object from the array.
virtual bool getOrCreateIntElement(const uint32_t index_, const int64_t default_, NumberPref &n__)
Similar to getNumberElement(), except that, if the element does not already exist,...
virtual bool removeElement(const uint32_t index_, std::unique_ptr< PrefData > &data__)
Removes a persistent data object from an arbitrary position in the array.
virtual ArrayPref & operator=(const ArrayPref &rhs_)
Allows one ArrayPref object to be assigned from another.
virtual bool getOrCreateFillStyleMapElement(const uint32_t index_, const FillStyle::Map &default_, FillStyleMapPref &fs__)
Similar to getFillStyleMapElement(), except that, if the element does not already exist,...
virtual bool getOrCreateBoolElement(const uint32_t index_, const bool default_, BoolPref &b__)
Similar to getBoolElement(), except that, if the element does not already exist, it will be created a...
virtual bool getOrCreatePointElement(const uint32_t index_, const Point &default_, PointPref &p__)
Similar to getPointElement(), except that, if the element does not already exist, it will be created ...
virtual bool getOrCreateArtboardPointElement(const uint32_t index_, const ArtboardPoint &default_, ArtboardPointPref &abp__)
Similar to getArtboardPointElement(), except that, if the element does not already exist,...
virtual bool getOrCreateArtColorElement(const uint32_t index_, const ArtColor &default_, ArtColorPref &ac__)
Similar to getArtColorElement(), except that, if the element does not already exist,...
virtual void clear()
Removes all elements from an array.
virtual bool getOrCreateStringElement(const uint32_t index_, const std::string &default_, StringPref &str__)
Similar to getStringElement(), except that, if the element does not already exist,...
ArrayPref(const PrefDataVector *elements_=NULL, const std::string &name_="")
Constructs an ArrayPref object, with new data, to be added to a container at a later time.
virtual bool getNumberElement(const uint32_t index_, NumberPref &n__) const
Gets a persistent number object from the array.
virtual bool insertElement(const uint32_t index_, const PrefData &data_)
Inserts a persistent data object at an arbitrary position in the array.
virtual bool getOrCreateDashStyleElement(const uint32_t index_, const DashStyle &default_, DashStylePref &ds__)
Similar to getDashStyleElement(), except that, if the element does not already exist,...
virtual bool getOrCreateFillStyleElement(const uint32_t index_, const FillStyle &default_, FillStylePref &fs__)
Similar to getFillStyleElement(), except that, if the element does not already exist,...
virtual bool getSizeElement(const uint32_t index_, SizePref &s__) const
Gets a persistent size object from the array.
virtual bool getOrCreateDictElement(const uint32_t index_, const PrefDataVector *members_, DictionaryPref &dict__)
Similar to getDictElement(), except that, if the element does not already exist, it will be created a...
virtual bool pushElement(const PrefData &data_)
Adds a persistent data object to the end of the array.
virtual bool getStrokeStyleElement(const uint32_t index_, StrokeStylePref &ss__)
Gets a persistent stroke style object from the dictionary.
virtual bool getOrCreateDashStyleMapElement(const uint32_t index_, const DashStyle::Map &default_, DashStyleMapPref &ds__)
Similar to getDashStyleMapElement(), except that, if the element does not already exist,...
virtual bool getOrCreateArrayElement(const uint32_t index_, const PrefDataVector *elements_, ArrayPref &array__)
Similar to getArrayElement(), except that, if the element does not already exist, it will be created ...
virtual bool getOrCreateFloatElement(const uint32_t index_, const double default_, NumberPref &n__)
Similar to getNumberElement(), except that, if the element does not already exist,...
virtual bool getArtboardPointElement(const uint32_t index_, ArtboardPointPref &abp__) const
Gets a persistent point object from the array.
virtual bool getOrCreateColorElement(const uint32_t index_, const Color &default_, ColorPref &c__)
Similar to getColorElement(), except that, if the element does not already exist, it will be created ...
virtual ArrayPref * clone() const
Convenience method to clone an ArrayPref object on the heap.
virtual bool getOrCreateRectElement(const uint32_t index_, const Rect &default_, RectPref &r__)
Similar to getRectElement(), except that, if the element does not already exist, it will be created a...
virtual bool getOrCreateSizeElement(const uint32_t index_, const Size &default_, SizePref &s__)
Similar to getSizeElement(), except that, if the element does not already exist, it will be created a...
virtual bool getColorElement(const uint32_t index_, ColorPref &c__) const
Gets a persistent color object from the array.
virtual bool getStringElement(const uint32_t index_, StringPref &str__) const
Gets a persistent string object from the array.
virtual bool getBoolElement(const uint32_t index_, BoolPref &b__) const
Gets a persistent bool object from the array.
virtual bool getPointElement(const uint32_t index_, PointPref &p__) const
Gets a persistent point object from the array.
virtual bool getOrCreateArtboardRectElement(const uint32_t index_, const ArtboardRect &default_, ArtboardRectPref &abr__)
Similar to getArtboardRectElement(), except that, if the element does not already exist,...
ArrayPref(const ArrayPref &array_)
Constructs a new ArrayPref object from an existing ArrayPref object (copy constructor)
virtual bool getFontElement(const uint32_t index_, FontPref &font__) const
Gets a persistent font object from the array.
virtual bool getStrokeStyleMapElement(const uint32_t index_, StrokeStyleMapPref &ss__)
Gets a persistent stroke style map object from the dictionary.
virtual bool getOrCreateTransformMatrixElement(const uint32_t index_, const TransformMatrix &default_, TransformMatrixPref &tm__)
Similar to getTransformMatrixElement(), except that, if the element does not already exist,...
virtual bool getOrCreatePathStyleMapElement(const uint32_t index_, const PathStyle::Map &default_, PathStyleMapPref &ps__)
Similar to getPathStyleMapElement(), except that, if the element does not already exist,...
virtual bool popElement(std::unique_ptr< PrefData > &data__)
Removes a persistent data object from the end of the array.
virtual ~ArrayPref()
Destructs an ArrayPref object.
virtual bool getFillStyleElement(const uint32_t index_, FillStylePref &fs__)
Gets a persistent fill style object from the dictionary.
Describes the color of art on the artboard.
Definition hdicoreArtColor.h:42
Allows for storage of art colors.
Definition hdicoreArtColorPref.h:23
Describes a point on the Illustrator artboard.
Definition hdicoreArtboardPoint.h:31
Allows for storage of 2D artboard points.
Definition hdicoreArtboardPointPref.h:23
Describes a rectangular area on the Illustrator artboard.
Definition hdicoreArtboardRect.h:28
Allows for storage of artboard rects/bounds.
Definition hdicoreArtboardRectPref.h:23
Allows for storage of bools.
Definition hdicoreBoolPref.h:20
Describes an RGB color, with opacity, typically for UI purposes.
Definition hdicoreColor.h:34
Allows for storage of colors.
Definition hdicoreColorPref.h:21
Acts as a DashStyle value map, indicating which values are "known".
Definition hdicorePathStyle.h:33
Describes the dash styling of a path.
Definition hdicorePathStyle.h:22
Allows for storage of dash style maps.
Definition hdicoreDashStyleMapPref.h:28
Allows for storage of dash styles.
Definition hdicoreDashStylePref.h:28
Acts as a dictionary-style container to store any other persistent data types, including arrays and d...
Definition hdicoreDictionaryPref.h:60
Acts as a FillStyle value map, indicating which values are "known".
Definition hdicorePathStyle.h:153
Describes the fill styling of a path.
Definition hdicorePathStyle.h:147
Allows for storage of fill style maps.
Definition hdicoreFillStyleMapPref.h:28
Allows for storage of fill styles.
Definition hdicoreFillStylePref.h:28
Font class to allow for easy font manipulation.
Definition hdicoreFont.h:183
Allows for storage of font faces and sizes.
Definition hdicoreFontPref.h:22
Allows for the storage of numbers.
Definition hdicoreNumberPref.h:20
Acts as a StrokeStyle value map, indicating which values are "known".
Definition hdicorePathStyle.h:448
Describes all styling attributes of a path.
Definition hdicorePathStyle.h:442
Allows for storage of path style maps.
Definition hdicorePathStyleMapPref.h:23
Allows for storage of path styles.
Definition hdicorePathStylePref.h:23
Describes a point in the 2-dimensional (x,y) coordinate system, typically in an Illustrator document ...
Definition hdicorePoint.h:38
Allows for storage of 2D points.
Definition hdicorePointPref.h:21
PrefData()
Constructs an empty PrefData object.
Contains Point and Size objects to describe a rectangle that exists at a specific point of given dime...
Definition hdicoreRect.h:34
Allows for storage of rects/bounds.
Definition hdicoreRectPref.h:21
Contains a width and height for a rectangular shape.
Definition hdicoreSize.h:25
Allows for storage of 2D sizes.
Definition hdicoreSizePref.h:21
Allows for the storage of strings.
Definition hdicoreStringPref.h:20
Acts as a StrokeStyle value map, indicating which values are "known".
Definition hdicorePathStyle.h:287
Describes the stroke styling of a path.
Definition hdicorePathStyle.h:260
Allows for storage of stroke style maps.
Definition hdicoreStrokeStyleMapPref.h:28
Allows for storage of stroke styles.
Definition hdicoreStrokeStylePref.h:28
Allows for 2-dimensional transformations in a single application via matrix math.
Definition hdicoreTransformMatrix.h:34
Allows for storage of transformation matrices.
Definition hdicoreTransformMatrixPref.h:23
Header file for path style-related classes.
Header file for general preference data storage.