paste Callback Type
Function prototype:
function funcname (doc, buffername, after, op)
The paste hook is called before a paste operation is done in the Edit window.
A drag and drop action uses a special paste buffer named _APT_DRAGDROP_PASTEBUF. You can check _APT_DRAGDROP_PASTEBUF to tell if the paste operation is due to a drag and drop action.
Arguments
• doc is the identifier of the document associated with this function.
• buffername is the name of the paste buffer being pasted.
• after determines whether the table object(s) in the paste buffer will be pasted before or after the cell, row, or column containing the text caret. If after is zero, the table object(s) in the paste buffer will be pasted before the cell, row, or column containing the text caret. If after is not zero, then the table object(s) in the paste buffer will be pasted after the cell, row, or column containing the text caret. If the hook will be performing the paste itself, it can use this parameter to determine whether the -after flag should be supplied to the paste command.
• 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.
Related Topics