Arbortext Command Language > Callbacks > doc_add_callback > modify_tag Callback Type
  
modify_tag Callback Type
Function prototype:
function funcname (doc, oid, win, op)
modify_tag is called before a Modify Attributes dialog box is opened to modify the attributes of an element. This allows an application to automatically set certain attributes before the dialog box is displayed or to prevent the dialog box from being displayed (by destroying it). modify_tag applies only to elements, and cannot be used to set attributes of processing instructions.
modify_tag is called before the dialog box fields are initialized, so that any changes made to attribute values by the callback will be reflected in the dialog box. If modify_tag returns -1, the Modify Attributes dialog box is not displayed. for example, if modify_tag does not want the tag to be modified or sets the attributes itself.
Arguments
doc is the identifier of the document associated with this function.
oid is the object identifier of the tag being modified.
win is the window identifier of the Modify Attributes dialog box.
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.