Label widget

Application Header file <Xraw/Label.h>
Class Header file <Xraw/LabelP.h>
Class labelWidgetClass
Class Name Label
Superclass Simple --> Core

Table of Contents


    The Label widget is a text string or bitmap displayed within a rectangular region of the screen. It may contain multiple lines of Latin1 characters. The Label widget will allow its string to be left, right, or center justified. Normally, this widget can be neither selected nor directly edited by the user. It is intended for use as an output device only.


New Resources

Label class resources
Name Class Type Notes Default Value
bitmap Pixmap Pixmap CSG None
encoding Encoding UnsignedChar CG XawTextEncoding8bit
font Font XFontStruct CSG dinamic**XtDefaultFont
internalHeight Height Dimension CSG 2
internalWidth Width Dimension CSG 4
justify Justify XtJustify CSG XtJustifyCenter
label Label String CSG Name of widget
leftBitmap LeftBitmap Bitmap CSG None
resize Resize Boolean CSG True

bitmap A bitmap to display instead of the label. The default size of the widget will be just large enough to contain the bitmap and the widget's internal width and height. The resource converter for this resource constructs bitmaps from the contents of files. (See Converting Bitmaps for details.) If this bitmap is one bit deep then the 1's will be rendered in the foreground color, and the 0's in the background color. If bitmap has a depth greater than one, it is copied directly into the window.
cornerRoundPercent When a shapeStyle of roundedRectangle is used, this resource controls the radius of the rounded corner. The radius of the rounded corners is specified as a percentage of the length of the shortest side of the widget.
encoding The encoding method used by the value of the label resource. The value may be XawTextEncoding8bit or XawTextEncodingChar2b.
font The text font to use when displaying the label.
internalHeight
internalWidth
The minimum amount of space to leave between the label or bitmap and the vertical and horizontal edges of the window.
justify Specifies left, center, or right alignment of label within the widget. This resource may be specified with the values XtJustifyLeft, XtJustifyCenter, or XtJustifyRight. A converter is registered for this resource that will convert the following strings: left, right, and center. This resource only has noticeable effect when the width of the widget is larger than necessary to display the label.
label Specifies the text string to be displayed in the widget's window if no bitmap is specified. The default is the name of this widget. Irregardless of the value of encoding, a single newline character (1 byte) will cause a line break.
leftBitmap Specifies a bitmap to display to the left of the label in the widget's window.
resize Specifies whether the widget should attempt to resize to its preferred dimensions whenever its resources are modified with XtSetValues. This attempt to resize may be denied by the parent of this widget. The parent is always free to resize the widget regardless of the state of this resource.
shapeStyle Nonrectangular buttons may be created using this resource. Nonrectangular buttons are supported only on a server that supports the Shape Extension. If nonrectangular buttons are specified for a server lacking this extension, the shape is ignored and the widgets will be rectangular. The following shapes are currently supported: XmuShapeRectangle, XmuShapeOval, XmuShapeEllipse, and XmuShapeRoundedRectangle. A converter is registered for this resource that will convert the following strings: rectangle, oval, ellipse, and roundedRectangle.


Inherited Resources

Simple class resources
Name Class Type Notes Default Value
bottomShadowPixel BottomShadowPixel Pixel CSG Dinamic
bottomShadowPixmap BottomShadowPixmap Pixmap CSG UnspecifiedPixmap
cursor Cursor Cursor CSG None
cursorName CursorName String C NULL
highlightPixel highlightPixel Pixel CSG Dinamic
highlightPixmap highlightPixmap Pixmap CSG UnspecifiedPixmap
highlightThickness HighlightThickness Dimension CSG 2
insensitiveBorder Insensitive Pixmap CSG None**GreyPixmap
foreground Foreground Pixel CSG XtDefaultForeground
shadowWidth ShadowWidth Dimension CSG 0
topShadowPixmap TopShadowPixmap Pixmap CSG UnspecifiedPixmap
topShadowPixel TopShadowPixel Pixel CSG Dinamic
userData UserData XtPointer CSG NULL
 
Core class resources
Name Class Type Notes Default Value
accelerators Accelerators XtAccelerators CSG NULL
ancestorSensitive AncestorSensitive Boolean G True
background Background Pixel CSG XtDefaultBackground
backgroundPixmap Pixmap Pixmap CSG XtUnspecifiedPixmap
borderColor BorderColor Pixel CSG XtDefaultForeground
borderPixmap Pixmap Pixmap CSG XtUnspecifiedPixmap
borderWidth BorderWidth Dimension CSG 0
colormap Colormap Colormap CG Parent's Colormap
depth Depth int CG Parent's Depth
destroyCallback Callback XtCallbackList C NULL
height Height Dimension CSG Dinamic
initialResourcesPersistent InitialResourcesPersistent Boolean C True
mappedWhenManaged MappedWhenManaged Boolean CSG True
screen Screen Screen CG Parent's Screen
sensitive Sensitive Boolean CSG True
translations Translations XtTranslations CSG NULL
width Width Dimension CSG Dinamic
x Position Position CSG 0
y Position Position CSG 0
borderWidth The default value of this resource is overwritten by the Simple widget, the Core's original default value is 1.
height The Label widget support shrink-wrapping behavior. The default value of this resource is
( font's height + 2 * (internalHeight + shadowWidth + highlightThickness)).
The Core's original default value is 0.
width The Label widget support shrink-wrapping behavior. The default value of this resource is
( label's width + 2 * (internalWidth + shadowWidth + highlightThickness)).
The Core's original default value is 0.

Callback Information

This version of Label widget does not define any callback resource.

Label Actions

This version of Label widget does not define any actions.

Convenience Routines

This version of Label widget does not define any convenience routine.

[Xraw home] [Xraw widget class hierarchy]


Vladimir T. Romanovski
romsky@hp1.oea.ihep.su