7#ifndef __HDI_CORE_TREE_ENTRY__
8#define __HDI_CORE_TREE_ENTRY__
19 class BaseTreeEntryData;
75 const std::string& id_,
120 virtual std::vector<std::string>
idPath()
const;
244 virtual bool hasChild(
const std::string& id_)
const;
257 virtual std::unique_ptr<TreeEntry>
childWithID(
const std::string& id_)
const;
276 virtual std::unique_ptr<TreeEntry>
childAtIndex(
const uint32_t index_)
const;
348 friend pui::BaseTreeEntryData* __accessImpl(
const TreeEntry&);
360 void* __impl()
const;
363 typedef std::unique_ptr<TreeEntry> TreeEntryUP;
364 typedef std::shared_ptr<TreeEntry> TreeEntrySP;
365 typedef std::weak_ptr<TreeEntry> TreeEntryWP;
367 extern pui::BaseTreeEntryData* __accessImpl(
const TreeEntry&);
Allows for a *Entry class to store either a string value or PNGI image ID for a row/column.
Definition: hdicoreEntryValue.h:21
Allows hierarchical views to store more data than simply strings and indices.
Definition: hdicoreTreeEntry.h:28
virtual bool operator==(const TreeEntry &rhs_) const
Tests whether a given TreeEntry object is the same as another.
virtual std::string entryID() const
Gets the ID string of an entry.
virtual bool removeChild(const std::string &id_, TreeEntry &child__)
Removes a specific entry from the list of child entries.
virtual void *const userData() const
Gets the custom data of an entry.
TreeEntry(const std::string &id_, const EntryValue &value_, void *userData_, const bool enabled_, const bool expanded_, const bool editable_)
Constructs a TreeEntry object with some custom data.
virtual TreeEntry & operator=(const TreeEntry &rhs_)
Assigns one TreeEntry object to another.
virtual bool operator!=(const TreeEntry &rhs_) const
Tests whether a given TreeEntry object is not the same as another.
virtual ~TreeEntry()
Destructs a TreeEntry object.
TreeEntry()
Constructs an empty TreeEntry object.
virtual void setEntryID(const std::string &id_)
Sets the ID string of an entry.
virtual void setEditable(const bool editable_)
Sets the editability of the entry (whether the user can edit it inline)
virtual bool enabled() const
Gets whether the entry should be enabled (selectable by the user in the list)
virtual bool editable() const
Gets the editability of the entry (whether the user can edit it inline)
virtual void setExpanded(const bool exp_)
Sets 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 expanded() const
Gets whether the entry is expanded (i.e. its children are visible)
virtual bool insertChild(const std::string &id_, const TreeEntry &child_)
Inserts an entry into the list of child entries at a given position.
virtual bool popChild(TreeEntry &child__)
Pops an existing entry off the end of the list of children of the target entry.
virtual bool hasChild(const std::string &id_) const
Gets whether the entry has a child with the given ID string.
virtual EntryValue value() const
Gets the value object 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.
virtual std::vector< std::string > idPath() const
Gets the full ID path of the target entry.
virtual std::unique_ptr< TreeEntry > childWithID(const std::string &id_) const
Get the child entry with the given ID string, if it exists within the target.
virtual void setValue(const EntryValue &value_)
Sets the value object 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:34
virtual std::unique_ptr< TreeEntry > childAtIndex(const uint32_t index_) const
Gets a specific child of the target entry.
TreeEntry(const TreeEntry &e_)
Constructs a new TreeEntry object from an existing TreeEntry object (copy constructor)
virtual bool isEmpty() const
Gets whether the target TreeEntry object is empty (constructed with the default ctor)
virtual uint32_t childCount() const
Gets the count of child entries in the target entry.
virtual void setUserData(void *data_)
Sets the custom data of an entry.
Header file for storing entry string values or image IDs.
Header file for a variety of plugin convenience macros.