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