From f23a2d9daa1eb62b2afac8997f1d76eb881628f7 Mon Sep 17 00:00:00 2001 From: Alex Merry Date: Tue, 4 Dec 2012 18:55:25 +0000 Subject: Refactor GraphInputHandler into Tools --- tikzit/src/gtk/Window.h | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) (limited to 'tikzit/src/gtk/Window.h') diff --git a/tikzit/src/gtk/Window.h b/tikzit/src/gtk/Window.h index 6aa710a..089cc49 100644 --- a/tikzit/src/gtk/Window.h +++ b/tikzit/src/gtk/Window.h @@ -17,10 +17,8 @@ #import "TZFoundation.h" #import -#import "WidgetSurface.h" -@class GraphRenderer; -@class GraphInputHandler; +@class GraphEditorPanel; @class Menu; @class PropertyPane; @class Preambles; @@ -30,6 +28,7 @@ @class StyleManager; @class StylesPane; @class TikzDocument; +@protocol Tool; /** * Manages a document window @@ -44,10 +43,7 @@ // Classes that manage parts of the window Menu *menu; - GraphRenderer *renderer; - GraphInputHandler *inputHandler; - - WidgetSurface *surface; + GraphEditorPanel *graphPanel; // state variables BOOL suppressTikzUpdates; @@ -96,6 +92,15 @@ */ - (void) saveActiveDocumentAsShape; +/** + * Close the window. + * + * May terminate the application if this is the last window. + * + * Will ask for user confirmation if the document is not saved. + */ +- (void) close; + /** * Cut the current selection to the clipboard. */ @@ -109,10 +114,6 @@ */ - (void) paste; -/** - * The graph input handler - */ -- (GraphInputHandler*) graphInputHandler; /** * The GTK+ window that this class manages. */ @@ -149,6 +150,8 @@ */ - (void) presentGError:(GError*)error withMessage:(NSString*)message; +- (void) setActiveTool:(id)tool; + - (void) zoomIn; - (void) zoomOut; - (void) zoomReset; -- cgit v1.2.3