vlr-undo-reactor


(vlr-undo-reactor customData callbackList)

This function creates and attaches a Undo command reactor to the current drawing, for the command 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-undoSubcommandAuto

Undo option "Auto" has been processed


:vlr-undoSubcommandControl

Undo option "Control" has been processed


:vlr-undoSubcommandBegin

Undo option "Begin" (or "Group") is about to be processed


:vlr-undoSubcommandEnd

Undo option "End" is about to be processed


:vlr-undoSubcommandMark

Undo option "Mark" is about to be processed


:vlr-undoSubcommandBack

Undo option "Back" is about to be processed


:vlr-undoSubcommandNumber

Undo option "Number" is about to be processed


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

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


:vlr-undoSubcommandBegin
:vlr-undoSubcommandEnd
:vlr-undoSubcommandMark
:vlr-undoSubcommandBack

1 argument (integer) status
integer value is always 0, indicates "operation is about to start"


:vlr-undoSubcommandAuto

2 arguments
1st argument : (integer) status, always 4, indicates "operation finished"
2nd argument : (symbol) T/NIL - T indicates "Auto" is ON, NIL indicates OFF


:vlr-undoSubcommandControl

2 arguments
1st argument : (integer) status, always 4, indicates "operation finished"
2nd argument : (integer) "Control" option 0=None  1=One  2=All


:vlr-undoSubcommandNumber

2 arguments
1st argument (integer) status, always 0, indicates "operation is about to start"
2nd argument (integer) number of undo staps to be undone

Return

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

Example


Remarks




©  Bricsys NV. All rights reserved.