Class · aurore

aurore::Dialog

On this page
aurore/views/dialog.hpp
#include <aurore/views/dialog.hpp>

class aurore::Dialog : public aurore::Box

Constructors 3

Dialog(std::string text)
Dialog(Box *contentView)
~Dialog()

Functions 12

virtual AppletFrame * getAppletFrame() override

The AppletFrame the view is in, or nullptr.

Overrides aurore::View::getAppletFrame

dialog.hpp:78
void addButton(std::string label, VoidEvent::Callback cb)

Adds a button to this dialog, with a maximum of three The position depends on the add order

Adding a button after the dialog has been opened is NOT SUPPORTED

dialog.hpp:87
void setCancelable(bool cancelable)

A cancelable dialog is closed when the user presses B (defaults to true)

A dialog without any buttons cannot be cancelable

dialog.hpp:96
void setCloseCallback(std::function< void(void)> cb)
void setText(const std::string &text)

The text of a dialog made with Dialog(text), changed while it is open (a progress, a countdown). Nothing for a dialog with its own view.

dialog.hpp:103
std::string getText()
void setButtonText(size_t index, const std::string &label)

Relabels the button at index (0 to 2, in the order they were added).

dialog.hpp:109
void setDismissOnButtonClick(bool dismiss)

When false, a button runs its callback and leaves the dialog open (it closes it with close() when it is done): a dialog that shows progress, a button that retries. True by default.

dialog.hpp:116
bool isCancelable() const
virtual void open()
void close(std::function< void(void)> cb = [] {})
virtual bool isTranslucent() override

Is this view translucent?

If you override it please return

|| View::isTranslucent() to keep the fadeIn transition

Overrides aurore::View::isTranslucent

dialog.hpp:126

Also the functions of aurore::Box (53), aurore::View (221).

Protected functions 7

AURORE_BIND(Button, button1, "aurore/dialog/button1")
AURORE_BIND(Button, button2, "aurore/dialog/button2")
AURORE_BIND(Button, button3, "aurore/dialog/button3")
AURORE_BIND(Rectangle,button2separator,"aurore/dialog/button2/separator")
AURORE_BIND(Rectangle,button3separator,"aurore/dialog/button3/separator")
virtual AccessibilityRole getDefaultAccessibilityRole() override

The view's own role and label when the app gave none.

Overrides aurore::View::getDefaultAccessibilityRole

dialog.hpp:70
virtual std::string getDefaultAccessibilityLabel() override

A focusable box says the texts shown in it (getAccessibilityText).

Overrides aurore::Box::getDefaultAccessibilityLabel

dialog.hpp:71

Read from Aurore's headers by Doxygen at each build · library/include