GUI: DialogEx view module API. More...
#include <gui/view.h>Go to the source code of this file.
Typedefs | |
| typedef struct DialogEx | DialogEx |
| Dialog anonymous structure. | |
| typedef void(* | DialogExResultCallback) (DialogExResult result, void *context) |
| DialogEx result callback type. | |
Enumerations | |
| enum | DialogExResult { DialogExResultLeft , DialogExResultCenter , DialogExResultRight , DialogExPressLeft , DialogExPressCenter , DialogExPressRight , DialogExReleaseLeft , DialogExReleaseCenter , DialogExReleaseRight } |
| DialogEx result. | |
Functions | |
| DialogEx * | dialog_ex_alloc (void) |
| Allocate and initialize dialog. | |
| void | dialog_ex_free (DialogEx *dialog_ex) |
| Deinitialize and free dialog. | |
| View * | dialog_ex_get_view (DialogEx *dialog_ex) |
| Get dialog view. | |
| void | dialog_ex_set_result_callback (DialogEx *dialog_ex, DialogExResultCallback callback) |
| Set dialog result callback. | |
| void | dialog_ex_set_context (DialogEx *dialog_ex, void *context) |
| Set dialog context. | |
| void | dialog_ex_set_header (DialogEx *dialog_ex, const char *text, uint8_t x, uint8_t y, Align horizontal, Align vertical) |
| Set dialog header text. | |
| void | dialog_ex_set_text (DialogEx *dialog_ex, const char *text, uint8_t x, uint8_t y, Align horizontal, Align vertical) |
| Set dialog text. | |
| void | dialog_ex_set_icon (DialogEx *dialog_ex, uint8_t x, uint8_t y, const Icon *icon) |
| Set dialog icon. | |
| void | dialog_ex_set_left_button_text (DialogEx *dialog_ex, const char *text) |
| Set left button text. | |
| void | dialog_ex_set_center_button_text (DialogEx *dialog_ex, const char *text) |
| Set center button text. | |
| void | dialog_ex_set_right_button_text (DialogEx *dialog_ex, const char *text) |
| Set right button text. | |
| void | dialog_ex_reset (DialogEx *dialog_ex) |
| Clean dialog. | |
| void | dialog_ex_enable_extended_events (DialogEx *dialog_ex) |
| Enable press/release events. | |
| void | dialog_ex_disable_extended_events (DialogEx *dialog_ex) |
| Disable press/release events. | |
GUI: DialogEx view module API.
| typedef void(* DialogExResultCallback) (DialogExResult result, void *context) |
DialogEx result callback type.
| DialogEx * dialog_ex_alloc | ( | void | ) |
Allocate and initialize dialog.
This dialog used to ask simple questions
| void dialog_ex_disable_extended_events | ( | DialogEx * | dialog_ex | ) |
Disable press/release events.
| dialog_ex | DialogEx instance |
| void dialog_ex_enable_extended_events | ( | DialogEx * | dialog_ex | ) |
Enable press/release events.
| dialog_ex | DialogEx instance |
| void dialog_ex_free | ( | DialogEx * | dialog_ex | ) |
Deinitialize and free dialog.
| dialog_ex | DialogEx instance |
Get dialog view.
| dialog_ex | DialogEx instance |
| void dialog_ex_reset | ( | DialogEx * | dialog_ex | ) |
Clean dialog.
| dialog_ex | DialogEx instance |
| void dialog_ex_set_center_button_text | ( | DialogEx * | dialog_ex, |
| const char * | text ) |
Set center button text.
If text is null, center button will not be rendered and processed
| dialog_ex | DialogEx instance |
| text | text to be shown |
| void dialog_ex_set_context | ( | DialogEx * | dialog_ex, |
| void * | context ) |
Set dialog context.
| dialog_ex | DialogEx instance |
| context | context pointer, will be passed to result callback |
| void dialog_ex_set_header | ( | DialogEx * | dialog_ex, |
| const char * | text, | ||
| uint8_t | x, | ||
| uint8_t | y, | ||
| Align | horizontal, | ||
| Align | vertical ) |
Set dialog header text.
If text is null, dialog header will not be rendered
| dialog_ex | DialogEx instance |
| text | text to be shown, can be multiline |
| x | x position |
| y | y position |
| horizontal | horizontal text alignment |
| vertical | vertical text alignment |
Set dialog icon.
If x or y is negative, dialog icon will not be rendered
| dialog_ex | DialogEx instance |
| x | x position |
| y | y position |
| icon | The icon |
| void dialog_ex_set_left_button_text | ( | DialogEx * | dialog_ex, |
| const char * | text ) |
Set left button text.
If text is null, left button will not be rendered and processed
| dialog_ex | DialogEx instance |
| text | text to be shown |
| void dialog_ex_set_result_callback | ( | DialogEx * | dialog_ex, |
| DialogExResultCallback | callback ) |
Set dialog result callback.
| dialog_ex | DialogEx instance |
| callback | result callback function |
| void dialog_ex_set_right_button_text | ( | DialogEx * | dialog_ex, |
| const char * | text ) |
Set right button text.
If text is null, right button will not be rendered and processed
| dialog_ex | DialogEx instance |
| text | text to be shown |
| void dialog_ex_set_text | ( | DialogEx * | dialog_ex, |
| const char * | text, | ||
| uint8_t | x, | ||
| uint8_t | y, | ||
| Align | horizontal, | ||
| Align | vertical ) |
Set dialog text.
If text is null, dialog text will not be rendered
| dialog_ex | DialogEx instance |
| text | text to be shown, can be multiline |
| x | x position |
| y | y position |
| horizontal | horizontal text alignment |
| vertical | vertical text alignment |