Arbortext Command Language > Callbacks > doc_add_callback > tbl_rectangle_dragable Callback Type
  
tbl_rectangle_dragable Callback Type
Function prototype:
function funcname (doc, source_ul, source_lr, op)
tbl_rectangle_dragable is called by the table editor user interface before a drag-and-drop operation begins. It lets you grant or deny the user interface permission to initiate a drag and drop operation.
Arguments
doc is the identifier of the document containing source_ul and source_lr.
source_ul is the table object ID (toid) of the upper-left corner cell in the region to be dragged.
source_lr is the table object ID (toid) of the lower-right corner cell in the region to be dragged.
op is the function callback operation. Callbacks are called twice in succession with op specifying the stage of callback operation.
1. op == 1 first call — The returned argument specifies whether the execution should continue or be stopped:
0 — Continue callback processing.
-1 — Stop further callback processing.
2. op == 2 second call — Occurs unless the processing was stopped during the first call. The returned argument allows or prevents basic Arbortext Editor processing after all callbacks have been called:
0 — Basic Arbortext Editor processing allowed.
-1 — Basic Arbortext Editor processing prevented.
Returns
tbl_rectangle_dragable may return:
0: the drag operation should proceed
-1: the drag operation is forbidden