diff options
Diffstat (limited to 'src/app.rs')
-rw-r--r-- | src/app.rs | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -1,22 +1,24 @@ | |||
1 | use crate::{ | 1 | use crate::{ |
2 | bitmap::{positive_angle_with_x, MapPoint, Pixmap}, | 2 | bitmap::{positive_angle_with_x, Axis, MapPoint, Pixmap}, |
3 | brush::{Brush, CircleBrush, LineBrush}, | 3 | brush::{Brush, CircleBrush, LineBrush}, |
4 | cache::Cache, | 4 | cache::Cache, |
5 | command::CommandBox, | 5 | command::CommandBox, |
6 | consts::{colors::*, FONT_PATH, RC_PATH, STDLIB_PATH}, | 6 | consts::{colors::*, FONT_PATH, RC_PATH, STDLIB_PATH}, |
7 | dither, | 7 | dither, |
8 | error::AppError, | 8 | error::AppError, |
9 | guide::Guide, | ||
9 | lisp::{eval, lex::Lexer, parse::Parser, prelude, EnvList}, | 10 | lisp::{eval, lex::Lexer, parse::Parser, prelude, EnvList}, |
10 | message::Message, | 11 | message::Message, |
11 | rect, | 12 | rect, |
12 | symmetry::Symmetry, | 13 | symmetry::Symmetry, |
13 | undo::{ModifyRecord, OpKind, PaintRecord, UndoStack}, | 14 | undo::{ModifyRecord, OpKind, PaintRecord, UndoStack}, |
14 | utils::{draw_text, handle_error, is_copy_event, is_paste_event, load_script}, | 15 | utils::{self, draw_text, handle_error, is_copy_event, is_paste_event, load_script}, |
15 | widget::{Container, HorAlign, Offset, Size, VertAlign}, | 16 | widget::{Container, HorAlign, Offset, Size, VertAlign}, |
16 | }; | 17 | }; |
17 | 18 | ||
18 | use std::{ | 19 | use std::{ |
19 | cell::RefCell, | 20 | cell::RefCell, |
21 | collections::HashMap, | ||
20 | convert::From, | 22 | convert::From, |
21 | fs::File, | 23 | fs::File, |
22 | io::prelude::*, | 24 | io::prelude::*, |
@@ -52,6 +54,7 @@ pub struct AppState<'ctx> { | |||
52 | pub current_operation: Vec<PaintRecord>, | 54 | pub current_operation: Vec<PaintRecord>, |
53 | pub dither_level: u8, | 55 | pub dither_level: u8, |
54 | pub file_name: Option<PathBuf>, | 56 | pub file_name: Option<PathBuf>, |
57 | pub guides: HashMap<Guide, bool>, | ||
55 | pub grid: Grid, | 58 | pub grid: Grid, |
56 | pub lisp_env: EnvList, | 59 | pub lisp_env: EnvList, |
57 | pub message: Message, | 60 | pub message: Message, |
@@ -604,6 +607,7 @@ impl<'ctx> AppState<'ctx> { | |||
604 | command_box: CommandBox::new(), | 607 | command_box: CommandBox::new(), |
605 | context, | 608 | context, |
606 | cache: RefCell::new(None), | 609 | cache: RefCell::new(None), |
610 | guides: HashMap::new(), | ||
607 | current_operation: Vec::new(), | 611 | current_operation: Vec::new(), |
608 | dither_level: 16, | 612 | dither_level: 16, |
609 | file_name, | 613 | file_name, |