Lines Matching defs:find
5 // Grep for [DEAR IMGUI] to find the changes.
407 // search rows to find one that straddles 'y'
514 // find the x/y location of a character, and remember info about the previous row in
516 static void stb_textedit_find_charpos(StbFindState *find, STB_TEXTEDIT_STRING *str, int n, int single_line)
524 // if it's at the end, then find the last line -- simpler than trying to
528 find->y = 0;
529 find->first_char = 0;
530 find->length = z;
531 find->height = r.ymax - r.ymin;
532 find->x = r.x1;
534 find->y = 0;
535 find->x = 0;
536 find->height = 1;
542 find->first_char = i;
543 find->length = 0;
544 find->prev_first = prev_start;
549 // search rows to find the one that straddles character n
550 find->y = 0;
558 find->y += r.baseline_y_delta;
561 find->first_char = first = i;
562 find->length = r.num_chars;
563 find->height = r.ymax - r.ymin;
564 find->prev_first = prev_start;
566 // now scan to find xpos
567 find->x = r.x0;
569 find->x += STB_TEXTEDIT_GETWIDTH(str, first, i);
859 StbFindState find;
876 stb_textedit_find_charpos(&find, str, state->cursor, state->single_line);
878 // now find character position down a row
879 if (find.length) {
880 float goal_x = state->has_preferred_x ? state->preferred_x : find.x;
882 int start = find.first_char + find.length;
910 StbFindState find;
927 stb_textedit_find_charpos(&find, str, state->cursor, state->single_line);
930 if (find.prev_first != find.first_char) {
931 // now find character position up a row
932 float goal_x = state->has_preferred_x ? state->preferred_x : find.x;
934 state->cursor = find.prev_first;
938 float dx = STB_TEXTEDIT_GETWIDTH(str, find.prev_first, i);