Span
struct · ferroui-controls · v0.5.0
struct Span
Span element used for grouping other Inline elements.
Members
TYPEto_refinlines_propertyconstructas_add_child_of_inlineas_add_child_of_controlas_add_child_of_stringnewinlinesset_inlinesadd_childadd_child_controladd_child_text
TYPE
const TYPE: &'static $crate::TypeInfo
The runtime type of this class.
to_ref
fn to_ref(self: &Self) -> $crate::Ref<Span>
Returns a strong reference to this object.
inlines_property
fn inlines_property() -> &'static StyledProperty<Option<InlineCollection>>
Defines the Inlines property.
construct
fn construct() -> Self
Creates the class data; see ferroui_base::FerroObject::construct.
as_add_child_of_inline
fn as_add_child_of_inline(this: Ref<Span>) -> Rc<dyn IAddChild<Ref<Inline>>>
The span as the contract through which markup adds an inline child.
as_add_child_of_control
fn as_add_child_of_control(this: Ref<Span>) -> Rc<dyn IAddChild<Ref<Control>>>
The span as the contract through which markup adds a control child: the control is wrapped in an inline container.
as_add_child_of_string
fn as_add_child_of_string(this: Ref<Span>) -> Rc<dyn IAddChild<String>>
The span as the contract through which markup adds a text child: the text becomes a run.
new
fn new() -> Ref<Self>
Initializes a new instance of a Span class.
inlines
fn inlines(self: &Self) -> InlineCollection
Gets or sets the inlines.
Panics when the collection was removed by setting the property to its unset value.
set_inlines
fn set_inlines(self: &Self, value: InlineCollection)
add_child
fn add_child(self: &Self, inline: impl IntoRef<Inline>)
Adds an inline child (the content model of the element).
add_child_control
fn add_child_control(self: &Self, child: impl IntoRef<Control>)
Adds a control child, wrapped in an InlineUIContainer.
add_child_text
fn add_child_text(self: &Self, text: &str)
Adds a text child, wrapped in a Run.
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafeInlineImplExtTextElementImplExtBorrow<T>BorrowMut<T>Into<U>From<T>TryInto<U>TryFrom<U>ReceiverAnyFerroObjectImplExtStyledElementImplExtClassDefaultsErasedDestructorIntoEitherDerefUpcast<T>Upcast<Span>StaticTypeObjectTypeSubclassable<T>DefaultConstructibleStyledElementImplFerroObjectImplTextElementImplInlineImpl
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.