InputText: Renamed ImGuiTextEditCallback to ImGuiInputTextCallback, ImGuiTextEditCallbackData to ImGuiInputTextCallbackData for consistency. Kept redirection types (will obsolete).
- Changed ImGui::GetTime() return value from float to double to avoid accumulating floating point imprecisions over time.
- Removed per-window ImGuiWindowFlags_ResizeFromAnySide beta flag in favor `io.ConfigResizeWindowsFromEdges=true` to enable the feature globally. (#1495)
The feature is not currently enabled by default because it is not satisfying enough.
- InputText: Renamed ImGuiTextEditCallback to ImGuiInputTextCallback, ImGuiTextEditCallbackData to ImGuiInputTextCallbackData for consistency.
Kept redirection types (will obsolete).
- InputText: Removed ImGuiTextEditCallbackData::ReadOnly since it is a duplication of (ImGuiTextEditCallbackData::Flags & ImGuiInputTextFlags_ReadOnly).
- Renamed io.OptCursorBlink to io.ConfigCursorBlink, io.OptMacOSXBehaviors to io.ConfigMacOSXBehaviors for consistency. (#1427, #473)
// NB: when active, hold on a privately held copy of the text (and apply back to 'buf'). So changing 'buf' while active has no effect.
// FIXME: Rather messy function partly because we are doing UTF8 > u16 > UTF8 conversions on the go to more easily handle stb_textedit calls. Ideally we should stay in UTF-8 all the time. See https://github.com/nothings/stb/issues/188
// - ImGuiInputTextFlags_CallbackCharFilter: return 1 if the character is not allowed. You may also set 'EventChar=0' as any character replacement are allowed.
// - ImGuiInputTextFlags_CallbackResize: BufTextLen is set to the new desired string length so you can allocate or update known size. No need to initialize new characters or zero-terminator as InputText will do it.
structImGuiTextEditCallbackData
structImGuiInputTextCallbackData
{
ImGuiInputTextFlagsEventFlag;// One ImGuiInputTextFlags_Callback* // Read-only
ImGuiInputTextFlagsFlags;// What user passed to InputText() // Read-only
structImGuiPopupRef;// Storage for current popup stack
structImGuiSettingsHandler;
structImGuiStyleMod;// Stacked style modifier, backup of modified data so we can restore it
structImGuiTextEditState;// Internal state of the currently focused/edited text input box
structImGuiWindow;// Storage for one window
structImGuiWindowTempData;// Temporary storage for one, that's the data which in theory we could ditch at the end of the frame
structImGuiWindowSettings;// Storage for window settings stored in .ini file (we keep one of those even if the actual window wasn't instanced during this session)
unsignedcharDragDropPayloadBufLocal[8];// Local buffer for small payloads
// Widget state
ImGuiTextEditStateInputTextState;
ImGuiInputTextState InputTextState;
ImFontInputTextPasswordFont;
ImGuiIDScalarAsInputTextId;// Temporary text input when CTRL+clicking on a slider, etc.
ImGuiColorEditFlagsColorEditOptions;// Store user options for color edit widgets
@ -1209,7 +1209,7 @@ namespace ImGui
IMGUI_APIboolTreeNodeBehaviorIsOpen(ImGuiIDid,ImGuiTreeNodeFlagsflags=0);// Consume previous SetNextTreeNodeOpened() data, if any. May return true when logging