*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->Tru64 Unix man pages -> XmDragContext (3X)              
Title
Content
Arch
Section
 

XmDragContext(3X)

Contents


NAME    [Toc]    [Back]

       XmDragContext - The DragContext widget class

SYNOPSIS    [Toc]    [Back]

       #include <Xm/DragDrop.h>


DESCRIPTION    [Toc]    [Back]

       DragContexts  are  special  widgets  used in drag and drop
       transactions. A DragContext is implemented  as  a  widget,
       but a client does not explicitly create a DragContext widget.
  Instead, a client initiates a drag and drop transaction
  by calling XmDragStart, and this routine initializes
       and returns a DragContext widget.  There is a unique DragContext
  for  each  drag  operation.   The toolkit frees a
       DragContext when a transaction is complete; therefore,  an
       application  programmer  should  not  explicitly destroy a
       DragContext.

       Initiator and receiver clients both  use  DragContexts  to
       track  the state of a transaction.  When the initiator and
       receiver of a transaction are in  the  same  client,  they
       share  the same DragContext instance.  If they are in different
 clients, there are two separate  DragContexts.   In
       this case, the initiator calls XmDragStart and the toolkit
       provides a DragContext for the receiver client.  The  only
       resources  pertinent  to the receiver are XmNexportTargets
       and XmNnumExportTargets.  These  can  both  be  passed  as
       arguments  to  the  XmDropSiteRetrieve  function to obtain
       information about the current drop site.

       In general, in order to receive data,  a  drop  site  must
       share  at  least  one  target type and operation in common
       with a drag source.  The DragContext resource,  XmNexportTargets,
  identifies  the  selection  targets for the drag
       source.  These export targets are compared with the XmNimportTargets
  resource  list  specified by a drop site. The
       DragContext resource,  XmNdragOperations,  identifies  the
       valid operations that can be applied to the source data by
       the initiator.  The drop site counterpart resource is XmNdropSiteOperations,
  which  indicates  a  drop site's supported
 operations.

       A client uses DragIcon widgets  to  define  the  drag-over
       animation  effects  associated  with a given drag and drop
       transaction. An initiator specifies a set of  drag  icons,
       selects  a  blending  model, and sets foreground and background
 cursor colors with DragContext resources.

       The type of drag-over visual  used  to  represent  a  drag
       operation  depends on the drag protocol style.  In preregister
 mode, the server is grabbed, and either a cursor  or
       a  pixmap  may  be used as a drag-over visual.  In dynamic
       mode, drag-over visuals must be  implemented  with  the  X
       cursor.  If the resulting drag protocol style is Drop Only
       or   None   and   the   XmNdragInitiatorProtocolStyle   is
       XmDRAG_DYNAMIC  or  XmDRAG_PREFER_DYNAMIC,  then a dynamic
       visual style (cursor) is used.  Otherwise,  a  preregister
       visual style is used.



   Classes    [Toc]    [Back]
       DragContext inherits behavior and resources from Core.

       The class pointer is xmDragContextClass.

       The class name is XmDragContext.

   New Resources    [Toc]    [Back]
       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).

       XmDragContext Resource Set    [Toc]    [Back]

       Class: XmCBlendModel
       Default: XmBLEND_ALL
       Type:  unsigned char
       Access: CG
       Class: XmCClientData
       Default: NULL
       Type:  XtPointer
       Access: CSG
       Class: XmCConvertProc
       Default: NULL
       Type:  XtConvertSelectionIncrProc
       Access: CSG
       Class: XmCCursorBackground
       Default: dynamic
       Type:  Pixel
       Access: CSG
       Class: XmCCallback
       Default: NULL
       Type:  XtCallbackList
       Access: CSG
       Class: XmCCallback
       Default: NULL
       Type:  XtCallbackList
       Access: C
       Class: XmCDragOperations
       Default: XmDROP_COPY   XmDROP_MOVE
       Type:  unsigned char
       Access: C
       Class: XmCCallback
       Default: NULL
       Type:  XtCallbackList
       Access: C
       Class: XmCCallback
       Default: NULL
       Type:  XtCallbackList
       Access: C
       Class: XmCCallback
       Default: NULL
       Type:  XtCallbackList
       Access: C
       Class: XmCCallback
       Default: NULL
       Type:  XtCallbackList
       Access: C
       Class: XmCExportTargets
       Default: NULL
       Type:  Atom *
       Access: CSG
       Class: XmCIncremental
       Default: False
       Type:  Boolean
       Access: CSG
       Class: XmCCursorForeground
       Default: dynamic
       Type:  Pixel
       Access: CSG
       Class: XmCCursorForeground
       Default: dynamic
       Type:  Pixel
       Access: CSG
       Class: XmCNumExportTargets
       Default: 0
       Type:  Cardinal
       Access: CSG
       Class: XmCCallback
       Default: NULL
       Type:  XtCallbackList
       Access: C
       Class: XmCOperationCursorIcon
       Default: dynamic
       Type:  Widget
       Access: CSG
       Class: XmCSourceCursorIcon
       Default: dynamic
       Type:  Widget
       Access: CSG
       Class: XmCSourcePixmapIcon
       Default: dynamic
       Type:  Widget
       Access: CSG
       Class: XmCStateCursorIcon
       Default: dynamic
       Type:  Widget
       Access: CSG
       Class: XmCCallback
       Default: NULL
       Type:  XtCallbackList
       Access: C
       Class: XmCCallback
       Default: NULL
       Type:  XtCallbackList
       Access: C
       Class: XmCCursorForeground
       Default: dynamic
       Type:  Pixel
       Access: CSG

              Specifies   which   combination  of  DragIcons  are
              blended to produce a drag-over visual.  Blends  all
              three  DragIcons--the  source,  state and operation
              icon. The icons are layered from top to bottom with
              the  operation  icon  on top and the source icon on
              the bottom. The hotspot is derived from  the  state
              icon.  Blends the state and source icons only.  The
              hotspot is derived from the state icon.   Specifies
              that  only  the source icon is used, which the initiator
 updates  as  required.   Specifies  that  no
              drag-over  visual  is generated.  The client tracks
              the drop site status through callback routines  and
              updates the drag-over visuals as necessary.  Specifies
 the client data to be passed  to  the  XmNconvertProc
 when it is invoked.  Specifies a procedure
              of type  XtConvertSelectionIncrProc  that  converts
              the  source  data to the format(s) requested by the
              receiver client. The widget argument passed to this
              procedure  is the DragContext widget. The selection
              atom passed is _MOTIF_DROP.  If  XmNincremental  is
              False,  the procedure should ignore the max_length,
              client_data, and request_id  arguments  and  should
              handle  the conversion atomically. Data returned by
              XmNconvertProc must be allocated using XtMalloc and
              will  be  freed  automatically by the toolkit after
              the transfer. For additional information on  selection
  conversion  procedures, see X Toolkit Intrinsics--C
 Language Interface.   Specifies  the  background
  pixel  value  of the cursor.  Specifies the
              foreground pixel value of the cursor when the state
              icon is not blended.  This resource defaults to the
              foreground  color  of  the  widget  passed  to  the
              XmDragStart  function.  Specifies the list of callbacks
 that are called when the transaction is  completed.
  The type of the structure whose address is
              passed to this  callback  is  XmDragDropFinishCallbackStruct.
   The  reason  sent  by the callback is
              XmCR_DRAG_DROP_FINISH.  Specifies the list of callbacks
  that are invoked when the pointer moves. The
              type of structure whose address is passed  to  this
              callback  is XmDragMotionCallbackStruct.   The reason
  sent  by  the  callback  is  XmCR_DRAG_MOTION.
              Specifies  the  set  of valid operations associated
              with an initiator client for  a  drag  transaction.
              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  (|):
              XmDROP_COPY, XmDROP_LINK,  XmDROP_MOVE.  The  value
              XmDROP_NOOP  for  this  resource  indicates that no
              operations are valid. For Text and  TextField  widgets,
   this  resource  is  set  to  XmDROP_COPY  |
              XmDROP_MOVE;  for  List  widgets,  it  is  set   to
              XmDROP_COPY.   Specifies the list of callbacks that
              are invoked when the drop is completed.   The  type
              of  the  structure  whose address is passed to this
              callback is XmDropFinishCallbackStruct. The  reason
              sent  by  the callback is XmCR_DROP_FINISH.  Specifies
 the list of callbacks that  are  invoked  when
              the  pointer  enters  a drop site.  The type of the
              structure whose address is passed to this  callback
              is  XmDropSiteEnterCallbackStruct.  The reason sent
              by the callback is XmCR_DROP_SITE_ENTER.  Specifies
              the  list  of  callbacks  that are invoked when the
              pointer leaves a drop site.  The type of the structure
  whose  address  is passed to this callback is
              XmDropSiteLeaveCallbackStruct. The reason  sent  by
              the  callback  is  XmCR_DROP_SITE_LEAVE.  Specifies
              the list of callbacks that are invoked when a  drop
              is  initiated.   The  type  of  the structure whose
              address is passed to this callback is  XmDropStartCallbackStruct.
  The reason sent by the callback is
              XmCR_DROP_START.   Specifies  the  list  of  target
              atoms  associated  with this source.  This resource
              identifies the selection targets this source can be
              converted to.  Specifies a Boolean value that indicates
 whether the transfer on  the  initiator  side
              uses  the  Xt incremental selection transfer mechanism
 described in X Toolkit Intrinsics--C  Language
              Interface.   If  the  value  is True, the initiator
              uses incremental transfer; if the value  is  False,
              the  initiator uses atomic transfer.  Specifies the
              foreground pixel value of the cursor when the state
              is invalid.  This resource defaults to the value of
              the XmNcursorForeground  resource.   Specifies  the
              foreground pixel value of the cursor when the state
              is none.  This resource defaults to  the  value  of
              the  XmNcursorForeground  resource.   Specifies the
              number of entries in the list  of  export  targets.
              Specifies  the  list  of callbacks that are invoked
              when the drag is started and when the user requests
              that  a different operation be applied to the drop.
              The type of the structure whose address  is  passed
              to  this  callback  is  XmOperationChangedCallbackStruct.
   The  reason  sent  by  the  callback   is
              XmCR_OPERATION_CHANGED.   Specifies the cursor icon
              used to designate the type of  operation  performed
              by   the  drag  transaction.   If   NULL,  XmScreen
              resources provide default icons for copy, link, and
              move operations.  Specifies the cursor icon used to
              represent the source when a dynamic visual style is
              used.    If  NULL,  the  XmNdefaultSourceCursorIcon
              resource of  XmScreen  provides  a  default  cursor
              icon.   Specifies the pixmap icon used to represent
              the source when a preregister visual style is used.
              The  icon  is used in conjunction with the colormap
              of the widget passed to XmDragStart. If NULL,  XmNsourceCursorIcon
  is  used.   Specifies  the cursor
              icon used to designate the state of a drop site. If
              NULL,  XmScreen resources provide default icons for
              a valid,  invalid,  and  no  drop  site  condition.
              Specifies  the  list  of  callbacks that are called
              when the pointer enters a top-level window or  root
              window  (due to changing screens).  The type of the
              structure whose address is passed to this  callback
              is  XmTopLevelEnterCallbackStruct.  The reason sent
              by the callback is XmCR_TOP_LEVEL_ENTER.  Specifies
              the  list  of  callbacks  that  are called when the
              pointer leaves a top level window or the root  window
  (due  to  changing  screens).  The type of the
              structure whose address is passed to this  callback
              is  XmTopLevelLeaveCallbackStruct.  The reason sent
              by the callback is XmCR_TOP_LEVEL_LEAVE.  Specifies
              the foreground pixel value of the cursor designated
              as a valid cursor icon.

   Inherited Resources    [Toc]    [Back]
       DragContext inherits behavior and resources from the  following
  superclass.   For  a  complete description of each
       resource, refer to the Core(3X) man page.

       Core Resource Set    [Toc]    [Back]

       Class: XmCAccelerators
       Default: dynamic
       Type:  XtAccelerators
       Access: CSG
       Class: XmCSensitive
       Default: dynamic
       Type:  Boolean
       Access: G
       Class: XmCBackground
       Default: dynamic
       Type:  Pixel
       Access: CSG
       Class: XmCPixmap
       Default: XmUNSPECIFIED_PIXMAP
       Type:  Pixmap
       Access: CSG
       Class: XmCBorderColor
       Default: XtDefaultForeground
       Type:  Pixel
       Access: CSG
       Class: XmCPixmap
       Default: XmUNSPECIFIED_PIXMAP
       Type:  Pixmap
       Access: CSG
       Class: XmCBorderWidth
       Default: 0
       Type:  Dimension
       Access: CSG
       Class: XmCColormap
       Default: dynamic
       Type:  Colormap
       Access: CG
       Class: XmCDepth
       Default: dynamic
       Type:  int
       Access: CG
       Class: XmCCallback
       Default: NULL
       Type:  XtCallbackList
       Access: C
       Class: XmCHeight
       Default: dynamic
       Type:  Dimension
       Access: CSG
       Class: XmCInitialResourcesPersistent
       Default: True
       Type:  Boolean
       Access: C
       Class: XmCMappedWhenManaged
       Default: True
       Type:  Boolean
       Access: CSG
       Class: XmCScreen
       Default: dynamic
       Type:  Screen *
       Access: CG
       Class: XmCSensitive
       Default: True
       Type:  Boolean
       Access: CSG
       Class: XmCTranslations
       Default: dynamic
       Type:  XtTranslations
       Access: CSG
       Class: XmCWidth
       Default: dynamic
       Type:  Dimension
       Access: CSG
       Class: XmCPosition
       Default: 0
       Type:  Position
       Access: CSG
       Class: XmCPosition
       Default: 0
       Type:  Position
       Access: CSG


   Callback Information    [Toc]    [Back]
       Each of the DragContext callbacks has an associated  callback
 structure.

       A pointer to the following structure is passed to the XmNdragDropFinishCallback
 callback.  typedef struct {
         int      reason;
         XEvent   *event;
         Time       timeStamp;   }XmDragDropFinishCallbackStruct,
       *XmDragDropFinishCallback;

       Indicates  why  the  callback  was invoked.  Points to the
       XEvent that triggered the callback.  Specifies the time at
       which either the drag or the drop was completed.

       A  pointer  to  the following structure is passed to callbacks
 for XmNdragMotionCallback.  typedef struct {
         int           reason;
         XEvent        *event;
         Time          timeStamp;
         unsigned char operation;
         unsigned char operations;
         unsigned char dropSiteStatus;
         Position      x;
         Position      y; }XmDragMotionCallbackStruct, *XmDragMotionCallback;


       Indicates  why  the  callback  was invoked.  Points to the
       XEvent that triggered the callback.  Specifies the  timestamp
 of the logical event.  Identifies an operation.

              If  the  toolkit  has just called a DropSite's XmNdragProc,
 the toolkit initializes operation to  the
              value  of  the  operation member of the XmDragProcCallbackStruct
 at the time the DropSite's  XmNdragProc
 returns.

              If  the  toolkit  has not called an XmNdragProc and
              the pointer is within  an  active  drop  site,  the
              toolkit initializes operation by selecting an operation
 from the bitwise AND of the initial value  of
              the  operations  member  and the value of the DropSite's
 XmNdropSiteOperations resource. The  toolkit
              searches  this  set first for XmDROP_MOVE, then for
              XmDROP_COPY, then for XmDROP_LINK, and  initializes
              operation  to  the  first operation it finds in the
              set. If the toolkit finds none of these  operations
              in   the   set,   it   initializes   operation   to
              XmDROP_NOOP.

              If the toolkit has not called  an  XmNdragProc  and
              the  pointer is not within an active drop site, the
              toolkit initializes operation by selecting an operation
 from the initial value of the operations member.
  The  toolkit  searches  this  set  first  for
              XmDROP_MOVE,   then   for   XmDROP_COPY,  then  for
              XmDROP_LINK, and initializes operation to the first
              operation it finds in the set. If the toolkit finds
              none of these operations in the set, it initializes
              operation  to  XmDROP_NOOP.   Indicates  the set of
              operations supported for the source data.

              If the toolkit has just called  a  DropSite's  XmNdragProc,
 the toolkit initializes operations to the
              bitwise AND of the DropSite's XmNdropOperations and
              the  value  of the operations member of the XmDragProcCallbackStruct
 at the time the DropSite's  XmNdragProc
  returns.  If  the resulting set of operations
 is empty, the toolkit initializes  operations
              to XmDROP_NOOP.

              If  the  toolkit  has not called an XmNdragProc and
              the user does not select an operation (by  pressing
              a modifier key), the toolkit initializes operations
              to the value of the DragContext's XmNdragOperations
              resource.

              If  the  toolkit  has not called an XmNdragProc and
              the user does select an operation, the toolkit initializes
  operations to the bitwise AND of the corresponding
 operation and the value of the  DragContext's
 XmNdragOperations resource. If the resulting
              set of operations is empty, the toolkit initializes
              operations  to  XmDROP_NOOP.   Indicates whether or
              not a drop site is valid.

              If the toolkit has just called  a  DropSite's  XmNdragProc,
 the toolkit initializes dropSiteStatus to
              the value  of  the  dropSiteStatus  member  of  the
              XmDragProcCallbackStruct at the time the DropSite's
              XmNdragProc returns.

              If the toolkit has not called  an  XmNdragProc,  it
              initializes  dropSiteStatus as follows: the toolkit
              initializes dropSiteStatus to XmNO_DROP_SITE if the
              pointer  is  over  an  inactive drop site or is not
              over a drop site.  The  toolkit  initializes  dropSiteStatus
  to XmDROP_SITE_VALID if all the following
 conditions are met:  The  pointer  is  over  an
              active  drop site.  The DragContext's XmNexportTargets
 and the DropSite's XmNimportTargets  are  compatible.
  The initial value of the operation member
              is not XmDROP_NOOP.

              Otherwise, the toolkit  initializes  dropSiteStatus
              to XmDROP_SITE_INVALID.

       A  pointer  to  the  following structure is passed for the
       XmNdropFinishCallback callback: typedef struct {
         int           reason;
         XEvent        *event;
         Time          timeStamp;
         unsigned char operation;
         unsigned char operations;
         unsigned char dropSiteStatus;
         unsigned char dropAction;
         unsigned char  completionStatus;  }XmDropFinishCallbackStruct,
 *XmDropFinishCallback;

       Indicates  why  the  callback  was invoked.  Points to the
       XEvent that triggered the callback.  Specifies the time at
       which the drop was completed.  Identifies an operation.

              If the pointer is over an active drop site when the
              drop begins, the toolkit initializes  operation  to
              the  value  of  the operation member of the XmDropProcCallbackStruct
 at the time the DropSite's  XmNdropProc
 returns.

              If the pointer is not over an active drop site when
              the drop begins, the toolkit initializes  operation
              by selecting an operation from the initial value of
              the operations member. The  toolkit  searches  this
              set  first  for  XmDROP_MOVE, then for XmDROP_COPY,
              then for XmDROP_LINK, and initializes operation  to
              the  first  operation  it  finds  in the set. If it
              finds none of these operations in the set, it  initializes
  operation  to XmDROP_NOOP.  Indicates the
              set of operations supported for the source data.

              If the pointer is over an active drop site when the
              drop  begins, the toolkit initializes operations to
              the bitwise AND of the DropSite's XmNdropOperations
              and  the  value  of  the  operations  member of the
              XmDropProcCallbackStruct at the time the DropSite's
              XmNdropProc returns. If the resulting set of operations
 is empty, the toolkit initializes  operations
              to XmDROP_NOOP.

              If the pointer is not over an active drop site when
              the drop begins and if the user does not select  an
              operation (by pressing a modifier key), the toolkit
              initializes operations to the value of the DragContext's
 XmNdragOperations resource.

              If the pointer is not over an active drop site when
              the drop begins and if  the  user  does  select  an
              operation,  the  toolkit  initializes operations to
              the bitwise AND of the corresponding operation  and
              the  value  of  the DragContext's XmNdragOperations
              resource. If the resulting  set  of  operations  is
              empty,   the   toolkit  initializes  operations  to
              XmDROP_NOOP.  Indicates whether or not a drop  site
              is valid.

              If the pointer is over an active drop site when the
              drop begins, the toolkit initializes dropSiteStatus
              to  the  value  of the dropSiteStatus member of the
              XmDropProcCallbackStruct at the time the DropSite's
              XmNdropProc returns.

              If the pointer is not over an active drop site when
              the drop begins, the toolkit initializes dropSiteStatus
   to  XmNO_DROP_SITE.   Identifies  the  drop
              action.  The  values  are:  XmDROP,  XmDROP_CANCEL,
              XmDROP_HELP,   and   XmDROP_INTERRUPT.   The  value
              XmDROP_INTERRUPT is currently unsupported; if specified,
  it will be interpreted as an XmDROP_CANCEL.
              An IN/OUT member that indicates the status  of  the
              drop action.  After the last callback procedure has
              returned, the final value of this member determines
              what  visual  transition  effects  will be applied.
              There are two values: The drop was successful.  The
              drop was unsuccessful.

       A  pointer  to  the following structure is passed to callbacks
 for XmNdropSiteEnterCallback: typedef struct {
         int           reason;
         XEvent        *event;
         Time          timeStamp;
         unsigned char operation;
         unsigned char operations;
         unsigned char dropSiteStatus;
         Position      x;
         Position          y;     }XmDropSiteEnterCallbackStruct,
       *XmDropSiteEnterCallback;

       Indicates  why  the  callback  was invoked.  Points to the
       XEvent that triggered the callback.   Specifies  the  time
       the crossing event occurred.  Identifies an operation.

              If  the  toolkit  has just called a DropSite's XmNdragProc,
 the toolkit initializes operation to  the
              value  of  the  operation member of the XmDragProcCallbackStruct
 at the time the DropSite's  XmNdragProc
 returns.

              If  the  toolkit  has not called an XmNdragProc, it
              initializes operation  by  selecting  an  operation
              from  the  bitwise  AND of the initial value of the
              operations member and the value of  the  DropSite's
              XmNdropSiteOperations    resource.    The   toolkit
              searches this set first for XmDROP_MOVE,  then  for
              XmDROP_COPY,  then for XmDROP_LINK, and initializes
              operation to the first operation it  finds  in  the
              set.  If the toolkit finds none of these operations
              in   the   set,   it   initializes   operation   to
              XmDROP_NOOP.   Indicates the set of operations supported
 for the source data.

              If the toolkit has just called  a  DropSite's  XmNdragProc,
 the toolkit initializes operations to the
              bitwise AND of the DropSite's XmNdropOperations and
              the  value  of the operations member of the XmDragProcCallbackStruct
 at the time the DropSite's  XmNdragProc
  returns.  If  the resulting set of operations
 is empty, the toolkit initializes  operations
              to XmDROP_NOOP.

              If  the  toolkit  has not called an XmNdragProc and
              the user does not select an operation (by  pressing
              a modifier key), the toolkit initializes operations
              to the value of the DragContext's XmNdragOperations
              resource.

              If  the  toolkit  has not called an XmNdragProc and
              the user does select an operation, the toolkit initializes
  operations to the bitwise AND of the corresponding
 operation and the value of the  DragContext's
 XmNdragOperations resource. If the resulting
              set of operations is empty, the toolkit initializes
              operations  to  XmDROP_NOOP.   Indicates whether or
              not a drop site is valid.

              If the toolkit has just called  a  DropSite's  XmNdragProc,
 the toolkit initializes dropSiteStatus to
              the value  of  the  dropSiteStatus  member  of  the
              XmDragProcCallbackStruct at the time the DropSite's
              XmNdragProc returns.

              If the toolkit has not called  an  XmNdragProc,  it
              initializes  dropSiteStatus as follows: the toolkit
              initializes dropSiteStatus to XmDROP_SITE_VALID  if
              the  DragContext's  XmNexportTargets  and the DropSite's
 XmNimportTargets are compatible and  if  the
              initial  value  of  the  operation  member  is  not
              XmDROP_NOOP.  Otherwise,  the  toolkit  initializes
              dropSiteStatus  to  XmDROP_SITE_INVALID.  Indicates
              the x-coordinate of  the  pointer  in  root  window
              coordinates.   Indicates  the  y-coordinate  of the
              pointer in root window coordinates.

       A pointer to the following structure is  passed  to  callbacks
 for XmNdropSiteLeaveCallback.  typedef struct {
         int      reason;
         XEvent   *event;
         Time        timeStamp;   }XmDropSiteLeaveCallbackStruct,
       *XmDropSiteLeaveCallback;

       Indicates why the callback was  invoked.   Points  to  the
       XEvent  that triggered the callback.  Specifies the timestamp
 of the logical event.

       A pointer to the following structure  is  passed  for  the
       XmNdropStartCallback callback: typedef struct {
         int           reason;
         XEvent        *event;
         Time          timeStamp;
         unsigned char operation;
         unsigned char operations;
         unsigned char dropSiteStatus;
         unsigned char dropAction;
         Position      x;
         Position       y;  }XmDropStartCallbackStruct,  *XmDropStartCallback;


       Indicates why the callback was  invoked.   Points  to  the
       XEvent that triggered the callback.  Specifies the time at
       which the drag was completed.  Identifies an operation.

              If the pointer is over an active drop site when the
              drop  begins,  the toolkit initializes operation to
              the value of the operation member  of  the  XmDropProcCallbackStruct
  at the time the DropSite's XmNdropProc
 returns.

              If the pointer is not over an active drop site when
              the  drop begins, the toolkit initializes operation
              by selecting an operation from the initial value of
              the  operations  member.  The toolkit searches this
              set first for XmDROP_MOVE,  then  for  XmDROP_COPY,
              then  for XmDROP_LINK, and initializes operation to
              the first operation it finds  in  the  set.  If  it
              finds  none of these operations in the set, it initializes
 operation to XmDROP_NOOP.   Indicates  the
              set of operations supported for the source data.

              If the pointer is over an active drop site when the
              drop begins, the toolkit initializes operations  to
              the bitwise AND of the DropSite's XmNdropOperations
              and the value  of  the  operations  member  of  the
              XmDropProcCallbackStruct at the time the DropSite's
              XmNdropProc returns. If the resulting set of operations
  is empty, the toolkit initializes operations
              to XmDROP_NOOP.

              If the pointer is not over an active drop site when
              the  drop begins and if the user does not select an
              operation (by pressing a modifier key), the toolkit
              initializes operations to the value of the DragContext's
 XmNdragOperations resource.

              If the pointer is not over an active drop site when
              the  drop  begins  and  if  the user does select an
              operation, the toolkit  initializes  operations  to
              the  bitwise AND of the corresponding operation and
              the value of  the  DragContext's  XmNdragOperations
              resource.  If  the  resulting  set of operations is
              empty,  the  toolkit  initializes   operations   to
              XmDROP_NOOP.   Indicates whether or not a drop site
              is valid.

              If the pointer is over an active drop site when the
              drop begins, the toolkit initializes dropSiteStatus
              to the value of the dropSiteStatus  member  of  the
              XmDropProcCallbackStruct at the time the DropSite's
              XmNdropProc returns.

              If the pointer is not over an active drop site when
              the drop begins, the toolkit initializes dropSiteStatus
 to XmNO_DROP_SITE.   An  IN/OUT  member  that
              identifies  the drop action. The values are XmDROP,
              XmDROP_CANCEL, XmDROP_HELP,  and  XmDROP_INTERRUPT.
              The  value  of dropAction can be modified to change
              the   action   actually   initiated.   The    value
              XmDROP_INTERRUPT is currently unsupported; if specified,
 it will be interpreted as  a  XmDROP_CANCEL.
              Indicates  the  x-coordinate of the pointer in root
              window coordinates.  Indicates the y-coordinate  of
              the pointer in root window coordinates.

       A  pointer  to  the  following  structure is passed to the
       XmNoperationChangedCallback callback: typedef struct {
         int           reason;
         XEvent        *event;
         Time          timeStamp;
         unsigned char operation;
         unsigned char operations;
         unsigned char  dropSiteStatus;  }XmOperationChangedCallbackStruct,
 *XmOperationChangedCallback;

       Indicates  why  the  callback  was invoked.  Points to the
       XEvent that triggered the callback.  Specifies the time at
       which  the  crossing event occurred.  Identifies an operation.


              If the toolkit has just called  a  DropSite's  XmNdragProc,
  the toolkit initializes operation to the
              value of the operation member  of  the  XmDragProcCallbackStruct
  at the time the DropSite's XmNdragProc
 returns.

              If the toolkit has not called  an  XmNdragProc  and
              the  pointer  is  within  an  active drop site, the
              toolkit initializes operation by selecting an operation
  from the bitwise AND of the initial value of
              the operations member and the value  of  the  DropSite's
  XmNdropSiteOperations resource. The toolkit
              searches this set first for XmDROP_MOVE,  then  for
              XmDROP_COPY,  then for XmDROP_LINK, and initializes
              operation to the first operation it  finds  in  the
              set.  If the toolkit finds none of these operations
              in   the   set,   it   initializes   operation   to
              XmDROP_NOOP.

              If  the  toolkit  has not called an XmNdragProc and
              the pointer is not within an active drop site,  the
              toolkit initializes operation by selecting an operation
 from the initial value of the operations member.
   The  toolkit  searches  this  set  first for
              XmDROP_MOVE,  then  for   XmDROP_COPY,   then   for
              XmDROP_LINK, and initializes operation to the first
              operation it finds in the set. If the toolkit finds
              none of these operations in the set, it initializes
              operation to XmDROP_NOOP.   Indicates  the  set  of
              operations supported for the source data.

              If  the  toolkit  has just called a DropSite's XmNdragProc,
 the toolkit initializes operations to the
              bitwise AND of the DropSite's XmNdropOperations and
              the value of the operations member of  the  XmDragProcCallbackStruct
  at the time the DropSite's XmNdragProc
 returns. If the resulting  set  of  operations
  is empty, the toolkit initializes operations
              to XmDROP_NOOP.

              If the toolkit has not called  an  XmNdragProc  and
              the  user does not select an operation (by pressing
              a modifier key), the toolkit initializes operations
              to the value of the DragContext's XmNdragOperations
              resource.

              If the toolkit has not called  an  XmNdragProc  and
              the user does select an operation, the toolkit initializes
 operations to the bitwise AND of the  corresponding
  operation and the value of the DragContext's
 XmNdragOperations resource. If the resulting
              set of operations is empty, the toolkit initializes
              operations to XmDROP_NOOP.   Indicates  whether  or
              not a drop site is valid.

              If  the  toolkit  has just called a DropSite's XmNdragProc,
 the toolkit initializes dropSiteStatus to
              the  value  of  the  dropSiteStatus  member  of the
              XmDragProcCallbackStruct at the time the DropSite's
              XmNdragProc returns.

              If  the  toolkit  has not called an XmNdragProc, it
              initializes dropSiteStatus as follows: the  toolkit
              initializes dropSiteStatus to XmNO_DROP_SITE if the
              pointer is over an inactive drop  site  or  is  not
              over  a  drop  site.  The toolkit initializes dropSiteStatus
 to XmDROP_SITE_VALID if all the  following
  conditions  are  met:  The  pointer is over an
              active drop site The DragContext's XmNexportTargets
              and  the DropSite's XmNimportTargets are compatible
              The initial value of the operation  member  is  not
              XmDROP_NOOP

              Otherwise,  the  toolkit initializes dropSiteStatus
              to XmDROP_SITE_INVALID.

       A pointer to the following structure is  passed  to  callbacks
 for XmNtopLevelEnterCallback: typedef struct {
         int           reason;
         XEvent        *event;
         Time          timestamp;
         Screen        screen;
         Window        window;
         Position      x;
         Position      y;
         unsigned  char  dragProtocolStyle; }XmTopLevelEnterCallbackStruct,
 *XmTopLevelEnterCallback;

       Indicates why the callback was  invoked.   Points  to  the
       XEvent  that triggered the callback.  Specifies the timestamp
 of the logical event.  Specifies the  screen  associated
  with  the  top-level  window  or  root  window being
       entered.  Specifies the ID of the top-level window or root
       window  being  entered.  Indicates the x-coordinate of the
       pointer in root window coordinates.  Indicates the y-coordinate
  of the pointer in root window coordinates.  Specifies
 the protocol style adopted  by  the  initiator.   The
       values  are XmDRAG_DROP_ONLY, XmDRAG_DYNAMIC, XmDRAG_NONE,
       and XmDRAG_PREREGISTER.

       A pointer to the following structure is  passed  to  callbacks
 for XmNtopLevelLeaveCallback: typedef struct {
         int      reason;
         XEvent   *event;
         Time     timestamp;
         Screen   screen;
         Window    window; }XmTopLevelLeaveCallbackStruct, *XmTopLevelLeaveCallback;


       Indicates why the callback was  invoked.   Points  to  the
       XEvent  that triggered the callback.  Specifies the timestamp
 of the logical event.  Specifies a screen  associated
       with  the  top-level  window  or  root  window being left.
       Specifies the ID of the top-level window  or  root  window
       being left.

   Translations    [Toc]    [Back]
       The  XmDragContext  translations  are  listed below. These
       translations may not directly correspond to a  translation
       table.  BDrag Motion:  DragMotion() BDrag Release: FinishDrag()
 KCancel:        CancelDrag()  KHelp:          HelpDrag()



   Action Routines    [Toc]    [Back]
       The  XmDragContext  action  routines  are described below:
       Cancels the drag operation and frees the associated  DragContext.
  Drags the selected data as the pointer is moved.
       Finishes the drag operation and starts the drop operation.
       Initiates  a conditional drop that enables the receiver to
       provide help information to the user.  The user can cancel
       or  continue the drop operation in response to this information.


   Virtual Bindings    [Toc]    [Back]
       The bindings for virtual keys  are  vendor  specific.  For
       information  about  bindings for virtual buttons and keys,
       see VirtualBindings(3X).

SEE ALSO    [Toc]    [Back]

      
      
       Core(3X), XmDisplay(3X), XmDragCancel(3X), XmDragIcon(3X),
       XmDragStart(3X),    XmDropSite(3X),    XmDropTransfer(3X),
       XmScreen(3X)



                                                XmDragContext(3X)
[ Back ]
 Similar pages
Name OS Title
XmGetDragContext IRIX A Drag and Drop function that retrieves the DragContext widget ID associated with a timestamp
XmGetDragContext HP-UX A Drag and Drop function that retrieves the DragContext widget ID associated with a timestamp
XmGetDragContext Tru64 A Drag and Drop function that retrieves the DragContext widget ID associated with a timestamp
Constraint IRIX The Constraint widget class
tmselectionbox IRIX the SelectionBox widget class
tmsgigrid IRIX the SGI Grid widget class
tmsgipanel IRIX the SGI IconPanel widget class
tmsgithumbwheel IRIX the SGI sgThumbWheel widget class
SgColorChooser IRIX The ColorChooser widget class
tmspinbox IRIX the SpinBox widget class
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service