pub struct Element { /* private fields */ }Implementations§
Source§impl Element
impl Element
pub fn new( render: impl FnOnce(ElementRenderCx<'_, '_, '_>) -> UiElement + 'static, ) -> Self
pub fn with_key( key: ElementKey, render: impl FnOnce(ElementRenderCx<'_, '_, '_>) -> UiElement + 'static, ) -> Self
pub fn child(self, child: impl Into<Element>) -> Self
pub fn content(self, content: impl IntoElementContent) -> Self
pub fn children( self, children: impl IntoIterator<Item = impl Into<Element>>, ) -> Self
pub fn key(self, key: impl AsRef<str>) -> Self
pub fn interaction(self, interaction: InteractionRole) -> Self
pub fn semantics(self, semantics: Semantics) -> Self
Sourcepub fn window_drag_region(self) -> Self
pub fn window_drag_region(self) -> Self
Marks this element as a native window drag region.
Interactive descendants are excluded automatically by hit testing.
pub fn phase(self, phase: RenderPhase) -> Self
pub fn animation(self, binding: AnimationBinding) -> Self
pub fn animation_target(self, property: AnimProperty, active: bool) -> Self
pub fn paint_bounds(self, rect: UiRect) -> Self
Sourcepub fn shadow(self, style: ShadowStyle) -> Self
pub fn shadow(self, style: ShadowStyle) -> Self
Applies one shadow to the composited element and subtree. Ancestor clips still apply.
pub fn focus_scope(self) -> Self
pub fn defer_children_compile(self) -> Self
Source§impl Element
impl Element
pub fn on_click_handler(self, handler: UiEventHandler) -> Self
pub fn on_click_capture_handler(self, handler: UiEventHandler) -> Self
pub fn event_policy(self, policy: EventPolicy) -> Self
pub fn on_click<F, Arguments>(self, handler: F) -> Selfwhere
F: IntoClickHandler<Arguments>,
pub fn on_click_event<F>(self, handler: F) -> Self
pub fn on_click_async<F, Fut>(self, handler: F) -> Self
pub fn on_click_capture<F>(self, handler: F) -> Self
pub fn on_event_handler( self, kind: UiEventKind, capture: bool, handler: UiInputEventHandler, ) -> Self
pub fn on_event<F>(self, kind: UiEventKind, handler: F) -> Self
pub fn on_event_capture<F>(self, kind: UiEventKind, handler: F) -> Self
pub fn on_pointer_down<F>(self, handler: F) -> Self
pub fn on_pointer_move<F>(self, handler: F) -> Self
pub fn on_pointer_up<F>(self, handler: F) -> Self
pub fn on_wheel<F>(self, handler: F) -> Self
pub fn on_key_down<F>(self, handler: F) -> Self
pub fn on_key_up<F>(self, handler: F) -> Self
pub fn on_input<F>(self, handler: F) -> Self
pub fn on_composition_start<F>(self, handler: F) -> Self
pub fn on_composition_update<F>(self, handler: F) -> Self
pub fn on_composition_end<F>(self, handler: F) -> Self
pub fn on_focus<F>(self, handler: F) -> Self
pub fn on_blur<F>(self, handler: F) -> Self
pub fn on_change<F>(self, handler: F) -> Self
Trait Implementations§
Source§impl DeclarativeView for Element
impl DeclarativeView for Element
fn compile( self, scope: &UiScope, context: &UiRenderContext<'_>, component_id: ComponentId, force_components: bool, ) -> UiElement
Auto Trait Implementations§
impl !RefUnwindSafe for Element
impl !Send for Element
impl !Sync for Element
impl !UnwindSafe for Element
impl Freeze for Element
impl Unpin for Element
impl UnsafeUnpin for Element
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