1 /* DrawOfPages: Take notes with touchscreen input. 2 * Copyright (C) 2017 Marko Semet(Marko10_000) 3 * 4 * This program is free software: you can redistribute it and/or modify 5 * it under the terms of the GNU General Public License as published by 6 * the Free Software Foundation, either version 3 of the License, or 7 * (at your option) any later version. 8 * 9 * This program is distributed in the hope that it will be useful, 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 * GNU General Public License for more details. 13 * 14 * You should have received a copy of the GNU General Public License 15 * along with this program. If not, see <https://www.gnu.org/licenses/>. 16 */ 17 module drawofpages.gui.mainWindow; 18 19 private 20 { 21 import drawofpages.gui.drawArea; 22 import drawofpages.tools.drawer; 23 import drawofpages.tools.interaction; 24 import gtk.MainWindow; 25 } 26 27 private class Menu 28 { 29 30 } 31 32 public class Tab 33 { 34 package string name; 35 package DrawElement drawElement; 36 private InteractionSafer interaction; 37 38 package this(DrawThread drawThread) 39 { 40 this.drawElement = new DrawElement(); 41 this.interaction = new InteractionSafer(drawThread, this.drawElement.getDrawHanlder()); 42 this.interaction.currentTool = new DrawLine(this.drawElement.getDrawHanlder()); 43 this.drawElement.getGuiInteraction() = this.interaction; 44 } 45 } 46 47 public class DOPMain : MainWindow 48 { 49 DrawThread drawThread; 50 Tab tab; 51 52 public this() 53 { 54 super("DrawOfPapers"); 55 this.setDefaultSize(800, 600); // TODO: Load size from config 56 this.drawThread = new DrawThread(); 57 this.tab = new Tab(this.drawThread); 58 this.add(this.tab.drawElement); // TODO: Tab support 59 this.showAll(); 60 } 61 62 public void stop() 63 { 64 this.drawThread.stop = true; 65 } 66 }