ULabelP.h revision 9027f4a0
19027f4a0Smrg/* 29027f4a0Smrg* $XConsortium: LabelP.h,v 1.29 94/04/17 20:12:14 kaleb Exp $ 39027f4a0Smrg*/ 49027f4a0Smrg 59027f4a0Smrg 69027f4a0Smrg/*********************************************************** 79027f4a0Smrg 89027f4a0SmrgCopyright (c) 1987, 1988, 1994 X Consortium 99027f4a0Smrg 109027f4a0SmrgPermission is hereby granted, free of charge, to any person obtaining a copy 119027f4a0Smrgof this software and associated documentation files (the "Software"), to deal 129027f4a0Smrgin the Software without restriction, including without limitation the rights 139027f4a0Smrgto use, copy, modify, merge, publish, distribute, sublicense, and/or sell 149027f4a0Smrgcopies of the Software, and to permit persons to whom the Software is 159027f4a0Smrgfurnished to do so, subject to the following conditions: 169027f4a0Smrg 179027f4a0SmrgThe above copyright notice and this permission notice shall be included in 189027f4a0Smrgall copies or substantial portions of the Software. 199027f4a0Smrg 209027f4a0SmrgTHE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 219027f4a0SmrgIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 229027f4a0SmrgFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 239027f4a0SmrgX CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN 249027f4a0SmrgAN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 259027f4a0SmrgCONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 269027f4a0Smrg 279027f4a0SmrgExcept as contained in this notice, the name of the X Consortium shall not be 289027f4a0Smrgused in advertising or otherwise to promote the sale, use or other dealings 299027f4a0Smrgin this Software without prior written authorization from the X Consortium. 309027f4a0Smrg 319027f4a0Smrg 329027f4a0SmrgCopyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts. 339027f4a0Smrg 349027f4a0Smrg All Rights Reserved 359027f4a0Smrg 369027f4a0SmrgPermission to use, copy, modify, and distribute this software and its 379027f4a0Smrgdocumentation for any purpose and without fee is hereby granted, 389027f4a0Smrgprovided that the above copyright notice appear in all copies and that 399027f4a0Smrgboth that copyright notice and this permission notice appear in 409027f4a0Smrgsupporting documentation, and that the name of Digital not be 419027f4a0Smrgused in advertising or publicity pertaining to distribution of the 429027f4a0Smrgsoftware without specific, written prior permission. 439027f4a0Smrg 449027f4a0SmrgDIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING 459027f4a0SmrgALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL 469027f4a0SmrgDIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR 479027f4a0SmrgANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, 489027f4a0SmrgWHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, 499027f4a0SmrgARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS 509027f4a0SmrgSOFTWARE. 519027f4a0Smrg 529027f4a0Smrg******************************************************************/ 539027f4a0Smrg/* $XFree86: contrib/programs/xfontsel/ULabelP.h,v 1.1 1999/04/29 09:12:39 dawes Exp $ */ 549027f4a0Smrg 559027f4a0Smrg/* 569027f4a0Smrg * ULabelP.h - Private definitions for UCSLabel widget 579027f4a0Smrg * 589027f4a0Smrg */ 599027f4a0Smrg 609027f4a0Smrg#ifndef _XawUCSLabelP_h 619027f4a0Smrg#define _XawUCSLabelP_h 629027f4a0Smrg 639027f4a0Smrg/*********************************************************************** 649027f4a0Smrg * 659027f4a0Smrg * Label Widget Private Data 669027f4a0Smrg * 679027f4a0Smrg ***********************************************************************/ 689027f4a0Smrg 699027f4a0Smrg#include "ULabel.h" 709027f4a0Smrg#include <X11/Xaw/SimpleP.h> 719027f4a0Smrg 729027f4a0Smrg/* New fields for the UCSLabel widget class record */ 739027f4a0Smrg 749027f4a0Smrgtypedef struct {int foo;} UCSLabelClassPart; 759027f4a0Smrg 769027f4a0Smrg/* Full class record declaration */ 779027f4a0Smrgtypedef struct _UCSLabelClassRec { 789027f4a0Smrg CoreClassPart core_class; 799027f4a0Smrg SimpleClassPart simple_class; 809027f4a0Smrg UCSLabelClassPart label_class; 819027f4a0Smrg} UCSLabelClassRec; 829027f4a0Smrg 839027f4a0Smrgextern UCSLabelClassRec ucsLabelClassRec; 849027f4a0Smrg 859027f4a0Smrg/* New fields for the UCSLabel widget record */ 869027f4a0Smrgtypedef struct { 879027f4a0Smrg /* resources */ 889027f4a0Smrg Pixel foreground; 899027f4a0Smrg XFontStruct *font; 909027f4a0Smrg XFontSet fontset; 919027f4a0Smrg char *label; 929027f4a0Smrg XtJustify justify; 939027f4a0Smrg Dimension internal_width; 949027f4a0Smrg Dimension internal_height; 959027f4a0Smrg Pixmap pixmap; 969027f4a0Smrg Boolean resize; 979027f4a0Smrg unsigned char encoding; 989027f4a0Smrg Pixmap left_bitmap; 999027f4a0Smrg 1009027f4a0Smrg /* private state */ 1019027f4a0Smrg GC normal_GC; 1029027f4a0Smrg GC gray_GC; 1039027f4a0Smrg Pixmap stipple; 1049027f4a0Smrg Position label_x; 1059027f4a0Smrg Position label_y; 1069027f4a0Smrg Dimension label_width; 1079027f4a0Smrg Dimension label_height; 1089027f4a0Smrg Dimension label_len; 1099027f4a0Smrg int lbm_y; /* where in label */ 1109027f4a0Smrg unsigned int lbm_width, lbm_height; /* size of pixmap */ 1119027f4a0Smrg} UCSLabelPart; 1129027f4a0Smrg 1139027f4a0Smrg/**************************************************************** 1149027f4a0Smrg * 1159027f4a0Smrg * Full instance record declaration 1169027f4a0Smrg * 1179027f4a0Smrg ****************************************************************/ 1189027f4a0Smrg 1199027f4a0Smrgtypedef struct _UCSLabelRec { 1209027f4a0Smrg CorePart core; 1219027f4a0Smrg SimplePart simple; 1229027f4a0Smrg UCSLabelPart label; 1239027f4a0Smrg} UCSLabelRec; 1249027f4a0Smrg 1259027f4a0Smrg#define LEFT_OFFSET(lw) ((lw)->label.left_bitmap \ 1269027f4a0Smrg ? (lw)->label.lbm_width + (lw)->label.internal_width \ 1279027f4a0Smrg : 0) 1289027f4a0Smrg 1299027f4a0Smrg#endif /* _XawUCSLabelP_h */ 130