aboutsummaryrefslogtreecommitdiff
path: root/helix-term/src/component.rs
diff options
context:
space:
mode:
authorJan Hrastnik2020-12-13 11:30:36 +0000
committerGitHub2020-12-13 11:30:36 +0000
commitb12a6dc8303bbc1b4b08a9abb4668741d154adbd (patch)
tree016aa433cf7c226341e9c3c3e74ea65060db1914 /helix-term/src/component.rs
parentb7a3e525ed7fed5ed79e8580df2e3496bd994419 (diff)
parent07801b60bccd0f084eae925e0290c24322de575f (diff)
Merge pull request #6 from helix-editor/compositor
Compositor v2 rewrite
Diffstat (limited to 'helix-term/src/component.rs')
-rw-r--r--helix-term/src/component.rs20
1 files changed, 0 insertions, 20 deletions
diff --git a/helix-term/src/component.rs b/helix-term/src/component.rs
deleted file mode 100644
index 08d6c620..00000000
--- a/helix-term/src/component.rs
+++ /dev/null
@@ -1,20 +0,0 @@
-// IDEA: render to a cache buffer, then if not changed, copy the buf into the parent
-type Surface = ();
-pub trait Component {
- /// Process input events, return true if handled.
- fn process_event(&mut self, event: crossterm::event::Event, args: ()) -> bool;
- /// Should redraw? Useful for saving redraw cycles if we know component didn't change.
- fn should_update(&self) -> bool {
- true
- }
-
- fn render(&mut self, surface: &mut Surface, args: ());
-}
-
-// HStack / VStack
-// focus by component id: each View/Editor gets it's own incremental id at create
-// Component: View(Arc<State>) -> multiple views can point to same state
-// id 0 = prompt?
-// when entering to prompt, it needs to direct Commands to last focus window
-// -> prompt.trigger(focus_id), on_leave -> focus(focus_id)
-// popups on another layer