Text Functions
Functions for displaying text in various styles and formats.Text
const char*
Format string (printf-style)
TextUnformatted
Text("%s", text) but faster with no memory copy, no buffer size limits.
const char*
Text to display
const char*
default:"NULL"
Optional end pointer. If specified, doesn’t require null-terminated string
TextColored
PushStyleColor(ImGuiCol_Text, col); Text(fmt, ...); PopStyleColor();
const ImVec4&
RGBA color (0.0f to 1.0f per component)
const char*
Format string (printf-style)
TextDisabled
PushStyleColor(ImGuiCol_Text, style.Colors[ImGuiCol_TextDisabled]); Text(fmt, ...); PopStyleColor();
const char*
Format string (printf-style)
TextWrapped
PushTextWrapPos(0.0f); Text(fmt, ...); PopTextWrapPos();. Note that this won’t work on an auto-resizing window if there’s no other widgets to extend the window width.
const char*
Format string (printf-style)
LabelText
const char*
Label text displayed on the left
const char*
Format string for the value (printf-style)
BulletText
Bullet() + Text().
const char*
Format string (printf-style)
SeparatorText
const char*
Text to display in the separator
Helper Functions
Bullet
GetTreeNodeToLabelSpacing(), same distance that TreeNode() uses.
CalcTextSize
const char*
Text to measure
const char*
default:"NULL"
Optional end pointer
bool
default:"false"
Hide text after ##
float
default:"-1.0f"
Wrap width (-1.0f = no wrapping)
ImVec2
Size of the text in pixels