there are now 6 node styles instead of 4
[dyninst.git] / paradyn / src / UIthread / shgConsts.h
1 // shgConsts.h
2 // Ariel Tamches
3
4 /* $Log: shgConsts.h,v $
5 /* Revision 1.2  1996/01/11 23:42:04  tamches
6 /* there are now 6 node styles instead of 4
7 /*
8  * Revision 1.1  1995/10/17 22:07:38  tamches
9  * initial version for the new search history graph
10  *
11  */
12
13 #ifndef _SHG_CONSTS_H_
14 #define _SHG_CONSTS_H_
15
16 #ifdef PARADYN
17 #include "util/h/Vector.h"
18 #else
19 #include "Vector.h"
20 #endif
21
22 #include "tk.h"
23
24 struct shgConsts {
25    vector<Tk_3DBorder> rootItemTk3DBordersByStyle;
26    vector<Tk_3DBorder> listboxItemTk3DBordersByStyle;
27
28    shgConsts(Tcl_Interp *interp, Tk_Window theTkWindow) {
29       rootItemTk3DBordersByStyle.resize(6);
30
31       // Inactive, no conclusion
32 //      rootItemTk3DBordersByStyle[0] = Tk_Get3DBorder(interp, theTkWindow,
33 //                                                   Tk_GetUid("Gray"));
34       rootItemTk3DBordersByStyle[0] = Tk_Get3DBorder(interp, theTkWindow,
35                                                      Tk_GetUid("#e9fbb57aa3c9")); // yuck --ari
36       assert(rootItemTk3DBordersByStyle[0]);
37
38       // instrumented, but no decision yet
39 //      rootItemTk3DBordersByStyle[1] = Tk_Get3DBorder(interp, theTkWindow,
40 //                                                   Tk_GetUid("tan"));
41       rootItemTk3DBordersByStyle[1] = Tk_Get3DBorder(interp, theTkWindow,
42                                                      Tk_GetUid("#ffffbba5bba5")); // yuck --ari
43       assert(rootItemTk3DBordersByStyle[1]);
44
45       // instrumented, decided on true
46 //      rootItemTk3DBordersByStyle[2] = Tk_Get3DBorder(interp, theTkWindow,
47 //                                                   Tk_GetUid("LightBlue"));
48       rootItemTk3DBordersByStyle[2] = Tk_Get3DBorder(interp, theTkWindow,
49                                                      Tk_GetUid("#acbff48ff6c8")); // yuck --ari
50       assert(rootItemTk3DBordersByStyle[2]);
51
52       // uninstrumented, decided on false
53 //      rootItemTk3DBordersByStyle[3] = Tk_Get3DBorder(interp, theTkWindow,
54 //                                                   Tk_GetUid("pink"));
55       rootItemTk3DBordersByStyle[3] = Tk_Get3DBorder(interp, theTkWindow,
56                                                      Tk_GetUid("#cc85d5c2777d")); // yuck --ari
57       assert(rootItemTk3DBordersByStyle[3]);
58
59       // instrumented, false
60       rootItemTk3DBordersByStyle[4] = Tk_Get3DBorder(interp, theTkWindow,
61                                                      Tk_GetUid("plum"));
62
63       // uninstrumented, true
64       rootItemTk3DBordersByStyle[5] = Tk_Get3DBorder(interp, theTkWindow,
65                                                      Tk_GetUid("green"));
66
67       // It seems reasonable to use the exact same colors for shg listbox items:
68       listboxItemTk3DBordersByStyle = rootItemTk3DBordersByStyle;
69    }
70
71   ~shgConsts() {
72       Tk_Free3DBorder(rootItemTk3DBordersByStyle[0]);
73       Tk_Free3DBorder(rootItemTk3DBordersByStyle[1]);
74       Tk_Free3DBorder(rootItemTk3DBordersByStyle[2]);
75       Tk_Free3DBorder(rootItemTk3DBordersByStyle[3]);
76       Tk_Free3DBorder(rootItemTk3DBordersByStyle[4]);
77       Tk_Free3DBorder(rootItemTk3DBordersByStyle[5]);
78    }
79 };
80
81 #endif