EtsT_Ctl_Tree_Drag_Drop_Proc
Note: Requires OPNET Development Kit
Abstract
Callback: Called as needed during a tree drag and drop action to perform related operations.
Syntax
<tree_drag_drop_proc_name> (src_ctl_ptr, dest_ctl_ptr, drop_point, tree_nodes_lptr, drop_op, options)
| Argument | Type | Description |
|---|---|---|
src_ctl_ptr |
EtsT_Ctl * |
Control from which an object was dragged. |
dest_ctl_ptr |
EtsT_Ctl * |
Control on which the object is being dropped. |
drop_point |
EtsT_Point * |
Control point at which the object is being dropped. |
tree_nodes_lptr |
PrgT_List * |
List of tree nodes that were selected at the time the drag was initiated. |
drop_op |
EtsT_Ctl_Tree_Drag_Drop_Op | Drag and drop operation in progress; one of the values given in Table 20 Callback Symbolic Constants. |
options |
int |
Reserved for future use. |
Return Type
EtsT_Boolean
EtsC_True or EtsC_False, depending on drag and drop status as determined by the callback. The meaning of the return value depends on the value of drop_op; see Details for more information.
Header
ets_api_gui.h
Details
This callback performs custom processing to support a tree drag and drop action. There are four types of operations this callback should support, as specified by the drop_op argument. Table 19 lists these operations and the expected return values.
Table 19: Tree Drag and Drop Operations
| Operation¹ | Description | Meaning of Return Value: EtsC_True |
Meaning of Return Value: EtsC_False |
|---|---|---|---|
Initiate_Drag |
Called when a tree drag is started. Callback should perform any preliminary processing needed for the tree drag and drop. This can be used to qualify the object being dragged or to prevent dragging under certain conditions. | OK to proceed with drag and drop. | Do not proceed with drag and drop. |
Query |
Called when the cursor moves during a tree drag. Callback should determine if the cursor is over a valid location for a drop. | Cursor is over a valid drop point. | Cursor is over an invalid drop point. |
Drop |
Called when the mouse button is released during a tree drop and drag. Callback should determine if the cursor is over a valid location and, if so, perform the drop by installing the dragged objects in the destination. | Drop succeeded. | Drop failed. |
Abort |
Called when the user aborts a drag and drop. Callback should undo any related processing performed earlier. | Drag and drop was aborted successfully. | Drag and drop could not be aborted. |
Note 1: These operations represent the last part of a symbolic constant beginning with EtsC_Ctl_Tree_Drag_Drop_Op_.
Callbacks of this type are registered by Ets_Ctl_Tree_Drag_Drop_Callback_Register().