pub struct IconWidget<T> { /* private fields */ }
Implementations§
Source§impl<T> IconWidget<T>
impl<T> IconWidget<T>
Sourcepub fn from_icon(icon: &Icon, brush: impl Into<BackgroundBrush<T>>) -> Self
pub fn from_icon(icon: &Icon, brush: impl Into<BackgroundBrush<T>>) -> Self
Creates a new IconWidget
for displaying an Icon
.
Trait Implementations§
Source§impl<T: Data> Widget<T> for IconWidget<T>
impl<T: Data> Widget<T> for IconWidget<T>
Source§fn event(&mut self, _: &mut EventCtx<'_, '_>, _: &Event, _: &mut T, _: &Env)
fn event(&mut self, _: &mut EventCtx<'_, '_>, _: &Event, _: &mut T, _: &Env)
Handle an event. Read more
Source§fn lifecycle(
&mut self,
_: &mut LifeCycleCtx<'_, '_>,
_: &LifeCycle,
_: &T,
_: &Env,
)
fn lifecycle( &mut self, _: &mut LifeCycleCtx<'_, '_>, _: &LifeCycle, _: &T, _: &Env, )
Handle a life cycle notification. Read more
Auto Trait Implementations§
impl<T> Freeze for IconWidget<T>
impl<T> !RefUnwindSafe for IconWidget<T>
impl<T> !Send for IconWidget<T>
impl<T> !Sync for IconWidget<T>
impl<T> Unpin for IconWidget<T>
impl<T> !UnwindSafe for IconWidget<T>
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, W> TooltipExt<T, W> for W
impl<T, W> TooltipExt<T, W> for W
Source§impl<T, W> WidgetExt<T> for W
impl<T, W> WidgetExt<T> for W
Source§fn align_left(self) -> Align<T>
fn align_left(self) -> Align<T>
Wrap this widget in an
Align
widget, configured to align left.Source§fn align_right(self) -> Align<T>
fn align_right(self) -> Align<T>
Wrap this widget in an
Align
widget, configured to align right.Source§fn align_vertical(self, align: UnitPoint) -> Align<T>
fn align_vertical(self, align: UnitPoint) -> Align<T>
Wrap this widget in an
Align
widget, configured to align vertically.Source§fn align_horizontal(self, align: UnitPoint) -> Align<T>
fn align_horizontal(self, align: UnitPoint) -> Align<T>
Wrap this widget in an
Align
widget, configured to align horizontally.Source§fn fix_width(self, width: f64) -> SizedBox<T>
fn fix_width(self, width: f64) -> SizedBox<T>
Wrap this widget in a
SizedBox
with an explicit width.Source§fn fix_height(self, height: f64) -> SizedBox<T>
fn fix_height(self, height: f64) -> SizedBox<T>
Wrap this widget in a
SizedBox
with an explicit width.Source§fn fix_size(self, width: f64, height: f64) -> SizedBox<T>
fn fix_size(self, width: f64, height: f64) -> SizedBox<T>
Wrap this widget in an
SizedBox
with an explicit width and heightSource§fn expand_width(self) -> SizedBox<T>
fn expand_width(self) -> SizedBox<T>
Source§fn expand_height(self) -> SizedBox<T>
fn expand_height(self) -> SizedBox<T>
Source§fn background(self, brush: impl Into<BackgroundBrush<T>>) -> Container<T>
fn background(self, brush: impl Into<BackgroundBrush<T>>) -> Container<T>
Source§fn border(
self,
color: impl Into<KeyOrValue<Color>>,
width: impl Into<KeyOrValue<f64>>,
) -> Container<T>
fn border( self, color: impl Into<KeyOrValue<Color>>, width: impl Into<KeyOrValue<f64>>, ) -> Container<T>
Source§fn controller<C>(self, controller: C) -> ControllerHost<Self, C>where
C: Controller<T, Self>,
fn controller<C>(self, controller: C) -> ControllerHost<Self, C>where
C: Controller<T, Self>,
Wrap this widget with the provided
Controller
.Source§fn on_click(
self,
f: impl Fn(&mut EventCtx<'_, '_>, &mut T, &Env) + 'static,
) -> ControllerHost<Self, Click<T>>
fn on_click( self, f: impl Fn(&mut EventCtx<'_, '_>, &mut T, &Env) + 'static, ) -> ControllerHost<Self, Click<T>>
Source§fn debug_paint_layout(self) -> EnvScope<T, Self>
fn debug_paint_layout(self) -> EnvScope<T, Self>
Draw the
layout
Rect
s of this widget and its children.Source§fn debug_widget_id(self) -> EnvScope<T, Self>
fn debug_widget_id(self) -> EnvScope<T, Self>
Display the
WidgetId
s for this widget and its children, when hot. Read moreSource§fn debug_invalidation(self) -> DebugInvalidation<T, Self>
fn debug_invalidation(self) -> DebugInvalidation<T, Self>
Draw a color-changing rectangle over this widget, allowing you to see the
invalidation regions.
Source§fn debug_widget(self) -> EnvScope<T, Self>
fn debug_widget(self) -> EnvScope<T, Self>
Set the
DEBUG_WIDGET
env variable for this widget (and its descendants). Read moreSource§fn parse(self) -> Parse<Self>
fn parse(self) -> Parse<Self>
👎Deprecated since 0.7.0: Use TextBox::with_formatter instead
Parse a
Widget<String>
’s contents