File: intf.h

package info (click to toggle)
oo-browser 4.08-3
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k, sarge
  • size: 3,864 kB
  • ctags: 2,889
  • sloc: lisp: 21,037; ansic: 10,819; makefile: 353; sh: 94
file content (141 lines) | stat: -rw-r--r-- 4,289 bytes parent folder | download | duplicates (12)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
/* ----------------------------------------------------------------------------
 * File    : intf.h
 * Purpose : include file for intf.c and draw.c
 * ----------------------------------------------------------------------------
 */

#include <X11/Intrinsic.h>
#include <X11/StringDefs.h>
#define DEFAULT_FONT	"-adobe-helvetica-bold-r-normal--12-*"
#define BIG_FONT	"-adobe-helvetica-bold-r-normal--12-*"

#define X11_APPLICATION_CLASS    "Tree"
#define X11_DEFAULT_FONT         "fixed"
#define X11_FONT_RESOURCE        "tree.font"
#define X11_FONT_CLASS_RESOURCE  "Tree.Font"

#define HELP_FILE                 "tree.help"

#define LABEL_MAT_WIDTH           3
#define LABEL_MAT_HEIGHT          3
#define BORDER_SIZE               4      /* beginning border size     */
#define MAX_BORDER_SIZE           25
#define PARENT_DISTANCE           30     /* beginning parent distance */
#define MAX_PARENT_DISTANCE       50
#define DENSITY_FACTOR            1.50
#define MAT_SIZE                  BORDER_SIZE * 2
#define ELISION_WIDTH             5
#define ANIMATION_STEP            3
#define ANIMATION_STEP_STEP       4

#define BACKGROUND_COLOR          0
#define TREE_COLOR                1
#define CONTOUR_COLOR             2
#define HIGHLIGHT_COLOR           3
#define SPLIT_COLOR               4
#define ACTION_COLOR              5
#define NUM_COLORS                6

#define TREE_MENU_NEW             0
#define TREE_MENU_LOAD            1
#define TREE_MENU_SAVE            2
#define TREE_MENU_SEP1            3
#define TREE_MENU_QUIT            4
#define TREE_MENU_STATS           6
#define TREE_MENU_ITEMS           5

#define TREE_MENU_SEP2            5

#if 0
  #define LAYOUT_MENU_FIXED         0 /* not used at this time */
  #define LAYOUT_MENU_VARIABLE      1
  #define LAYOUT_MENU_SEP1          2

  #define LAYOUT_MENU_SPACING       3
  #define LAYOUT_MENU_SEP2          4
  #define LAYOUT_MENU_ALIGN_NODES   5
  #define LAYOUT_MENU_ITEMS         5
#endif

#define NODE_MENU_LABEL           0
#define NODE_MENU_SEP1            1
#if 0
  #define NODE_MENU_ADD_CHILD       2
  #define NODE_MENU_ADD_BEFORE      3
  #define NODE_MENU_ADD_AFTER       4
  #define NODE_MENU_ELISION         5
  #define NODE_MENU_DELETE          6
  #define NODE_MENU_ITEMS           7
#else
  #define NODE_MENU_ELISION         2
  #define NODE_MENU_DELETE          3
  #define NODE_MENU_ITEMS           4
#endif

#define TREE_MENU                 0
#define LAYOUT_MENU               1
#define NODE_MENU                 2
#define NUM_MENUS                 3

#define STR_SHOW_STATS            0
#define STR_HIDE_STATS            1
#define STR_NODE_COLLAPSE         2
#define STR_NODE_EXPAND           3
#define STR_SHOW_CONTOUR          4
#define STR_HIDE_CONTOUR          5
#define STR_LOAD_FILE             6
#define STR_SAVE_FILE             7
#define NUM_MENU_STRS             8

#define DLG_NEW                   0
#define DLG_NODE_NAME             1
#define DLG_FILE                  2
#define DLG_INFO                  3
#define DLG_ERROR                 4
#define DLG_SPACING               5
#define NUM_DLG                   6

/* in 1/10ths of a second */
#define ANIMATION_SPEED_FAST       1

typedef enum {
   NoContours,
   OutsideContour,
   AllContours,
   SelectedContours
} ContourOption;

typedef enum {
   Child,
   Before,
   After
} NodePosition;

typedef enum {
   Fixed,
   Variable
} DensityOption;

extern  Widget        TreeTopLevel;
extern  Widget        TreeDrawingArea;
extern  Display      *TreeDisplay;
extern  int           TreeScreen;
extern  int           TreeContourWidth;
extern  int           TreeBorderSize;
extern  int           TreeParentDistance;
extern  XFontStruct  *TreeLabelFont;
extern  DoubleBuffer *TreeDrawingAreaDB;
extern  char          TreeShowSteps;
extern  ContourOption TreeShowContourOption;
extern  DensityOption TreeLayoutDensity;
extern  char          TreeAlignNodes;
extern  char          PauseAfterStep;

void	Pause(void);
void	StatusMsg(char *msg, int urgent);
void	InsertNode(Tree *base_node, NodePosition node_pos, char *new_node_text);
void	SetNodeLabel(Tree *node, char *label);
void	SetDrawColor(int color);
void	ExpandCollapseNode(Tree *node);
void	SetDrawingTree(Tree *tree);
void	ExposeHandler(Widget, XtPointer, XEvent*, Boolean*);