pub struct EditData {
pub text: TextData,
pub cursor: usize,
pub max_length: usize,
pub numeric: bool,
pub range: Option<[f32; 2]>,
pub password: bool,
pub allowed: String,
pub caret: bool,
pub blink: f32,
}Expand description
The state of an edit box.
Fields§
§text: TextDataThe text, and its layout.
cursor: usizeCursor in Unicode scalar values, never byte offsets.
max_length: usizeThe most characters it takes.
numeric: boolWhether it takes a number.
range: Option<[f32; 2]>The smallest and the largest number, for a number box.
password: boolDrawn as *s (EditDescription).
allowed: StringThe characters it takes, any when empty (a NumberEdit’s digits, and - when it may go below
zero).
caret: boolThe caret’s blink (flipping every half second).
blink: f32The time since the caret last changed, in seconds.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for EditData
impl RefUnwindSafe for EditData
impl Send for EditData
impl Sync for EditData
impl Unpin for EditData
impl UnsafeUnpin for EditData
impl UnwindSafe for EditData
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more