author | Don Pellegrino <don@coffee.donpellegrino.com> | 2009-12-04 14:57:32 (GMT) |
---|---|---|
committer | Don Pellegrino <don@coffee.donpellegrino.com> | 2009-12-04 14:57:32 (GMT) |
commit | 59475bbfa700f83ad1ef12d79ce0ec96867d2345 (patch) (unidiff) | |
tree | f551f9f740da1ce0a2a1b9256341ce9aac8f3c17 | |
parent | 708bb6abd3ad7c0401a2db115dc767807173639c (diff) | |
download | exp005-59475bbfa700f83ad1ef12d79ce0ec96867d2345.zip exp005-59475bbfa700f83ad1ef12d79ce0ec96867d2345.tar.gz exp005-59475bbfa700f83ad1ef12d79ce0ec96867d2345.tar.bz2 |
Added a feature to toggle display the datarose geometry by keyboard input.
-rw-r--r-- | src/controller/callbacks/keyboard.c | 8 | ||||
-rw-r--r-- | src/controller/callbacks/reshape.c | 1 | ||||
-rw-r--r-- | src/model/state/state.h | 5 | ||||
-rw-r--r-- | src/view/geometry.c | 6 | ||||
-rw-r--r-- | src/view/init.c | 1 |
5 files changed, 20 insertions, 1 deletions
diff --git a/src/controller/callbacks/keyboard.c b/src/controller/callbacks/keyboard.c index a74ac7b..d657053 100644 --- a/src/controller/callbacks/keyboard.c +++ b/src/controller/callbacks/keyboard.c | |||
@@ -22,6 +22,14 @@ keyboard (unsigned char key, int x, int y) | |||
22 | glutPostRedisplay (); | 22 | glutPostRedisplay (); |
23 | break; | 23 | break; |
24 | 24 | ||
25 | case 'd': | ||
26 | /* | ||
27 | * Toggle display of the datarose. | ||
28 | */ | ||
29 | S.datarose = !S.datarose; | ||
30 | glutPostRedisplay (); | ||
31 | break; | ||
32 | |||
25 | case 'g': | 33 | case 'g': |
26 | /* | 34 | /* |
27 | * g has been pressed. This is used to load a selection from | 35 | * g has been pressed. This is used to load a selection from |
diff --git a/src/controller/callbacks/reshape.c b/src/controller/callbacks/reshape.c index 67210c5..99557b7 100644 --- a/src/controller/callbacks/reshape.c +++ b/src/controller/callbacks/reshape.c | |||
@@ -1,3 +1,4 @@ | |||
1 | #include "../../model/geometry/datarose_geometry.h" | ||
1 | #include "../../model/geometry/density_legend_geometry.h" | 2 | #include "../../model/geometry/density_legend_geometry.h" |
2 | #include "../../view/state0.h" | 3 | #include "../../view/state0.h" |
3 | #include "../actions/set_ortho.h" | 4 | #include "../actions/set_ortho.h" |
diff --git a/src/model/state/state.h b/src/model/state/state.h index ba6d7ab..6e4f62e 100644 --- a/src/model/state/state.h +++ b/src/model/state/state.h | |||
@@ -108,6 +108,11 @@ typedef struct | |||
108 | */ | 108 | */ |
109 | bool legend; | 109 | bool legend; |
110 | 110 | ||
111 | /* | ||
112 | * Display data rose. | ||
113 | */ | ||
114 | bool datarose; | ||
115 | |||
111 | } STATE; | 116 | } STATE; |
112 | 117 | ||
113 | #endif // STATE_H | 118 | #endif // STATE_H |
diff --git a/src/view/geometry.c b/src/view/geometry.c index fc09ee0..3fe92b0 100644 --- a/src/view/geometry.c +++ b/src/view/geometry.c | |||
@@ -30,7 +30,11 @@ geometry (GLenum mode) | |||
30 | if (S.legend) | 30 | if (S.legend) |
31 | glCallList (S.list_offset + DENSITY_LEGEND_GEOMETRY); | 31 | glCallList (S.list_offset + DENSITY_LEGEND_GEOMETRY); |
32 | 32 | ||
33 | glCallList (S.list_offset + DATAROSE_GEOMETRY); | 33 | /* |
34 | * Draw the data rose. | ||
35 | */ | ||
36 | if (S.datarose) | ||
37 | glCallList (S.list_offset + DATAROSE_GEOMETRY); | ||
34 | 38 | ||
35 | return; | 39 | return; |
36 | } | 40 | } |
diff --git a/src/view/init.c b/src/view/init.c index 47e8ffa..f1c1bce 100644 --- a/src/view/init.c +++ b/src/view/init.c | |||
@@ -27,6 +27,7 @@ init (void) | |||
27 | zoom_info_init (&S.zoom); | 27 | zoom_info_init (&S.zoom); |
28 | pan_info_init (&S.pan); | 28 | pan_info_init (&S.pan); |
29 | S.legend = true; | 29 | S.legend = true; |
30 | S.datarose = false; | ||
30 | 31 | ||
31 | /* | 32 | /* |
32 | * Load the data. | 33 | * Load the data. |