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

pub trait Item {
    fn init(self: Pin<&Self>, _1: &ComponentWindow);
fn geometry(self: Pin<&Self>) -> Rect;
fn rendering_primitive(
        self: Pin<&Self>,
        _1: &ComponentWindow
    ) -> HighLevelRenderingPrimitive;
fn rendering_variables(
        self: Pin<&Self>,
        _1: &ComponentWindow
    ) -> SharedArray<RenderingVariable>;
fn layouting_info(self: Pin<&Self>, _1: &ComponentWindow) -> LayoutInfo;
fn input_event(
        self: Pin<&Self>,
        _1: MouseEvent,
        _2: &ComponentWindow,
        _3: Pin<VRef<'_, ComponentVTable>>
    ) -> InputEventResult;
fn focus_event(self: Pin<&Self>, _1: &FocusEvent, _2: &ComponentWindow);
fn key_event(
        self: Pin<&Self>,
        _1: &KeyEvent,
        _2: &ComponentWindow
    ) -> KeyEventResult; }

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)

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

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

fn rendering_primitive(
    self: Pin<&Self>,
    _1: &ComponentWindow
) -> HighLevelRenderingPrimitive

Return the rendering primitive used to display this item. This should depend on only rarely changed properties as it typically contains data uploaded to the GPU.

fn rendering_variables(
    self: Pin<&Self>,
    _1: &ComponentWindow
) -> SharedArray<RenderingVariable>

Return the variables needed to render the graphical primitives of this item. These are typically variables that do not require uploading any data sets to the GPU and can instead be represented using uniforms.

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

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

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

input event

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

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

Loading content...

Implementors

impl Item for BorderRectangle[src]

impl Item for Flickable[src]

impl Item for Image[src]

impl Item for Path[src]

impl Item for Rectangle[src]

impl Item for Text[src]

impl Item for TextInput[src]

impl Item for TouchArea[src]

impl Item for Window[src]

Loading content...