Struct fungui::NodeInner

source ·
pub struct NodeInner<E: Extension> {
    pub value: NodeValue<E>,
    pub text_changed: bool,
    pub draw_rect: Rect,
    pub scroll_position: (f32, f32),
    pub clip_overflow: bool,
    pub draw_position: Rect,
    pub ext: E::NodeData,
    /* private fields */
}
Expand description

The inner data of a single node.

Node is a wrapper around this to allow it to be passed around easily via reference counting.

Fields§

§value: NodeValue<E>

The value of the node.

The value is either the name and children of the node or the text of the node.

§text_changed: bool

Whether the text of this node has changed since last viewed.

The render visitor should reset this flag after viewing it

§draw_rect: Rect

The current draw position of this node

§scroll_position: (f32, f32)

The scroll offset of all elements inside this one

§clip_overflow: bool

Whether this element clips child elements that overflow its bounds

§draw_position: Rect

The location that this element should be drawn at as decided by the layout engine

§ext: E::NodeData

Extension provided data

Implementations§

Returns a copy of the value for the given property if it exists.

Returns a reference to the value for the given property if it exists.

Returns the text of the node if it is a text node.

Trait Implementations§

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.