Version 9 of What is a Megawidget

Updated 2002-11-21 20:08:21

Purpose: collect information and pointers to what megawidgets are, how to write them, etc.


Occasionally these have been called meta-widgets rather than megawidgets.


A mega widget is NOT an attempt to create new, unique, widgets. Instead, it is an effort to combine existing widgets in ways that are commonly needed (or at the very least interesting to the person who is writing the megawidget).


See also Composite fields megawidgets.

See Adding User Data to Widgets the Megawidget Way.

Steve Uhler's 1996 Tcl workshop presentation slides on the search for the perfect megawidget can be found at http://www.best.com/%7Esau/mega/ .

282. Chengye Mao mailto:[email protected] has a web page which discusses building combined widgets (aka mega widgets) in pure Tcl at http://www.geocities.com/%7Echengye/comb.html .


Here are some of the megawidget frameworks of which I (LV) am aware:

 What: tkBuilder
 Where: http://sawpit.iwarp.com/
 Description: Tool to facilitate building and testing Tcl/Tk interfaces and
        applications.  Simplifies management of widget hierarchies,
        files, namespaces, and procedures.  Generates Tcl/Tk code to be used
        by programmers in applications of their own making.
        Supports creation of Tk megawidgets.
        Requires Tcl/TK 8.x and distributed under GPL.
        Currently at version 1.0.2.
 Updated: 03/2002
 Contact: mailto:[email protected]

 What: MegaWidget package
 Where: http://www.purl.org/net/hobbs/tcl/script/widget/widget-0.9.tar.gz
 Description: Tk 8.x megawidget capability.
        While tested thru Tk 8.0b2, some problems still remained
        under Windows with Tk 8.
        Megawidgets included in this package are combobox, console,
        hierarchy list display, progressbar, tabnotebook, validating
        entry widget, and scrolledtext.  Also, support for balloon help
        and paned window management are included.
 Updated: 03/2001
 Contact: mailto:[email protected]


 What: Miscellaneous Tcl procs (Kraus)
 Where: http://mkextensions.sf.net/ 
 Description: mkGeneric - a collection of Tcl 8 commands that contact
        found missing.  Includes a variety of math functions, list functions
        programming constructs, output options, etc.
        mkClasses - a Tcl object class and methods mechanism,
        mkTables - a collection of Tcl scripts that treat lists as if they
        were 'tables' (a list whose elements are themselves lists),
        mkThreads - thread support for Tcl/Tk scripts,
        mkWidgets - megawidget support for Tk, with MDI widget and
         other goodies.
 Updated: 11/2002
 Contact: mailto:[email protected] (Michael Kraus)

 What: MIT otcl megawidget system
 Where: From the contact
 Description: A simple otcl megawidget system.  Unsupported.
 Contact: mailto:[email protected] (Martin Andrews)

 What: mwidx
 Where: http://www.cs.man.ac.uk/~fellowsd/tcl/mwidx.html
 Description: Megawidgets using cavnas windows as the framework.
 Updated: 08/2001
 Contact: mailto:[email protected] (Donal K. Fellows)

 What: obTcl
 Where: ftp://ftp.dynas.se/pub/tcl/obTcl.tar.gz
        ftp://ftp.procplace.com/pub/tcl/sorted/packages-7.6/devel/obTcl-0.56.tar.gz
 Description: A Tcl 7.[45] object and megawidget extension, supporting multiple
        inheritance, three new storage classes, and fully transparent
        Tk megawidgets.  If you need a Tab/Notebook widget or a
        Paned Window widget, but only want to use standard Tk, this
        extension might be for you.  Now has an optional loadable accelerator
        module (which requires use of Tcl 7.5) .
        Current version is 0.56.
 Updated: 10/1998
 Contact: mailto:[email protected] (Patik Floding)

 What: Pool
 Where: http://www.purl.org/NET/akupries/soft/pool/
        http://www.purl.org/NET/akupries/soft/pool/download/pool2.2.tar.gz
 Description: A personal library of Tcl procedures.  Requires Tcl/Tk 8.x.
        Contains calendar widgets, date, string, list and file manipulation
        functions, option processing routines, url manipulation and
        extraction routines, yet another OO (object-oriented) tcl based
        system, and megawidget support.
 Updated: 11/1999
 Contact: mailto:[email protected] (Andreas Kupries)

 What: scwoop
 Where: http://jfontain.free.fr/scwoop40.htm
        http://jfontain.free.fr/scwoop-4.0.tar.gz
        http://jfontain.free.fr/scwoop-3.2.tar.gz
        http://jfontain.free.fr/scwoop-2.6.tar.gz
 Description: Simple Composite Widget Object Oriented Package is implemented
        in a single sourcable file and uses simple techniques to provide
        composite widget (mega widget) support to Tk.  Uses stooop 4.1
        and above.  Runs on all Tcl 8.3 or higher supported platforms.
        Full HTML doc, with live tclets, are provided at the web site.
 Updated: 09/2001
 Contact: mailto:[email protected] (Jean-Luc Fontaine)

What: Snit's Not Incr Tcl

 Where: http://www.wjduquette.com/snit
 Description: See wiki page listed above.  Snit provides simple object
        and mega-widget support based on delegation rather than inheritance;
        it's designed to work with anything that resembles a typical Tcl/Tk
        object command.  For example, a Snit megawidget can delegate methods and
        options to Tk widgets, Incr Widgets, BWidgets, and just about anything
        else.
 What: Suchenwirth's Tcl code
 Where: http://purl.org/thecliff/tcl/wiki/RichardSuchenwirth
 Description: Richard has written a number of Wiki pages, pointed to by
        the supplied URL.  He covers code to detect or prevent a proc
        from being redefined, a discussion of Lamda procs in Tcl,
        a variety of algorithms implemented in Tcl and Tcl/Tk (which include
        a simple balloon help, integer list generation, a cursor name
        function, an integer to english/french/german name translater,
        Unix file mode in letter notation (rwxr--r--), fraction math,
        greatest common denominator, ip address, unix ls proc, simple
        mail sender, max and min functions, morse code encoder/decoder,
        converting numbers to commas, randomly selecting items from list,
        Roman numeral conversion to and from integers, widget scrollbar
        decorator, stack operations on lists) ISO country and language
        codes to English, unit converters, adding Tcl minor subcommands
        to commands, neat Tcl syntactic tricks that can be added using
        the unknown proc, a keyboard widget which displays rows of buttons
        representing the various characters to be inserted - particularly
        useful for Unicode special character input, a Tk pane widget,
        xbutton - a text and image button megawidget,
        set of 7 bit ASCII input to Unicode string conversions using
        a variety of targe languages (Arabic, Greek, Korean Hangul, Hebrew,
        Japanese, and Russian),
        a little Unicode editor,
        Tcl tally gadget (used for counting strings, words, etc.),
        Tcl 8.3 code which auto-detects UTF-16 by BOM in the first line
        and reads the file into a string variable,
        example of plain Tcl with Tk like calling style,
        examples of APL like functionality in pure Tcl scripts,
        code and discussion of base 64 encoding, code for doing syntactic
        parsing, code to allow embedding C code directly into your C scripts
        and have your program write the code to a file, compile and
        then execute it, series of demos animating a train, moving
        scenery, various sprites moving in the background, etc. .
        Contact continues to write more code each day - just
        stop by the web pages to see the latest list.
 Updated: 07/1999
 Contact:  mailto:[email protected]

 What: tablelist
 Where: http://www.nemethi.de/
 Description: This is a Multi-Column listbox designed for Tcl/Tk 8.x as
        well as a general utility module for other megawidgets like
        tablelist.  This widget allows each column to be dynamically
        sized and has several alignments.  It supports a variety of
        listbox like commands.  It also comes with bindings so that
        it acts like a listbox.
        Currently at version 1.6 .
 Updated: 08/2001
 Contact: mailto:[email protected]


 What: TkMegaWidget
 Where: http://www.ignoranceisbliss.com/htdocs/tkmegawidget.html
        ftp://ftp.procplace.com/pub/tcl/sorted/packages-7.6/devel/TkMegaWidget3.6g.tar.gz
        ftp://ftp.procplace.com/pub/tcl/sorted/packages-7.6/devel/TkMegaWidget4.0b.tar.gz
 Description: Support new Tcl/Tk widgets allowing you to attach minor commands
        and options to a widget, or even a private interpreter.
        Version 4.0b is available from the WWW page.
 Updated: 07/2000
 Contact: mailto:Unknown (Sven Delmas)

 What: [incr Tk] Slate megawidget
 Where: http://ptolemy.eecs.berkeley.edu/%7Ejohnr/code/slate/
 Description: The Slate is an [incr Tcl] megawidget layered over the Tcl/Tk
        canvas.  It contains visual hierarchy, symbolic item aspects and
        interaction support.  Release 3.0alpha supports
        Tcl 8.0 or [incr Tcl] 3.0.
 Updated: 07/1998
 Contact: mailto:[email protected] (John Reekie)

 What: [incr Tk] [incr Widgets]
 Where: http://www.sourceforege.net/projects/incrtcl/
        http://www.tcltk.com/iwidgets/
        ftp://ftp.procplace.com/pub/tcl/sorted/packages-7.6/devel/iwidgets2.0.1.tar.gz
        http://www.maui.net/%7Edavygrvy/files/incr30_hlp.zip
        http://www.maui.net/%7Edavygrvy/files/incr30_helptools.zip
        http://ptolemy.eecs.berkeley.edu/%7Ejohnr/code/iwidgets/
 Description: [incr Widgets] is an object-oriented megawidget set which is
        extends Tcl/Tk, based on itcl 2.0 and itk.  iwidgets
        is included with itcl distribution.  Version 2.0.1 is now
        available from the WWW page.  This should be included in the
        itcl 2.1 distribution.
        The maui site files are the itcl man pages reformatted into Windows
        .hlp format.  The helptools file are the scripts used to create
        the hlp file.
        The ptolemy site has some user written additional iwidgets.
        Version 4.0.1 has been released as a stand alone tar file.
         It still is dependent on itcl/itk - it is now just distributed
         seperately.
 Updated: 09/2002
 Contact: mailto:[email protected] (Mark Ulferts)
        mailto:[email protected] (David Gravereaux)
        mailto:[email protected] (Marty Backe)

 What: Pmw
 Where: http://www.dscpl.com.au/pmw/
        ftp://ftp.dscpl.com.au/pub/pmw/Pmw.0.8.tar.gz
        http://www.dejanews.com/getdoc.xp?AN=423519318
        http://pmwcontribd.sourceforge.net/
 Description: A megawidget framework for constructing high-level
        compound widgets in Python 1.5.2 using Tk 8.x. Contains of a set of
        base classes for building megawidgets and a library of
        megawidgets such as ComboBox, Dialog, ButtonBox, etc. Also
        contains a python interface to BLT2.1's busy, graph and vector
        commands. The PmwContribD web site provides several Pmw based Tkinter
        widgets, including a ProgressMeter, basic TreeNavigator, and a GUI
        application framework for creating simple GUI apps quickly.
 Updated: 10/1999
 Contact: mailto:[email protected] (Greg McFarlane)
        mailto:[email protected] (Doug Hellmann)