MCPcopy Create free account
hub / github.com/Kethku/Pando / new

Method new

aspen/src/context_stack/context.rs:28–45  ·  view source on GitHub ↗
(
        event_state: &'a EventState,
        shaper: &'a RefCell<Shaper>,
        states: &'a RefCell<HashMap<Token, Box<dyn Any>>>,
        focused_element: &'a RefCell<Option<Token>>,
        elem

Source from the content-addressed store, hash-verified

26
27impl<'a> Context<'a> {
28 pub fn new(
29 event_state: &'a EventState,
30 shaper: &'a RefCell<Shaper>,
31 states: &'a RefCell<HashMap<Token, Box<dyn Any>>>,
32 focused_element: &'a RefCell<Option<Token>>,
33 element_token: Token,
34 element_children: &'a Vec<Token>,
35 ) -> Context<'a> {
36 Context {
37 event_state,
38 shaper,
39 default_text_styles: Vec::new(),
40 states,
41 focused_element,
42 element_token,
43 element_children,
44 }
45 }
46
47 pub fn push_default_text_style(&mut self, style: StyleProperty<'static, Brush>) {
48 self.default_text_styles.push(style);

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected