pub struct InputNodeState { /* private fields */ }Expand description
Interactive text input state stored on NodeKind::Input.
Implementations§
Source§impl InputNodeState
Text editing and fluent construction helpers for InputNodeState.
impl InputNodeState
Text editing and fluent construction helpers for InputNodeState.
Sourcepub fn with_placeholder<S>(self, placeholder: S) -> Self
pub fn with_placeholder<S>(self, placeholder: S) -> Self
Sourcepub fn with_password(self, password: bool) -> Self
pub fn with_password(self, password: bool) -> Self
Sourcepub fn with_multiline(self, multiline: bool) -> Self
pub fn with_multiline(self, multiline: bool) -> Self
Sourcepub fn with_disabled(self, disabled: bool) -> Self
pub fn with_disabled(self, disabled: bool) -> Self
Sourcepub fn insert_str(&mut self, text: &str)
pub fn insert_str(&mut self, text: &str)
Inserts text at the current caret position and advances the caret.
§Arguments
&Self- Mutable input state.&str- UTF-8 text to insert.
Source§impl InputNodeState
impl InputNodeState
pub fn get_value(&self) -> &String
pub fn get_mut_value(&mut self) -> &mut String
pub fn set_value(&mut self, val: String) -> &mut Self
pub fn get_placeholder(&self) -> &String
pub fn get_mut_placeholder(&mut self) -> &mut String
pub fn set_placeholder(&mut self, val: String) -> &mut Self
pub fn get_caret(&self) -> usize
pub fn get_mut_caret(&mut self) -> &mut usize
pub fn set_caret(&mut self, val: usize) -> &mut Self
pub fn get_password(&self) -> bool
pub fn get_mut_password(&mut self) -> &mut bool
pub fn set_password(&mut self, val: bool) -> &mut Self
pub fn get_multiline(&self) -> bool
pub fn get_mut_multiline(&mut self) -> &mut bool
pub fn set_multiline(&mut self, val: bool) -> &mut Self
pub fn get_disabled(&self) -> bool
pub fn get_mut_disabled(&mut self) -> &mut bool
pub fn set_disabled(&mut self, val: bool) -> &mut Self
Trait Implementations§
Source§impl Clone for InputNodeState
impl Clone for InputNodeState
Source§impl Debug for InputNodeState
impl Debug for InputNodeState
Source§impl Default for InputNodeState
impl Default for InputNodeState
impl Eq for InputNodeState
Source§impl PartialEq for InputNodeState
impl PartialEq for InputNodeState
impl StructuralPartialEq for InputNodeState
Auto Trait Implementations§
impl Forget for InputNodeState
impl Freeze for InputNodeState
impl Move for InputNodeState
impl RefUnwindSafe for InputNodeState
impl Send for InputNodeStatewhere
RawVecInner: Send,
impl Sync for InputNodeStatewhere
RawVecInner: Sync,
impl Unpin for InputNodeState
impl UnsafeUnpin for InputNodeState
impl UnwindSafe for InputNodeStatewhere
RawVecInner: UnwindSafe,
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