_____________________________________________________XawPlus

The Label Widget

Application Header file
Class Header file
Class
Class Name
Superclass
<X11/XawPlus/Label.h>
<X11/XawPlus/LabelP.h>
labelWidgetClass
Label
Simple

A Label widget is a text string or bitmap displayed within a rectangular region of the screen. The label 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.

Differences between Xaw and XawPlus

Since the core extension class Add3dExt is inserted, the Label widget has the additional resources highlightColor, shadowColor and buttonBorderWidth. The default background color is now grey75. The bitmap and leftBitmap resources also provides support of XPM styled pixmaps.

Resources

When creating a Label widget instance, the following resources are retrieved from the argument list of XtSetValues() or XtVaSetValues() or from the resource database:

Name Class RepType Default Value
OBJECT:
destroyCallback Callback Pointer NULL
RECTANGLE:
borderWidth
height
sensitive
width
x
y
BorderWidth
Height
Sensitive
Width
Position
Position
Dimension
Dimension
Boolean
Dimension
Position
Position
0
12
True
12
0
0
CORE:
border
background
mappedWhenManaged
BorderColor
Background
MappedWhenManaged
Pixel
Pixel
Boolean
XtDefaultForeground
grey75
True
ADD3DEXT:
highlightColor
shadowColor
buttonBorderWidth
Background
Background
Width
Pixel
Pixel
Dimension
grey90
grey40
2
SIMPLE:
cursor
cursorName
pointerColor
pointerColorBackground
insensitiveBorder
Cursor
Cursor
Foreground
Background
Insensitive
Cursor
String
Pixel
Pixel
Pixmap
None
NULL
XtDefaultForeground
XtDefaultBackground
NULL
LABEL:
internalHeight
internalWidth
justify
resize
font
encoding
foreground
label
leftBitmap
bitmap
Height
Width
Justify
Resize
Font
Encoding
Foreground
Label
LeftBitmap
Pixmap
Dimension
Dimension
XtJustify
Boolean
XFontStruct*
unsigned char
Pixel
String
Pixmap
Pixmap
2
4
XtJustifyCenter
True
XtDefaultFont
XawTextEncoding8bit
XtDefaultForeground
NULL
None
None

internalHeight,
internalWidth
These resources defines the internal border width between the label string or the bitmap and the border of this widget.
justify Defines how to jusify a label string in a label widget (left, right or centred).
font With this resource it is possible to set any available font, used to display the label text.
encoding Two types of encoding are available, the default 8 bit encoding and the 16 bit encoding (unicode).
foreground This is the foreground color, used to display a label text.
label Defines the label text. It is not possible to use both a label and a bitmap, but it is possible to use a label with a leftBitmap.
leftBitmap This resource defines a bitmap or a XPM styled pixmap, placed left of the label text. XPM pixmaps are detected through their filename extension .xpm.
bitmap Defines a bitmap or a XPM styled pixmap to display in the label widget. It is not possible to use a bitmap together with a label or a leftBitmap.

XawPlus_____________________________________________________