Lines Matching defs:text

150 void ImGui::TextEx(const char* text, const char* text_end, ImGuiTextFlags flags)
158 if (text == text_end)
159 text = text_end = "";
162 const char* text_begin = text;
164 text_end = text + strlen(text); // FIXME-OPT
169 if (text_end - text > 2000 && !wrap_enabled)
171 // Long text!
172 // Perform manual coarse clipping to optimize for long multi-line text
174 // - We also don't vertically center the text within the line full height, which is unlikely to matter because we are likely the biggest and only item on the line.
176 const char* line = text;
180 // Lines to skip (can't skip when logging text)
252 // Render (we don't hide text after ## in this end-user function)
257 void ImGui::TextUnformatted(const char* text, const char* text_end)
259 TextEx(text, text_end, ImGuiTextFlags_NoWidthForLargeClippedText);
349 // Add a label+text combo aligned to other label+value widgets
399 const ImVec2 total_size = ImVec2(g.FontSize + (label_size.x > 0.0f ? (label_size.x + style.FramePadding.x * 2) : 0.0f), label_size.y); // Empty text doesn't add padding
682 if ((flags & ImGuiButtonFlags_AlignTextBaseLine) && style.FramePadding.y < window->DC.CurrLineTextBaseOffset) // Try to vertically align buttons that are smaller/have no padding so that text baseline matches (bit hacky, since it shouldn't be a flag)
719 // Small buttons fits within text without additional vertical spacing.
1682 PushStyleVar(ImGuiStyleVar_WindowPadding, ImVec2(g.Style.FramePadding.x, g.Style.WindowPadding.y)); // Horizontally align ourselves with the framed text
3212 // For the vertical slider we allow centered text to overlap the frame padding
3352 // Create text input in place of another active widget (e.g. used when doing a CTRL+Click on drag/slider widgets)
3659 // 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)
3670 const ImWchar* text = obj->TextW.Data;
3672 const ImVec2 size = InputTextCalcTextSizeW(text + line_start_idx, text + obj->CurLenW, &text_remaining, NULL, true);
3678 r->num_chars = (int)(text_remaining - (text + line_start_idx));
3703 // Offset remaining text (FIXME-OPT: Use memmove)
3729 ImWchar* text = obj->TextW.Data;
3731 memmove(text + pos + new_text_len, text + pos, (size_t)(text_len - pos) * sizeof(ImWchar));
3732 memcpy(text + pos, new_text, (size_t)new_text_len * sizeof(ImWchar));
3749 #define STB_TEXTEDIT_K_TEXTSTART 0x200006 // keyboard input to move cursor to start of text
3750 #define STB_TEXTEDIT_K_TEXTEND 0x200007 // keyboard input to move cursor to end of text
3766 static void stb_textedit_replace(ImGuiInputTextState* str, STB_TexteditState* state, const STB_TEXTEDIT_CHARTYPE* text, int text_len)
3772 if (ImStb::STB_TEXTEDIT_INSERTCHARS(str, 0, text, text_len))
3795 // Public API to manipulate UTF-8 text
3936 // Edit a string of text
3940 // - When active, hold on a privately held copy of the text (and apply back to 'buf'). So changing 'buf' while the InputText is active has no effect.
4126 // FIXME-OPT: Because our selection/cursor code currently needs the wide text we need to convert it when active, which is not ideal :(
4218 // Process regular text input (before we check for Return because using some IME will effectively send a Return?)
4462 ImWchar* text = state->TextW.Data;
4463 const int utf8_cursor_pos = callback_data.CursorPos = ImTextCountUtf8BytesFromStr(text, text + state->Stb.cursor);
4464 const int utf8_selection_start = callback_data.SelectionStart = ImTextCountUtf8BytesFromStr(text, text + state->Stb.select_start);
4465 const int utf8_selection_end = callback_data.SelectionEnd = ImTextCountUtf8BytesFromStr(text, text + state->Stb.select_end);
4480 IM_ASSERT(callback_data.BufTextLen == (int)strlen(callback_data.Buf)); // You need to maintain BufTextLen if you change the text!
4560 // Render text. We currently only render selection when the widget is active or while scrolling.
4568 // Render text (with cursor and selection)
4570 // - Display the text (this alone can be more easily clipped)
4572 // - Measure text height (for scrollbar)
4573 // We are attempting to do most of that in **one main pass** to minimize the computation cost (non-negligible for large amount of text) + 2nd pass for selection rendering (we could merge them by an extra refactoring effort)
4623 // Store text height (note that we haven't calculated text width at all, see GitHub issues #383, #1224)
4717 // Notify OS of text input position for advanced IME (-1 x offset so that Windows IME can cover our cursor. Bit of an extra nicety.)
4724 // Render text only (no selection, no cursor)
4749 // Log as text
5547 void ImGui::ColorTooltip(const char* text, const float* col, ImGuiColorEditFlags flags)
5552 const char* text_end = text ? FindRenderedTextEnd(text, NULL) : text;
5553 if (text_end > text)
5555 TextEx(text, text_end);
5970 else // Leaf without bullet, left-adjusted text
6101 // FIXME: CloseButton can overlap into text, need find a way to clip the text somehow.
6122 // Tip: pass a non-visible label (e.g. "##hello") then you can use the space to draw other text or image.
6376 // Assume all items have even height (= 1 line of text). If you need items of different height,
6685 // We remove 1 worth of rounding to Max.x to that text in long menus and small windows don't tend to display over the lower-right rounded area, which looks particularly glitchy.
6784 // For the main menu bar, which cannot be moved, we honor g.Style.DisplaySafeAreaPadding to ensure text can be visible on a TV set.
8127 // Render text label (with custom clipping) + Unsaved Document marker + Close Button logic
8143 // But right now if you want to alter text color of tabs this is what you need to do.
8150 // Render text label (with clipping + alpha gradient) + unsaved marker