azul_core::ui_description

Struct UiDescription

Source
pub struct UiDescription {
    pub dom_id: DomId,
    pub html_tree: NodeDataContainer<HtmlCascadeInfo>,
    pub ui_descr_root: NodeId,
    pub styled_nodes: NodeDataContainer<StyledNode>,
    pub dynamic_css_overrides: BTreeMap<NodeId, FastHashMap<DomString, CssProperty>>,
    pub selected_hover_nodes: BTreeMap<NodeId, HoverGroup>,
}

Fields§

§dom_id: DomId

DOM ID of this arena (so that multiple DOMs / IFrames can be displayed in one window)

§html_tree: NodeDataContainer<HtmlCascadeInfo>

Data necessary for matching nodes properly (necessary to resolve CSS paths in callbacks)

§ui_descr_root: NodeId

ID of the root node of the arena (usually NodeId(0))

§styled_nodes: NodeDataContainer<StyledNode>

This field is created from the Css

§dynamic_css_overrides: BTreeMap<NodeId, FastHashMap<DomString, CssProperty>>

The style properties that should be overridden for this frame, cloned from the Css

§selected_hover_nodes: BTreeMap<NodeId, HoverGroup>

In order to hit-test :hover and :active selectors, need to insert tags for all rectangles that have a non-:hover path, for example if we have #thing:hover, then all nodes selected by #thing need to get a TagId, otherwise, they can’t be hit-tested.

Implementations§

Source§

impl UiDescription

Source

pub fn new( ui_state: &mut UiState, style: &Css, focused_node: &Option<(DomId, NodeId)>, hovered_nodes: &BTreeMap<NodeId, HitTestItem>, is_mouse_down: bool, ) -> Self

Applies the styles to the nodes calculated from the layout_screen function and calculates the final display list that is submitted to the renderer.

Trait Implementations§

Source§

impl Debug for UiDescription

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

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

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.