lv_spinbox.h
API reference for lv_spinbox.h
See Also: Private HeaderThis header has a companion private implementation with internal data structures.lv_spinbox_private.h
Functions
widgets/spinbox/lv_spinbox.h:70function
lv_spinbox_set_value
Set spinbox value
void lv_spinbox_set_value(lv_obj_t *obj, int32_t v)| Name | Type | Description |
|---|---|---|
obj | lv_obj_t * | pointer to spinbox |
v | int32_t | value to be set |
widgets/spinbox/lv_spinbox.h:77function
lv_spinbox_set_rollover
Set spinbox rollover function
void lv_spinbox_set_rollover(lv_obj_t *obj, bool rollover)| Name | Type | Description |
|---|---|---|
obj | lv_obj_t * | pointer to spinbox |
rollover | bool | true or false to enable or disable (default) |
widgets/spinbox/lv_spinbox.h:86function
lv_spinbox_set_digit_format
Set spinbox digit format (digit count and decimal format)
void lv_spinbox_set_digit_format(lv_obj_t *obj, uint32_t digit_count, uint32_t sep_pos)| Name | Type | Description |
|---|---|---|
obj | lv_obj_t * | pointer to spinbox |
digit_count | uint32_t | number of digit excluding the decimal separator and the sign |
sep_pos | uint32_t | number of digit before the decimal point. If 0, decimal point is not shown |
widgets/spinbox/lv_spinbox.h:93function
lv_spinbox_set_digit_count
Set the number of digits
void lv_spinbox_set_digit_count(lv_obj_t *obj, uint32_t digit_count)| Name | Type | Description |
|---|---|---|
obj | lv_obj_t * | pointer to spinbox |
digit_count | uint32_t | number of digits |
widgets/spinbox/lv_spinbox.h:100function
lv_spinbox_set_dec_point_pos
Set the position of the decimal point
void lv_spinbox_set_dec_point_pos(lv_obj_t *obj, uint32_t dec_point_pos)| Name | Type | Description |
|---|---|---|
obj | lv_obj_t * | pointer to spinbox |
dec_point_pos | uint32_t | 0: there is no separator, 2: two integer digits |
widgets/spinbox/lv_spinbox.h:107function
lv_spinbox_set_step
Set spinbox step
void lv_spinbox_set_step(lv_obj_t *obj, uint32_t step)| Name | Type | Description |
|---|---|---|
obj | lv_obj_t * | pointer to spinbox |
step | uint32_t | steps on increment/decrement. Can be 1, 10, 100, 1000, etc the digit that will change. |
widgets/spinbox/lv_spinbox.h:115function
lv_spinbox_set_range
Set spinbox value range
void lv_spinbox_set_range(lv_obj_t *obj, int32_t min_value, int32_t max_value)| Name | Type | Description |
|---|---|---|
obj | lv_obj_t * | pointer to spinbox |
min_value | int32_t | minimum value, inclusive |
max_value | int32_t | maximum value, inclusive |
widgets/spinbox/lv_spinbox.h:122function
lv_spinbox_set_min_value
Set the minimum value
void lv_spinbox_set_min_value(lv_obj_t *obj, int32_t min_value)| Name | Type | Description |
|---|---|---|
obj | lv_obj_t * | pointer to spinbox |
min_value | int32_t | the minimum value |
widgets/spinbox/lv_spinbox.h:129function
lv_spinbox_set_max_value
Set the maximum value
void lv_spinbox_set_max_value(lv_obj_t *obj, int32_t max_value)| Name | Type | Description |
|---|---|---|
obj | lv_obj_t * | pointer to spinbox |
max_value | int32_t | the maximum value |
widgets/spinbox/lv_spinbox.h:136function
lv_spinbox_set_cursor_pos
Set cursor position to a specific digit for edition
void lv_spinbox_set_cursor_pos(lv_obj_t *obj, uint32_t pos)| Name | Type | Description |
|---|---|---|
obj | lv_obj_t * | pointer to spinbox |
pos | uint32_t | selected position in spinbox |
widgets/spinbox/lv_spinbox.h:143function
lv_spinbox_set_digit_step_direction
Set direction of digit step when clicking an encoder button while in editing mode
void lv_spinbox_set_digit_step_direction(lv_obj_t *obj, lv_dir_t direction)| Name | Type | Description |
|---|---|---|
obj | lv_obj_t * | pointer to spinbox |
direction | lv_dir_t | the direction (LV_DIR_RIGHT or LV_DIR_LEFT) |
Enums
_lv_property_spinbox_id_t
| Name | Value |
|---|---|
LV_PROPERTY_SPINBOX_VALUE | (LV_PROPERTY_SPINBOX_START + ((int) 0 )) | (( 1 ) << 28 ) |
LV_PROPERTY_SPINBOX_ROLLOVER | (LV_PROPERTY_SPINBOX_START + ((int) 1 )) | (( 11 ) << 28 ) |
LV_PROPERTY_SPINBOX_DIGIT_COUNT | (LV_PROPERTY_SPINBOX_START + ((int) 2 )) | (( 1 ) << 28 ) |
LV_PROPERTY_SPINBOX_DEC_POINT_POS | (LV_PROPERTY_SPINBOX_START + ((int) 3 )) | (( 1 ) << 28 ) |
LV_PROPERTY_SPINBOX_STEP | (LV_PROPERTY_SPINBOX_START + ((int) 4 )) | (( 1 ) << 28 ) |
LV_PROPERTY_SPINBOX_MIN_VALUE | (LV_PROPERTY_SPINBOX_START + ((int) 5 )) | (( 1 ) << 28 ) |
LV_PROPERTY_SPINBOX_MAX_VALUE | (LV_PROPERTY_SPINBOX_START + ((int) 6 )) | (( 1 ) << 28 ) |
LV_PROPERTY_SPINBOX_DIGIT_STEP_DIRECTION | (LV_PROPERTY_SPINBOX_START + ((int) 7 )) | (( 1 ) << 28 ) |
LV_PROPERTY_SPINBOX_END |
Macros
LV_SPINBOX_MAX_DIGIT_COUNT
#define LV_SPINBOX_MAX_DIGIT_COUNT 10Variables
widgets/spinbox/lv_spinbox.h:34variable
lv_spinbox_class
const lv_obj_class_t lv_spinbox_classDependencies
Indirect dependencies
lv_anim.hlv_area.hlv_array.hlv_assert.hlv_bidi.hlv_color.hlv_color_op.hlv_conf_internal.hlv_conf_kconfig.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_label.hlv_layout.hlv_ll.hlv_log.hlv_math.hlv_matrix.hlv_mem.hlv_obj.hlv_obj_class.hlv_obj_draw.hlv_obj_event.hlv_obj_pos.hlv_obj_property.hlv_obj_property_names.hlv_obj_scroll.hlv_obj_style.hlv_obj_style_gen.hlv_obj_tree.hlv_observer.hlv_palette.hlv_profiler.hlv_profiler_builtin.hlv_sprintf.hlv_string.hlv_style.hlv_style_gen.hlv_style_properties.hlv_symbol_def.hlv_text.hlv_tick.hlv_timer.hlv_types.h
How is this guide?
Last updated on