TmRegister Procedure

Registers a VDA Tool with the Tools Manager.

Usage

TmRegister, unique_name, topShell

Parameters

unique_name—The name returned by TmGetUniqueToolName.

topShell—The widget ID of the top-level shell of the VDA Tool.

Keywords

Title—A string specifying the title of the VDA Tool. This title is automatically added to the Windows menu.

Discussion

You have to register a VDA Tool with the VDA Tools Manager before any operations can be performed with the Tool. By registering the Tool, you add it to the Tools Manager data structure, which enables the Tools Manager to keep track of the characteristics of multiple instances of the Tool.

The VDA Tool name that is registered must be unique. An error results if the input VDA Tool name already exists. Use TmGetUniqueToolName to obtain a unique name.

If you do not set the window title with the Title keyword, then you have to use WoSetWindowTitle to add the title to the Windows menu.

Example

The following lines show how a unique VDA Tool name is obtained and registered with the Tools Manager. Note that the top-level widget must be defined before the VDA Tool is registered.

TmInit 
; Obtain a unique name for the VDA Tool.
unique = TmGetUniqueToolName('WzPlotTool') 
; Initialize the top-level widget.
top = WwInit('VDA', 'Examples', layout, $
   Shell_name='wzplottool', Layout_name='toolArea', $
   Title=unique_name, /Form)
; Register the unique VDA Tool name with the Tools Manager.
TmRegister, unique, top

The remainder of the program is omitted from this example.

See Also

TmEnumerateToolNames, TmGetMessage, TmGetTop, TmGetUniqueToolName, TmInit, TmUnregister, WoSetWindowTitle