Embedded SDK
Embedded SDK
Macros | Enumerations | Functions
nbgl_layout_navigation.c File Reference

The construction of a navigation bar with buttons super-object. More...

#include "nbgl_debug.h"
#include "nbgl_draw.h"
#include "nbgl_obj.h"
#include "nbgl_layout_internal.h"
#include "os_print.h"
#include "os_helpers.h"
#include "glyphs.h"
Include dependency graph for nbgl_layout_navigation.c:

Go to the source code of this file.

Macros

#define INTERNAL_SMALL_MARGIN   8
 
#define BORDER_COLOR   WHITE
 
#define NAVIGATION_HEIGHT   96
 
#define NAV_BUTTON_HEIGHT   NAVIGATION_HEIGHT
 
#define NAV_BUTTON_WIDTH   104
 

Enumerations

enum  {
  EXIT_BUTTON_INDEX = 0 , PREVIOUS_PAGE_INDEX , NEXT_PAGE_INDEX , PAGE_INDICATOR_INDEX ,
  NB_MAX_CHILDREN
}
 

Functions

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 More...
 
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. More...
 

Detailed Description

The construction of a navigation bar with buttons super-object.

Definition in file nbgl_layout_navigation.c.

Macro Definition Documentation

◆ BORDER_COLOR

#define BORDER_COLOR   WHITE

Definition at line 26 of file nbgl_layout_navigation.c.

◆ INTERNAL_SMALL_MARGIN

#define INTERNAL_SMALL_MARGIN   8

Definition at line 24 of file nbgl_layout_navigation.c.

◆ NAV_BUTTON_HEIGHT

#define NAV_BUTTON_HEIGHT   NAVIGATION_HEIGHT

Definition at line 33 of file nbgl_layout_navigation.c.

◆ NAV_BUTTON_WIDTH

#define NAV_BUTTON_WIDTH   104

Definition at line 34 of file nbgl_layout_navigation.c.

◆ NAVIGATION_HEIGHT

#define NAVIGATION_HEIGHT   96

Definition at line 32 of file nbgl_layout_navigation.c.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
EXIT_BUTTON_INDEX 
PREVIOUS_PAGE_INDEX 
NEXT_PAGE_INDEX 
PAGE_INDICATOR_INDEX 
NB_MAX_CHILDREN 

Definition at line 40 of file nbgl_layout_navigation.c.

Function Documentation

◆ layoutNavigationCallback()

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

Parameters
objtouched object (button or container)
eventTypetype of touch (only TOUCHED or SWIPED is accepted)
nbPagesnumber of pages for navigation (if < 2, no navigation keys)
activePagecurrent active page
Returns
true if actually navigated (page change)

Definition at line 87 of file nbgl_layout_navigation.c.

◆ layoutNavigationPopulate()

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.

Parameters
navContainercontainer used for the objects of the navigation
navConfigconfiguration to create the navigation bar, at the bottom of the screen
layerlayer (screen) to create the navigation bar in

Definition at line 144 of file nbgl_layout_navigation.c.