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

Flyout menu, which can be added to a Panel for additional options. More...

#include <hdicoreFlyout.h>

Public Types

typedef std::vector< PopupEntryEntryVector
 

Public Member Functions

 Flyout ()
 Constructs an empty Flyout menu, to which entries may be added later.
 
 Flyout (const Flyout &fo_)
 Constructs a new Flyout object from an existing Flyout object (copy constructor)
 
 Flyout (const EntryVector &entries_)
 Constructs a Flyout menu with a list of entries.
 
virtual ~Flyout ()
 Flyout destructor.
 
virtual Flyoutoperator= (const Flyout &rhs_)
 Overloaded assigment operator to copy one Flyout object's values to another.
 
virtual int32_t currentIndex () const
 Gets the index of the currently selected entry.
 
virtual std::string currentID () const
 Gets the ID of the currently selected entry.
 
virtual std::string currentValue () const
 Gets the string value of the currently selected entry.
 
virtual std::unique_ptr< PopupEntrycurrentEntry () const
 Gets the current entry object.
 
virtual bool currentUserData (void *&data__) const
 Gets the user data for the current entry.
 
virtual const std::vector< std::shared_ptr< PopupEntry > > *const entries () const
 Gets the entries vector.
 
virtual void setEntries (const EntryVector &entries_)
 Allows the entries in an flyout menu to be changed out entirely.
 
virtual bool hasEntry (const std::string &id_) const
 Gets whether the entries vector already contains an entry, based on its ID.
 
virtual std::shared_ptr< PopupEntryentryWithID (const std::string &id_) const
 Gets the entry with the given ID, provided it exists within the widget.
 
virtual bool pushEntry (const PopupEntry &entry_)
 Pushes an entry onto the list (i.e. at the end)
 
virtual bool popEntry (PopupEntry &entry__)
 Pops an entry off the list (i.e. from the end)
 
virtual bool insertEntry (const std::string &id_, const PopupEntry &entry_)
 Inserts an entry into the list of entries at a given position.
 
virtual bool removeEntry (const std::string &id_, PopupEntry &entry__)
 Removes a specific entry from the list of entries.
 
virtual void clearEntries ()
 Clears all entries contained by the flyout.
 
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 Callback *const selectionMadeCallback () const
 Gets the flyout entry selection callback.
 
virtual void setSelectionMadeCallback (const Callback &callback_)
 Sets the flyout entry selection callback.
 
virtual Callback *const showingCallback () const
 Gets the showing callback for the flyout menu.
 
virtual void setShowingCallback (const Callback &callback_)
 Sets the showing callback for the flyout menu.
 
virtual bool entryChecked (const int32_t index_)
 Gets whether the specified flyout entry is checked.
 
virtual bool checkEntry (const int32_t index_, const bool check_)
 Sets whether the specified flyout entry is checked.
 
virtual bool entryChecked (const std::string &id_)
 Gets whether the specified flyout entry is checked.
 
virtual bool checkEntry (const std::string &id_, const bool check_)
 Sets whether the specified flyout entry is checked.
 
virtual void update ()
 Forces the flyout menu to update its entries.
 

Friends

class Panel
 
pui::PopupMenu * __accessImpl (const Flyout &)
 

Detailed Description

Flyout menu, which can be added to a Panel for additional options.

Constructor & Destructor Documentation

◆ Flyout() [1/3]

hdi::core::Flyout::Flyout ( )

Constructs an empty Flyout menu, to which entries may be added later.

Author
GW
Date
09/2013

◆ Flyout() [2/3]

hdi::core::Flyout::Flyout ( const Flyout fo_)

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

Author
GW
Date
09/2013
Parameters
fo_Existing Flyout object

◆ Flyout() [3/3]

hdi::core::Flyout::Flyout ( const EntryVector &  entries_)

Constructs a Flyout menu with a list of entries.

Author
GW
Date
09/2013
Parameters
entries_Vector of string entries, whose order in the flyout will match the vector

◆ ~Flyout()

virtual hdi::core::Flyout::~Flyout ( )
virtual

Flyout destructor.

Author
GW
Date
09/2013

Member Function Documentation

◆ checkEntry() [1/2]

virtual bool hdi::core::Flyout::checkEntry ( const int32_t  index_,
const bool  check_ 
)
virtual

Sets whether the specified flyout entry is checked.

Author
GW
Date
03/2014
Parameters
index_The index number of the entry in question
check_true to check the entry, false to uncheck
Returns
true if the entry's checkmark state is set, false otherwise

◆ checkEntry() [2/2]

virtual bool hdi::core::Flyout::checkEntry ( const std::string &  id_,
const bool  check_ 
)
virtual

Sets whether the specified flyout entry is checked.

Author
GW
Date
03/2014
Parameters
id_ID string of the entry in question, as UTF-8
check_true to check the entry, false to uncheck
Returns
true if the entry's checkmark state is set, false otherwise

◆ clearEntries()

virtual void hdi::core::Flyout::clearEntries ( )
virtual

Clears all entries contained by the flyout.

Author
GW
Date
09/2013

◆ currentEntry()

virtual std::unique_ptr< PopupEntry > hdi::core::Flyout::currentEntry ( ) const
virtual

Gets the current entry object.

Author
GW
Date
09/2013
Returns
The PopupEntry object for the currently selected item

◆ currentID()

virtual std::string hdi::core::Flyout::currentID ( ) const
virtual

Gets the ID of the currently selected entry.

Author
GW
Date
09/2013
Returns
UTF-8 ID string of the currently selected entry, or "" if no entry is currently selected

◆ currentIndex()

virtual int32_t hdi::core::Flyout::currentIndex ( ) const
virtual

Gets the index of the currently selected entry.

Author
GW
Date
09/2013
Returns
The index number of the currently selected entry, or -1 if no entry is selected

◆ currentUserData()

virtual bool hdi::core::Flyout::currentUserData ( void *&  data__) const
virtual

Gets the user data for the current entry.

Author
GW
Date
09/2013
Parameters
data__Return-by-reference for the current user data; ignore if false is returned
Returns
true if the method succeeds in acquiring the contained entry data, false otherwise

◆ currentValue()

virtual std::string hdi::core::Flyout::currentValue ( ) const
virtual

Gets the string value of the currently selected entry.

Author
GW
Date
09/2013
Returns
Value string of the flyout menu, as UTF-8

◆ entries()

virtual const std::vector< std::shared_ptr< PopupEntry > > *const hdi::core::Flyout::entries ( ) const
virtual

Gets the entries vector.

Author
GW
Date
09/2013
Returns
The entries vector for the target flyout, containing all currently known entries
Note
Modifying any value in an entry will not cause the menu to update automatically; call setEntries() to update changes to entry data, or call update() to update the UI for changes made to entry string values.

◆ entryChecked() [1/2]

virtual bool hdi::core::Flyout::entryChecked ( const int32_t  index_)
virtual

Gets whether the specified flyout entry is checked.

Author
GW
Date
03/2014
Parameters
index_The index number of the entry in question
Returns
true if the entry is checked, false otherwise

◆ entryChecked() [2/2]

virtual bool hdi::core::Flyout::entryChecked ( const std::string &  id_)
virtual

Gets whether the specified flyout entry is checked.

Author
GW
Date
03/2014
Parameters
id_ID string of the entry in question, as UTF-8
Returns
true if the entry is checked, false otherwise

◆ entryWithID()

virtual std::shared_ptr< PopupEntry > hdi::core::Flyout::entryWithID ( const std::string &  id_) const
virtual

Gets the entry with the given ID, provided it exists within the widget.

Author
GW
Date
02/2023
Parameters
id_ID of the entry to search for
Returns
The entry with the given ID, or NULL if not found

◆ hasEntry()

virtual bool hdi::core::Flyout::hasEntry ( const std::string &  id_) const
virtual

Gets whether the entries vector already contains an entry, based on its ID.

Author
GW
Date
09/2013
Parameters
id_ID of the entry to search for, as UTF-8
Returns
true if the menu already contains an entry with the given ID, false otherwise

◆ insertEntry()

virtual bool hdi::core::Flyout::insertEntry ( const std::string &  id_,
const PopupEntry entry_ 
)
virtual

Inserts an entry into the list of entries at a given position.

Author
GW
Date
09/2013
Parameters
id_Existing entry immediately before the position at which the new entry will be inserted, as UTF-8
entry_New entry object to insert into the list of entries
Returns
true if the entry is inserted successfully, false otherwise
Note
If the entry for id_ doesn't exist in the list, the new entry will not be inserted.
If the passed entry is already present in the list (based on its ID), it will not be inserted.

◆ operator=()

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

Overloaded assigment operator to copy one Flyout object's values to another.

Author
GW
Date
12/2014
Parameters
rhs_Righthand side of the assignment operator
Returns
The lefthand side of the assignment operator, but with values updated to match that of the rhs_ parameter

◆ panel()

virtual Panel *const hdi::core::Flyout::panel ( ) const
virtual

Gets the parent panel of the flyout.

Author
GW
Date
09/2013
Returns
Parent panel object pointer (NULL if the flyout hasn't been added to one yet)

◆ popEntry()

virtual bool hdi::core::Flyout::popEntry ( PopupEntry entry__)
virtual

Pops an entry off the list (i.e. from the end)

Author
GW
Date
09/2013
Parameters
entry__Return-by-reference for the popped entry, so the caller can inspect which one was removed
Returns
true if an entry was popped and acquired, false otherwise

◆ pushEntry()

virtual bool hdi::core::Flyout::pushEntry ( const PopupEntry entry_)
virtual

Pushes an entry onto the list (i.e. at the end)

Author
GW
Date
09/2013
Parameters
entry_New entry object to insert into the list of entries
Returns
true if the entry is pushed successfully, false otherwise
Note
If the entry is already present in the list (based on its ID), it will not be inserted.

◆ removeEntry()

virtual bool hdi::core::Flyout::removeEntry ( const std::string &  id_,
PopupEntry entry__ 
)
virtual

Removes a specific entry from the list of entries.

Author
GW
Date
09/2013
Parameters
id_ID of the entry to be removed, as UTF-8
entry__Return-by-reference for the removed entry, so the caller can inspect which one was removed
Returns
true if an entry was removed and acquired, false otherwise

◆ selectionMade()

virtual void hdi::core::Flyout::selectionMade ( )
virtual

Simulates the flyout menu having one of its entries selected.

Author
GW
Date
09/2013
Note
When the callback (registered with the setSelectionMadeCallback() method) is called, you can determine what entry was selected by using any of the current*() methods (e.g. currentID(), currentEntry(), etc.)

◆ selectionMadeCallback()

virtual Callback *const hdi::core::Flyout::selectionMadeCallback ( ) const
virtual

Gets the flyout entry selection callback.

Author
GW
Date
09/2013
Returns
A pointer to the currently registered selection callback

◆ setEntries()

virtual void hdi::core::Flyout::setEntries ( const EntryVector &  entries_)
virtual

Allows the entries in an flyout menu to be changed out entirely.

Author
GW
Date
09/2013
Parameters
entries_New set of entries that the menu will contain

◆ setSelectionMadeCallback()

virtual void hdi::core::Flyout::setSelectionMadeCallback ( const Callback callback_)
virtual

Sets the flyout entry selection callback.

Author
GW
Date
09/2013
Parameters
callback_New callback for when a flyout menu entry is selected

◆ setShowingCallback()

virtual void hdi::core::Flyout::setShowingCallback ( const Callback callback_)
virtual

Sets the showing callback for the flyout menu.

Author
GW
Date
04/2015
Parameters
callback_New callback for when a the flyout is about to be shown
Precondition
The flyout must already be set on its associated panel for this method to function.

◆ showingCallback()

virtual Callback *const hdi::core::Flyout::showingCallback ( ) const
virtual

Gets the showing callback for the flyout menu.

Author
GW
Date
04/2015
Returns
A pointer to the currently registered flyout-about-to-show callback

◆ update()

virtual void hdi::core::Flyout::update ( )
virtual

Forces the flyout menu to update its entries.

Author
GW
Date
04/2015
Precondition
The flyout must already be set on its associated panel for this method to function.