Hot Door CORE 0.8.2
Adobe® Illustrator® Plug-in Library
Loading...
Searching...
No Matches
hdicoreTreeColumnEntry.h
Go to the documentation of this file.
1
8#ifndef __HDI_CORE_TREE_COLUMN_ENTRY__
9#define __HDI_CORE_TREE_COLUMN_ENTRY__
10
11#include <vector>
12
13#include "hdicoreEntryValue.h"
14#include "hdicoreMacros.h"
15
16namespace hdi
17{
18 namespace pui
19 {
20 class TreeColumnEntryData;
21 }
22
23 namespace core
24 {
29 {
30 public:
31 typedef std::vector<EntryValue> ValueVector;
32 typedef std::vector<bool> EditableVector;
33 typedef std::vector< void* > DataVector;
34
39 static const char* separatorValue;
40
53
63
77 const std::string& id_,
78 const ValueVector& values_,
79 const DataVector& userData_,
80 const bool enabled_,
81 const bool expanded_,
82 const EditableVector& editable_
83 );
84
91
102
111 virtual bool isEmpty() const;
112
123 virtual std::vector<std::string> idPath() const;
124
132 virtual std::string entryID() const;
133
144 virtual void setEntryID(const std::string& id_);
145
153 virtual ValueVector values() const;
154
162 virtual void setValues(const ValueVector& values_);
163
171 virtual bool enabled() const;
172
180 virtual void setEnabled(const bool enabled_);
181
189 virtual bool expanded() const;
190
198 virtual void setExpanded(const bool exp_);
199
207 virtual EditableVector editable() const;
208
216 virtual void setEditable(const EditableVector& editable_);
217
225 virtual DataVector userData() const;
226
234 virtual void setUserData(const DataVector& data_);
235
247 virtual bool hasChild(const std::string& id_) const;
248
260 virtual std::unique_ptr<TreeColumnEntry> childWithID(const std::string& id_) const;
261
269 virtual uint32_t childCount() const;
270
279 virtual std::unique_ptr<TreeColumnEntry> childAtIndex(const uint32_t index_) const;
280
289 virtual bool pushChild(const TreeColumnEntry& child_);
290
299 virtual bool popChild(TreeColumnEntry& child__);
300
315 virtual bool insertChild(const std::string& id_, const TreeColumnEntry& child_);
316
327 virtual bool removeChild(const std::string& id_, TreeColumnEntry& child__);
328
337 virtual bool operator==(const TreeColumnEntry& rhs_) const;
338
347 virtual bool operator!=(const TreeColumnEntry& rhs_) const;
348
349
350 private:
351 friend pui::TreeColumnEntryData* __accessImpl(const TreeColumnEntry&);
352
356 void* __data;
357
363 void* __impl() const;
364 };
365
366 typedef std::unique_ptr<TreeColumnEntry> TreeColumnEntryUP;
367 typedef std::shared_ptr<TreeColumnEntry> TreeColumnEntrySP;
368 typedef std::weak_ptr<TreeColumnEntry> TreeColumnEntryWP;
369
370 extern pui::TreeColumnEntryData* __accessImpl(const TreeColumnEntry&);
371 }
372}
373
374#endif
375// __HDI_CORE_TREE_COLUMN_ENTRY__
Allows hierarchical column views to store more data than simply strings and indices.
Definition: hdicoreTreeColumnEntry.h:29
virtual ValueVector values() const
Gets the value objects of an entry.
virtual TreeColumnEntry & operator=(const TreeColumnEntry &rhs_)
Assigns one TreeColumnEntry object to another.
TreeColumnEntry(const TreeColumnEntry &e_)
Constructs a new TreeColumnEntry object from an existing TreeColumnEntry object (copy constructor)
TreeColumnEntry()
Constructs an empty TreeColumnEntry object.
virtual bool expanded() const
Gets whether the entry is expanded (i.e. its children are visible)
virtual void setEnabled(const bool enabled_)
Sets whether the entry should be enabled (selectable by the user in the list)
virtual bool insertChild(const std::string &id_, const TreeColumnEntry &child_)
Inserts an entry into the list of child entries at a given position.
virtual std::unique_ptr< TreeColumnEntry > childAtIndex(const uint32_t index_) const
Gets a specific child of the target entry.
virtual void setValues(const ValueVector &values_)
Sets the value objects of an entry.
virtual void setEntryID(const std::string &id_)
Sets the ID string of an entry.
virtual bool removeChild(const std::string &id_, TreeColumnEntry &child__)
Removes a specific entry from the list of child entries.
virtual void setExpanded(const bool exp_)
Sets whether the entry is expanded (i.e. its children are visible)
virtual bool enabled() const
Gets whether the entry should be enabled (selectable by the user in the list)
virtual bool pushChild(const TreeColumnEntry &child_)
Pushes a new entry onto the end of the list of children of the target entry.
virtual std::vector< std::string > idPath() const
Gets the full ID path of the target entry.
virtual bool popChild(TreeColumnEntry &child__)
Pops an existing entry off the end of the list of children of the target entry.
virtual void setEditable(const EditableVector &editable_)
Sets the editability of each cell in the entry (whether the user can edit it inline)
virtual bool operator!=(const TreeColumnEntry &rhs_) const
Tests whether a given TreeColumnEntry object is not the same as another.
virtual DataVector userData() const
Gets the custom data of an entry.
static const char * separatorValue
When you want a separator in a container widget, create a TreeColumnEntry object with this as its str...
Definition: hdicoreTreeColumnEntry.h:39
virtual bool isEmpty() const
Gets whether the target TreeColumnEntry object is empty (constructed with the default ctor)
virtual uint32_t childCount() const
Gets the count of child entries in the target entry.
TreeColumnEntry(const std::string &id_, const ValueVector &values_, const DataVector &userData_, const bool enabled_, const bool expanded_, const EditableVector &editable_)
Constructs a TreeColumnEntry object with some custom data.
virtual std::string entryID() const
Gets the ID string of an entry.
virtual ~TreeColumnEntry()
Destructs a TreeColumnEntry object.
virtual EditableVector editable() const
Gets the editability of each cell in the entry (whether the user can edit it inline)
virtual void setUserData(const DataVector &data_)
Sets the custom data of an entry.
virtual bool operator==(const TreeColumnEntry &rhs_) const
Tests whether a given TreeColumnEntry object is the same as another.
virtual bool hasChild(const std::string &id_) const
Gets whether the entry has a child with the given ID string.
virtual std::unique_ptr< TreeColumnEntry > childWithID(const std::string &id_) const
Get the child entry with the given ID string, if it exists within the target.
Header file for storing entry string values or image IDs.
Header file for a variety of plugin convenience macros.