Once the new Tornado application is working, you can add it to the Tornado launcher. To do this, install a Tcl resource file containing the command that adds a button to the launcher in the Launch directory. The name of this file is related to the application you are starting and is prefixed with "01" so that it will be sourced with other applications early in the initialization process. The complete path to the new resource file is:
The Tcl program shown in Example 6-2 uses the objectCreate command to create a new button in the Tornado launcher. This button is associated with the Tcl routine launchWtxapp that gets the name of the target server currently selected in the launcher target window and passes it as a parameter to wtxapp.
The second parameter of objectCreate is the name of a bitmap file to be displayed as an icon at the bottom of the launcher. Add the bitmap file to the resource bitmap directory for the launcher. In this example the complete path to the bitmap is installDir/host/resource/bitmap/Launch/objects/wtxapp. This file can be created with an icon editor like bitmap from the X11 distribution. For more information about objectCreate, see the online material under Tornado API Reference>GUI Tcl Library (UNIX).
# Wtxapp.tcl - simple wtx application support for launch # # modification history # -------------------- # 01a,25jul95,p_m written #*/ # Add a wtxapp activation button to bottom of the launcher # The associated icon is the default icon (WRS logo) if there is not a # bitmap file called "wtxapp" in # installDir/host/resource/bitmaps/Launch/objects. objectCreate app wtxapp wtxapp {launchWtxapp}
Once the new Tornado application is working, you can add it to the Tornado launch toolbar. To do this, install a Tcl resource file containing a command to add a button to the toolbar in the Tornado directory. The name of this file is related to the application you are starting and is prefixed with "01"so that it will be sourced with other applications early in the initialization process. The complete path to the new resource file is:
The Tcl program shown in Example 6-3 uses the controlCreate command to create a new button in the Tornado launcher. This button is associated with the launchWtxapp Tcl routine that gets the name of the target server currently selected in the launcher target window and passes it as a parameter to wtxapp.
The -bitmap parameter of controlCreate is the name of a bitmap file to be displayed as an icon on the button. Add the bitmap file to the resource bitmap directory for the toolbar. In this example the complete path to the bitmap is installDir\host\resource\bitmaps\Launch\controls\wtxapp.bmp. This file can be created with an icon editor such as Microsoft Paintbrush. For more information about controlCreate see the online material under Tornado API Reference>GUI Tcl Library (Windows).
# Wtxapp.win32.tcl - simple wtx application support for launcher # # modification history # -------------------- # 01a, 05may96, j_k written #*/ # Add a wtxapp activation button to the launch toolbar # The associated bitmap will be the default bitmap (WRS logo) if # there is no bitmap file called "wtxapp" in # installDir/host/resource/bitmaps/Tornado, no bitmap appears set wtxappBitmap [wtxPath host resource bitmaps Tornado]Wtxapp.bmp controlCreate launch [list toolbarbutton -name wtxapp \ -callback launchWtxapp \ -tooltip "Launch Wtxapp" \ -bitmap $wtxappBitmap]