This is the README for saMDI Multi-Document-Interface TCL/Tk extension by Sam Tregar (sam@tregar.com) Copyright (C) 1998 version 1.0a2. The saMDI package can be obtained at http://www.tregar.com/samdi.html. See LICENSE for a copy of the Gnu Public License under which this software is distributed. See CHANGES for a list of changes to saMDI. See BUGS for known issues and problems. INTRO ----- I created this extension when I realized that mdi.tcl by Joel Crisp (Joel.Crisp@bris.ac.uk) was out of date and that there were no currently working MDI extensions for TCL/Tk. I credit Joel Crisp for many of the ideas I used in creating saMDI, although I use none of his code. SaMDI is object oriented using the STOOOP object-oriented extension by Jean-Luc Fontaine (jfontain@apogee-com.fr). Much love to Jean-Luc Fontaine - STOOOP is awesome. I include version 3.5 of stooop.tcl - you can get the full distribution from: http://www.mygale.org/~jfontain/stooop.htm saMDI.tcl registers two classes, mdi and mdiSlave. Member function creation is not yet complete, so using this package requires you to access variables within the two classes. See below under USAGE for details. I understand multi-document-interface (MDI) to mean a window manager in a window. The main window of the application (of class mdi) is a container for multiple smaller windows (of class mdiSlave). These windows can be of any size or shape and can be independently manipulated much like the windows in a normal window manager. They can overlap one-another, can be iconified, can be resized and can be closed. USAGE ----- Below is a reference guide to using saMDI. See mdi_example.tcl for a quickstart intro. First, your application must source "stooop.tcl", either the one I have included or your own version and import its namespace. Next you must source "saMDI.tcl". source "stooop.tcl" namespace import stooop::* source saMDI.tcl Next create a new MDI window. This creates a new MDI window of size 500x500 with a white foreground and a black background. set mdiWindow [new mdi -title "MDI Test" -width 500 -height 500 \ -bg black -fg white] Now you can create a slave window. Note the use of the mdiWindow variable in the option "-master". This tells the new mdiSlave which mdi window it should be placed in. set slave [new mdiSlave -master $mdiWindow \ -xposition 150 -yposition 100 -title "Slave Window"\ -width 400 -height 300] Now you have a working MDI setup! You can access the client space of slave1: set slaveFrame $mdiSlave::($slave,frame) Put whatever you want inside. (it's just a standard frame) Other things you might want to play with: $mdiSlave::($slave1,menu) is the menu displayed by the upper left button in slave1. Much more information is contained in comments in saMDI.tcl and you should turn there for more indepth knowledge of saMDI. You can find all the options for [new mdi] and [new mdiSlave] in saMDI.tcl. Look for the "class" commands and the docs should be just above. When the interface is finished I'll release full docs to the options with the first beta. BUGS, MODIFICATIONS AND QUESTIONS --------------------------------- Bug reports (with exploit code if possible) can be mailed to me at sam@tregar.com or posted to comp.lang.tcl which I monitor. I am interested in any extensions or modifications - just email them to me and I'll look them over for inclusion in the extension. Want to use this in a commercial product? You can't use the version you have now (read the license to find out why not), but write me and we'll work something out.