Hot Door CORE  0.7.0
Adobe® Illustrator® Plug-in Library
hdicoreEntryValue.h
Go to the documentation of this file.
1 
7 #ifndef __HDI_CORE_ENTRY_VALUE__
8 #define __HDI_CORE_ENTRY_VALUE__
9 
10 #include "hdicoreTypes.h"
11 
12 namespace hdi
13 {
14  namespace core
15  {
19  class EntryValue
20  {
21  public:
25  enum ValueType
26  {
27  UnknownValueType = 0,
28  StringValueType = 10,
29  ImageValueType = 20
30  };
31 
36  struct ImageIDs
37  {
41  int16_t lightID;
42 
46  int16_t lightID_2x;
47 
51  int16_t lightID_3x;
52 
56  int16_t darkID;
57 
61  int16_t darkID_2x;
62 
66  int16_t darkID_3x;
67 
73  ImageIDs();
74 
82  ImageIDs(const ImageIDs& img_);
83 
92  ImageIDs(const int16_t light_, const int16_t dark_);
93 
107  ImageIDs(
108  const int16_t light_,
109  const int16_t light2x_,
110  const int16_t light3x_,
111  const int16_t dark_,
112  const int16_t dark2x_,
113  const int16_t dark3x_
114  );
115 
121  ~ImageIDs();
122 
131  ImageIDs& operator=(const ImageIDs& rhs_);
132 
142  bool operator==(const ImageIDs& rhs_) const;
143 
153  bool operator!=(const ImageIDs& rhs_) const;
154  };
155 
163  EntryValue(const EntryValue& ev_);
164 
172  explicit EntryValue(const std::string& str_);
173 
181  EntryValue(const ImageIDs& ids_);
182 
188  ~EntryValue();
189 
198  EntryValue& operator=(const EntryValue& rhs_);
199 
208  bool operator==(const EntryValue& rhs_) const;
209 
218  bool operator!=(const EntryValue& rhs_) const;
219 
227  ValueType type() const;
228 
236  std::string stringValue() const;
237 
246  bool setStringValue(const std::string& str_);
247 
257  ImageIDs imageIDs() const;
258 
267  bool setImageIDs(const ImageIDs& ids_);
268 
269 
270  private:
274  ValueType __type;
275 
279  std::string __strVal;
280 
284  ImageIDs __imageIDs;
285 
291  EntryValue();
292  };
293 
294  typedef std::auto_ptr<EntryValue> EntryValueAP;
295  }
296 }
297 
298 #endif
299 // __HDI_CORE_ENTRY_VALUE__
int16_t lightID
ID of the PNGI resource that should be used when the UI is light in color.
Definition: hdicoreEntryValue.h:41
bool operator==(const ImageIDs &rhs_) const
Overloaded equality operator to compare two ImageIDs objects with one another.
int16_t darkID_3x
ID of the PNGI resource that should be used when the UI is dark in color at 3x resolution.
Definition: hdicoreEntryValue.h:66
ValueType
Indicates the type of value stored in an EntryValue object.
Definition: hdicoreEntryValue.h:25
Allows for a *Entry class to store either a string value or PNGI image ID for a row/column.
Definition: hdicoreEntryValue.h:19
int16_t darkID
ID of the PNGI resource that should be used when the UI is dark in color.
Definition: hdicoreEntryValue.h:56
int16_t lightID_3x
ID of the PNGI resource that should be used when the UI is light in color at 3x resolution.
Definition: hdicoreEntryValue.h:51
bool operator==(const EntryValue &rhs_) const
Overloaded equality operator to compare two EntryValue objects to one another.
bool operator!=(const EntryValue &rhs_) const
Overloaded inequality operator to compare two EntryValue objects to one another.
ImageIDs & operator=(const ImageIDs &rhs_)
Overloaded assignment operator to copy values from one ImageIDs object to another.
~ImageIDs()
Destructs an ImageIDs object.
Stores both a light and dark image PNGI resource ID, such that Illustrator UI brightness changes can ...
Definition: hdicoreEntryValue.h:36
ImageIDs imageIDs() const
Gets the image ID values for the target object.
bool operator!=(const ImageIDs &rhs_) const
Overloaded equality operator to compare two ImageIDs objects with one another.
Header file for a wide variety of necessary typedefs, enums, and forwards declarations.
int16_t darkID_2x
ID of the PNGI resource that should be used when the UI is dark in color at 2x resolution.
Definition: hdicoreEntryValue.h:61
int16_t lightID_2x
ID of the PNGI resource that should be used when the UI is light in color at 2x resolution.
Definition: hdicoreEntryValue.h:46
Definition: hdicoreaiArray.h:12
ImageIDs()
Constructs a new Images object with default values (i.e. 0, meaning "no image")
~EntryValue()
EntryValue destructor.
ValueType type() const
Gets the type of value representing by the target object.
std::string stringValue() const
Gets the string value for the target object.
EntryValue & operator=(const EntryValue &rhs_)
Overloaded assignment operator to copy values from one EntryValue object to another.
bool setStringValue(const std::string &str_)
Sets the string value for the target object.
bool setImageIDs(const ImageIDs &ids_)
Sets the image ID values for the target object.