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

Used to create and display a floating dialog to the user, which is similar to a modal dialog but non-blocking. More...

#include <hdicoreFloatingDialog.h>

Inheritance diagram for hdi::core::FloatingDialog:
Inheritance graph
[legend]
Collaboration diagram for hdi::core::FloatingDialog:
Collaboration graph
[legend]

Public Member Functions

 FloatingDialog ()
 Constructs an empty FloatingDialog object.
 
 FloatingDialog (const FloatingDialog &fd_)
 Constructs a new FloatingDialog object from an existing FloatingDialog object (copy constructor)
 
 FloatingDialog (const std::string &name_, const Size &size_)
 Constructs a FloatingDialog object with a given name and size.
 
virtual ~FloatingDialog ()
 Destructs a FloatingDialog object.
 
virtual FloatingDialogoperator= (const FloatingDialog &rhs_)
 Allows one FloatingDialog object to be assigned from another.
 
virtual FloatingDialogclone () const
 Convenience method to clone a FloatingDialog object on the heap.
 
virtual void destroy ()
 Destroys the UI floating dialog, converting the target object to an empty FloatingDialog object (see the default constructor for more info on empty FloatingDialog objects)
 
virtual PlatformFloatingDialogPtr platformFloatingDialog () const
 Gets the platform-specific floating dialog, around which the target object is wrapped.
 
virtual bool visible () const
 Gets whether the dialog is visible.
 
virtual void show ()
 Shows the floating dialog.
 
virtual void hide ()
 Hides the floating dialog.
 
virtual bool addWidget (const Widget &widget_)
 Adds a widget (label, button, text field, etc.) to the floating dialog.
 
virtual bool removeWidget (const Widget &widget_)
 Removes a widget (label, button, text field, etc.) from the floating dialog.
 
virtual std::string title () const
 Gets the current floating dialog title.
 
virtual void setTitle (const std::string &title_)
 Sets the current floating dialog title.
 
virtual Size size () const
 Gets the floating dialog's size.
 
virtual void setSize (const Size &size_)
 Sets the floating dialog's size.
 
virtual void update () const
 Forces the widgets in the floating dialog to update/redraw.
 
virtual Callback *const closeCallback () const
 Gets the current close button callback.
 
virtual void setCloseCallback (const Callback &cb_)
 Sets the close button callback for the dialog.
 
virtual Callback *const focusCallback () const
 Gets the current dialog focus callback.
 
void setFocusCallback (const Callback &cb_)
 Sets the dialog focus callback.
 
virtual Callback *const blurCallback () const
 Gets the current dialog blur callback.
 
void setBlurCallback (const Callback &cb_)
 Sets the dialog blur callback.
 
- Public Member Functions inherited from hdi::core::Window
virtual ~Window ()
 Destructs a Window object.
 
virtual Windowclone () 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

- Public Types inherited from hdi::core::Window
typedef std::vector< std::shared_ptr< Widget > > WidgetVector
 
- 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 Windowoperator= (const Window &)
 Internal use only.
 
- Protected Attributes inherited from hdi::core::Window
void * _data
 Private implementation data.
 

Detailed Description

Used to create and display a floating dialog to the user, which is similar to a modal dialog but non-blocking.

Constructor & Destructor Documentation

◆ FloatingDialog() [1/3]

hdi::core::FloatingDialog::FloatingDialog ( )

Constructs an empty FloatingDialog object.

Author
GW
Date
07/2014
Note
To test if a FloatingDialog object is empty, call isEmpty() on it
Empty FloatingDialog objects do not relate to any actual UI dialog; they are designed to be "receivers" of some other FloatingDialog object via the overloaded assignment operator. Empty FloatingDialog objects are useless until such time (though it is safe to call any of their methods).

◆ FloatingDialog() [2/3]

hdi::core::FloatingDialog::FloatingDialog ( const FloatingDialog fd_)

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

Author
GW
Date
07/2014
Parameters
fd_Existing FloatingDialog object

◆ FloatingDialog() [3/3]

hdi::core::FloatingDialog::FloatingDialog ( const std::string &  name_,
const Size size_ 
)

Constructs a FloatingDialog object with a given name and size.

Author
GW
Date
07/2014
Parameters
name_Name (title) of the dialog, as UTF-8
size_Width and height, in 1x resolution coordinates
Note
All floating dialogs are presented in the center of the screen.

◆ ~FloatingDialog()

virtual hdi::core::FloatingDialog::~FloatingDialog ( )
virtual

Destructs a FloatingDialog object.

Author
GW
Date
07/2014

Member Function Documentation

◆ addWidget()

virtual bool hdi::core::FloatingDialog::addWidget ( const Widget widget_)
virtual

Adds a widget (label, button, text field, etc.) to the floating dialog.

Author
GW
Date
07/2014
Parameters
widget_Widget to place in the dialog
Returns
true if the widget was added, false otherwise

Reimplemented from hdi::core::Window.

◆ blurCallback()

virtual Callback *const hdi::core::FloatingDialog::blurCallback ( ) const
virtual

Gets the current dialog blur callback.

Author
GW
Date
07/2014
Returns
A pointer to the currently registered blur callback, or NULL for none

◆ clone()

virtual FloatingDialog * hdi::core::FloatingDialog::clone ( ) const
virtual

Convenience method to clone a FloatingDialog object on the heap.

Author
GW
Date
07/2014
Returns
A pointer to the new FloatingDialog object
Note
If you subclass FloatingDialog, you MUST overload this method yourself! If you don't and/or your clone() method does not return an instance of your FloatingDialog subclass, you will experience "object slicing" when e.g. adding the modal dialog to a window collection.
Warning
The caller must manage the memory for the returned FloatingDialog object.

Implements hdi::core::Window.

◆ closeCallback()

virtual Callback *const hdi::core::FloatingDialog::closeCallback ( ) const
virtual

Gets the current close button callback.

Author
GW
Date
07/2014
Returns
A pointer to the currently registered close button callback, or NULL for none

◆ destroy()

virtual void hdi::core::FloatingDialog::destroy ( )
virtual

Destroys the UI floating dialog, converting the target object to an empty FloatingDialog object (see the default constructor for more info on empty FloatingDialog objects)

Author
GW
Date
07/2014
Note
This method must be called for any existing floating dialogs by the time the plugin is shutting down. If you no longer retain any of your own references to a floating dialog then the lib will call this method for you as it is shutting down.

◆ focusCallback()

virtual Callback *const hdi::core::FloatingDialog::focusCallback ( ) const
virtual

Gets the current dialog focus callback.

Author
GW
Date
07/2014
Returns
A pointer to the currently registered focus callback, or NULL for none

◆ hide()

virtual void hdi::core::FloatingDialog::hide ( )
virtual

Hides the floating dialog.

Author
GW
Date
07/2014

◆ operator=()

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

Allows one FloatingDialog object to be assigned from another.

Author
GW
Date
07/2014
Parameters
rhs_Righthand side of the = operator; the object to copy values from
Returns
The target FloatingDialog object, but with its value updated to match that of rhs_

◆ platformFloatingDialog()

virtual PlatformFloatingDialogPtr hdi::core::FloatingDialog::platformFloatingDialog ( ) const
virtual

Gets the platform-specific floating dialog, around which the target object is wrapped.

Author
GW
Date
07/2014
Returns
Pointer to platform-specific floating dialog. See PlatformFloatingDialogPtr typedef.
Note
Generally, you shouldn't need to call this method. Only use it if you know what you're doing. If a specific piece of UI functionality is not handled by this class (or related classes), then it should probably be added to the hdi_core library.

◆ removeWidget()

virtual bool hdi::core::FloatingDialog::removeWidget ( const Widget widget_)
virtual

Removes a widget (label, button, text field, etc.) from the floating dialog.

Author
GW
Date
07/2014
Parameters
widget_Widget to remove from the dialog
Returns
true if the widget was removed, false otherwise

Reimplemented from hdi::core::Window.

◆ setBlurCallback()

void hdi::core::FloatingDialog::setBlurCallback ( const Callback cb_)

Sets the dialog blur callback.

Author
GW
Date
07/2014
Parameters
cb_New callback (target and action) for when the dialog becomes blurred

◆ setCloseCallback()

virtual void hdi::core::FloatingDialog::setCloseCallback ( const Callback cb_)
virtual

Sets the close button callback for the dialog.

Author
GW
Date
07/2014
Parameters
cb_New callback (target and action) for when the close button is clicked

◆ setFocusCallback()

void hdi::core::FloatingDialog::setFocusCallback ( const Callback cb_)

Sets the dialog focus callback.

Author
GW
Date
07/2014
Parameters
cb_New callback (target and action) for when the dialog becomes focused

◆ setSize()

virtual void hdi::core::FloatingDialog::setSize ( const Size size_)
virtual

Sets the floating dialog's size.

Author
GW
Date
07/2014
Parameters
size_New dialog size, in 1x resolution coordinates

◆ setTitle()

virtual void hdi::core::FloatingDialog::setTitle ( const std::string &  title_)
virtual

Sets the current floating dialog title.

Author
GW
Date
07/2014
Parameters
title_New string value for the floating dialog title, as UTF-8

◆ show()

virtual void hdi::core::FloatingDialog::show ( )
virtual

Shows the floating dialog.

Author
GW
Date
07/2014

Implements hdi::core::Window.

◆ size()

virtual Size hdi::core::FloatingDialog::size ( ) const
virtual

Gets the floating dialog's size.

Author
GW
Date
07/2014
Returns
A Size object representing the dialog's dimensions, in 1x resolution coordinates

◆ title()

virtual std::string hdi::core::FloatingDialog::title ( ) const
virtual

Gets the current floating dialog title.

Author
GW
Date
07/2014
Returns
String value for the floating dialog title, as UTF-8

◆ update()

virtual void hdi::core::FloatingDialog::update ( ) const
virtual

Forces the widgets in the floating dialog to update/redraw.

Author
GW
Date
07/2014

Implements hdi::core::Window.

◆ visible()

virtual bool hdi::core::FloatingDialog::visible ( ) const
virtual

Gets whether the dialog is visible.

Author
GW
Date
07/2014
Returns
true if the dialog is visible, false otherwise

Implements hdi::core::Window.