pub struct CustomProps { /* private fields */ }Expand description
The props of a custom widget, as carried by Prop::Custom: the value
plus the widget’s type-erased definition (semantics and renders).
Implementations§
Source§impl CustomProps
impl CustomProps
pub fn name(&self) -> &'static str
pub fn props(&self) -> &AnyValue
pub fn get<T: 'static>(&self) -> Option<&T>
Sourcepub fn with_props(&self, props: AnyValue) -> CustomProps
pub fn with_props(&self, props: AnyValue) -> CustomProps
The same widget with other props, e.g. read back from a native view.
Sourcepub fn is_drawn(&self) -> bool
pub fn is_drawn(&self) -> bool
Whether the widget is drawn (by the core’s display list) rather than rendered natively.
pub fn a11y(&self) -> A11yProps
Sourcepub fn action(&self, action: &A11yAction) -> Option<AnyValue>
pub fn action(&self, action: &A11yAction) -> Option<AnyValue>
The event an accessibility action stands for, if any.
Sourcepub fn measure_drawn(
&self,
request: &MeasureRequest,
metrics: &PlatformMetrics,
) -> Option<Size>
pub fn measure_drawn( &self, request: &MeasureRequest, metrics: &PlatformMetrics, ) -> Option<Size>
Size from the drawn render, if the widget has one.
pub fn draw(&self, size: Size, metrics: &PlatformMetrics) -> Option<DisplayList>
pub fn pointer(&self, size: Size, event: &PointerEvent) -> Option<AnyValue>
Trait Implementations§
Source§impl Clone for CustomProps
impl Clone for CustomProps
Source§impl Debug for CustomProps
impl Debug for CustomProps
Auto Trait Implementations§
impl !RefUnwindSafe for CustomProps
impl !Send for CustomProps
impl !Sync for CustomProps
impl !UnwindSafe for CustomProps
impl Forget for CustomProps
impl Freeze for CustomProps
impl Move for CustomProps
impl Unpin for CustomProps
impl UnsafeUnpin for CustomProps
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