macro_rules! format_text {
($data:ident, $($arg:tt)*) => { ... };
($data:ident : $data_ty:ty , $($arg:tt)*) => { ... };
($lit:literal $(, $arg:tt)*) => { ... };
}Expand description
Construct a Text widget which updates text using the format! macro
This uses TextClass::Standard. See also format_label.
Examples:
use kas_widgets::Text;
let _ = kas_widgets::format_text!(data: &i32, "Data value: {data}");
let _: Text<i32, _> = kas_widgets::format_text!(data, "Data value: {data}");
let _: Text<i32, String> = kas_widgets::format_text!("Data value: {}");