XMDRAGICON(3)
β¨ XmDragIcon (library call) β The DragIcon widget class β¨
πΈ NAME πΈ
XmDragIcon β The DragIcon widget class. Periodt, she's iconic.
β¨ SYNOPSIS β¨
#include <Xm/DragDrop.h>
π¦ DESCRIPTION π¦
Okay so a DragIcon is literally a component of the visual used to represent the source data in a drag and drop transaction. Main character energy for your drag source.
During a drag operation, a real or simulated X cursor provides drag-over visuals. Those visuals consist of a static portion that represents the object being dragged, and dynamic cues that provide visual feedback during the drag operation. The visual is attained by blending together various XmDragIcons specified in the XmDragContext associated with the drag operation. Blending, bestie. It's giving smoothie but for icons.
The static portion of the drag-over visual is the graphic representation that identifies the drag source. For example, when a user drags several items within a list, a DragIcon depicting a list might be supplied as the visual. The XmDragContext resources, XmNsourceCursorIcon or XmNsourcePixmapIcon, specify a DragIcon to use for the static portion of the visual.
A drag-over visual incorporates dynamic cues in order to provide visual feedback in response to the user's actions. For instance, the drag-over visual might use different indicators to identify the type of operation (copy, link, or move) being performed. Dynamic cues could also alert the user that a drop site is valid or invalid as the pointer traverses the drop site. The XmNoperationCursorIcon and XmNstateCursorIcon resources of XmDragContext specify DragIcons for dynamic cues.
A drag-over visual typically consists of a source, operation and state DragIcon. The XmNblendModel resource of XmDragContext offers several options that determine which icons are blended to produce the drag-over visual. DragIcon resources control the relative position of the operation and state icons (if used). If a particular DragIcon is not specified, the toolkit uses the XmScreen default DragIcons. No icon left behind, fr fr.
An application initializes a DragIcon with the function XmCreateDragIcon or through entries in the resource database. If a pixmap and its mask (optional) are specified in the resource database, the toolkit converts the values in the X11 Bitmap file format and assigns values to the corresponding resources.
π Classes π
DragIcon inherits behavior and a resource from Object.
The class pointer is xmDragIconObjectClass.
The class name is XmDragIcon.
π New Resources π
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 .Xdefaults file, remove the XmN or XmC prefix and use the remaining letters. To specify one of the defined values for a resource in a .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).
Here's the resource tea, one bullet per resource:
XmNattachmentβ Class:XmCAttachment; Type:unsigned char; Default:XmATTACH_NORTH_WEST; Access:CSGSpecifies a relative location on the source icon for the attachment of the state or operation icon. The origin of the state and operation icons is aligned with the specified compass point on the source icon. TheXmNoffsetXandXmNoffsetYresources can be used to further refine the icon positions. The possible values are:XmATTACH_NORTH_WESTβ Attaches the origin of the state or operation icon to the northwest point on the source icon.XmATTACH_NORTHβ Attaches the origin of the state or operation icon to the north point on the source icon.XmATTACH_NORTH_EASTβ Attaches the origin of the state or operation icon to the northeast point on the source icon.XmATTACH_EASTβ Attaches the origin of the state or operation icon to the east point on the source icon.XmATTACH_SOUTH_EASTβ Attaches the origin of the state or operation icon to the southeast point on the source icon.XmATTACH_SOUTHβ Attaches the origin of the state or operation icon to the south point on the source icon.XmATTACH_SOUTH_WESTβ Attaches the origin of the state or operation icon to the southwest point on the source icon.XmATTACH_WESTβ Attaches the origin of the state or operation icon to the west point on the source icon.XmATTACH_CENTERβ Attaches the origin of the state or operation icon to the center of the source icon. TheXmNoffsetXandXmNoffsetYresources may be used to center the attached icon.XmATTACH_HOTβ Attaches the hotspot coordinates of a state or operationDragIconto an x,y position on the source icon. The x,y coordinate is taken from the event passed to theXmDragStartfunction, and made relative to the widget passed as an argument to the same function.
XmNdepthβ Class:XmCDepth; Type:int; Default:1; Access:CSGSpecifies the depth of the pixmap.XmNheightβ Class:XmCHeight; Type:Dimension; Default:0; Access:CSGSpecifies the height of the pixmap.XmNhotXβ Class:XmCHot; Type:Position; Default:0; Access:CSGSpecifies the x-coordinate of the hotspot of a cursorDragIconin relation to the origin of the pixmap bounding box.XmNhotYβ Class:XmCHot; Type:Position; Default:0; Access:CSGSpecifies the y-coordinate of the hotspot of a cursorDragIconin relation to the origin of the pixmap bounding box.XmNmaskβ Class:XmCPixmap; Type:Pixmap; Default:XmUNSPECIFIED_PIXMAP; Access:CSGSpecifies a pixmap of depth1to use as theDragIconmask pixmap.XmNoffsetXβ Class:XmCOffset; Type:Position; Default:0; Access:CSGSpecifies a horizontal offset (in pixels) of the origin of the state or operation icon relative to the attachment point on the source icon. A positive offset value moves the origin to the right; a negative value moves the origin to the left.XmNoffsetYβ Class:XmCOffset; Type:Position; Default:0; Access:CSGSpecifies a vertical offset (in pixels) of the origin of the state or operation icon relative to the attachment point on the source icon. A positive offset value moves the origin down; a negative value moves the origin up.XmNpixmapβ Class:XmCPixmap; Type:Pixmap; Default:XmUNSPECIFIED_PIXMAP; Access:CSGSpecifies a pixmap to use as theDragIconpixmap.XmNwidthβ Class:XmCWidth; Type:Dimension; Default:0; Access:CSGSpecifies the width of the pixmap.
π Inherited Resources π
DragIcon inherits behavior and a resource from Object. For a complete description of this resource, refer to the Object reference page.
Okay so the Object Resource Set for XmDragIcon is adorably short β literally one resource, and it's the classic:
XmNdestroyCallbackβ nameXmNdestroyCallback, classXmCCallback, typeXtCallbackList, defaultNULL, accessC. That's it. That's the whole table. One (1) resource. She's low-maintenance, bestie, we love that for her π
π RELATED INFORMATION π
Like any good main character, XmDragIcon does not exist in a vacuum, and if you wanna understand her whole social circle you gotta go read:
Object(3)XmCreateDragIcon(3)XmDisplay(3)XmDragContext(3)XmDropSite(3)XmDropTransfer(3)XmScreen(3)
Go forth and read, queen π¦
And that's the whole page, fr fr β straight from the XmDragIcon(library call) manual, no cap. If you ever need her again, she's filed right there under library calls, iconic as always. Mwah π
β¨
π¦ where this page comes from
- alpine 3.24: motif-doc 2.5.2-r0 Β· LGPL-2.1-or-later
- arch rolling: openmotif 2.3.8-4 Β· LGPL-2.1-or-later
- centos-stream 9: motif-devel 2.3.4-32.el9 Β· LGPLv2+
- centos-stream 9: motif-devel 2.3.4-32.el9 Β· LGPLv2+
- epel 10: motif-devel 2.3.8-2.el10_2 Β· LicenseRef-Callaway-LGPLv2+
- fedora 43: motif-devel 2.3.8-1.fc43 Β· LicenseRef-Callaway-LGPLv2+
- fedora 43: motif-devel 2.3.8-1.fc43 Β· LicenseRef-Callaway-LGPLv2+
- fedora 43: motif-devel 2.3.8-2.fc43 Β· LicenseRef-Callaway-LGPLv2+
- fedora 43: motif-devel 2.3.8-2.fc43 Β· LicenseRef-Callaway-LGPLv2+
- fedora 44: motif-devel 2.3.8-3.fc44 Β· LicenseRef-Callaway-LGPLv2+
- fedora 44: motif-devel 2.3.8-3.fc44 Β· LicenseRef-Callaway-LGPLv2+
- nixos 26.05: motif 2.3.8
- nixpkgs unstable: motif 2.3.8
- opensuse-leap 16.0: motif-devel 2.3.8-bp160.1.1 Β· LGPL-2.1-or-later
- opensuse-leap 16.0: motif-devel 2.3.8-bp160.1.1 Β· LGPL-2.1-or-later
- opensuse-leap 16.0: motif-devel 2.3.8-bp160.1.1 Β· LGPL-2.1-or-later
- opensuse-leap 16.0: motif-devel 2.3.8-bp160.1.1 Β· LGPL-2.1-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms