The CTk Toolkit by Martin Andrews andrewm@ccfadm.eeg.ccf.org @(#) $Header: /u/hops/doc/xmosaic/tcl/README/RCS/Ctk,v 1.1 1995/04/01 00:59:13 hops Exp $ (This file dated 12-Mar-95) 1. Introduction ---------------- This directory contains the sources for CTk, a curses port of John Ousterhout's Tk toolkit for X11. The information here corresponds to CTk 4.0a1 (an alpha release of CTk 4.0). CTk 4.0a1 is based on Tk 4.0b2. Like Tk 4.0b2, it is designed to work with Tcl 7.4b2 and may not work with other releases of Tcl. Using CTk, applications with a modern GUI-ish interface can be created for character terminals. These same applications, without modification, can provide a real GUI interface by using Tk. Thus, sites with an embedded base of character terminals (and a small capital budget) can smoothly migrate to GUI applications. 2. Documentation ---------------- Sorry, not in an alpha release. The Tk Documentation, along with the list of differences in section 5 of this document should be enough to get started. 3. Compiling and installing CTk ------------------------------- I cannibalized the autoconf setup from Tk, so CTk should be easier to build than most initial releases. Still, it has not been tested with many systems. In particular, using a curses library other than ncurses may require some effort (recent system V curses should work nicely, though). CTk will build with BSD curses but is missing many features and has some glitches. CTk builds cleanly on the two systems that I have easy access to: Linux 1.1.54 using gcc 2.58 and ncurses 1.8.5 HP-UX 9.04 using optional ANSI C compiler and ncurses 1.8.6 or using K&R C compiler and hp curses (not very pretty) Unlike Tk, you do not need the source for Tcl to build CTk. Only the Tcl 7.4b2 library and include file (tcl.h) are necessary. (a) Type "./configure" in this directory. This runs a configuration script created by GNU autoconf, which configures CTk for your system and creates a Makefile. The configure script allows you to customize the CTk configuration for your site; for details on how you can do this, check out the autoconf documentation (not included here). (b) Type "make". This will create a library archive called "libctk.a" and an interpreter application called "cwish" that allows you to type Tcl commands interactively or execute script files. (c) If the make fails then you'll have to personalize the Makefile for your site or possibly modify the distribution in other ways. If you need to modify Makefile, there are comments at the beginning of it that describe the things you might want to change and how to change them. (d) Type "make install" to install CTk's binaries and script files in standard places. In the default configuration, information will be installed in /usr/local so you'll need write permission on this directory. If you'd like to use a default installation directory, you can change the "exec_prefix" and "prefix" definitions in the Makefile. (e) At this point you can play with Tcl by invoking the "cwish" program and typing Tcl commands. However, if you haven't installed CTk then you'll first need to set your CTK_LIBRARY environment variable to hold the full path name of the "library" subdirectory. If you haven't installed Tcl either then you'll need to set your TCL_LIBRARY environment variable as well (see the Tcl README file for information on this). I am interested in receiving information on changes required to build CTk on your platform. 4. Test suite ------------- Maybe next release. 5. Getting started ------------------ To run the widget demo, try cwish library/demos/widget Note that simply running "cwish" will get you in trouble because the command prompt and the window display will both be directed to current terminal. If you want to program cwish interactively, you must be logged in at two terminals. At one, run 'tty' to determine the device and then run 'sleep 10000'. At the other terminal run: cwish -display {device} Where {device} is the output of the prior tty command. Also, note that the menu key in CTk is F1, not F10 as in Tk. In general, the event bindings need some work. 6. Summary of differences between CTk 4.0a1 and Tk 4.0b2 -------------------------------------------------------- The following commands are not available in CTk: canvas clipboard message image option scale selection send The following configuration options are not available in CTk: -activebackground -activeborderwidth -activerelief -background -bg -bitmap -colormap -cursor -disabledforeground -exportselection -fg -font -foreground -highlightcolor -highlightthickness -image -insertbackground -insertborderwidth -insertofftime -insertontime -insertwidth -jump -relief -repeatdelay -repeatinterval -selectbackground -selectborderwidth -selectcolor -selectforeground -selectimage -setgrid -troughcolor -visual (and probably many more I missed.) The wm command is severely crippled. None of the widgets support the scan method. The text widget does not support tag bindings: "text tag bind". The text widget does not support embedded windows "text window". The -tearoff option for menu widgets can create a tearoff entry, but the entry doesn't work (and I don't know if there is any point in making it work). And a lot more I forgot to mention. 7. Support and bug fixes ------------------------ Send bug reports and suggestions for improvements to: Martin Andrews andrewm@ccfadm.eeg.ccf.org When reporting bugs, please provide a short cwish script that I can use to reproduce the bug. Make sure that the script runs with a bare-bones cwish and doesn't depend on any extensions. Also, please include three additional pieces of information with the script: (a) how do I use the script to make the problem happen (e.g. what things do I click on, in what order)? (b) what happens when you do these things (presumably this is undesirable)? (c) what did you expect to happen instead? For general problems with using Tk or Tcl, try posting to the comp.lang.tcl Usenet newsgroup. 8. Release organization --------------------------- Each CTk release is identified by two numbers separated by a dot, e.g. 3.2 or 3.3. These numbers match the release number of the corresponding Tk release. Suffixes for alpha, beta, and patch releases (aX, bX, and pX respectively) are numbered independent of Tk.