Flipper Zero Firmware
Loading...
Searching...
No Matches
dialog_ex.h File Reference

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

DialogExdialog_ex_alloc (void)
 Allocate and initialize dialog.
 
void dialog_ex_free (DialogEx *dialog_ex)
 Deinitialize and free dialog.
 
Viewdialog_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.
 

Detailed Description

GUI: DialogEx view module API.

Typedef Documentation

◆ DialogExResultCallback

typedef void(* DialogExResultCallback) (DialogExResult result, void *context)

DialogEx result callback type.

Warning
comes from GUI thread

Function Documentation

◆ dialog_ex_alloc()

DialogEx * dialog_ex_alloc ( void )

Allocate and initialize dialog.

This dialog used to ask simple questions

Returns
DialogEx instance

◆ dialog_ex_disable_extended_events()

void dialog_ex_disable_extended_events ( DialogEx * dialog_ex)

Disable press/release events.

Parameters
dialog_exDialogEx instance

◆ dialog_ex_enable_extended_events()

void dialog_ex_enable_extended_events ( DialogEx * dialog_ex)

Enable press/release events.

Parameters
dialog_exDialogEx instance

◆ dialog_ex_free()

void dialog_ex_free ( DialogEx * dialog_ex)

Deinitialize and free dialog.

Parameters
dialog_exDialogEx instance

◆ dialog_ex_get_view()

View * dialog_ex_get_view ( DialogEx * dialog_ex)

Get dialog view.

Parameters
dialog_exDialogEx instance
Returns
View instance that can be used for embedding

◆ dialog_ex_reset()

void dialog_ex_reset ( DialogEx * dialog_ex)

Clean dialog.

Parameters
dialog_exDialogEx instance

◆ dialog_ex_set_center_button_text()

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

Parameters
dialog_exDialogEx instance
texttext to be shown

◆ dialog_ex_set_context()

void dialog_ex_set_context ( DialogEx * dialog_ex,
void * context )

Set dialog context.

Parameters
dialog_exDialogEx instance
contextcontext pointer, will be passed to result callback

◆ dialog_ex_set_header()

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

Parameters
dialog_exDialogEx instance
texttext to be shown, can be multiline
xx position
yy position
horizontalhorizontal text alignment
verticalvertical text alignment

◆ dialog_ex_set_icon()

void dialog_ex_set_icon ( DialogEx * dialog_ex,
uint8_t x,
uint8_t y,
const Icon * icon )

Set dialog icon.

If x or y is negative, dialog icon will not be rendered

Parameters
dialog_exDialogEx instance
xx position
yy position
iconThe icon

◆ dialog_ex_set_left_button_text()

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

Parameters
dialog_exDialogEx instance
texttext to be shown

◆ dialog_ex_set_result_callback()

void dialog_ex_set_result_callback ( DialogEx * dialog_ex,
DialogExResultCallback callback )

Set dialog result callback.

Parameters
dialog_exDialogEx instance
callbackresult callback function

◆ dialog_ex_set_right_button_text()

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

Parameters
dialog_exDialogEx instance
texttext to be shown

◆ dialog_ex_set_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.

If text is null, dialog text will not be rendered

Parameters
dialog_exDialogEx instance
texttext to be shown, can be multiline
xx position
yy position
horizontalhorizontal text alignment
verticalvertical text alignment