MCPcopy Index your code
hub / github.com/algoscienceacademy/RustUI / Component

Interface Component

src/components/mod.rs:14–24  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

12use crate::renderer::Renderer;
13
14pub trait Component {
15 fn render(&self, renderer: &mut dyn Renderer);
16 fn handle_event(&mut self, event: Event);
17 fn bounds(&self) -> Rect;
18 fn apply_style(&mut self, style: Style);
19 fn style_mut(&mut self) -> &mut Style;
20 fn style(&self) -> &Style;
21 fn style_name(&self) -> &str {
22 "default"
23 }
24}

Callers

nothing calls this directly

Implementers 5

button.rssrc/components/button.rs
stack.rssrc/components/stack.rs
view.rssrc/components/view.rs
input.rssrc/components/input.rs
text.rssrc/components/text.rs

Calls

no outgoing calls

Tested by

no test coverage detected