// This may look like C code, but it is really -*- C++ -*-

/***********************************************************
Copyright 1991 by the Massachusetts Institute of Technology

Permission to use, copy, modify, distribute, and sell this software and its
documentation for any purpose is hereby granted without fee, 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 M.I.T. not be used in advertising or
publicity pertaining to distribution of the software without specific,
written prior permission.  M.I.T. makes no representations about the
suitability of this software for any purpose.  It is provided "as is"
without express or implied warranty.


C++ Interface Author: Roman J. Budzianowski - Project Athena MIT

******************************************************************/

#ifndef _XawLabelP_h
#define _XawLabelP_h

#include <xt++/Xaw/Simple.h>
#include <X11/Xmu/Converters.h>
/* Resources:

 Name		     Class		RepType		Default Value
 ----		     -----		-------		-------------
 background	     Background		Pixel		XtDefaultBackground
 bitmap		     Pixmap		Pixmap		None
 border		     BorderColor	Pixel		XtDefaultForeground
 borderWidth	     BorderWidth	Dimension	1
 cursor		     Cursor		Cursor		None
 destroyCallback     Callback		XtCallbackList	NULL
 font		     Font		XFontStruct*	XtDefaultFont
 foreground	     Foreground		Pixel		XtDefaultForeground
 height		     Height		Dimension	text height
 insensitiveBorder   Insensitive	Pixmap		Gray
 internalHeight	     Height		Dimension	2
 internalWidth	     Width		Dimension	4
 justify	     Justify		XtJustify	XtJustifyCenter
 label		     Label		String		NULL
 leftBitmap	     LeftBitmap		Pixmap		None
 mappedWhenManaged   MappedWhenManaged	Boolean		True
 resize		     Resize		Boolean		True
 sensitive	     Sensitive		Boolean		True
 width		     Width		Dimension	text width
 x		     Position		Position	0
 y		     Position		Position	0

*/

#define XtNbitmap "bitmap"
#define XtNforeground "foreground"
#define XtNlabel "label"
#define XtNfont "font"
#define XtNinternalWidth "internalWidth"
#define XtNinternalHeight "internalHeight"
#define XtNleftBitmap "leftBitmap"
#define XtCLeftBitmap "LeftBitmap"
#define XtNresize "resize"
#define XtCResize "Resize"
 
#define XtCBitmap "Bitmap"

/* Class record constants */

extern WidgetClass labelWidgetClass;

#include <xt++/ConstrMacro.h>

/***********************************************************************
 *
 * Label Widget Private Data
 *
 ***********************************************************************/

//extern LabelClassRec labelClassRec;

/* New fields for the Label widget record */
class LabelWidget : public SimpleWidget {
 private:
   /* resources */
   Pixel	foreground;
   XFontStruct	*font;
   char*        _label;
   XtJustify	justify;
   Dimension	internal_width;
   Dimension	internal_height;
   Pixmap	pixmap;
   Boolean	resize;
   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 */
 public:

   const char* label() { return _label; }
   Constructors(Label,label){}	// no semicolon

};

#endif /* _XawLabelP_h */
