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