/ HALion Developer Resource / HALion Macro Page / Controls /
Drag Group
(Since HALion 7.0)
On this page:
Description
The Drag Group control allows you to implement drag operations. You can drag a simple text information or excecute more complex script functions. As a drop target you can use either the Drop control, or an external target. The graphical representation of the dragged object includes a snapshot of all controls that exists inside the Drag Group.
Properties
Poperty | Description |
---|---|
Name | The name of the element. This name will be displayed in the GUI Tree. |
Scope | Allows you to define which part of the Program Tree is affected by the controls inside the Group. |
Drag Info | The Drag Info can be used as follows:
|
Position/Size | Position X, Position Y, Width, Height: Position and size of the element in pixels. Position X/Y defines the position of the upper left corner. |
Attach | Defines how an element behaves when its parent element is resized. You can set the following parameters:
|
Tooltip | Text that appears as a tooltip when the mouse hovers over the element. |
Drag Group Callbacks
onDropGetInfo
onDropGetInfo(viewname, draginfo)
Description
Callback for the source of the drag operation when the operation starts. The text in draginfo
is taken from the Drag Info property of the control.
Arguments
Argument | Description | Value Type |
---|---|---|
viewname | The name of the dragging view. | string |
draginfo | The text specified by the Drag Info property. | string |
Return Values
The function can return a table with the following keys:
Return Value | Description | Value Type |
---|---|---|
copy | Set this to true if copying is allowed, false if not. | boolean |
move | Set this to true if moving is allowed, false if not. | boolean |
info | The draginfo argument of the subsequent callbacks is determined by this return value. By default, 'info' returns the string specified by the Drag Info property. By modifying the 'info' return value you can control the response of the subsequent callbacks. | string |
files | A table with file paths for evaluation by external software when the drop operation is executed there. | table with file paths as strings |
data (Since HALion 7.1.0) | A table with filenames and region information, created when dropping a region from Cubase, for example. | See Data Field Format. |
Data Field Format
The data field contains tables with filenames and region information.
{ files = { "fn1", "fn2", ... } }
{ regions = { { filename = "fn1", start = 123, length = 456 }, { filename = "fn2", start = 456, length = 789 }, ... } } }
onDropInsert
onDropInsert(viewname, draginfo, copy, data)
Description
Callback for the target of the drag operation when the drop is executed.
Arguments
Argument | Description | Value Type |
---|---|---|
viewname | The name of the targeted view. | string |
draginfo | This string is specified by the 'info' return value of the onDropGetInfo callback when the drag operation starts. | string |
copy | Indicates if the drag is a copy operation. | string |
data (Since HALion 7.1.0) | A table with filenames and region information when dropping a region from Cubase, for example. | See Data Field Format. |
onDropFeedback
(Since HALion 7.1.0)
onDropFeedback(viewname, draginfo, copy, data)
Description
Callback for the target of the drag operation when a drag object is held over it.
Arguments
Argument | Description | Value Type |
---|---|---|
viewname | The name of the targeted view. | string |
draginfo | This string is specified by the 'info' return value of the onDropGetInfo callback when the drag operation starts. | string |
copy | Indicates if the drag is a copy operation. | string |
data | A table with filenames and region information when dropping a region from Cubase, for example. | See Data Field Format. |
onDropDone
onDropDone(viewname, draginfo, copy, data)
Description
This callback is called when the drop operation is complete.
Arguments
Argument | Description | Value Type |
---|---|---|
viewname | The name of the source view. | string |
draginfo | This string is specified by the 'info' return value of the onDropGetInfo callback when the drag operation starts. | string |
copy | Indicates if the drag is a copy operation. | string |
data (Since HALion 7.1.0) | A table with filenames and region information when dropping a region from Cubase, for example. | See Data Field Format. |