Krolyxon
Commit f2bd31a

Branches

Tags

Refs →

remagesrcaction.rs

39 lines · 907 B · Rust

1//! Every user-facing operation. Keys produce these today; the palette, IPC and command
2//! output will share the same grammar (parser and `Display` arrive with the keymap in M2).
3
4use crate::state::view::{Axis, Dir, FitMode};
5
6#[derive(Clone, Copy, Debug, PartialEq)]
7pub enum Zoom {
8 In,
9 Out,
10 /// Absolute zoom, 100 = one image pixel per screen pixel.
11 Percent(f32),
12}
13
14#[derive(Clone, Copy, Debug, PartialEq)]
15pub enum Action {
16 Next(usize),
17 Prev(usize),
18 First,
19 Last,
20 /// 1-based, like the status bar.
21 Goto(usize),
22 Zoom(Zoom),
23 Fit(FitMode),
24 /// From a key this pans for as long as the key is held; otherwise one step.
25 Pan(Dir),
26 PanEdge(Dir),
27 Center,
28 /// Quarter turns, positive = clockwise.
29 Rotate(i32),
30 Flip(Axis),
31 FilterToggle,
32 AlphaBgCycle,
33 Fullscreen,
34 BarToggle,
35 Reload,
36 Remove,
37 Cancel,
38 Quit,
39}