Skip to main content

ExpandedDeclarer

Struct ExpandedDeclarer 

Source
pub struct ExpandedDeclarer { /* private fields */ }

Implementations§

Source§

impl ExpandedDeclarer

Source

pub fn flex<_M, _V>(self, v: _V) -> ExpandedDeclarer
where DeclareInit<f32>: DeclareFrom<_V, _M>,

Source§

impl ExpandedDeclarer

Source

pub fn tab_index<_M, _V>(self, v: _V) -> ExpandedDeclarer
where DeclareInit<i16>: DeclareFrom<_V, _M>,

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

Source

pub fn auto_focus<_M, _V>(self, v: _V) -> ExpandedDeclarer
where DeclareInit<bool>: DeclareFrom<_V, _M>,

Initializes whether the widget should automatically get focus when the window loads.

Source

pub fn on_event(self, f: impl FnMut(&mut Event) + 'static) -> ExpandedDeclarer

Attaches an event handler to the widget. It’s triggered when any event or lifecycle change happens.

Source

pub fn on_mounted( self, f: impl FnOnce(&mut CommonEvent) + 'static, ) -> ExpandedDeclarer

Attaches an event handler that runs when the widget is first mounted to the tree

Source

pub fn on_performed_layout( self, f: impl FnMut(&mut CommonEvent) + 'static, ) -> ExpandedDeclarer

Attaches an event handler that runs after the widget is performed layout.

Source

pub fn on_disposed( self, f: impl FnOnce(&mut CommonEvent) + 'static, ) -> ExpandedDeclarer

Attaches an event handler that runs when the widget is disposed.

Source

pub fn on_pointer_down( self, f: impl FnMut(&mut PointerEvent) + 'static, ) -> ExpandedDeclarer

Attaches a handler to the widget that is triggered when a pointer down occurs.

Source

pub fn on_pointer_down_capture( self, f: impl FnMut(&mut PointerEvent) + 'static, ) -> ExpandedDeclarer

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.

Source

pub fn on_pointer_up( self, f: impl FnMut(&mut PointerEvent) + 'static, ) -> ExpandedDeclarer

Attaches a handler to the widget that is triggered when a pointer up occurs.

Source

pub fn on_pointer_up_capture( self, f: impl FnMut(&mut PointerEvent) + 'static, ) -> ExpandedDeclarer

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.

Source

pub fn on_pointer_move( self, f: impl FnMut(&mut PointerEvent) + 'static, ) -> ExpandedDeclarer

Attaches a handler to the widget that is triggered when a pointer move occurs.

Source

pub fn on_pointer_move_capture( self, f: impl FnMut(&mut PointerEvent) + 'static, ) -> ExpandedDeclarer

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.

Source

pub fn on_pointer_cancel( self, f: impl FnMut(&mut PointerEvent) + 'static, ) -> ExpandedDeclarer

Attaches a handler to the widget that is triggered when a pointer event cancels.

Source

pub fn on_pointer_enter( self, f: impl FnMut(&mut PointerEvent) + 'static, ) -> ExpandedDeclarer

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

Source

pub fn on_pointer_leave( self, f: impl FnMut(&mut PointerEvent) + 'static, ) -> ExpandedDeclarer

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.

Source

pub fn on_tap( self, f: impl FnMut(&mut PointerEvent) + 'static, ) -> ExpandedDeclarer

Attaches a handler to the widget that is triggered when a tap(click) occurs.

Source

pub fn on_tap_capture( self, f: impl FnMut(&mut PointerEvent) + 'static, ) -> ExpandedDeclarer

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.

Source

pub fn on_double_tap( self, f: impl FnMut(&mut PointerEvent) + 'static, ) -> ExpandedDeclarer

Attaches a handler to the widget that is triggered when a double tap occurs.

Source

pub fn on_double_tap_capture( self, f: impl FnMut(&mut PointerEvent) + 'static, ) -> ExpandedDeclarer

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.

Source

pub fn on_triple_tap( self, f: impl FnMut(&mut PointerEvent) + 'static, ) -> ExpandedDeclarer

Attaches a handler to the widget that is triggered when a triple tap occurs.

Source

pub fn on_triple_tap_capture( self, f: impl FnMut(&mut PointerEvent) + 'static, ) -> ExpandedDeclarer

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.

Source

pub fn on_x_times_tap( self, f: (usize, impl FnMut(&mut PointerEvent) + 'static), ) -> ExpandedDeclarer

Attaches a handler to the widget that is triggered when a x-times tap occurs.

Source

pub fn on_x_times_tap_capture( self, f: (usize, impl FnMut(&mut PointerEvent) + 'static), ) -> ExpandedDeclarer

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.

Source

pub fn on_wheel( self, f: impl FnMut(&mut WheelEvent) + 'static, ) -> ExpandedDeclarer

Attaches a handler to the widget that is triggered when the user rotates a wheel button on a pointing device (typically a mouse).

Source

pub fn on_wheel_capture( self, f: impl FnMut(&mut WheelEvent) + 'static, ) -> ExpandedDeclarer

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.

Source

pub fn on_ime_pre_edit( self, f: impl FnMut(&mut ImePreEditEvent) + 'static, ) -> ExpandedDeclarer

Attaches a handler to the widget that is triggered when the input method pre-edit area is changed.

Source

pub fn on_ime_pre_edit_capture( self, f: impl FnMut(&mut ImePreEditEvent) + 'static, ) -> ExpandedDeclarer

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.

Source

pub fn on_chars( self, f: impl FnMut(&mut CharsEvent) + 'static, ) -> ExpandedDeclarer

Attaches a handler to the widget that is triggered when the input method commits text or keyboard pressed the text key

Source

pub fn on_chars_capture( self, f: impl FnMut(&mut CharsEvent) + 'static, ) -> ExpandedDeclarer

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.

Source

pub fn on_key_down( self, f: impl FnMut(&mut KeyboardEvent) + 'static, ) -> ExpandedDeclarer

Attaches a handler to the widget that is triggered when the keyboard key is pressed.

Source

pub fn on_key_down_capture( self, f: impl FnMut(&mut KeyboardEvent) + 'static, ) -> ExpandedDeclarer

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.

Source

pub fn on_key_up( self, f: impl FnMut(&mut KeyboardEvent) + 'static, ) -> ExpandedDeclarer

Attaches a handler to the widget that is triggered when the keyboard key is released.

Source

pub fn on_key_up_capture( self, f: impl FnMut(&mut KeyboardEvent) + 'static, ) -> ExpandedDeclarer

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.

Source

pub fn on_focus( self, f: impl FnMut(&mut CommonEvent) + 'static, ) -> ExpandedDeclarer

Attaches a handler to the widget that is triggered when the widget is focused.

Source

pub fn on_blur( self, f: impl FnMut(&mut CommonEvent) + 'static, ) -> ExpandedDeclarer

Attaches a handler to the widget that is triggered when the widget is lost focus.

Source

pub fn on_focus_in( self, f: impl FnMut(&mut CommonEvent) + 'static, ) -> ExpandedDeclarer

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.

Source

pub fn on_focus_in_capture( self, f: impl FnMut(&mut CommonEvent) + 'static, ) -> ExpandedDeclarer

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.

Source

pub fn on_focus_out( self, f: impl FnMut(&mut CommonEvent) + 'static, ) -> ExpandedDeclarer

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

Source

pub fn on_focus_out_capture( self, f: impl FnMut(&mut CommonEvent) + 'static, ) -> ExpandedDeclarer

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.

Source

pub fn box_fit<_M, _V>(self, v: _V) -> ExpandedDeclarer
where DeclareInit<BoxFit>: DeclareFrom<_V, _M>,

Initializes how its child should be scale to fit its box.

Source

pub fn background<_M, _V>(self, v: _V) -> ExpandedDeclarer

Initializes the background of the widget.

Source

pub fn border<_M, _V>(self, v: _V) -> ExpandedDeclarer

Initializes the border of the widget.

Source

pub fn border_radius<_M, _V>(self, v: _V) -> ExpandedDeclarer

Initializes the border radius of the widget.

Source

pub fn padding<_M, _V>(self, v: _V) -> ExpandedDeclarer

Initializes the extra space within the widget.

Source

pub fn cursor<_M, _V>(self, v: _V) -> ExpandedDeclarer

Initializes the cursor of the widget.

Source

pub fn margin<_M, _V>(self, v: _V) -> ExpandedDeclarer

Initializes the space around the widget.

Source

pub fn scrollable<_M, _V>(self, v: _V) -> ExpandedDeclarer

Initializes how user can scroll the widget.

Source

pub fn scroll_pos<_M, _V>(self, v: _V) -> ExpandedDeclarer

Initializes the scroll position of the widget.

Source

pub fn transform<_M, _V>(self, v: _V) -> ExpandedDeclarer

Initializes the transformation of the widget.

Source

pub fn h_align<_M, _V>(self, v: _V) -> ExpandedDeclarer
where DeclareInit<HAlign>: DeclareFrom<_V, _M>,

Initializes how the widget should be aligned horizontally.

Source

pub fn v_align<_M, _V>(self, v: _V) -> ExpandedDeclarer
where DeclareInit<VAlign>: DeclareFrom<_V, _M>,

Initializes how the widget should be aligned vertically.

Source

pub fn anchor<_M, _V>(self, v: _V) -> ExpandedDeclarer
where DeclareInit<Anchor>: DeclareFrom<_V, _M>,

Initializes the relative anchor to the parent of the widget

Source

pub fn global_anchor<_M, _V>(self, v: _V) -> ExpandedDeclarer
where DeclareInit<Anchor>: DeclareFrom<_V, _M>,

Initializes the global anchor of the widget.

Source

pub fn visible<_M, _V>(self, v: _V) -> ExpandedDeclarer
where DeclareInit<bool>: DeclareFrom<_V, _M>,

Initializes the visibility of the widget.

Source

pub fn opacity<_M, _V>(self, v: _V) -> ExpandedDeclarer
where DeclareInit<f32>: DeclareFrom<_V, _M>,

Initializes the opacity of the widget.

Source

pub fn keep_alive<_M, _V>(self, v: _V) -> ExpandedDeclarer
where DeclareInit<bool>: DeclareFrom<_V, _M>,

Initializes the keep_alive value of the KeepAlive widget.

Trait Implementations§

Source§

impl ObjDeclarer for ExpandedDeclarer

Source§

type Target = FatObj<State<Expanded>>

Source§

fn finish( self, _ctx_ಠ_ಠ: &BuildCtx<'_>, ) -> <ExpandedDeclarer as ObjDeclarer>::Target

Finish the object creation with the given context.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> ChildFrom<T, ()> for T

Source§

fn child_from(value: T, _: &BuildCtx<'_>) -> T

Source§

impl<T> Downcast for T
where T: Any,

Source§

fn into_any(self: Box<T>) -> Box<dyn Any>

Convert 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>

Convert 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)

Convert &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)

Convert &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> Downcast<T> for T

Source§

fn downcast(&self) -> &T

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts 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
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> Upcast<T> for T

Source§

fn upcast(&self) -> Option<&T>

Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V