Struct sixtyfps_corelib::items::ItemVTable [−][src]
#[repr(C)]pub struct ItemVTable { pub init: unsafe extern "C" fn(_: Pin<VRef<'_, ItemVTable>>, window: &ComponentWindow), pub geometry: unsafe extern "C" fn(_: Pin<VRef<'_, ItemVTable>>) -> Rect, pub cached_rendering_data_offset: usize, pub layouting_info: unsafe extern "C" fn(_: Pin<VRef<'_, ItemVTable>>, window: &ComponentWindow) -> LayoutInfo, pub implicit_size: unsafe extern "C" fn(_: Pin<VRef<'_, ItemVTable>>, window: &ComponentWindow) -> Size, pub input_event_filter_before_children: unsafe extern "C" fn(_: Pin<VRef<'_, ItemVTable>>, _: MouseEvent, window: &ComponentWindow, self_rc: &ItemRc) -> InputEventFilterResult, pub input_event: unsafe extern "C" fn(_: Pin<VRef<'_, ItemVTable>>, _: MouseEvent, window: &ComponentWindow, self_rc: &ItemRc) -> InputEventResult, pub focus_event: unsafe extern "C" fn(_: Pin<VRef<'_, ItemVTable>>, _: &FocusEvent, window: &ComponentWindow), pub key_event: unsafe extern "C" fn(_: Pin<VRef<'_, ItemVTable>>, _: &KeyEvent, window: &ComponentWindow) -> KeyEventResult, pub render: unsafe extern "C" fn(_: Pin<VRef<'_, ItemVTable>>, backend: &mut &'_ mut dyn ItemRenderer), }
Items are the nodes in the render tree.
Fields
init: unsafe extern "C" fn(_: Pin<VRef<'_, ItemVTable>>, window: &ComponentWindow)
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.
geometry: unsafe extern "C" fn(_: Pin<VRef<'_, ItemVTable>>) -> Rect
Returns the geometry of this item (relative to its parent item)
cached_rendering_data_offset: usize
offset in bytes fromthe *const ItemImpl. isize::MAX means None
layouting_info: unsafe extern "C" fn(_: Pin<VRef<'_, ItemVTable>>, window: &ComponentWindow) -> LayoutInfo
We would need max/min/preferred size, and all layout info
implicit_size: unsafe extern "C" fn(_: Pin<VRef<'_, ItemVTable>>, window: &ComponentWindow) -> Size
input_event_filter_before_children: unsafe extern "C" fn(_: Pin<VRef<'_, ItemVTable>>, _: MouseEvent, window: &ComponentWindow, self_rc: &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 finaly Self::input_event
is called
on this item again.
input_event: unsafe extern "C" fn(_: Pin<VRef<'_, ItemVTable>>, _: MouseEvent, window: &ComponentWindow, self_rc: &ItemRc) -> InputEventResult
Handle input event for mouse and touch event
focus_event: unsafe extern "C" fn(_: Pin<VRef<'_, ItemVTable>>, _: &FocusEvent, window: &ComponentWindow)
key_event: unsafe extern "C" fn(_: Pin<VRef<'_, ItemVTable>>, _: &KeyEvent, window: &ComponentWindow) -> KeyEventResult
render: unsafe extern "C" fn(_: Pin<VRef<'_, ItemVTable>>, backend: &mut &'_ mut dyn ItemRenderer)
Implementations
impl ItemVTable
[src]
impl ItemVTable
[src]pub fn new<T: Item + ItemConsts>() -> Self
[src]
Create a vtable suitable for a given type implementing the trait.
Trait Implementations
impl HasStaticVTable<ItemVTable> for Rectangle
[src]
impl HasStaticVTable<ItemVTable> for Rectangle
[src]fn static_vtable() -> &'static ItemVTable
[src]
impl HasStaticVTable<ItemVTable> for BorderRectangle
[src]
impl HasStaticVTable<ItemVTable> for BorderRectangle
[src]fn static_vtable() -> &'static ItemVTable
[src]
impl HasStaticVTable<ItemVTable> for Flickable
[src]
impl HasStaticVTable<ItemVTable> for Flickable
[src]fn static_vtable() -> &'static ItemVTable
[src]
impl HasStaticVTable<ItemVTable> for Window
[src]
impl HasStaticVTable<ItemVTable> for Window
[src]fn static_vtable() -> &'static ItemVTable
[src]
impl HasStaticVTable<ItemVTable> for BoxShadow
[src]
impl HasStaticVTable<ItemVTable> for BoxShadow
[src]fn static_vtable() -> &'static ItemVTable
[src]
impl HasStaticVTable<ItemVTable> for Text
[src]
impl HasStaticVTable<ItemVTable> for Text
[src]fn static_vtable() -> &'static ItemVTable
[src]
impl HasStaticVTable<ItemVTable> for TextInput
[src]
impl HasStaticVTable<ItemVTable> for TextInput
[src]fn static_vtable() -> &'static ItemVTable
[src]
impl HasStaticVTable<ItemVTable> for Image
[src]
impl HasStaticVTable<ItemVTable> for Image
[src]fn static_vtable() -> &'static ItemVTable
[src]
impl HasStaticVTable<ItemVTable> for ClippedImage
[src]
impl HasStaticVTable<ItemVTable> for ClippedImage
[src]fn static_vtable() -> &'static ItemVTable
[src]
impl HasStaticVTable<ItemVTable> for TouchArea
[src]
impl HasStaticVTable<ItemVTable> for TouchArea
[src]fn static_vtable() -> &'static ItemVTable
[src]
impl HasStaticVTable<ItemVTable> for FocusScope
[src]
impl HasStaticVTable<ItemVTable> for FocusScope
[src]fn static_vtable() -> &'static ItemVTable
[src]
impl HasStaticVTable<ItemVTable> for Clip
[src]
impl HasStaticVTable<ItemVTable> for Clip
[src]fn static_vtable() -> &'static ItemVTable
[src]
impl HasStaticVTable<ItemVTable> for Opacity
[src]
impl HasStaticVTable<ItemVTable> for Opacity
[src]fn static_vtable() -> &'static ItemVTable
[src]
impl HasStaticVTable<ItemVTable> for Rotate
[src]
impl HasStaticVTable<ItemVTable> for Rotate
[src]fn static_vtable() -> &'static ItemVTable
[src]
impl HasStaticVTable<ItemVTable> for Path
[src]
impl HasStaticVTable<ItemVTable> for Path
[src]fn static_vtable() -> &'static ItemVTable
[src]
impl VTableMeta for ItemVTable
[src]
impl VTableMeta for ItemVTable
[src]type VTable = ItemVTable
That’s the VTable itself (so most likely Self)
type Target = ItemTO
That’s the trait object that implements the functions Read more
Auto Trait Implementations
impl RefUnwindSafe for ItemVTable
impl RefUnwindSafe for ItemVTable
impl Send for ItemVTable
impl Send for ItemVTable
impl Sync for ItemVTable
impl Sync for ItemVTable
impl Unpin for ItemVTable
impl Unpin for ItemVTable
impl UnwindSafe for ItemVTable
impl UnwindSafe for ItemVTable