diff options
Diffstat (limited to 'src/actions.rs')
| -rw-r--r-- | src/actions.rs | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/src/actions.rs b/src/actions.rs index 09b7d4b..e5ea0e5 100644 --- a/src/actions.rs +++ b/src/actions.rs @@ -18,6 +18,7 @@ use std::path::PathBuf; use wmap_renderer::StageType; use crate::preferences::UserPreferences; +use crate::preferences::models::StageLabel; #[derive(Debug, Clone, Copy)] pub enum ImageFormat { @@ -74,3 +75,38 @@ pub enum Action { PreferencesWindowClosed, ReloadPreferences, } + +#[derive(Debug, Clone)] +pub enum PreferencesAction { + // General page actions + Export, + Import, + ImportFromFile(PathBuf), + ExportToFile(PathBuf), + ResetToDefaults, + + // Preference updates from pages + SetShowMapBackground(bool), + SetUseCustomFont(bool), + SetCustomFontName(String), + SetDefaultExportFormat(String), + SetUseSmartLabelPositioning(bool), + + SetUseCustomEditorFont(bool), + SetCustomEditorFontName(String), + SetEditorFontSize(f64), + SetSoftWrapLines(bool), + + // Templates + AddTemplate(String), + RemoveTemplate(uuid::Uuid), + SetTemplateContent(uuid::Uuid, String), + SetTemplateName(uuid::Uuid, String), + SetDefaultTemplate(uuid::Uuid), + + // Custom stages + AddCustomStage, + RemoveCustomStage(uuid::Uuid), + SetCustomStageName(uuid::Uuid, String), + SetCustomStageLabel(uuid::Uuid, StageLabel, String), +} |