Hot Door CORE  0.7.0
Adobe® Illustrator® Plug-in Library
hdicoreFlyout.h
Go to the documentation of this file.
1 
7 #ifndef __HDI_CORE_FLYOUT__
8 #define __HDI_CORE_FLYOUT__
9 
10 #include <vector>
11 
12 #include "hdicoreTypes.h"
13 
14 namespace hdi
15 {
16  namespace plugin
17  {
18  class PopupMenu;
19  }
20 
21  namespace core
22  {
23  class Callback;
24  class ListEntry;
25  class Panel;
26 
30  class Flyout
31  {
32  public:
33  typedef std::vector<ListEntry> EntryVector;
34 
40  Flyout();
41 
49  Flyout(const Flyout& fo_);
50 
58  Flyout(const EntryVector& entries_);
59 
65  virtual ~Flyout();
66 
76  virtual Flyout& operator=(const Flyout& rhs_);
77 
85  virtual int32_t currentIndex() const;
86 
94  virtual std::string currentID() const;
95 
103  virtual std::string currentValue() const;
104 
112  virtual std::auto_ptr<ListEntry> currentEntry() const;
113 
122  virtual bool currentUserData(void*& data__) const;
123 
135  virtual const std::vector< ListEntry* >* const entries() const;
136 
144  virtual void setEntries(const EntryVector& entries_);
145 
154  virtual bool hasEntry(const std::string& id_) const;
155 
166  virtual bool pushEntry(const ListEntry& entry_);
167 
177  virtual bool popEntry(ListEntry& entry__);
178 
193  virtual bool insertEntry(const std::string& id_, const ListEntry& entry_);
194 
205  virtual bool removeEntry(const std::string& id_, ListEntry& entry__);
206 
212  virtual void clearEntries();
213 
221  virtual Panel* const panel() const;
222 
232  virtual void selectionMade();
233 
241  virtual Callback* const selectionMadeCallback() const;
242 
250  virtual void setSelectionMadeCallback(const Callback& callback_);
251 
259  virtual Callback* const showingCallback() const;
260 
270  virtual void setShowingCallback(const Callback& callback_);
271 
280  virtual bool entryChecked(const int32_t index_);
281 
291  virtual bool checkEntry(const int32_t index_, const bool check_);
292 
301  virtual bool entryChecked(const std::string& id_);
302 
312  virtual bool checkEntry(const std::string& id_, const bool check_);
313 
321  virtual void update();
322 
323 
324  private:
325  friend class Panel;
326  friend plugin::PopupMenu* __accessImpl(const Flyout&);
327 
331  void* __data;
332 
338  void* __impl() const;
339  };
340 
341  typedef std::auto_ptr<Flyout> FlyoutAP;
342  }
343 }
344 
345 #endif
346 // __HDI_CORE_FLYOUT__
virtual void setEntries(const EntryVector &entries_)
Allows the entries in an flyout menu to be changed out entirely.
virtual int32_t currentIndex() const
Gets the index of the currently selected entry.
virtual bool currentUserData(void *&data__) const
Gets the user data for the current entry.
virtual void setShowingCallback(const Callback &callback_)
Sets the showing callback for the flyout menu.
virtual bool pushEntry(const ListEntry &entry_)
Pushes an entry onto the list (i.e. at the end)
virtual std::string currentID() const
Gets the ID of the currently selected entry.
virtual std::auto_ptr< ListEntry > currentEntry() const
Gets the current entry object.
Flyout menu, which can be added to a Panel for additional options.
Definition: hdicoreFlyout.h:30
virtual bool checkEntry(const int32_t index_, const bool check_)
Sets whether the specified flyout entry is checked.
virtual Callback *const showingCallback() const
Gets the showing callback for the flyout menu.
virtual void update()
Forces the flyout menu to update its entries.
Allows combo boxes, popups, and lists to store more data than simply strings and indices.
Definition: hdicoreListEntry.h:24
Base class for templated __Callback class.
Definition: hdicoreCallback.h:67
virtual void setSelectionMadeCallback(const Callback &callback_)
Sets the flyout entry selection callback.
virtual Flyout & operator=(const Flyout &rhs_)
Overloaded assigment operator to copy one Flyout object's values to another.
virtual bool hasEntry(const std::string &id_) const
Gets whether the entries vector already contains an entry, based on its ID.
Header file for a wide variety of necessary typedefs, enums, and forwards declarations.
Flyout()
Constructs an empty Flyout menu, to which entries may be added later.
virtual ~Flyout()
Flyout destructor.
Definition: hdicoreaiArray.h:12
virtual bool removeEntry(const std::string &id_, ListEntry &entry__)
Removes a specific entry from the list of entries.
virtual Panel *const panel() const
Gets the parent panel of the flyout.
virtual void clearEntries()
Clears all entries contained by the flyout.
virtual Callback *const selectionMadeCallback() const
Gets the flyout entry selection callback.
virtual bool insertEntry(const std::string &id_, const ListEntry &entry_)
Inserts an entry into the list of entries at a given position.
virtual const std::vector< ListEntry * > *const entries() const
Gets the entries vector.
virtual bool entryChecked(const int32_t index_)
Gets whether the specified flyout entry is checked.
Used to add a panel to Illustrator's UI and contain various UI widgets.
Definition: hdicorePanel.h:31
virtual void selectionMade()
Simulates the flyout menu having one of its entries selected.
virtual std::string currentValue() const
Gets the string value of the currently selected entry.
virtual bool popEntry(ListEntry &entry__)
Pops an entry off the list (i.e. from the end)