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

pub trait Item {
    pub fn init(self: Pin<&Self>, _1: &ComponentWindow);
pub fn geometry(self: Pin<&Self>) -> Rect;
pub fn rendering_primitive(
        self: Pin<&Self>,
        _1: &ComponentWindow
    ) -> HighLevelRenderingPrimitive;
pub fn rendering_variables(
        self: Pin<&Self>,
        _1: &ComponentWindow
    ) -> SharedArray<RenderingVariable>;
pub fn layouting_info(self: Pin<&Self>, _1: &ComponentWindow) -> LayoutInfo;
pub fn input_event(
        self: Pin<&Self>,
        _1: MouseEvent,
        _2: &ComponentWindow,
        _3: &ItemRc
    ) -> InputEventResult;
pub fn focus_event(self: Pin<&Self>, _1: &FocusEvent, _2: &ComponentWindow);
pub 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

pub 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.

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

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

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

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.

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

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.

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

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

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

input event

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

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

Loading content...

Implementors

impl Item for BorderRectangle[src]

impl Item for Clip[src]

impl Item for ClippedImage[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...