Hot Door CORE 0.8.2
Adobe® Illustrator® Plug-in Library
Loading...
Searching...
No Matches
hdicoreListEntry.h
Go to the documentation of this file.
1
7#ifndef __HDI_CORE_LIST_ENTRY__
8#define __HDI_CORE_LIST_ENTRY__
9
10#include "hdicoreTypes.h"
11
12namespace hdi
13{
14 namespace pui
15 {
16 class BaseEntryData;
17 }
18
19 namespace core
20 {
25 {
26 public:
31 static const char* separatorValue;
32
45
53 ListEntry(const ListEntry& e_);
54
68 const std::string& id_,
69 const std::string& value_,
70 void* userData_,
71 const bool enabled_,
72 const bool editable_
73 );
74
80 virtual ~ListEntry();
81
91 virtual ListEntry& operator=(const ListEntry& rhs_);
92
100 virtual bool isEmpty() const;
101
109 virtual std::string entryID() const;
110
121 virtual void setEntryID(const std::string& id_);
122
130 virtual std::string value() const;
131
139 virtual void setValue(const std::string& value_);
140
148 virtual bool enabled() const;
149
157 virtual void setEnabled(const bool enabled_);
158
166 virtual bool editable() const;
167
175 virtual void setEditable(const bool editable_);
176
184 virtual void* const userData() const;
185
193 virtual void setUserData(void* data_);
194
203 virtual bool operator==(const ListEntry& rhs_) const;
204
213 virtual bool operator!=(const ListEntry& rhs_) const;
214
215
216 private:
217 friend pui::BaseEntryData* __accessImpl(const ListEntry&);
218
222 void* __data;
223
229 void* __impl() const;
230 };
231
232 typedef std::unique_ptr<ListEntry> ListEntryUP;
233 typedef std::shared_ptr<ListEntry> ListEntrySP;
234 typedef std::weak_ptr<ListEntry> ListEntryWP;
235
236 extern pui::BaseEntryData* __accessImpl(const ListEntry&);
237 }
238}
239
240#endif
241// __HDI_CORE_LIST_ENTRY__
Allows combo boxes, popups, and lists to store more data than simply strings and indices.
Definition: hdicoreListEntry.h:25
virtual void *const userData() const
Gets 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 ListEntry & operator=(const ListEntry &rhs_)
Assigns one ListEntry object to another.
virtual bool editable() const
Gets the editability of the entry (whether the user can edit it inline)
virtual std::string entryID() const
Gets the ID string of an entry.
ListEntry()
Constructs an empty ListEntry object.
virtual ~ListEntry()
Destructs a ListEntry object.
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 std::string value() const
Gets 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 setEditable(const bool editable_)
Sets the editability of the entry (whether the user can edit it inline)
virtual void setValue(const std::string &value_)
Sets the string value of an entry (what the user sees in the popup/list/etc.)
ListEntry(const ListEntry &e_)
Constructs a new ListEntry object from an existing ListEntry object (copy constructor)
virtual bool operator!=(const ListEntry &rhs_) const
Tests whether a given ListEntry object is not the same as another.
virtual void setUserData(void *data_)
Sets the custom data of an entry.
virtual void setEnabled(const bool enabled_)
Sets whether the entry should be enabled (selectable by the user in the popup/list/etc....
virtual void setEntryID(const std::string &id_)
Sets the ID string of an entry.
static const char * separatorValue
When you want a separator in a container widget, create a ListEntry object with this as its value.
Definition: hdicoreListEntry.h:31
virtual bool isEmpty() const
Gets whether the target ListEntry object is empty (constructed with the default ctor)
Header file for a wide variety of necessary typedefs, enums, and forwards declarations.