#[repr(C)]pub struct ItemTO { /* private fields */ }
Expand description
Invariant, same as vtable::Inner: vtable and ptr has to be valid and ptr an instance matching the vtable
Implementations§
Source§impl ItemTO
impl ItemTO
Sourcepub fn init(self: Pin<&Self>, _1: &ItemRc)
pub fn init(self: Pin<&Self>, _1: &ItemRc)
This function is called by the run-time after the memory for the item has been allocated and initialized. It will be called before any user specified bindings are set.
Sourcepub fn cached_rendering_data_offset(&self) -> &CachedRenderingData
pub fn cached_rendering_data_offset(&self) -> &CachedRenderingData
offset in bytes from the *const ItemImpl. isize::MAX means None
Sourcepub fn cached_rendering_data_offset_mut(&mut self) -> &mut CachedRenderingData
pub fn cached_rendering_data_offset_mut(&mut self) -> &mut CachedRenderingData
offset in bytes from the *const ItemImpl. isize::MAX means None
Sourcepub fn layout_info(
self: Pin<&Self>,
_1: Orientation,
_2: &WindowAdapterRc,
_3: &ItemRc,
) -> LayoutInfo
pub fn layout_info( self: Pin<&Self>, _1: Orientation, _2: &WindowAdapterRc, _3: &ItemRc, ) -> LayoutInfo
We would need max/min/preferred size, and all layout info
Sourcepub fn input_event_filter_before_children(
self: Pin<&Self>,
_1: &MouseEvent,
_2: &WindowAdapterRc,
_3: &ItemRc,
) -> InputEventFilterResult
pub fn input_event_filter_before_children( self: Pin<&Self>, _1: &MouseEvent, _2: &WindowAdapterRc, _3: &ItemRc, ) -> InputEventFilterResult
Event handler for mouse and touch event. This function is called before being called on children.
Then, depending on the return value, it is called for the children, and their children, then
Self::input_event
is called on the children, and finally Self::input_event
is called
on this item again.
Sourcepub fn input_event(
self: Pin<&Self>,
_1: &MouseEvent,
_2: &WindowAdapterRc,
_3: &ItemRc,
) -> InputEventResult
pub fn input_event( self: Pin<&Self>, _1: &MouseEvent, _2: &WindowAdapterRc, _3: &ItemRc, ) -> InputEventResult
Handle input event for mouse and touch event
pub fn focus_event( self: Pin<&Self>, _1: &FocusEvent, _2: &WindowAdapterRc, _3: &ItemRc, ) -> FocusEventResult
Sourcepub fn capture_key_event(
self: Pin<&Self>,
_1: &KeyEvent,
_2: &WindowAdapterRc,
_3: &ItemRc,
) -> KeyEventResult
pub fn capture_key_event( self: Pin<&Self>, _1: &KeyEvent, _2: &WindowAdapterRc, _3: &ItemRc, ) -> KeyEventResult
Called on the parents of the focused item, allowing for global shortcuts and similar overrides of the default actions.
pub fn key_event( self: Pin<&Self>, _1: &KeyEvent, _2: &WindowAdapterRc, _3: &ItemRc, ) -> KeyEventResult
pub fn render( self: Pin<&Self>, _1: &mut &'_ mut dyn ItemRenderer, _2: &ItemRc, _3: LogicalSize, ) -> RenderingResult
pub fn bounding_rect( self: Pin<&Self>, _1: &WindowAdapterRc, _2: &ItemRc, _3: LogicalRect, ) -> LogicalRect
pub fn clips_children(self: Pin<&Self>) -> bool
Sourcepub fn get_vtable(&self) -> &ItemVTable
pub fn get_vtable(&self) -> &ItemVTable
Returns a reference to the VTable