1XmLabelGadget(library call) XmLabelGadget(library call)
2
3
4
6 XmLabelGadget — The LabelGadget widget class
7
9 #include <Xm/LabelG.h>
10
12 LabelGadget is an instantiable widget and is also used as a superclass
13 for other button gadgets, such as PushButtonGadget and ToggleButtonGad‐
14 get.
15
16 LabelGadget can contain either text or a pixmap. LabelGadget text is a
17 compound string. Refer to the Motif Programmer's Guide for more infor‐
18 mation on compound strings. The text can be multilingual, multiline,
19 and/or multifont. When a LabelGadget is insensitive, its text is stip‐
20 pled, or the user-supplied insensitive pixmap is displayed.
21
22 LabelGadget supports both accelerators and mnemonics primarily for use
23 in LabelGadget subclass widgets that are contained in menus. Mnemonics
24 are available in a menu system when the button is visible. Accelerators
25 in a menu system are accessible even when the button is not visible.
26 The LabelGadget displays the mnemonic by underlining the first matching
27 character in the text string. The accelerator is displayed as a text
28 string adjacent to the label text or pixmap, depending on the layout
29 direction.
30
31 LabelGadget consists of many margin fields surrounding the text or
32 pixmap. These margin fields are resources that may be set by the user,
33 but LabelGadget subclasses and Manager parents also modify some of
34 these fields. They tend to modify the XmNmarginLeft, XmNmarginRight,
35 XmNmarginTop, and XmNmarginBottom resources and leave the XmNmargin‐
36 Width and XmNmarginHeight resources as set by the application.
37
38 LabelGadget takes into account XmNshadowThickness in determining its
39 layout but does not draw the shadow. That is, if XmNshadowThickness is
40 greater than 0 (zero), LabelGadget leaves space for the shadow, but the
41 shadow does not appear.
42
43 In a LabelGadget, XmNtraversalOn and XmNhighlightOnEnter are forced to
44 False inside Popup menu panes, Pulldown menu panes, and OptionMenus.
45 Otherwise these resources default to False.
46
47 LabelGadget uses the XmQTmenuSystem and XmQTspecifyRenderTable traits,
48 and holds the XmQTaccessTextual, XmQTcareParentVisual, XmQTmenuSavvy,
49 and XmQTtransfer traits.
50
51 Data Transfer Behavior
52 LabelGadget and it subclasses, except when used in a menu system, sup‐
53 port dragging of the label contents from the LabelGadget. However, the
54 label contents are draggable only if the XmNenableUnselectableDrag
55 resource of XmDisplay is set to True.
56
57 As a source of data, LabelGadget and its subclasses support the follow‐
58 ing targets and associated conversions of data to these targets:
59
60 locale If the locale target matches the widget's locale, the widget
61 transfers XmNlabelString in the encoding of the locale. This
62 target is supported only when XmNlabelType is XmSTRING or
63 XmPIXMAP_AND_STRING.
64
65 COMPOUND_TEXT
66 The widget transfers XmNlabelString as type COMPOUND_TEXT.
67 This target is supported only when XmNlabelType is XmSTRING
68 or XmPIXMAP_AND_STRING.
69
70 UTF8_STRING
71 The widget transfers XmNlabelString as type UTF8_STRING.
72 This target is supported only when XmNlabelType is XmSTRING
73 of XmPIXMAP_AND_STRING.
74
75 PIXMAP The widget transfers XmNlabelPixmap as type DRAWABLE. This
76 target is supported when XmNlabelType is XmPIXMAP or
77 XmPIXMAP_AND_STRING.
78
79 STRING The widget transfers XmNlabelString as type STRING. This
80 target is supported when XmNlabelType is XmSTRING or
81 XmPIXMAP_AND_STRING.
82
83 TEXT If XmNlabelString is fully convertible to the encoding of the
84 locale, the widget transfers XmNlabelString in the encoding
85 of the locale. Otherwise, the widget transfers XmNlabel‐
86 String as type COMPOUND_TEXT. This target is supported when
87 XmNlabelType is XmSTRING or XmPIXMAP_AND_STRING.
88
89 _MOTIF_CLIPBOARD_TARGETS
90 The widget transfers, as type ATOM, a list of the targets it
91 supports for the CLIPBOARD selection. When XmNlabelType is
92 XmSTRING or XmPIXMAP_AND_STRING, these include the following
93 targets:
94
95 · _MOTIF_COMPOUND_STRING
96
97 · COMPOUND_TEXT
98
99 · UTF8_STRING
100
101 · The encoding of the locale, if XmNlabelString is fully
102 convertible to the encoding of the locale
103
104 · STRING, if XmNlabelString is fully convertible to
105 STRING
106
107 When XmNlabelType is XmPIXMAP or XmPIXMAP_AND_STRING, the
108 targets include PIXMAP.
109
110 _MOTIF_COMPOUND_STRING
111 The widget transfers XmNlabelString as a compound string in
112 Byte Stream format. This target is supported when XmNlabel‐
113 Type is XmSTRING or XmPIXMAP_AND_STRING.
114
115 _MOTIF_EXPORT_TARGETS
116 The widget transfers, as type ATOM, a list of the targets to
117 be used as the value of the DragContext's XmNexportTargets in
118 a drag-and-drop transfer. When XmNlabelType is XmSTRING or
119 XmPIXMAP_AND_STRING, these include _MOTIF_COMPOUND_STRING,
120 COMPOUND_TEXT, UTF8_STRING, the encoding of the locale,
121 STRING, TEXT, BACKGROUND, and FOREGROUND. When XmNlabelType
122 is XmPIXMAP or XmPIXMAP_AND_STRING, these include PIXMAP,
123 BACKGROUND, and FOREGROUND.
124
125 As a source of data, LabelGadget also supports the following standard
126 Motif targets:
127
128 BACKGROUND
129 The widget transfers the parent's XmNbackground as type
130 PIXEL.
131
132 CLASS The widget finds the first shell in the widget hierarchy that
133 has a WM_CLASS property and transfers the contents as text in
134 the current locale.
135
136 CLIENT_WINDOW
137 The widget finds the first shell in the widget hierarchy and
138 transfers its window as type WINDOW.
139
140 COLORMAP The widget transfers the parent's XmNcolormap as type COL‐
141 ORMAP.
142
143 FOREGROUND
144 The widget transfers the parent's XmNforeground as type
145 PIXEL.
146
147 NAME The widget finds the first shell in the widget hierarchy that
148 has a WM_NAME property and transfers the contents as text in
149 the current locale.
150
151 TARGETS The widget transfers, as type ATOM, a list of the targets it
152 supports. These include the standard targets in this list.
153 When XmNlabelType is XmSTRING or XmPIXMAP_AND_STRING, these
154 also include _MOTIF_COMPOUND_STRING, COMPOUND_TEXT,
155 UTF8_STRING, the encoding of the locale, STRING, and TEXT.
156 When XmNlabelType is XmPIXMAP or XmPIXMAP_AND_STRING, these
157 also include PIXMAP.
158
159 TIMESTAMP The widget transfers the timestamp used to acquire the selec‐
160 tion as type INTEGER.
161
162 _MOTIF_RENDER_TABLE
163 The widget transfers XmNrenderTable if it exists, or else the
164 default text render table, as type STRING.
165
166 _MOTIF_ENCODING_REGISTRY
167 The widget transfers its encoding registry as type STRING.
168 The value is a list of NULL separated items in the form of
169 tag encoding pairs. This target symbolizes the transfer tar‐
170 get for the Motif Segment Encoding Registry. Widgets and
171 applications can use this Registry to register text encoding
172 formats for specified render table tags. Applications access
173 this Registry by calling XmRegisterSegmentEncoding and
174 XmMapSegmentEncoding.
175
176 Classes
177 LabelGadget inherits behavior, resources, and traits from Object, Rec‐
178 tObj and XmGadget.
179
180 The class pointer is xmLabelGadgetClass.
181
182 The class name is XmLabelGadget.
183
184 New Resources
185 The following table defines a set of widget resources used by the pro‐
186 grammer to specify data. The programmer can also set the resource val‐
187 ues for the inherited classes to set attributes for this widget. To
188 reference a resource by name or by class in a .Xdefaults file, remove
189 the XmN or XmC prefix and use the remaining letters. To specify one of
190 the defined values for a resource in a .Xdefaults file, remove the Xm
191 prefix and use the remaining letters (in either lowercase or uppercase,
192 but include any underscores between words). The codes in the access
193 column indicate if the given resource can be set at creation time (C),
194 set by using XtSetValues (S), retrieved by using XtGetValues (G), or is
195 not applicable (N/A).
196
197 ┌──────────────────────────────────────────────────────────────────────────────────────────────────────────┐
198 │ │ XmLabelGadget R│esource Set │ │ │
199 │Name │ Class │ Type │ Default │ Access │
200 ├──────────────────────────┼───────────────────────────┼───────────────────┼──────────────────────┼────────┤
201 │XmNaccelerator │ XmCAccelerator │ String │ NULL │ CSG │
202 ├──────────────────────────┼───────────────────────────┼───────────────────┼──────────────────────┼────────┤
203 │XmNacceleratorText │ XmCAcceleratorText │ XmString │ NULL │ CSG │
204 ├──────────────────────────┼───────────────────────────┼───────────────────┼──────────────────────┼────────┤
205 │XmNalignment │ XmCAlignment │ unsigned char │ dynamic │ CSG │
206 ├──────────────────────────┼───────────────────────────┼───────────────────┼──────────────────────┼────────┤
207 │XmNfontList │ XmCFontList │ XmFontList │ dynamic │ CSG │
208 ├──────────────────────────┼───────────────────────────┼───────────────────┼──────────────────────┼────────┤
209 │XmNlabelInsensitivePixmap │ XmCLabelInsensitivePixmap │ Pixmap │ XmUNSPECIFIED_PIXMAP │ CSG │
210 ├──────────────────────────┼───────────────────────────┼───────────────────┼──────────────────────┼────────┤
211 │XmNlabelPixmap │ XmCLabelPixmap │ Pixmap │ XmUNSPECIFIED_PIXMAP │ CSG │
212 ├──────────────────────────┼───────────────────────────┼───────────────────┼──────────────────────┼────────┤
213 │XmNlabelString │ XmCXmString │ XmString │ dynamic │ CSG │
214 ├──────────────────────────┼───────────────────────────┼───────────────────┼──────────────────────┼────────┤
215 │XmNlabelType │ XmCLabelType │ unsigned char │ XmSTRING │ CSG │
216 ├──────────────────────────┼───────────────────────────┼───────────────────┼──────────────────────┼────────┤
217 │XmNmarginBottom │ XmCMarginBottom │ Dimension │ 0 │ CSG │
218 ├──────────────────────────┼───────────────────────────┼───────────────────┼──────────────────────┼────────┤
219 │XmNmarginHeight │ XmCMarginHeight │ Dimension │ 2 │ CSG │
220 ├──────────────────────────┼───────────────────────────┼───────────────────┼──────────────────────┼────────┤
221 │XmNmarginLeft │ XmCMarginLeft │ Dimension │ 0 │ CSG │
222 ├──────────────────────────┼───────────────────────────┼───────────────────┼──────────────────────┼────────┤
223 │XmNmarginRight │ XmCMarginRight │ Dimension │ 0 │ CSG │
224 ├──────────────────────────┼───────────────────────────┼───────────────────┼──────────────────────┼────────┤
225 │XmNmarginTop │ XmCMarginTop │ Dimension │ 0 │ CSG │
226 ├──────────────────────────┼───────────────────────────┼───────────────────┼──────────────────────┼────────┤
227 │XmNmarginWidth │ XmCMarginWidth │ Dimension │ 2 │ CSG │
228 ├──────────────────────────┼───────────────────────────┼───────────────────┼──────────────────────┼────────┤
229 │XmNmnemonic │ XmCMnemonic │ KeySym │ NULL │ CSG │
230 ├──────────────────────────┼───────────────────────────┼───────────────────┼──────────────────────┼────────┤
231 │XmNmnemonicCharSet │ XmCMnemonicCharSet │ String │ dynamic │ CSG │
232 ├──────────────────────────┼───────────────────────────┼───────────────────┼──────────────────────┼────────┤
233 │XmNpixmapPlacement │ XmCPixmapPlacement │ unsigned int │ XmPIXMAP_LEFT │ CSG │
234 ├──────────────────────────┼───────────────────────────┼───────────────────┼──────────────────────┼────────┤
235 │XmNpixmapTextPadding │ XmCSpace │ Dimension │ 2 │ CSG │
236 ├──────────────────────────┼───────────────────────────┼───────────────────┼──────────────────────┼────────┤
237 │XmNrecomputeSize │ XmCRecomputeSize │ Boolean │ True │ CSG │
238 ├──────────────────────────┼───────────────────────────┼───────────────────┼──────────────────────┼────────┤
239 │XmNrenderTable │ XmCRenderTable │ XmRenderTable │ dynamic │ CSG │
240 ├──────────────────────────┼───────────────────────────┼───────────────────┼──────────────────────┼────────┤
241 │XmNstringDirection │ XmCStringDirection │ XmStringDirection │ dynamic │ CSG │
242 ├──────────────────────────┼───────────────────────────┼───────────────────┼──────────────────────┼────────┤
243 └──────────────────────────┴───────────────────────────┴───────────────────┴──────────────────────┴────────┘
244 XmNaccelerator
245 Sets the accelerator on a button widget in a menu, which
246 activates a visible or invisible, but managed, button from
247 the keyboard. This resource is a string that describes a set
248 of modifiers and the key that may be used to select the but‐
249 ton. The format of this string is identical to that used by
250 the translations manager, with the exception that only a sin‐
251 gle event may be specified and only KeyPress events are
252 allowed.
253
254 Accelerators for buttons are supported only for PushButton‐
255 Gadgets and ToggleButtonGadgets in Pulldown and Popup menus.
256
257 XmNacceleratorText
258 Specifies the text displayed for the accelerator. The text
259 is displayed adjacent to the label string or pixmap. The
260 direction of its layout depends on the XmNlayoutDirection
261 resource of the widget. Accelerator text for buttons is dis‐
262 played only for PushButtonGadgets and ToggleButtonGadgets in
263 Pulldown and Popup Menus.
264
265 XmNalignment
266 Specifies the label alignment for text or pixmap.
267
268 XmALIGNMENT_BEGINNING (left alignment)
269 Causes the left sides of the lines of text to be
270 vertically aligned with the left edge of the gad‐
271 get. For a pixmap, its left side is vertically
272 aligned with the left edge of the gadget.
273
274 XmALIGNMENT_CENTER (center alignment)
275 Causes the centers of the lines of text to be ver‐
276 tically aligned in the center of the gadget. For a
277 pixmap, its center is vertically aligned with the
278 center of the gadget.
279
280 XmALIGNMENT_END (right alignment)
281 Causes the right sides of the lines of text to be
282 vertically aligned with the right edge of the gad‐
283 get. For a pixmap, its right side is vertically
284 aligned with the right edge of the gadget.
285
286 The preceding descriptions for text are correct when XmNlay‐
287 outDirection is XmLEFT_TO_RIGHT. When that resource is
288 XmRIGHT_TO_LEFT, the descriptions for XmALIGNMENT_BEGINNING
289 and XmALIGNMENT_END are switched.
290
291 If the parent is a RowColumn whose XmNisAligned resource is
292 True, XmNalignment is forced to the same value as the RowCol‐
293 umn's XmNentryAlignment if the RowColumn's XmNrowColumnType
294 is XmWORK_AREA or if the gadget is a subclass of XmLabelGad‐
295 get. Otherwise, the default is XmALIGNMENT_CENTER.
296
297 XmNfontList
298 Specifies the font of the text used in the gadget. XmN‐
299 fontList is obsolete and exists for compatibility with previ‐
300 ous releases. You should now use XmNrenderTable instead of
301 XmNfontList. If both are specified, the render table will
302 take precedence. If XmNfontList is NULL at initialization,
303 the parent hierarchy of the widget is searched for an ances‐
304 tor that is a subclass of the XmBulletinBoard, VendorShell,
305 or XmMenuShell widget class. If such an ancestor is found,
306 the font list is initialized to the XmNbuttonFontList (for
307 button gadget subclasses) or XmNlabelFontList of the ancestor
308 widget. If no such ancestor is found, the default is imple‐
309 mentation dependent. Refer to XmFontList(3) for more informa‐
310 tion on the creation and structure of a font list.
311
312 XmNlabelInsensitivePixmap
313 Specifies a pixmap used as the button face if XmNlabelType is
314 XmPIXMAP or XmPIXMAP_AND_STRING and the button is insensi‐
315 tive. The default value, XmUNSPECIFIED_PIXMAP, displays an
316 empty label.
317
318 XmNlabelPixmap
319 Specifies the pixmap when XmNlabelType is XmPIXMAP or
320 XmPIXMAP_AND_STRING. The default value, XmUNSPECI‐
321 FIED_PIXMAP, displays an empty label.
322
323 XmNlabelString
324 Specifies the compound string when XmNlabelType is XmSTRING
325 or XmPIXMAP_AND_STRING. If the value of this resource is
326 NULL, it is initialized to name of the gadget converted to a
327 compound string. Refer to XmString(3) for more information
328 on the creation and the structure of compound strings.
329
330 XmNlabelType
331 Specifies the label type.
332
333 XmSTRING Text displays XmNlabelString
334
335 XmPIXMAP Icon data in pixmap displays XmNlabelPixmap or XmN‐
336 labelInsensitivePixmap XmPIXMAP_AND_STRING Icon
337 data in pixmap displays XmNlabelPixmap or XmNla‐
338 belInsensitivePixmap and text displays XmNlabel‐
339 String
340
341 XmNmarginBottom
342 Specifies the amount of spacing between the bottom of the
343 label text and the top of the bottom margin specified by XmN‐
344 marginHeight. This may be modified by LabelGadget's sub‐
345 classes. For example, CascadeButtonGadget may increase this
346 field to make room for the cascade pixmap.
347
348 XmNmarginHeight
349 Specifies an equal amount of spacing above the margin defined
350 by XmNmarginTop and below the margin defined by XmNmarginBot‐
351 tom. XmNmarginHeight specifies the amount of spacing between
352 the top edge of the margin set by XmNmarginTop and the bottom
353 edge of the top shadow, and the amount of spacing between the
354 bottom edge of the margin specified by XmNmarginBottom and
355 the top edge of the bottom shadow.
356
357 XmNmarginLeft
358 Specifies the amount of spacing between the left edge of the
359 label text and the right side of the left margin (specified
360 by XmNmarginWidth). This may be modified by LabelGadget's
361 subclasses. For example, ToggleButtonGadget may increase
362 this field to make room for the toggle indicator and for
363 spacing between the indicator and label. Whether this actu‐
364 ally applies to the left or right side of the label depends
365 on the value of XmNlayoutDirection.
366
367 XmNmarginRight
368 Specifies the amount of spacing between the right edge of the
369 label text and the left side of the right margin (specified
370 by XmNmarginWidth). This may be modified by LabelGadget's
371 subclasses. For example, CascadeButtonGadget may increase
372 this field to make room for the cascade pixmap. Whether this
373 actually applies to the left or right side of the label
374 depends on the value of XmNlayoutDirection.
375
376 XmNmarginTop
377 Specifies the amount of spacing between the top of the label
378 text and the bottom of the top margin specified by XmNmargin‐
379 Height. This may be modified by LabelGadget's subclasses.
380 For example, CascadeButtonGadget may increase this field to
381 make room for the cascade pixmap.
382
383 XmNmarginWidth
384 Specifies an equal amount of spacing to the left of the mar‐
385 gin defined by XmNmarginLeft and to the right of the margin
386 defined by XmNmarginRight. XmNmarginWidth specifies the
387 amount of spacing between the left edge of the margin set by
388 XmNmarginLeft and the right edge of the left shadow, and the
389 amount of spacing between the right edge of the margin speci‐
390 fied by XmNmarginRight and the left edge of the right shadow.
391
392 XmNmnemonic
393 Provides the user with an alternate means of activating a
394 button. A button in a MenuBar, a Popup menu pane, or a Pull‐
395 down menu pane can have a mnemonic.
396
397 This resource contains a keysym as listed in the X11 keysym
398 table. The first character in the label string that exactly
399 matches the mnemonic in the character set specified in XmNm‐
400 nemonicCharSet is underlined when the button is displayed.
401
402 When a mnemonic has been specified, the user activates the
403 button by pressing the mnemonic key while the button is visi‐
404 ble. If the button is a CascadeButtonGadget in a MenuBar and
405 the MenuBar does not have the focus, the user must use the
406 MAlt modifier while pressing the mnemonic. The user can
407 activate the button by pressing either the shifted or the
408 unshifted mnemonic key.
409
410 XmNmnemonicCharSet
411 Specifies the character set of the mnemonic for the label.
412 The default is XmFONTLIST_DEFAULT_TAG.
413
414 XmNpixmapPlacement
415 The location of the pixmap with respect to the text label.
416 This resource can take one of the following values:
417 XmPIXMAP_TOP, XmPIXMAP_BOTTOM, XmPIXMAP_LEFT, and
418 XmPIXMAP_RIGHT. A type converter has been registered that
419 converts the following strings: "top", "bottom", "left", and
420 "right".
421
422 XmNpixmapTextPadding
423 The amount of space to be left between the pixmap and the
424 label string.
425
426 XmNrecomputeSize
427 Specifies a Boolean value that indicates whether the gadget
428 shrinks or expands to accommodate its contents (label string
429 or pixmap) as a result of an XtSetValues resource value that
430 would change the size of the gadget. If True, the gadget
431 shrinks or expands to exactly fit the label string or pixmap.
432 If False, the gadget never attempts to change size on its
433 own.
434
435 XmNrenderTable
436 Specifies the render table associated with the labelString.
437 If this value is NULL at initialization, Label searches its
438 parent hierarchy for an ancestor that holds the XmQTspeci‐
439 fyRenderTable trait. If such an ancestor is found, Label
440 initializes XmNrenderTable to the XmLABEL_RENDER_TABLE value
441 of the ancestor widget. Similarly, button subclasses of Label
442 initialize XmNrenderTable to the XmBUTTON_RENDER_TABLE value
443 of the ancestor widget. (Note that all current subclasses of
444 Label are button subclasses.) If no such ancestor is found,
445 the default is implementation dependent. If a font list and a
446 render table are both specified, the render table will take
447 precedence. Refer to XmRenderTable(3) for more information on
448 the creation and structure of a render table.
449
450 XmNstringDirection
451 Is a synthetic resource for setting XmNlayoutDirection. The
452 values for this resource are XmSTRING_DIRECTION_L_TO_R and
453 XmSTRING_DIRECTION_R_TO_L. Refer to the XmNlayoutDirection
454 resource description. The XmNstringDirection resource is
455 obsoleted by XmNlayoutDirection, but is kept here for back‐
456 ward compatibility.
457
458 Inherited Resources
459 LabelGadget inherits behavior and resources from the superclasses
460 described in the following tables. For a complete description of each
461 resource, refer to the reference page for that superclass.
462
463 ┌─────────────────────────────────────────────────────────────────────────────────────────────────┐
464 │ │ XmGadget │Resource Set │ │ │
465 │Name │ Class │ Type │ Default │ Access │
466 ├──────────────────────┼───────────────────────┼──────────────────┼──────────────────────┼────────┤
467 │XmNbackground │ XmCBackground │ Pixel │ dynamic │ CSG │
468 ├──────────────────────┼───────────────────────┼──────────────────┼──────────────────────┼────────┤
469 │XmNbackgroundPixmap │ XmCPixmap │ Pixmap │ XmUNSPECIFIED_PIXMAP │ CSG │
470 ├──────────────────────┼───────────────────────┼──────────────────┼──────────────────────┼────────┤
471 │XmNbottomShadowColor │ XmCBottomShadowColor │ Pixel │ dynamic │ CSG │
472 ├──────────────────────┼───────────────────────┼──────────────────┼──────────────────────┼────────┤
473 │XmNbottomShadowPixmap │ XmCBottomShadowPixmap │ Pixmap │ dynamic │ CSG │
474 ├──────────────────────┼───────────────────────┼──────────────────┼──────────────────────┼────────┤
475 │XmNhelpCallback │ XmCCallback │ XtCallbackList │ NULL │ C │
476 ├──────────────────────┼───────────────────────┼──────────────────┼──────────────────────┼────────┤
477 │XmNforeground │ XmCForeground │ Pixel │ dynamic │ CSG │
478 ├──────────────────────┼───────────────────────┼──────────────────┼──────────────────────┼────────┤
479 │XmNhighlightColor │ XmCHighlightColor │ Pixel │ dynamic │ CSG │
480 ├──────────────────────┼───────────────────────┼──────────────────┼──────────────────────┼────────┤
481 │XmNhighlightOnEnter │ XmCHighlightOnEnter │ Boolean │ False │ CSG │
482 ├──────────────────────┼───────────────────────┼──────────────────┼──────────────────────┼────────┤
483 │XmNhighlightPixmap │ XmCHighlightPixmap │ Pixmap │ dynamic │ CSG │
484 ├──────────────────────┼───────────────────────┼──────────────────┼──────────────────────┼────────┤
485 │XmNhighlightThickness │ XmCHighlightThickness │ Dimension │ 0 │ CSG │
486 ├──────────────────────┼───────────────────────┼──────────────────┼──────────────────────┼────────┤
487 │XmNlayoutDirection │ XmNCLayoutDirection │ XmDirection │ dynamic │ CG │
488 ├──────────────────────┼───────────────────────┼──────────────────┼──────────────────────┼────────┤
489 │XmNnavigationType │ XmCNavigationType │ XmNavigationType │ XmNONE │ CSG │
490 ├──────────────────────┼───────────────────────┼──────────────────┼──────────────────────┼────────┤
491 │XmNshadowThickness │ XmCShadowThickness │ Dimension │ 0 │ CSG │
492 ├──────────────────────┼───────────────────────┼──────────────────┼──────────────────────┼────────┤
493 │XmNtopShadowColor │ XmCTopShadowColor │ Pixel │ dynamic │ CSG │
494 ├──────────────────────┼───────────────────────┼──────────────────┼──────────────────────┼────────┤
495 │XmNtopShadowPixmap │ XmCTopShadowPixmap │ Pixmap │ dynamic │ CSG │
496 ├──────────────────────┼───────────────────────┼──────────────────┼──────────────────────┼────────┤
497 │XmNtraversalOn │ XmCTraversalOn │ Boolean │ False │ CSG │
498 ├──────────────────────┼───────────────────────┼──────────────────┼──────────────────────┼────────┤
499 │XmNunitType │ XmCUnitType │ unsigned char │ dynamic │ CSG │
500 ├──────────────────────┼───────────────────────┼──────────────────┼──────────────────────┼────────┤
501 │XmNuserData │ XmCUserData │ XtPointer │ NULL │ CSG │
502 ├──────────────────────┼───────────────────────┼──────────────────┼──────────────────────┼────────┤
503 └──────────────────────┴───────────────────────┴──────────────────┴──────────────────────┴────────┘
504 ┌─────────────────────────────────────────────────────────────────────┐
505 │ │ RectObj Resour│ce Set │ │ │
506 │Name │ Class │ Type │ Default │ Access │
507 ├─────────────────────┼────────────────┼───────────┼─────────┼────────┤
508 │XmNancestorSensitive │ XmCSensitive │ Boolean │ dynamic │ G │
509 ├─────────────────────┼────────────────┼───────────┼─────────┼────────┤
510 │XmNborderWidth │ XmCBorderWidth │ Dimension │ 0 │ N/A │
511 ├─────────────────────┼────────────────┼───────────┼─────────┼────────┤
512 │XmNheight │ XmCHeight │ Dimension │ dynamic │ CSG │
513 ├─────────────────────┼────────────────┼───────────┼─────────┼────────┤
514 │XmNsensitive │ XmCSensitive │ Boolean │ True │ CSG │
515 ├─────────────────────┼────────────────┼───────────┼─────────┼────────┤
516 │XmNwidth │ XmCWidth │ Dimension │ dynamic │ CSG │
517 ├─────────────────────┼────────────────┼───────────┼─────────┼────────┤
518 │XmNx │ XmCPosition │ Position │ 0 │ CSG │
519 ├─────────────────────┼────────────────┼───────────┼─────────┼────────┤
520 │XmNy │ XmCPosition │ Position │ 0 │ CSG │
521 ├─────────────────────┼────────────────┼───────────┼─────────┼────────┤
522 └─────────────────────┴────────────────┴───────────┴─────────┴────────┘
523 ┌─────────────────────────────────────────────────────────────────────┐
524 │ │ Object Re│source Set │ │ │
525 │Name │ Class │ Type │ Default │ Access │
526 ├───────────────────┼─────────────┼────────────────┼─────────┼────────┤
527 │XmNdestroyCallback │ XmCCallback │ XtCallbackList │ NULL │ C │
528 ├───────────────────┼─────────────┼────────────────┼─────────┼────────┤
529 └───────────────────┴─────────────┴────────────────┴─────────┴────────┘
530 Behavior
531 XmLabelGadget includes behavior from XmGadget. Additional XmLabelGad‐
532 get behavior is described in the following list:
533
534 <Btn2Down>:
535 Drags the contents of a LabelGadget, identified when BTrans‐
536 fer is pressed. This action is undefined for LabelGadgets
537 used in a menu system.
538
539 <Key><osfHelp>:
540 In a Popup or Pulldown MenuPane, unposts all menus in the
541 menu hierarchy and, when the shell's keyboard focus policy is
542 XmEXPLICIT, restores keyboard focus to the widget that had
543 the focus before the menu system was entered. Calls the
544 callbacks for XmNhelpCallback if any exist. If there are no
545 help callbacks for this widget, this action calls the help
546 callbacks for the nearest ancestor that has them.
547
548 <key><osfCancel>:
549 In a MenuBar, disarms the CascadeButton and the menu and,
550 when the shell's keyboard focus policy is XmEXPLICIT,
551 restores keyboard focus to the widget that had the focus
552 before the menu was entered.
553
554 In a toplevel Pulldown MenuPane from a MenuBar, unposts the
555 menu, disarms the MenuBar CascadeButton and the MenuBar, and,
556 when the shell's keyboard focus policy is XmEXPLICIT,
557 restores keyboard focus to the widget that had the focus
558 before the MenuBar was entered. In other Pulldown MenuPanes,
559 unposts the menu.
560
561 In a Popup MenuPane, unposts the menu and, when the shell's
562 keyboard focus policy is XmEXPLICIT, restores keyboard focus
563 to the widget from which the menu was posted.
564
565 <Key><osfDown>:
566 If the current menu item has a submenu and is in a MenuBar,
567 then this action posts the submenu, disarms the current menu
568 item, and arms the submenu's first traversable menu item.
569
570 If the current menu item is in a MenuPane, then this action
571 disarms the current menu item and arms the item below it.
572 This action wraps within the MenuPane. The direction of the
573 wrapping depends on the XmNlayoutDirection resource.
574
575 <Key><osfLeft>:
576 When the current menu item is in a MenuBar, then this action
577 disarms the current item and arms the MenuBar item to the
578 left. This action wraps within the MenuBar.
579
580 In MenuPanes, if the current menu item is not at the left
581 edge of a MenuPane, this action disarms the current item and
582 arms the item to its left. If the current menu item is at
583 the left edge of a submenu attached to a MenuBar item, then
584 this action unposts the submenu and traverses to the MenuBar
585 item to the left, wrapping if necessary. If that MenuBar item
586 has a submenu, it posts the submenu and arms the first tra‐
587 versable item in the submenu. If the current menu item is at
588 the left edge of a submenu not directly attached to a MenuBar
589 item, then this action unposts the current submenu only.
590
591 In Popup or Torn-off MenuPanes, when the current menu item is
592 at the left edge, this action wraps within the MenuPane. If
593 the current menu item is at the left edge of the MenuPane and
594 not in the top row, this action wraps to the rightmost menu
595 item in the row above. If the current menu item is in the
596 upper, leftmost corner, this action wraps to the tear-off
597 control, if present, or else it wraps to the bottom, right‐
598 most menu item in the MenuPane. The preceding description
599 applies when the XmNlayoutDirection horizontal direction is
600 XmLEFT_TO_RIGHT. If the XmNlayoutDirection horizontal direc‐
601 tion is XmRIGHT_TO_LEFT, then the following applies.
602
603 If the current menu item is in a MenuBar, then this action
604 disarms the current item and arms the MenuBar item to the
605 left. This action wraps within the MenuBar.
606
607 In MenuPanes, if the current menu item is a CascadeButton,
608 then this action posts its associated submenu. If the cur‐
609 rent menu item is not a CascadeButton and is not at the left
610 edge of a MenuPane, this action disarms the current item and
611 arms the item to its left, wrapping if necessary. If the
612 current menu item is not a CascadeButton and is at the left
613 edge of a submenu that is a descendent of a MenuBar, then
614 this action unposts all submenus and traverses to the MenuBar
615 item to the left. If that MenuBar item has a submenu, it
616 posts the submenu and arms the submenu's first traversable
617 item.
618
619 In Popup or Torn-off menus, if the current menu item is not a
620 CascadeButton and is at the left edge of a row (except the
621 bottom row), this action wraps to the rightmost menu item in
622 the row below. If the current menu item is not a CascadeBut‐
623 ton and is in the bottom, leftmost corner of a Popup or Pull‐
624 down MenuPane, this action wraps to the tear-off control, if
625 present, or else it wraps to the top, rightmost menu item of
626 the MenuPane.
627
628 <Key><osfRight>:
629 If the current menu item is in a MenuBar, then this action
630 disarms the current item and arms the MenuBar item to the
631 right. This action wraps within the MenuBar.
632
633 In MenuPanes, if the current menu item is a CascadeButton,
634 then this action posts its associated submenu. If the cur‐
635 rent menu item is not a CascadeButton and is not at the right
636 edge of a MenuPane, this action disarms the current item and
637 arms the item to its right, wrapping if necessary. If the
638 current menu item is not a CascadeButton and is at the right
639 edge of a submenu that is a descendent of a MenuBar, then
640 this action unposts all submenus and traverses to the MenuBar
641 item to the right. If that MenuBar item has a submenu, it
642 posts the submenu and arms the submenu's first traversable
643 item.
644
645 In Popup or Torn-off menus, if the current menu item is not a
646 CascadeButton and is at the right edge of a row (except the
647 bottom row), this action wraps to the leftmost menu item in
648 the row below. If the current menu item is not a CascadeBut‐
649 ton and is in the bottom, rightmost corner of a Popup or
650 Pulldown MenuPane, this action wraps to the tear-off control,
651 if present, or else it wraps to the top, leftmost menu item
652 of the MenuPane. The preceding description applies when the
653 XmNlayoutDirection horizontal direction is XmLEFT_TO_RIGHT.
654 If the XmNlayoutDirection horizontal direction is
655 XmRIGHT_TO_LEFT, then the following applies.
656
657 When the current menu item is in a MenuBar, then this action
658 disarms the current item and arms the MenuBar item to the
659 right. This action wraps within the MenuBar.
660
661 In MenuPanes, if the current menu item is not at the right
662 edge of a MenuPane, this action disarms the current item and
663 arms the item to its right. If the current menu item is at
664 the right edge of a submenu attached to a MenuBar item, then
665 this action unposts the submenu and traverses to the MenuBar
666 item to the right, wrapping if necessary. If that MenuBar
667 item has a submenu, it posts the submenu and arms the first
668 traversable item in the submenu. If the current menu item is
669 at the right edge of a submenu not directly attached to a
670 MenuBar item, then this action unposts the current submenu
671 only.
672
673 In Popup or Torn-off MenuPanes, when the current menu item is
674 at the right edge, this action wraps within the MenuPane. If
675 the current menu item is at the right edge of the MenuPane
676 and not in the top row, this action wraps to the leftmost
677 menu item in the row above. If the current menu item is in
678 the upper, rightmost corner, this action wraps to the tear-
679 off control, if present, or else it wraps to the bottom,
680 leftmost menu item in the MenuPane.
681
682 <Key><osfUp>:
683 When the current menu item is in a MenuPane, then this action
684 disarms the current menu item and arms the item above it.
685 This action wraps within the MenuPane. The direction of the
686 wrapping depends on the XmNlayoutDirection resource.
687
688 Virtual Bindings
689 The bindings for virtual keys are vendor specific. For information
690 about bindings for virtual buttons and keys, see VirtualBindings(3).
691
693 Object(3), RectObj(3), XmCreateLabelGadget(3), XmVaCreateLabelGad‐
694 get(3), XmVaCreateManagedLabelGadget(3), XmFontListCreate(3),
695 XmStringCreate(3), XmStringCreateLtoR(3), and XmGadget(3).
696
697
698
699 XmLabelGadget(library call)