aboutsummaryrefslogtreecommitdiff
path: root/vendor/x11iraf/obm/ObmW/ListTreeP.h
blob: a6e369feed8c277106e1b80ceb425d244c91f128 (plain) (blame)
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
/*-----------------------------------------------------------------------------
** ListTree.c	A Specialized List widget
**
** Private header file
**
** Copyright (c) 1995 Robert W. McMullen
**
** Permission to use, copy, modify, distribute, and sell this software and its
** documentation for any purpose is hereby granted without fee, provided that
** the above copyright notice appear in all copies and that both that
** copyright notice and this permission notice appear in supporting
** documentation.  The author makes no representations about the suitability
** of this software for any purpose.  It is provided "as is" without express
** or implied warranty.
**
** THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
** ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS.  IN NO EVENT SHALL
** THE AUTHOR BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
** ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
** WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
** ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
** SOFTWARE.
*/

#ifndef _ListTreeP_H
#define _ListTreeP_H

#include <X11/Core.h>

#include "ListTree.h"
#define ListTreeRET_ALLOC 10

#define TIMER_CLEAR 0
#define TIMER_SINGLE 1
#define TIMER_DOUBLE 2
#define TIMER_WAITING 3

typedef struct {
	int		dummy;		/* keep compiler happy with dummy field */
} ListTreeClassPart;

typedef struct _ListTreeClassRec {
	CoreClassPart		core_class;
	ListTreeClassPart	ListTree_class;
} ListTreeClassRec;

extern ListTreeClassRec listtreeClassRec;

typedef struct {
	Pixmap		bitmap;
	Pixmap		pix;
	int		width,height;
	int		xoff;
} Pixinfo;

typedef struct {
	/* Public stuff ... */
	long		foreground_pixel;
	XFontStruct	*font;
	int		NumItems;
	Dimension	HSpacing;
	Dimension	VSpacing;
/*	Dimension	LabelSpacing;*/
	Dimension	Margin;
	Dimension	Indent;
	Pixinfo		Open;
	Pixinfo		Closed;
	Pixinfo		Leaf;
	Pixinfo		LeafOpen;
	Dimension	LineWidth;
	XtCallbackList  BranchCallback;
	XtCallbackList  LeafCallback;
	XtCallbackList  PathCallback;
	XtCallbackList  HighlightCallback;
	XtCallbackList  ActivateCallback;

	/* Private stuff ... */
	GC		drawGC;
	GC		eraseGC;
        GC              eorGC;
	GC		highlightGC;
	int		exposeTop,exposeBot;
	int		pixWidth;
	int		preferredWidth,preferredHeight;
	ListTreeItem	*first,		/* always points to a top level entry */
			*highlighted,
                        *drop_highlighted;

	XtIntervalId	timer_id;	/* timer for double click test */
	ListTreeItem	*timer_item;	/* item to make sure both clicks */
					/* occurred on the same item */
  int timer_type; /* flag for type of click that just happened */
	int		timer_y;
	int		timer_x;
	int		multi_click_time;

  ListTreeItem  **ret_item_list;
  int           ret_item_alloc;

	Boolean		Refresh;
} ListTreePart;

typedef struct _ListTreeRec {
	CorePart	core;
	ListTreePart	list;
} ListTreeRec;


#endif /* _ListTreeP_H */