Hot Door CORE 0.8.2
Adobe® Illustrator® Plug-in Library
|
Used to create and display a modal dialog to the user, blocking input to other UI elements. More...
#include <hdicoreModalDialog.h>
Classes | |
class | ButtonOptions |
Controls button options for the ModalDialog constructor. More... | |
Public Types | |
enum | ChosenButton { UnknownButtonChosen = 0 , OKButtonChosen = 1 , CancelButtonChosen = 2 } |
Identifies which button was clicked. | |
Public Types inherited from hdi::core::Window | |
typedef std::vector< std::shared_ptr< Widget > > | WidgetVector |
Public Member Functions | |
ModalDialog () | |
Constructs an empty ModalDialog object. | |
ModalDialog (const ModalDialog &md_) | |
Constructs a new ModalDialog object from an existing ModalDialog object (copy constructor) | |
ModalDialog (const std::string &name_, const Size &size_) | |
Constructs a ModalDialog object with a given name and size. | |
ModalDialog (const std::string &name_, const Size &size_, const ButtonOptions &okBtnOpts_, const ButtonOptions &cancelBtnOpts_) | |
Constructs a ModalDialog object with a given name, size, and buttons. | |
virtual | ~ModalDialog () |
Destructs a ModalDialog object. | |
virtual ModalDialog & | operator= (const ModalDialog &rhs_) |
Allows one ModalDialog object to be assigned from another. | |
virtual ModalDialog * | clone () const |
Convenience method to clone a ModalDialog object on the heap. | |
virtual void | destroy () |
Destroys the UI modal dialog, converting the target object to an empty ModalDialog object (see the default constructor for more info on empty ModalDialog objects) | |
virtual PlatformModalDialogPtr | platformModalDialog () const |
Gets the platform-specific modal dialog, around which the target object is wrapped. | |
virtual bool | visible () const |
Gets whether the dialog is visible. | |
virtual void | show () |
Shows the modal dialog, blocking user input. | |
virtual void | dismiss () |
Forcefully dismisses a modal dialog. | |
virtual bool | addWidget (const Widget &widget_) |
Adds a widget (label, button, text field, etc.) to the modal dialog. | |
virtual bool | removeWidget (const Widget &widget_) |
Removes a widget (label, button, text field, etc.) from the modal dialog. | |
virtual ChosenButton | chosenButton () const |
Gets which button was used to dismiss the dialog. | |
std::unique_ptr< Button > | okButton () const |
Gets the OK button created by the constructor (if the options indicated creation) | |
std::unique_ptr< Button > | cancelButton () const |
Gets the cancel button created by the constructor (if the options indicated creation) | |
virtual std::string | title () const |
Gets the current modal dialog title. | |
virtual void | setTitle (const std::string &title_) |
Sets the current modal dialog title. | |
virtual Size | size () const |
Gets the modal dialog's size. | |
virtual void | setSize (const Size &size_) |
Sets the modal dialog's size. | |
virtual void | update () const |
Forces the widgets in the modal dialog to update/redraw. | |
Public Member Functions inherited from hdi::core::Window | |
virtual | ~Window () |
Destructs a Window object. | |
virtual Window * | clone () const =0 |
Convenience method to clone a Window object, taking its subclass type into account for proper memory management. | |
virtual bool | isEmpty () const |
Gets whether the target Window object is empty (constructed with the default ctor) | |
virtual WindowType | windowType () |
Gets the type of window. | |
virtual bool | operator== (const Window &rhs_) const |
Tests whether a given Window object is the same as another. | |
virtual bool | operator!= (const Window &rhs_) const |
Tests whether a given Window object is not the same as another. | |
virtual bool | visible () const =0 |
Gets whether the window is visible. | |
virtual void | show ()=0 |
Shows the window. | |
virtual const WidgetVector | widgets () const |
Gets a list of all widgets contained by the target window. | |
virtual bool | addWidget (const Widget &widget_) |
Adds a widget (label, button, text field, etc.) to the window. | |
virtual bool | removeWidget (const Widget &widget_) |
Removes a widget (label, button, text field, etc.) from the window. | |
virtual bool | addWidgetGroup (const WidgetGroup &wg_) |
Adds a widget group to the window. | |
virtual bool | removeWidgetGroup (const WidgetGroup &wg_) |
Removes a widget group from the window. | |
virtual TabOrder *const | tabOrder () const |
Gets the tab order object for the window. | |
virtual void | update () const =0 |
Forces the widgets in the modal dialog to update/redraw. | |
virtual double | scalingFactor () const |
Gets the factor by which the UI is scaled for the given window (i.e. for HiDPI support) | |
Additional Inherited Members | |
Protected Member Functions inherited from hdi::core::Window | |
Window () | |
Constructs an empty Window object. | |
Window (const Window &w_) | |
Constructs a new Window object from an existing Window object (copy constructor) | |
Window (const WindowType type_) | |
Constructs a Window object. | |
virtual Window & | operator= (const Window &) |
Internal use only. | |
Protected Attributes inherited from hdi::core::Window | |
void * | _data |
Private implementation data. | |
Used to create and display a modal dialog to the user, blocking input to other UI elements.
hdi::core::ModalDialog::ModalDialog | ( | ) |
Constructs an empty ModalDialog object.
hdi::core::ModalDialog::ModalDialog | ( | const ModalDialog & | md_ | ) |
Constructs a new ModalDialog object from an existing ModalDialog object (copy constructor)
md_ | Existing ModalDialog object |
hdi::core::ModalDialog::ModalDialog | ( | const std::string & | name_, |
const Size & | size_ | ||
) |
Constructs a ModalDialog object with a given name and size.
name_ | Name (title) of the dialog, as UTF-8 |
size_ | Width and height, in 1x resolution coordinates |
hdi::core::ModalDialog::ModalDialog | ( | const std::string & | name_, |
const Size & | size_, | ||
const ButtonOptions & | okBtnOpts_, | ||
const ButtonOptions & | cancelBtnOpts_ | ||
) |
Constructs a ModalDialog object with a given name, size, and buttons.
name_ | Name (title) of the dialog, as UTF-8 |
size_ | Width and height, in 1x resolution coordinates |
okBtnOpts_ | Whether to show the OK button, what its title is, and what its callback should be |
cancelBtnOpts_ | Whether to show the cancel button, what its title is, and what its callback should be |
|
virtual |
Destructs a ModalDialog object.
|
virtual |
Adds a widget (label, button, text field, etc.) to the modal dialog.
widget_ | Widget to place in the dialog |
Reimplemented from hdi::core::Window.
std::unique_ptr< Button > hdi::core::ModalDialog::cancelButton | ( | ) | const |
Gets the cancel button created by the constructor (if the options indicated creation)
|
virtual |
Gets which button was used to dismiss the dialog.
|
virtual |
Convenience method to clone a ModalDialog object on the heap.
Implements hdi::core::Window.
|
virtual |
Destroys the UI modal dialog, converting the target object to an empty ModalDialog object (see the default constructor for more info on empty ModalDialog objects)
|
virtual |
Forcefully dismisses a modal dialog.
std::unique_ptr< Button > hdi::core::ModalDialog::okButton | ( | ) | const |
Gets the OK button created by the constructor (if the options indicated creation)
|
virtual |
Allows one ModalDialog object to be assigned from another.
rhs_ | Righthand side of the = operator; the object to copy values from |
|
virtual |
Gets the platform-specific modal dialog, around which the target object is wrapped.
|
virtual |
Removes a widget (label, button, text field, etc.) from the modal dialog.
widget_ | Widget to remove from the dialog |
Reimplemented from hdi::core::Window.
|
virtual |
Sets the modal dialog's size.
size_ | New dialog size, in 1x resolution coordinates |
|
virtual |
Sets the current modal dialog title.
title_ | New string value for the modal dialog title, as UTF-8 |
|
virtual |
|
virtual |
Gets the modal dialog's size.
|
virtual |
Gets the current modal dialog title.
|
virtual |
|
virtual |
Gets whether the dialog is visible.
Implements hdi::core::Window.