i_slint_core::items

Struct ItemTO

Source
#[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

Source

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.

Source

pub fn cached_rendering_data_offset(&self) -> &CachedRenderingData

offset in bytes from the *const ItemImpl. isize::MAX means None

Source

pub fn cached_rendering_data_offset_mut(&mut self) -> &mut CachedRenderingData

offset in bytes from the *const ItemImpl. isize::MAX means None

Source

pub fn layout_info( self: Pin<&Self>, _1: Orientation, _2: &WindowAdapterRc, ) -> LayoutInfo

We would need max/min/preferred size, and all layout info

Source

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.

Source

pub fn input_event( self: Pin<&Self>, _1: MouseEvent, _2: &WindowAdapterRc, _3: &ItemRc, ) -> InputEventResult

Handle input event for mouse and touch event

Source

pub fn focus_event( self: Pin<&Self>, _1: &FocusEvent, _2: &WindowAdapterRc, _3: &ItemRc, ) -> FocusEventResult

Source

pub fn key_event( self: Pin<&Self>, _1: &KeyEvent, _2: &WindowAdapterRc, _3: &ItemRc, ) -> KeyEventResult

Source

pub fn render( self: Pin<&Self>, _1: &mut &'_ mut dyn ItemRenderer, _2: &ItemRc, _3: LogicalSize, ) -> RenderingResult

Source

pub fn get_vtable(&self) -> &ItemVTable

Returns a reference to the VTable

Source

pub fn as_ptr(&self) -> *const u8

Return a raw pointer to the object