pub struct TextBlock {
pub text: String,
pub wrap: TextWrap,
pub font: FontChoice,
pub opt: WidgetOption,
pub bopt: WidgetBehaviourOption,
}Expand description
Non-interactive retained text block that can optionally wrap.
Fields§
§text: StringText rendered by the widget.
wrap: TextWrapWrapping mode used for layout and rendering.
font: FontChoiceFont selection used for the block text.
opt: WidgetOptionWidget options applied to the block.
bopt: WidgetBehaviourOptionBehaviour options applied to the block.
Implementations§
Trait Implementations§
Source§impl Widget for TextBlock
impl Widget for TextBlock
Source§fn widget_opt(&self) -> &WidgetOption
fn widget_opt(&self) -> &WidgetOption
Returns the widget options for this state.
Source§fn behaviour_opt(&self) -> &WidgetBehaviourOption
fn behaviour_opt(&self) -> &WidgetBehaviourOption
Returns the behaviour options for this state.
Source§fn measure(
&self,
style: &Style,
atlas: &AtlasHandle,
avail: Dimensioni,
) -> Dimensioni
fn measure( &self, style: &Style, atlas: &AtlasHandle, avail: Dimensioni, ) -> Dimensioni
Returns the intrinsic widget size for the current frame’s layout pass. Read more
Source§fn run(
&mut self,
ctx: &mut WidgetCtx<'_>,
control: &ControlState,
) -> ResourceState
fn run( &mut self, ctx: &mut WidgetCtx<'_>, control: &ControlState, ) -> ResourceState
Runs the widget for the current frame and returns the current frame result.
Source§fn effective_widget_opt(&self) -> WidgetOption
fn effective_widget_opt(&self) -> WidgetOption
Returns the effective widget options used by generic dispatch. Read more
Source§fn effective_behaviour_opt(&self) -> WidgetBehaviourOption
fn effective_behaviour_opt(&self) -> WidgetBehaviourOption
Returns the effective behavior options used by generic dispatch.
Source§fn needs_input_snapshot(&self) -> bool
fn needs_input_snapshot(&self) -> bool
Returns whether this widget needs per-frame input snapshots.
Auto Trait Implementations§
impl Freeze for TextBlock
impl RefUnwindSafe for TextBlock
impl Send for TextBlock
impl Sync for TextBlock
impl Unpin for TextBlock
impl UnsafeUnpin for TextBlock
impl UnwindSafe for TextBlock
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