diff options
author | Shav Kinderlehrer <[email protected]> | 2024-03-23 13:08:14 -0400 |
---|---|---|
committer | Shav Kinderlehrer <[email protected]> | 2024-03-23 13:08:14 -0400 |
commit | 0e29fa02995273bfd803aea48773cbe52a7366ed (patch) | |
tree | efd8302cfc433c076010d94849fda224d36167d4 /src/app_action.rs | |
parent | 0c5e8ab544823fbb4936c536ee1d8a66298f7e51 (diff) | |
download | molehole-0e29fa02995273bfd803aea48773cbe52a7366ed.tar.gz molehole-0e29fa02995273bfd803aea48773cbe52a7366ed.zip |
Rework actions and events + start statusbar
Diffstat (limited to 'src/app_action.rs')
-rw-r--r-- | src/app_action.rs | 25 |
1 files changed, 21 insertions, 4 deletions
diff --git a/src/app_action.rs b/src/app_action.rs index 93131ac..333e284 100644 --- a/src/app_action.rs +++ b/src/app_action.rs @@ -1,8 +1,25 @@ -#[derive(Default, Clone)] +use std::fmt; + +#[derive(Default, Clone, Debug)] pub enum AppAction { - StatusBarMessage(String), - StatusBarError(String), - StatusBarInput(String), + StatusBarGetInput(String), + StatusBarSetMessage(String), + StatusBarSetError(String), + OpenUrl, + + ScrollUp, + ScrollDown, + ScrollTop, + ScrollBottom, + + ShowHelpMenu, + #[default] Quit, } + +impl fmt::Display for AppAction { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + write!(f, "{:?}", self) + } +} |