MCPcopy Create free account
hub / github.com/KebsCS/KBotExt / STB_TEXTEDIT_LAYOUTROW

Function STB_TEXTEDIT_LAYOUTROW

KBotExt/imgui/imgui_widgets.cpp:3697–3708  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3695 static int STB_TEXTEDIT_KEYTOTEXT(int key) { return key >= 0x200000 ? 0 : key; }
3696 static ImWchar STB_TEXTEDIT_NEWLINE = '\n';
3697 static void STB_TEXTEDIT_LAYOUTROW(StbTexteditRow* r, ImGuiInputTextState* obj, int line_start_idx)
3698 {
3699 const ImWchar* text = obj->TextW.Data;
3700 const ImWchar* text_remaining = NULL;
3701 const ImVec2 size = InputTextCalcTextSizeW(obj->Ctx, text + line_start_idx, text + obj->CurLenW, &text_remaining, NULL, true);
3702 r->x0 = 0.0f;
3703 r->x1 = size.x;
3704 r->baseline_y_delta = size.y;
3705 r->ymin = 0.0f;
3706 r->ymax = size.y;
3707 r->num_chars = (int)(text_remaining - (text + line_start_idx));
3708 }
3709
3710 static bool is_separator(unsigned int c)
3711 {

Callers 5

stb_text_locate_coordFunction · 0.85
stb_textedit_clickFunction · 0.85
stb_textedit_dragFunction · 0.85
stb_textedit_keyFunction · 0.85

Calls 1

InputTextCalcTextSizeWFunction · 0.85

Tested by

no test coverage detected