pub enum TextBoxMessage {
SelectionBrush(Brush),
CaretBrush(Brush),
TextCommitMode(TextCommitMode),
Multiline(bool),
Editable(bool),
}Expand description
A message that could be used to alternate text box widget’s state or receive changes from it.
§Important notes
Text box widget also supports TextMessage and WidgetMessage.
Variants§
SelectionBrush(Brush)
Used to change selection brush of a text box. Use TextBoxMessage::selection_brush` to create the message.
CaretBrush(Brush)
Used to change caret brush of a text box. Use TextBoxMessage::caret_brush` to create the message.
TextCommitMode(TextCommitMode)
Used to change text commit mode of a text box. Use TextBoxMessage::text_commit_mode` to create the message.
Multiline(bool)
Used to enable or disable multiline mode of a text box. Use TextBoxMessage::multiline` to create the message.
Editable(bool)
Used to enable or disable an ability to edit text box content. Use TextBoxMessage::editable` to create the message.
Implementations§
Source§impl TextBoxMessage
impl TextBoxMessage
Sourcepub fn selection_brush(
destination: Handle<UiNode>,
direction: MessageDirection,
value: Brush,
) -> UiMessage
pub fn selection_brush( destination: Handle<UiNode>, direction: MessageDirection, value: Brush, ) -> UiMessage
Creates TextBoxMessage::SelectionBrush.
Sourcepub fn caret_brush(
destination: Handle<UiNode>,
direction: MessageDirection,
value: Brush,
) -> UiMessage
pub fn caret_brush( destination: Handle<UiNode>, direction: MessageDirection, value: Brush, ) -> UiMessage
Creates TextBoxMessage::CaretBrush.
Sourcepub fn text_commit_mode(
destination: Handle<UiNode>,
direction: MessageDirection,
value: TextCommitMode,
) -> UiMessage
pub fn text_commit_mode( destination: Handle<UiNode>, direction: MessageDirection, value: TextCommitMode, ) -> UiMessage
Creates TextBoxMessage::TextCommitMode.
Sourcepub fn multiline(
destination: Handle<UiNode>,
direction: MessageDirection,
value: bool,
) -> UiMessage
pub fn multiline( destination: Handle<UiNode>, direction: MessageDirection, value: bool, ) -> UiMessage
Creates TextBoxMessage::Multiline.
Sourcepub fn editable(
destination: Handle<UiNode>,
direction: MessageDirection,
value: bool,
) -> UiMessage
pub fn editable( destination: Handle<UiNode>, direction: MessageDirection, value: bool, ) -> UiMessage
Creates TextBoxMessage::Editable.
Trait Implementations§
Source§impl Clone for TextBoxMessage
impl Clone for TextBoxMessage
Source§fn clone(&self) -> TextBoxMessage
fn clone(&self) -> TextBoxMessage
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for TextBoxMessage
impl Debug for TextBoxMessage
Source§impl PartialEq for TextBoxMessage
impl PartialEq for TextBoxMessage
impl StructuralPartialEq for TextBoxMessage
Auto Trait Implementations§
impl Freeze for TextBoxMessage
impl RefUnwindSafe for TextBoxMessage
impl Send for TextBoxMessage
impl Sync for TextBoxMessage
impl Unpin for TextBoxMessage
impl UnwindSafe for TextBoxMessage
Blanket Implementations§
Source§impl<T> AsyncTaskResult for T
impl<T> AsyncTaskResult for T
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Any. Could be used to downcast a trait object
to a particular type.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Any. Could be used to downcast a trait object
to a particular type.fn into_any(self: Box<T>) -> Box<dyn Any>
Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<T> FieldValue for Twhere
T: 'static,
impl<T> FieldValue for Twhere
T: 'static,
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> ⓘ
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> ⓘ
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 moreSource§impl<T> MessageData for T
impl<T> MessageData for T
Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> ScriptMessagePayload for T
impl<T> ScriptMessagePayload for T
Source§fn as_any_ref(&self) -> &(dyn Any + 'static)
fn as_any_ref(&self) -> &(dyn Any + 'static)
self as &dyn AnySource§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
self as &dyn AnySource§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.