Tk (framework)

Tk (framework)

Infobox Software
name = Tk



caption =
developer =
latest release version = 8.5.4
latest release date = release date|2008|08|15
latest preview version =
latest preview date =
operating system = Cross-platform
platform = Cross-platform
genre = widget toolkit
license = open source
website = http://www.tcl.tk

Tk is an open source, cross-platform widget toolkit, that is, a library of basic elements for building a graphical user interface (GUI).

Tk provides a number of widgets commonly needed to develop desktop applications such as button, menu, canvas, text, frame, label etc. Tk has been ported to run on most flavors of Linux, Apple Macintosh, Unix, and Windows. Since Tcl/Tk 8, it offers "native look and feel" (for instance, menus and buttons are displayed in the manner of "native" software for any given platform). Also, there are several extensions to provide external drag-and-drop, non-rectangular windows, and native widgets. A new theming engine called [http://tktable.sourceforge.net/tile/ Tk Tile] is included in the 8.5 release. Like Tcl, Tk supports Unicode within the Basic Multilingual Plane but it has not yet been extended to handle 32-bit Unicode. On *nix systems, Tk 8.4 and below still use bitmap fonts, but Tk 8.5 uses anti-aliased fonts.

History

Tk was developed by John Ousterhout as an extension for the Tcl scripting language. Bindings exist for several other languages, including Ada (called [http://tcladashell.sourceforge.net/ TASH] ), Perl, Python, Ruby, and Common Lisp. Tk versioning was done separately from Tcl until version 8.0.

There are several ways to use Tk from Perl: the Tcl::Tk and Tkx Perl modules, both of which use Tcl as a bridge to access Tk, and Perl/Tk, which provides native Perl access to Tk structures. The Python and Ruby bindings use Tcl as a bridge to Tk.

Architecture

Tk is a platform independent GUI framework for Tcl. Although Tk can be loaded from Tcl shell (tclsh) by a package require Tk command, it is common to invoke it from the wish (Windowing Shell). It has the following characteristics:

* Platform independent: Like Tcl, Tk is interpreted. It has been ported to multiple platforms and can easily run on all of them without modification.

* Customizable: Almost all of the features of a widget in Tk are customizable though options during the creation of the widget or later on through the configure command.

* Configurable: A lot of the options can be stored in an option database making it very easy to parameterize the look of an application (such as the color scheme). This also means that storing the application-specific options is only a matter of saving the option add commands and executing them on loading the application.

Features

Tk provides the following widgets:
*button
*canvas
*checkbutton
*entry
*frame
*label
*labelframe
*listbox
*menu
*menubutton
*message
*tk_optionMenu
*panedwindow
*radiobutton
*scale
*scrollbar
*spinbox
*text

as well as the following top-level windows:
*tk_chooseColor - pops up a dialog box for the user to select a color.
*tk_chooseDirectory - pops up a dialog box for the user to select a directory.
*tk_dialog - Create modal dialog and wait for response
*tk_getOpenFile - pop up a dialog box for the user to select a file to open or save.
*tk_messageBox - pops up a message window and waits for user response.
*tk_popup - Post a popup menu
*toplevel - Create and manipulate toplevel widgets

Tk also provides three geometry managers:

*place - which positions widgets at absolute locations
*grid - which arranges widgets in a grid
*pack - which packs widgets into a cavity

The most unusual and versatile features of Tk are its canvas and text widgets, which provide capabilities found in few if any other widget toolkits.

Object oriented widgets are available with incr Tk and Iwidgets. There are many other useful widgets built on top of Tk such as TkTreeCtrl, BLT (toolkit), Tix Mega-Widgets and TSIPP (a 3D Graphics Toolkit).

See also

* Expect
* Widget toolkit
* Tkinter - a Tk binding for Python
* Itk
* Itcl
* GTK+ - The GIMP Toolkit
* Qt
* wxWidgets

External links

* [http://www.tcl.tk/ Tcl and Tk website]
* [http://aspn.activestate.com/ASPN/docs/ActiveTcl/8.4/tcl/tk_contents.htm Tk 8.4 manual]
*


Wikimedia Foundation. 2010.

Игры ⚽ Нужен реферат?

Look at other dictionaries:

  • Framework (office suite) — Framework, launched in 1984, was the first office suite to run on the PC 8086 with DOS operating system. An even earlier integrated suite, actually comparable to the original Macintosh of 1984 and Lisa of 1982 was produced by Epson, a complete… …   Wikipedia

  • Framework — Framework  термин, имеющий размытое значение. Обычно используется в программировании, обозначая «простую концептуальную структуру, используемую для решения сложной, проблемной задачи». Значение этого термина существенно зависит от контекста его… …   Википедия

  • Framework (Logiciel) — Framework est un logiciel intégré, lancé dans les années 1980 par la société américaine Ashton Tate, et développé à l origine sous MS DOS par Robert Carr[1]. Dés son lancement, Framework apparut comme un logiciel révolutionnaire à bien des égards …   Wikipédia en Français

  • Framework (disambiguation) — Framework may refer to:*Framework, a structure used as a guide to build something *Software framework, a reusable set of libraries or classes for a software system (or subsystem). *Application framework, a software framework used to implement the …   Wikipedia

  • Framework (Software) — Framework ist eine 1984 von Robert Carr für den IBM PC entwickelte Office Suite. Framework wurde später von der Firma Ashton Tate gekauft (bekannt als Hersteller von dBASE) und weiterentwickelt. Framework enthält u. a. eine Textverarbeitung, eine …   Deutsch Wikipedia

  • Framework Multimédia — Un framework multimedia est une bibliothèque logicielle de gestion globale du son et de l image. Lorsqu un programmeur désire créer une nouvelle application multimédia ou exploitant le multimédia (un lecteur de film, de musique, un jeu avec des… …   Wikipédia en Français

  • Framework multimedia — Framework multimédia Un framework multimedia est une bibliothèque logicielle de gestion globale du son et de l image. Lorsqu un programmeur désire créer une nouvelle application multimédia ou exploitant le multimédia (un lecteur de film, de… …   Wikipédia en Français

  • framework — UK US /ˈfreɪmwɜːk/ noun [C] ► a system of rules, ideas, or beliefs that is used to plan or decide something: a framework for sth »The future trade agenda can provide an important framework for restoring sustainable growth. within the framework of …   Financial and business terms

  • Framework para aplicaciones web — Saltar a navegación, búsqueda Un framework para aplicaciones web es una estructura de software diseñada para apoyar el desarrollo de sitios web dinámicos, aplicaciones web y servicios web. La estructura de software intenta aliviar el exceso de… …   Wikipedia Español

  • Framework convention — may mean: * United Nations Framework Convention on Climate Change * World Health Organization Framework Convention on Tobacco Control * Framework Convention for the Protection of National Minorities * Framework Convention Alliance …   Wikipedia

  • Framework de modelado Eclipse — Saltar a navegación, búsqueda Eclipse Modeling Framework (Framework de modelado Eclipse, EMF) es un framework de modelado y facilidad de generación de código para construir herramientas y otras aplicaciones basadas en un modelo de datos… …   Wikipedia Español

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”