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§
source§impl<E> NodeInner<E>where
E: Extension,
impl<E> NodeInner<E>where
E: Extension,
sourcepub fn get_property<V>(&self, key: &str) -> Option<V>where
V: ConvertValue<E>,
pub fn get_property<V>(&self, key: &str) -> Option<V>where
V: ConvertValue<E>,
Returns a copy of the value for the given property if it exists.
sourcepub fn get_property_ref<V>(&self, key: &str) -> Option<&V::RefType>where
V: ConvertValue<E>,
pub fn get_property_ref<V>(&self, key: &str) -> Option<&V::RefType>where
V: ConvertValue<E>,
Returns a reference to the value for the given property if it exists.