euv_core/component/
impl.rs1use crate::*;
2
3impl ComponentContext {
5 pub fn new() -> Self {
7 let mut ctx: ComponentContext = ComponentContext::default();
8 ctx.set_hooks(Vec::new());
9 ctx.set_hook_index(0_usize);
10 ctx
11 }
12}
13
14impl ComponentContext {
16 pub fn reset_hook_index(&mut self) {
18 self.set_hook_index(0_usize);
19 }
20}
21
22impl ComponentHandle {
24 pub fn new(id: usize) -> Self {
26 let mut handle: ComponentHandle = ComponentHandle::default();
27 handle.set_id(id);
28 handle
29 }
30}