vlr-docmanager-reactor


(vlr-docmanager-reactor customData callbackList)

This function creates and attaches a DocManager operation reactor to the current drawing, for the document events specified by callbackList.

Arguments

customData  (any valid Lisp data) custom data to be associated with the reactor object, can be NIL
callbackList  (list)  list of DottedPair entries, each DottedPair has the form
(event . callback)

event : one of these symbolic constants


:vlr-documentCreated

the new document was created


:vlr-documentToBeDestroyed

the document is about to be destroyed


:vlr-documentLockModeWillChange

the lock mode of the drawing is about to be changed


:vlr-documentLockModeChangeVetoed

the lock mode change was vetoed (i.e. a command to be started was cancelled)


:vlr-documentLockModeChanged

the lock mode of the drawing was changed


:vlr-documentBecameCurrent

the drawing became the current drawing


:vlr-documentToBeActivated

the drawing is about to be activated


:vlr-documentToBeDeactivated

the drawing is about to be deactivated


callback : the client Lisp side callback function, using 2 arguments :
(defun MyCB ( reactor args / ...) ...)

reactor : the DocManager reactor object - #<VLR-DocManager-Reactor>
args : (list) contains 1 or more arguments depending on the particular event :


:vlr-documentCreated
:vlr-documentToBeActivated
:vlr-documentToBeDeactivated
:vlr-documentBecameCurrent
:vlr-documentToBeDestroyed

1 argument
- the drawing being affected by these events (VLA-Object)


:vlr-documentLockModeChangeVetoed

2 arguments
- the drawing being affected by these events (VLA-Object)
- the command name (string, global name) which caused the locking request


:vlr-documentLockModeWillChange
:vlr-documentLockModeChanged

5 arguments
- the drawing being affected by these events (VLA-Object)
- integer, specifies the actual lock mode :
1 = auto-write lock
2 = not locked
4 = shared-write
8 = read
10 = exclusive-write

- integer, specifies the lock mode to be changed to:(see above)
- integer, the summarised locking mode (from all actual contexts)
- the command name (string, global name) which caused the locking request;
for an unlocking request, the global command name uses a "#" prefix

Return

the reactor object #<VLR-DocManager-Reactor> or NIL

Example


Remarks

Note : "documentToBeActivated" and "documentToBeDeactivated" are *NOT* related to the "current" status of a drawing, but strictly to the "window" status, being focused or not !!
This is a widely spread misunderstanding !



©  Bricsys NV. All rights reserved.