'\" t .\" Display.sgm /main/17 1996/09/08 20:39:22 rws $ .de P! .fl \!!1 setgray .fl \\&.\" .fl \!!0 setgray .fl \" force out current output buffer \!!save /psv exch def currentpoint translate 0 0 moveto \!!/showpage{}def .fl \" prolog .sy sed -e 's/^/!/' \\$1\" bring in postscript file \!!psv restore . .de pF .ie \\*(f1 .ds f1 \\n(.f .el .ie \\*(f2 .ds f2 \\n(.f .el .ie \\*(f3 .ds f3 \\n(.f .el .ie \\*(f4 .ds f4 \\n(.f .el .tm ? font overflow .ft \\$1 .. .de fP .ie !\\*(f4 \{\ . ft \\*(f4 . ds f4\" ' br \} .el .ie !\\*(f3 \{\ . ft \\*(f3 . ds f3\" ' br \} .el .ie !\\*(f2 \{\ . ft \\*(f2 . ds f2\" ' br \} .el .ie !\\*(f1 \{\ . ft \\*(f1 . ds f1\" ' br \} .el .tm ? font underflow .. .ds f1\" .ds f2\" .ds f3\" .ds f4\" .ta 8n 16n 24n 32n 40n 48n 56n 64n 72n .TH "XmDisplay" 3 .SH "NAME" \fBXmDisplay\fP \(em The Display widget class "XmDisplay" "widget class" "XmDisplay" .SH "SYNOPSIS" .PP .nf #include .fi .SH "DESCRIPTION" .PP The XmDisplay object is used by the Motif widgets to store information that is specific to a display\&. It also allows the toolkit to access certain information on widget hierarchies that would otherwise be unavailable\&. Each client has one XmDisplay object for each display it accesses\&. .PP An XmDisplay object is automatically created when the application creates the first shell on a display (usually accomplished by a call to \fBXtAppInitialize\fP or \fBXtAppCreateShell\fP)\&. It is not necessary to create an XmDisplay object by any other means\&. An application can use the function \fBXmGetXmDisplay\fP to obtain the widget ID of the XmDisplay object for a given display\&. .PP An application cannot supply initial values for XmDisplay resources as arguments to a call to any function that creates widgets\&. The application or user can supply initial values in a resource file\&. After creating the first shell on the display, the application can use \fBXmGetXmDisplay\fP to obtain the widget ID of the XmDisplay object and then call \fBXtSetValues\fP to set the XmDisplay resources\&. .PP XmDisplay resources specify the drag protocol style for a client participating in drag and drop transactions\&. The two basic protocol types are preregister and dynamic\&. When a preregister protocol is used, the toolkit handles any communication between the initiator and receiver clients and displays the appropriate drag-over and drag-under visual effects\&. A client registers its drop sites in advance and this information is stored in a property for each top-level window\&. When the drag pointer enters a top-level window, the drop site information is read by the initiator\&. A dynamic protocol allows the source and destination clients to dynamically communicate drag and drop state information between each other, and to update their respective visuals accordingly\&. The toolkit provides drop site information as the pointer passes over any given drop site\&. In this mode, a receiver can supply a procedure to generate its own drag-under effects\&. .SS "Classes" .PP Display inherits behavior and resources from \fBCore\fP, \fBComposite\fP, \fBShell\fP, \fBWMShell\fP, \fBVendorShell\fP, \fBTopLevelShell\fP, and \fBApplicationShell\fP classes\&. .PP The class pointer is \fBxmDisplayClass\fP\&. .PP The class name is \fBXmDisplay\fP\&. .SS "New Resources" .PP 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 \fB\&.Xdefaults\fP file, remove the \fBXmN\fP or \fBXmC\fP prefix and use the remaining letters\&. To specify one of the defined values for a resource in a \fB\&.Xdefaults\fP file, remove the \fBXm\fP 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)\&. .PP .TS tab() box; c s s s s l| l| l| l| l. \fBXmDisplay Resource Set\fP \fBName\fP\fBClass\fP\fBType\fP\fBDefault\fP\fBAccess\fP _____ XmNdefaultButtonEmphasisXmCDefaultButtonEmphasisXtEnumXmEXTERNAL_HIGHLIGHTC _____ XmNdefaultVirtualBindingsXmCDefaultVirtualBindingsStringdynamicC _____ XmNdragInitiatorProtocolStyleXmCDragInitiatorProtocolStyleunsigned charXmDRAG_PREFER_RECEIVERCG _____ XmNdragReceiverProtocolStyleXmCDragReceiverProtocolStyleunsigned charXmDRAG_PREFER_DYNAMICCG _____ XmNdragStartCallbackXmCCallbackXtCallbackListNULLC _____ XmNenableBtn1TransferXmCEnableBtn1TransferXtEnumXmOFFC _____ XmNenableButtonTabXmCEnableButtonTabBooleanFalseC _____ XmNenableDragIconXmCEnableDragIconBooleanFalseC _____ XmNenableEtchedInMenuXmCEnableEtchedInMenuBooleanFalseC _____ XmNenableToggleColorXmCEnableToggleColorBooleanFalseC _____ XmNenableToggleVisualXmCEnableToggleVisualBooleanFalseC _____ XmNenableUnselectableDragXmCEnableUnselectableDragBooleanTrueC _____ XmNenableWarpXmCEnableWarpXtEnumTrueCSG _____ XmNmotifVersionXmCMotifVersionintXmVERSIONCSG _____ XmNnoFontCallbackXmCCallbackXtCallbackListNULLC _____ XmNnoRenditionCallbackXmCCallbackXtCallbackListNULLC _____ XmNuserDataXmCUserDataXtPointerNULLCSG _____ .TE .IP "\fBXmNdefaultButtonEmphasis\fP" 10 Specifies whether to change the look of the PushButton widget and gadget that have the \fBXmNshowAsDefault\fP resource set\&. When the PushButton is the default, it has an etched out button which is enclosed with another etched in border\&. The \fBXmNdefaultButtonEmphasis\fP has the follow possible values, which affect the location cursor: .RS .IP "\fBXmINTERNAL_HIGHLIGHT\fP" 10 Causes the location cursor to appear in between the two etched borders to minimize the space required\&. .IP "\fBXmEXTERNAL_HIGHLIGHT\fP" 10 Causes the PushButton to draw the location cursor outside the second border\&. .RE .IP "\fBXmNdefaultVirtualBindings\fP" 10 Specifies the default virtual bindings for the display\&. Following is an example of a specification for the \fBdefaultVirtualBindings\fP resource in a resource file: .PP .nf \f(CW*defaultVirtualBindings: \e osfBackSpace: BackSpace \en\e osfInsert: InsertChar \en\e osfDelete: DeleteChar \en\e \&.\&.\&. osfLeft: left, CtrlH\fR .fi .PP .IP "\fBXmNdragInitiatorProtocolStyle\fP" 10 Specifies the drag and drop protocol requirements or preference when the client is an initiator\&. The possible values are .RS .IP "\fBXmDRAG_PREREGISTER\fP" 10 As an initiator, this client does not use the dynamic protocol and can only arrange visual effects with receivers who provide preregistered information\&. .IP "\fBXmDRAG_DYNAMIC\fP" 10 As an initiator, this client does not make use of any preregistered drop site information made available by other clients, and can only arrange visual effects with receivers who use the dynamic protocol\&. .IP "\fBXmDRAG_NONE\fP" 10 Specifies that drag and drop is disabled for this client\&. .IP "\fBXmDRAG_DROP_ONLY\fP" 10 As an initiator, this client does not use either the preregistered drop site information or the dynamic protocol\&. It supports dragging, and any time the cursor is over a client that supports drag and drop, valid feedback is provided\&. There are no other visual effects\&. .IP "\fBXmDRAG_PREFER_DYNAMIC\fP" 10 As an initiator, this client can support both the preregister and dynamic protocols, but prefers to use dynamic protocols whenever possible in order to provide high-quality drag-under feedback\&. .IP "\fBXmDRAG_PREFER_PREREGISTER\fP" 10 As an initiator, this client can support both the preregister and dynamic protocols, but prefers to use the preregister protocol whenever possible in order to accommodate performance needs or to provide consistent drag-over feedback\&. .IP "\fBXmDRAG_PREFER_RECEIVER\fP" 10 Indicates that this client can support both preregister and dynamic protocols, but will defer to the preference of the receiver client\&. This value is valid only for the \fBXmNdragInitiatorProtocolStyle\fP resource, and is its default value\&. .RE .IP "\fBXmNdragReceiverProtocolStyle\fP" 10 Specifies the drag and drop protocol requirements or preference when this client is a receiver\&. The values are .RS .IP "\fBXmDRAG_PREREGISTER\fP" 10 As a receiver, this client preregisters drop site information and does not use the dynamic protocol\&. It can only arrange visual effects with initiators who make use of the preregistered information\&. .IP "\fBXmDRAG_DYNAMIC\fP" 10 As a receiver, this client uses the dynamic protocol and does not preregister drop site information\&. It can only arrange visual effects with initiators who use the dynamic protocol\&. .IP "\fBXmDRAG_NONE\fP" 10 Specifies that drag and drop is disabled for this client\&. .IP "\fBXmDRAG_DROP_ONLY\fP" 10 As a receiver, this client neither uses the dynamic protocol nor preregisters drop site information\&. It supports dropping, and when dragging over this client, valid feedback is always provided, but there are no other visual effects\&. .IP "\fBXmDRAG_PREFER_DYNAMIC\fP" 10 As a receiver, this client can support both the preregister and dynamic protocols, but prefers to use the dynamic protocol whenever possible in order to provide high-quality drag-under feedback\&. .IP "\fBXmDRAG_PREFER_PREREGISTER\fP" 10 As a receiver, this client can support both the preregister and dynamic protocols, but prefers to use the preregister protocol whenever possible in order to accommodate performance needs\&. .RE .IP "" 10 The default value of this resource is dependent on the capabilities of the display\&. If the display supports the shape extension, allowing the dynamic protocol to use arbitrarily sized drag cursors, the default of this resource is \fBXmDRAG_PREFER_DYNAMIC\fP, otherwise the default is \fBXmDRAG_PREFER_PREREGISTER\fP\&. .IP "" 10 The actual protocol used between an initiator and a receiver is based on the protocol style of the receiver and initiator\&. The decision matrix is described in the following table\&. .TS tab() box; c| c s s s c ^| l| l| l| l l. \fBDrag Initiator Protocol Style\fP\fBDrag Receiver Protocol Style\fP ______ \fBPreregister\fP\fBPrefer Preregister\fP\fBPrefer Dynamic\fP\fBDynamic\fP ______ \fBPreregister\fPPreregisterPreregisterPreregisterDrop Only ______ \fBPrefer Preregister\fPPreregisterPreregisterPreregisterDynamic ______ \fBPrefer Receiver\fPPreregisterPreregisterDynamicDynamic ______ \fBPrefer Dynamic\fPPreregisterDynamicDynamicDynamic ______ \fBDynamic\fPDrop OnlyDynamicDynamicDynamic .TE .IP "" 10 The value \fBXmDRAG_NONE\fP does not appear in the matrix\&. When specified for either the initiator or receiver side, \fBXmDRAG_NONE\fP implies that drag and drop transactions are not supported\&. A value of \fBXmDRAG_DROP_ONLY\fP (Drop Only) results when an initiator and receiver cannot compromise protocol styles, that is, one client requires dynamic mode while the other can only support preregister mode, or if either explicitly has specified \fBXmDRAG_DROP_ONLY\fP\&. .IP "\fBXmNdragStartCallback\fP" 10 Specifies the list of callbacks that are invoked when the \fBXmDragStart\fP function is called\&. The type of structure whose address is passed to this callback is \fBXmDragStartCallbackStruct\fR\&. The callback reason is \fBXmCR_DRAG_START\fP\&. .IP "\fBXmNenableBtn1Transfer\fP" 10 Specifies if selection and transfer actions are integrated on Btn1 and extend actions are activated on Btn2\&. This resource can take the following values: .RS .IP "\fBXmOFF\fP" 10 Disables integration and selection activation on Btn1\&. .IP "\fBXmBUTTON2_TRANSFER\fP" 10 Enables integration and selection activation on Btn1 and transfer on Btn2\&. .IP "\fBXmBUTTON2_ADJUST\fP" 10 Enables integration and selection activation on Btn1 and adjust on Btn2\&. .RE .IP "" 10 This resource affects the actions of Text, TextField, List, and Container\&. .IP "\fBXmNenableButtonTab\fP" 10 Specifies if the action for the \fB\fP key (\fBKNextField\fP and \fBKPrevField\fP actions) is to be modified\&. A value of True modifies the key to move as an arrow key until the boundary of a tab group is reached\&. Then, at the boundary of the tab group, \fBKNextField\fP and \fBKPrevField\fP will move to the next or previous tab group, respectively\&. A value of False does not cause modification\&. .IP "\fBXmNenableDragIcon\fP" 10 Specifies which set of icons are to be used for system default cursors during drag and drop operations\&. A value of False specifies that earlier versions of Motif release icons are used, a value of True specifies that alternate icons are used\&. This resource affects both the 16x16 and the 32x32 icons that the system defaults for each of the Screen objects associated with this display\&. .IP "\fBXmNenableEtchedInMenu\fP" 10 Specifies the shadowing of the button widgets and gadgets in menus when the control is activated\&. A value of True causes the selected menu to be drawn with the shadow etched in; this shadow style is consistent with the selected appearance of other button widgets outside of menus\&. A value of False causes the selected menu to be draw with the shadow etched out\&. This resource affects the actions of PushButton, ToggleButton, and CascadeButton widgets and gadgets when they are children of Menu\&. .IP "" 10 When this resource is set, the background of a button in a menu uses the \fBXmNselectColor\fP (derived from the \fBXmNselectPixel\fP) when armed as a default\&. A \fBPushButton\fP uses the \fBXmNarmColor\fP if it is defined\&. A \fBToggleButton\fP uses the \fBXmNselectColor\fP if \fBXmNindicatorOn\fP is \fBFalse\fP and \fBXmNfillOnSelect\fP is \fBTrue\fP\&. .IP "\fBXmNenableToggleColor\fP" 10 Specifies how to determine the default value of the \fBXmNselectColor\fP resource of ToggleButton and ToggleButtonGadget\&. A value of True causes the default value of \fBXmNselectColor\fP to be set to the value of \fBXmNhighlightColor\fP\&. A value of False causes the default value of \fBXmNselectColor\fP to be set to the value of \fBXmNbackground\fP\&. This resource only affects the appearance of ToggleButton widgets and gadgets that are in \fBXmONE_OF_MANY\fP or \fBXmONE_OF_MANY_ROUND\fP mode\&. In addition, \fBXmNenableToggleColor\fP only influences the default value of \fBXmNselectColor\fP\&. That is, if the user or application sets a value for \fBXmNselectColor\fP, then \fBXmNenableToggleColor\fP is ignored\&. .IP "\fBXmNenableToggleVisual\fP" 10 Specifies the visual appearance of the ToggleButton widget and/or gadget\&. This resource affects the default value of the ToggleButton[Gadget] \fBXmNindicatorType\fP and \fBXmNindicatorOn\fP resources\&. When the ToggleButton is in a RadioBox, a value of True causes the \fBXmONE_OF_MANY_ROUND\fP (a shadowed circle) to be the default\&. Otherwise, when this resource is True, the ToggleButton \fBXmNindicatorOn\fP resource causes a default of \fBXmN_OF_MANY\fP, which will be a shadowed square with a check mark (check box)\&. .IP "" 10 A value of False causes the following: .RS .IP "\fBXmONE_OF_MANY\fP" 10 Is a shadowed diamond\&. .IP "\fBXmN_OF_MANY\fP" 10 Is a shadowed square\&. .RE .IP "\fBXmNenableUnselectableDrag\fP" 10 Specifies whether or not it is possible to drag from Label and Scale\&. A value of True enables the drag; a value of False disables it\&. .IP "\fBXmNenableWarp\fP" 10 Specifies if an application is allowed to warp the pointer from the user\&. A value of True enables warping, a value of False does not\&. .IP "\fBXmNmotifVersion\fP" 10 Specifies the current version of Motif that the current implementation is supposed to behave like\&. By default, this resource gets its value from release values in \fBXm\&.h\fP\&. .IP "\fBXmNnoFontCallback\fP" 10 This callback is called whenever a rendition attempts to load a font or fontset and fails\&. This can happen on creation if the font is specified as \fBXmLOAD_IMMEDIATE\fP or when an attempt is made to render an \fBXmString\fR using a font specified as \fBXmLOAD_DEFERRED\fP\&. An application can have this callback attempt to remedy this problem by calling \fBXmRenditionUpdate\fP on the input rendition to provide a font for the widget to use\&. This may be done by either providing an an alternative font name to be loaded using the \fBXmNfontName\fP and \fBXmNfontType\fP resources or with an already loaded font using the \fBXmNfont\fP resource\&. The callback reason is \fBXmCR_NO_FONT\fP\&. This callback uses the \fBXmDisplayCallbackStruct\fR structure\&. .IP "\fBXmNnoRenditionCallback\fP" 10 This callback is called whenever an attempt is made to render a segment with a \fBRENDITION\fP tag which does not match any renditions in a given render table\&. The callback reason is \fBXmCR_NO_RENDITION\fP\&. This callback uses the \fBXmDisplayCallbackStruct\fR structure\&. .IP "" 10 An application can have this callback attempt to remedy this problem by creating a new rendition with the given tag and adding it to \fBrender_table\fP\&. .IP "" 10 The \fBXmNnoRenditionCallback\fP should deallocate the render table passed in in the \fBrender_table\fP field of the callback structure\&. Note that the table will automatically be deallocated if the \fBXmRenderTableAddRenditions\fP function is called on it\&. The callback should NOT deallocate the modified render table that is passed back to Motif in the \fBrender_table\fP field\&. If the application wishes to manipulate this render table further, it should make a copy with the \fBXmRenderTableCopy\fP function before returning from the callback\&. .IP "\fBXmNuserData\fP" 10 Specifies a client data pointer for applications\&. An internally unused resource\&. .SS "Inherited Resources" .PP All of the superclass resources inherited by XmDisplay are designated N/A (not applicable)\&. .SS "Callback Information" .PP A pointer to the following structure is passed to the \fBXmNdragStartCallback\fP callback: .PP .nf typedef struct { int \fIreason\fP; XEvent *\fIevent\fP; Widget \fItimeStamp\fP; Boolean \fIdoit\fP; }XmDragStartCallbackStruct; .fi .IP "\fIreason\fP" 10 Indicates why the callback was invoked .IP "\fIevent\fP" 10 Points to the \fBXEvent\fP that triggered the callback .IP "\fIwidget\fP" 10 Indicates the ID of the widget from which the drag was initiated\&. .IP "\fIdoit\fP" 10 Is an IN/OUT member that allows the callback to determine whether to continue with the drag or cancel\&. Setting \fIdoit\fP to False will cancel the drag\&. The default value is NULL\&. .PP A pointer to the following structure is passed to the \fBXmNnoFontCallback\fP and \fBXmNnoRenditionCallback\fP callbacks: .PP .nf typedef struct { int \fIreason\fP; XEvent *\fIevent\fP; XmRendition \fIrendition\fP; char *\fIfont_name\fP; XmRenderTable \fIrender_table\fP; XmStringTag \fItag\fP; }XmDisplayCallbackStruct; .fi .IP "\fIreason\fP" 10 Indicates why the callback was invoked\&. .IP "\fIevent\fP" 10 Points to the \fBXEvent\fP that triggered the callback\&. It can be NULL\&. .IP "\fIrendition\fP" 10 Specifies the rendition with the missing font\&. .IP "\fIfont_name\fP" 10 Specifies the name of the font or font set which could not be loaded\&. .IP "\fBrender_table\fP" 10 Specifies the render table with the missing rendition\&. .IP "\fItag\fP" 10 Specifies the tag of the missing rendition\&. .PP The following table describes the reasons for which the individual callback structure fields are valid\&. .TS tab() box; l| l. \fBReason\fP\fBValid Fields\fP __ XmCR_NO_FONT\fIrendition, font_name\fP __ XmCR_NO_RENDITION\fIrender_table, tag\fP __ .TE .SH "RELATED" .PP \fBApplicationShell\fP(3), \fBComposite\fP(3), \fBCore\fP(3), \fBTopLevelShell\fP(3), \fBVendorShell\fP(3), \fBWMShell\fP(3), \fBXmGetXmDisplay\fP(3), and \fBXmScreen\fP(3)\&. .\" created by instant / docbook-to-man, Sun 22 Dec 1996, 20:22