'\" t .\" DropSit.sgm /main/11 1996/09/08 20:40:45 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 "XmDropSite" 3 .SH "NAME" \fBXmDropSite\fP \(em The DropSite Registry "XmDropSite" .SH "SYNOPSIS" .PP .nf #include .fi .SH "DESCRIPTION" .PP A client registers a widget or gadget as a drop site using the \fBXmDropSiteRegister\fP function\&. In addition, this routine defines the behavior and capabilities of a drop site by specifying appropriate resources\&. For example, the \fBXmNimportTargets\fP and \fBXmNnumImportTargets\fP resources identify respectively the selection target types and number of types supported by a drop site\&. The visual animation effects associated with a drop site are also described with DropSite resources\&. .PP Drop site animation effects that occur in response to the pointer entering a valid drop site are called drag-under effects\&. A receiver can select from several animation styles supplied by the toolkit or can provide customized animation effects\&. Drag-under effects supplied by the toolkit include border highlighting, shadow in/out drawing, and pixmap representation\&. .PP When a preregister drag protocol style is used, the toolkit generates drag-under visual effects based on the value of the \fBXmNanimationStyle\fP resource\&. In dynamic mode, if the drop site \fBXmNdragProc\fP resource is NULL, the toolkit also provides animation effects based on the \fBXmNanimationStyle\fP resource\&. Otherwise, if the \fBXmNdragProc\fP routine is specified, the receiver can either assume responsibility for animation effects (through the \fBXmNdragProc\fP routine) or rely on the toolkit to provide animation\&. An application can either handle all or none of the animation effects for a particular drop site\&. That is, an application should never do a partial job of animation on a particular drop site\&. .PP Drop sites may overlap\&. The initial stacking order corresponds to the order in which the drop sites were registered\&. When a drop site overlaps another drop site, the drag-under effects of the drop site underneath are clipped by the obscuring drop site(s)\&. .PP The \fBXmDropSiteUpdate\fP routine sets resources for a widget that is registered as a drop site\&. \fBXmDropSiteRetrieve\fP gets drop site resource values previously specified for a registered widget\&. These routines are used instead of \fBXtSetValues\fP and \fBXtGetValues\fP\&. .SS "Classes" .PP XmDropSite does not inherit from any widget class\&. .SS "New Resources" .PP The following table defines a set of widget resources used by the programmer to specify data\&. 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 \fBXmDropSiteUpdate\fP (S), retrieved by using \fBXmDropSiteRetrieve\fP (G), or is not applicable (N/A)\&. .PP .TS tab() box; c s s s s l| l| l| l| l. \fBXmDropSite Resource Set\fP \fBName\fP\fBClass\fP\fBType\fP\fBDefault\fP\fBAccess\fP _____ XmNanimationMaskXmCAnimationMaskPixmapXmUNSPECIFIED_PIXMAPCSG _____ XmNanimationPixmapXmCAnimationPixmapPixmapXmUNSPECIFIED_PIXMAPCSG _____ XmNanimationPixmapDepthXmCAnimationPixmapDepthint0CSG _____ XmNanimationStyleXmCAnimationStyleunsigned charXmDRAG_UNDER_HIGHLIGHTCSG _____ XmNdragProcXmCDragProcXtCallbackProcNULLCSG _____ XmNdropProcXmCDropProcXtCallbackProcNULLCSG _____ XmNdropRectanglesXmCDropRectanglesXRectangle *dynamicCSG _____ XmNdropSiteActivityXmCDropSiteActivityunsigned charXmDROP_SITE_ACTIVECSG _____ XmNdropSiteOperationsXmCDropSiteOperationsunsigned charXmDROP_MOVE | XmDROP_COPYCSG _____ XmNdropSiteTypeXmCDropSiteTypeunsigned charXmDROP_SITE_SIMPLECG _____ XmNimportTargetsXmCImportTargetsAtom *NULLCSG _____ XmNnumDropRectanglesXmCNumDropRectanglesCardinal1CSG _____ XmNnumImportTargetsXmCNumImportTargetsCardinal0CSG _____ .TE .IP "\fBXmNanimationMask\fP" 10 Specifies a mask to use with the pixmap specified by \fBXmNanimationPixmap\fP when the animation style is \fBXmDRAG_UNDER_PIXMAP\fP\&. .IP "\fBXmNanimationPixmap\fP" 10 Specifies a pixmap for drag-under animation when the animation style is \fBXmDRAG_UNDER_PIXMAP\fP\&. The pixmap is drawn with its origin at the upper left corner of the bounding box of the drop site\&. If the drop site window is larger than the animation pixmap, the portion of the window not covered by the pixmap will be tiled with the window\&'s background color\&. .IP "\fBXmNanimationPixmapDepth\fP" 10 Specifies the depth of the pixmap specified by the \fBXmNanimationPixmap\fP resource\&. When the depth is 1, the colors are taken from the foreground and background of the drop site widget\&. For any other value, drop site animation occurs only if the \fBXmNanimationPixmapDepth\fP matches the depth of the drop site window\&. Colors are derived from the current colormap\&. .IP "\fBXmNanimationStyle\fP" 10 Specifies the drag-under animation style used when a drag enters a valid drop site\&. The possible values are .RS .IP "\fBXmDRAG_UNDER_HIGHLIGHT\fP" 10 The drop site uses highlighting effects\&. .IP "\fBXmDRAG_UNDER_SHADOW_OUT\fP" 10 The drop site uses an outset shadow\&. .IP "\fBXmDRAG_UNDER_SHADOW_IN\fP" 10 The drop site uses an inset shadow\&. .IP "\fBXmDRAG_UNDER_PIXMAP\fP" 10 The drop site uses the pixmap specified by \fBXmNanimationPixmap\fP to indicate that it can receive the drop\&. .IP "\fBXmDRAG_UNDER_NONE\fP" 10 The drop site does not use animation effects\&. A client using a dynamic protocol, may provide drag-under effects in its \fBXmNdragProc\fP routine\&. .RE .IP "\fBXmNdragProc\fP" 10 Specifies the procedure that is invoked when the drop site receives a crossing, motion, or operation changed message\&. This procedure is called only when a dynamic protocol is used\&. The type of structure whose address is passed to this procedure is \fBXmDragProcCallbackStruct\fR\&. The reason sent to the procedure is one of the following: .RS .IP " \(bu" 6 \fBXmCR_DROP_SITE_ENTER_MESSAGE\fP .IP " \(bu" 6 \fBXmCR_DROP_SITE_LEAVE_MESSAGE\fP .IP " \(bu" 6 \fBXmCR_DRAG_MOTION\fP .IP " \(bu" 6 \fBXmCR_OPERATION_CHANGED\fP .RE .IP "" 10 The drag procedure may change the values of some members of the \fBXmDragProcCallbackStruct\fR passed to it\&. After the drag procedure returns, the toolkit uses the final values in initializing some members of the callback structure passed to the appropriate callbacks of the initiator (the DragContext\&'s \fBXmNdropSiteEnterCallback\fP, \fBXmNdropSiteLeaveCallback\fP, \fBXmNdragMotionCallback\fP, or \fBXmNoperationChangedCallback\fP callbacks)\&. .IP "\fBXmNdropProc\fP" 10 Specifies the procedure that is invoked when a drop (excluding a cancel or interrupt action) occurs on a drop site regardless of the status of the drop site\&. The type of the structure whose address is passed to this procedure is \fBXmDropProcCallbackStruct\fR\&. The reason sent to the procedure is \fBXmCR_DROP_MESSAGE\fP\&. .IP "" 10 The drop procedure may change the values of some members of the \fBXmDropProcCallbackStruct\fR passed to it\&. After the drop procedure returns, the toolkit uses the final values in initializing some members of the \fBXmDropStartCallbackStruct\fR passed to the initiator\&'s drop start callbacks (the DragContext\&'s \fBXmNdropStartCallback\fP callbacks)\&. .IP "\fBXmNdropRectangles\fP" 10 Specifies a list of rectangles that describe the shape of a drop site\&. The locations of the rectangles are relative to the origin of the enclosing object\&. When \fBXmNdropRectangles\fP is NULL, the drop site is assumed to be the sensitive area of the enclosing widget\&. If \fBXmNdropSiteType\fP is \fBXmDROP_SITE_COMPOSITE\fP, this resource cannot be specified by the application\&. .IP "" 10 Retrieving this resource returns allocated memory that needs to be freed with the \fBXtFree\fP function\&. .IP "\fBXmNdropSiteActivity\fP" 10 Indicates whether a drop site is active or inactive\&. The values are \fBXmDROP_SITE_ACTIVE\fP, \fBXmDROP_SITE_INACTIVE\fP, and \fBXmDROP_SITE_IGNORE\fP\&. An active drop site can receive a drop, whereas an inactive drop site is dormant\&. An inactive drop site is treated as if it was not a registered drop site and any drag-under visuals associated with entering or leaving the drop site do not occur\&. However, it is still used for clipping drag-under effects\&. A value of \fBXmDROP_SITE_IGNORE\fP indicates that a drop site should be ignored for all purposes\&. .IP "\fBXmNdropSiteOperations\fP" 10 Specifies the set of valid operations associated with a drop site\&. This resource is a bit mask that is formed by combining one or more of the following values using a bitwise operation such as inclusive OR (|): \fBXmDROP_COPY\fP, \fBXmDROP_LINK\fP, and \fBXmDROP_MOVE\fP\&. The value \fBXmDROP_NOOP\fP for this resource indicates that no operations are valid\&. .IP "\fBXmNdropSiteType\fP" 10 Specifies the type of the drop site\&. The possible values are .RS .IP "\fBXmDROP_SITE_SIMPLE\fP" 10 The widget does not have any additional children that are registered as drop sites\&. .IP "\fBXmDROP_SITE_COMPOSITE\fP" 10 The widget will have children that are registered as drop sites\&. .RE .IP "\fBXmNimportTargets\fP" 10 Specifies the list of target atoms that this drop site accepts\&. .IP "\fBXmNnumDropRectangles\fP" 10 Specifies the number of rectangles in the \fBXmNdropRectangles\fP list\&. If the drop site type is \fBXmDROP_SITE_COMPOSITE\fP, this resource can not be specified by the application\&. .IP "\fBXmNnumImportTargets\fP" 10 Specifies the number of atoms in the target atom list\&. .SS "Callback Information" .PP A pointer to the following structure is passed to the \fBXmNdragProc\fP routine when the drop site receives crossing, motion, or operation changed messages: .PP .nf typedef struct { int \fIreason\fP; XEvent *\fIevent\fP; Time \fItimeStamp\fP; Widget \fIdragContext\fP; Position \fIx\fP; Position \fIy\fP; unsigned char \fIdropSiteStatus\fP; unsigned char \fIoperation\fP; unsigned char \fIoperations\fP; Boolean \fIanimate\fP; } XmDragProcCallbackStruct, *XmDragProcCallback; .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 "\fBtimeStamp\fP" 10 Specifies the timestamp of the logical event\&. .IP "\fIdragContext\fP" 10 Specifies the ID of the DragContext widget associated with the transaction\&. .IP "\fIx\fP" 10 Indicates the x-coordinate of the pointer relative to the drop site\&. .IP "\fIy\fP" 10 Indicates the y-coordinate of the pointer relative to the drop site\&. .IP "\fBdropSiteStatus\fP" 10 An IN/OUT member that indicates whether or not a drop site is valid\&. .IP "" 10 When \fIreason\fP is \fBXmCR_DROP_SITE_ENTER_MESSAGE\fP or \fBXmCR_OPERATION_CHANGED\fP, or \fIreason\fP is \fBXmCR_DRAG_MOTION\fP or \fBXmCR_DROP_SITE_LEAVE_MESSAGE\fP and the pointer is not in the same drop site as on the previous invocation of the drag procedure, the toolkit initializes \fBdropSiteStatus\fP to \fBXmDROP_SITE_VALID\fP if the DragContext\&'s \fBXmNexportTargets\fP and the DropSite\&'s \fBXmNimportTargets\fP are compatible and if the initial value of the \fIoperation\fP member is not \fBXmDROP_NOOP\fP\&. Otherwise, the toolkit initializes \fBdropSiteStatus\fP to \fBXmDROP_SITE_INVALID\fP\&. .IP "" 10 When the \fIreason\fP is \fBXmCR_DRAG_MOTION\fP or \fBXmCR_DROP_SITE_LEAVE_MESSAGE\fP and the pointer is within the same drop site as on the previous invocation of the drag procedure, the toolkit initializes \fBdropSiteStatus\fP to the value of \fBdropSiteStatus\fP at the time the previous invocation of the drag procedure returns\&. .IP "" 10 The drag procedure may change the value of this member\&. After the drag procedure returns, the toolkit uses the final value in initializing the \fBdropSiteStatus\fP member of the callback struct passed to the appropriate callbacks of the initiator\&. .IP "\fIoperation\fP" 10 An IN/OUT member that identifies an operation\&. .IP "" 10 The toolkit initializes \fIoperation\fP by selecting an operation from the bitwise AND of the initial value of the \fIoperations\fP member and the value of the DropSite\&'s \fBXmNdropSiteOperations\fP resource\&. The toolkit searches this set first for \fBXmDROP_MOVE\fP, then for \fBXmDROP_COPY\fP, then for \fBXmDROP_LINK\fP, and initializes \fIoperation\fP to the first operation it finds in the set\&. If the toolkit finds none of these operations in the set, it initializes \fIoperation\fP to \fBXmDROP_NOOP\fP\&. .IP "" 10 The drag procedure may change the value of this member\&. After the drag procedure returns, the toolkit uses the final value in initializing the \fIoperation\fP member of the callback struct passed to the appropriate callbacks of the initiator\&. .IP "\fIoperations\fP" 10 An IN/OUT member that indicates the set of operations supported for the source data\&. .IP "" 10 If the user does not select an operation (by pressing a modifier key), the toolkit initializes \fIoperations\fP to the value of the DragContext\&'s \fBXmNdragOperations\fP resource\&. If the user does select an operation, the toolkit initializes \fIoperations\fP to the bitwise AND of the corresponding operation and the value of the DragContext\&'s \fBXmNdragOperations\fP resource\&. If the resulting set of operations is empty, the toolkit initializes \fIoperations\fP to \fBXmDROP_NOOP\fP\&. .IP "" 10 The drag procedure may change the value of this member\&. After the drag procedure returns, the toolkit uses the final value in initializing the \fIoperations\fP member of the callback struct passed to the appropriate callbacks of the initiator\&. .IP "\fIanimate\fP" 10 An OUT member that indicates whether the toolkit or the receiver client provides drag-under effects for a valid drop site\&. If \fIanimate\fP is set to True, the toolkit provides drop site animation per the \fBXmNanimationStyle\fP resource value; if it is set to False, the receiver generates drag-under animation effects\&. .PP A pointer to the following structure is passed to the \fBXmNdropProc\fP routine when the drop site receives a drop message: .PP .nf typedef struct { int \fIreason\fP; XEvent *\fIevent\fP; Time \fItimeStamp\fP; Widget \fIdragContext\fP; Position \fIx\fP; Position \fIy\fP; unsigned char \fIdropSiteStatus\fP; unsigned char \fIoperation\fP; unsigned char \fIoperations\fP; unsigned char \fIdropAction\fP; } XmDropProcCallbackStruct, *XmDropProcCallback; .fi .IP "\fIreason\fP" 10 Indicates why the callback was invoked\&. .IP "\fIevent\fP" 10 Specifies the \fBXEvent\fP that triggered the callback\&. .IP "\fBtimeStamp\fP" 10 Specifies the timestamp of the logical event\&. .IP "\fIdragContext\fP" 10 Specifies the ID of the DragContext widget associated with the transaction\&. .IP "\fIx\fP" 10 Indicates the x-coordinate of the pointer relative to the drop site\&. .IP "\fIy\fP" 10 Indicates the y-coordinate of the pointer relative to the drop site\&. .IP "\fBdropSiteStatus\fP" 10 An IN/OUT member that indicates whether or not a drop site is valid\&. .IP "" 10 The toolkit initializes \fBdropSiteStatus\fP to \fBXmDROP_SITE_VALID\fP if the DragContext\&'s \fBXmNexportTargets\fP and the DropSite\&'s \fBXmNimportTargets\fP are compatible and if the initial value of the \fIoperation\fP member is not \fBXmDROP_NOOP\fP\&. Otherwise, the toolkit initializes \fBdropSiteStatus\fP to \fBXmDROP_SITE_INVALID\fP\&. .IP "" 10 The drop procedure may change the value of this member\&. After the drop procedure returns, the toolkit uses the final value in initializing the \fBdropSiteStatus\fP member of the \fBXmDropStartCallbackStruct\fR passed to the initiator\&'s drop start callbacks (the DragContext\&'s \fBXmNdropStartCallback\fP callbacks)\&. .IP "\fIoperation\fP" 10 An IN/OUT member that identifies an operation\&. .IP "" 10 The toolkit initializes \fIoperation\fP by selecting an operation from the bitwise AND of the initial value of the \fIoperations\fP member and the value of the DropSite\&'s \fBXmNdropSiteOperations\fP resource\&. The toolkit searches this set first for \fBXmDROP_MOVE\fP, then for \fBXmDROP_COPY\fP, then for \fBXmDROP_LINK\fP, and initializes \fIoperation\fP to the first operation it finds in the set\&. If it finds none of these operations in the set, it initializes \fIoperation\fP to \fBXmDROP_NOOP\fP\&. .IP "" 10 The drop procedure may change the value of this member\&. After the drop procedure returns, the toolkit uses the final value in initializing the \fIoperation\fP member of the \fBXmDropStartCallbackStruct\fR passed to the initiator\&'s drop start callbacks (the DragContext\&'s \fBXmNdropStartCallback\fP callbacks)\&. .IP "\fIoperations\fP" 10 An IN/OUT member that indicates the set of operations supported for the source data\&. .IP "" 10 If the user does not select an operation (by pressing a modifier key), the toolkit initializes \fIoperations\fP to the value of the DragContext\&'s \fBXmNdragOperations\fP resource\&. If the user does select an operation, the toolkit initializes \fIoperations\fP to the bitwise AND of the corresponding operation and the value of the DragContext\&'s \fBXmNdragOperations\fP resource\&. If the resulting set of operations is empty, the toolkit initializes \fIoperations\fP to \fBXmDROP_NOOP\fP\&. .IP "" 10 The drop procedure may change the value of this member\&. After the drop procedure returns, the toolkit uses the final value in initializing the \fIoperations\fP member of the \fBXmDropStartCallbackStruct\fR passed to the initiator\&'s drop start callbacks (the DragContext\&'s \fBXmNdropStartCallback\fP callbacks)\&. .IP "\fBdropAction\fP" 10 An IN/OUT member that identifies the action associated with the drop\&. The possible values are .RS .IP "\fBXmDROP\fP" 10 A drop was attempted\&. If the drop site is valid, drop transfer handling proceeds\&. .IP "\fBXmDROP_HELP\fP" 10 The user has requested help on the drop site\&. .RE .IP "" 10 The drop procedure may change the value of this member\&. After the drop procedure returns, the toolkit uses the final value in initializing the \fBdropAction\fP member of the \fBXmDropStartCallbackStruct\fR passed to the initiator\&'s drop start callbacks (the DragContext\&'s \fBXmNdropStartCallback\fP callbacks)\&. .SH "RELATED INFORMATION" .PP \fBXmDragContext\fP(3), \fBXmDragIcon\fP(3), \fBXmDropSiteConfigureStackingOrder\fP(3), \fBXmDropSiteEndUpdate\fP(3), \fBXmDropSiteQueryStackingOrder\fP(3), \fBXmDropSiteRegister\fP(3), \fBXmDropSiteStartUpdate\fP(3), \fBXmDropSiteUpdate\fP(3), \fBXmDropSiteUnregister\fP(3), \fBXmDropTransfer\fP(3), and \fBXmTargetsAreCompatible\fP(3)\&. .\" created by instant / docbook-to-man, Sun 22 Dec 1996, 20:22