diff options
| author | Nathan Reiner <nathan@nathanreiner.xyz> | 2024-01-21 16:15:12 +0100 |
|---|---|---|
| committer | Nathan Reiner <nathan@nathanreiner.xyz> | 2024-01-21 16:15:12 +0100 |
| commit | 53a48a778af34bd25963881539e6f66f47dc5580 (patch) | |
| tree | 23a4193a40506fc354eaea626c9e8d58d343abae /src/ui | |
| parent | 6e0a9ec574dcc6da863c6d8e482c5a2cb4701df4 (diff) | |
add resizable pane
Diffstat (limited to 'src/ui')
| -rw-r--r-- | src/ui/mod.rs | 4 | ||||
| -rw-r--r-- | src/ui/pane.rs | 18 |
2 files changed, 22 insertions, 0 deletions
diff --git a/src/ui/mod.rs b/src/ui/mod.rs index 1e7fffe..b7c11fb 100644 --- a/src/ui/mod.rs +++ b/src/ui/mod.rs @@ -1,8 +1,12 @@ +use iced::widget::pane_grid::ResizeEvent; + pub mod graph; +pub mod pane; #[derive(Debug, Clone)] pub enum Message { InputChanged(String), UpdateFunction, UpdateScreen, + Resized(ResizeEvent) } diff --git a/src/ui/pane.rs b/src/ui/pane.rs new file mode 100644 index 0000000..86149d4 --- /dev/null +++ b/src/ui/pane.rs @@ -0,0 +1,18 @@ +#[derive(Debug, Clone, Default)] +pub enum PaneKind { + #[default] + EmptyPane, + FunctionPane, + GraphPane, +} + +#[derive(Clone, Default, Debug)] +pub struct Pane { + pub kind: PaneKind, +} + +impl Pane { + pub fn new(kind: PaneKind) -> Self { + Self { kind } + } +} |