Predefined iTool UI Services

The iTool system distributed with IDL includes a number of predefined UI services. These UI services are registered with the iTool system, which means that you can call them from any operation, visualization, or other iTool component using the DoUIService method of the IDLitTool class.

The majority of the predefined UI services provide interface elements that are specific to the standard iTool implementation. In most cases, you do not need to call these services directly; using the existing iTool operation or visualization code that calls the UI service is sufficient. If you are creating a new UI service, you may want to inspect the code for some of the standard UI services — they are located in the lib/itools/ui_widgets subdirectory of the IDL directory and have file names of the form idlitui*.pro.

The following UI services are generally useful; you may wish to include calls to these services in your own iTool operation or visualization code.

Hourglass Cursor Service

Displays the hourglass cursor. The hourglass cursor is displayed until processing completes and a new IDL widget event is processed, at which time the previous cursor is reinstated.

Registered Service Name

HourGlassCursor

Example

void = oTool->DoUIService('HourGlassCursor', self) 
 

Operation Property Sheet Service

This service is designed to be called from within the DoExecuteUI method of an iTool operation. It displays the property sheet for the operation, allowing the user to set any operation properties before the operation is executed. 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.

Registered Service Name

PropertySheet

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)