XmScreen(Xm) 6 January 1993 XmScreen(Xm) Name XmScreen - the Screen widget class Syntax #include <Xm/Screen.h> Description The XmScreen object is used by Motif widgets to store information that is specific to a screen. It also allows the toolkit to store certain infor- mation on widget hierarchies that would otherwise be unavailable. Each client has one XmScreen object for each screen that it accesses. An XmScreen object is automatically created when the application creates the first shell on a screen (usually accomplished by a call to XtAppIni- tialize or XtAppCreateShell). It is not necessary to create an XmScreen object by any other means. An application can use the function XmGetXmScreen to obtain the widget ID of the XmScreen object for a given screen. An application cannot supply initial values for XmScreen resources as arguments to a call to any function that creates widgets. The applica- tion or user can supply initial values in a resource file. After creat- ing the first shell on the screen, the application can use XmGetXmScreen to obtain the widget ID of the XmScreen object and then call XtSetValues to set the XmScreen resources. Classes Screen inherits behavior and resources from Core. The class pointer is xmScreenClass. The class name is XmScreen. New resources The following table defines a set of widget resources used by the pro- grammer to specify data. The programmer can also set the resource values for the inherited classes to set attributes for this widget. To refer- ence a resource by name or by class in an .Xdefaults file, remove the ``XmN'' or ``XmC'' prefix and use the remaining letters. To specify one of the defined values for a resource in an .Xdefaults file, remove the ``Xm'' 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). XmScreen resource set ____________________________________________________________________________ Name Class Type Default Access ____________________________________________________________________________ XmNdarkThreshold XmCDarkThreshold int dynamic C XmNdefaultCopy- XmCDefaultCopy- Widget NULL CSG CursorIcon CursorIcon XmNdefault- XmCDefaultInvalid- Widget NULL CSG InvalidCursorIcon CursorIcon XmNdefaultLink- XmCDefaultLink- Widget NULL CSG CursorIcon CursorIcon XmNdefaultMove- XmCDefaultMove- Widget NULL CSG CursorIcon CursorIcon XmNdefaultNone- XmCDefaultNone- Widget NULL CSG CursorIcon CursorIcon XmNdefaultSource- XmCDefaultSource- Widget NULL CSG CursorIcon CursorIcon XmNdefaultValid- XmCDefaultValid- Widget NULL CSG CursorIcon CursorIcon XmNfont XmCFont XFontStruct * NULL CSG XmNforeground- XmCForeground- int dynamic C Threshold Threshold XmNhorizontal- XmCHorizontal- int dynamic CSG FontUnit FontUnit XmNlightThreshold XmCLightThreshold int dynamic C XmNmenuCursor XmCCursor String arrow C XmNmoveOpaque XmCMoveOpaque Boolean False CSG XmNunpostBehavior XmCUnpostBehavior unsigned char XmUNPOST_- CSG AND_REPLAY XmNvertical- XmCVerticalFontUnit int dynamic CSG FontUnit XmNdarkThreshold An integer between 0 and 100, inclusive, that specifies a level of perceived brightness for a color. If the perceived brightness of the background color is below this level, Motif treats the background as ``dark'' when computing default shadow and select colors. If this resource is specified for a particular screen, it applies to widgets created on that screen; otherwise it applies to widgets created on all screens. The default value is implementation specific. XmNdefaultCopyCursorIcon Specifies the DragIcon used during a drag operation when the operation is a copy and no other pixmap is specified by the application. If NULL, a system default icon is used. XmNdefaultInvalidCursorIcon Specifies the DragIcon used to indicate that the cursor is over an invalid drop site during a drag operation when no other pixmap symbol is specified by the application. If NULL, a system default icon is used. XmNdefaultLinkCursorIcon Specifies the DragIcon used during a drag operation when the operation is a link and no other pixmap is specified by the application. If NULL, a system default icon is used. XmNdefaultMoveCursorIcon Specifies the DragIcon used during a drag operation when the operation is a move and no other pixmap is specified by the application. If NULL, a system default icon is used. XmNdefaultNoneCursorIcon Specifies the DragIcon used to indicate that the cursor is not over a drop site during a drag operation when no other pixmap is specified by the application. If NULL, a system default icon is used. XmNdefaultSourceCursorIcon Specifies the depth-1 pixmap used as a cursor when an XmN- sourceCursorIcon is not provided by the DragContext, or it is not usable. If NULL, a system default icon is used. XmNdefaultValidCursorIcon Specifies the DragIcon used to indicate that the cursor is over a valid drop site during a drag operation when no other pixmap is specified by the application. If NULL, a system default icon is used. XmNfont Specifies a font for use in computing values for XmNhorizontal- FontUnit and XmNverticalFontUnit. When an application is ini- tialized, this resource can be supplied in a resource file or through the standard command line options -fn, -font, and -xrm. XmNforegroundThreshold An integer between 0 and 100, inclusive, that specifies a level of perceived brightness for a color. If the perceived brightness of the background color is equal to or below this level, Motif treats the background as ``dark'' when computing the default foreground and highlight colors. If the perceived brightness of the background color is above this level, Motif treats the back- ground as ``light'' when computing the default foreground and highlight colors. When the background is ``dark'', the default foreground and highlight is white; when the background is ``light'', the default foreground and highlight is black. If this resource is specified for a particular screen, it applies to widgets created on that screen; otherwise, it applies to widgets created on all screens. The default value is implementation spe- cific. XmNhorizontalFontUnit Specifies the horizontal component of the font units used by XmConvertUnits, and is used to interpret the values of geometry resources when the XmNshellUnitType resource of VendorShell or the XmNunitType resource of Gadget, Manager, or Primitive has the value Xm100THFONTUNITS. If no initial value is supplied for this resource, the default is computed from the font specified in XmNfont. If no initial value is supplied for this resource or for XmNfont, the default is 10. If a call to XtSetValues specifies a value for XmNhorizontal- FontUnit, this resource is set to that value. If a call to XtSetValues specifies a value for XmNfont but not for XmNhorizon- talFontUnit, this resource is set to a value computed from the new XmNfont. A horizontal font unit is derived from a font as follows: + If the font has an AVERAGEWIDTH property, the horizontal font unit is the AVERAGEWIDTH property divided by 10. + If the font has no AVERAGEWIDTH property but has a QUADWIDTH property, the horizontal font unit is the QUADWIDTH property. + If the font has no AVERAGEWIDTH or QUADWIDTH property, the horizontal font unit is the sum of the font structure's minbounds.width and maxbounds.width divided by 2.3. XmNlightThreshold An integer between 0 and 100, inclusive, that specifies a level of perceived brightness for a color. If the perceived brightness of the background color is above this level, Motif treats the background as ``light'' when computing default shadow and select colors. If this resource is specified for a particular screen, it applies to widgets created on that screen; otherwise, it applies to widgets created on all screens. The default value is implementation specific. XmNmenuCursor Sets a variable that controls the cursor used whenever this application posts a menu. This resource can be specified only once at application startup time, either by placing it within a defaults file or by using the -xrm command line argument. For example myProg -xrm "*menuCursor: arrow" The menu cursor can also be selected in the program through the function XmSetMenuCursor. The following is a list of acceptable cursor names. If the application does not specify a cursor or if an invalid name is supplied, the default cursor (an arrow point- ing up and to the right) is used. X_cursor dotbox man sizing arrow double_arrow middlebutton spider based_arrow_down draft_large mouse spraycan based_arrow_up draft_small pencil star boat draped_box pirate target bogosity exchange plus tcross bottom_left- fleur question_arrow top_left_arrow _corner bottom_right- gobbler right_ptr top_left_corner _corner bottom_side gumby right_side top_right_corner bottom_tee hand1 right_tee top_side box_spiral hand2 rightbutton top_tee center_ptr heart rtl_logo trek circle icon sailboat ul_angle clock iron_cross sb_down_arrow umbrella coffee_mug left_ptr sb_h_double_arrow ur_angle cross left_side sb_left_arrow watch cross_reverse left_tee sb_right_arrow xterm crosshair leftbutton sb_up_arrow diamond_cross ll_angle sb_v_double_arrow dot lr_angle shuttle XmNmoveOpaque Specifies whether an interactive operation that moves a window, such as tearing off and dragging a tear-off menu or moving a window in MWM, displays an outline of the window or a representation of the window itself during the move. If the value is True, the operation displays a representation of the window during the move. If the value is False, the operation displays an outline of the window. XmNunpostBehavior Specifies the behavior of an active menu posted in traversal mode when a subsequent menu button selection is made outside the posted menu. When the value is XmUNPOSTANDREPLAY, the resource unposts the menu hierarchy and causes the server to replay the event to the window in which the pointer is located. When the value is XmUNPOST, the resource unposts the hierarchy without replaying the event. XmNverticalFontUnit Specifies the vertical component of the font units used by XmConver- tUnits and used to interpret the values of geometry resources when the XmNshellUnitType resource of VendorShell or the XmNunitType resource of Gadget, Manager, or Primitive has the value Xm100THFONTUNITS. If no initial value is supplied for this resource, the default is computed from the font specified in XmNfont. If no initial value is supplied for this resource or for XmNfont, the default is 10. If a call to XtSetValues specifies a value for XmNverticalFontUnit, this resource is set to that value. If a call to XtSetValues speci- fies a value for XmNfont but not for XmNverticalFontUnit, this resource is set to a value computed from the new XmNfont. A vertical font unit is derived from a font as follows: + If the font has a PIXELSIZE property, the vertical font unit is the PIXELSIZE property divided by 1.8. + If the font has no PIXELSIZE property but has POINTSIZE and RESOLUTIONY properties, the vertical font unit is the product of the POINTSIZE and RESOLUTIONY properties divided by 1400. + If the font has no PIXELSIZE, POINTSIZE, or RESOLUTIONY pro- perties, the vertical font unit is the sum of the font structure's maxbounds.ascent and maxbounds.descent divided by 2.2. Inherited resources All of the superclass resources inherited by XmScreen are designated N/A (not applicable). See also Core(Xm), XmDisplay(Xm) and XmGetXmScreen(Xm).