logo
pub trait Item {
    fn init(self: Pin<&Self>, _1: &WindowRc);
    fn geometry(self: Pin<&Self>) -> Rect;
    fn layout_info(
        self: Pin<&Self>,
        _1: Orientation,
        _2: &WindowRc
    ) -> LayoutInfo; fn input_event_filter_before_children(
        self: Pin<&Self>,
        _1: MouseEvent,
        _2: &WindowRc,
        _3: &ItemRc
    ) -> InputEventFilterResult; fn input_event(
        self: Pin<&Self>,
        _1: MouseEvent,
        _2: &WindowRc,
        _3: &ItemRc
    ) -> InputEventResult; fn focus_event(
        self: Pin<&Self>,
        _1: &FocusEvent,
        _2: &WindowRc
    ) -> FocusEventResult; fn key_event(
        self: Pin<&Self>,
        _1: &KeyEvent,
        _2: &WindowRc
    ) -> KeyEventResult; fn render(
        self: Pin<&Self>,
        _1: &mut &'_ mut dyn ItemRenderer,
        _2: &ItemRc
    ) -> RenderingResult; }
Expand description

Items are the nodes in the render tree. Note: Was generated from the #[vtable] macro on ItemVTable

Required Methods

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.

Returns the geometry of this item (relative to its parent item)

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

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.

Handle input event for mouse and touch event

Implementors