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
impl UiDescription
Sourcepub fn new(
ui_state: &mut UiState,
style: &Css,
focused_node: &Option<(DomId, NodeId)>,
hovered_nodes: &BTreeMap<NodeId, HitTestItem>,
is_mouse_down: bool,
) -> Self
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§
Auto Trait Implementations§
impl Freeze for UiDescription
impl RefUnwindSafe for UiDescription
impl Send for UiDescription
impl Sync for UiDescription
impl Unpin for UiDescription
impl UnwindSafe for UiDescription
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more