diff options
Diffstat (limited to 'src/tuine/component')
-rw-r--r-- | src/tuine/component/base/focus.rs | 0 | ||||
-rw-r--r-- | src/tuine/component/mod.rs | 11 |
2 files changed, 10 insertions, 1 deletions
diff --git a/src/tuine/component/base/focus.rs b/src/tuine/component/base/focus.rs new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/src/tuine/component/base/focus.rs diff --git a/src/tuine/component/mod.rs b/src/tuine/component/mod.rs index aaea0f32..90713c5e 100644 --- a/src/tuine/component/mod.rs +++ b/src/tuine/component/mod.rs @@ -16,12 +16,21 @@ pub use banner::*; use enum_dispatch::enum_dispatch; use tui::Frame; -use super::{Bounds, DrawContext, Event, LayoutNode, Size, StateContext, Status}; +use super::{Bounds, DrawContext, Element, Event, LayoutNode, Size, StateContext, Status}; /// A component displays information and can be interacted with. #[allow(unused_variables)] #[enum_dispatch] pub trait TmpComponent<Message> { + /// Builds as component into an [`Element`](super::Element). + #[track_caller] + fn build(self, ctx: ()) -> Element<Message> + where + Self: Sized, + { + todo!() + } + /// Draws the component. fn draw<Backend>( &mut self, state_ctx: &mut StateContext<'_>, draw_ctx: &DrawContext<'_>, |