1 /*-- brushing.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 Eclipse 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 #ifndef BRUSH_H
18 #define BRUSH_H
19 
20 #include <gtk/gtk.h>
21 
22 #define NGLYPHTYPES 7  /* 0:6 */
23 #define NGLYPHSIZES 8  /* 0:7 */
24 #define NGLYPHS ((NGLYPHTYPES-1)*NGLYPHSIZES + 1)  /* 0:48 */
25 
26 #define OPEN 0
27 #define FILL 1
28 
29 #define MAXNCOLORS 15
30 
31 /* br_mode */
32 #define BR_PERSISTENT 0
33 #define BR_TRANSIENT  1
34 
35 /* br_point_targets and br_edge_targets */
36 typedef enum {
37    br_off, br_candg, br_color, br_glyph, br_shadow, br_unshadow
38 } BrushTargetType;
39 
40 /* for binning the screen */
41 #define BRUSH_NBINS  20
42 #define BRUSH_MARGIN 10
43 #define BINBLOCKSIZE 50
44 #if 0  // Unused?
45 /* br_linkby */
46 #define BR_LINKBYID   0
47 #define BR_LINKBYVAR  1
48 /* */
49 #endif
50 
51 /*-- for edge brushing:  all sizes, 3 types for now --*/
52 #define NEDGETYPES 3
53 typedef enum {SOLID, WIDE_DASH, NARROW_DASH} EdgeType;
54 /*-- --*/
55 
56 typedef enum {
57   RESET_EXCLUDE_SHADOW_POINTS,
58   RESET_INCLUDE_SHADOW_POINTS,
59   RESET_UNSHADOW_POINTS,
60   RESET_EXCLUDE_SHADOW_EDGES,
61   RESET_INCLUDE_SHADOW_EDGES,
62   RESET_UNSHADOW_EDGES,
63   RESET_INIT_BRUSH,
64 
65   RESET_POINT_COLORS,  /* unused */
66   RESET_POINT_GLYPHS,  /* unused */
67   RESET_EDGE_COLORS,   /* unused */
68   RESET_EDGE_TYPES    /* unused */
69 } BrushReset;
70 
71 typedef struct {
72     gint x1, y1, x2, y2;
73 } brush_coords;
74 
75 /* these data types seem to be missing in gdk */
76 typedef struct {
77   gint x, y;
78   gint width, height;
79 } arcd;
80 typedef struct {
81   gint x, y;
82   gint width, height;
83 } rectd;
84 
85 typedef struct {
86   guint n, nhidden, nshown;
87 } symbol_cell;
88 
89 typedef struct {
90   glong n, nshown, nhidden;
91   gboolean hidden_p;
92   gint glyphtype, glyphsize;
93   gshort color;
94 } clusterd;
95 typedef struct {
96   GtkWidget *da;
97   /*-- buttons and labels for hide, show, complement --*/
98   GtkWidget *h_btn;  /* hide */
99   GtkWidget *nh_lbl, *ns_lbl, *n_lbl;
100 } clusteruid;
101 
102 /* structure for binning the plot window */
103 typedef struct {
104   gulong *els;
105   gint nels;
106   gint nblocks;  /* how many blocks have been allocated for els */
107 } bin_struct;
108 
109 /* row groups */
110 typedef struct {
111   gint id, nels, *els;
112   gboolean sampled;   /* for subsetting */
113 } groupd;
114 
115 #endif
116