user manual

296 Chapter 13: Creating a User Interface Service
Predefined iTool UI Services iTool Developers Guide
Example
RETURN, oTool->DoUIService('PropertySheet', self)
Operation Preview Service
This service is designed to be called from within the DoExecuteUI method of an
iTool operation that acts on a two-dimensional array. It displays the property sheet
for the operation, allowing the user to set any operation properties before the
operation is executed, along with a preview window showing the result. The self
argument is the IDLitOperation object. The return value is 1 (one) if the specified
properties were set as requested, or 0 (zero) otherwise.
Note
The preview window displays a subset (a 128 by 128 element array) of the data
being operated on. When the preview is displayed, the Execute method of your
operation is called with this subset only. If your operation requires padding around
the edges or has a minimum data array size, your operation’s GetProperty method
must implement a MINIMUM_DIMENSIONS property that specifies the smallest
amount of data that can be used by the operation.
See the unsharp masking operation in the standard iTools distribution
(
lib/itools/components/idlitopunsharpmask__define.pro) for an
example.
Registered Service Name
OperationPreview
Example
RETURN, oTool->DoUIService('OperationPreview', self)