Lines Matching full:if

14 #if LV_USE_LABEL != 0
65 #if LV_USE_OBJ_PROPERTY
99 #if LV_USE_OBJ_PROPERTY
105 #if LV_USE_OBJ_PROPERTY_NAME
138 /*If text is NULL then just refresh with the current text*/ in lv_label_set_text()
139 if(text == NULL) text = label->text; in lv_label_set_text()
144 /*If set its own text then reallocate it (maybe its size changed)*/ in lv_label_set_text()
145 if(label->text == text && label->static_txt == 0) { in lv_label_set_text()
148 if(label->text == NULL) return; in lv_label_set_text()
150 #if LV_USE_ARABIC_PERSIAN_CHARS in lv_label_set_text()
157 if(label->text != NULL && label->static_txt == 0) { in lv_label_set_text()
164 if(label->text == NULL) return; in lv_label_set_text()
183 /*If text is NULL then refresh*/ in lv_label_set_text_fmt()
184 if(fmt == NULL) { in lv_label_set_text_fmt()
189 if(label->text != NULL && label->static_txt == 0) { in lv_label_set_text_fmt()
208 if(label->static_txt == 0 && label->text != NULL) { in lv_label_set_text_static()
213 if(text != NULL) { in lv_label_set_text_static()
227 /*Delete the old animation (if exists)*/ in lv_label_set_long_mode()
232 if(long_mode == LV_LABEL_LONG_MODE_SCROLL || long_mode == LV_LABEL_LONG_MODE_SCROLL_CIRCULAR || in lv_label_set_long_mode()
246 #if LV_LABEL_TEXT_SELECTION in lv_label_set_text_selection_start()
260 #if LV_LABEL_TEXT_SELECTION in lv_label_set_text_selection_end()
275 if(label->recolor == en) return; in lv_label_set_recolor()
310 if(txt[0] == '\0') { in lv_label_get_letter_pos()
349 if(last_line && label->long_mode == LV_LABEL_LONG_MODE_DOTS) flag |= LV_TEXT_FLAG_BREAK_ALL; in lv_label_get_letter_pos()
352 if(byte_id < new_line_start || txt[new_line_start] == '\0') in lv_label_get_letter_pos()
359 /*If the last character is line break then go to the next line*/ in lv_label_get_letter_pos()
360 if(byte_id > 0) { in lv_label_get_letter_pos()
361 if((txt[byte_id - 1] == '\n' || txt[byte_id - 1] == '\r') && txt[byte_id] == '\0') { in lv_label_get_letter_pos()
369 #if LV_USE_BIDI in lv_label_get_letter_pos()
371 if(base_dir == LV_BASE_DIR_AUTO) base_dir = lv_bidi_detect_base_dir(txt); in lv_label_get_letter_pos()
375 if(new_line_start == byte_id) { in lv_label_get_letter_pos()
386 if(is_rtl) visual_char_pos++; in lv_label_get_letter_pos()
397 if(char_id != line_start) x += letter_space; in lv_label_get_letter_pos()
404 #if LV_USE_BIDI in lv_label_get_letter_pos()
405 if(mutable_bidi_txt) lv_free(mutable_bidi_txt); in lv_label_get_letter_pos()
437 /*If dots will be shown, break the last visible line anywhere, in lv_label_get_letter_on()
440 if(last_line && label->long_mode == LV_LABEL_LONG_MODE_DOTS) flag |= LV_TEXT_FLAG_BREAK_ALL; in lv_label_get_letter_on()
444 if(pos.y <= y + letter_height) { in lv_label_get_letter_on()
450 if(letter != '\n' && txt[new_line_start] == '\0') new_line_start++; in lv_label_get_letter_on()
460 #if LV_USE_BIDI in lv_label_get_letter_on()
462 if(bidi) { in lv_label_get_letter_on()
465 if(new_line_start > 0 && txt[new_line_start - 1] == '\0' && txt_len > 0) txt_len--; in lv_label_get_letter_on()
485 if(new_line_start > 0) { in lv_label_get_letter_on()
493 if((flag & LV_TEXT_FLAG_RECOLOR) != 0) { in lv_label_get_letter_on()
494 if(lv_text_is_cmd(&cmd_state, bidi_txt[i]) != false) { in lv_label_get_letter_on()
495 continue; /*Skip the letter if it is part of a command*/ in lv_label_get_letter_on()
501 /*Finish if the x position or the last char of the next line is reached*/ in lv_label_get_letter_on()
502if(pos.x < x + gw || i + line_start == new_line_start || txt[i_act + line_start] == '\0') { in lv_label_get_letter_on()
513 #if LV_USE_BIDI in lv_label_get_letter_on()
514 if(bidi) { in lv_label_get_letter_on()
517 if(txt[line_start + i] == '\0') { in lv_label_get_letter_on()
524 if(is_rtl) logical_pos++; in lv_label_get_letter_on()
561 if(last_line && label->long_mode == LV_LABEL_LONG_MODE_DOTS) flag |= LV_TEXT_FLAG_BREAK_ALL; in lv_label_is_char_under_pos()
565 if(pos->y <= y + letter_height) break; /*The line is found (stored in 'line_start')*/ in lv_label_is_char_under_pos()
575 if(align == LV_TEXT_ALIGN_CENTER) { in lv_label_is_char_under_pos()
580 else if(align == LV_TEXT_ALIGN_RIGHT) { in lv_label_is_char_under_pos()
594 if(new_line_start > 0) { in lv_label_is_char_under_pos()
600 if((flag & LV_TEXT_FLAG_RECOLOR) != 0) { in lv_label_is_char_under_pos()
601 if(lv_text_is_cmd(&cmd_state, txt[i]) != false) { in lv_label_is_char_under_pos()
602 continue; /*Skip the letter if it is part of a command*/ in lv_label_is_char_under_pos()
608 if(pos->x < x) { in lv_label_is_char_under_pos()
625 #if LV_LABEL_TEXT_SELECTION in lv_label_get_text_selection_start()
638 #if LV_LABEL_TEXT_SELECTION in lv_label_get_text_selection_end()
667 if(label->static_txt != 0) return; in lv_label_ins_text()
677 if(label->text == NULL) return; in lv_label_ins_text()
679 if(pos == LV_LABEL_POS_LAST) { in lv_label_ins_text()
693 if(label->static_txt) return; in lv_label_cut_text()
723 #if LV_LABEL_LONG_TXT_HINT in lv_label_constructor()
729 #if LV_LABEL_TEXT_SELECTION in lv_label_constructor()
746 if(!label->static_txt) lv_free(label->text); in lv_label_destructor()
756 if(res != LV_RESULT_OK) return; in lv_label_event()
761 if((code == LV_EVENT_STYLE_CHANGED) || (code == LV_EVENT_SIZE_CHANGED)) { in lv_label_event()
764 else if(code == LV_EVENT_REFR_EXT_DRAW_SIZE) { in lv_label_event()
766 * It happens if box_w + ofs_x > adw_w in the glyph. in lv_label_event()
773 else if(code == LV_EVENT_GET_SELF_SIZE) { in lv_label_event()
775 if(label->invalid_size_cache) { in lv_label_event()
780 if(label->recolor != 0) flag |= LV_TEXT_FLAG_RECOLOR; in lv_label_event()
781 if(label->expand != 0) flag |= LV_TEXT_FLAG_EXPAND; in lv_label_event()
784if(lv_obj_get_style_width(obj, LV_PART_MAIN) == LV_SIZE_CONTENT && !obj->w_layout) w = LV_COORD_MA… in lv_label_event()
802 else if(code == LV_EVENT_DRAW_MAIN) { in lv_label_event()
824 #if LV_LABEL_LONG_TXT_HINT in draw_main()
825 if(label->long_mode != LV_LABEL_LONG_MODE_SCROLL_CIRCULAR && in draw_main()
838if(label_draw_dsc.sel_start != LV_DRAW_LABEL_NO_TXT_SEL && label_draw_dsc.sel_end != LV_DRAW_LABEL… in draw_main()
845if((label->long_mode == LV_LABEL_LONG_MODE_SCROLL || label->long_mode == LV_LABEL_LONG_MODE_SCROLL… in draw_main()
850 if(size.x > lv_area_get_width(&txt_coords)) { in draw_main()
857 if(!is_common) { in draw_main()
861 if(label->long_mode == LV_LABEL_LONG_MODE_WRAP) { in draw_main()
866if(label->long_mode == LV_LABEL_LONG_MODE_SCROLL || label->long_mode == LV_LABEL_LONG_MODE_SCROLL_… in draw_main()
879 if(label->long_mode == LV_LABEL_LONG_MODE_SCROLL_CIRCULAR) { in draw_main()
885 if(size.x > lv_area_get_width(&txt_coords)) { in draw_main()
894 if(size.y > lv_area_get_height(&txt_coords)) { in draw_main()
909 /* If the dest animation is already running, overwrite is not allowed */ in overwrite_anim_property()
910 if(dest->act_time <= 0) in overwrite_anim_property()
918 /* If the dest animation is already running, overwrite is not allowed */ in overwrite_anim_property()
919 if(dest->act_time <= 0) in overwrite_anim_property()
937 if(label->text == NULL) return; in lv_label_refr_text()
938 #if LV_LABEL_LONG_TXT_HINT in lv_label_refr_text()
939 label->hint.line_start = -1; /*The hint is invalid if the text changes*/ in lv_label_refr_text()
960 if(label->long_mode == LV_LABEL_LONG_MODE_SCROLL) { in lv_label_refr_text()
963 if(anim_time == 0) anim_time = LV_LABEL_DEF_SCROLL_SPEED; in lv_label_refr_text()
972 if(size.x > lv_area_get_width(&txt_coords)) { in lv_label_refr_text()
976 #if LV_USE_BIDI in lv_label_refr_text()
979 if(base_dir == LV_BASE_DIR_AUTO) in lv_label_refr_text()
982 if(base_dir == LV_BASE_DIR_RTL) { in lv_label_refr_text()
1000 if(anim_cur) { in lv_label_refr_text()
1007 if(act_time < duration_resolved) { in lv_label_refr_text()
1009 if(reverse_play_in_progress) { in lv_label_refr_text()
1022 /*If a template animation exists, overwrite some property*/ in lv_label_refr_text()
1023 if(anim_template) in lv_label_refr_text()
1027 /*If a delay is happening, apply the start value manually*/ in lv_label_refr_text()
1028 if(act_time < 0) label->offset.x = start; in lv_label_refr_text()
1033 /*Delete the offset animation if not required*/ in lv_label_refr_text()
1038 if(size.y > lv_area_get_height(&txt_coords) && hor_anim == false) { in lv_label_refr_text()
1045 if(anim_cur) { in lv_label_refr_text()
1049 if(act_time < a.duration) { in lv_label_refr_text()
1051 if(reverse_play_in_progress) { in lv_label_refr_text()
1064 /*If a template animation exists, overwrite some property*/ in lv_label_refr_text()
1065 if(anim_template) { in lv_label_refr_text()
1071 /*Delete the offset animation if not required*/ in lv_label_refr_text()
1077 else if(label->long_mode == LV_LABEL_LONG_MODE_SCROLL_CIRCULAR) { in lv_label_refr_text()
1080 if(anim_time == 0) anim_time = LV_LABEL_DEF_SCROLL_SPEED; in lv_label_refr_text()
1087 if(size.x > lv_area_get_width(&txt_coords)) { in lv_label_refr_text()
1088 #if LV_USE_BIDI in lv_label_refr_text()
1092 if(base_dir == LV_BASE_DIR_AUTO) in lv_label_refr_text()
1095 if(base_dir == LV_BASE_DIR_RTL) { in lv_label_refr_text()
1116 if(act_time < duration_resolved) { in lv_label_refr_text()
1120 /*If a template animation exists, overwrite some property*/ in lv_label_refr_text()
1121 if(anim_template) { in lv_label_refr_text()
1129 /*Delete the offset animation if not required*/ in lv_label_refr_text()
1134 if(size.y > lv_area_get_height(&txt_coords) && hor_anim == false) { in lv_label_refr_text()
1142 /*If a template animation exists, overwrite some property*/ in lv_label_refr_text()
1143 if(anim_template) { in lv_label_refr_text()
1147 else if(act_time < a.duration) { in lv_label_refr_text()
1154 /*Delete the offset animation if not required*/ in lv_label_refr_text()
1159 else if(label->long_mode == LV_LABEL_LONG_MODE_DOTS) { in lv_label_refr_text()
1160 if(size.y > lv_area_get_height(&txt_coords) && /*Text overflows available area*/ in lv_label_refr_text()
1171 if(y_overed >= lv_font_get_line_height(font)) { in lv_label_refr_text()
1194 …else if(label->long_mode == LV_LABEL_LONG_MODE_CLIP || label->long_mode == LV_LABEL_LONG_MODE_WRAP… in lv_label_refr_text()
1204 if(label->dot_begin != LV_LABEL_DOT_BEGIN_INV) { in lv_label_revert_dots()
1216 if(dot_begin != LV_LABEL_DOT_BEGIN_INV) { in lv_label_set_dots()
1247 #if LV_USE_ARABIC_PERSIAN_CHARS in get_text_length()
1258 #if LV_USE_ARABIC_PERSIAN_CHARS in copy_text_to_label()
1269 if(label->recolor) flag |= LV_TEXT_FLAG_RECOLOR; in get_label_flags()
1270 if(label->expand) flag |= LV_TEXT_FLAG_EXPAND; in get_label_flags()
1273 if(lv_obj_get_style_width(obj, LV_PART_MAIN) == LV_SIZE_CONTENT && in get_label_flags()
1286 if(align == LV_TEXT_ALIGN_CENTER) { in calculate_x_coordinate()
1290 else if(align == LV_TEXT_ALIGN_RIGHT) { in calculate_x_coordinate()