SHELL RESOURCES(3W) — OLIT
DESCRIPTION
Resources for Shell Class Widgets
These are resources that are common to all widget classes that are subclasses of Shell. They are described here to avoid repeating their descriptions for each shell widget. Note:
The behavior described for many of these resources assume the OPEN LOOK window manager for the X Window System is being used.
Bases Window and Popup Windows
All OPEN LOOK base windows are created using one of the routines: OlInitialize() or XtCreateApplicationShell(). OPEN LOOK pop-up windows (the PopupWindow, Menu, and Notice widgets) are created using XtCreatePopupShell(). An application may define other pop-up windows that can be created using XtCreatePopupShell().
The following resources are typical of base windows and generic pop-up windows, but not all are available for the pop-up windows defined in this toolkit. See the list of resources for the PopupWindow, Menu, and Notice widgets to see which are available. The Access column in this table identifies the access for base windows only.
Table 1 Pop Up and Base Window Resource Set Pop-up and Base Window Resource Set Name Type Access
XtNallowShellResize Boolean SGI XtNcreatePopupChildProc XtCreatePopupChildProc SGI
XtNgeometry String GI
XtNheightInc int SGI
XtNinitialState int GI
XtNinput Boolean G
XtNmaxAspectX Position SGI
XtNmaxAspectY Position SGI
XtNmaxHeight Dimension SGI
XtNmaxWidth Dimension SGI
XtNminAspectX Position SGI
XtNminAspectY Position SGI
XtNminHeight Dimension SGI
XtNminWidth Dimension SGI
XtNoverrideRedirect Boolean SGI
XtNpopdownCallback XtCallbackList SI
XtNpopupCallback XtCallbackList SI
XtNsaveUnder Boolean SGI Pop-up and Base Window Resource Set (cont.)
(Base Window)
Name Type Access
XtNtitle String SGI
XtNtransient Boolean SGI
XtNwaitForWm Boolean G
XtNwidthInc int SGI XtNwindowGroup Window SGI
XtNwmTimeou int G
In addition to the resources listed above, OPEN LOOK base windows have the following resources:
Table 2 Base Window Resource Set Base Window Shell Resource Set
Name Type Access XtNfocusWidge Widget SG
XtNiconic Boolean GI
XtNiconMask Pixmap SGI
XtNiconName String SGI
XtNiconPixmap Pixmap SGI
XtNiconWindow Window SGI
XtNiconX Position GI
XtNiconY Position GI XtNallowShellResize
Range of Values:
TRUE
FALSE
This resource controls whether the shell widget is allowed to resize itself in response to a geometry request from its child. If set to TRUE, it will attempt to resize itself as requested by the child. The attempt may be refused by the window manager, which will cause the shell widget to refuse the geometry management request of its child. Otherwise, it accepts the request. If the XtNallowShellResize request is set to FALSE, the shell widget will immediately refuse the geometry management request. XtNcreatePopupChildProc
This resource defines a pointer to a single function (not a callback list) that is called during the process of popping up the shell widget. It is called after the XtNpopupCallback callbacks are issued but before the shell widget is realized and mapped. The function is passed a single argument, the ID of the shell widget.
XtNfocusWidget
Default value: (Widget)() Default value: (Widget)()
This resource determines which widget gets input focus when a window is selected by a user. If not initialized by the programmer, it defaults to the first created widget among its descendants capable of accepting input focus. Whenever the user selects a field that can accept input focus, this resource is automatically updated to reference the selected widget. XtNgeometry
Range of Values:
(any syntactically correct argument to the XParseGeometry() function).
This resource can be used to specify the size and position of the shell widget when it pops up. XtNheightInc
XtNwidthInc
Range of Values:
0 ≤ XtNheightInc
0 ≤ XtNwidthInc
These resources define an arithmetic progression of sizes, from XtNminHeight and XtNminWidth to XtNmaxHeight and XtNmaxWidth, into which the shell widget prefers to be resized by the window manager. XtNiconic
Range of Values:
TRUE
FALSE
This resource provides an equivalent method of setting the XtNinitialState resource to IconicState. XtNiconMask
This resource defines an image that specifies which pixels of the XtNiconPixmap resource should be used for the base window’s icon. This image must be a single plane pixmap. XtNiconName
This resource defines a name that the window manager will display in the shell widget’s icon. If the XtNtitle resource is not defined or is NULL, this resource is used instead. If this resource is NULL, the name of the application is used in its place.
XtNiconPixmap
This resource defines the image to be used as the base window’s icon. It must be a single plane pixmap. XtNiconWindow
Range of Values:
(ID of any existing window)
This resource defines the ID of a window that the window manager should use for the base window’s icon, in place of XtNiconPixmap. The XtNiconWindow takes precedence over the XtNiconPixmap resource. XtNiconX
XtNiconY
Range of Values:
-1 ≤ XtNiconX
-1 ≤ XtNiconY
These resources define the location where the base window’s icon should appear. If the value of one of these resources is -1, the window manager automatically picks a value, according to its icon placement requirements. XtNinitialState
Range of Values:
NormalState/"1"
IconicState/"3"
This resource defines how the base window (and associated pop-up windows) appears when the application starts up.
NormalStateWhen set to this value, the application starts up with its base window open.
IconicStateWhen set to this value, the application starts up with its base window closed into an icon.
Note:
Other values are defined by the X Window System for this resource, but the OPEN LOOK window manager recognizes only the iconic and normal states. XtNinput
This resource controls the type of input focus behavior of the application. This resource should not be set by an application.
XtNmaxAspectX
XtNmaxAspectY
XtNminAspectX
XtNminAspectY
Range of Values:
-1 = XtNmaxAspectX, 1 ≤ XtNmaxAspectX
-1 = XtNmaxAspectY, 1 ≤ XtNmaxAspectY
-1 = XtNminAspectX, 1 ≤ XtNminAspectX
-1 = XtNminAspectY, 1 ≤ XtNminAspectY
XtNminAspectX over XtNminAspectY ≤ XtNmaxAspectX over XtNmaxAspectY
These resources define the range of aspect ratios allowed for the size of the shell widget’s window. Assuming the width and height of the window are given by width and height, the following relation shows how the window size is constrained:
XtNminAspectX over XtNminAspectY ≤ width over height ≤ XtNmaxAspectX over XtNmaxAspectY
If the end user tries to resize the window to a narrower or wider aspect ratio than allowed by these resources, the window manager adjusts the window to the closest allowed aspect ratio. If possible, it will do this by increasing the width or height to compensate. The XtNmaxHeight and XtNmaxWidth resources may force the window manager to reduce the width or height instead.
If the values of these resources are -1, the window manager does not constrain the size of the window to any aspect ratio.
Note:
An application should either set all values to -1 (the default) or should set all to a positive value. An application should never set a value of zero to any of these resources.
XtNmaxHeight
XtNmaxWidth
XtNminHeight
XtNminWidth
Range of Values:
XtNminHeight ≤ XtNmaxHeight
XtNminWidth ≤ XtNmaxWidth
(or OL_IGNORE for any of these resources)
(or OL_IGNORE for any of these resources)
These resources define the range allowed for the size of the shell widget’s window. If the end user tries to resize the window smaller or larger than these values allow, the window manager adjusts the width and/or height to compensate.
The default value of OL_IGNORE keeps the window manager from The default value of OL_IGNORE keeps the window manager from constraining the window’s size.
XtNoverrideRedirect
Range of Values:
TRUE
FALSE
This resource controls whether the shell widget’s window is managed by the window manager. Since this OPEN LOOK toolkit is designed to have a certain pop-up window behavior, this resource should not be set by an application for the shell widgets defined in this toolkit (Menu, Notice, and PopupWindow). XtNpopdownCallback
This resource defines callbacks automatically issued right after the shell widget’s window has been unmapped (i.e. popped down.) XtNpopupCallback
This resource defines callbacks automatically issued right before the shell widget is realized and mapped (i.e. popped up.) XtNsaveUnder
Range of Values:
TRUE
FALSE
This resource directs the shell widget to instruct the server to attempt to save the contents of windows obscured by the shell when it is mapped, and to restore the contents when the shell widget is unmapped. XtNtitle
This resource gives the title to include in the header of the base or pop-up window. Widgets of other classes besides Shell may have a resource with the same name. XtNtransient
Range of Values:
TRUE
FALSE
This resource controls whether the shell widget’s window is "transient" and is to be unmapped when the associated base window is iconified (see XtNwindowGroup). Since this OPEN LOOK toolkit is designed to have a certain pop-up window behavior, this resource should not be set by an application for the shell widgets defined in this toolkit (Menu, Notice, and PopupWindow). XtNwaitForWm
This resource should not be set by an application.
XtNwindowGroup
Range of Values:
(ID of any existing window)
This resource identifies the base window associated with this shell widget’s window. When the end user closes the base window, all its associated windows are unmapped (pop-up windows or other shell widget windows with XtNtransient set to TRUE) or closed (base windows with XtNtransient set to FALSE). XtNwmTimeout
This resource should not be set by an application.
Sun Release 4.1 — Last change: 1/8/90