LabelP.h revision 749
304N/A/*
304N/A* $XConsortium: LabelP.h,v 1.29 94/04/17 20:12:14 kaleb Exp $
304N/A*/
304N/A
911N/A
851N/A/***********************************************************
304N/A
304N/ACopyright (c) 1987, 1988, 1994 X Consortium
919N/A
919N/APermission is hereby granted, free of charge, to any person obtaining a copy
919N/Aof this software and associated documentation files (the "Software"), to deal
919N/Ain the Software without restriction, including without limitation the rights
919N/Ato use, copy, modify, merge, publish, distribute, sublicense, and/or sell
919N/Acopies of the Software, and to permit persons to whom the Software is
919N/Afurnished to do so, subject to the following conditions:
919N/A
919N/AThe above copyright notice and this permission notice shall be included in
919N/Aall copies or substantial portions of the Software.
919N/A
919N/ATHE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
919N/AIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
919N/AFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
919N/AX CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
919N/AAN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
919N/ACONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
304N/A
304N/AExcept as contained in this notice, the name of the X Consortium shall not be
304N/Aused in advertising or otherwise to promote the sale, use or other dealings
304N/Ain this Software without prior written authorization from the X Consortium.
493N/A
304N/A
304N/ACopyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts.
851N/A
304N/A All Rights Reserved
911N/A
911N/APermission to use, copy, modify, and distribute this software and its
911N/Adocumentation for any purpose and without fee is hereby granted,
911N/Aprovided that the above copyright notice appear in all copies and that
304N/Aboth that copyright notice and this permission notice appear in
304N/Asupporting documentation, and that the name of Digital not be
304N/Aused in advertising or publicity pertaining to distribution of the
304N/Asoftware without specific, written prior permission.
304N/A
304N/ADIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
493N/AALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
493N/ADIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
304N/AANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
304N/AWHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
SOFTWARE.
******************************************************************/
/*
* LabelP.h - Private definitions for Label widget
*
*/
#ifndef _XawLabelP_h
#define _XawLabelP_h
/***********************************************************************
*
* Label Widget Private Data
*
***********************************************************************/
#include <X11/Xaw/Label.h>
#include <X11/Xaw/SimpleP.h>
/* New fields for the Label widget class record */
typedef struct {int foo;} LabelClassPart;
/* Full class record declaration */
typedef struct _LabelClassRec {
CoreClassPart core_class;
SimpleClassPart simple_class;
LabelClassPart label_class;
} LabelClassRec;
extern LabelClassRec labelClassRec;
/* New fields for the Label widget record */
typedef struct {
/* resources */
Pixel foreground;
XFontStruct *font;
XFontSet fontset;
char *label;
XtJustify justify;
Dimension internal_width;
Dimension internal_height;
Pixmap pixmap;
Boolean resize;
unsigned char encoding;
Pixmap left_bitmap;
/* private state */
GC normal_GC;
GC gray_GC;
Pixmap stipple;
Position label_x;
Position label_y;
Dimension label_width;
Dimension label_height;
Dimension label_len;
int lbm_y; /* where in label */
unsigned int lbm_width, lbm_height; /* size of pixmap */
} LabelPart;
/****************************************************************
*
* Full instance record declaration
*
****************************************************************/
typedef struct _LabelRec {
CorePart core;
SimplePart simple;
LabelPart label;
} LabelRec;
#define LEFT_OFFSET(lw) ((lw)->label.left_bitmap \
? (lw)->label.lbm_width + (lw)->label.internal_width \
: 0)
#endif /* _XawLabelP_h */