[][src]Struct azul_core::ui_state::UiState

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)>>,
    // some fields omitted
}

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.

tab_index_tags: BTreeMap<TagId, (NodeId, TabIndex)>

Tags -> Focusable nodes

draggable_tags: BTreeMap<TagId, NodeId>

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

impl UiState[src]

pub const fn get_dom(&self) -> &CompactDom[src]

impl UiState[src]

pub fn new(dom: Dom, parent_dom: Option<(DomId, NodeId)>) -> UiState[src]

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
[src]

pub fn create_tags_for_hover_nodes(
    &mut self,
    hover_nodes: &BTreeMap<NodeId, HoverGroup>
)
[src]

pub fn scan_for_iframe_callbacks(
    &self
) -> Vec<(NodeId, &(IFrameCallback, RefAny))>
[src]

pub fn scan_for_gltexture_callbacks(
    &self
) -> Vec<(NodeId, &(GlCallback, RefAny))>
[src]

Trait Implementations

impl Debug for UiState[src]

Auto Trait Implementations

impl !RefUnwindSafe for UiState

impl !Send for UiState

impl !Sync for UiState

impl Unpin for UiState

impl !UnwindSafe for UiState

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.