|
Embedded SDK
Embedded SDK
|
Implementation of predefined pages management for Applications. More...
#include <string.h>#include "nbgl_debug.h"#include "nbgl_step.h"#include "glyphs.h"#include "os_pic.h"#include "os_print.h"
Go to the source code of this file.
Classes | |
| struct | TextContext_s |
| struct | MenuListContext_s |
| struct | StepContext_s |
Macros | |
| #define | TMP_STRING_MAX_LEN 24 |
| Maximum number of layers for steps, cannot be greater than max number of layout layers. | |
| #define | NB_MAX_LAYERS 3 |
Typedefs | |
| typedef struct TextContext_s | TextContext_t |
| typedef struct MenuListContext_s | MenuListContext_t |
| typedef struct StepContext_s | StepContext_t |
Enumerations | |
| enum | StepStype_t { TEXT_STEP = 0 , CENTERED_INFO_STEP , MENU_LIST_STEP } |
Functions | |
| nbgl_step_t | nbgl_stepDrawText (nbgl_stepPosition_t pos, nbgl_stepButtonCallback_t onActionCallback, nbgl_screenTickerConfiguration_t *ticker, const char *text, const char *subText, nbgl_contentCenteredInfoStyle_t style, bool modal) |
| draws a text type step, that can be multi-pages, depending of the length of text and subText. The navigation arrows are displayed depending of the given position of this step in a flow, and depending of the page in case of multi-pages | |
| nbgl_step_t | nbgl_stepDrawCenteredInfo (nbgl_stepPosition_t pos, nbgl_stepButtonCallback_t onActionCallback, nbgl_screenTickerConfiguration_t *ticker, nbgl_layoutCenteredInfo_t *info, bool modal) |
| draw a step with a centered info (icon + text). This is always a single page step | |
| nbgl_step_t | nbgl_stepDrawMenuList (nbgl_stepMenuListCallback_t onActionCallback, nbgl_screenTickerConfiguration_t *ticker, nbgl_layoutMenuList_t *list, bool modal) |
| draw a step page with a menu list and navigation arrows to parse it. This step must be alone | |
| uint8_t | nbgl_stepGetMenuListCurrent (nbgl_step_t step) |
| Get the index of the currently selected item in the menulist. | |
| nbgl_step_t | nbgl_stepDrawSwitch (nbgl_stepPosition_t pos, nbgl_stepButtonCallback_t onActionCallback, nbgl_screenTickerConfiguration_t *ticker, nbgl_layoutSwitch_t *switchInfo, bool modal) |
| draw a step page with a switch and navigation arrows to navigate to other pages. | |
| int | nbgl_stepRelease (nbgl_step_t step) |
| Release the step obtained with any of the nbgl_stepDrawXXX() functions. | |
Implementation of predefined pages management for Applications.
Definition in file nbgl_step.c.
| #define NB_MAX_LAYERS 3 |
Definition at line 27 of file nbgl_step.c.
| #define TMP_STRING_MAX_LEN 24 |
Maximum number of layers for steps, cannot be greater than max number of layout layers.
Definition at line 26 of file nbgl_step.c.
| typedef struct MenuListContext_s MenuListContext_t |
definition of context for a MENU_LIST_STEP step
| typedef struct StepContext_s StepContext_t |
| typedef struct TextContext_s TextContext_t |
definition of context for a TEXT_STEP or CENTERED_INFO_STEP step
| enum StepStype_t |
type of step
| Enumerator | |
|---|---|
| TEXT_STEP | for a simple text step |
| CENTERED_INFO_STEP | for a centered info step |
| MENU_LIST_STEP | for a menu list step |
Definition at line 35 of file nbgl_step.c.
| nbgl_step_t nbgl_stepDrawCenteredInfo | ( | nbgl_stepPosition_t | pos, |
| nbgl_stepButtonCallback_t | onActionCallback, | ||
| nbgl_screenTickerConfiguration_t * | ticker, | ||
| nbgl_layoutCenteredInfo_t * | info, | ||
| bool | modal | ||
| ) |
draw a step with a centered info (icon + text). This is always a single page step
| pos | position of this step in the flow (first, last, single, not_first_nor_last) |
| onActionCallback | common callback for all actions on this page |
| ticker | ticker configuration, set to NULL to disable it |
| info | all information about the centered info to be displayed |
| modal | if true, means this step shall be displayed on top of existing one |
Definition at line 564 of file nbgl_step.c.
| nbgl_step_t nbgl_stepDrawMenuList | ( | nbgl_stepMenuListCallback_t | onActionCallback, |
| nbgl_screenTickerConfiguration_t * | ticker, | ||
| nbgl_layoutMenuList_t * | list, | ||
| bool | modal | ||
| ) |
draw a step page with a menu list and navigation arrows to parse it. This step must be alone
| onActionCallback | common callback for all actions on this page |
| ticker | ticker configuration, set to NULL to disable it |
| list | configuration of the menu list |
| modal | if true, means this step shall be displayed on top of existing one |
Definition at line 619 of file nbgl_step.c.
| nbgl_step_t nbgl_stepDrawSwitch | ( | nbgl_stepPosition_t | pos, |
| nbgl_stepButtonCallback_t | onActionCallback, | ||
| nbgl_screenTickerConfiguration_t * | ticker, | ||
| nbgl_layoutSwitch_t * | switchInfo, | ||
| bool | modal | ||
| ) |
draw a step page with a switch and navigation arrows to navigate to other pages.
| pos | position of this step in the flow (first, last, single, not_first_nor_last) |
| onActionCallback | common callback for all actions on this page |
| ticker | ticker configuration, set to NULL to disable it |
| switchInfo | all information about the switch to be displayed |
| modal | if true, means this step shall be displayed on top of existing one |
Definition at line 675 of file nbgl_step.c.
| nbgl_step_t nbgl_stepDrawText | ( | nbgl_stepPosition_t | pos, |
| nbgl_stepButtonCallback_t | onActionCallback, | ||
| nbgl_screenTickerConfiguration_t * | ticker, | ||
| const char * | text, | ||
| const char * | subText, | ||
| nbgl_contentCenteredInfoStyle_t | style, | ||
| bool | modal | ||
| ) |
draws a text type step, that can be multi-pages, depending of the length of text and subText. The navigation arrows are displayed depending of the given position of this step in a flow, and depending of the page in case of multi-pages
| pos | position of this step in the flow (first, last, single, not_first_nor_last) |
| onActionCallback | common callback for all actions on this page |
| ticker | ticker configuration, set to NULL to disable it |
| text | text to display (depending of style) |
| subText | text to display under text (depending of style) |
| style | style to use for text and subText |
| modal | if true, means this step shall be displayed on top of existing one |
Definition at line 456 of file nbgl_step.c.
| uint8_t nbgl_stepGetMenuListCurrent | ( | nbgl_step_t | step | ) |
Get the index of the currently selected item in the menulist.
| step | step from which to get the current menulist choice |
Definition at line 654 of file nbgl_step.c.
| int nbgl_stepRelease | ( | nbgl_step_t | step | ) |
Release the step obtained with any of the nbgl_stepDrawXXX() functions.
| step | step to release |
Definition at line 726 of file nbgl_step.c.