home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Usenet 1994 October
/
usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso
/
x
/
volume10
/
xt-examples
/
part03
/
LabelGadgP.h
< prev
next >
Wrap
C/C++ Source or Header
|
1990-11-04
|
3KB
|
84 lines
/***********************************************************
Copyright 1990 by Digital Equipment Corporation, Maynard, Massachusetts.
All Rights Reserved
Permission to use, copy, modify, and distribute these examples for any
purpose and without fee is hereby granted, provided that the above
copyright notice appear in all copies and that both that copyright
notice and this permission notice appear in supporting documentation,
and that the name of Digital not be used in advertising or publicity
pertaining to distribution of the software without specific, written
prior permission.
DIGITAL AND THE AUTHORS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS
SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
FITNESS, IN NO EVENT SHALL DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT
OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE
OR PERFORMANCE OF THIS SOFTWARE.
******************************************************************/
/* Make it safe to include this file more than once. */
#ifndef LABEL_GADGETP_H
#define LABEL_GADGETP_H
/* Include the public header file for LabelGadget */
#include "LabelGadge.h"
/* LabelGadget is derived from RectObj, so no need to include the
superclass private header file. No internal types need to be
defined. */
/* Define the LabelGadget instance part */
typedef struct {
/* New resource fields */
String label; /* Text to display */
Pixel foreground; /* Foreground pixel value */
XFontStruct *font; /* Font to display in */
Justify justify; /* The justification value */
Dimension space; /* Inner padding value */
Pixel background; /* Background pixel value */
Pixel border; /* Border pixel value */
/* New internal fields */
GC gc; /* Graphics context for displaying */
GC background_gc; /* Graphics context for background */
GC border_gc; /* Graphics context for border */
Dimension old_border; /* Previous border width */
Dimension label_width; /* The calculated width */
Dimension label_height; /* The calculated height */
Cardinal label_len; /* The length of the text string */
Boolean size_computed; /* Whether the size was computed */
Dimension desired_width; /* The width the widget wants to be */
Dimension desired_height; /* The height the widget wants to be */
GC current_gc; /* GC we are currently using */
GC current_bg_gc; /* GC for current background */
} LabelGadgetPart;
/* Define the full instance record */
typedef struct _LabelGadgetRec {
ObjectPart object;
RectObjPart rectObj;
LabelGadgetPart label;
} LabelGadgetRec;
/* Define class part structure */
typedef struct {
XtPointer extension;
} LabelGadgetClassPart;
/* Define the full class record */
typedef struct _LabelGadgetClassRec {
RectObjClassPart rect_class;
LabelGadgetClassPart label_class;
} LabelGadgetClassRec, *LabelGadgetClass;
/* External definition for class record */
extern LabelGadgetClassRec labelGadgetClassRec;
/* End of preprocessor directives */
#endif /* LABEL_GADGETP_H */