diff options
| author | tslil clingman <> | 2021-10-15 21:37:43 -0400 |
|---|---|---|
| committer | tslil clingman <> | 2021-10-15 21:37:43 -0400 |
| commit | 93bd7e3aa2d2b615018c6d118ef3bf13aa0b0ab1 (patch) | |
| tree | ebcc20d7665caa0022c255c60ce698d2b7b73d21 /src/gui/mod.rs | |
| parent | a0f3a7f8ba9036d1fcb18941a54077082f15cf3c (diff) | |
Update dependenciesgui
Diffstat (limited to 'src/gui/mod.rs')
| -rw-r--r-- | src/gui/mod.rs | 45 |
1 files changed, 24 insertions, 21 deletions
diff --git a/src/gui/mod.rs b/src/gui/mod.rs index 1980fdb..3c94abc 100644 --- a/src/gui/mod.rs +++ b/src/gui/mod.rs @@ -1,24 +1,28 @@ /* - This file is part of Takwrap. +This file is part of Takwrap. - Takwrap is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. +Takwrap is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. - Takwrap is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. +Takwrap is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. - You should have received a copy of the GNU General Public License - along with Takwrap. If not, see <https://www.gnu.org/licenses/>. -*/ +You should have received a copy of the GNU General Public License +along with Takwrap. If not, see <https://www.gnu.org/licenses/>. + */ mod boardwidget; use crate::gui::boardwidget::*; -use fltk::{app::*, button::*, menu::*, text::*, window::*}; +use fltk::{ + app::*, button::*, enums::Color, enums::FrameType, enums::Shortcut, menu::*, text::*, window::*, +}; + +use fltk::prelude::*; #[derive(Clone, Copy)] enum GUIMessage { @@ -42,13 +46,12 @@ impl GUI { // TODO: Why is this not the same as /* - let mut window = Window::default() - .with_size(800, 600) - .with_label("Takwrap") - .center_screen(); - */ + let mut window = Window::default() + .with_size(800, 600) + .with_label("Takwrap") + .center_screen(); + */ // Windows made that way are not resizable? - let mut window = DoubleWindow::new(0, 0, 800, 600, "Takwrap").center_screen(); let (sender, receiver) = channel::<GUIMessage>(); @@ -59,14 +62,14 @@ impl GUI { menu.set_color(Color::Light2); menu.add_emit( "&File/New...\t", - Shortcut::None, + Shortcut::empty(), MenuFlag::Normal, sender, GUIMessage::None, ); menu.add_emit( "&File/Open...\t", - Shortcut::None, + Shortcut::empty(), MenuFlag::Normal, sender, GUIMessage::Test, |
