1 |
578 |
markom |
'\"
|
2 |
|
|
'\" Copyright (c) 1993-1998 Lucent Technologies, Inc.
|
3 |
|
|
'\"
|
4 |
|
|
'\" See the file "license.terms" for information on usage and redistribution
|
5 |
|
|
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
6 |
|
|
'\"
|
7 |
|
|
'\" RCS: $Id: itk.n,v 1.1.1.1 2002-01-16 10:24:47 markom Exp $
|
8 |
|
|
'\"
|
9 |
|
|
.so man.macros
|
10 |
|
|
.TH itk n 3.0 itk "[incr\ Tk]"
|
11 |
|
|
.BS
|
12 |
|
|
'\" Note: do not modify the .SH NAME line immediately below!
|
13 |
|
|
.SH NAME
|
14 |
|
|
itk \- framework for building mega-widgets in Tcl/Tk
|
15 |
|
|
.BE
|
16 |
|
|
|
17 |
|
|
.SH DESCRIPTION
|
18 |
|
|
.PP
|
19 |
|
|
Mega-widgets are high-level widgets that are constructed using
|
20 |
|
|
Tk widgets as component parts, usually without any C code. A
|
21 |
|
|
fileselectionbox, for example, may have a few listboxes, some
|
22 |
|
|
entry widgets and some control buttons. These individual widgets
|
23 |
|
|
are put together in a way that makes them act like one big
|
24 |
|
|
widget. A fileselectionbox mega-widget can be created with a
|
25 |
|
|
command like:
|
26 |
|
|
.CS
|
27 |
|
|
fileselectionbox .fsb -background blue -foreground white
|
28 |
|
|
.CE
|
29 |
|
|
Once it has been created, it can be reconfigured with a command
|
30 |
|
|
like:
|
31 |
|
|
.CS
|
32 |
|
|
\&.fsb configure -background green -foreground black
|
33 |
|
|
.CE
|
34 |
|
|
and all of its internal components will change color. Each
|
35 |
|
|
mega-widget has a set of methods that can be used to manipulate
|
36 |
|
|
it. For example, the current selection can be queried from a
|
37 |
|
|
fileselectionbox like this:
|
38 |
|
|
.CS
|
39 |
|
|
set fileName [.fsb get]
|
40 |
|
|
.CE
|
41 |
|
|
In effect, a mega-widget looks and acts exactly like a Tk widget,
|
42 |
|
|
but is considerably easier to implement.
|
43 |
|
|
.PP
|
44 |
|
|
\fB[incr\ Tk]\fR is a framework for building mega-widgets. It
|
45 |
|
|
uses \fB[incr\ Tcl]\fR to support the object paradigm, and adds
|
46 |
|
|
base classes which provide default widget behaviors.
|
47 |
|
|
.PP
|
48 |
|
|
All \fB[incr\ Tk]\fR widgets are derived from the \fBArchetype\fR
|
49 |
|
|
base class. This class manages internal component widgets,
|
50 |
|
|
and provides methods like "configure" and "cget" to access
|
51 |
|
|
configuration options.
|
52 |
|
|
.PP
|
53 |
|
|
The \fBWidget\fR base class inherits everything from \fBArchetype\fR,
|
54 |
|
|
and adds a Tk frame which acts as a container for the mega-widget.
|
55 |
|
|
It is used to build mega-widgets that sit inside of other frames
|
56 |
|
|
and toplevels. Derived classes create other internal components
|
57 |
|
|
and pack them into the "hull" frame created by the \fBWidget\fR
|
58 |
|
|
base class.
|
59 |
|
|
.PP
|
60 |
|
|
The \fBToplevel\fR base class inherits everything from \fBArchetype\fR,
|
61 |
|
|
but adds a Tk toplevel which acts as a container for the mega-widget.
|
62 |
|
|
It is used to build mega-widgets, such as dialog boxes, that have
|
63 |
|
|
their own toplevel window. Derived classes create other internal
|
64 |
|
|
components and pack them into the "hull" toplevel created by the
|
65 |
|
|
\fBToplevel\fR base class.
|
66 |
|
|
|
67 |
|
|
.SH [incr Widgets] LIBRARY
|
68 |
|
|
.PP
|
69 |
|
|
\fB[incr\ Widgets]\fR is a mega-widget library built using
|
70 |
|
|
\fB[incr\ Tk]\fR. It can be used right out of the box, and
|
71 |
|
|
contains more than 30 different widget classes, including:
|
72 |
|
|
.IP -
|
73 |
|
|
fileselectiondialog
|
74 |
|
|
.IP -
|
75 |
|
|
tabnotebook
|
76 |
|
|
.IP -
|
77 |
|
|
panedwindow
|
78 |
|
|
.IP -
|
79 |
|
|
combobox
|
80 |
|
|
.IP -
|
81 |
|
|
optionmenu
|
82 |
|
|
.IP -
|
83 |
|
|
scrolledlistbox
|
84 |
|
|
.IP -
|
85 |
|
|
scrolledframe
|
86 |
|
|
.IP -
|
87 |
|
|
messagedialog
|
88 |
|
|
.IP -
|
89 |
|
|
and many others...
|
90 |
|
|
.LP
|
91 |
|
|
The \fBcatalog\fR demo in the "iwidgets/demos" directory
|
92 |
|
|
shows all of the available widgets in action. Each widget
|
93 |
|
|
class has its own man page describing the features available.
|
94 |
|
|
|
95 |
|
|
.SH KEYWORDS
|
96 |
|
|
class, object, object-oriented, mega-widget
|