lv_bar.h

API reference for lv_bar.h

Report on GitHub
See Also: Private HeaderThis header has a companion private implementation with internal data structures.lv_bar_private.h

Functions

lv_bar_set_value

Set a new value on the bar

 
void lv_bar_set_value(lv_obj_t *obj, int32_t value, lv_anim_enable_t anim)
Parameters
NameTypeDescription
objlv_obj_t *pointer to a bar object
valueint32_tnew value
animlv_anim_enable_tLV_ANIM_ON: set the value with an animation; LV_ANIM_OFF: change the value immediately

lv_bar_set_start_value

Set a new start value on the bar

 
void lv_bar_set_start_value(lv_obj_t *obj, int32_t start_value, lv_anim_enable_t anim)
Parameters
NameTypeDescription
objlv_obj_t *pointer to a bar object
start_valueint32_tnew start value
animlv_anim_enable_tLV_ANIM_ON: set the value with an animation; LV_ANIM_OFF: change the value immediately

lv_bar_set_range

Set minimum and the maximum values of a bar

 
void lv_bar_set_range(lv_obj_t *obj, int32_t min, int32_t max)
Parameters
NameTypeDescription
objlv_obj_t *pointer to the bar object
minint32_tminimum value
maxint32_tmaximum value

If min is greater than max, the drawing direction becomes to the opposite direction.

lv_bar_set_min_value

Set minimum value of a bar

 
void lv_bar_set_min_value(lv_obj_t *obj, int32_t min)
Parameters
NameTypeDescription
objlv_obj_t *pointer to the bar object
minint32_tminimum value

lv_bar_set_max_value

Set maximum value of a bar

 
void lv_bar_set_max_value(lv_obj_t *obj, int32_t max)
Parameters
NameTypeDescription
objlv_obj_t *pointer to the bar object
maxint32_tmaximum value

lv_bar_set_mode

Set the type of bar.

 
void lv_bar_set_mode(lv_obj_t *obj, lv_bar_mode_t mode)
Parameters
NameTypeDescription
objlv_obj_t *pointer to bar object
modelv_bar_mode_tbar type from lv_bar_mode_t

lv_bar_set_orientation

Set the orientation of bar.

 
void lv_bar_set_orientation(lv_obj_t *obj, lv_bar_orientation_t orientation)
Parameters
NameTypeDescription
objlv_obj_t *pointer to bar object
orientationlv_bar_orientation_tbar orientation from lv_bar_orientation_t

Enums

lv_bar_mode_t

Name
LV_BAR_MODE_NORMAL
LV_BAR_MODE_SYMMETRICAL
LV_BAR_MODE_RANGE
Used by 1 function
  • lv_bar_set_mode — param mode

lv_bar_orientation_t

Name
LV_BAR_ORIENTATION_AUTO
LV_BAR_ORIENTATION_HORIZONTAL
LV_BAR_ORIENTATION_VERTICAL
Used by 1 function
  • lv_bar_set_orientation — param orientation

_lv_property_bar_id_t

NameValue
LV_PROPERTY_BAR_VALUE(LV_PROPERTY_BAR_START + ((int) 0 )) | (( 1 ) << 28 )
LV_PROPERTY_BAR_START_VALUE(LV_PROPERTY_BAR_START + ((int) 1 )) | (( 1 ) << 28 )
LV_PROPERTY_BAR_MIN_VALUE(LV_PROPERTY_BAR_START + ((int) 2 )) | (( 1 ) << 28 )
LV_PROPERTY_BAR_MAX_VALUE(LV_PROPERTY_BAR_START + ((int) 3 )) | (( 1 ) << 28 )
LV_PROPERTY_BAR_MODE(LV_PROPERTY_BAR_START + ((int) 4 )) | (( 1 ) << 28 )
LV_PROPERTY_BAR_ORIENTATION(LV_PROPERTY_BAR_START + ((int) 5 )) | (( 1 ) << 28 )
LV_PROPERTY_BAR_END

Variables

lv_bar_class

 
const lv_obj_class_t lv_bar_class

Dependencies

How is this guide?

Last updated on

On this page