BSB Developer Docs
Loading...
Searching...
No Matches
status_view.h File Reference

Status view widget with icon, primary label, and auxiliary label. More...

#include <gui/widget.h>

Go to the source code of this file.

Typedefs

typedef struct StatusView StatusView
 StatusView opaque structure.
 

Functions

StatusView * status_view_alloc (Widget *parent)
 Create a new StatusView instance.
 
void status_view_free (StatusView *instance)
 Delete a StatusView instance.
 
Widget * status_view_get_base (StatusView *instance)
 Get a pointer to the base class instance.
 
void status_view_set_icon (StatusView *instance, const void *source, bool is_animated)
 Set the icon displayed by the StatusView.
 
void status_view_set_primary_text (StatusView *instance, const char *text)
 Set the primary text of the StatusView.
 
void status_view_set_auxiliary_text (StatusView *instance, const char *text)
 Set the auxiliary text of the StatusView.
 

Detailed Description

Status view widget with icon, primary label, and auxiliary label.

Function Documentation

◆ status_view_alloc()

StatusView * status_view_alloc ( Widget * parent)

Create a new StatusView instance.

Parameters
[in,out]parentpointer to the parent Widget instance
Returns
pointer to the newly created StatusView instance

◆ status_view_free()

void status_view_free ( StatusView * instance)

Delete a StatusView instance.

Parameters
[in,out]instancepointer to the StatusView instance to be deleted

◆ status_view_get_base()

Widget * status_view_get_base ( StatusView * instance)

Get a pointer to the base class instance.

The return value can be used in all Widget methods.

Parameters
[in,out]instancepointer to the StatusView instance to be queried
Returns
pointer to the base class instance

◆ status_view_set_auxiliary_text()

void status_view_set_auxiliary_text ( StatusView * instance,
const char * text )

Set the auxiliary text of the StatusView.

Displayed in a muted color. Passing NULL hides the label.

Parameters
[in,out]instancepointer to the StatusView instance to be modified
[in]textzero-terminated string with the auxiliary text, or NULL to hide

◆ status_view_set_icon()

void status_view_set_icon ( StatusView * instance,
const void * source,
bool is_animated )

Set the icon displayed by the StatusView.

Supports static image paths (.image) and animated icons (.anim). Passing NULL hides the icon.

Parameters
[in,out]instancepointer to the StatusView instance to be modified
[in]sourcezero-terminated string containing the icon resource path or pointer to lv_image_dsc_t
[in]is_animatedtrue if the icon is an animation, false for a static image

◆ status_view_set_primary_text()

void status_view_set_primary_text ( StatusView * instance,
const char * text )

Set the primary text of the StatusView.

Displayed in white. Passing NULL hides the label.

Parameters
[in,out]instancepointer to the StatusView instance to be modified
[in]textzero-terminated string with the primary text, or NULL to hide