comparison pkg-src/tree-x/intf.h @ 163:0132846995bd r20-3b8

Import from CVS: tag r20-3b8
author cvs
date Mon, 13 Aug 2007 09:43:35 +0200
parents
children 85ec50267440
comparison
equal deleted inserted replaced
162:4de2936b4e77 163:0132846995bd
1 /* ----------------------------------------------------------------------------
2 * File : intf.h
3 * Purpose : include file for intf.c and draw.c
4 * ----------------------------------------------------------------------------
5 */
6
7 #include <X11/Intrinsic.h>
8 #include <X11/StringDefs.h>
9 #define DEFAULT_FONT "-adobe-helvetica-bold-r-normal--12-*"
10 #define BIG_FONT "-adobe-helvetica-bold-r-normal--12-*"
11
12 #define X11_APPLICATION_CLASS "Tree"
13 #define X11_DEFAULT_FONT "fixed"
14 #define X11_FONT_RESOURCE "tree.font"
15 #define X11_FONT_CLASS_RESOURCE "Tree.Font"
16
17 #define HELP_FILE "tree.help"
18
19 #define LABEL_MAT_WIDTH 3
20 #define LABEL_MAT_HEIGHT 3
21 #define BORDER_SIZE 4 /* beginning border size */
22 #define MAX_BORDER_SIZE 25
23 #define PARENT_DISTANCE 30 /* beginning parent distance */
24 #define MAX_PARENT_DISTANCE 50
25 #define DENSITY_FACTOR 1.50
26 #define MAT_SIZE BORDER_SIZE * 2
27 #define ELISION_WIDTH 5
28 #define ANIMATION_STEP 3
29 #define ANIMATION_STEP_STEP 4
30
31 #define BACKGROUND_COLOR 0
32 #define TREE_COLOR 1
33 #define CONTOUR_COLOR 2
34 #define HIGHLIGHT_COLOR 3
35 #define SPLIT_COLOR 4
36 #define ACTION_COLOR 5
37 #define NUM_COLORS 6
38
39 #define TREE_MENU_NEW 0
40 #define TREE_MENU_LOAD 1
41 #define TREE_MENU_SAVE 2
42 #define TREE_MENU_SEP1 3
43 #define TREE_MENU_QUIT 4
44 #define TREE_MENU_STATS 6
45 #define TREE_MENU_ITEMS 5
46
47 #define TREE_MENU_SEP2 5
48
49 #define LAYOUT_MENU_FIXED 0 /* not used at this time */
50 #define LAYOUT_MENU_VARIABLE 1
51 #define LAYOUT_MENU_SEP1 2
52
53 #define LAYOUT_MENU_SPACING 3
54 #define LAYOUT_MENU_SEP2 4
55 #define LAYOUT_MENU_ALIGN_NODES 5
56 #define LAYOUT_MENU_ITEMS 5
57
58 #define NODE_MENU_LABEL 0
59 #define NODE_MENU_SEP1 1
60 #define NODE_MENU_ADD_CHILD 2
61 #define NODE_MENU_ADD_BEFORE 3
62 #define NODE_MENU_ADD_AFTER 4
63 #define NODE_MENU_ELISION 5
64 #define NODE_MENU_DELETE 6
65 #define NODE_MENU_ITEMS 7
66
67 #define TREE_MENU 0
68 #define LAYOUT_MENU 1
69 #define NODE_MENU 2
70 #define NUM_MENUS 3
71
72 #define STR_SHOW_STATS 0
73 #define STR_HIDE_STATS 1
74 #define STR_NODE_COLLAPSE 2
75 #define STR_NODE_EXPAND 3
76 #define STR_SHOW_CONTOUR 4
77 #define STR_HIDE_CONTOUR 5
78 #define STR_LOAD_FILE 6
79 #define STR_SAVE_FILE 7
80 #define NUM_MENU_STRS 8
81
82 #define DLG_NEW 0
83 #define DLG_NODE_NAME 1
84 #define DLG_FILE 2
85 #define DLG_INFO 3
86 #define DLG_ERROR 4
87 #define DLG_SPACING 5
88 #define NUM_DLG 6
89
90 /* in 1/10ths of a second */
91 #define ANIMATION_SPEED_FAST 1
92
93 typedef enum {
94 NoContours,
95 OutsideContour,
96 AllContours,
97 SelectedContours
98 } ContourOption;
99
100 typedef enum {
101 Child,
102 Before,
103 After
104 } NodePosition;
105
106 typedef enum {
107 Fixed,
108 Variable
109 } DensityOption;
110
111 extern Widget TreeTopLevel;
112 extern Widget TreeDrawingArea;
113 extern Display *TreeDisplay;
114 extern int TreeScreen;
115 extern int TreeContourWidth;
116 extern int TreeBorderSize;
117 extern int TreeParentDistance;
118 extern XFontStruct *TreeLabelFont;
119 extern DoubleBuffer *TreeDrawingAreaDB;
120 extern char TreeShowSteps;
121 extern ContourOption TreeShowContourOption;
122 extern DensityOption TreeLayoutDensity;
123 extern char TreeAlignNodes;
124 extern char PauseAfterStep;