summaryrefslogtreecommitdiffstats
Unidiff
-rw-r--r--src/Makefile.am55
-rw-r--r--src/controller/README_controller.txt18
-rw-r--r--src/controller/actions/clear_selection.h (renamed from src/controller/clear_selection.h)0
-rw-r--r--src/controller/actions/clear_selection.sqc (renamed from src/controller/clear_selection.sqc)4
-rw-r--r--src/controller/actions/pan.c8
-rw-r--r--src/controller/actions/pan.h9
-rw-r--r--src/controller/actions/process_hits.c (renamed from src/controller/exp004processhits.c)12
-rw-r--r--src/controller/actions/process_hits.h8
-rw-r--r--src/controller/actions/sel_save.c141
-rw-r--r--src/controller/actions/sel_save.h9
-rw-r--r--src/controller/actions/sel_save.sqc (renamed from src/controller/selsave.sqc)8
-rw-r--r--src/controller/actions/selection_from_db.h (renamed from src/controller/selection_from_db.h)0
-rw-r--r--src/controller/actions/selection_from_db.sqc (renamed from src/controller/selection_from_db.sqc)8
-rw-r--r--src/controller/actions/set_ortho.h (renamed from src/controller/set_ortho.h)0
-rw-r--r--src/controller/actions/vis_sel_set.h (renamed from src/controller/vis_sel_set.h)0
-rw-r--r--src/controller/actions/zoom.c (renamed from src/controller/performzoom.c)12
-rw-r--r--src/controller/actions/zoom.h9
-rw-r--r--src/controller/callbacks/display.c (renamed from src/controller/exp004display.c)8
-rw-r--r--src/controller/callbacks/display.h9
-rw-r--r--src/controller/callbacks/keyboard.c (renamed from src/controller/keyboard.c)10
-rw-r--r--src/controller/callbacks/keyboard.h (renamed from src/controller/keyboard.h)0
-rw-r--r--src/controller/callbacks/mouse.c (renamed from src/controller/exp004mouse.c)36
-rw-r--r--src/controller/callbacks/mouse.h9
-rw-r--r--src/controller/callbacks/mouse_wheel.c (renamed from src/controller/mousewheel.c)22
-rw-r--r--src/controller/callbacks/mouse_wheel.h (renamed from src/controller/mousewheel.h)8
-rw-r--r--src/controller/callbacks/reshape.c (renamed from src/controller/exp004reshape.c)10
-rw-r--r--src/controller/callbacks/reshape.h6
-rw-r--r--src/controller/exp004display.h6
-rw-r--r--src/controller/exp004mouse.h6
-rw-r--r--src/controller/exp004processhits.h8
-rw-r--r--src/controller/exp004reshape.h6
-rw-r--r--src/controller/performzoom.h9
-rw-r--r--src/controller/selsave.h9
-rw-r--r--src/controller/set_ortho.c21
-rw-r--r--src/model/geometry/density_legend_geometry.c4
-rw-r--r--src/view/exp004view.c20
36 files changed, 332 insertions, 176 deletions
diff --git a/src/controller/actions/sel_save.c b/src/controller/actions/sel_save.c
new file mode 100644
index 0000000..424f101
--- a/dev/null
+++ b/src/controller/actions/sel_save.c
@@ -0,0 +1,141 @@
1static char sqla_program_id[292] =
2{
3 172,0,65,69,65,78,65,73,108,65,118,119,77,82,73,90,48,49,49,49,
4 49,32,50,32,32,32,32,32,32,32,32,32,8,0,68,79,78,32,32,32,
5 32,32,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
6 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
7 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
8 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
9 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
10 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
11 0,0,8,0,83,69,76,95,83,65,86,69,0,0,0,0,0,0,0,0,
12 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
13 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
14 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
15 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
16 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
17 0,0,0,0,0,0,0,0,0,0,0,0
18};
19
20#include "sqladef.h"
21
22static struct sqla_runtime_info sqla_rtinfo =
23{{'S','Q','L','A','R','T','I','N'}, sizeof(wchar_t), 0, {' ',' ',' ',' '}};
24
25
26static const short sqlIsLiteral = SQL_IS_LITERAL;
27static const short sqlIsInputHvar = SQL_IS_INPUT_HVAR;
28
29
30#line 1 "sel_save.sqc"
31#include "../../util/check_error.h"
32#include "../../view/exp004state0.h"
33#include "sel_save.h"
34#include "sqlca.h"
35#include <string.h>
36extern struct sqlca sqlca;
37
38/*
39 * A simple alias to make the code more readable.
40 */
41#define S exp004state0
42
43void
44sel_save (void)
45{
46
47/*
48EXEC SQL BEGIN DECLARE SECTION;
49*/
50
51#line 16 "sel_save.sqc"
52
53 char gi[255];
54
55/*
56EXEC SQL END DECLARE SECTION;
57*/
58
59#line 18 "sel_save.sqc"
60
61
62 /*
63 * WHERE gi IS NOT NULL is added to prevent the PRECOMPILE command
64 * from throwing a warning about modifying an entire table. Since
65 * gi is defined as NOT NULL this will clear the entire table.
66 */
67
68/*
69EXEC SQL DELETE FROM vis_selection WHERE gi IS NOT NULL;
70*/
71
72{
73#line 25 "sel_save.sqc"
74 sqlastrt(sqla_program_id, &sqla_rtinfo, &sqlca);
75#line 25 "sel_save.sqc"
76 sqlacall((unsigned short)24,1,0,0,0L);
77#line 25 "sel_save.sqc"
78 sqlastop(0L);
79}
80
81#line 25 "sel_save.sqc"
82
83 check_error (__FILE__, __LINE__);
84
85 for (unsigned int i = 0; i < S.rows; i++)
86 {
87 if (S.selection.set[i] == true)
88 {
89 strncpy (gi, S.gi_data + i + 3, sizeof (gi));
90
91/*
92EXEC SQL INSERT INTO vis_selection VALUES (:gi);
93*/
94
95{
96#line 33 "sel_save.sqc"
97 sqlastrt(sqla_program_id, &sqla_rtinfo, &sqlca);
98#line 33 "sel_save.sqc"
99 sqlaaloc(2,1,1,0L);
100 {
101 struct sqla_setdata_list sql_setdlist[1];
102#line 33 "sel_save.sqc"
103 sql_setdlist[0].sqltype = 460; sql_setdlist[0].sqllen = 255;
104#line 33 "sel_save.sqc"
105 sql_setdlist[0].sqldata = (void*)gi;
106#line 33 "sel_save.sqc"
107 sql_setdlist[0].sqlind = 0L;
108#line 33 "sel_save.sqc"
109 sqlasetdata(2,0,1,sql_setdlist,0L,0L);
110 }
111#line 33 "sel_save.sqc"
112 sqlacall((unsigned short)24,2,2,0,0L);
113#line 33 "sel_save.sqc"
114 sqlastop(0L);
115}
116
117#line 33 "sel_save.sqc"
118
119 }
120 }
121
122
123/*
124EXEC SQL COMMIT;
125*/
126
127{
128#line 37 "sel_save.sqc"
129 sqlastrt(sqla_program_id, &sqla_rtinfo, &sqlca);
130#line 37 "sel_save.sqc"
131 sqlacall((unsigned short)21,0,0,0,0L);
132#line 37 "sel_save.sqc"
133 sqlastop(0L);
134}
135
136#line 37 "sel_save.sqc"
137
138 check_error (__FILE__, __LINE__);
139
140 return;
141}

Valid XHTML 1.0 Strict

Copyright © 2009 Don Pellegrino All Rights Reserved.