MCPcopy Create free account
hub / github.com/Aegel5/SimpleSwitcher / InputTextCalcTextSize

Function InputTextCalcTextSize

imgui_tiny_app/imgui/imgui_widgets.cpp:3993–3999  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3991}
3992
3993static ImVec2 InputTextCalcTextSize(ImGuiContext* ctx, const char* text_begin, const char* text_end_display, const char* text_end, const char** out_remaining, ImVec2* out_offset, ImDrawTextFlags flags)
3994{
3995 ImGuiContext& g = *ctx;
3996 ImGuiInputTextState* obj = &g.InputTextState;
3997 IM_ASSERT(text_end_display >= text_begin && text_end_display <= text_end);
3998 return ImFontCalcTextSizeEx(g.Font, g.FontSize, FLT_MAX, obj->WrapWidth, text_begin, text_end_display, text_end, out_remaining, out_offset, flags);
3999}
4000
4001// Wrapper for stb_textedit.h to edit text (our wrapper is for: statically sized buffer, single-line, wchar characters. InputText converts between UTF-8 and wchar)
4002// With our UTF-8 use of stb_textedit:

Callers 2

STB_TEXTEDIT_LAYOUTROWFunction · 0.85

Calls 1

ImFontCalcTextSizeExFunction · 0.85

Tested by

no test coverage detected