summaryrefslogtreecommitdiffstats
Side-by-side diff
-rw-r--r--src/controller/keyboard.c25
1 files changed, 20 insertions, 5 deletions
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 <GL/glut.h>
#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;
}

Valid XHTML 1.0 Strict

Copyright © 2009 Don Pellegrino All Rights Reserved.