Custom Tk Widgets
This chapter describes extensions made to Tk by SCIRun to provide for custom widgets.
The main purpose of this directory is provide additional GUI component that are needed by SCIRun but are not provided by Tk nor are easily implemented (if at all) in native TclTk. These extensions include support for an OpenGL window, three dimension look and feel and moving the cursor to a specified window. These extensions are implemented here in C++ and are added to the Tk built in commands in the initialization stage.
There are three components to this interface: Initialization, extensions and a hack of the Tk internals. GUI extensions to Tk should be implemented here and added to the Tk built in commands via the initialization in tkAppInit.c
A special attention should be given to the tclUnixNotify-*.c files. These files are a hack of a similar file internal to Tk. Their purpose is to enable Tk to work in a multithreaded environment even though it was not designed to do so. Since the corresponding file in the Tk distribution changes between different versions of Tk we have included a modified version for the two versions of Tk that are supported by SCIRun, namely 8.0.4 and 8.3 .
The code in this directory is meant to be used only via the tcl commands that it provides. Any tcl code can call these commands to create the GUI they provide.
Tk provides a set of builtin GUI commands. One can augment them by providing additional functions written in C++ (or C). These additional functions can interface the TCL/TK system via C function calls as describe in the TCL/TK documentation.
A Tk window that embodies an OpenGL window.
Go back to Documentation:SCIRun:DevManual