~ubuntu-branches/debian/jessie/ggobi/jessie

« back to all changes in this revision

Viewing changes to src/defines.h

  • Committer: Bazaar Package Importer
  • Author(s): Dirk Eddelbuettel
  • Date: 2006-10-23 11:22:46 UTC
  • mfrom: (1.2.1 upstream) (2.1.3 edgy)
  • Revision ID: james.westby@ubuntu.com-20061023112246-nrbosijkz6758sao
Tags: 2.1.4-1
* New upstream release

* debian/shlibs: Updated accordingly

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*-- defines.h --*/
 
2
/*
 
3
 * ggobi
 
4
 * Copyright (C) AT&T, Duncan Temple Lang, Dianne Cook 1999-2005
 
5
 *
 
6
 * ggobi is free software; you may use, redistribute, and/or modify it
 
7
 * under the terms of the Common Public License, which is distributed
 
8
 * with the source code and displayed on the ggobi web site, 
 
9
 * www.ggobi.org.  For more information, contact the authors:
 
10
 *
 
11
 *   Deborah F. Swayne   dfs@research.att.com
 
12
 *   Di Cook             dicook@iastate.edu
 
13
 *   Duncan Temple Lang  duncan@wald.ucdavis.edu
 
14
 *   Andreas Buja        andreas.buja@wharton.upenn.edu
 
15
*/
 
16
 
 
17
 
 
18
#ifndef GGOBI_DEFINES_H
 
19
#define GGOBI_DEFINES_H
 
20
 
 
21
#include <gtk/gtk.h> /* Needed for ViewTypes. Can be moved. */
 
22
 
 
23
/* defines.h */
 
24
 
 
25
/* External/public routines in the API should use this 
 
26
   to generate a suitable prefix for their name to avoid
 
27
   name-space pollution and symbol conflicts.
 
28
    (e.g. GGOBI(setData)
 
29
*/
 
30
#define GGOBI(a) GGobi_##a
 
31
 
 
32
#define false 0
 
33
#define true 1
 
34
 
 
35
#define off 0
 
36
#define on 1
 
37
 
 
38
#define HORIZONTAL 0
 
39
#define VERTICAL   1
 
40
 
 
41
#define MSGBUFLEN 512
 
42
 
 
43
#define NDISPLAYTYPES 3
 
44
 
 
45
extern const gchar* const ViewTypes[NDISPLAYTYPES];
 
46
extern const gint ViewTypeIndices[NDISPLAYTYPES];
 
47
 
 
48
/*-- used in movepts --*/
 
49
enum directiond {both, vertical, horizontal};
 
50
 
 
51
enum idtargetd {identify_points, identify_edges};
 
52
 
 
53
/* display options */
 
54
/*  When these change, update display.c and RSggobi/RSGGobi.c accordingly */
 
55
#define DOPT_POINTS    0
 
56
#define DOPT_AXES      1
 
57
#define DOPT_AXESLAB   2
 
58
#define DOPT_AXESVALS  3
 
59
#define DOPT_EDGES_U   4
 
60
#define DOPT_EDGES_A   5
 
61
#define DOPT_EDGES_D   6
 
62
#define DOPT_EDGES_H   7
 
63
#define DOPT_WHISKERS  8
 
64
/* unused
 
65
#define DOPT_GRIDLINES 5
 
66
#define DOPT_MISSINGS  5
 
67
#define DOPT_AXES_C    9
 
68
#define DOPT_BUFFER   10
 
69
#define DOPT_LINK     11
 
70
*/
 
71
 
 
72
/* modes */
 
73
/* Former viewmodes:
 
74
typedef enum {NULLMODE = -1
 
75
              P1PLOT, XYPLOT, TOUR1D,
 
76
              TOUR2D3, TOUR2D, COTOUR,
 
77
              SCALE, BRUSH, IDENT, EDGEED, MOVEPTS,
 
78
              SCATMAT, PCPLOT,
 
79
              EXTENDED_DISPLAY_MODE,
 
80
              NMODES} PipelineMode;
 
81
*/
 
82
 
 
83
typedef enum {NULL_PMODE = -1, DEFAULT_PMODE,
 
84
              P1PLOT, /* d, D */
 
85
              XYPLOT, /* x, X */
 
86
              TOUR1D, /* t, T */
 
87
              TOUR2D3, /* r, R */
 
88
              TOUR2D, /* g, G */
 
89
              COTOUR, /* c, C */
 
90
              EXTENDED_DISPLAY_PMODE, N_PMODES} ProjectionMode;
 
91
typedef enum {NULL_IMODE = -1, DEFAULT_IMODE,
 
92
              SCALE, /* s, S */
 
93
              BRUSH, /* b, B */ 
 
94
              IDENT, /* i, I */ 
 
95
              EDGEED, /* e, E */
 
96
              MOVEPTS, /* m, M */
 
97
              EXTENDED_DISPLAY_IMODE, N_IMODES} InteractionMode;
 
98
/* */
 
99
 
 
100
#define TEXTURE 0
 
101
#define ASH     1
 
102
#define DOTPLOT 2
 
103
 
 
104
#define FORWARD  1
 
105
#define BACKWARD -1
 
106
 
 
107
/*
 
108
 * cycling
 
109
*/
 
110
#define NOFIXED 0
 
111
#define XFIXED  1
 
112
#define YFIXED  2
 
113
 
 
114
 
 
115
#define MAXNCOLS 500
 
116
 
 
117
#define COLLABLEN 25
 
118
#define ROWLABLEN 50
 
119
 
 
120
/*
 
121
 * EXP1: Raw data are scaled to -2^EXP1, +2^EXP1
 
122
 * EXP2: Trigonometric coefficients are scaled up by 2^EXP2 to do
 
123
 *       integer math.
 
124
 * PRECISION: 2^EXP2
 
125
*/
 
126
#define EXP1 14
 
127
#define EXP2 13
 
128
#define PRECISION1 16384
 
129
#define PRECISION2  8192
 
130
 
 
131
/*-- spacing for the control panels --*/
 
132
#define VBOX_SPACING 5
 
133
 
 
134
/*-- touring --*/
 
135
#define VAR_CIRCLE_DIAM 36
 
136
 
 
137
#define MIN_NVARS_FOR_COTOUR 3  /* require: 3 in subset, 2 active */
 
138
                                /* at least 1 vert, at least 1 horiz */
 
139
#define MIN_NVARS_FOR_TOUR2D 3  /* require: 3 in subset, 2 active */
 
140
#define MIN_NVARS_FOR_TOUR1D 2  /* require: 2 in subset, 1 active */
 
141
#define MIN_NVARS_FOR_TOUR2D3 3  /* exactly 3 in subset, 3 active */
 
142
 
 
143
/*#define TOURSTEP0 0.003*/
 
144
#define TOURSTEP0 0.102 /* corresponds to slidepos=50 */
 
145
#define TOUR_LS_IN 0
 
146
#define TOUR_LS_OUT 1
 
147
 
 
148
#ifndef M_PI_2
 
149
#define M_PI_2  1.57079632679489661923
 
150
#endif
 
151
 
 
152
#define MANIP_OFF 0
 
153
#define MANIP_OBLIQUE 1
 
154
#define MANIP_VERT 2
 
155
#define MANIP_HOR 3
 
156
#define MANIP_RADIAL 4
 
157
#define MANIP_ANGULAR 5
 
158
 
 
159
#define CMANIP_OFF 0
 
160
#define CMANIP_COMB 1
 
161
#define CMANIP_VERT 2
 
162
#define CMANIP_HOR 3
 
163
#define CMANIP_EQUAL 4
 
164
 
 
165
#define TOUR_RANDOM 0
 
166
#define TOUR_PP 1
 
167
 
 
168
/*-- projection pursuit indices --*/
 
169
/*#define NATURAL_HERMITE 0
 
170
#define HERMITE         1
 
171
#define CENTRAL_MASS    2
 
172
#define HOLES           3
 
173
#define SKEWNESS        4
 
174
#define LEGENDRE        5
 
175
#define FTS             6
 
176
#define ENTROPY         7
 
177
#define BIN_FTS         8
 
178
#define BIN_ENTROPY     9
 
179
#define SUBD           10
 
180
#define LDA            11
 
181
#define CART_GINI      12
 
182
#define CART_ENTROPY   13
 
183
#define CART_VAR       14
 
184
#define PCA            15*/
 
185
 
 
186
/* Used in parallel coordinates displays */
 
187
typedef enum {ARRANGE_ROW, ARRANGE_COL} ParCoordsArrangeMode;
 
188
 
 
189
#define DEFINES_H
 
190
 
 
191
/*-- transformation --*/
 
192
 
 
193
#define N0TFORMS 4
 
194
#define NO_TFORM0       0
 
195
#define RAISE_MIN_TO_0  1
 
196
#define RAISE_MIN_TO_1  2
 
197
#define NEGATE          3
 
198
 
 
199
#define N1TFORMS 5
 
200
#define NO_TFORM1    0
 
201
#define BOXCOX       1
 
202
#define LOG10        2
 
203
#define INVERSE      3
 
204
#define ABSVALUE     4
 
205
#define SCALE_AB     5
 
206
 
 
207
#define N2TFORMS     8
 
208
#define NO_TFORM2    0
 
209
#define STANDARDIZE  1
 
210
#define SORT         2
 
211
#define RANK         3
 
212
#define NORMSCORE    4
 
213
#define ZSCORE       5
 
214
#define DISCRETE2    6
 
215
 
 
216
/*
 
217
 * identification
 
218
*/
 
219
#define STICKY_TOGGLE 0
 
220
#define STICKY_ADD    1
 
221
#define STICKY_REMOVE 2
 
222
 
 
223
enum {ID_RECORD_ID = 1 << 3, ID_RECORD_LABEL = 1 << 2, ID_RECORD_NO = 1 << 1, ID_VAR_LABELS = 1 << 0};
 
224
 
 
225
/*
 
226
 * jittering
 
227
*/
 
228
#define JITFAC .2
 
229
#define UNIFORM 0
 
230
#define NORMAL  1
 
231
 
 
232
/*
 
233
 * scaling
 
234
*/
 
235
#define SCALE_DEFAULT      0.7
 
236
#define TOUR_SCALE_DEFAULT 0.6
 
237
#define SCALE_MIN          0.02
 
238
#define SCALE_SCROLL_INC   0.1
 
239
 
 
240
#define DRAG  0
 
241
#define CLICK 1
 
242
 
 
243
#define PAN  0
 
244
#define ZOOM 1
 
245
 
 
246
#define ZOOM_IN  0
 
247
#define ZOOM_OUT 1
 
248
 
 
249
#define P_HORIZ   0
 
250
#define P_VERT    1
 
251
#define P_OBLIQUE 2
 
252
 
 
253
#define Z_ASPECT  0
 
254
#define Z_HORIZ   1
 
255
#define Z_VERT    2
 
256
#define Z_OBLIQUE 3
 
257
 
 
258
/*-- color by variable --*/
 
259
#define WVIS_EQUAL_WIDTH_BINS 0
 
260
#define WVIS_EQUAL_COUNT_BINS 1
 
261
 
 
262
#define WVIS_UPDATE_ON_MOUSE_UP  0
 
263
#define WVIS_UPDATE_CONTINUOUSLY 1
 
264
/*--                   --*/
 
265
 
 
266
/*-- variable notebook columns --*/
 
267
enum { VARLIST_NAME, VARLIST_INDEX, VARLIST_NCOLS };
 
268
 
 
269
/*-- macros --*/
 
270
 
 
271
#define EVENT_METHOD(i,x) GTK_OBJECT_GET_CLASS(GTK_OBJECT(i))->x
 
272
 
 
273
#define BETWEEN(a,b,x) ( ((a)<=(x) && (x)<=(b)) || ((a)>=(x) && (x)>=(b)) )
 
274
 
 
275
typedef enum {
 
276
  C,
 
277
  R,
 
278
  SPLUS,
 
279
  PERL,
 
280
  PYTHON
 
281
  } ProgrammingLanguage;
 
282
 
 
283
#if GTK_CHECK_VERSION(2,8,0) && defined CAIRO_HAS_GLITZ_SURFACE
 
284
//#define ENABLE_CAIRO 1
 
285
#endif
 
286
 
 
287
#endif /* End of conditional definition. */