Chapter 8: Creating a Manipulator 221
iTool Developer’s Guide Creating a New Manipulator
Discussion
This DoRegisterCursor method defines a 16-element string array of 16 characters
each that represents the cursor. The strArray contains the following elements:
• the “#” symbols translate into the black areas of the cursor body
• the “.” symbols indicate the white mask area
• the “$” defines the hot spot, relating to the mouse cursor position when the
manipulator is active
Pass the string array and cursor name (the Name argument value) to the
RegisterCursor method. Set the DEFAULT keyword to indicate this is the default
cursor for this manipulator.
Note
The Name argument specified here is the same as that returned by the
GetCursorType method. See “IDLitManipulator::GetCursorType” (IDL Reference
Guide) for more information.
Creating GetProperty or SetProperty Methods
The manipulator class GetProperty method retrieves property values from the
manipulator object instance or from instance data of other associated objects. It
should retrieve the requested property value, either from the manipulator object’s
instance data or by calling another class’ GetProperty method. See
“IDLitManipulator::GetProperty” (IDL Reference Guide) for additional details.
The manipulator class SetProperty method stores property values in the manipulator
object’s instance data or in properties of associated objects. It should set the specified
property value, either by storing the value directly in the manipulator object’s
instance data or by calling another class’ SetProperty method. See
“IDLitManipulator::SetProperty” (IDL Reference Guide) for additional details.
Example GetProperty and SetProperty Methods
The following example code shows a very simple GetProperty method for the
ExampleManip operation:
PRO ExampleManip::GetProperty, _REF_EXTRA = _extra
; Get superclass properties.
IF (N_ELEMENTS(_extra) GT 0) THEN $
self->IDLitManipulator::GetProperty, _EXTRA = _extra
END
Comments to this Manuals