Struct imgui::InputTextMultiline [−][src]
pub struct InputTextMultiline<'ui, 'p, L, T = PassthroughCallback> { /* fields omitted */ }
Implementations
Creates a new input text widget to edit the given string.
String Editing
Please note, ImGui requires this string to be null-terminated. We accomplish this
by appending and then removing a null terminator (\0
) from the String you pass in.
This has several consequences:
- The string’s backing buffer may be resized and relocated even without edits as result of this pushed char.
- The string will appear truncated if the string contains
\0
inside it. This will not cause memory unsafety, but it will limit your usage. If that’s the case, please pre-process your string. - Truncations by ImGui appear to be done primarily by insertions of
\0
to the truncation point. We will handle this for you and edit the string “properly” too, but this might show up in callbacks.
Note: this is equivalent to always_overwrite
pub fn callback<T2: InputTextCallbackHandler>(
self,
callbacks: InputTextMultilineCallback,
callback_handler: T2
) -> InputTextMultiline<'ui, 'p, L, T2>
Builds the string editor, performing string editing operations.
String Editing
Please note, ImGui requires this string to be null-terminated. We accomplish this
by appending and then removing a null terminator (\0
) from the String you pass in.
This has several consequences:
- The string’s backing buffer may be resized and relocated even without edits as result of this pushed char.
- The string will appear truncated if the string contains
\0
inside it. This will not cause memory unsafety, but it will limit your usage. If that’s the case, please pre-process your string. - Truncations by ImGui appear to be done primarily by insertions of
\0
to the truncation point. We will handle this for you and edit the string “properly” too, but this might show up in callbacks.