Arbortext Command Language > Callbacks > doc_add_callback > quick_attribute Callback Type
  
quick_attribute Callback Type
Function prototype:
function funcname (doc, oid, win, op)
quick_attribute is called before a Quick Attribute 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). quick_attribute applies only to elements, and cannot be used to set attributes of processing instructions.
quick_attribute 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 quick_attribute returns -1, the Quick Attribute dialog box is not displayed. for example, if quick_attribute 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 Quick Attribute 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.