mirror of
https://github.com/ocornut/imgui.git
synced 2026-01-09 23:54:20 +00:00
InputText: use TextSrc more consistently to facilitate accessing user buffer in text processing code. (#8242)
Followup toe900571Removed SetClipboardText() trick used inabd07f6d(#7925)
This commit is contained in:
parent
e900571ac2
commit
32f11402f9
2 changed files with 36 additions and 44 deletions
|
|
@ -1124,6 +1124,7 @@ struct IMGUI_API ImGuiInputTextState
|
|||
ImGuiInputTextFlags Flags; // copy of InputText() flags. may be used to check if e.g. ImGuiInputTextFlags_Password is set.
|
||||
ImGuiID ID; // widget id owning the text state
|
||||
int TextLen; // UTF-8 length of the string in TextA (in bytes)
|
||||
const char* TextSrc; // == TextA.Data unless read-only, in which case == buf passed to InputText(). Field only set and valid _inside_ the call InputText() call.
|
||||
ImVector<char> TextA; // main UTF8 buffer. TextA.Size is a buffer size! Should always be >= buf_size passed by user (and of course >= CurLenA + 1).
|
||||
ImVector<char> TextToRevertTo; // value to revert to when pressing Escape = backup of end-user buffer at the time of focus (in UTF-8, unaltered)
|
||||
ImVector<char> CallbackTextBackup; // temporary storage for callback to support automatic reconcile of undo-stack
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue