pub struct Edit { /* private fields */ }Available on crate feature
winio only.Expand description
A simple single-line text input box.
Implementations§
Source§impl Edit
impl Edit
Sourcepub fn is_password(&self) -> Result<bool, Error>
pub fn is_password(&self) -> Result<bool, Error>
If the text input is password.
Sourcepub fn set_password(&mut self, v: bool) -> Result<(), Error>
pub fn set_password(&mut self, v: bool) -> Result<(), Error>
Set if the text input is password.
Sourcepub fn is_readonly(&self) -> Result<bool, Error>
pub fn is_readonly(&self) -> Result<bool, Error>
If the text input is read-only. A password edit cannot be read-only.
Trait Implementations§
Source§impl Component for Edit
impl Component for Edit
Source§type Init<'a> = BorrowedContainer<'a>
type Init<'a> = BorrowedContainer<'a>
Initial parameter type.
Source§type Message = EditMessage
type Message = EditMessage
The input message type to update.
Source§async fn init(
init: <Edit as Component>::Init<'_>,
_sender: &ComponentSender<Edit>,
) -> Result<Edit, Error>
async fn init( init: <Edit as Component>::Init<'_>, _sender: &ComponentSender<Edit>, ) -> Result<Edit, Error>
Create the initial component.
Source§async fn update(
&mut self,
message: Self::Message,
sender: &ComponentSender<Self>,
) -> Result<bool, Self::Error>
async fn update( &mut self, message: Self::Message, sender: &ComponentSender<Self>, ) -> Result<bool, Self::Error>
Respond to the message. Return true if need render.
Source§fn render(&mut self, sender: &ComponentSender<Self>) -> Result<(), Self::Error>
fn render(&mut self, sender: &ComponentSender<Self>) -> Result<(), Self::Error>
Render the widgets.
Source§impl Layoutable for Edit
impl Layoutable for Edit
Source§impl TextWidget for Edit
impl TextWidget for Edit
Auto Trait Implementations§
impl Freeze for Edit
impl RefUnwindSafe for Edit
impl !Send for Edit
impl !Sync for Edit
impl Unpin for Edit
impl UnsafeUnpin for Edit
impl UnwindSafe for Edit
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more