Class for a message dialog with optional Ok and Cancel buttons.
More...
#include <MessageDialog.h>
|
| MessageDialog (uint16_t locX, uint16_t locY, uint16_t width, uint16_t height, const char *message, MessageSeverity_t severity, MessageButtons_t buttons=MSG_BTN_OK, void *controlContext=NULL, void(*onOkClick)(void *controlContext)=NULL, void(*onCancelClick)(void *controlContext)=NULL, uint16_t maxMsgLength=DEFAULT_MAX_MSG_STRING_LENGTH) |
| Constructor of the MessageDialog.
|
|
virtual void | Draw (bool redraw) override |
| Method used for drawing of the MessageDialog.
|
|
virtual bool | KeyInput (Keys_t key) override |
| Process the given key.
|
|
virtual bool | TouchInput (uint16_t x, uint16_t y, TouchTypes touchType) override |
| Process a touch input at the given point (x, y)
|
|
virtual void | RecalculateDimensions () override |
| Recalculate the Height and Width of the UIElement.
|
|
virtual void | RecalculateLayout () override |
| Recalculate the UIElement layout (containers update the X- and Y-Location of all their items, all other items can do other layout update stuff)
|
|
| UIElement (UIElementType type) |
| Constructor of the UIElement.
|
|
| UIElement (uint16_t locX, uint16_t locY, UIElementType type) |
| Constructor of the UIElement.
|
|
bool | HitTest (uint16_t x, uint16_t y) |
| Check if the given point (x, y) is inside this UIElement.
|
|
Class for a message dialog with optional Ok and Cancel buttons.
◆ MessageDialog()
MessageDialog::MessageDialog |
( |
uint16_t | locX, |
|
|
uint16_t | locY, |
|
|
uint16_t | width, |
|
|
uint16_t | height, |
|
|
const char * | message, |
|
|
MessageSeverity_t | severity, |
|
|
MessageButtons_t | buttons = MSG_BTN_OK, |
|
|
void * | controlContext = NULL, |
|
|
void(* | onOkClick )(void *controlContext) = NULL, |
|
|
void(* | onCancelClick )(void *controlContext) = NULL, |
|
|
uint16_t | maxMsgLength = DEFAULT_MAX_MSG_STRING_LENGTH ) |
Constructor of the MessageDialog.
- Parameters
-
locX | X Location of the upper left corner of the MessageDialog |
locY | Y Location of the upper left corner of the MessageDialog |
width | Drawing width of the MessageDialog |
height | Drawing height of the MessageDialog |
message | Message string that is shown by this message dialog |
severity | Message severity |
buttons | Optional dialog buttons (None, Ok, Ok & Cancel) |
controlContext | Context pointer that is returned with the onOkClick and onCancelClick function pointers |
onOkClick | Function pointer for onOkClick event. This function is called when the Ok button is clicked. |
onCancelClick | Function pointer for onCancelClick event. This function is called when the Cancel button is clicked. |
maxMsgLength | Maximum length for the internally used string buffer of the Label of the MessageDialog. This is the maximum length that the message can be. |
◆ Draw()
void MessageDialog::Draw |
( |
bool | redraw | ) |
|
|
overridevirtual |
◆ KeyInput()
bool MessageDialog::KeyInput |
( |
Keys_t | key | ) |
|
|
overridevirtual |
Process the given key.
If this element doesn't support the key type, the key is forwarded to the parent. This is done until the key is processed or the root of the visual tree is reached.
- Parameters
-
key | Key that should be processed. Supported keys are: KEYOK, KEYUP, KEYDOWN |
- Returns
- true if the key was processed; false if not.
Reimplemented from UIElement.
◆ RecalculateDimensions()
void MessageDialog::RecalculateDimensions |
( |
| ) |
|
|
overridevirtual |
◆ RecalculateLayout()
void MessageDialog::RecalculateLayout |
( |
| ) |
|
|
overridevirtual |
Recalculate the UIElement layout (containers update the X- and Y-Location of all their items, all other items can do other layout update stuff)
Reimplemented from UIElement.
◆ TouchInput()
bool MessageDialog::TouchInput |
( |
uint16_t | x, |
|
|
uint16_t | y, |
|
|
TouchTypes | touchType ) |
|
overridevirtual |
Process a touch input at the given point (x, y)
- Parameters
-
x | X-Coordinate of the touched point |
y | Y-Coordinate of the touched point |
touchType | Type of the touch |
- Returns
- true if the touch was processed; false if not.
Reimplemented from UIElement.
◆ _maxMsgLength
uint16_t MessageDialog::_maxMsgLength |
|
private |
Maximum length for the internally used string buffer of the Label of the MessageDialog.
This is the maximum length that the message can be.
The documentation for this class was generated from the following files:
- /github/workspace/include/Controls/MessageDialog.h
- /github/workspace/src/Controls/MessageDialog.cpp