2 Copyright 1989, 1994, 1998 The Open Group
4 Permission to use, copy, modify, distribute, and sell this software and its
5 documentation for any purpose is hereby granted without fee, provided that
6 the above copyright notice appear in all copies and that both that
7 copyright notice and this permission notice appear in supporting
10 The above copyright notice and this permission notice shall be included in
11 all copies or substantial portions of the Software.
13 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
17 AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
18 CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20 Except as contained in this notice, the name of The Open Group shall not be
21 used in advertising or otherwise to promote the sale, use or other dealings
22 in this Software without prior written authorization from The Open Group.
27 * This is a List widget. It allows the user to select an item in a list and
28 * notifies the application through a callback function.
31 * By: Chris D. Peterson
32 * MIT - Project Athena
39 * List Widget Private Data
41 #include <X11/Xaw/SimpleP.h>
42 #include <X11/Xaw/List.h>
44 #define NO_HIGHLIGHT XAW_LIST_NONE
45 #define OUT_OF_RANGE -1
48 /* New fields for the List widget class */
53 /* Full class record */
54 typedef struct _ListClassRec {
55 CoreClassPart core_class;
56 SimpleClassPart simple_class;
57 ListClassPart list_class;
60 extern ListClassRec listClassRec;
62 /* New fields for the List widget */
66 Dimension internal_width; /* if not 3d, user sets directly */
67 Dimension internal_height;
68 Dimension column_space; /* half of *_space is add on
70 Dimension row_space; /* each item's text bounding box
71 half added to longest for right */
75 Boolean vertical_cols;
76 int longest; /* in pixels */
79 XFontSet fontset; /* Sheeran, Omron KK, 93/03/05 */
80 String *list; /* for i18n, always in multibyte
82 XtCallbackList callback;
85 int is_highlighted; /* set to the item currently
87 int highlight; /* set to the item that should be
89 int col_width; /* width of each column */
90 int row_height; /* height of each row */
91 int nrows; /* number of rows in the list */
92 int ncols; /* number of columns in the list */
96 int freedoms; /* flags for resizing height
100 Boolean show_current;
101 char pad1[(sizeof(XtPointer) - sizeof(Boolean)) +
102 (sizeof(XtPointer) - sizeof(int))];
103 XtPointer pad2[2]; /* for future use and keep binary compatability */
108 /* Full instance record */
109 typedef struct _ListRec {
115 #endif /* _XawListP_h */