1XmScreen(library call) XmScreen(library call)
2
3
4
6 XmScreen — The Screen widget class
7
9 #include <Xm/Screen.h>
10
12 The XmScreen object is used by Motif widgets to store information that
13 is specific to a screen. It also allows the toolkit to store certain
14 information on widget hierarchies that would otherwise be unavailable.
15 Each client has one XmScreen object for each screen that it accesses.
16
17 An XmScreen object is automatically created when the application cre‐
18 ates the first shell on a screen (usually accomplished by a call to
19 XtAppInitialize or XtAppCreateShell). It is not necessary to create an
20 XmScreen object by any other means. An application can use the func‐
21 tion XmGetXmScreen to obtain the widget ID of the XmScreen object for a
22 given screen.
23
24 An application cannot supply initial values for XmScreen resources as
25 arguments to a call to any function that creates widgets. The applica‐
26 tion or user can supply initial values in a resource file. After cre‐
27 ating the first shell on the screen, the application can use XmGetXm‐
28 Screen to obtain the widget ID of the XmScreen object and then call
29 XtSetValues to set the XmScreen resources.
30
31 Classes
32 Screen inherits behavior and resources from Core.
33
34 The class pointer is xmScreenClass.
35
36 The class name is XmScreen.
37
38 New Resources
39 The following table defines a set of widget resources used by the pro‐
40 grammer to specify data. The programmer can also set the resource val‐
41 ues for the inherited classes to set attributes for this widget. To
42 reference a resource by name or by class in an .Xdefaults file, remove
43 the XmN or XmC prefix and use the remaining letters. To specify one of
44 the defined values for a resource in an .Xdefaults file, remove the Xm
45 prefix and use the remaining letters (in either lowercase or uppercase,
46 but include any underscores between words). The codes in the access
47 column indicate if the given resource can be set at creation time (C),
48 set by using XtSetValues (S), retrieved by using XtGetValues (G), or is
49 not applicable (N/A).
50
51 ┌─────────────────────────────────────────────────────────────────────────────────────────────────────────┐
52 │ │ XmScreen Resource│Set │ │ │
53 │Name │ Class │ Type │ Default │ Access │
54 ├────────────────────────────┼─────────────────────────────┼───────────────┼─────────────────────┼────────┤
55 │XmNbitmapConversionModel │ XmCBitmapConversionModel │ XtEnum │ XmPIXMAP │ CSG?? │
56 ├────────────────────────────┼─────────────────────────────┼───────────────┼─────────────────────┼────────┤
57 │XmNcolorAllocationProc │ XmCColorAllocationProc │ XtProc │ NULL │ CSG?? │
58 ├────────────────────────────┼─────────────────────────────┼───────────────┼─────────────────────┼────────┤
59 │XmNcolorCalculationProc │ XmCColorCalculationProc │ XtProc │ NULL │ CSG?? │
60 ├────────────────────────────┼─────────────────────────────┼───────────────┼─────────────────────┼────────┤
61 │XmNdarkThreshold │ XmCDarkThreshold │ int │ dynamic │ C │
62 ├────────────────────────────┼─────────────────────────────┼───────────────┼─────────────────────┼────────┤
63 │XmNdefaultCopyCursorIcon │ XmCDefaultCopyCursorIcon │ Widget │ NULL │ CSG │
64 ├────────────────────────────┼─────────────────────────────┼───────────────┼─────────────────────┼────────┤
65 │XmNdefaultInvalidCursorIcon │ XmCDefaultInvalidCursorIcon │ Widget │ NULL │ CSG │
66 ├────────────────────────────┼─────────────────────────────┼───────────────┼─────────────────────┼────────┤
67 │XmNdefaultLinkCursorIcon │ XmCDefaultLinkCursorIcon │ Widget │ NULL │ CSG │
68 ├────────────────────────────┼─────────────────────────────┼───────────────┼─────────────────────┼────────┤
69 │XmNdefaultMoveCursorIcon │ XmCDefaultMoveCursorIcon │ Widget │ NULL │ CSG │
70 ├────────────────────────────┼─────────────────────────────┼───────────────┼─────────────────────┼────────┤
71 │XmNdefaultNoneCursorIcon │ XmCDefaultNoneCursorIcon │ Widget │ NULL │ CSG │
72 ├────────────────────────────┼─────────────────────────────┼───────────────┼─────────────────────┼────────┤
73 │XmNdefaultSourceCursorIcon │ XmCDefaultSourceCursorIcon │ Widget │ NULL │ CSG │
74 ├────────────────────────────┼─────────────────────────────┼───────────────┼─────────────────────┼────────┤
75 │XmNdefaultValidCursorIcon │ XmCDefaultValidCursorIcon │ Widget │ NULL │ CSG │
76 ├────────────────────────────┼─────────────────────────────┼───────────────┼─────────────────────┼────────┤
77 │XmNfont │ XmCFont │ XFontStruct * │ NULL │ CSG │
78 ├────────────────────────────┼─────────────────────────────┼───────────────┼─────────────────────┼────────┤
79 │XmNforegroundThreshold │ XmCForegroundThreshold │ int │ dynamic │ C │
80 ├────────────────────────────┼─────────────────────────────┼───────────────┼─────────────────────┼────────┤
81 │XmNhorizontalFontUnit │ XmCHorizontalFontUnit │ int │ dynamic │ CSG │
82 ├────────────────────────────┼─────────────────────────────┼───────────────┼─────────────────────┼────────┤
83 │XmNinsensitiveStippleBitmap │ XmCinsensitiveStippleBitmap │ Bitmap │ "50_foreground" │ CSG │
84 ├────────────────────────────┼─────────────────────────────┼───────────────┼─────────────────────┼────────┤
85 │XmNlightThreshold │ XmCLightThreshold │ int │ dynamic │ C │
86 ├────────────────────────────┼─────────────────────────────┼───────────────┼─────────────────────┼────────┤
87 │XmNmenuCursor │ XmCCursor │ Cursor │ arrow │ C │
88 ├────────────────────────────┼─────────────────────────────┼───────────────┼─────────────────────┼────────┤
89 │XmNmoveOpaque │ XmCMoveOpaque │ Boolean │ False │ CSG │
90 ├────────────────────────────┼─────────────────────────────┼───────────────┼─────────────────────┼────────┤
91 │XmNunpostBehavior │ XmCUnpostBehavior │ unsigned char │ XmUNPOST_AND_REPLAY │ CSG │
92 ├────────────────────────────┼─────────────────────────────┼───────────────┼─────────────────────┼────────┤
93 │XmNuseColorObject │ XmCUseColorObject │ Boolean │ False │ C │
94 ├────────────────────────────┼─────────────────────────────┼───────────────┼─────────────────────┼────────┤
95 │XmNuserData │ XmCUserData │ XtPointer │ NULL │ CSG │
96 ├────────────────────────────┼─────────────────────────────┼───────────────┼─────────────────────┼────────┤
97 │XmNverticalFontUnit │ XmCVerticalFontUnit │ int │ dynamic │ CSG │
98 ├────────────────────────────┼─────────────────────────────┼───────────────┼─────────────────────┼────────┤
99 └────────────────────────────┴─────────────────────────────┴───────────────┴─────────────────────┴────────┘
100 XmNbitmapConversionModel
101 Provides a policy for the conversion of xbm and xpm files to
102 the Pixmap type. This resource takes the following values:
103
104 XmMATCH_DEPTH
105 From a supplied xbm or xpm file, generates a con‐
106 verted pixmap file having the same depth as the
107 widget.
108
109 XmDYNAMIC_DEPTH
110 Converts an input xbm file to a Pixmap of depth 1,
111 or converts an input xpm file to a Pixmap having
112 the same depth as the widget.
113
114 XmNcolorAllocationProc
115 Identifies the procedure to be used for color allocation.
116 Normally, this procedure is an application-defined color
117 allocation procedure. However, if no application-defined
118 color allocation procedure is set, the system uses Motif's
119 predefined color allocation procedure.
120
121 XmNcolorCalculationProc
122 Identifies the procedure to be used for per-widget color cal‐
123 culation. Normally, this procedure is an application-defined
124 color calculation procedure. However, if no application-
125 defined color calculation procedure is set, the system uses
126 Motif's predefined color calculation procedure.
127
128 XmNdarkThreshold
129 An integer between 0 (zero) and 100, inclusive, that speci‐
130 fies a level of perceived brightness for a color. If the per‐
131 ceived brightness of the background color is below this
132 level, Motif treats the background as "dark" when computing
133 default shadow and select colors. If this resource is speci‐
134 fied for a particular screen, it applies to widgets created
135 on that screen; otherwise it applies to widgets created on
136 all screens. The default value is implementation specific.
137
138 XmNdefaultCopyCursorIcon
139 Specifies the DragIcon used during a drag operation when the
140 operation is a copy and no other pixmap is specified by the
141 application. If this resource is NULL, a system default icon
142 is used. The system default icon is determined by the Dis‐
143 play resource XmNenableDragIcon.
144
145 XmNdefaultInvalidCursorIcon
146 Specifies the DragIcon used to indicate that the cursor is
147 over an invalid drop site during a drag operation when no
148 other pixmap symbol is specified by the application. If this
149 resource is NULL, a system default icon is used. The system
150 default icon is determined by the Display resource XmNenable‐
151 DragIcon.
152
153 XmNdefaultLinkCursorIcon
154 Specifies the DragIcon used during a drag operation when the
155 operation is a link and no other pixmap is specified by the
156 application. If this resource is NULL, a system default icon
157 is used. The system default icon is determined by the Dis‐
158 play resource XmNenableDragIcon.
159
160 XmNdefaultMoveCursorIcon
161 Specifies the DragIcon used during a drag operation when the
162 operation is a move and no other pixmap is specified by the
163 application. If this resource is NULL, a system default icon
164 is used. The system default icon is determined by the Dis‐
165 play resource XmNenableDragIcon.
166
167 XmNdefaultNoneCursorIcon
168 Specifies the DragIcon used to indicate that the cursor is
169 not over a drop site during a drag operation when no other
170 pixmap is specified by the application. If this resource is
171 NULL, a system default icon is used. The system default icon
172 is determined by the Display resource XmNenableDragIcon.
173
174 XmNdefaultSourceCursorIcon
175 Specifies the depth-1 pixmap used as a cursor when an XmN‐
176 sourceCursorIcon is not provided by the DragContext, or it is
177 not usable. If this resource is NULL, a system default icon
178 is used. The system default icon is determined by the Dis‐
179 play resource XmNenableDragIcon.
180
181 XmNdefaultValidCursorIcon
182 Specifies the DragIcon used to indicate that the cursor is
183 over a valid drop site during a drag operation when no other
184 pixmap is specified by the application. If this resource is
185 NULL, a system default icon is used. The system default icon
186 is determined by the Display resource XmNenableDragIcon.
187
188 XmNfont Specifies a font for use in computing values for XmNhorizon‐
189 talFontUnit and XmNverticalFontUnit. When an application is
190 initialized, this resource can be supplied in a resource file
191 or through the standard command line options -fn, -font, and
192 -xrm. Note that this resource is used only for the calcula‐
193 tion of the font unit values. To specify a font to be used to
194 display text, use a widget's render table resource (XmNren‐
195 derTable).
196
197 XmNforegroundThreshold
198 An integer between 0 (zero) and 100, inclusive, that speci‐
199 fies a level of perceived brightness for a color. If the per‐
200 ceived brightness of the background color is equal to or
201 below this level, Motif treats the background as "dark" when
202 computing the default foreground and highlight colors. If the
203 perceived brightness of the background color is above this
204 level, Motif treats the background as "light" when computing
205 the default foreground and highlight colors. When the back‐
206 ground is "dark," the default foreground and highlight is
207 white; when the background is "light," the default foreground
208 and highlight is black. If this resource is specified for a
209 particular screen, it applies to widgets created on that
210 screen; otherwise, it applies to widgets created on all
211 screens. The default value is implementation specific.
212
213 XmNhorizontalFontUnit
214 Specifies the horizontal component of the font units used by
215 XmConvertUnits, and is used to interpret the values of geome‐
216 try resources when the XmNshellUnitType resource of Vendor‐
217 Shell or the XmNunitType resource of Gadget, Manager, or
218 Primitive has the value Xm100TH_FONT_UNITS. If no initial
219 value is supplied for this resource, the default is computed
220 from the font specified in XmNfont. If no initial value is
221 supplied for this resource or for XmNfont, the default is 10.
222
223 If a call to XtSetValues specifies a value for XmNhorizontal‐
224 FontUnit, this resource is set to that value. If a call to
225 XtSetValues specifies a value for XmNfont but not for XmNhor‐
226 izontalFontUnit, this resource is set to a value computed
227 from the new XmNfont.
228
229 A horizontal font unit is derived from a font as follows:
230
231 · If the font has an AVERAGE_WIDTH property, the horizon‐
232 tal font unit is the AVERAGE_WIDTH property divided by
233 10.
234
235 · If the font has no AVERAGE_WIDTH property but has a
236 QUAD_WIDTH property, the horizontal font unit is the
237 QUAD_WIDTH property.
238
239 · If the font has no AVERAGE_WIDTH or QUAD_WIDTH prop‐
240 erty, the horizontal font unit is the sum of the font
241 structure's min_bounds.width and max_bounds.width
242 divided by 2.3.
243
244 XmNinsensitiveStippleBitmap
245 Provides widgets with the bitmap to use when generating the
246 insensitive visual. This bitmap is to be used as the stipple
247 for the rendering of insensitive visuals.
248
249 XmNlightThreshold
250 An integer between 0 (zero) and 100, inclusive, that speci‐
251 fies a level of perceived brightness for a color. If the per‐
252 ceived brightness of the background color is above this
253 level, Motif treats the background as "light" when computing
254 default shadow and select colors. If this resource is speci‐
255 fied for a particular screen, it applies to widgets created
256 on that screen; otherwise, it applies to widgets created on
257 all screens. The default value is implementation specific.
258
259 XmNmenuCursor
260 Sets a variable that controls the cursor used whenever this
261 application posts a menu. This resource can be specified only
262 once at application startup time, either by placing it within
263 a defaults file or by using the -xrm command line argument.
264 For example:
265
266 myProg -xrm "*menuCursor: arrow"
267
268 The menu cursor can also be selected in the program through
269 the function XmSetMenuCursor. The following list shows
270 acceptable cursor names. If the application does not specify
271 a cursor or if an invalid name is supplied, the default cur‐
272 sor (an arrow pointing up and to the right) is used.
273
274 X_cursor leftbutton
275
276 arrow ll_angle
277
278 based_arrow_down
279 lr_angle
280
281 based_arrow_up
282 man
283
284 boat middlebutton
285
286 bogosity mouse
287
288 bottom_left_corner
289 pencil
290
291 bottom_right_corner
292 pirate
293
294 bottom_side
295 plus
296
297 bottom_tee
298 question_arrow
299
300 box_spiral
301 right_ptr
302
303 center_ptr
304 right_side
305
306 circle right_tee
307
308 clock rightbutton
309
310 coffee_mug
311 rtl_logo
312
313 cross sailboat
314
315 cross_reverse
316 sb_down_arrow
317
318 crosshair sb_h_double_arrow
319
320 diamond_cross
321 sb_left_arrow
322
323 dot sb_right_arrow
324
325 dotbox sb_up_arrow
326
327 double_arrow
328 sb_v_double_arrow
329
330 draft_large
331 shuttle
332
333 draft_small
334 sizing
335
336 draped_box
337 spider
338
339 exchange spraycan
340
341 fleur star
342
343 gobbler target
344
345 gumby tcross
346
347 hand1 top_left_arrow
348
349 hand2 top_left_corner
350
351 heart top_right_corner
352
353 icon top_side
354
355 iron_cross
356 left_ptr
357
358 left_side top_tee
359
360 left_tee trek
361
362 ul_angle umbrella
363
364 ur_angle watch
365
366 xterm
367
368 XmNmoveOpaque
369 Specifies whether an interactive operation that moves a win‐
370 dow, such as tearing off and dragging a tear-off menu or mov‐
371 ing a window in MWM, displays an outline of the window or a
372 representation of the window itself during the move. If the
373 value is True, the operation displays a representation of the
374 window during the move. If the value is False, the operation
375 displays an outline of the window.
376
377 XmNunpostBehavior
378 Specifies the behavior of an active menu posted in traversal
379 mode when a subsequent menu button selection is made outside
380 the posted menu. When the value is XmUNPOST_AND_REPLAY, the
381 resource unposts the menu hierarchy and causes the server to
382 replay the event to the window in which the pointer is
383 located. When the value is XmUNPOST, the resource unposts the
384 hierarchy without replaying the event.
385
386 XmNuseColorObject
387 Enables and disables the sharing of colors between widgets,
388 and the dynamic changing of colors. A value of False disables
389 this, and a value of True enables it.
390
391 XmNuserData
392 Allows the application to attach any necessary specific data
393 to the widget. This is an internally unused resource.
394
395 XmNverticalFontUnit
396 Specifies the vertical component of the font units used by
397 XmConvertUnits and used to interpret the values of geometry
398 resources when the XmNshellUnitType resource of VendorShell
399 or the XmNunitType resource of Gadget, Manager, or Primitive
400 has the value Xm100TH_FONT_UNITS. If no initial value is
401 supplied for this resource, the default is computed from the
402 font specified in XmNfont. If no initial value is supplied
403 for this resource or for XmNfont, the default is 10.
404
405 If a call to XtSetValues specifies a value for XmNvertical‐
406 FontUnit, this resource is set to that value. If a call to
407 XtSetValues specifies a value for XmNfont but not for XmNver‐
408 ticalFontUnit, this resource is set to a value computed from
409 the new XmNfont.
410
411 A vertical font unit is derived from a font as follows:
412
413 · If the font has a PIXEL_SIZE property, the vertical
414 font unit is the PIXEL_SIZE property divided by 1.8.
415
416 · If the font has no PIXEL_SIZE property but has
417 POINT_SIZE and RESOLUTION_Y properties, the vertical
418 font unit is the product of the POINT_SIZE and RESOLU‐
419 TION_Y properties divided by 1400.
420
421 · If the font has no PIXEL_SIZE, POINT_SIZE, or RESOLU‐
422 TION_Y properties, the vertical font unit is the sum of
423 the font structure's max_bounds.ascent and
424 max_bounds.descent divided by 2.2.
425
426 Inherited Resources
427 All of the superclass resources inherited by XmScreen are designated
428 N/A (not applicable).
429
431 Core(3), XmDisplay(3), XmGetXmScreen(3), and XmSetMenuCursor(3),
432
433
434
435 XmScreen(library call)