|
Embedded SDK
Embedded SDK
|
Internal functions/constants of NBGL layout layer. More...
#include "nbgl_layout.h"

Go to the source code of this file.
Classes | |
| struct | nbgl_layoutInternal_s |
| Structure containing all information about the current layout. More... | |
Macros | |
| #define | LAYOUT_OBJ_POOL_LEN 10 |
| Max number of complex objects with callback retrievable from pool. | |
| #define | BUTTON_MARGIN_Y 12 |
| Horizontal margin (sum of left and right) between the text of a button and its border. | |
| #define | NB_MAX_BUTTON_ROWS 3 |
| Maximum number of buttons used to display the sub text in BUTTON_INFO style. | |
| #define | NB_MAX_BUTTON_ROWS_PUBLIC 2 |
| Maximum number of buttons used to display the sub text in BUTTON_INFO style with nbgl_layoutAddText(). | |
| #define | NB_MAX_CHAR_IN_BUTTON_ROW 20 |
| Maximum number of bytes (including '\0') of the text of a button in BUTTON_INFO style. A row of narrow chars is cut at this length, the rest goes in the next button. | |
Typedefs | |
| typedef struct nbgl_layoutInternal_s | nbgl_layoutInternal_t |
| Structure containing all information about the current layout. | |
Functions | |
| void | layoutAddObject (nbgl_layoutInternal_t *layout, nbgl_obj_t *obj) |
| adds the given obj to the layout | |
| uint16_t | layoutGetButtonRowLen (const char *text, uint16_t *len, uint16_t *width) |
| computes the part of the given text displayed in a single button in BUTTON_INFO style. Used both to draw the buttons and to split the text in pages, so that they always match | |
| int | layoutAddText (nbgl_layout_t *layout, const char *text, const char *subText, nbgl_contentCenteredInfoStyle_t style, uint8_t nbMaxLines, bool ellipsis) |
| Same as nbgl_layoutAddText(), with the choice of the max number of lines (or buttons in BUTTON_INFO style) of the sub text, and of the behavior when the sub text doesn't fit in them. | |
Internal functions/constants of NBGL layout layer.
Definition in file nbgl_layout_internal_nanos.h.
| #define BUTTON_MARGIN_Y 12 |
Horizontal margin (sum of left and right) between the text of a button and its border.
Definition at line 33 of file nbgl_layout_internal_nanos.h.
| #define LAYOUT_OBJ_POOL_LEN 10 |
Max number of complex objects with callback retrievable from pool.
Definition at line 27 of file nbgl_layout_internal_nanos.h.
| #define NB_MAX_BUTTON_ROWS 3 |
Maximum number of buttons used to display the sub text in BUTTON_INFO style.
Definition at line 39 of file nbgl_layout_internal_nanos.h.
| #define NB_MAX_BUTTON_ROWS_PUBLIC 2 |
Maximum number of buttons used to display the sub text in BUTTON_INFO style with nbgl_layoutAddText().
Definition at line 46 of file nbgl_layout_internal_nanos.h.
| #define NB_MAX_CHAR_IN_BUTTON_ROW 20 |
Maximum number of bytes (including '\0') of the text of a button in BUTTON_INFO style. A row of narrow chars is cut at this length, the rest goes in the next button.
Definition at line 53 of file nbgl_layout_internal_nanos.h.
| typedef struct nbgl_layoutInternal_s nbgl_layoutInternal_t |
Structure containing all information about the current layout.
| void layoutAddObject | ( | nbgl_layoutInternal_t * | layout, |
| nbgl_obj_t * | obj ) |
adds the given obj to the layout
| layout | |
| obj |
Definition at line 114 of file nbgl_layout_nanos.c.
| int layoutAddText | ( | nbgl_layout_t * | layout, |
| const char * | text, | ||
| const char * | subText, | ||
| nbgl_contentCenteredInfoStyle_t | style, | ||
| uint8_t | nbMaxLines, | ||
| bool | ellipsis ) |
Same as nbgl_layoutAddText(), with the choice of the max number of lines (or buttons in BUTTON_INFO style) of the sub text, and of the behavior when the sub text doesn't fit in them.
| layout | the current layout |
| text | main text, must be single line if subText |
| subText | description under main text (may be null) |
| style | if REGULAR_INFO, use regular font for text, otherwise use bold font for text |
| nbMaxLines | max number of lines (or buttons in BUTTON_INFO style) for the sub text. If 0, the max displayable number is used |
| ellipsis | if true, the last line (or button) ends with an ellipsis if the sub text doesn't fit, otherwise the remaining text is simply not displayed (it is displayed by the caller in another page) |
Definition at line 392 of file nbgl_layout_nanos.c.
| uint16_t layoutGetButtonRowLen | ( | const char * | text, |
| uint16_t * | len, | ||
| uint16_t * | width ) |
computes the part of the given text displayed in a single button in BUTTON_INFO style. Used both to draw the buttons and to split the text in pages, so that they always match
| text | text to display, starting at the beginning of the button |
| len | [out] number of bytes of text displayed in the button |
| width | [out] width in pixels of these bytes |
Definition at line 246 of file nbgl_layout_nanos.c.