Hot Door CORE 0.8.2
Adobe® Illustrator® Plug-in Library
Loading...
Searching...
No Matches
Public Member Functions | Static Public Attributes | Friends | List of all members
hdi::core::ListEntry Class Reference

Allows combo boxes, popups, and lists to store more data than simply strings and indices. More...

#include <hdicoreListEntry.h>

Inheritance diagram for hdi::core::ListEntry:
Inheritance graph
[legend]

Public Member Functions

 ListEntry ()
 Constructs an empty ListEntry object.
 
 ListEntry (const ListEntry &e_)
 Constructs a new ListEntry object from an existing ListEntry object (copy constructor)
 
 ListEntry (const std::string &id_, const std::string &value_, void *userData_, const bool enabled_, const bool editable_)
 Constructs a ListEntry object with some custom data.
 
virtual ~ListEntry ()
 Destructs a ListEntry object.
 
virtual ListEntryoperator= (const ListEntry &rhs_)
 Assigns one ListEntry object to another.
 
virtual bool isEmpty () const
 Gets whether the target ListEntry object is empty (constructed with the default ctor)
 
virtual std::string entryID () const
 Gets the ID string of an entry.
 
virtual void setEntryID (const std::string &id_)
 Sets the ID string of an entry.
 
virtual std::string value () const
 Gets the string value of an entry (what the user sees in the popup/list/etc.)
 
virtual void setValue (const std::string &value_)
 Sets the string value of an entry (what the user sees in the popup/list/etc.)
 
virtual bool enabled () const
 Gets whether the entry should be enabled (selectable by the user in the popup/list/etc.)
 
virtual void setEnabled (const bool enabled_)
 Sets whether the entry should be enabled (selectable by the user in the popup/list/etc.)
 
virtual bool editable () const
 Gets the editability of the entry (whether the user can edit it inline)
 
virtual void setEditable (const bool editable_)
 Sets the editability of the entry (whether the user can edit it inline)
 
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 bool operator== (const ListEntry &rhs_) const
 Tests whether a given ListEntry object is the same as another.
 
virtual bool operator!= (const ListEntry &rhs_) const
 Tests whether a given ListEntry object is not the same as another.
 

Static Public Attributes

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

Friends

pui::BaseEntryData * __accessImpl (const ListEntry &)
 

Detailed Description

Allows combo boxes, popups, and lists to store more data than simply strings and indices.

Constructor & Destructor Documentation

◆ ListEntry() [1/3]

hdi::core::ListEntry::ListEntry ( )

Constructs an empty ListEntry object.

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

◆ ListEntry() [2/3]

hdi::core::ListEntry::ListEntry ( const ListEntry e_)

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

Author
GW
Date
09/2013
Parameters
e_Existing ListEntry object

◆ ListEntry() [3/3]

hdi::core::ListEntry::ListEntry ( const std::string &  id_,
const std::string &  value_,
void *  userData_,
const bool  enabled_,
const bool  editable_ 
)

Constructs a ListEntry object with some custom data.

Author
GW
Date
09/2013
Parameters
id_Entry ID string (must be unique across all entries in the target container), as UTF-8
value_Entry string value, as UTF-8
userData_Data to store in the entry
enabled_Whether the entry should be enabled
editable_Whether the entry should be inline editable

◆ ~ListEntry()

virtual hdi::core::ListEntry::~ListEntry ( )
virtual

Destructs a ListEntry object.

Author
GW
Date
09/2013

Member Function Documentation

◆ editable()

virtual bool hdi::core::ListEntry::editable ( ) const
virtual

Gets the editability of the entry (whether the user can edit it inline)

Author
GW
Date
07/2022
Returns
true for enabled, false otherwise

Reimplemented in hdi::core::PopupEntry.

◆ enabled()

virtual bool hdi::core::ListEntry::enabled ( ) const
virtual

Gets whether the entry should be enabled (selectable by the user in the popup/list/etc.)

Author
GW
Date
09/2013
Returns
true for enabled, false otherwise

◆ entryID()

virtual std::string hdi::core::ListEntry::entryID ( ) const
virtual

Gets the ID string of an entry.

Author
GW
Date
09/2013
Returns
The unique ID of the entry, as UTF-8

◆ isEmpty()

virtual bool hdi::core::ListEntry::isEmpty ( ) const
virtual

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

Author
GW
Date
09/2013
Returns
true if the target ListEntry object is empty, false otherwise

◆ operator!=()

virtual bool hdi::core::ListEntry::operator!= ( const ListEntry rhs_) const
virtual

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

Author
GW
Date
09/2013
Parameters
rhs_ListEntry to compare against (righthand side of inequality operator)
Returns
true for the target and rhs_ being different entries, false otherwise

◆ operator=()

virtual ListEntry & hdi::core::ListEntry::operator= ( const ListEntry rhs_)
virtual

Assigns one ListEntry object to another.

Author
GW
Date
09/2013
Parameters
rhs_Existing ListEntry object to copy values from
Returns
The target ListEntry object, but with its values updated to match that of the rhs_ argument

◆ operator==()

virtual bool hdi::core::ListEntry::operator== ( const ListEntry rhs_) const
virtual

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

Author
GW
Date
09/2013
Parameters
rhs_ListEntry to compare against (righthand side of equality operator)
Returns
true for the target and rhs_ being the same entry, false otherwise

◆ setEditable()

virtual void hdi::core::ListEntry::setEditable ( const bool  editable_)
virtual

Sets the editability of the entry (whether the user can edit it inline)

Author
GW
Date
07/2022
Parameters
enabled_true for enabled, false otherwise

Reimplemented in hdi::core::PopupEntry.

◆ setEnabled()

virtual void hdi::core::ListEntry::setEnabled ( const bool  enabled_)
virtual

Sets whether the entry should be enabled (selectable by the user in the popup/list/etc.)

Author
GW
Date
09/2013
Parameters
enabled_true for enabled, false otherwise

◆ setEntryID()

virtual void hdi::core::ListEntry::setEntryID ( const std::string &  id_)
virtual

Sets the ID string of an entry.

Author
GW
Date
09/2013
Parameters
id_New entry ID string, as UTF-8
Note
It is up to the caller to ensure that the ID is not in use with other entries within the same container widget.

◆ setUserData()

virtual void hdi::core::ListEntry::setUserData ( void *  data_)
virtual

Sets the custom data of an entry.

Author
GW
Date
09/2013
Parameters
data_New custom data to store

◆ setValue()

virtual void hdi::core::ListEntry::setValue ( const std::string &  value_)
virtual

Sets the string value of an entry (what the user sees in the popup/list/etc.)

Author
GW
Date
09/2013
Parameters
value_New entry string value, as UTF-8

◆ userData()

virtual void *const hdi::core::ListEntry::userData ( ) const
virtual

Gets the custom data of an entry.

Author
GW
Date
09/2013
Returns
The data stored inside the target entry object

◆ value()

virtual std::string hdi::core::ListEntry::value ( ) const
virtual

Gets the string value of an entry (what the user sees in the popup/list/etc.)

Author
GW
Date
09/2013
Returns
The entry's string value, as UTF-8