From 6600093d06fc302a13ffdde193dbe4b8da151d9c Mon Sep 17 00:00:00 2001 From: Don Pellegrino Date: Thu, 18 Jun 2009 21:14:45 +0000 Subject: Implemented zooming. --- diff --git a/src/controller/keyboard.c b/src/controller/keyboard.c index 333e2d4..6b70af2 100644 --- a/src/controller/keyboard.c +++ b/src/controller/keyboard.c @@ -1,7 +1,9 @@ #include "keyboard.h" #include "clear_selection.h" #include "selection_from_db.h" +#include "exp004reshape.h" #include "../view/exp004state0.h" +#include #define S exp004state0 @@ -26,14 +28,27 @@ keyboard (unsigned char key, int x, int y) selection_from_db (); break; + case 'r': + /* + * Reset the view (unzoom). + */ + S.zoom.active = false; + exp004reshape (S.viewport.w, S.viewport.h); + glutPostRedisplay (); + break; + + case 's': + /* + * Selection will be used to define a set. + */ + S.selection.purpose = SET; + break; + case 'z': /* - * Toggle zoom mode on and off. + * Selection will be use to zoom. */ - if (S.zoom) - S.zoom = false; - else - S.zoom = true; + S.selection.purpose = ZOOM; break; } -- cgit v0.8.3.1-22-g547a