Hot Door CORE  0.7.0
Adobe® Illustrator® Plug-in Library
Public Types | Public Member Functions | Static Public Attributes | Friends | List of all members
hdi::core::TreeColumnEntry Class Reference

Allows hierarchical column views to store more data than simply strings and indices. More...

#include <hdicoreTreeColumnEntry.h>

Public Types

typedef std::vector< EntryValueValueVector
 
typedef std::vector< void * > DataVector
 

Public Member Functions

 TreeColumnEntry ()
 Constructs an empty TreeColumnEntry object. More...
 
 TreeColumnEntry (const TreeColumnEntry &e_)
 Constructs a new TreeColumnEntry object from an existing TreeColumnEntry object (copy constructor) More...
 
 TreeColumnEntry (const std::string &id_, const ValueVector &values_, const DataVector &userData_, const bool enabled_=true, const bool expanded_=false)
 Constructs a TreeColumnEntry object with some custom data. More...
 
virtual ~TreeColumnEntry ()
 Destructs a TreeColumnEntry object. More...
 
virtual TreeColumnEntryoperator= (const TreeColumnEntry &rhs_)
 Assigns one TreeColumnEntry object to another. More...
 
virtual bool isEmpty () const
 Gets whether the target TreeColumnEntry object is empty (constructed with the default ctor) More...
 
virtual std::string entryID () const
 Gets the ID string of an entry. More...
 
virtual void setEntryID (const std::string &id_)
 Sets the ID string of an entry. More...
 
virtual ValueVector values () const
 Gets the value objects of an entry. More...
 
virtual void setValues (const ValueVector &values_)
 Sets the value objects of an entry. More...
 
virtual bool enabled () const
 Gets whether the entry should be enabled (selectable by the user in the list) More...
 
virtual void setEnabled (const bool enabled_)
 Sets whether the entry should be enabled (selectable by the user in the list) More...
 
virtual bool expanded () const
 Gets whether the entry is expanded (i.e. its children are visible) More...
 
virtual void setExpanded (const bool exp_)
 Sets whether the entry is expanded (i.e. its children are visible) More...
 
virtual DataVector userData () const
 Gets the custom data of an entry. More...
 
virtual void setUserData (const DataVector &data_)
 Sets the custom data of an entry. More...
 
virtual uint32_t childCount () const
 Gets the count of child entries in the target entry. More...
 
virtual std::auto_ptr< TreeColumnEntrychildAtIndex (const uint32_t index_) const
 Gets a specific child of the target entry. More...
 
virtual bool pushChild (const TreeColumnEntry &child_)
 Pushes a new entry onto the end of the list of children of the target entry. More...
 
virtual bool popChild (TreeColumnEntry &child__)
 Pops an existing entry off the end of the list of children of the target entry. More...
 
virtual bool operator== (const TreeColumnEntry &rhs_) const
 Tests whether a given TreeColumnEntry object is the same as another. More...
 
virtual bool operator!= (const TreeColumnEntry &rhs_) const
 Tests whether a given TreeColumnEntry object is not the same as another. More...
 

Static Public Attributes

static const char * separatorValue
 When you want a separator in a container widget, create a TreeColumnEntry object with this as its string value.
 

Friends

plugin::TreeColumnEntryData * __accessImpl (const TreeColumnEntry &)
 

Detailed Description

Allows hierarchical column views to store more data than simply strings and indices.

Constructor & Destructor Documentation

hdi::core::TreeColumnEntry::TreeColumnEntry ( )

Constructs an empty TreeColumnEntry object.

Author
GW
Date
01/2015
Note
To test if a TreeColumnEntry object is empty, call isEmpty() on it
Empty TreeColumnEntry objects do not relate to any entry in any widget; they are designed to be "receivers" of some other TreeColumnEntry object via the overloaded assignment operator. Empty TreeColumnEntry objects are useless until such time (though it is safe to call any of their methods).
hdi::core::TreeColumnEntry::TreeColumnEntry ( const TreeColumnEntry e_)

Constructs a new TreeColumnEntry object from an existing TreeColumnEntry object (copy constructor)

Author
GW
Date
01/2015
Parameters
e_Existing TreeColumnEntry object
hdi::core::TreeColumnEntry::TreeColumnEntry ( const std::string &  id_,
const ValueVector &  values_,
const DataVector &  userData_,
const bool  enabled_ = true,
const bool  expanded_ = false 
)

Constructs a TreeColumnEntry object with some custom data.

Author
GW
Date
01/2015
Parameters
id_Entry ID string, as UTF-8 (must form a unique ID path in the target container)
values_Entry value objects, one for each column
userData_Data to store in each column of the entry
enabled_Whether the entry should be enabled
expanded_true to expand the entry, false to collapse
virtual hdi::core::TreeColumnEntry::~TreeColumnEntry ( )
virtual

Destructs a TreeColumnEntry object.

Author
GW
Date
01/2015

Member Function Documentation

virtual std::auto_ptr<TreeColumnEntry> hdi::core::TreeColumnEntry::childAtIndex ( const uint32_t  index_) const
virtual

Gets a specific child of the target entry.

Author
GW
Date
01/2015
Parameters
index_Index of the desired child entry
Returns
The child at the given index, or NULL for error
virtual uint32_t hdi::core::TreeColumnEntry::childCount ( ) const
virtual

Gets the count of child entries in the target entry.

Author
GW
Date
01/2015
Returns
The count of child entries
virtual bool hdi::core::TreeColumnEntry::enabled ( ) const
virtual

Gets whether the entry should be enabled (selectable by the user in the list)

Author
GW
Date
01/2015
Returns
true for enabled, false otherwise
virtual std::string hdi::core::TreeColumnEntry::entryID ( ) const
virtual

Gets the ID string of an entry.

Author
GW
Date
01/2015
Returns
The unique ID of the entry, as UTF-8
virtual bool hdi::core::TreeColumnEntry::expanded ( ) const
virtual

Gets whether the entry is expanded (i.e. its children are visible)

Author
GW
Date
02/2015
Returns
true for expanded, false for collapsed
virtual bool hdi::core::TreeColumnEntry::isEmpty ( ) const
virtual

Gets whether the target TreeColumnEntry object is empty (constructed with the default ctor)

Author
GW
Date
01/2015
Returns
true if the target TreeColumnEntry object is empty, false otherwise
virtual bool hdi::core::TreeColumnEntry::operator!= ( const TreeColumnEntry rhs_) const
virtual

Tests whether a given TreeColumnEntry object is not the same as another.

Author
GW
Date
01/2015
Parameters
rhs_TreeColumnEntry to compare against (righthand side of inequality operator)
Returns
true for the target and rhs_ being different entries, false otherwise
virtual TreeColumnEntry& hdi::core::TreeColumnEntry::operator= ( const TreeColumnEntry rhs_)
virtual

Assigns one TreeColumnEntry object to another.

Author
GW
Date
01/2015
Parameters
rhs_Existing TreeColumnEntry object to copy values from
Returns
The target TreeColumnEntry object, but with its values updated to match that of the rhs_ argument
virtual bool hdi::core::TreeColumnEntry::operator== ( const TreeColumnEntry rhs_) const
virtual

Tests whether a given TreeColumnEntry object is the same as another.

Author
GW
Date
01/2015
Parameters
rhs_TreeColumnEntry to compare against (righthand side of equality operator)
Returns
true for the target and rhs_ being the same entry, false otherwise
virtual bool hdi::core::TreeColumnEntry::popChild ( TreeColumnEntry child__)
virtual

Pops an existing entry off the end of the list of children of the target entry.

Author
GW
Date
01/2015
Parameters
child__Return-by-reference for the child entry that was removed
Returns
true if the child could be acquired and popped, false otherwise
virtual bool hdi::core::TreeColumnEntry::pushChild ( const TreeColumnEntry child_)
virtual

Pushes a new entry onto the end of the list of children of the target entry.

Author
GW
Date
01/2015
Parameters
child_New child to add to the end of the list of children
Returns
true if the child could be pushed, false otherwise
virtual void hdi::core::TreeColumnEntry::setEnabled ( const bool  enabled_)
virtual

Sets whether the entry should be enabled (selectable by the user in the list)

Author
GW
Date
01/2015
Parameters
enabled_true for enabled, false otherwise
virtual void hdi::core::TreeColumnEntry::setEntryID ( const std::string &  id_)
virtual

Sets the ID string of an entry.

Author
GW
Date
01/2015
Parameters
id_New entry ID string, as UTF-8
Note
It is up to the caller to ensure that the ID path is not in use with other entries within the same container widget.
virtual void hdi::core::TreeColumnEntry::setExpanded ( const bool  exp_)
virtual

Sets whether the entry is expanded (i.e. its children are visible)

Author
GW
Date
02/2015
Parameters
exp_true for expanded, false for collapsed
virtual void hdi::core::TreeColumnEntry::setUserData ( const DataVector &  data_)
virtual

Sets the custom data of an entry.

Author
GW
Date
01/2015
Parameters
data_New custom data to store
virtual void hdi::core::TreeColumnEntry::setValues ( const ValueVector &  values_)
virtual

Sets the value objects of an entry.

Author
GW
Date
01/2015
Parameters
values_New entry value objects
virtual DataVector hdi::core::TreeColumnEntry::userData ( ) const
virtual

Gets the custom data of an entry.

Author
GW
Date
01/2015
Returns
The data stored inside the target entry object
virtual ValueVector hdi::core::TreeColumnEntry::values ( ) const
virtual

Gets the value objects of an entry.

Author
GW
Date
01/2015
Returns
The entry's value objects