pub struct PathWidgetDeclarer { /* private fields */ }Implementations§
Source§impl PathWidgetDeclarer
impl PathWidgetDeclarer
pub fn path<_M, _V>(self, v: _V) -> PathWidgetDeclarer
pub fn brush<_M, _V>(self, v: _V) -> PathWidgetDeclarer
pub fn style<_M, _V>(self, v: _V) -> PathWidgetDeclarer
Source§impl PathWidgetDeclarer
impl PathWidgetDeclarer
Sourcepub fn tab_index<_M, _V>(self, v: _V) -> PathWidgetDeclarer
pub fn tab_index<_M, _V>(self, v: _V) -> PathWidgetDeclarer
Initializes the widget with a tab index. The tab index is used to allow or prevent widgets from being sequentially focusable(usually with the Tab key, hence the name) and determine their relative ordering for sequential focus navigation
Sourcepub fn auto_focus<_M, _V>(self, v: _V) -> PathWidgetDeclarer
pub fn auto_focus<_M, _V>(self, v: _V) -> PathWidgetDeclarer
Initializes whether the widget should automatically get focus when the window loads.
Sourcepub fn on_event(self, f: impl FnMut(&mut Event) + 'static) -> PathWidgetDeclarer
pub fn on_event(self, f: impl FnMut(&mut Event) + 'static) -> PathWidgetDeclarer
Attaches an event handler to the widget. It’s triggered when any event or lifecycle change happens.
Sourcepub fn on_mounted(
self,
f: impl FnOnce(&mut CommonEvent) + 'static,
) -> PathWidgetDeclarer
pub fn on_mounted( self, f: impl FnOnce(&mut CommonEvent) + 'static, ) -> PathWidgetDeclarer
Attaches an event handler that runs when the widget is first mounted to the tree
Sourcepub fn on_performed_layout(
self,
f: impl FnMut(&mut CommonEvent) + 'static,
) -> PathWidgetDeclarer
pub fn on_performed_layout( self, f: impl FnMut(&mut CommonEvent) + 'static, ) -> PathWidgetDeclarer
Attaches an event handler that runs after the widget is performed layout.
Sourcepub fn on_disposed(
self,
f: impl FnOnce(&mut CommonEvent) + 'static,
) -> PathWidgetDeclarer
pub fn on_disposed( self, f: impl FnOnce(&mut CommonEvent) + 'static, ) -> PathWidgetDeclarer
Attaches an event handler that runs when the widget is disposed.
Sourcepub fn on_pointer_down(
self,
f: impl FnMut(&mut PointerEvent) + 'static,
) -> PathWidgetDeclarer
pub fn on_pointer_down( self, f: impl FnMut(&mut PointerEvent) + 'static, ) -> PathWidgetDeclarer
Attaches a handler to the widget that is triggered when a pointer down occurs.
Sourcepub fn on_pointer_down_capture(
self,
f: impl FnMut(&mut PointerEvent) + 'static,
) -> PathWidgetDeclarer
pub fn on_pointer_down_capture( self, f: impl FnMut(&mut PointerEvent) + 'static, ) -> PathWidgetDeclarer
Attaches a handler to the widget that is triggered during the capture phase of a pointer down event. This is similar to on_pointer_down, but it’s triggered earlier in the event flow.
Sourcepub fn on_pointer_up(
self,
f: impl FnMut(&mut PointerEvent) + 'static,
) -> PathWidgetDeclarer
pub fn on_pointer_up( self, f: impl FnMut(&mut PointerEvent) + 'static, ) -> PathWidgetDeclarer
Attaches a handler to the widget that is triggered when a pointer up occurs.
Sourcepub fn on_pointer_up_capture(
self,
f: impl FnMut(&mut PointerEvent) + 'static,
) -> PathWidgetDeclarer
pub fn on_pointer_up_capture( self, f: impl FnMut(&mut PointerEvent) + 'static, ) -> PathWidgetDeclarer
Attaches a handler to the widget that is triggered during the capture phase of a pointer up event. This is similar to on_pointer_up, but it’s triggered earlier in the event flow.
Sourcepub fn on_pointer_move(
self,
f: impl FnMut(&mut PointerEvent) + 'static,
) -> PathWidgetDeclarer
pub fn on_pointer_move( self, f: impl FnMut(&mut PointerEvent) + 'static, ) -> PathWidgetDeclarer
Attaches a handler to the widget that is triggered when a pointer move occurs.
Sourcepub fn on_pointer_move_capture(
self,
f: impl FnMut(&mut PointerEvent) + 'static,
) -> PathWidgetDeclarer
pub fn on_pointer_move_capture( self, f: impl FnMut(&mut PointerEvent) + 'static, ) -> PathWidgetDeclarer
Attaches a handler to the widget that is triggered during the capture phase of a pointer move event. This is similar to on_pointer_move, but it’s triggered earlier in the event flow.
Sourcepub fn on_pointer_cancel(
self,
f: impl FnMut(&mut PointerEvent) + 'static,
) -> PathWidgetDeclarer
pub fn on_pointer_cancel( self, f: impl FnMut(&mut PointerEvent) + 'static, ) -> PathWidgetDeclarer
Attaches a handler to the widget that is triggered when a pointer event cancels.
Sourcepub fn on_pointer_enter(
self,
f: impl FnMut(&mut PointerEvent) + 'static,
) -> PathWidgetDeclarer
pub fn on_pointer_enter( self, f: impl FnMut(&mut PointerEvent) + 'static, ) -> PathWidgetDeclarer
Attaches a handler to the widget that is triggered when a pointer device is moved into the hit test boundaries of an widget or one of its descendants
Sourcepub fn on_pointer_leave(
self,
f: impl FnMut(&mut PointerEvent) + 'static,
) -> PathWidgetDeclarer
pub fn on_pointer_leave( self, f: impl FnMut(&mut PointerEvent) + 'static, ) -> PathWidgetDeclarer
Attaches a handler to the widget that is triggered when a pointer device is moved out of the hit test boundaries of an widget or one of its descendants.
Sourcepub fn on_tap(
self,
f: impl FnMut(&mut PointerEvent) + 'static,
) -> PathWidgetDeclarer
pub fn on_tap( self, f: impl FnMut(&mut PointerEvent) + 'static, ) -> PathWidgetDeclarer
Attaches a handler to the widget that is triggered when a tap(click) occurs.
Sourcepub fn on_tap_capture(
self,
f: impl FnMut(&mut PointerEvent) + 'static,
) -> PathWidgetDeclarer
pub fn on_tap_capture( self, f: impl FnMut(&mut PointerEvent) + 'static, ) -> PathWidgetDeclarer
Attaches a handler to the widget that is triggered during the capture
phase of a tap event. This is similar to on_tap, but it’s triggered
earlier in the event flow.
Sourcepub fn on_double_tap(
self,
f: impl FnMut(&mut PointerEvent) + 'static,
) -> PathWidgetDeclarer
pub fn on_double_tap( self, f: impl FnMut(&mut PointerEvent) + 'static, ) -> PathWidgetDeclarer
Attaches a handler to the widget that is triggered when a double tap occurs.
Sourcepub fn on_double_tap_capture(
self,
f: impl FnMut(&mut PointerEvent) + 'static,
) -> PathWidgetDeclarer
pub fn on_double_tap_capture( self, f: impl FnMut(&mut PointerEvent) + 'static, ) -> PathWidgetDeclarer
Attaches a handler to the widget that is triggered during the capture phase of a double tap event. This is similar to on_double_tap, but it’s triggered earlier in the event flow.
Sourcepub fn on_triple_tap(
self,
f: impl FnMut(&mut PointerEvent) + 'static,
) -> PathWidgetDeclarer
pub fn on_triple_tap( self, f: impl FnMut(&mut PointerEvent) + 'static, ) -> PathWidgetDeclarer
Attaches a handler to the widget that is triggered when a triple tap occurs.
Sourcepub fn on_triple_tap_capture(
self,
f: impl FnMut(&mut PointerEvent) + 'static,
) -> PathWidgetDeclarer
pub fn on_triple_tap_capture( self, f: impl FnMut(&mut PointerEvent) + 'static, ) -> PathWidgetDeclarer
Attaches a handler to the widget that is triggered during the capture phase of a triple tap event. This is similar to on_triple_tap, but it’s triggered earlier in the event flow.
Sourcepub fn on_x_times_tap(
self,
f: (usize, impl FnMut(&mut PointerEvent) + 'static),
) -> PathWidgetDeclarer
pub fn on_x_times_tap( self, f: (usize, impl FnMut(&mut PointerEvent) + 'static), ) -> PathWidgetDeclarer
Attaches a handler to the widget that is triggered when a x-times tap occurs.
Sourcepub fn on_x_times_tap_capture(
self,
f: (usize, impl FnMut(&mut PointerEvent) + 'static),
) -> PathWidgetDeclarer
pub fn on_x_times_tap_capture( self, f: (usize, impl FnMut(&mut PointerEvent) + 'static), ) -> PathWidgetDeclarer
Attaches a handler to the widget that is triggered during the capture phase of a x-times tap event. This is similar to on_x_times_tap, but it’s triggered earlier in the event flow.
Sourcepub fn on_wheel(
self,
f: impl FnMut(&mut WheelEvent) + 'static,
) -> PathWidgetDeclarer
pub fn on_wheel( self, f: impl FnMut(&mut WheelEvent) + 'static, ) -> PathWidgetDeclarer
Attaches a handler to the widget that is triggered when the user rotates a wheel button on a pointing device (typically a mouse).
Sourcepub fn on_wheel_capture(
self,
f: impl FnMut(&mut WheelEvent) + 'static,
) -> PathWidgetDeclarer
pub fn on_wheel_capture( self, f: impl FnMut(&mut WheelEvent) + 'static, ) -> PathWidgetDeclarer
Attaches a handler to the widget that is triggered during the capture phase of a wheel event. This is similar to on_wheel, but it’s triggered earlier in the event flow.
Sourcepub fn on_ime_pre_edit(
self,
f: impl FnMut(&mut ImePreEditEvent) + 'static,
) -> PathWidgetDeclarer
pub fn on_ime_pre_edit( self, f: impl FnMut(&mut ImePreEditEvent) + 'static, ) -> PathWidgetDeclarer
Attaches a handler to the widget that is triggered when the input method pre-edit area is changed.
Sourcepub fn on_ime_pre_edit_capture(
self,
f: impl FnMut(&mut ImePreEditEvent) + 'static,
) -> PathWidgetDeclarer
pub fn on_ime_pre_edit_capture( self, f: impl FnMut(&mut ImePreEditEvent) + 'static, ) -> PathWidgetDeclarer
Attaches a handler to the widget that is triggered during the capture phase of a input method pre-edit event. This is similar to on_ime_pre_edit, but it’s triggered earlier in the event flow.
Sourcepub fn on_chars(
self,
f: impl FnMut(&mut CharsEvent) + 'static,
) -> PathWidgetDeclarer
pub fn on_chars( self, f: impl FnMut(&mut CharsEvent) + 'static, ) -> PathWidgetDeclarer
Attaches a handler to the widget that is triggered when the input method commits text or keyboard pressed the text key
Sourcepub fn on_chars_capture(
self,
f: impl FnMut(&mut CharsEvent) + 'static,
) -> PathWidgetDeclarer
pub fn on_chars_capture( self, f: impl FnMut(&mut CharsEvent) + 'static, ) -> PathWidgetDeclarer
Attaches a handler to the widget that is triggered during the capture phase of a input method commit event. This is similar to on_chars, but it’s triggered earlier in the event flow.
Sourcepub fn on_key_down(
self,
f: impl FnMut(&mut KeyboardEvent) + 'static,
) -> PathWidgetDeclarer
pub fn on_key_down( self, f: impl FnMut(&mut KeyboardEvent) + 'static, ) -> PathWidgetDeclarer
Attaches a handler to the widget that is triggered when the keyboard key is pressed.
Sourcepub fn on_key_down_capture(
self,
f: impl FnMut(&mut KeyboardEvent) + 'static,
) -> PathWidgetDeclarer
pub fn on_key_down_capture( self, f: impl FnMut(&mut KeyboardEvent) + 'static, ) -> PathWidgetDeclarer
Attaches a handler to the widget that is triggered during the capture phase of a key down event. This is similar to on_key_down, but it’s triggered earlier in the event flow.
Sourcepub fn on_key_up(
self,
f: impl FnMut(&mut KeyboardEvent) + 'static,
) -> PathWidgetDeclarer
pub fn on_key_up( self, f: impl FnMut(&mut KeyboardEvent) + 'static, ) -> PathWidgetDeclarer
Attaches a handler to the widget that is triggered when the keyboard key is released.
Sourcepub fn on_key_up_capture(
self,
f: impl FnMut(&mut KeyboardEvent) + 'static,
) -> PathWidgetDeclarer
pub fn on_key_up_capture( self, f: impl FnMut(&mut KeyboardEvent) + 'static, ) -> PathWidgetDeclarer
Attaches a handler to the widget that is triggered during the capture phase of a key up event. This is similar to on_key_up, but it’s triggered earlier in the event flow.
Sourcepub fn on_focus(
self,
f: impl FnMut(&mut CommonEvent) + 'static,
) -> PathWidgetDeclarer
pub fn on_focus( self, f: impl FnMut(&mut CommonEvent) + 'static, ) -> PathWidgetDeclarer
Attaches a handler to the widget that is triggered when the widget is focused.
Sourcepub fn on_blur(
self,
f: impl FnMut(&mut CommonEvent) + 'static,
) -> PathWidgetDeclarer
pub fn on_blur( self, f: impl FnMut(&mut CommonEvent) + 'static, ) -> PathWidgetDeclarer
Attaches a handler to the widget that is triggered when the widget is lost focus.
Sourcepub fn on_focus_in(
self,
f: impl FnMut(&mut CommonEvent) + 'static,
) -> PathWidgetDeclarer
pub fn on_focus_in( self, f: impl FnMut(&mut CommonEvent) + 'static, ) -> PathWidgetDeclarer
Attaches a handler to the widget that is triggered when the widget or its descendants are focused. The main difference between this event and focus is that focusin bubbles while focus does not.
Sourcepub fn on_focus_in_capture(
self,
f: impl FnMut(&mut CommonEvent) + 'static,
) -> PathWidgetDeclarer
pub fn on_focus_in_capture( self, f: impl FnMut(&mut CommonEvent) + 'static, ) -> PathWidgetDeclarer
Attaches a handler to the widget that is triggered during the capture phase of a focus in event. This is similar to on_focus_in, but it’s triggered earlier in the event flow.
Sourcepub fn on_focus_out(
self,
f: impl FnMut(&mut CommonEvent) + 'static,
) -> PathWidgetDeclarer
pub fn on_focus_out( self, f: impl FnMut(&mut CommonEvent) + 'static, ) -> PathWidgetDeclarer
Attaches a handler to the widget that is triggered when the widgetor its descendants are lost focus. The main difference between this event and focusout is that focusout bubbles while blur does not
Sourcepub fn on_focus_out_capture(
self,
f: impl FnMut(&mut CommonEvent) + 'static,
) -> PathWidgetDeclarer
pub fn on_focus_out_capture( self, f: impl FnMut(&mut CommonEvent) + 'static, ) -> PathWidgetDeclarer
Attaches a handler to the widget that is triggered during the capture phase of a focus out event. This is similar to on_focus_out, but it’s triggered earlier in the event flow.
Sourcepub fn box_fit<_M, _V>(self, v: _V) -> PathWidgetDeclarer
pub fn box_fit<_M, _V>(self, v: _V) -> PathWidgetDeclarer
Initializes how its child should be scale to fit its box.
Sourcepub fn background<_M, _V>(self, v: _V) -> PathWidgetDeclarer
pub fn background<_M, _V>(self, v: _V) -> PathWidgetDeclarer
Initializes the background of the widget.
Sourcepub fn border<_M, _V>(self, v: _V) -> PathWidgetDeclarer
pub fn border<_M, _V>(self, v: _V) -> PathWidgetDeclarer
Initializes the border of the widget.
Sourcepub fn border_radius<_M, _V>(self, v: _V) -> PathWidgetDeclarer
pub fn border_radius<_M, _V>(self, v: _V) -> PathWidgetDeclarer
Initializes the border radius of the widget.
Sourcepub fn padding<_M, _V>(self, v: _V) -> PathWidgetDeclarer
pub fn padding<_M, _V>(self, v: _V) -> PathWidgetDeclarer
Initializes the extra space within the widget.
Sourcepub fn cursor<_M, _V>(self, v: _V) -> PathWidgetDeclarer
pub fn cursor<_M, _V>(self, v: _V) -> PathWidgetDeclarer
Initializes the cursor of the widget.
Sourcepub fn margin<_M, _V>(self, v: _V) -> PathWidgetDeclarer
pub fn margin<_M, _V>(self, v: _V) -> PathWidgetDeclarer
Initializes the space around the widget.
Sourcepub fn scrollable<_M, _V>(self, v: _V) -> PathWidgetDeclarer
pub fn scrollable<_M, _V>(self, v: _V) -> PathWidgetDeclarer
Initializes how user can scroll the widget.
Sourcepub fn scroll_pos<_M, _V>(self, v: _V) -> PathWidgetDeclarer
pub fn scroll_pos<_M, _V>(self, v: _V) -> PathWidgetDeclarer
Initializes the scroll position of the widget.
Sourcepub fn transform<_M, _V>(self, v: _V) -> PathWidgetDeclarer
pub fn transform<_M, _V>(self, v: _V) -> PathWidgetDeclarer
Initializes the transformation of the widget.
Sourcepub fn h_align<_M, _V>(self, v: _V) -> PathWidgetDeclarer
pub fn h_align<_M, _V>(self, v: _V) -> PathWidgetDeclarer
Initializes how the widget should be aligned horizontally.
Sourcepub fn v_align<_M, _V>(self, v: _V) -> PathWidgetDeclarer
pub fn v_align<_M, _V>(self, v: _V) -> PathWidgetDeclarer
Initializes how the widget should be aligned vertically.
Sourcepub fn anchor<_M, _V>(self, v: _V) -> PathWidgetDeclarer
pub fn anchor<_M, _V>(self, v: _V) -> PathWidgetDeclarer
Initializes the relative anchor to the parent of the widget
Sourcepub fn global_anchor<_M, _V>(self, v: _V) -> PathWidgetDeclarer
pub fn global_anchor<_M, _V>(self, v: _V) -> PathWidgetDeclarer
Initializes the global anchor of the widget.
Sourcepub fn visible<_M, _V>(self, v: _V) -> PathWidgetDeclarer
pub fn visible<_M, _V>(self, v: _V) -> PathWidgetDeclarer
Initializes the visibility of the widget.
Sourcepub fn opacity<_M, _V>(self, v: _V) -> PathWidgetDeclarer
pub fn opacity<_M, _V>(self, v: _V) -> PathWidgetDeclarer
Initializes the opacity of the widget.
Sourcepub fn keep_alive<_M, _V>(self, v: _V) -> PathWidgetDeclarer
pub fn keep_alive<_M, _V>(self, v: _V) -> PathWidgetDeclarer
Initializes the keep_alive value of the KeepAlive widget.
Trait Implementations§
Source§impl ObjDeclarer for PathWidgetDeclarer
impl ObjDeclarer for PathWidgetDeclarer
type Target = FatObj<State<PathWidget>>
Source§fn finish(
self,
_ctx_ಠ_ಠ: &BuildCtx<'_>,
) -> <PathWidgetDeclarer as ObjDeclarer>::Target
fn finish( self, _ctx_ಠ_ಠ: &BuildCtx<'_>, ) -> <PathWidgetDeclarer as ObjDeclarer>::Target
Auto Trait Implementations§
impl !Freeze for PathWidgetDeclarer
impl !RefUnwindSafe for PathWidgetDeclarer
impl !Send for PathWidgetDeclarer
impl !Sync for PathWidgetDeclarer
impl !UnwindSafe for PathWidgetDeclarer
impl Unpin for PathWidgetDeclarer
impl UnsafeUnpin for PathWidgetDeclarer
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
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.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.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> ⓘ
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> ⓘ
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