Hot Door CORE 0.8.2
Adobe® Illustrator® Plug-in Library
Loading...
Searching...
No Matches
hdicoreFlyout.h
Go to the documentation of this file.
1
7#ifndef __HDI_CORE_FLYOUT__
8#define __HDI_CORE_FLYOUT__
9
10#if defined(HDI_CORE_AIP_MODE)
11
12#include <vector>
13
14#include "hdicoreTypes.h"
15
16namespace hdi
17{
18 namespace pui
19 {
20 class PopupMenu;
21 }
22
23 namespace core
24 {
25 class Callback;
26 class PopupEntry;
27 class Panel;
28
32 class Flyout
33 {
34 public:
35 typedef std::vector<PopupEntry> EntryVector;
36
43
51 Flyout(const Flyout& fo_);
52
60 Flyout(const EntryVector& entries_);
61
67 virtual ~Flyout();
68
78 virtual Flyout& operator=(const Flyout& rhs_);
79
87 virtual int32_t currentIndex() const;
88
96 virtual std::string currentID() const;
97
105 virtual std::string currentValue() const;
106
114 virtual std::unique_ptr<PopupEntry> currentEntry() const;
115
124 virtual bool currentUserData(void*& data__) const;
125
137 virtual const std::vector< std::shared_ptr<PopupEntry> >* const entries() const;
138
146 virtual void setEntries(const EntryVector& entries_);
147
156 virtual bool hasEntry(const std::string& id_) const;
157
166 virtual std::shared_ptr<PopupEntry> entryWithID(const std::string& id_) const;
167
178 virtual bool pushEntry(const PopupEntry& entry_);
179
189 virtual bool popEntry(PopupEntry& entry__);
190
205 virtual bool insertEntry(const std::string& id_, const PopupEntry& entry_);
206
217 virtual bool removeEntry(const std::string& id_, PopupEntry& entry__);
218
224 virtual void clearEntries();
225
233 virtual Panel* const panel() const;
234
244 virtual void selectionMade();
245
253 virtual Callback* const selectionMadeCallback() const;
254
262 virtual void setSelectionMadeCallback(const Callback& callback_);
263
271 virtual Callback* const showingCallback() const;
272
282 virtual void setShowingCallback(const Callback& callback_);
283
292 virtual bool entryChecked(const int32_t index_);
293
303 virtual bool checkEntry(const int32_t index_, const bool check_);
304
313 virtual bool entryChecked(const std::string& id_);
314
324 virtual bool checkEntry(const std::string& id_, const bool check_);
325
333 virtual void update();
334
335
336 private:
337 friend class Panel;
338 friend pui::PopupMenu* __accessImpl(const Flyout&);
339
343 void* __data;
344
350 void* __impl() const;
351 };
352
353 typedef std::unique_ptr<Flyout> FlyoutUP;
354 typedef std::shared_ptr<Flyout> FlyoutSP;
355 typedef std::weak_ptr<Flyout> FlyoutWP;
356 }
357}
358
359#endif
360// HDI_CORE_AIP_MODE
361
362#endif
363// __HDI_CORE_FLYOUT__
Base class for templated __Callback class.
Definition: hdicoreCallback.h:68
Flyout menu, which can be added to a Panel for additional options.
Definition: hdicoreFlyout.h:33
virtual bool hasEntry(const std::string &id_) const
Gets whether the entries vector already contains an entry, based on its ID.
virtual Flyout & operator=(const Flyout &rhs_)
Overloaded assigment operator to copy one Flyout object's values to another.
virtual Callback *const showingCallback() const
Gets the showing callback for the flyout menu.
virtual Callback *const selectionMadeCallback() const
Gets the flyout entry selection callback.
virtual int32_t currentIndex() const
Gets the index of the currently selected entry.
virtual bool removeEntry(const std::string &id_, PopupEntry &entry__)
Removes a specific entry from the list of entries.
virtual bool entryChecked(const std::string &id_)
Gets whether the specified flyout entry is checked.
virtual void setShowingCallback(const Callback &callback_)
Sets the showing callback for the flyout menu.
virtual bool checkEntry(const std::string &id_, const bool check_)
Sets whether the specified flyout entry is checked.
virtual std::unique_ptr< PopupEntry > currentEntry() const
Gets the current entry object.
Flyout()
Constructs an empty Flyout menu, to which entries may be added later.
virtual std::string currentID() const
Gets the ID of the currently selected entry.
virtual ~Flyout()
Flyout destructor.
virtual bool checkEntry(const int32_t index_, const bool check_)
Sets whether the specified flyout entry is checked.
virtual bool currentUserData(void *&data__) const
Gets the user data for the current entry.
virtual std::string currentValue() const
Gets the string value of the currently selected entry.
Flyout(const EntryVector &entries_)
Constructs a Flyout menu with a list of entries.
virtual void clearEntries()
Clears all entries contained by the flyout.
Flyout(const Flyout &fo_)
Constructs a new Flyout object from an existing Flyout object (copy constructor)
virtual Panel *const panel() const
Gets the parent panel of the flyout.
virtual void selectionMade()
Simulates the flyout menu having one of its entries selected.
virtual void setSelectionMadeCallback(const Callback &callback_)
Sets the flyout entry selection callback.
virtual bool insertEntry(const std::string &id_, const PopupEntry &entry_)
Inserts an entry into the list of entries at a given position.
virtual void update()
Forces the flyout menu to update its entries.
virtual bool entryChecked(const int32_t index_)
Gets whether the specified flyout entry is checked.
virtual std::shared_ptr< PopupEntry > entryWithID(const std::string &id_) const
Gets the entry with the given ID, provided it exists within the widget.
virtual const std::vector< std::shared_ptr< PopupEntry > > *const entries() const
Gets the entries vector.
virtual bool popEntry(PopupEntry &entry__)
Pops an entry off the list (i.e. from the end)
virtual void setEntries(const EntryVector &entries_)
Allows the entries in an flyout menu to be changed out entirely.
virtual bool pushEntry(const PopupEntry &entry_)
Pushes an entry onto the list (i.e. at the end)
Used to add a panel to Illustrator's UI and contain various UI widgets.
Definition: hdicorePanel.h:36
Allows combo boxes, popups, and flyouts to store more data than simply strings and indices.
Definition: hdicorePopupEntry.h:20
Header file for a wide variety of necessary typedefs, enums, and forwards declarations.