Справочник Пользователя для ITT Rule IDL Version 7.0

Скачать
Страница из 430
202
Chapter 8: Creating a Manipulator
Manipulators and the Undo/Redo System
iTool Developer’s Guide
Manipulators and the Undo/Redo System
A manipulator can be configured to support undo/redo functionality when it invokes 
an associated operation that records the actions performed by the manipulator in the 
undo/redo buffer. This operation can be a custom operation or an existing operation. 
(See 
 for details on operation creation.) In the 
manipulator class Init method, specify a string value for the 
OPERATION_IDENTIFIER keyword to indicate the name of the operation 
associated with the manipulator. 
Note
If the manipulator modifies a property exposed on the target object, you can specify 
the built-in SET_PROPERTY operation to manage undo-redo information. Set 
OPERATION_IDENTIFIER='SET_PROPERTY' 
as shown in 
 on page 208. This built-in operation automates undo/redo 
transactions. 
When using the SET_PROPERTY operation, you must also set the 
PARAMETER_IDENTIFIER keyword during initialization. Set this keyword to the 
property identifier of the property being manipulated. To determine the identifiers of 
a visualization’s properties, you can retrieve the object’s identifier and retrieve the 
names of all registered properties as described in 
in Appendix A. The following example uses the itPropertyReport procedure to print 
all the registered property names and identifiers supported by the object to the Output 
Log window. The following sample code shows how to retrieve the properties 
associated with an image. 
; Get the tool reference.
idtool=ITGETCURRENT(TOOL = oTool)
; Retrieve the parameter identifier for the the image.
; Print the identifier, name and type of each associated 
; registered property using the ItPropertyReport procedure. 
vImage = oTool->FindIdentifiers('*image*', /VISUALIZATION)
itPropertyReport, otool, vImage
Note
See 
 in Appendix A for more information about 
property identifiers and names.