QG_GetDragSource

QG_GetDragSource(areaRef; sourceArea; sourceProcess; matchSignature):errorCode
areaRef Longint QGrid area reference
sourceArea Longint Drag source area reference
sourceProcess Longint Drag source process number
matchSignature String31 First matching signature
error Longint Error result

Returns information about the last drop event on a grid area.

Parameter areaRef is the QGrid area reference. If areaRef is not a valid QGrid area reference, qg_paramErr error is returned.

Parameter sourceArea receives the drag source area reference number for the last drop event on the grid area. This is a valid QGrid area reference number that can be used to get more information about the drag source area.

Parameter sourceProcess receives the process number of the drag source area for the last drop event.

Parameter matchSignature receives the first drag signature of the drag source grid area that matches with one of the drop target area's drop signatures.

Example

` finding the drag source inside a QGrid callback routine
 
` method QG_CALLBACK
` Simple QGrid callback routine
 
C_LONGINT($1) ` areaRef
C_LONGINT($2) ` event Type
C_LONGINT($3) ` event Data
 
C_LONGINT($0) ` result -- currently unused
 
C_LONGINT($sourceArea;$sourceProcess)
C_STRING(31;$matchStr)
 
Case of
  : ($2=qg_ClickEvent)
    . . .
  : ($2=qg_DoubleClickEvent)
    . . .
  : ($2=qg_DropEvent)
 
    $err:=QG_GetDragSource($1;$sourceArea;$sourceProcess;$matchStr)
 
    If ($err # qg_NoErr)
      ` Handle the error
    Else
      If ($sourceArea = $1)
        ` drag and drop inside the same area
      Else
        If ($sourceProcess = Current process)
          ` drag and drop inside the same process
        Else
          ` stuff coming from another process
        End if
      End if
    End if
End case

Related commands

QG_SetEventHandler Installs an event handler method for a QGrid area
QG_SetDragSignatures Configures a grid area to allow dragging
QG_SetDropSignatures Configures a grid area to allow dropping

QGrid © Escape
Generated by QDoc 2.8 on Thu, Oct 8, 2009 17:36:11