2024-03-23 17:08:14 +00:00
|
|
|
use std::fmt;
|
|
|
|
|
|
|
|
#[derive(Default, Clone, Debug)]
|
2024-03-06 16:45:18 +00:00
|
|
|
pub enum AppAction {
|
2024-03-23 17:08:14 +00:00
|
|
|
StatusBarSetMessage(String),
|
|
|
|
StatusBarSetError(String),
|
|
|
|
OpenUrl,
|
|
|
|
|
|
|
|
ScrollUp,
|
|
|
|
ScrollDown,
|
|
|
|
ScrollTop,
|
|
|
|
ScrollBottom,
|
|
|
|
|
|
|
|
ShowHelpMenu,
|
|
|
|
|
2024-03-06 19:14:07 +00:00
|
|
|
#[default]
|
|
|
|
Quit,
|
2024-03-06 16:45:18 +00:00
|
|
|
}
|
2024-03-23 17:08:14 +00:00
|
|
|
|
|
|
|
impl fmt::Display for AppAction {
|
|
|
|
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
|
|
|
write!(f, "{:?}", self)
|
|
|
|
}
|
|
|
|
}
|