chore: initial commit
This commit is contained in:
commit
ab93f649bd
31 changed files with 9918 additions and 0 deletions
56
src/app/message.rs
Normal file
56
src/app/message.rs
Normal file
|
|
@ -0,0 +1,56 @@
|
|||
// SPDX-License-Identifier: MPL-2.0 OR Apache-2.0
|
||||
// src/app/message.rs
|
||||
//
|
||||
// Top-level application messages (events, IO, and UI signals).
|
||||
|
||||
use std::path::PathBuf;
|
||||
|
||||
/// Top-level application messages.
|
||||
///
|
||||
/// These are produced by:
|
||||
/// - UI widgets (buttons, menus, etc.)
|
||||
/// - keyboard shortcuts
|
||||
/// - async tasks (file loading, etc.)
|
||||
#[derive(Debug, Clone)]
|
||||
pub enum AppMessage {
|
||||
/// User requested to open a single file.
|
||||
OpenPath(PathBuf),
|
||||
|
||||
/// Navigate to next/previous document in the current folder.
|
||||
NextDocument,
|
||||
PrevDocument,
|
||||
|
||||
/// Basic view / panel toggles.
|
||||
ToggleLeftPanel,
|
||||
ToggleRightPanel,
|
||||
|
||||
/// View / zoom control.
|
||||
ZoomIn,
|
||||
ZoomOut,
|
||||
ZoomReset,
|
||||
ZoomFit,
|
||||
|
||||
/// Pan control (Ctrl + arrow keys).
|
||||
PanLeft,
|
||||
PanRight,
|
||||
PanUp,
|
||||
PanDown,
|
||||
PanReset,
|
||||
|
||||
/// Editing / tool modes.
|
||||
ToggleCropMode,
|
||||
ToggleScaleMode,
|
||||
|
||||
/// Document transformations.
|
||||
FlipHorizontal,
|
||||
FlipVertical,
|
||||
RotateCW,
|
||||
RotateCCW,
|
||||
|
||||
/// Generic error reporting from lower layers.
|
||||
ShowError(String),
|
||||
ClearError,
|
||||
|
||||
/// Fallback for unhandled or no-op cases.
|
||||
NoOp,
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue