1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
//! String helpers (ImString and scratch buffers)
//!
//! Utilities for working with strings across the Rust <-> Dear ImGui FFI
//! boundary.
//!
//! - `ImString`: an owned, growable UTF-8 string that maintains a trailing
//! NUL byte as required by C APIs. Useful for zero-copy text editing via
//! ImGui callbacks.
//! - `UiBuffer`: an internal scratch buffer used by [`Ui`] methods to stage
//! temporary C strings for widget labels and hints.
//!
//! Example (zero-copy text input with `ImString`):
//! ```no_run
//! # use dear_imgui_rs::*;
//! # let mut ctx = Context::create();
//! # let ui = ctx.frame();
//! let mut s = ImString::with_capacity(256);
//! if ui.input_text_imstr("Edit", &mut s).build() {
//! // edited in-place, no extra copies
//! }
//! ```
//!
//! The unused `ImStr` alias and allocating `im_str!` compatibility macro are intentionally absent:
//! ```compile_fail
//! let _: dear_imgui_rs::ImStr<'static> = std::borrow::Cow::Borrowed("text");
//! ```
//! ```compile_fail
//! let _ = dear_imgui_rs::im_str!("text");
//! ```
pub use UiBuffer;
pub use ImString;
pub use tls_scratch_txt;
pub use ;