23#include "os_io_seph_cmd.h"
24#include "os_io_seph_ux.h"
26#include "os_helpers.h"
31#if defined(TARGET_FLEX) || defined(TARGET_APEX)
32#define USE_PARTIAL_BUTTONS 1
38#ifdef USE_PARTIAL_BUTTONS
44#ifndef USE_PARTIAL_BUTTONS
59#if defined(TARGET_STAX)
60#define TEXT_ENTRY_NORMAL_HEIGHT 64
61#define TEXT_ENTRY_COMPACT_HEIGHT 64
62#define BOTTOM_NORMAL_MARGIN 24
63#define BOTTOM_CONFIRM_MARGIN 24
64#define BOTTOM_COMPACT_MARGIN 24
65#define TOP_NORMAL_MARGIN 20
66#define TOP_CONFIRM_MARGIN 20
67#define TOP_COMPACT_MARGIN 20
68#define TITLE_ENTRY_MARGIN_Y 4
69#define TEXT_ENTRY_FONT LARGE_MEDIUM_1BPP_FONT
70#define TEXT_ENTRY_FONT_OBFUSCATED LARGE_OBFUSCATED_MEDIUM_1BPP_FONT
73#define NUMBER_TEXT_SPACE 8
74#define NUMBER_WIDTH 56
75#define DELETE_ICON C_Close_32px
76#elif defined(TARGET_FLEX)
77#define TEXT_ENTRY_NORMAL_HEIGHT 72
78#define TEXT_ENTRY_COMPACT_HEIGHT 56
79#define BOTTOM_NORMAL_MARGIN 24
80#define BOTTOM_CONFIRM_MARGIN 24
81#define BOTTOM_COMPACT_MARGIN 12
82#define TOP_NORMAL_MARGIN 20
83#define TOP_CONFIRM_MARGIN 20
84#define TOP_COMPACT_MARGIN 12
85#define TITLE_ENTRY_MARGIN_Y 4
86#define TEXT_ENTRY_FONT LARGE_MEDIUM_1BPP_FONT
87#define TEXT_ENTRY_FONT_OBFUSCATED LARGE_OBFUSCATED_MEDIUM_1BPP_FONT
89#define NUMBER_TEXT_SPACE 8
90#define NUMBER_WIDTH 56
91#define DELETE_ICON C_Close_40px
92#elif defined(TARGET_APEX)
93#define TEXT_ENTRY_NORMAL_HEIGHT 44
94#define TEXT_ENTRY_COMPACT_HEIGHT 44
95#define BOTTOM_NORMAL_MARGIN 20
96#define BOTTOM_CONFIRM_MARGIN 16
97#define BOTTOM_COMPACT_MARGIN 8
98#define TOP_NORMAL_MARGIN 20
99#define TOP_CONFIRM_MARGIN 12
100#define TOP_COMPACT_MARGIN 8
101#define TITLE_ENTRY_MARGIN_Y 4
102#define TEXT_ENTRY_FONT LARGE_MEDIUM_1BPP_FONT
103#define TEXT_ENTRY_FONT_OBFUSCATED LARGE_OBFUSCATED_MEDIUM_1BPP_FONT
105#define NUMBER_TEXT_SPACE 4
106#define NUMBER_WIDTH 40
107#define DELETE_ICON C_Close_Tiny_24px
110#ifdef USE_PARTIAL_BUTTONS
111#if defined(TARGET_FLEX)
112#define LEFT_HALF_ICON C_left_half_64px
113#define SUGGESTION_CONTAINER_HEIGHT 92
114#elif defined(TARGET_APEX)
115#define LEFT_HALF_ICON C_half_disc_left_40px_1bpp
116#define SUGGESTION_CONTAINER_HEIGHT 56
121#define SUGGESTION_BUTTONS_SIDE_MARGIN BORDER_MARGIN
122#if defined(TARGET_APEX)
123#define LINE_THICKNESS 1
124#define LINE_COLOR BLACK
126#define LINE_THICKNESS 2
127#define LINE_COLOR LIGHT_GRAY
146#ifdef USE_PARTIAL_BUTTONS
159 uint8_t currentLeftButtonIndex)
161 bool needRefresh =
false;
167 && (currentLeftButtonIndex < (
nbActiveButtons - NB_MAX_VISIBLE_SUGGESTION_BUTTONS))) {
170 currentLeftButtonIndex += NB_MAX_VISIBLE_SUGGESTION_BUTTONS;
176 button->text =
choiceTexts[currentLeftButtonIndex];
180 for (i = 1; i < NB_MAX_VISIBLE_SUGGESTION_BUTTONS; i++) {
184 if ((uint32_t) currentLeftButtonIndex + i < (uint32_t)
nbActiveButtons) {
185 button->text =
choiceTexts[currentLeftButtonIndex + i];
195 page = currentLeftButtonIndex / NB_MAX_VISIBLE_SUGGESTION_BUTTONS;
199 && (currentLeftButtonIndex > (NB_MAX_VISIBLE_SUGGESTION_BUTTONS - 1))) {
202 currentLeftButtonIndex -= NB_MAX_VISIBLE_SUGGESTION_BUTTONS;
203 for (i = 0; i < NB_MAX_VISIBLE_SUGGESTION_BUTTONS; i++) {
208 button->text =
choiceTexts[currentLeftButtonIndex + i];
213 page = currentLeftButtonIndex / NB_MAX_VISIBLE_SUGGESTION_BUTTONS;
231#ifndef USE_PARTIAL_BUTTONS
253 indicator->activePage = page;
255#ifdef USE_PARTIAL_BUTTONS
257 if (currentLeftButtonIndex > 0) {
258 container->children[LEFT_HALF_INDEX] = (
nbgl_obj_t *) partialButtonImages[0];
261 container->children[LEFT_HALF_INDEX] = NULL;
265 && (currentLeftButtonIndex < (
nbActiveButtons - NB_MAX_VISIBLE_SUGGESTION_BUTTONS))) {
266 container->children[RIGHT_HALF_INDEX] = (
nbgl_obj_t *) partialButtonImages[1];
269 container->children[RIGHT_HALF_INDEX] = NULL;
286 if ((container->nbChildren < 2) || (container->children[1]->type !=
CONTAINER)) {
305 os_io_seph_cmd_piezo_play_tune(TUNE_TAP_CASUAL);
328 uint16_t textEntryHeight = (compactMode ? TEXT_ENTRY_COMPACT_HEIGHT : TEXT_ENTRY_NORMAL_HEIGHT);
329 bool withCross = ((text != NULL) && (strlen(text) > 0));
333 mainContainer->nbChildren = 2;
336 mainContainer->obj.alignment =
CENTER;
341 textArea->textColor =
BLACK;
342 textArea->text = title;
343 textArea->textAlignment =
CENTER;
344 textArea->fontId = SMALL_REGULAR_FONT;
345 textArea->wrapping =
true;
349 textArea->fontId, textArea->text, textArea->obj.area.width, textArea->wrapping);
350 mainContainer->children[0] = (
nbgl_obj_t *) textArea;
351 mainContainer->obj.area.height = textArea->obj.area.height + TITLE_ENTRY_MARGIN_Y;
356 container->nbChildren = 4;
364 textArea->textColor =
BLACK;
367 textArea->textAlignment =
CENTER;
368 textArea->fontId = TEXT_ENTRY_FONT;
369 textArea->obj.area.width = NUMBER_WIDTH;
378 enteredTextFont = TEXT_ENTRY_FONT_OBFUSCATED;
383 textArea->textColor =
BLACK;
384 textArea->text = text;
386 textArea->fontId = enteredTextFont;
387 textArea->obj.area.width =
AVAILABLE_WIDTH - DELETE_ICON.width - NUMBER_TEXT_SPACE;
389 textArea->obj.alignmentMarginX = NUMBER_TEXT_SPACE;
390 textArea->obj.alignTo = container->children[0];
392 textArea->obj.area.width -= textArea->obj.alignmentMarginX + NUMBER_WIDTH;
398 textArea->autoHideLongLine =
true;
401 container->obj.area.height = textEntryHeight;
405 image->buffer = &DELETE_ICON;
407 image->foregroundColor = withCross ?
BLACK :
WHITE;
413 image->obj.alignTo = container->children[
TEXT_INDEX];
414 image->obj.alignmentMarginX = NUMBER_TEXT_SPACE;
415 image->obj.touchMask = (1 <<
TOUCHED);
432 mainContainer->children[1] = (
nbgl_obj_t *) container;
433 mainContainer->obj.area.height += container->obj.area.height;
435 return mainContainer;
439 uint8_t nbUsedButtons,
440 const char **buttonTexts,
441 int firstButtonToken,
451 suggestionsContainer->layout =
VERTICAL;
452 suggestionsContainer->
obj.area.width = SCREEN_WIDTH;
453#ifndef USE_PARTIAL_BUTTONS
455 suggestionsContainer->obj.area.height = 2 * SMALL_BUTTON_HEIGHT +
INTERNAL_MARGIN + 28;
458 suggestionsContainer->obj.area.height = SUGGESTION_CONTAINER_HEIGHT;
461 suggestionsContainer->children
465 suggestionsContainer->obj.alignmentMarginY = BOTTOM_NORMAL_MARGIN;
470 suggestionsFontId = SMALL_OBFUSCATED_BOLD_1BPP_FONT;
474 for (
int i = 0; i < NB_MAX_VISIBLE_SUGGESTION_BUTTONS; i++) {
482 button->innerColor =
BLACK;
483 button->borderColor =
BLACK;
484 button->foregroundColor =
WHITE;
485 button->obj.area.width
487 button->obj.area.height = SMALL_BUTTON_HEIGHT;
488 button->radius = SMALL_BUTTON_RADIUS_INDEX;
489 button->fontId = suggestionsFontId;
490 button->text = buttonTexts[i];
491 button->obj.touchMask = (1 <<
TOUCHED);
500 indicator->activePage = 0;
501 indicator->nbPages = (
nbActiveButtons + NB_MAX_VISIBLE_SUGGESTION_BUTTONS - 1)
502 / NB_MAX_VISIBLE_SUGGESTION_BUTTONS;
503 indicator->obj.area.width
504 = (indicator->nbPages < 3) ? STEPPER_2_PAGES_WIDTH : STEPPER_N_PAGES_WIDTH;
508#ifdef USE_PARTIAL_BUTTONS
512 partialButtonImages[0]->buffer = &LEFT_HALF_ICON;
513 partialButtonImages[0]->obj.alignment =
TOP_LEFT;
514 partialButtonImages[0]->foregroundColor =
BLACK;
516 partialButtonImages[1]->buffer = &LEFT_HALF_ICON;
517 partialButtonImages[1]->obj.alignment =
TOP_RIGHT;
518 partialButtonImages[1]->foregroundColor =
BLACK;
523 return suggestionsContainer;
543 button->obj.alignmentMarginY = compactMode ? BOTTOM_COMPACT_MARGIN : BOTTOM_CONFIRM_MARGIN;
545 button->foregroundColor =
WHITE;
547 button->innerColor =
BLACK;
548 button->borderColor =
BLACK;
549 button->obj.touchMask = (1 <<
TOUCHED);
556 button->text = PIC(text);
557 button->fontId = SMALL_BOLD_1BPP_FONT;
560 button->radius = BUTTON_RADIUS;
582 if (layout == NULL) {
593 keyboard->obj.area.width = SCREEN_WIDTH;
594 keyboard->obj.area.height = 3 * KEYBOARD_KEY_HEIGHT;
596 keyboard->obj.area.height += KEYBOARD_KEY_HEIGHT;
599 keyboard->obj.alignmentMarginY = 56;
603 keyboard->callback = PIC(kbdInfo->
callback);
605 keyboard->mode = kbdInfo->
mode;
606 keyboard->keyMask = kbdInfo->
keyMask;
607 keyboard->casing = kbdInfo->
casing;
617 = keyboard->obj.area.height + keyboard->obj.alignmentMarginY;
656 if (layout == NULL) {
663 if ((keyboard == NULL) || (keyboard->obj.type !=
KEYBOARD)) {
665 LAYOUT_LOGGER,
"nbgl_layoutUpdateKeyboard(): keyboard not found at index %d\n", index);
668 keyboard->keyMask = keyMask;
670 keyboard->casing = casing;
691 if (layout == NULL) {
698 if ((keyboard == NULL) || (keyboard->obj.type !=
KEYBOARD)) {
700 "nbgl_layoutKeyboardNeedsRefresh(): keyboard not found at index %d\n",
704 if (keyboard->needsRefresh) {
705 keyboard->needsRefresh =
false;
739 uint8_t enteredTextIndex = (layoutInt->
container->nbChildren == 2) ? 0 : 1;
740 bool compactMode = ((layoutInt->
container->children[enteredTextIndex + 1] != NULL)
741 && (layoutInt->
container->children[enteredTextIndex + 1]->type ==
BUTTON)
742 && (layoutInt->
container->nbChildren == 3));
745 if (layout == NULL) {
751 container =
addTextEntry(layoutInt, NULL, text, numbered, number, token, compactMode,
false);
752 if (container == NULL) {
760 if (layoutInt->
container->children[enteredTextIndex + 1] != NULL) {
761 if (layoutInt->
container->children[enteredTextIndex + 1]->type ==
BUTTON) {
764 container->obj.alignmentMarginY
765 -= (button->obj.area.height + button->obj.alignmentMarginY
766 + (compactMode ? TOP_COMPACT_MARGIN : TOP_NORMAL_MARGIN))
772 container->obj.alignmentMarginY
773 -= (suggestionContainer->obj.area.height + suggestionContainer->obj.alignmentMarginY
774 + (compactMode ? TOP_COMPACT_MARGIN : TOP_NORMAL_MARGIN))
780 if (layoutInt->
container->nbChildren == 3) {
781 container->obj.alignmentMarginY += layoutInt->
container->children[0]->area.height / 2;
811 uint8_t enteredTextIndex = (layoutInt->
container->nbChildren == 2) ? 0 : 1;
814 if (layout == NULL) {
825 if ((mainContainer == NULL) || (mainContainer->obj.type !=
CONTAINER)) {
830 if ((container == NULL) || (container->obj.type !=
CONTAINER)) {
835 if ((textArea == NULL) || (textArea->obj.type !=
TEXT_AREA)) {
839 textArea->text = text;
847 if ((textArea == NULL) || (textArea->obj.type !=
TEXT_AREA)) {
881 uint8_t enteredTextIndex = (layoutInt->
container->nbChildren == 2) ? 0 : 1;
882 bool compactMode = (layoutInt->
container->nbChildren == 3);
885 if (layout == NULL) {
890 if (button == NULL) {
892 "nbgl_layoutAddConfirmationButton(): addConfirmationButton failed\n");
897 if (layoutInt->
container->children[enteredTextIndex] != NULL) {
899 ->obj.alignmentMarginY
900 -= (button->obj.area.height + button->obj.alignmentMarginY
901 + (compactMode ? TOP_COMPACT_MARGIN : TOP_NORMAL_MARGIN))
926 uint8_t enteredTextIndex = (layoutInt->
container->nbChildren == 2) ? 0 : 1;
931 if (layout == NULL) {
937 if ((button == NULL) || (button->obj.type !=
BUTTON)) {
944 button->innerColor =
BLACK;
945 button->borderColor =
BLACK;
946 button->obj.touchMask = (1 <<
TOUCHED);
972 if (layout == NULL) {
984 if (textEntryContainer == NULL) {
1000 if (suggestionsContainer == NULL) {
1002 "nbgl_layoutAddKeyboardContent(): addSuggestionButtons failed\n");
1012 "nbgl_layoutAddKeyboardContent(): cannot add callback object\n");
1018 textEntryContainer->obj.alignmentMarginY
1019 -= (suggestionsContainer->obj.area.height + suggestionsContainer->obj.alignmentMarginY
1020 + TOP_NORMAL_MARGIN)
1029 (content->
title != NULL));
1030 if (button == NULL) {
1032 "nbgl_layoutAddKeyboardContent(): addConfirmationButton failed\n");
1037 textEntryContainer->obj.alignmentMarginY
1038 -= (button->obj.area.height + button->obj.alignmentMarginY
1039 + ((content->
title != NULL) ? TOP_COMPACT_MARGIN : TOP_CONFIRM_MARGIN))
1042 return layoutInt->
container->obj.area.height;
1064 if (layout == NULL) {
1070 if ((mainContainer == NULL) || (mainContainer->obj.type !=
CONTAINER)) {
1075 if ((container == NULL) || (container->obj.type !=
CONTAINER)) {
1077 "nbgl_layoutUpdateKeyboardContent(): text entry container not found\n");
1090 textArea->text = content->
text;
1091 textArea->fontId = content->
obfuscated ? TEXT_ENTRY_FONT_OBFUSCATED : TEXT_ENTRY_FONT;
1096 if ((textArea->text != NULL) && (strlen(textArea->text) > 0)) {
1097 if (image->foregroundColor ==
WHITE) {
1098 image->foregroundColor =
BLACK;
1103 if (image->foregroundColor ==
BLACK) {
1104 image->foregroundColor =
WHITE;
1114 if ((suggestionsContainer == NULL) || (suggestionsContainer->obj.type !=
CONTAINER)) {
1116 "nbgl_layoutUpdateKeyboardContent(): suggestions container not found\n");
1121 for (i = 0; i < NB_MAX_SUGGESTION_BUTTONS; i++) {
1125 for (i = 0; i < NB_MAX_VISIBLE_SUGGESTION_BUTTONS; i++) {
1138 button->text = NULL;
1142 suggestionsContainer->forceClean =
true;
1147 indicator->nbPages = (
nbActiveButtons + NB_MAX_VISIBLE_SUGGESTION_BUTTONS - 1)
1148 / NB_MAX_VISIBLE_SUGGESTION_BUTTONS;
1149 indicator->activePage = 0;
1157 if ((button == NULL) || (button->obj.type !=
BUTTON)) {
1164#if NB_COLOR_BITS == 4
1170 button->innerColor =
BLACK;
1171 button->borderColor =
BLACK;
1172 button->obj.touchMask = (1 <<
TOUCHED);
#define LOG_WARN(__logger,...)
#define LOG_DEBUG(__logger,...)
Middle Level API of the new BOLOS Graphical Library.
uint16_t nbgl_getSingleLineTextWidth(nbgl_font_id_e fontId, const char *text)
uint8_t nbgl_getFontHeight(nbgl_font_id_e fontId)
uint16_t nbgl_getTextHeightInWidth(nbgl_font_id_e fontId, const char *text, uint16_t maxWidth, bool wrapping)
Font screen low-Level driver API, to draw elementary forms.
void layoutAddObject(nbgl_layoutInternal_t *layout, nbgl_obj_t *obj)
adds the given obj to the main container
void layoutUpdateCallbackObjToken(nbgl_layoutInternal_t *layout, nbgl_obj_t *obj, uint8_t token)
Update the token associated with a specific object in a layout.
layoutObj_t * layoutAddCallbackObj(nbgl_layoutInternal_t *layout, nbgl_obj_t *obj, uint8_t token, tune_index_e tuneId)
void * nbgl_layout_t
type shared externally
#define NBGL_INVALID_TOKEN
@ KEYBOARD_WITH_BUTTON
text entry area + confirmation button
@ KEYBOARD_WITH_SUGGESTIONS
text entry area + suggestion buttons
Internal functions/constants of NBGL layout layer.
@ SWIPE_USAGE_SUGGESTIONS
#define KEYBOARD_FOOTER_TYPE
int nbgl_layoutUpdateKeyboard(nbgl_layout_t *layout, uint8_t index, uint32_t keyMask, bool updateCasing, keyboardCase_t casing)
Updates an existing keyboard on bottom of the screen, with the given configuration.
int nbgl_layoutAddKeyboard(nbgl_layout_t *layout, const nbgl_layoutKbd_t *kbdInfo)
Creates a keyboard on bottom of the screen, with the given configuration.
static nbgl_container_t * addTextEntry(nbgl_layoutInternal_t *layoutInt, const char *title, const char *text, bool numbered, uint8_t number, int textToken, bool compactMode, bool obfuscated)
static bool updateSuggestionButtons(nbgl_layoutInternal_t *layoutInt, nbgl_container_t *container, nbgl_touchType_t eventType, uint8_t currentLeftButtonIndex)
int nbgl_layoutAddKeyboardContent(nbgl_layout_t *layout, nbgl_layoutKeyboardContent_t *content)
Adds an area containing a potential title, a text entry and either confirmation or suggestion buttons...
int nbgl_layoutAddEnteredText(nbgl_layout_t *layout, bool numbered, uint8_t number, const char *text, bool grayedOut, int offsetY, int token)
Adds a "text entry" area under the previously entered object. This area can be preceded (beginning of...
int nbgl_layoutUpdateConfirmationButton(nbgl_layout_t *layout, uint8_t index, bool active, const char *text)
Updates an existing black full width confirmation button on top of the previously added keyboard.
int nbgl_layoutUpdateEnteredText(nbgl_layout_t *layout, uint8_t index, bool numbered, uint8_t number, const char *text, bool grayedOut)
Updates an existing "text entry" area, created with nbgl_layoutAddEnteredText()
#define SUGGESTION_BUTTONS_SIDE_MARGIN
static nbgl_button_t * addConfirmationButton(nbgl_layoutInternal_t *layoutInt, bool active, const char *text, int token, tune_index_e tuneId, bool compactMode)
bool keyboardSwipeCallback(nbgl_layoutInternal_t *layoutInt, nbgl_obj_t *obj, nbgl_touchType_t eventType)
static uint8_t currentFirstButtonToken
int nbgl_layoutUpdateKeyboardContent(nbgl_layout_t *layout, nbgl_layoutKeyboardContent_t *content)
Updates an area containing a potential title, a text entry and either confirmation or suggestion butt...
static nbgl_container_t * addSuggestionButtons(nbgl_layoutInternal_t *layoutInt, uint8_t nbUsedButtons, const char **buttonTexts, int firstButtonToken, tune_index_e tuneId, bool obfuscated)
static const char * choiceTexts[NB_MAX_SUGGESTION_BUTTONS]
int nbgl_layoutAddConfirmationButton(nbgl_layout_t *layout, bool active, const char *text, int token, tune_index_e tuneId)
Adds a black full width confirmation button on top of the previously added keyboard.
bool nbgl_layoutKeyboardNeedsRefresh(nbgl_layout_t *layout, uint8_t index)
function called to know whether the keyboard has been redrawn and needs a refresh
static uint8_t nbActiveButtons
API to draw all basic graphic objects.
struct PACKED__ nbgl_line_s nbgl_line_t
struct to represent a vertical or horizontal line
struct PACKED__ nbgl_navigation_bar_s nbgl_page_indicator_t
struct to represent a navigation bar (PAGE_INDICATOR type) There can be up to 5 page indicators,...
struct PACKED__ nbgl_text_area_s nbgl_text_area_t
struct to represent a text area (TEXT_AREA type)
void nbgl_objDraw(nbgl_obj_t *obj)
nbgl_obj_t ** nbgl_containerPoolGet(uint8_t nbObjs, uint8_t layer)
keyboardCase_t
Letters casing in which to open/set the keyboard.
nbgl_obj_t * nbgl_objPoolGet(nbgl_obj_type_t type, uint8_t layer)
struct PACKED__ nbgl_keyboard_s nbgl_keyboard_t
struct to represent a keyboard (KEYBOARD type)
void nbgl_refreshSpecial(nbgl_refresh_mode_t mode)
struct PACKED__ nbgl_image_s nbgl_image_t
struct to represent an image (IMAGE type)
int nbgl_objPoolGetArray(nbgl_obj_type_t type, uint8_t nbObjs, uint8_t layer, nbgl_obj_t **objArray)
struct PACKED__ nbgl_button_s nbgl_button_t
struct to represent a button (BUTTON type) that can contain a text and/or an icon
#define INACTIVE_TEXT_COLOR
struct PACKED__ nbgl_container_s nbgl_container_t
struct to represent a container (CONTAINER type)
@ CURRENT_INDICATOR
only current page dash is black
struct PACKED__ nbgl_obj_s nbgl_obj_t
Common structure for all graphical objects.
nbgl_touchType_t
The different types of Touchscreen events.
@ VERTICAL
from top to bottom
@ HORIZONTAL
from left to right
@ IMAGE
Bitmap (y and height must be multiple of 4 on Stax)
@ BUTTON
Rounded rectangle button with icon and/or text.
@ PAGE_INDICATOR
horizontal bar to indicate position within pages
@ LINE
Vertical or Horizontal line.
@ CONTAINER
Empty container.
@ TEXT_AREA
Area to contain text line(s)
#define NO_TRANSFORMATION
@ FULL_COLOR_PARTIAL_REFRESH
to be used for small partial refresh (radio buttons, switches)
Structure containing all information about the current layout.
nbgl_container_t * footerContainer
container used to store footer (buttons, nav....)
uint8_t layer
layer in screen stack
nbgl_swipe_usage_t swipeUsage
nbgl_container_t * container
nbgl_layoutFooterType_t footerType
type of footer
nbgl_obj_t ** children
children for main screen
This structure contains info to build a keyboard with nbgl_layoutAddKeyboard()
bool lettersOnly
if true, only display letter keys and Backspace
keyboardCallback_t callback
function called when an active key is pressed
keyboardMode_t mode
keyboard mode to start with
keyboardCase_t casing
keyboard casing mode (lower, upper once or upper locked)
This structure contains info to build a keyboard content (controls that are linked to keyboard)
uint8_t number
if numbered is true, number used to build 'number.' text
const char * text
already entered text
tune_index_e tuneId
if not NBGL_NO_TUNE, a tune will be played
nbgl_layoutKeyboardContentType_t type
type of content
nbgl_layoutSuggestionButtons_t suggestionButtons
nbgl_layoutConfirmationButton_t confirmationButton
used if type is KEYBOARD_WITH_SUGGESTIONS
const char * title
centered title explaining the screen
bool numbered
if set to true, the text is preceded on the left by 'number.'