Trait sixtyfps_corelib::items::Item[][src]

pub trait Item {
    fn init(self: Pin<&Self>, _1: &ComponentWindow);
fn geometry(self: Pin<&Self>) -> Rect;
fn layouting_info(self: Pin<&Self>, _1: &ComponentWindow) -> LayoutInfo;
fn implicit_size(self: Pin<&Self>, _1: &ComponentWindow) -> Size;
fn input_event_filter_before_children(
        self: Pin<&Self>,
        _1: MouseEvent,
        _2: &ComponentWindow,
        _3: &ItemRc
    ) -> InputEventFilterResult;
fn input_event(
        self: Pin<&Self>,
        _1: MouseEvent,
        _2: &ComponentWindow,
        _3: &ItemRc
    ) -> InputEventResult;
fn focus_event(self: Pin<&Self>, _1: &FocusEvent, _2: &ComponentWindow);
fn key_event(
        self: Pin<&Self>,
        _1: &KeyEvent,
        _2: &ComponentWindow
    ) -> KeyEventResult;
fn render(self: Pin<&Self>, _1: &mut &'_ mut dyn ItemRenderer); }

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

Required methods

fn init(self: Pin<&Self>, _1: &ComponentWindow)[src]

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.

fn geometry(self: Pin<&Self>) -> Rect[src]

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

fn layouting_info(self: Pin<&Self>, _1: &ComponentWindow) -> LayoutInfo[src]

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

fn implicit_size(self: Pin<&Self>, _1: &ComponentWindow) -> Size[src]

fn input_event_filter_before_children(
    self: Pin<&Self>,
    _1: MouseEvent,
    _2: &ComponentWindow,
    _3: &ItemRc
) -> InputEventFilterResult
[src]

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.

fn input_event(
    self: Pin<&Self>,
    _1: MouseEvent,
    _2: &ComponentWindow,
    _3: &ItemRc
) -> InputEventResult
[src]

Handle input event for mouse and touch event

fn focus_event(self: Pin<&Self>, _1: &FocusEvent, _2: &ComponentWindow)[src]

fn key_event(
    self: Pin<&Self>,
    _1: &KeyEvent,
    _2: &ComponentWindow
) -> KeyEventResult
[src]

fn render(self: Pin<&Self>, _1: &mut &'_ mut dyn ItemRenderer)[src]

Loading content...

Implementors

impl Item for BorderRectangle[src]

impl Item for BoxShadow[src]

impl Item for Clip[src]

impl Item for ClippedImage[src]

impl Item for Flickable[src]

impl Item for FocusScope[src]

impl Item for Image[src]

impl Item for Opacity[src]

impl Item for Path[src]

impl Item for Rectangle[src]

impl Item for Rotate[src]

impl Item for Text[src]

impl Item for TextInput[src]

impl Item for TouchArea[src]

impl Item for Window[src]

Loading content...