1/***********************************************************
2
3Copyright (c) 1987, 1988, 1994  X Consortium
4
5Permission is hereby granted, free of charge, to any person obtaining a copy
6of this software and associated documentation files (the "Software"), to deal
7in the Software without restriction, including without limitation the rights
8to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9copies of the Software, and to permit persons to whom the Software is
10furnished to do so, subject to the following conditions:
11
12The above copyright notice and this permission notice shall be included in
13all copies or substantial portions of the Software.
14
15THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
18X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
19AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21
22Except as contained in this notice, the name of the X Consortium shall not be
23used in advertising or otherwise to promote the sale, use or other dealings
24in this Software without prior written authorization from the X Consortium.
25
26
27Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts.
28
29                        All Rights Reserved
30
31Permission to use, copy, modify, and distribute this software and its
32documentation for any purpose and without fee is hereby granted,
33provided that the above copyright notice appear in all copies and that
34both that copyright notice and this permission notice appear in
35supporting documentation, and that the name of Digital not be
36used in advertising or publicity pertaining to distribution of the
37software without specific, written prior permission.
38
39DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
40ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
41DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
42ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
43WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
44ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
45SOFTWARE.
46
47******************************************************************/
48
49/*
50 * ULabelP.h - Private definitions for UCSLabel widget
51 *
52 */
53
54#ifndef _XawUCSLabelP_h
55#define _XawUCSLabelP_h
56
57/***********************************************************************
58 *
59 * Label Widget Private Data
60 *
61 ***********************************************************************/
62
63#include "ULabel.h"
64#include <X11/Xaw/SimpleP.h>
65
66/* New fields for the UCSLabel widget class record */
67
68typedef struct {int foo;} UCSLabelClassPart;
69
70/* Full class record declaration */
71typedef struct _UCSLabelClassRec {
72    CoreClassPart	core_class;
73    SimpleClassPart	simple_class;
74    UCSLabelClassPart	label_class;
75} UCSLabelClassRec;
76
77extern UCSLabelClassRec ucsLabelClassRec;
78
79/* New fields for the UCSLabel widget record */
80typedef struct {
81    /* resources */
82    Pixel	foreground;
83    XFontStruct	*font;
84    XFontSet 	fontset;
85    String	label;
86    XtJustify	justify;
87    Dimension	internal_width;
88    Dimension	internal_height;
89    Pixmap	pixmap;
90    Boolean	resize;
91    unsigned char encoding;
92    Pixmap	left_bitmap;
93
94    /* private state */
95    GC		normal_GC;
96    GC          gray_GC;
97    Pixmap	stipple;
98    Position	label_x;
99    Position	label_y;
100    Dimension	label_width;
101    Dimension	label_height;
102    Dimension	label_len;
103    int		lbm_y;			/* where in label */
104    unsigned int lbm_width, lbm_height;	 /* size of pixmap */
105} UCSLabelPart;
106
107/****************************************************************
108 *
109 * Full instance record declaration
110 *
111 ****************************************************************/
112
113typedef struct _UCSLabelRec {
114    CorePart	core;
115    SimplePart	simple;
116    UCSLabelPart	label;
117} UCSLabelRec;
118
119#define LEFT_OFFSET(lw) ((lw)->label.left_bitmap \
120			 ? (lw)->label.lbm_width + (lw)->label.internal_width \
121			 : 0)
122
123#endif /* _XawUCSLabelP_h */
124