The String widget class
Format
#include <Exm/String.h>
DESCRIPTION
ExmString is a demonstration widget. OSF provides this widget solely to teach programmers how to write their own Motif widgets. OSF does not support this widget in any way.
The source code for the ExmString widget illustrates how to do the following:
ExmString is similar to the standard Motif toolkit widget XmLabel. The major difference between ExmString and XmLabel is that XmLabel can display either text or a pixmap, but ExmString can display only text.
ExmString is an instantiable widget and is also used as a superclass for other widgets, such as ExmCommandButton, ExmStringTransfer, and ExmMenuButton.
The ExmString widget receives enter and leave events, but it does not accept any button or key input.
The help callback is the only callback defined.
The text displayed by ExmString is a noneditable compound string. The ExmNcompoundString resource holds the value of this compound string. (See the Motif Programmer's Guide for more information on compound strings.) The text can be multilingual, multiline, and/or multifont. When an ExmString is insensitive, its text is stippled.
Unlike XmLabel, ExmString does not support accelerators or mnemonics.
ExmString forces the XmNtraversalOn resource to False.
ExmString inherits behavior and resources from Core, XmPrimitive, and ExmSimple.
The class pointer is exmStringWidgetClass.
The class name is ExmString.
The following table defines a set of widget resources used by the programmer to specify data. The programmer can also set the resource values for the inherited classes to set attributes for this widget. To reference a resource by name or by class in a .Xdefaults file, remove the XmN, ExmN, XmC or ExmC prefix and use the remaining letters. To specify one of the defined values for a resource in a .Xdefaults file, remove the Xm or Exm prefix and use the remaining letters (in either lowercase or uppercase, but include any underscores between words). The codes in the "Access" column indicate if the given resource can be set at creation time (C), set by using XtSetValues (S), retrieved by using XtGetValues (G), or is not applicable (N/A).
ExmString Resource Set | ||||
Name | Class | Type | Default | Access |
ExmNcompoundString | ExmCCompoundString | XmString | NULL | CSG |
XmNalignment | XmCAlignment | unsigned char | XmALIGNMENT_CENTER | CSG |
XmNrecomputeSize | XmCRecomputeSize | Boolean | True | CSG |
XmNrenderTable | XmCRenderTable | XmRenderTable | dynamic | CSG |
The preceding descriptions for text are correct when XmNstringDirection is XmSTRING_DIRECTION_L_TO_R. When that resource is XmSTRING_DIRECTION_R_TO_L, the descriptions for XmALIGNMENT_BEGINNING and XmALIGNMENT_END are switched.
ExmString inherits behavior and resources from the following superclasses. For a complete description of each resource, refer to the reference page for that superclass.
ExmSimple Resource Set | ||||
Name | Class | Type | Default | Access |
ExmNsimpleShape | ExmCSimpleShape | unsigned char | ExmSHAPE_OVAL | CSG |
XmNmarginHeight | XmCMarginHeight | Dimension | 4 | CSG |
XmNmarginWidth | XmCMarginWidth | Dimension | 4 | CSG |
XmPrimitive Resource Set | ||||
Name | Class | Type | Default | Access |
XmNbottomShadowColor | XmCBottomShadowColor | Pixel | dynamic | CSG |
XmNbottomShadowPixmap | XmCBottomShadowPixmap | Pixmap | XmUNSPECIFIED_PIXMAP | CSG |
XmNconvertCallback | XmCCallback | XtCallbackList | NULL | C |
XmNforeground | XmCForeground | Pixel | dynamic | CSG |
XmNhelpCallback | XmCCallback | XtCallbackList | NULL | C |
XmNhighlightColor | XmCHighlightColor | Pixel | dynamic | CSG |
XmNhighlightOnEnter | XmCHighlightOnEnter | Boolean | False | CSG |
XmNhighlightPixmap | XmCHighlightPixmap | Pixmap | dynamic | CSG |
XmNhighlightThickness | XmCHighlightThickness | Dimension | 2 | CSG |
XmNlayoutDirection | XmCLayoutDirection | XmDirection | dynamic | CG |
XmNnavigationType | XmCNavigationType | XmNavigationType | XmNONE | CSG |
XmNpopupHandlerCallback | XmCCallback | XtCallbackList | NULL | C |
XmNshadowThickness | XmCShadowThickness | Dimension | 2 | CSG |
XmNtopShadowColor | XmCTopShadowColor | Pixel | dynamic | CSG |
XmNtopShadowPixmap | XmCTopShadowPixmap | Pixmap | dynamic | CSG |
XmNtraversalOn | XmCTraversalOn | Boolean | False | CSG |
XmNunitType | XmCUnitType | unsigned char | dynamic | CSG |
XmNuserData | XmCUserData | XtPointer | NULL | CSG |
Core Resource Set | ||||
Name | Class | Type | Default | Access |
XmNaccelerators | XmCAccelerators | XtAccelerators | dynamic | CSG |
XmNancestorSensitive | XmCSensitive | Boolean | dynamic | G |
XmNbackground | XmCBackground | Pixel | dynamic | CSG |
XmNbackgroundPixmap | XmCPixmap | Pixmap | XmUNSPECIFIED_PIXMAP | CSG |
XmNborderColor | XmCBorderColor | Pixel | XtDefaultForeground | CSG |
XmNborderPixmap | XmCPixmap | Pixmap | XmUNSPECIFIED_PIXMAP | CSG |
XmNborderWidth | XmCBorderWidth | Dimension | 0 | CSG |
XmNcolormap | XmCColormap | Colormap | dynamic | CG |
XmNdepth | XmCDepth | int | dynamic | CG |
XmNdestroyCallback | XmCCallback | XtCallbackList | NULL | C |
XmNheight | XmCHeight | Dimension | dynamic | CSG |
XmNinitialResourcesPersistent | XmCInitialResourcesPersistent | Boolean | True | C |
XmNmappedWhenManaged | XmCMappedWhenManaged | Boolean | True | CSG |
XmNscreen | XmCScreen | Screen * | dynamic | CG |
XmNsensitive | XmCSensitive | Boolean | True | CSG |
XmNtranslations | XmCTranslations | XtTranslations | dynamic | CSG |
XmNwidth | XmCWidth | Dimension | dynamic | CSG |
XmNx | XmCPosition | Position | 0 | CSG |
XmNy | XmCPosition | Position | 0 | CSG |
ExmString inherits all the translations of XmPrimitive. ExmString does not provide any additional translations beyond those defined by XmPrimitive.
ExmString provides no action routines of its own.
RELATED
Core(3), ExmCommandButton(3), ExmMenuButton(3), ExmSimple(3), and XmPrimitive(3).