pub struct UiState {
pub dom_id: DomId,
pub dynamic_css_overrides: BTreeMap<NodeId, FastHashMap<DomString, CssProperty>>,
pub tag_ids_to_hover_active_states: BTreeMap<TagId, (NodeId, HoverGroup)>,
pub tab_index_tags: BTreeMap<TagId, (NodeId, TabIndex)>,
pub draggable_tags: BTreeMap<TagId, NodeId>,
pub tag_ids_to_node_ids: BTreeMap<TagId, NodeId>,
pub node_ids_to_tag_ids: BTreeMap<NodeId, TagId>,
pub hover_callbacks: BTreeMap<NodeId, BTreeMap<HoverEventFilter, (Callback, RefAny)>>,
pub focus_callbacks: BTreeMap<NodeId, BTreeMap<FocusEventFilter, (Callback, RefAny)>>,
pub not_callbacks: BTreeMap<NodeId, BTreeMap<NotEventFilter, (Callback, RefAny)>>,
pub window_callbacks: BTreeMap<NodeId, BTreeMap<WindowEventFilter, (Callback, RefAny)>>,
/* private fields */
}
Fields§
§dom_id: DomId
Unique identifier for the DOM
dynamic_css_overrides: BTreeMap<NodeId, FastHashMap<DomString, CssProperty>>
The style properties that should be overridden for this frame, cloned from the Css
tag_ids_to_hover_active_states: BTreeMap<TagId, (NodeId, HoverGroup)>
Stores all tags for nodes that need to activate on a :hover
or :active
event.
Tags -> Focusable nodes
Tags -> Draggable nodes
tag_ids_to_node_ids: BTreeMap<TagId, NodeId>
Tag IDs -> Node IDs
node_ids_to_tag_ids: BTreeMap<NodeId, TagId>
Reverse of tag_ids_to_node_ids
.
hover_callbacks: BTreeMap<NodeId, BTreeMap<HoverEventFilter, (Callback, RefAny)>>
§focus_callbacks: BTreeMap<NodeId, BTreeMap<FocusEventFilter, (Callback, RefAny)>>
§not_callbacks: BTreeMap<NodeId, BTreeMap<NotEventFilter, (Callback, RefAny)>>
§window_callbacks: BTreeMap<NodeId, BTreeMap<WindowEventFilter, (Callback, RefAny)>>
Implementations§
Source§impl UiState
impl UiState
Sourcepub fn new(dom: Dom, parent_dom: Option<(DomId, NodeId)>) -> UiState
pub fn new(dom: Dom, parent_dom: Option<(DomId, NodeId)>) -> UiState
The UiState contains all the tags (for hit-testing) as well as the mapping from Hit-testing tags to NodeIds (which are important for filtering input events and routing input events to the callbacks).
pub fn new_from_app_state<'a>( data: &RefAny, layout_info: LayoutInfo<'a>, parent_dom: Option<(DomId, NodeId)>, layout_callback: LayoutCallback, ) -> UiState
pub fn scan_for_iframe_callbacks( &self, ) -> Vec<(NodeId, &(IFrameCallback, RefAny))>
pub fn scan_for_gltexture_callbacks( &self, ) -> Vec<(NodeId, &(GlCallback, RefAny))>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for UiState
impl !RefUnwindSafe for UiState
impl !Send for UiState
impl !Sync for UiState
impl Unpin for UiState
impl !UnwindSafe for UiState
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