diff --git a/src/config.rs b/src/config.rs index 657980c..4ae0417 100644 --- a/src/config.rs +++ b/src/config.rs @@ -1,3 +1,5 @@ +//! load, save configuration and parse cli args + use clap::{ArgEnum, Parser}; use fltk::dialog; use fltk_theme::ThemeType; @@ -57,6 +59,7 @@ impl Into for Themes { } } +/// Configuation file #[derive(Debug, Serialize, Deserialize)] pub struct ConfigFile { pub quote_font_ttf: String, diff --git a/src/config_window.rs b/src/config_window.rs index 1fad536..c68054b 100644 --- a/src/config_window.rs +++ b/src/config_window.rs @@ -1,3 +1,5 @@ +//! Window to edit configuration + use std::{cell::RefCell, rc::Rc}; use fltk::{ diff --git a/src/draw_thread.rs b/src/draw_thread.rs index f6d7c39..8e66b4b 100644 --- a/src/draw_thread.rs +++ b/src/draw_thread.rs @@ -24,10 +24,15 @@ use crate::utils::{ImageContainer, ImageProperties}; #[derive(Debug, Clone)] pub(crate) enum DrawMessage { - Open, // Open file or cropped file + /// Open file or cropped file + Open, + /// Load file with specific cropped size ChangeCrop((f64, f64)), + /// Recalculate and draw on buffer image in Container Recalc, + /// Flush buffer to u8 vector present in main, to draw on screen Flush, + /// Save to file Save, }