Confirmation Dialog Module


Buttons

Confirmation dialog box buttons

#define DIALOG_CONFIRM_YES   0x01
 'YES' button
#define DIALOG_CONFIRM_NO   0x02
 'NO' button
#define DIALOG_CONFIRM_CANCEL   0x04
 'CANCEL' button

Enumerations

enum  dialog_confirm_mode_e { DIALOG_CONFIRM_FULL_SCREEN }
 Style of confirmation dialog box. More...

Functions

lcdgraph_result_e DIALOG_CONFIRM_Init (dialog_confirm_mode_e mode, unsigned char buttons, unsigned char options, const rom_type char *user_string)
 Draws confirmation dialog box.
unsigned char DIALOG_CONFIRM_RegisterEvent (lcdgraph_dialog_event_e event)
 Register event.

Detailed Description

This is a simple, predefined confirmation dialog with limited number of buttons and functionality. Language of the buttons labels is defined by compilation flag. Currently either LANG_EN or LANG_PL could be defined. Otherwise, compilation error will occur.

Enumeration Type Documentation

enum dialog_confirm_mode_e

Style of confirmation dialog box.

Enumerator:
DIALOG_CONFIRM_FULL_SCREEN  full screen dialog box


Function Documentation

lcdgraph_result_e DIALOG_CONFIRM_Init ( dialog_confirm_mode_e  mode,
unsigned char  buttons,
unsigned char  options,
const rom_type char *  user_string 
)

Draws confirmation dialog box.

Author:
Mariusz Murawski
Draws prepared confirmation dialog box. It uses fixed font and fixed layout. The buttons will be drawn in following order: YES, NO, CANCEL...

Parameters:
mode Style of the confirmation dialog
buttons Logical sum of buttons to be displayed
options Logical sum of options
user_string Pointer to a string to be displyed as a title of the dialog (rom string)
Return values:
LCDGRAPH_OK if all is ok
LCDGRAPH_PARAM_FAIL if title is NULL
Note:
Currently only FULL_SCREEN mode is implemented

unsigned char DIALOG_CONFIRM_RegisterEvent ( lcdgraph_dialog_event_e  event  ) 

Register event.

Author:
Mariusz Murawski
Register event such as key pressed. Function performs action right for a key

Parameters:
event type of event to handle
Return values:
Returns current button (if DIALOG_KEY_ENTER or ESC was pressed)
Todo:
Support for other keys. Now only NEXT, PREV, ENTER and ESC are supported

SourceForge.net Logo