Lines Matching refs:bar

9 static lv_obj_t * bar = NULL;  variable
14 bar = lv_bar_create(active_screen); in setUp()
23 TEST_ASSERT_EQUAL(0, lv_bar_get_min_value(bar)); in test_bar_should_have_valid_default_attributes()
24 TEST_ASSERT_EQUAL(100, lv_bar_get_max_value(bar)); in test_bar_should_have_valid_default_attributes()
25 TEST_ASSERT_EQUAL(LV_BAR_MODE_NORMAL, lv_bar_get_mode(bar)); in test_bar_should_have_valid_default_attributes()
46 lv_bar_t * bar_ptr = (lv_bar_t *) bar; in test_bar_should_update_indicator_right_coordinate_based_on_bar_value()
59 lv_obj_remove_style_all(bar); in test_bar_should_update_indicator_right_coordinate_based_on_bar_value()
60 lv_obj_add_style(bar, &bar_style, LV_PART_MAIN); in test_bar_should_update_indicator_right_coordinate_based_on_bar_value()
63 lv_obj_set_size(bar, bar_width, bar_height); in test_bar_should_update_indicator_right_coordinate_based_on_bar_value()
64 lv_bar_set_value(bar, bar_value, LV_ANIM_OFF); in test_bar_should_update_indicator_right_coordinate_based_on_bar_value()
72 lv_coord_t bar_max_value = lv_bar_get_max_value(bar); in test_bar_should_update_indicator_right_coordinate_based_on_bar_value()
73 lv_coord_t indicator_part_width = lv_obj_get_content_width(bar); in test_bar_should_update_indicator_right_coordinate_based_on_bar_value()
74 lv_coord_t sides_padding = lv_obj_get_style_pad_left(bar, LV_PART_MAIN); in test_bar_should_update_indicator_right_coordinate_based_on_bar_value()
75 sides_padding += lv_obj_get_style_pad_right(bar, LV_PART_MAIN); in test_bar_should_update_indicator_right_coordinate_based_on_bar_value()
101 lv_bar_t * bar_ptr = (lv_bar_t *) bar; in test_bar_rtl_should_update_indicator_left_coordinate_based_on_bar_value()
114 lv_obj_remove_style_all(bar); in test_bar_rtl_should_update_indicator_left_coordinate_based_on_bar_value()
115 lv_obj_add_style(bar, &bar_style, LV_PART_MAIN); in test_bar_rtl_should_update_indicator_left_coordinate_based_on_bar_value()
118 lv_obj_set_size(bar, bar_width, bar_height); in test_bar_rtl_should_update_indicator_left_coordinate_based_on_bar_value()
119 lv_bar_set_value(bar, bar_value, LV_ANIM_OFF); in test_bar_rtl_should_update_indicator_left_coordinate_based_on_bar_value()
120 lv_obj_set_style_base_dir(bar, LV_BASE_DIR_RTL, 0); in test_bar_rtl_should_update_indicator_left_coordinate_based_on_bar_value()
128 lv_coord_t bar_max_value = lv_bar_get_max_value(bar); in test_bar_rtl_should_update_indicator_left_coordinate_based_on_bar_value()
129 lv_coord_t indicator_part_width = lv_obj_get_content_width(bar); in test_bar_rtl_should_update_indicator_left_coordinate_based_on_bar_value()
130 lv_coord_t right_padding = lv_obj_get_style_pad_right(bar, LV_PART_MAIN); in test_bar_rtl_should_update_indicator_left_coordinate_based_on_bar_value()
141 lv_bar_t * bar_ptr = (lv_bar_t *) bar; in test_bar_indicator_area_should_get_smaller_when_padding_is_increased()
151 lv_bar_set_value(bar, 50, LV_ANIM_OFF); in test_bar_indicator_area_should_get_smaller_when_padding_is_increased()
160 lv_obj_set_size(bar, 100, 50); in test_bar_indicator_area_should_get_smaller_when_padding_is_increased()
163 lv_obj_remove_style_all(bar); in test_bar_indicator_area_should_get_smaller_when_padding_is_increased()
164 lv_obj_add_style(bar, &bar_style, LV_PART_MAIN); in test_bar_indicator_area_should_get_smaller_when_padding_is_increased()
181 lv_bar_set_value(bar, 90, LV_ANIM_OFF); in test_bar_start_value_should_only_change_when_in_range_mode()
182 lv_bar_set_start_value(bar, new_start_value, LV_ANIM_OFF); in test_bar_start_value_should_only_change_when_in_range_mode()
185 TEST_ASSERT_EQUAL_INT32(0u, lv_bar_get_start_value(bar)); in test_bar_start_value_should_only_change_when_in_range_mode()
188 lv_bar_set_mode(bar, LV_BAR_MODE_RANGE); in test_bar_start_value_should_only_change_when_in_range_mode()
189 lv_bar_set_start_value(bar, new_start_value, LV_ANIM_OFF); in test_bar_start_value_should_only_change_when_in_range_mode()
191 TEST_ASSERT_EQUAL_INT32(new_start_value, lv_bar_get_start_value(bar)); in test_bar_start_value_should_only_change_when_in_range_mode()
197 lv_bar_set_mode(bar, LV_BAR_MODE_RANGE); in test_bar_start_value_should_be_smaller_than_current_value_in_range_mode()
198 lv_bar_set_value(bar, 50, LV_ANIM_OFF); in test_bar_start_value_should_be_smaller_than_current_value_in_range_mode()
199 lv_bar_set_start_value(bar, 100u, LV_ANIM_OFF); in test_bar_start_value_should_be_smaller_than_current_value_in_range_mode()
201 TEST_ASSERT_EQUAL_INT32(lv_bar_get_value(bar), lv_bar_get_start_value(bar)); in test_bar_start_value_should_be_smaller_than_current_value_in_range_mode()
206 int32_t max_value = lv_bar_get_max_value(bar); in test_bar_current_value_should_be_truncated_to_max_value_when_exceeds_it()
209 lv_bar_set_value(bar, new_value, LV_ANIM_OFF); in test_bar_current_value_should_be_truncated_to_max_value_when_exceeds_it()
210 TEST_ASSERT_EQUAL_INT32(max_value, lv_bar_get_value(bar)); in test_bar_current_value_should_be_truncated_to_max_value_when_exceeds_it()
215 int32_t min_value = lv_bar_get_min_value(bar); in test_bar_current_value_should_be_truncated_to_min_value_when_it_is_below_it()
218 lv_bar_set_value(bar, new_value, LV_ANIM_OFF); in test_bar_current_value_should_be_truncated_to_min_value_when_it_is_below_it()
219 TEST_ASSERT_EQUAL_INT32(min_value, lv_bar_get_value(bar)); in test_bar_current_value_should_be_truncated_to_min_value_when_it_is_below_it()
231 lv_bar_t * bar_ptr = (lv_bar_t *) bar; in test_bar_indicator_should_be_drawn_towards_the_min_range_side_after_setting_a_more_negative_value()
234 lv_obj_set_size(bar, 100, 50); in test_bar_indicator_should_be_drawn_towards_the_min_range_side_after_setting_a_more_negative_value()
235 lv_bar_set_mode(bar, LV_BAR_MODE_SYMMETRICAL); in test_bar_indicator_should_be_drawn_towards_the_min_range_side_after_setting_a_more_negative_value()
236 lv_bar_set_range(bar, -100, 100); in test_bar_indicator_should_be_drawn_towards_the_min_range_side_after_setting_a_more_negative_value()
239 lv_bar_set_value(bar, 1, LV_ANIM_OFF); in test_bar_indicator_should_be_drawn_towards_the_min_range_side_after_setting_a_more_negative_value()
245 lv_bar_set_value(bar, -50, LV_ANIM_OFF); in test_bar_indicator_should_be_drawn_towards_the_min_range_side_after_setting_a_more_negative_value()