File: defines.h

package info (click to toggle)
ggobi 2.1.9~20091212-3
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 19,340 kB
  • ctags: 5,083
  • sloc: ansic: 57,242; xml: 30,604; cpp: 833; makefile: 355; java: 225; perl: 201; sh: 122; python: 23
file content (287 lines) | stat: -rw-r--r-- 6,384 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
/*-- defines.h --*/
/*
 * ggobi
 * Copyright (C) AT&T, Duncan Temple Lang, Dianne Cook 1999-2005
 *
 * ggobi is free software; you may use, redistribute, and/or modify it
 * under the terms of the Common Public License, which is distributed
 * with the source code and displayed on the ggobi web site, 
 * www.ggobi.org.  For more information, contact the authors:
 *
 *   Deborah F. Swayne   dfs@research.att.com
 *   Di Cook             dicook@iastate.edu
 *   Duncan Temple Lang  duncan@wald.ucdavis.edu
 *   Andreas Buja        andreas.buja@wharton.upenn.edu
*/


#ifndef GGOBI_DEFINES_H
#define GGOBI_DEFINES_H

#include <gtk/gtk.h> /* Needed for ViewTypes. Can be moved. */

/* defines.h */

/* External/public routines in the API should use this 
   to generate a suitable prefix for their name to avoid
   name-space pollution and symbol conflicts.
    (e.g. GGOBI(setData)
*/
#define GGOBI(a) GGobi_##a

#define false 0
#define true 1

#define off 0
#define on 1

#define HORIZONTAL 0
#define VERTICAL   1

#define MSGBUFLEN 512

#define NDISPLAYTYPES 3

extern const gchar* const ViewTypes[NDISPLAYTYPES];
extern const gint ViewTypeIndices[NDISPLAYTYPES];

/*-- used in movepts --*/
enum directiond {both, vertical, horizontal};

enum idtargetd {identify_points, identify_edges};

/* display options */
/*  When these change, update display.c and RSggobi/RSGGobi.c accordingly */
#define DOPT_POINTS    0
#define DOPT_AXES      1
#define DOPT_AXESLAB   2
#define DOPT_AXESVALS  3
#define DOPT_EDGES_U   4
#define DOPT_EDGES_A   5
#define DOPT_EDGES_D   6
#define DOPT_EDGES_H   7
#define DOPT_WHISKERS  8
/* unused
#define DOPT_GRIDLINES 5
#define DOPT_MISSINGS  5
#define DOPT_AXES_C    9
#define DOPT_BUFFER   10
#define DOPT_LINK     11
*/

/* modes */
/* Former viewmodes:
typedef enum {NULLMODE = -1
              P1PLOT, XYPLOT, TOUR1D,
              TOUR2D3, TOUR2D, COTOUR,
              SCALE, BRUSH, IDENT, EDGEED, MOVEPTS,
              SCATMAT, PCPLOT,
              EXTENDED_DISPLAY_MODE,
	      NMODES} PipelineMode;
*/

typedef enum {NULL_PMODE = -1, DEFAULT_PMODE,
              P1PLOT, /* d, D */
	      XYPLOT, /* x, X */
	      TOUR1D, /* t, T */
	      TOUR2D3, /* r, R */
	      TOUR2D, /* g, G */
	      COTOUR, /* c, C */
              EXTENDED_DISPLAY_PMODE, N_PMODES} ProjectionMode;
typedef enum {NULL_IMODE = -1, DEFAULT_IMODE,
	      SCALE, /* s, S */
	      BRUSH, /* b, B */ 
	      IDENT, /* i, I */ 
	      EDGEED, /* e, E */
	      MOVEPTS, /* m, M */
              EXTENDED_DISPLAY_IMODE, N_IMODES} InteractionMode;
/* */

#define TEXTURE 0
#define ASH     1
#define DOTPLOT 2

#define FORWARD  1
#define BACKWARD -1

/*
 * cycling
*/
#define NOFIXED 0
#define XFIXED  1
#define YFIXED  2


#define MAXNCOLS 500

#define COLLABLEN 25
#define ROWLABLEN 50

/*
 * EXP1: Raw data are scaled to -2^EXP1, +2^EXP1
 * EXP2: Trigonometric coefficients are scaled up by 2^EXP2 to do
 *       integer math.
 * PRECISION: 2^EXP2
*/
#define EXP1 14
#define EXP2 13
#define PRECISION1 16384
#define PRECISION2  8192

/*-- spacing for the control panels --*/
#define VBOX_SPACING 5

/*-- touring --*/
#define VAR_CIRCLE_DIAM 36

#define MIN_NVARS_FOR_COTOUR 3  /* require: 3 in subset, 2 active */
                                /* at least 1 vert, at least 1 horiz */
#define MIN_NVARS_FOR_TOUR2D 3  /* require: 3 in subset, 2 active */
#define MIN_NVARS_FOR_TOUR1D 2  /* require: 2 in subset, 1 active */
#define MIN_NVARS_FOR_TOUR2D3 3  /* exactly 3 in subset, 3 active */

/*#define TOURSTEP0 0.003*/
#define TOURSTEP0 0.102 /* corresponds to slidepos=50 */
#define TOUR_LS_IN 0
#define TOUR_LS_OUT 1

#ifndef M_PI_2
#define M_PI_2  1.57079632679489661923
#endif

#define MANIP_OFF 0
#define MANIP_OBLIQUE 1
#define MANIP_VERT 2
#define MANIP_HOR 3
#define MANIP_RADIAL 4
#define MANIP_ANGULAR 5

#define CMANIP_OFF 0
#define CMANIP_COMB 1
#define CMANIP_VERT 2
#define CMANIP_HOR 3
#define CMANIP_EQUAL 4

#define TOUR_RANDOM 0
#define TOUR_PP 1

/*-- projection pursuit indices --*/
/*#define NATURAL_HERMITE 0
#define HERMITE         1
#define CENTRAL_MASS    2
#define HOLES           3
#define SKEWNESS        4
#define LEGENDRE        5
#define FTS             6
#define ENTROPY         7
#define BIN_FTS         8
#define BIN_ENTROPY     9
#define SUBD           10
#define LDA            11
#define CART_GINI      12
#define CART_ENTROPY   13
#define CART_VAR       14
#define PCA            15*/

/* Used in parallel coordinates displays */
typedef enum {ARRANGE_ROW, ARRANGE_COL} ParCoordsArrangeMode;

#define DEFINES_H

/*-- transformation --*/

#define N0TFORMS 4
#define NO_TFORM0       0
#define RAISE_MIN_TO_0  1
#define RAISE_MIN_TO_1  2
#define NEGATE          3

#define N1TFORMS 5
#define NO_TFORM1    0
#define BOXCOX       1
#define LOG10        2
#define INVERSE      3
#define ABSVALUE     4
#define SCALE_AB     5

#define N2TFORMS     8
#define NO_TFORM2    0
#define STANDARDIZE  1
#define SORT         2
#define RANK         3
#define NORMSCORE    4
#define ZSCORE       5
#define DISCRETE2    6

/*
 * identification
*/
#define STICKY_TOGGLE 0
#define STICKY_ADD    1
#define STICKY_REMOVE 2

enum {ID_RECORD_ID = 1 << 3, ID_RECORD_LABEL = 1 << 2, ID_RECORD_NO = 1 << 1, ID_VAR_LABELS = 1 << 0};

/*
 * jittering
*/
#define JITFAC .2
#define UNIFORM 0
#define NORMAL  1

/*
 * scaling
*/
#define SCALE_DEFAULT      0.7
#define TOUR_SCALE_DEFAULT 0.6
#define SCALE_MIN          0.02
#define SCALE_SCROLL_INC   0.1

#define DRAG  0
#define CLICK 1

#define PAN  0
#define ZOOM 1

#define ZOOM_IN  0
#define ZOOM_OUT 1

#define P_HORIZ   0
#define P_VERT    1
#define P_OBLIQUE 2

#define Z_ASPECT  0
#define Z_HORIZ   1
#define Z_VERT    2
#define Z_OBLIQUE 3

/*-- color by variable --*/
#define WVIS_EQUAL_WIDTH_BINS 0
#define WVIS_EQUAL_COUNT_BINS 1

#define WVIS_UPDATE_ON_MOUSE_UP  0
#define WVIS_UPDATE_CONTINUOUSLY 1
/*--                   --*/

/*-- variable notebook columns --*/
enum { VARLIST_NAME, VARLIST_INDEX, VARLIST_NCOLS };

/*-- macros --*/

#define EVENT_METHOD(i,x) GTK_OBJECT_GET_CLASS(GTK_OBJECT(i))->x

#define BETWEEN(a,b,x) ( ((a)<=(x) && (x)<=(b)) || ((a)>=(x) && (x)>=(b)) )

typedef enum {
  C,
  R,
  SPLUS,
  PERL,
  PYTHON
  } ProgrammingLanguage;

#if GTK_CHECK_VERSION(2,8,0) && defined CAIRO_HAS_GLITZ_SURFACE
//#define ENABLE_CAIRO 1
#endif

#endif /* End of conditional definition. */