LessTif

LessTif Manual Page - Widget Classes

XmLabel


[Resources] [Callbacks] [Inherited Resources] [Actions] [Translations] [Public Functions] [Usage] [Example] [See Also]

Synopsis

Widget Class xmLabelWidgetClass
Public Header <Xm/Label.h>
Private Header <Xm/LabelP.h>
Class Hierarchy Core:: XmPrimitive:: XmLabel

Description

The Label is a widget that displays either a compound string or a pixmap. It is also the superclass for a number of widgets, like the PushButton. It has a number of resources defined explicitly to support features found in the subclasses. Many of these are not enabled when using the Label widget.

There is a corresponding Label Gadget(Under Construction).


Resources

Name Class Type Default Access
XmNaccelerator XmCAccelerator XmStringXmUNSPECIFIED CSG
XmNacceleratorText XmCAcceleratorText XmStringXmUNSPECIFIED CSG
XmNalignment XmCAlignment unsigned charXmALIGNMENT_CENTER CSG
XmNfontList XmCFontList XmRFontlistXmUNSPECIFIED CSG
XmNlabelInsensitivePixmap XmCLabelInsensitivePixmap XmRPixmapXmUNSPECIFIED_PIXMAP CSG
XmNlabelPixmap XmCLabelPixmap XmRPixmapXmUNSPECIFIED_PIXMAP CSG
XmNlabelString XmCLabelString XmStringXmUNSPECIFIED CSG
XmNlabelType XmCLabelType XmRLabelTypeXmSTRING CSG
XmNmarginBottom XmCMarginBottom XmRDimension0 CSG
XmNmarginHeight XmCMarginHeight XmRDimension2 CSG
XmNmarginLeft XmCMarginLeft XmRDimension0 CSG
XmNmarginRight XmCMarginRight XmRDimension0 CSG
XmNmarginTop XmCMarginTop XmRDimension0 CSG
XmNmarginWidth XmCMarginWidth XmRDimension2 CSG
XmNmnemonicCharSet XmCMnemonicCharSet XmStringXmFONTLIST_DEFAULT_TAG CSG
XmNrecomputeSize XmCRecomputeSize XmRBooleanTrue CSG
XmNstringDirection XmCStringDirection XmStringDirectionNULL CSG
XmNtraversalOn XmCTraversalOn BooleanFalse CSG
XmNhighlightOnEnter XmCHighlightOnEnter BooleanFalse CSG

XmNaccelerator
This resource is defined for use by XmLabel subclasses, and cannot be used by an XmLabel widget. When defined for a PushButton or ToggleButton subclass in a PopUp or PullDown menu pane, it specifies the accelerator that activates the button.

XmNacceleratorText
Specifies the text displayed for an accelerator.

XmNalignment
Specifies the type of automatic positioning of the string or pixmap along the horizontal axis. Possible values are: WARNING: the meaning of XmALIGNMENT_BEGINNING and XmALIGNMENT_END depend on the value of the XmNstringDirection resource.

XmNfontList
Specifies the font used to display the string when XmNlabelType is XmSTRING.

XmNlabelInsensitivePixmap
Specifies the pixmap to display when XmNsensitive is False and XmNlabelType is XmPIXMAP.

XmNlabelPixmap
Specifies the pixmap to display when XmNlabelType is XmPIXMAP.

XmNlabelString
Specifies the compound string to display when XmNlabelType is XmSTRING. If this resource is undefined and XmNlabelType is XmSTRING, XmNlabelString is set to the widget name.

XmNlabelType
Determines whether to display the string specified by XmNlabelString or the pixmap specified by XmNlabelPixmap. Valid values are:

XmNmarginBottom
Under Construction

XmNmarginHeight
Under Construction

XmNmarginLeft
Under Construction

XmNmarginRight
Under Construction

XmNmarginTop
Under Construction

XmNmnemonic
Specifies an X KeySym that can be used by XmLabel subclasses as an alternate means of activating the widget. The first character in the XmNlabelString resource that matches the XmNmnemonic(using the XmNmnemonicCharSet) exactly is underlined. If XmNmnemonic does not match any of the characters, no characters are underlined. Under Construction

XmNmnemonicCharSet
Specifies the Character Set used when the XmNmnemonic resource is defined.

XmNrecomputeSize
Specifies whether the widget will attempt to change its size based on the size of its contents. If True, the widget attempts to resize itself to the smallest size that can enclose the string or pixmap. Otherwise, no attempt is made to resize the widget on its own.

XmNstringDirection
Specifies the direction to draw the string when XmNlabelType is XmSTRING. Valid values are: If this resource is not specified, its value depends on the parent widget's type. If the parent widget is a manager, like BulletinBoard or RowColumn, the resource value is inherited from the parent. Otherwise it is set to XmSTRING_DIRECTION_L_TO_R.

Callbacks

Callback Resources

The Label widget does not define the any new callback resources.

Callback Structure

The Label widget defines no callbacks, so there is no structure to define.


Inherited Resources

XmLabel inherits resources from the following widget classes:

Actions

ProcessDrag()

Help()

MenuTraverseLeft()

MenuTraverseRight()

MenuTraverseUp()

MenuTraverseDown()

MenuEscape()


Translations

<EnterWindow>: Enter()
<LeaveWindow>: Leave()
<Btn2Down>: ProcessDrag()
<Key>osfActivate: PrimitiveParentActivate()
<Key>osfCancel: PrimitiveParentCancel()
<Key>osfHelp: Help()
<Key>Return: PrimtiveParentActivate()

Public Functions

Under Construction
Widget XmCreateLabel(Widget Parent,char *Name,Arg *arglist,Cardinal count);

Boolean XmIsLabel(Widget w);


Usage

Under Construction Creation Using XmCreateLabel convenience function:
Widget label = XmCreateLabel(parent, "Less is Mo", NULL, 0);
XtManageChild(label);
Creation Using XtVaCreateManagedWidget:
Widget label = XtVaCreateManagedWidget(
"Less is Mo", 
xmLabelWidgetClass, 
parent,
NULL);

See Also

Core, XmPrimitive,
Go Back to Index
Go Back to Main Index
Last Update:Fri 8 Dec 08:36:11 1995