#ifndef lint
#endif /* lint */
/***********************************************************
Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts,
and the Massachusetts Institute of Technology, Cambridge, Massachusetts.
All Rights Reserved
Permission to use, copy, modify, and distribute this software and its
documentation 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 names of Digital or MIT not be
used in advertising or publicity pertaining to distribution of the
software without specific, written prior permission.
DIGITAL DISCLAIMS 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.
******************************************************************/
/*
* Label.c - Label widget
*
*/
#include <stdio.h>
#include <ctype.h>
#include <X11/IntrinsicP.h>
#include <X11/StringDefs.h>
#include <./Xaw3_1XawInit.h>
#include <./Xaw3_1LabelP.h>
#ifdef SYSV
#ifndef index
#endif
#endif
/****************************************************************
*
* Full class record constant
*
****************************************************************/
/* Private Data */
};
static void Initialize();
static void Resize();
static void Redisplay();
static void ClassInitialize();
static void Destroy();
static XtGeometryResult QueryGeometry();
{
/* core_class fields */
/* class_name */ "Label",
/* widget_size */ sizeof(LabelRec),
/* class_initialize */ ClassInitialize,
/* class_part_initialize */ NULL,
/* class_inited */ FALSE,
/* initialize */ Initialize,
/* initialize_hook */ NULL,
/* realize */ XtInheritRealize,
/* actions */ NULL,
/* num_actions */ 0,
/* resources */ resources,
/* xrm_class */ NULLQUARK,
/* compress_motion */ TRUE,
/* compress_exposure */ TRUE,
/* compress_enterleave */ TRUE,
/* visible_interest */ FALSE,
/* destroy */ Destroy,
/* resize */ Resize,
/* expose */ Redisplay,
/* set_values */ SetValues,
/* set_values_hook */ NULL,
/* set_values_almost */ XtInheritSetValuesAlmost,
/* get_values_hook */ NULL,
/* accept_focus */ NULL,
/* version */ XtVersion,
/* callback_private */ NULL,
/* tm_table */ NULL,
/* query_geometry */ QueryGeometry,
/* display_accelerator */ XtInheritDisplayAccelerator,
/* extension */ NULL
},
/* Simple class fields initialization */
{
/* change_sensitive */ XtInheritChangeSensitive
}
};
/****************************************************************
*
* Private Procedures
*
****************************************************************/
static void ClassInitialize()
{
extern void XmuCvtStringToJustify();
extern void XmuCvtStringToBitmap();
sizeof(Screen *)}
};
} /* ClassInitialize */
/*
* Calculate width and height of displayed text in pixels
*/
{
char *nl;
int x, y;
return;
}
}
}
char *label;
if (*label)
}
if (*label) {
}
} else {
}
}
{
&values);
}
{
(unsigned) GCForeground | GCBackground |
&values);
}
/* ARGSUSED */
{
else {
}
} /* Initialize */
/*
* Repaint the widget window
*/
/* ARGSUSED */
Widget w;
{
== RectangleOut)
return;
#ifdef notdef
#endif /*notdef*/
if (len == MULTI_LINE_LABEL) {
char *nl;
}
}
if (len)
} else {
}
#ifdef notdef
#endif /* notdef */
}
register LabelWidget lw;
{
case XtJustifyLeft :
break;
case XtJustifyRight :
break;
case XtJustifyCenter :
break;
}
return;
}
static void Resize(w)
Widget w;
{
}
/*
* Set specified arguments into widget
*/
#define PIXMAP 0
{
int i;
for (i = 0; i < NUM_CHECKS; i++)
for (i = 0; i < *num_args; i++) {
}
}
}
was_resized = True;
}
was_resized = True;
}
/* recalculate the window size if something has changed. */
}
}
|| was_resized) {
/* Resize() will be called if geometry changes succeed */
}
return was_resized || redisplay ||
}
static void Destroy(w)
Widget w;
{
}
Widget w;
{
return XtGeometryYes;
return XtGeometryNo;
else
return XtGeometryAlmost;
}