Hot Door CORE  0.7.0
Adobe® Illustrator® Plug-in Library
hdicoreTreeEntry.h
Go to the documentation of this file.
1 
7 #ifndef __HDI_CORE_TREE_ENTRY__
8 #define __HDI_CORE_TREE_ENTRY__
9 
10 #include "hdicoreEntryValue.h"
11 
12 #include "hdicoreMacros.h"
13 
14 namespace hdi
15 {
16  namespace plugin
17  {
18  class BaseTreeEntryData;
19  }
20 
21  namespace core
22  {
26  class TreeEntry
27  {
28  public:
33  static const char* separatorValue;
34 
46  TreeEntry();
47 
55  TreeEntry(const TreeEntry& e_);
56 
72  TreeEntry(
73  const std::string& id_,
74  const EntryValue& value_,
75  void* userData_,
76  const bool enabled_ = true,
77  const bool expanded_ = false
78  );
79 
85  virtual ~TreeEntry();
86 
96  virtual TreeEntry& operator=(const TreeEntry& rhs_);
97 
105  virtual bool isEmpty() const;
106 
114  virtual std::string entryID() const;
115 
126  virtual void setEntryID(const std::string& id_);
127 
135  virtual EntryValue value() const;
136 
144  virtual void setValue(const EntryValue& value_);
145 
153  virtual bool enabled() const;
154 
162  virtual void setEnabled(const bool enabled_);
163 
171  virtual bool expanded() const;
172 
180  virtual void setExpanded(const bool exp_);
181 
189  virtual void* const userData() const;
190 
198  virtual void setUserData(void* data_);
199 
207  virtual uint32_t childCount() const;
208 
217  virtual std::auto_ptr<TreeEntry> childAtIndex(const uint32_t index_) const;
218 
227  virtual bool pushChild(const TreeEntry& child_);
228 
237  virtual bool popChild(TreeEntry& child__);
238 
247  virtual bool operator==(const TreeEntry& rhs_) const;
248 
257  virtual bool operator!=(const TreeEntry& rhs_) const;
258 
259 
260  private:
261  friend plugin::BaseTreeEntryData* __accessImpl(const TreeEntry&);
262 
266  void* __data;
267 
273  void* __impl() const;
274  };
275 
276  typedef std::auto_ptr<TreeEntry> TreeEntryAP;
277 
278  extern plugin::BaseTreeEntryData* __accessImpl(const TreeEntry&);
279  }
280 }
281 
282 #endif
283 // __HDI_CORE_TREE_ENTRY__
virtual std::string entryID() const
Gets the ID string of an entry.
static const char * separatorValue
When you want a separator in a container widget, create a TreeEntry object with this as its string va...
Definition: hdicoreTreeEntry.h:33
virtual void setEnabled(const bool enabled_)
Sets whether the entry should be enabled (selectable by the user in the list)
virtual EntryValue value() const
Gets the value object of an entry.
Allows for a *Entry class to store either a string value or PNGI image ID for a row/column.
Definition: hdicoreEntryValue.h:19
virtual bool enabled() const
Gets whether the entry should be enabled (selectable by the user in the list)
virtual void setValue(const EntryValue &value_)
Sets the value object of an entry.
virtual bool operator==(const TreeEntry &rhs_) const
Tests whether a given TreeEntry object is the same as another.
virtual void setExpanded(const bool exp_)
Sets whether the entry is expanded (i.e. its children are visible)
Header file for storing entry string values or image IDs.
virtual bool popChild(TreeEntry &child__)
Pops an existing entry off the end of the list of children of the target entry.
virtual uint32_t childCount() const
Gets the count of child entries in the target entry.
virtual bool isEmpty() const
Gets whether the target TreeEntry object is empty (constructed with the default ctor) ...
Header file for a variety of Illustrator plugin convenience macros.
virtual void setEntryID(const std::string &id_)
Sets the ID string of an entry.
virtual bool pushChild(const TreeEntry &child_)
Pushes a new entry onto the end of the list of children of the target entry.
Definition: hdicoreaiArray.h:12
virtual TreeEntry & operator=(const TreeEntry &rhs_)
Assigns one TreeEntry object to another.
virtual bool expanded() const
Gets whether the entry is expanded (i.e. its children are visible)
TreeEntry()
Constructs an empty TreeEntry object.
Allows hierarchical views to store more data than simply strings and indices.
Definition: hdicoreTreeEntry.h:26
virtual bool operator!=(const TreeEntry &rhs_) const
Tests whether a given TreeEntry object is not the same as another.
virtual void *const userData() const
Gets the custom data of an entry.
virtual void setUserData(void *data_)
Sets the custom data of an entry.
virtual ~TreeEntry()
Destructs a TreeEntry object.
virtual std::auto_ptr< TreeEntry > childAtIndex(const uint32_t index_) const
Gets a specific child of the target entry.