home *** CD-ROM | disk | FTP | other *** search
- /***********************************************************
- 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 LABELP_H
- #define LABELP_H
-
- /* Include the public header file for Label */
- #include "Label.h"
-
- /* Label is derived from Core, so no need to include the superclass
- private header file. No internal types need to be defined. */
-
- /* Define the Label 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 */
- XtCallbackList lose_selection; /* Notify app. of lost selection */
-
- /* New internal fields */
- GC gc; /* Graphics context for displaying */
- 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 */
- String accel_string; /* Accelerator string */
- GC current_gc; /* GC we are currently using */
- } LabelPart;
-
- /* Define the full instance record */
- typedef struct _LabelRec {
- CorePart core;
- LabelPart label;
- } LabelRec;
-
- /* Define new type for the class method */
- typedef Boolean (*LabelSelectionProc)();
- /* Widget w; */
- /* Atom selection; */
- /* Boolean own; */
-
- /* Define class part structure */
- typedef struct {
- LabelSelectionProc select;
- XtPointer extension;
- } LabelClassPart;
-
- /* Define the full class record */
- typedef struct _LabelClassRec {
- CoreClassPart core_class;
- LabelClassPart label_class;
- } LabelClassRec, *LabelWidgetClass;
-
- /* External definition for class record */
- extern LabelClassRec labelClassRec;
-
- /* Inheritance constant for select_text method */
- #define InheritSelectText ((LabelSelectionProc) _XtInherit)
-
- /* End of preprocessor directives */
- #endif /* LABELP_H */
-