Internal functions/constants of NBGL layout layer.
More...
#include "nbgl_layout.h"
#include "glyphs.h"
#include "os_pic.h"
Go to the source code of this file.
|
| bool | keyboardSwipeCallback (nbgl_layoutInternal_t *layoutInt, nbgl_obj_t *obj, nbgl_touchType_t eventType) |
| void | layoutAddObject (nbgl_layoutInternal_t *layout, nbgl_obj_t *obj) |
| | adds the given obj to the main container
|
| layoutObj_t * | layoutAddCallbackObj (nbgl_layoutInternal_t *layout, nbgl_obj_t *obj, uint8_t token, tune_index_e tuneId) |
| void | layoutUpdateCallbackObjToken (nbgl_layoutInternal_t *layout, nbgl_obj_t *obj, uint8_t token) |
| | Update the token associated with a specific object in a layout.
|
| void | layoutNavigationPopulate (nbgl_container_t *navContainer, const nbgl_layoutNavigationBar_t *navConfig, uint8_t layer) |
| | This function creates a full navigation bar "object", with buttons and returns it as a container.
|
| bool | layoutNavigationCallback (nbgl_obj_t *obj, nbgl_touchType_t eventType, uint8_t nbPages, uint8_t *activePage) |
| | function to be called when any of the controls in navigation bar is touched
|
| static nbgl_font_id_e | layoutGetTagValueFont (bool smallCaseForValue) |
| | returns the font used to display the values of a list of tag/value pairs
|
| static const nbgl_icon_details_t * | layoutGetTagValueIcon (const nbgl_contentTagValue_t *pair) |
| | returns the icon displayed on the right of the value of the given tag/value pair
|
| static uint16_t | layoutGetTagValueWidth (const nbgl_icon_details_t *icon) |
| | returns the width of the value of a tag/value pair. Shared by the layout and the use cases, so that the number of lines used to compute the number of pairs fitting in a page is always the one really displayed
|
| static uint8_t | layoutGetTagValueMaxLines (uint8_t listMaxLines, const nbgl_contentTagValue_t *pair, bool *forceEllipsis) |
| | returns the max number of lines of the value of the given tag/value pair, which is the smallest non-zero of the list one and the pair one
|
Internal functions/constants of NBGL layout layer.
Definition in file nbgl_layout_internal.h.
◆ INTERNAL_MARGIN
| #define INTERNAL_MARGIN 8 |
◆ KEYBOARD_FOOTER_TYPE
| #define KEYBOARD_FOOTER_TYPE 99 |
◆ KEYPAD_FOOTER_TYPE
| #define KEYPAD_FOOTER_TYPE 98 |
◆ LAYOUT_OBJ_POOL_LEN
| #define LAYOUT_OBJ_POOL_LEN 16 |
Max number of complex objects with callback retrievable from pool.
Definition at line 42 of file nbgl_layout_internal.h.
◆ nbgl_layoutInternal_t
Structure containing all information about the current layout.
- Note
- It shall not be used externally
◆ anonymous enum
| Enumerator |
|---|
| HEADER_INDEX | |
| MAIN_CONTAINER_INDEX | |
| TOP_RIGHT_BUTTON_INDEX | |
| FOOTER_INDEX | |
| UP_FOOTER_INDEX | |
| LEFT_BORDER_INDEX | |
| NB_MAX_SCREEN_CHILDREN | |
Definition at line 65 of file nbgl_layout_internal.h.
◆ nbgl_swipe_usage_t
| Enumerator |
|---|
| SWIPE_USAGE_NAVIGATION | |
| SWIPE_USAGE_CUSTOM | |
| SWIPE_USAGE_SUGGESTIONS | |
| NB_SWIPE_USAGE | |
Definition at line 57 of file nbgl_layout_internal.h.
◆ keyboardSwipeCallback()
◆ layoutAddCallbackObj()
◆ layoutAddObject()
adds the given obj to the main container
- Parameters
-
Definition at line 683 of file nbgl_layout.c.
◆ layoutGetTagValueFont()
returns the font used to display the values of a list of tag/value pairs
- Parameters
-
| smallCaseForValue | smallCaseForValue field of the list |
- Returns
- the font of the values
Definition at line 145 of file nbgl_layout_internal.h.
◆ layoutGetTagValueIcon()
returns the icon displayed on the right of the value of the given tag/value pair
- Parameters
-
- Returns
- the (>) icon for an alias, otherwise the icon of the pair (NULL if none)
Definition at line 156 of file nbgl_layout_internal.h.
◆ layoutGetTagValueMaxLines()
| uint8_t layoutGetTagValueMaxLines |
( |
uint8_t | listMaxLines, |
|
|
const nbgl_contentTagValue_t * | pair, |
|
|
bool * | forceEllipsis ) |
|
inlinestatic |
returns the max number of lines of the value of the given tag/value pair, which is the smallest non-zero of the list one and the pair one
- Parameters
-
| listMaxLines | max number of lines for all values of the list (0 if not limited) |
| pair | tag/value pair |
| forceEllipsis | [out] if not NULL, set to true if the pair has a max number of lines, in which case the last line must end with "..." if the value doesn't fit, whichever limit cuts it |
- Returns
- the max number of lines (0 if not limited)
Definition at line 196 of file nbgl_layout_internal.h.
◆ layoutGetTagValueWidth()
returns the width of the value of a tag/value pair. Shared by the layout and the use cases, so that the number of lines used to compute the number of pairs fitting in a page is always the one really displayed
- Parameters
-
- Returns
- the width in pixels of the value
Definition at line 177 of file nbgl_layout_internal.h.
◆ layoutNavigationCallback()
function to be called when any of the controls in navigation bar is touched
- Parameters
-
| obj | touched object (button or container) |
| eventType | type of touch (only TOUCHED or SWIPED is accepted) |
| nbPages | number of pages for navigation (if < 2, no navigation keys) |
| activePage | current active page |
- Returns
- true if actually navigated (page change)
Definition at line 97 of file nbgl_layout_navigation.c.
◆ layoutNavigationPopulate()
This function creates a full navigation bar "object", with buttons and returns it as a container.
- Parameters
-
| navContainer | container used for the objects of the navigation |
| navConfig | configuration to create the navigation bar, at the bottom of the screen |
| layer | layer (screen) to create the navigation bar in |
Definition at line 154 of file nbgl_layout_navigation.c.
◆ layoutUpdateCallbackObjToken()
Update the token associated with a specific object in a layout.
This function updates the token for a given object in the layout's callback object pool.
- Parameters
-
| [in] | layout | The layout object for which the token is to be updated. |
| [in] | obj | The object whose token needs to be updated. |
| [in] | token | The new token to be set for the object. |
Definition at line 655 of file nbgl_layout.c.