lv_bar.h
API reference for lv_bar.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)| Name | Type | Description |
|---|---|---|
obj | lv_obj_t * | pointer to a bar object |
value | int32_t | new value |
anim | lv_anim_enable_t | LV_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)| Name | Type | Description |
|---|---|---|
obj | lv_obj_t * | pointer to a bar object |
start_value | int32_t | new start value |
anim | lv_anim_enable_t | LV_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)| Name | Type | Description |
|---|---|---|
obj | lv_obj_t * | pointer to the bar object |
min | int32_t | minimum value |
max | int32_t | maximum 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)| Name | Type | Description |
|---|---|---|
obj | lv_obj_t * | pointer to the bar object |
min | int32_t | minimum 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)| Name | Type | Description |
|---|---|---|
obj | lv_obj_t * | pointer to the bar object |
max | int32_t | maximum value |
lv_bar_set_mode
Set the type of bar.
void lv_bar_set_mode(lv_obj_t *obj, lv_bar_mode_t mode)| Name | Type | Description |
|---|---|---|
obj | lv_obj_t * | pointer to bar object |
mode | lv_bar_mode_t | bar 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)| Name | Type | Description |
|---|---|---|
obj | lv_obj_t * | pointer to bar object |
orientation | lv_bar_orientation_t | bar orientation from lv_bar_orientation_t |
lv_bar_get_value
Get the value of a bar
int32_t lv_bar_get_value(const lv_obj_t *obj)| Name | Type | Description |
|---|---|---|
obj | const lv_obj_t * | pointer to a bar object |
Returns: int32_t — the value of the bar
lv_bar_get_start_value
Get the start value of a bar
int32_t lv_bar_get_start_value(const lv_obj_t *obj)| Name | Type | Description |
|---|---|---|
obj | const lv_obj_t * | pointer to a bar object |
Returns: int32_t — the start value of the bar
lv_bar_get_min_value
Get the minimum value of a bar
int32_t lv_bar_get_min_value(const lv_obj_t *obj)| Name | Type | Description |
|---|---|---|
obj | const lv_obj_t * | pointer to a bar object |
Returns: int32_t — the minimum value of the bar
lv_bar_get_max_value
Get the maximum value of a bar
int32_t lv_bar_get_max_value(const lv_obj_t *obj)| Name | Type | Description |
|---|---|---|
obj | const lv_obj_t * | pointer to a bar object |
Returns: int32_t — the maximum value of the bar
lv_bar_get_mode
Get the type of bar.
lv_bar_mode_t lv_bar_get_mode(lv_obj_t *obj)| Name | Type | Description |
|---|---|---|
obj | lv_obj_t * | pointer to bar object |
Returns: lv_bar_mode_t — bar type from lv_bar_mode_t
lv_bar_get_orientation
Get the orientation of bar.
lv_bar_orientation_t lv_bar_get_orientation(lv_obj_t *obj)| Name | Type | Description |
|---|---|---|
obj | lv_obj_t * | pointer to bar object |
Returns: lv_bar_orientation_t — bar orientation from lv_bar_orientation_t
lv_bar_create
Create a bar object
lv_obj_t * lv_bar_create(lv_obj_t *parent)| Name | Type | Description |
|---|---|---|
parent | lv_obj_t * | pointer to a parent widget May be NULL.. When NULL, the widget is created as a screen on the default display. |
Returns: lv_obj_t * — pointer to the created bar
lv_bar_is_symmetrical
Give the bar is in symmetrical mode or not
bool lv_bar_is_symmetrical(lv_obj_t *obj)| Name | Type | Description |
|---|---|---|
obj | lv_obj_t * | pointer to bar object |
Returns: bool — true: in symmetrical mode false : not in
lv_bar_bind_value
Bind an integer or float Subject to a Bar's value.
lv_observer_t * lv_bar_bind_value(lv_obj_t *obj, lv_subject_t *subject)| Name | Type | Description |
|---|---|---|
obj | lv_obj_t * | pointer to Bar |
subject | lv_subject_t * | pointer to Subject |
Returns: lv_observer_t * — pointer to newly-created Observer
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— parammode
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— paramorientation
_lv_property_bar_id_t
| Name | Value |
|---|---|
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_classDependencies
Indirect dependencies
lv_anim.hlv_area.hlv_assert.hlv_bidi.hlv_color.hlv_color_op.hlv_display.hlv_draw.hlv_draw_arc.hlv_draw_blur.hlv_draw_buf.hlv_draw_image.hlv_draw_label.hlv_draw_line.hlv_draw_rect.hlv_draw_triangle.hlv_event.hlv_ext_data.hlv_flex.hlv_font.hlv_fs.hlv_grad.hlv_grid.hlv_group.hlv_image_decoder.hlv_image_dsc.hlv_indev.hlv_layout.hlv_ll.hlv_log.hlv_math.hlv_matrix.hlv_mem.hlv_obj_class.hlv_obj_draw.hlv_obj_event.hlv_obj_pos.hlv_obj_property.hlv_obj_scroll.hlv_obj_style.hlv_obj_style_gen.hlv_obj_tree.hlv_palette.hlv_profiler.hlv_profiler_builtin.hlv_sprintf.hlv_string.hlv_style.hlv_style_gen.hlv_symbol_def.hlv_text.hlv_timer.hlv_types.h
Last updated on