Enum fyrox_ui::text::TextMessage
source · pub enum TextMessage {
Text(String),
Wrap(WrapMode),
Font(SharedFont),
VerticalAlignment(VerticalAlignment),
HorizontalAlignment(HorizontalAlignment),
Shadow(bool),
ShadowDilation(f32),
ShadowBrush(Brush),
ShadowOffset(Vector2<f32>),
}Expand description
Possible messages that can be used to alternate Text widget state at runtime.
Variants§
Text(String)
Used to set new text of the widget.
Wrap(WrapMode)
Used to set new text wrapping mode of the widget. See Text for usage examples.
Font(SharedFont)
Used to set new font of the widget. See Text for usage examples.
VerticalAlignment(VerticalAlignment)
Used to set new vertical alignment of the widget. See Text for usage examples.
HorizontalAlignment(HorizontalAlignment)
Used to set new horizontal alignment of the widget. See Text for usage examples.
Shadow(bool)
Used to enable/disable shadow casting of the widget. See Text for usage examples.
ShadowDilation(f32)
Used to set new dilation factor of the shadows. See Text for usage examples.
ShadowBrush(Brush)
Used to set new brush that will be used to draw the shadows. See Text for usage examples.
ShadowOffset(Vector2<f32>)
Used to set how much the shadows will be offset from the widget. See Text for usage examples.
Implementations§
source§impl TextMessage
impl TextMessage
sourcepub fn text(
destination: Handle<UiNode>,
direction: MessageDirection,
value: String
) -> UiMessage
pub fn text( destination: Handle<UiNode>, direction: MessageDirection, value: String ) -> UiMessage
Creates new TextMessage::Text message.
sourcepub fn wrap(
destination: Handle<UiNode>,
direction: MessageDirection,
value: WrapMode
) -> UiMessage
pub fn wrap( destination: Handle<UiNode>, direction: MessageDirection, value: WrapMode ) -> UiMessage
Creates new TextMessage::Wrap message.
sourcepub fn font(
destination: Handle<UiNode>,
direction: MessageDirection,
value: SharedFont
) -> UiMessage
pub fn font( destination: Handle<UiNode>, direction: MessageDirection, value: SharedFont ) -> UiMessage
Creates new TextMessage::Font message.
sourcepub fn vertical_alignment(
destination: Handle<UiNode>,
direction: MessageDirection,
value: VerticalAlignment
) -> UiMessage
pub fn vertical_alignment( destination: Handle<UiNode>, direction: MessageDirection, value: VerticalAlignment ) -> UiMessage
Creates new TextMessage::VerticalAlignment message.
sourcepub fn horizontal_alignment(
destination: Handle<UiNode>,
direction: MessageDirection,
value: HorizontalAlignment
) -> UiMessage
pub fn horizontal_alignment( destination: Handle<UiNode>, direction: MessageDirection, value: HorizontalAlignment ) -> UiMessage
Creates new TextMessage::HorizontalAlignment message.
sourcepub fn shadow(
destination: Handle<UiNode>,
direction: MessageDirection,
value: bool
) -> UiMessage
pub fn shadow( destination: Handle<UiNode>, direction: MessageDirection, value: bool ) -> UiMessage
Creates new TextMessage::Shadow message.
sourcepub fn shadow_dilation(
destination: Handle<UiNode>,
direction: MessageDirection,
value: f32
) -> UiMessage
pub fn shadow_dilation( destination: Handle<UiNode>, direction: MessageDirection, value: f32 ) -> UiMessage
Creates new TextMessage::ShadowDilation message.
sourcepub fn shadow_brush(
destination: Handle<UiNode>,
direction: MessageDirection,
value: Brush
) -> UiMessage
pub fn shadow_brush( destination: Handle<UiNode>, direction: MessageDirection, value: Brush ) -> UiMessage
Creates new TextMessage::ShadowBrush message.
sourcepub fn shadow_offset(
destination: Handle<UiNode>,
direction: MessageDirection,
value: Vector2<f32>
) -> UiMessage
pub fn shadow_offset( destination: Handle<UiNode>, direction: MessageDirection, value: Vector2<f32> ) -> UiMessage
Creates new TextMessage::ShadowOffset message.
Trait Implementations§
source§impl Clone for TextMessage
impl Clone for TextMessage
source§fn clone(&self) -> TextMessage
fn clone(&self) -> TextMessage
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moresource§impl Debug for TextMessage
impl Debug for TextMessage
source§impl PartialEq<TextMessage> for TextMessage
impl PartialEq<TextMessage> for TextMessage
source§fn eq(&self, other: &TextMessage) -> bool
fn eq(&self, other: &TextMessage) -> bool
self and other values to be equal, and is used
by ==.impl StructuralPartialEq for TextMessage
Auto Trait Implementations§
impl !RefUnwindSafe for TextMessage
impl Send for TextMessage
impl Sync for TextMessage
impl Unpin for TextMessage
impl !UnwindSafe for TextMessage
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
source§impl<T> FieldValue for Twhere
T: 'static,
impl<T> FieldValue for Twhere T: 'static,
§impl<T> Pointable for T
impl<T> Pointable for T
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read more§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).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.