pub struct SelectableText { /* private fields */ }Implementations§
Source§impl SelectableText
impl SelectableText
pub fn new(value: impl Into<Cow<'static, str>>) -> SelectableText
pub fn max_lines(self, max_lines: impl Into<Option<usize>>) -> SelectableText
pub fn line_height(self, line_height: impl Into<Option<f32>>) -> SelectableText
Trait Implementations§
Source§impl AccessibilityExt for SelectableText
impl AccessibilityExt for SelectableText
Source§fn get_accessibility_data(&mut self) -> &mut AccessibilityData
fn get_accessibility_data(&mut self) -> &mut AccessibilityData
Returns a mutable reference to the element’s accessibility data.
§fn accessibility(self, accessibility: AccessibilityData) -> Self
fn accessibility(self, accessibility: AccessibilityData) -> Self
Replace all of the element’s accessibility data at once. See
AccessibilityData.§fn a11y_id(self, a11y_id: impl Into<Option<NodeId>>) -> Self
fn a11y_id(self, a11y_id: impl Into<Option<NodeId>>) -> Self
Set an explicit accessibility id instead of an autogenerated one. See
AccessibilityId.§fn a11y_focusable(self, a11y_focusable: impl Into<Focusable>) -> Self
fn a11y_focusable(self, a11y_focusable: impl Into<Focusable>) -> Self
Set whether the element can receive keyboard focus. See
Focusable.§fn a11y_auto_focus(self, a11y_auto_focus: impl Into<bool>) -> Self
fn a11y_auto_focus(self, a11y_auto_focus: impl Into<bool>) -> Self
Request that the element be focused automatically when it is mounted.
§fn a11y_member_of(self, a11y_member_of: impl Into<NodeId>) -> Self
fn a11y_member_of(self, a11y_member_of: impl Into<NodeId>) -> Self
Mark the element as a member of the group identified by the given
AccessibilityId.§fn a11y_role(self, a11y_role: impl Into<Role>) -> Self
fn a11y_role(self, a11y_role: impl Into<Role>) -> Self
Set the accessibility role exposed in the accessibility tree. See
AccessibilityRole.§fn a11y_alt(self, value: impl Into<Box<str>>) -> Self
fn a11y_alt(self, value: impl Into<Box<str>>) -> Self
Set the text label that describes the element in the accessibility tree.
§fn a11y_builder(self, with: impl FnOnce(&mut Node)) -> Self
fn a11y_builder(self, with: impl FnOnce(&mut Node)) -> Self
Edit the underlying
accesskit node directly for advanced accessibility properties.Source§impl Clone for SelectableText
impl Clone for SelectableText
Source§fn clone(&self) -> SelectableText
fn clone(&self) -> SelectableText
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Component for SelectableText
impl Component for SelectableText
fn render(&self) -> impl IntoElement
fn render_key(&self) -> DiffKey
Source§impl ContainerExt for SelectableText
impl ContainerExt for SelectableText
§fn position(self, position: impl Into<Position>) -> Self
fn position(self, position: impl Into<Position>) -> Self
Set how the element is placed relative to its parent or the window. See
Position.§fn padding(self, padding: impl Into<Gaps>) -> Self
fn padding(self, padding: impl Into<Gaps>) -> Self
Set the inner spacing between the element’s edges and its content. See
Gaps.§fn margin(self, margin: impl Into<Gaps>) -> Self
fn margin(self, margin: impl Into<Gaps>) -> Self
Set the outer spacing between the element’s edges and its surroundings. See
Gaps.§fn min_width(self, minimum_width: impl Into<Size>) -> Self
fn min_width(self, minimum_width: impl Into<Size>) -> Self
Set the minimum width the element can shrink to. See
Size.§fn min_height(self, minimum_height: impl Into<Size>) -> Self
fn min_height(self, minimum_height: impl Into<Size>) -> Self
Set the minimum height the element can shrink to. See
Size.§fn max_width(self, maximum_width: impl Into<Size>) -> Self
fn max_width(self, maximum_width: impl Into<Size>) -> Self
Set the maximum width the element can grow to. See
Size.§fn max_height(self, maximum_height: impl Into<Size>) -> Self
fn max_height(self, maximum_height: impl Into<Size>) -> Self
Set the maximum height the element can grow to. See
Size.§fn visible_width(self, visible_width: impl Into<VisibleSize>) -> Self
fn visible_width(self, visible_width: impl Into<VisibleSize>) -> Self
Set how much of the measured width is actually used in layout. See
VisibleSize.§fn visible_height(self, visible_height: impl Into<VisibleSize>) -> Self
fn visible_height(self, visible_height: impl Into<VisibleSize>) -> Self
Set how much of the measured height is actually used in layout. See
VisibleSize.Source§impl KeyExt for SelectableText
impl KeyExt for SelectableText
Source§impl LayoutExt for SelectableText
impl LayoutExt for SelectableText
Source§fn get_layout(&mut self) -> &mut LayoutData
fn get_layout(&mut self) -> &mut LayoutData
Returns a mutable reference to the element’s layout data.
§fn layout(self, layout: LayoutData) -> Self
fn layout(self, layout: LayoutData) -> Self
Replace all of the element’s layout data at once. See
LayoutData.Source§impl PartialEq for SelectableText
impl PartialEq for SelectableText
Source§impl TextStyleExt for SelectableText
impl TextStyleExt for SelectableText
Source§fn get_text_style_data(&mut self) -> &mut TextStyleData
fn get_text_style_data(&mut self) -> &mut TextStyleData
Returns a mutable reference to the element’s text style data.
§fn text_style(self, data: TextStyleData) -> Self
fn text_style(self, data: TextStyleData) -> Self
Replace all of the element’s text style data at once. See
TextStyleData.§fn color_conic_gradient<S>(self, color: S) -> Selfwhere
S: Into<ConicGradient>,
fn color_conic_gradient<S>(self, color: S) -> Selfwhere
S: Into<ConicGradient>,
Paint the text with a
ConicGradient.§fn color_linear_gradient<S>(self, color: S) -> Selfwhere
S: Into<LinearGradient>,
fn color_linear_gradient<S>(self, color: S) -> Selfwhere
S: Into<LinearGradient>,
Paint the text with a
LinearGradient.§fn color_radial_gradient<S>(self, color: S) -> Selfwhere
S: Into<RadialGradient>,
fn color_radial_gradient<S>(self, color: S) -> Selfwhere
S: Into<RadialGradient>,
Paint the text with a
RadialGradient.§fn color_shader(self, color: impl Into<ShaderFill>) -> Self
fn color_shader(self, color: impl Into<ShaderFill>) -> Self
Paint the text with a custom shader. See
ShaderFill.§fn text_align(self, text_align: impl Into<TextAlign>) -> Self
fn text_align(self, text_align: impl Into<TextAlign>) -> Self
Set the horizontal alignment of the text. See
TextAlign.§fn font_size(self, font_size: impl Into<FontSize>) -> Self
fn font_size(self, font_size: impl Into<FontSize>) -> Self
Set the text size in pixels. See
FontSize.§fn font_family(self, font_family: impl Into<Cow<'static, str>>) -> Self
fn font_family(self, font_family: impl Into<Cow<'static, str>>) -> Self
Add a font family to try, in order of preference.
§fn font_slant(self, font_slant: impl Into<FontSlant>) -> Self
fn font_slant(self, font_slant: impl Into<FontSlant>) -> Self
Set the slant (style) of the font. See
FontSlant.§fn font_weight(self, font_weight: impl Into<FontWeight>) -> Self
fn font_weight(self, font_weight: impl Into<FontWeight>) -> Self
Set the thickness of the font. See
FontWeight.§fn font_width(self, font_width: impl Into<FontWidth>) -> Self
fn font_width(self, font_width: impl Into<FontWidth>) -> Self
Set the horizontal width of the font. See
FontWidth.§fn text_height(self, text_height: impl Into<TextHeightBehavior>) -> Self
fn text_height(self, text_height: impl Into<TextHeightBehavior>) -> Self
Set how the leading of the first and last lines is handled. See
TextHeightBehavior.§fn text_overflow(self, text_overflow: impl Into<TextOverflow>) -> Self
fn text_overflow(self, text_overflow: impl Into<TextOverflow>) -> Self
Set how text that does not fit its bounds is truncated. See
TextOverflow.§fn text_shadow(self, text_shadow: impl Into<TextShadow>) -> Self
fn text_shadow(self, text_shadow: impl Into<TextShadow>) -> Self
Add a shadow cast behind the text. See
TextShadow.§fn text_decoration(self, text_decoration: impl Into<TextDecoration>) -> Self
fn text_decoration(self, text_decoration: impl Into<TextDecoration>) -> Self
Set a line drawn through, under or over the text. See
TextDecoration.impl StructuralPartialEq for SelectableText
Auto Trait Implementations§
impl Freeze for SelectableText
impl !RefUnwindSafe for SelectableText
impl Send for SelectableText
impl Sync for SelectableText
impl Unpin for SelectableText
impl UnsafeUnpin for SelectableText
impl !UnwindSafe for SelectableText
Blanket Implementations§
§impl<T> AnyEq for T
impl<T> AnyEq 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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> ComponentKey for Twhere
T: Component,
impl<T> ComponentKey for Twhere
T: Component,
fn default_key(&self) -> DiffKey
§impl<T> ComponentProps for T
impl<T> ComponentProps for T
§impl<T> ContainerSizeExt for Twhere
T: ContainerExt,
impl<T> ContainerSizeExt for Twhere
T: ContainerExt,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
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.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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