notedeck

One damus client to rule them all
git clone git://jb55.com/notedeck
Log | Files | Refs | README | LICENSE

view_state.rs (486B)


      1 use std::collections::HashMap;
      2 
      3 use crate::deck_state::DeckState;
      4 use crate::login_manager::AcquireKeyState;
      5 
      6 /// Various state for views
      7 #[derive(Default)]
      8 pub struct ViewState {
      9     pub login: AcquireKeyState,
     10     pub id_to_deck_state: HashMap<egui::Id, DeckState>,
     11     pub id_state_map: HashMap<egui::Id, AcquireKeyState>,
     12     pub id_string_map: HashMap<egui::Id, String>,
     13 }
     14 
     15 impl ViewState {
     16     pub fn login_mut(&mut self) -> &mut AcquireKeyState {
     17         &mut self.login
     18     }
     19 }