global.rs 498 Bytes
Newer Older
1
use crate::properties::KeyboardState;
2 3
use std::collections::HashMap;

Florian Blasius's avatar
Florian Blasius committed
4
use dces::prelude::Entity;
5 6

#[derive(Default)]
7
/// The `Global` struct is used to define global `properties` that could be access application width.
8
pub struct Global {
9
    /// Contains the current focused widget.
10
    pub focused_widget: Option<Entity>,
11 12 13

    /// Used to reference widgets by its css id.
    pub id_map: HashMap<String, Entity>,
14 15 16

    /// Stores the state of the keyboard
    pub keyboard_state: KeyboardState,
17
}