[][src]Trait sixtyfps_corelib::component::Component

pub trait Component {
    fn visit_children_item(
        self: Pin<&Self>,
        _1: isize,
        _2: TraversalOrder,
        _3: VRefMut<'_, ItemVisitorVTable>
    ) -> VisitChildrenResult;
fn layout_info(self: Pin<&Self>) -> LayoutInfo;
fn compute_layout(self: Pin<&Self>);
fn input_event(
        self: Pin<&Self>,
        _1: MouseEvent,
        _2: &ComponentWindow,
        _3: &Pin<VRef<'_, ComponentVTable>>
    ) -> InputEventResult;
fn key_event(
        self: Pin<&Self>,
        _1: &KeyEvent,
        _2: &ComponentWindow
    ) -> KeyEventResult;
fn focus_event(
        self: Pin<&Self>,
        _1: &FocusEvent,
        _2: &ComponentWindow
    ) -> FocusEventResult; }

A Component is representing an unit that is allocated together Note: Was generated from the #[vtable] macro on ComponentVTable

Required methods

fn visit_children_item(
    self: Pin<&Self>,
    _1: isize,
    _2: TraversalOrder,
    _3: VRefMut<'_, ItemVisitorVTable>
) -> VisitChildrenResult

Visit the children of the item at index index. Note that the root item is at index 0, so passing 0 would visit the item under root (the children of root). If you want to visit the root item, you need to pass -1 as an index.

fn layout_info(self: Pin<&Self>) -> LayoutInfo

Returns the layout info for this component

fn compute_layout(self: Pin<&Self>)

Will compute the layout of

fn input_event(
    self: Pin<&Self>,
    _1: MouseEvent,
    _2: &ComponentWindow,
    _3: &Pin<VRef<'_, ComponentVTable>>
) -> InputEventResult

input event

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

key event

fn focus_event(
    self: Pin<&Self>,
    _1: &FocusEvent,
    _2: &ComponentWindow
) -> FocusEventResult

Event sent to transfer focus between items or to communicate window focus change.

Loading content...

Implementors

Loading content...