minor api renames: set/get_static_text/options -> set/get_text/options_static

This commit is contained in:
Gabor Kiss-Vamosi
2020-04-28 21:07:10 +02:00
parent 1245411328
commit f14c387de3
6 changed files with 11 additions and 11 deletions
+2 -2
View File
@@ -124,12 +124,12 @@ void lv_checkbox_set_text(lv_obj_t * cb, const char * txt)
* @param cb pointer to a check box
* @param txt the text of the check box. NULL to refresh with the current text.
*/
void lv_checkbox_set_static_text(lv_obj_t * cb, const char * txt)
void lv_checkbox_set_text_static(lv_obj_t * cb, const char * txt)
{
LV_ASSERT_OBJ(cb, LV_OBJX_NAME);
lv_checkbox_ext_t * ext = lv_obj_get_ext_attr(cb);
lv_label_set_static_text(ext->label, txt);
lv_label_set_text_static(ext->label, txt);
}
/*=====================
+1 -1
View File
@@ -85,7 +85,7 @@ void lv_checkbox_set_text(lv_obj_t * cb, const char * txt);
* @param cb pointer to a check box
* @param txt the text of the check box. NULL to refresh with the current text.
*/
void lv_checkbox_set_static_text(lv_obj_t * cb, const char * txt);
void lv_checkbox_set_text_static(lv_obj_t * cb, const char * txt);
/**
* Set the state of the check box
+4 -4
View File
@@ -124,7 +124,7 @@ lv_obj_t * lv_dropdown_create(lv_obj_t * par, const lv_obj_t * copy)
/*Init the new drop down list drop down list*/
if(copy == NULL) {
lv_obj_set_width(ddlist, LV_DPX(150));
lv_dropdown_set_static_options(ddlist, "Option 1\nOption 2\nOption 3");
lv_dropdown_set_options_static(ddlist, "Option 1\nOption 2\nOption 3");
lv_theme_apply(ddlist, LV_THEME_DROPDOWN);
}
/*Copy an existing drop down list*/
@@ -133,7 +133,7 @@ lv_obj_t * lv_dropdown_create(lv_obj_t * par, const lv_obj_t * copy)
if(copy_ext->static_txt == 0)
lv_dropdown_set_options(ddlist, lv_dropdown_get_options(copy));
else
lv_dropdown_set_static_options(ddlist, lv_dropdown_get_options(copy));
lv_dropdown_set_options_static(ddlist, lv_dropdown_get_options(copy));
ext->option_cnt = copy_ext->option_cnt;
ext->sel_opt_id = copy_ext->sel_opt_id;
ext->sel_opt_id_orig = copy_ext->sel_opt_id;
@@ -238,7 +238,7 @@ void lv_dropdown_set_options(lv_obj_t * ddlist, const char * options)
* @param ddlist pointer to drop down list object
* @param options a staic string with '\n' separated options. E.g. "One\nTwo\nThree"
*/
void lv_dropdown_set_static_options(lv_obj_t * ddlist, const char * options)
void lv_dropdown_set_options_static(lv_obj_t * ddlist, const char * options)
{
LV_ASSERT_OBJ(ddlist, LV_OBJX_NAME);
LV_ASSERT_STR(options);
@@ -612,7 +612,7 @@ void lv_dropdown_open(lv_obj_t * ddlist)
lv_page_set_scrl_fit(ext->page, LV_FIT_TIGHT);
lv_obj_t * label = lv_label_create(ext->page, NULL);
lv_label_set_static_text(label, ext->options);
lv_label_set_text_static(label, ext->options);
lv_cont_set_fit2(ext->page, LV_FIT_TIGHT, LV_FIT_NONE);
lv_coord_t label_h = lv_obj_get_height(label);
+1 -1
View File
@@ -117,7 +117,7 @@ void lv_dropdown_set_options(lv_obj_t * ddlist, const char * options);
* @param ddlist pointer to drop down list object
* @param options a static string with '\n' separated options. E.g. "One\nTwo\nThree"
*/
void lv_dropdown_set_static_options(lv_obj_t * ddlist, const char * options);
void lv_dropdown_set_options_static(lv_obj_t * ddlist, const char * options);
/**
* Add an options to a drop down list from a string. Only works for dynamic options.
+2 -2
View File
@@ -140,7 +140,7 @@ lv_obj_t * lv_label_create(lv_obj_t * par, const lv_obj_t * copy)
if(copy_ext->static_txt == 0)
lv_label_set_text(new_label, lv_label_get_text(copy));
else
lv_label_set_static_text(new_label, lv_label_get_text(copy));
lv_label_set_text_static(new_label, lv_label_get_text(copy));
/*In DOT mode save the text byte-to-byte because a '\0' can be in the middle*/
if(copy_ext->long_mode == LV_LABEL_LONG_DOT) {
@@ -316,7 +316,7 @@ void lv_label_set_array_text(lv_obj_t * label, const char * array, uint16_t size
* @param label pointer to a label object
* @param text pointer to a text. NULL to refresh with the current text.
*/
void lv_label_set_static_text(lv_obj_t * label, const char * text)
void lv_label_set_text_static(lv_obj_t * label, const char * text)
{
LV_ASSERT_OBJ(label, LV_OBJX_NAME);
+1 -1
View File
@@ -150,7 +150,7 @@ void lv_label_set_array_text(lv_obj_t * label, const char * array, uint16_t size
* @param label pointer to a label object
* @param text pointer to a text. NULL to refresh with the current text.
*/
void lv_label_set_static_text(lv_obj_t * label, const char * text);
void lv_label_set_text_static(lv_obj_t * label, const char * text);
/**
* Set the behavior of the label with longer text then the object size