Arbortext Command Language > Functions by Alphabetical Listing > drag_start
  
drag_start
drag_start ([cut])
This function turns on drag-and-drop editing. The function tracks the mouse movement and gives the user visual feedback on whether or not the selected area can be pasted at the cursor location. The function also tracks the state of the ctrl key to determine if the user intends to copy the selection (ctrl key selected during the drag) or cut the selection (ctrl key not selected during the drag). The cursor moves with the mouse pointer and indicates where the drop should occur.
You must have something selected in the window for this function to work. Usually, the function is mapped with a mouse button down event.
If the optional cut flag is set to 1, Arbortext Editor ignores the state of the ctrl key and forces a cut to take place, if it doesn't cause a context error.
To give users visual feedback, part of the selection is drawn under the mouse pointer during the drag.
This is an image of the cursor and a green check mark, indicating that you can append the selected content in the cursor location. — The green check mark indicates that you can paste the text being dragged in the current cursor location.
This is an image of the cursor and a red not symbol, indicating that you cannot paste the selected content in the current cursor location. — The red not symbol indicates that you cannot paste the content being dragged in the current cursor location.
This is an image of the cursor and a blue plus sign, indicating that you can append the selected content at the current cursor location. — The blue plus sign indicates that you can insert the content being dragged at the current cursor location.
Use the drag_stop function to stop the mouse tracking initiated by drag_start.
This function returns a 1 on success, and 0 on failure.
Related Topics
drag_stop function