diff options
Diffstat (limited to 'ULabel.c')
-rw-r--r-- | ULabel.c | 30 |
1 files changed, 15 insertions, 15 deletions
@@ -28,13 +28,13 @@ Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, 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, +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 +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. +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 @@ -119,7 +119,7 @@ static XtGeometryResult QueryGeometry(Widget w, XtWidgetGeometry *intended, UCSLabelClassRec ucsLabelClassRec = { { -/* core_class fields */ +/* core_class fields */ /* superclass */ (WidgetClass) &simpleClassRec, /* class_name */ "UCSLabel", /* widget_size */ sizeof(UCSLabelRec), @@ -172,7 +172,7 @@ WidgetClass ucsLabelWidgetClass = (WidgetClass)&ucsLabelClassRec; static void ClassInitialize(void) { XawInitializeWidgetSet(); - XtAddConverter( XtRString, XtRJustify, XmuCvtStringToJustify, + XtAddConverter( XtRString, XtRJustify, XmuCvtStringToJustify, (XtConvertArgList)NULL, 0 ); } @@ -448,7 +448,7 @@ static void GetgrayGC(UCSLabelWidget lw) values.font = lw->label.font->fid; values.fill_style = FillTiled; values.tile = XmuCreateStippledPixmap(XtScreen((Widget)lw), - lw->label.foreground, + lw->label.foreground, lw->core.background_pixel, lw->core.depth); values.graphics_exposures = False; @@ -462,7 +462,7 @@ static void GetgrayGC(UCSLabelWidget lw) GCGraphicsExposures, &values, GCFont, 0); else - lw->label.gray_GC = XtGetGC((Widget)lw, + lw->label.gray_GC = XtGetGC((Widget)lw, (unsigned) GCForeground | GCBackground | GCFont | GCTile | GCFillStyle | GCGraphicsExposures, @@ -472,12 +472,12 @@ static void GetgrayGC(UCSLabelWidget lw) static void compute_bitmap_offsets(UCSLabelWidget lw) { /* - * bitmap will be eventually be displayed at + * bitmap will be eventually be displayed at * (internal_width, internal_height + lbm_y) */ if (lw->label.lbm_height != 0) { lw->label.lbm_y = (lw->core.height - - (lw->label.internal_height * 2 + + (lw->label.internal_height * 2 + lw->label.lbm_height)) / 2; } else { lw->label.lbm_y = 0; @@ -508,7 +508,7 @@ Initialize(Widget request, Widget new, ArgList args, Cardinal *num_args) { UCSLabelWidget lw = (UCSLabelWidget) new; - if (lw->label.label == NULL) + if (lw->label.label == NULL) lw->label.label = XtNewString(lw->core.name); else { lw->label.label = XtNewString(lw->label.label); @@ -578,7 +578,7 @@ static void Redisplay(Widget gw, XEvent *event, Region region) XCopyPlane (XtDisplay(gw), w->label.left_bitmap, XtWindow(gw), gc, 0, 0, w->label.lbm_width, w->label.lbm_height, (int) w->label.internal_width, - (int) w->label.internal_height + w->label.lbm_y, + (int) w->label.internal_height + w->label.lbm_y, (unsigned long) 1L); } @@ -617,7 +617,7 @@ static void Redisplay(Widget gw, XEvent *event, Region region) else XDrawString(XtDisplay(gw), XtWindow(gw), gc, w->label.label_x, y, label, (int)(nl - label)); - y += w->label.font->max_bounds.ascent + + y += w->label.font->max_bounds.ascent + w->label.font->max_bounds.descent; label = nl + 1; } @@ -818,10 +818,10 @@ QueryGeometry(Widget w, XtWidgetGeometry *intended, XtWidgetGeometry *preferred) UCSLabelWidget lw = (UCSLabelWidget)w; preferred->request_mode = CWWidth | CWHeight; - preferred->width = (lw->label.label_width + + preferred->width = (lw->label.label_width + 2 * lw->label.internal_width + LEFT_OFFSET(lw)); - preferred->height = lw->label.label_height + + preferred->height = lw->label.label_height + 2 * lw->label.internal_height; if ( ((intended->request_mode & (CWWidth | CWHeight)) == (CWWidth | CWHeight)) && |