
376 Chapter 15: Creating a Custom iTool Widget Interface
Example: a Custom iTool Interface iTool Developer’s Guide
view the file in an IDL Editor window by entering .EDIT
example2tool__define.pro.
FUNCTION example2tool::Init, _REF_EXTRA = _extra
; Call our super class.
IF ( self->IDLitToolbase::Init(_EXTRA = _extra) EQ 0) THEN $
RETURN, 0
; This tool removes several of the standard iTool operations
; and manipulators.
;*** Insert menu
self->UnRegister, 'OPERATIONS/INSERT/VISUALIZATION'
self->UnRegister, 'OPERATIONS/INSERT/VIEW'
self->UnRegister, 'OPERATIONS/INSERT/DATA SPACE'
self->UnRegister, 'OPERATIONS/INSERT/COLORBAR'
;*** Window menu
self->Unregister, 'OPERATIONS/WINDOW/FITTOVIEW'
self->Unregister, 'OPERATIONS/WINDOW/DATA MANAGER'
;*** Operations menu
self->UnRegister, 'OPERATIONS/OPERATIONS/MAP PROJECTION'
;*** Toolbars
self->UnRegister, 'MANIPULATORS/ROTATE'
RETURN, 1
END
PRO example2tool__Define
struct = { example2tool, $
INHERITS IDLitToolbase $ ; Provides iTool interface
}
END
To find the identifiers of operations and manipulators you wish to unregister, create
an instance of the tool with the items still registered, and use the FindIdentifiers
method of the IDLitTool class to retrieve the full identifiers of the items you are
interested in. See “Retrieving Component Identifiers” on page 382 for details.