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