File: ListP.h

package info (click to toggle)
moxftp 2.2-18.1
  • links: PTS
  • area: main
  • in suites: woody
  • size: 4,160 kB
  • ctags: 3,837
  • sloc: ansic: 43,420; makefile: 353; perl: 262; sh: 192
file content (209 lines) | stat: -rw-r--r-- 5,452 bytes parent folder | download | duplicates (4)
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
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
/*
 * $XConsortium: ListP.h,v 1.12 89/12/11 15:09:04 kit Exp $
 *
 * Copyright 1989 Massachusetts Institute of Technology
 *
 * 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, and that the name of M.I.T. not be used in advertising or
 * publicity pertaining to distribution of the software without specific,
 * written prior permission.  M.I.T. makes no representations about the
 * suitability of this software for any purpose.  It is provided "as is"
 * without express or implied warranty.
 *
 * M.I.T. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL M.I.T.
 * 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.
 *
 * Author:  Chris D. Peterson, MIT X Consortium
 */


/* 
 * ListP.h - Private definitions for List widget
 * 
 * This is the List widget, it is useful to display a list, without the
 * overhead of having a widget for each item in the list.  It allows 
 * the user to select an item in a list and notifies the application through
 * a callback function.
 *
 *	Created: 	8/13/88
 *	By:		Chris D. Peterson
 *                      MIT - Project Athena
 */

/*
 * $Id: ListP.h,v 1.1 1994/03/14 18:57:41 jones Exp $
 * $Source: /mintaka/u0/xx/ss/jones/jones.old/mftp.src/mftpnew/RCS/ListP.h,v $
 *
 * $Log: ListP.h,v $
 * Revision 1.1  1994/03/14  18:57:41  jones
 * Initial revision
 *
 * Revision 1.1  1993/02/11  00:41:51  jones
 * Initial revision
 *
 */

#ifndef _MyXawListP_h
#define _MyXawListP_h

/***********************************************************************
 *
 * List Widget Private Data
 *
 ***********************************************************************/

#include "List.h"

#if defined(OPENWINDOW)
#include <Xol/OpenLookP.h>
#include <Xol/Primitive.h>
#include <Xol/PrimitiveP.h>
#endif


#if defined(XAW3D)
#include <X11/Xaw3d/SimpleP.h>
#include <X11/Xaw3d/ThreeDP.h>
#else
#if defined(XAW)
#include <X11/Xaw/SimpleP.h>
#endif
#endif

#if defined(MOTIF)
#include <Xm/XmP.h>
#if XmREVISION==2
#include <Xm/PrimitiveP.h>
#endif
#endif


#define NO_HIGHLIGHT            XAW_LIST_NONE
#define OUT_OF_RANGE            -1
#define OKAY                     0
#define PAD		 	 2
#if defined(XAW)
#define SCROLL_PAD	 	 5
#endif
#if defined(MOTIF)
#define SCROLL_PAD		 2
#endif

/* New fields for the List widget class record */

typedef struct {int foo;} MyListClassPart;

/* Full class record declaration */
typedef struct _MyListClassRec {
    CoreClassPart	core_class;
#if defined(XAW)
    SimpleClassPart	simple_class;
#if defined(XAW3D)
    ThreeDClassPart    	threeD_class;
#endif
#endif
#if defined(MOTIF)
    XmPrimitiveClassPart primitive_class;
#endif
#if defined(OPENWINDOW)
    PrimitiveClassPart  primitive_class;
#endif
    MyListClassPart	Mylist_class;
} MyListClassRec;

extern MyListClassRec MylistClassRec;

/* New fields for the List widget record */
typedef struct {
    /* resources */
    Pixel	foreground;
    Dimension	internal_width,
        	internal_height,
                column_space,
                row_space,
		clip_top_margin,
		clip_right_margin,
		clip_width,
		clip_height;
    int         default_cols;
    Boolean     force_cols,
                paste,
                vertical_cols,
		mulitselect;
    int         longest,
		longest_str;
    int         nitems;		/* number of items in the list. */
#if defined(XAW)||defined(OPENWINDOW)
    XFontStruct	*font;
    XFontStruct	*fontbold;
#if defined(XAW3D)
    int	        redisplay;
#endif
#else
    XmFontList  font;
    XmFontList  fontbold;
#endif
    String *    list;
    XtCallbackList  callback;
    XtCallbackList  scallback;

    /* private state */

    int         bold;
    int	   *	selected;
    int         is_highlighted,	/* set to the item currently highlighted. */
                highlight,	/*set to the item that should be highlighted.*/
                col_width,	/* width of each column. */
                row_height,	/* height of each row. */
                nrows,		/* number of rows in the list. */
                ncols,		/* number of columns in the list. */
		resizeing;
    GC		normgc,		/* a couple o' GC's. */
		boldgc,
                revgc,
		revboldgc,
                graygc;		/* used when inactive. */
    XFontStruct *fs;
    XFontStruct *fsbold;
#if defined(OPENWINDOW)
    Widget	lastfocus;
#endif
    int		xoffset,
		yoffset,
		top,
		real_top;

} MyListPart;


/****************************************************************
 *
 * Full instance record declaration
 *
 ****************************************************************/

typedef struct _ListRec {
    CorePart	        core;
#if defined(XAW)
    SimplePart	        simple;
#if defined(XAW3D)
    ThreeDPart          threeD;
#endif
#endif
#if defined(MOTIF)
    XmPrimitivePart    	primitive;
#endif
#if defined(OPENWINDOW)
    PrimitivePart      	primitive;
#endif
    MyListPart		list;
} MyListRec;

#endif /* _MyXawListP_h */