pub struct RenderTextWidget { /* private fields */ }Trait Implementations§
Source§impl Debug for RenderTextWidget
impl Debug for RenderTextWidget
Source§impl Widget for RenderTextWidget
impl Widget for RenderTextWidget
Source§type Props<'a> = RenderText
type Props<'a> = RenderText
The props that this widget needs to be created or updated. Props define
all of the values that a widget’s user can specify every render.
Source§type Response = ()
type Response = ()
The type that the widget will return to the user when it is created or
updated. This type should contain information like whether the widget
was clicked, had keyboard input, or other info that might be useful.
Source§fn update(&mut self, props: Self::Props<'_>) -> Self::Response
fn update(&mut self, props: Self::Props<'_>) -> Self::Response
Update the widget with new props.
Source§fn layout(&self, ctx: LayoutContext<'_>, input: Constraints) -> Vec2
fn layout(&self, ctx: LayoutContext<'_>, input: Constraints) -> Vec2
Calculate this widget’s layout with the given constraints and return its
size. The returned size must fit within the given constraints, which can
be done using
constraints.constrain(size). Read moreSource§fn paint(&self, ctx: PaintContext<'_>)
fn paint(&self, ctx: PaintContext<'_>)
Paint the widget based on its current state. Read more
Source§fn flex(&self) -> (u32, FlexFit)
fn flex(&self) -> (u32, FlexFit)
Returns whether this widget should grow to fill a flexible layout, and
if so, what weight should be applied to it if other widgets also want to
grow. Read more
Source§fn flow(&self) -> Flow
fn flow(&self) -> Flow
Returns the behavior that this widget should have when part of a layout. Read more
Source§fn default_layout(
&self,
ctx: LayoutContext<'_>,
constraints: Constraints,
) -> Vec2
fn default_layout( &self, ctx: LayoutContext<'_>, constraints: Constraints, ) -> Vec2
A convenience method that always performs the default layout strategy
for a widget. This method is intended to be called from custom widget’s
layout methods.Source§fn default_paint(&self, ctx: PaintContext<'_>)
fn default_paint(&self, ctx: PaintContext<'_>)
A convenience method that always performs the default painting operation
for a widget. This method is intended to be called from custom widget’s
paint methods.Source§fn event_interest(&self) -> EventInterest
fn event_interest(&self) -> EventInterest
Tells which events the widget is interested in receiving. Read more
Source§fn event(&mut self, ctx: EventContext<'_>, event: &WidgetEvent) -> EventResponse
fn event(&mut self, ctx: EventContext<'_>, event: &WidgetEvent) -> EventResponse
Handle the given event and update the widget’s state. Read more
Tell which widget should be navigated to if the user navigates in a
given direction.
Auto Trait Implementations§
impl !Freeze for RenderTextWidget
impl !RefUnwindSafe for RenderTextWidget
impl Send for RenderTextWidget
impl !Sync for RenderTextWidget
impl Unpin for RenderTextWidget
impl UnwindSafe for RenderTextWidget
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
Source§impl<T> ErasedWidget for Twhere
T: Widget,
impl<T> ErasedWidget for Twhere
T: Widget,
Source§fn layout(&self, ctx: LayoutContext<'_>, constraints: Constraints) -> Vec2
fn layout(&self, ctx: LayoutContext<'_>, constraints: Constraints) -> Vec2
See
Widget::layout.Source§fn flow(&self) -> Flow
fn flow(&self) -> Flow
See
Widget::flow.Source§fn paint(&self, ctx: PaintContext<'_>)
fn paint(&self, ctx: PaintContext<'_>)
See
Widget::paint.Source§fn event_interest(&self) -> EventInterest
fn event_interest(&self) -> EventInterest
Source§fn event(&mut self, ctx: EventContext<'_>, event: &WidgetEvent) -> EventResponse
fn event(&mut self, ctx: EventContext<'_>, event: &WidgetEvent) -> EventResponse
See
Widget::event.