Import Tix 8.4.3.5 (as of svn r86089)

This commit is contained in:
Zachary Ware
2017-05-22 16:16:49 -05:00
parent d239d63057
commit 80ba28babb
769 changed files with 136423 additions and 0 deletions

9
Python/BUGS-2.1.txt Normal file
View File

@@ -0,0 +1,9 @@
# -*-mode: python; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
#
# $Id: BUGS-2.1.txt,v 1.2 2001/12/09 05:01:28 idiscovery Exp $
#
1) There seems to be a problem with ComboBox that shows up
in the ExFileSelectBox demo. The popdown scrolled list widget
is being created, then destroyed. This does not happen in Tcl Tix.

8
Python/Demo/tix/BUGS.txt Normal file
View File

@@ -0,0 +1,8 @@
$Id: BUGS.txt,v 1.1 2001/12/09 23:29:43 idiscovery Exp $
1) There seems to be a problem with ComboBox that shows up
in the ExFileSelectBox demo. The popdown scrolled list widget
is being created, then destroyed. This does not happen in Tcl Tix.
This is probably a sympton in Tix from _tkinter; if you find the cause
of this, please post a patch on http://tix.sourceforge.net.

View File

@@ -0,0 +1,89 @@
$Id: INSTALL.txt,v 1.1 2001/12/09 23:29:43 idiscovery Exp $
Installing Tix.py
----------------
0) To use Tix.py, you need Tcl/Tk (V8.3.3), Tix (V8.1.1) and Python (V2.1.1).
Tix.py has been written and tested on a Intel Pentium running RH Linux 5.2
and Mandrake Linux 7.0 and Windows with the above mentioned packages.
Older versions, e.g. Tix 4.1 and Tk 8.0, might also work.
There is nothing OS-specific in Tix.py itself so it should work on
any machine with Tix and Python installed. You can get Tcl and Tk
from http://dev.scriptics.com and Tix from http://tix.sourceforge.net.
1) Build and install Tcl/Tk 8.3. Build and install Tix 8.1.
Ensure that Tix is properly installed by running tixwish and executing
the demo programs. Under Unix, use the --enable-shared configure option
for all three. We recommend tcl8.3.3 for this release of Tix.py.
2a) If you have a distribution like ActiveState with a tcl subdirectory
of $PYTHONHOME, which contains the directories tcl8.3 and tk8.3,
make a directory tix8.1 as well. Recursively copy the files from
<tix>/library to $PYTHONHOME/lib/tix8.1, and copy the dynamic library
(tix8183.dll or libtix8.1.8.3.so) to the same place as the tcl dynamic
libraries ($PYTHONHOME/Dlls or lib/python-2.1/lib-dynload). In this
case you are all installed, and you can skip to the end.
2b) Modify Modules/Setup.dist and setup.py to change the version of the
tix library from tix4.1.8.0 to tix8.1.8.3
These modified files can be used for Tkinter with or without Tix.
3) The default is to build dynamically, and use the Tcl 'package require'.
To build statically, modify the Modules/Setup file to link in the Tix
library according to the comments in the file. On Linux this looks like:
# *** Always uncomment this (leave the leading underscore in!):
_tkinter _tkinter.c tkappinit.c -DWITH_APPINIT \
# *** Uncomment and edit to reflect where your Tcl/Tk libraries are:
-L/usr/local/lib \
# *** Uncomment and edit to reflect where your Tcl/Tk headers are:
-I/usr/local/include \
# *** Uncomment and edit to reflect where your X11 header files are:
-I/usr/X11R6/include \
# *** Or uncomment this for Solaris:
# -I/usr/openwin/include \
# *** Uncomment and edit for BLT extension only:
# -DWITH_BLT -I/usr/local/blt/blt8.0-unoff/include -lBLT8.0 \
# *** Uncomment and edit for PIL (TkImaging) extension only:
# (See http://www.pythonware.com/products/pil/ for more info)
# -DWITH_PIL -I../Extensions/Imaging/libImaging tkImaging.c \
# *** Uncomment and edit for TOGL extension only:
# -DWITH_TOGL togl.c \
# *** Uncomment and edit for Tix extension only:
-DWITH_TIX -ltix8.1.8.3 \
# *** Uncomment and edit to reflect your Tcl/Tk versions:
-ltk8.3 -ltcl8.3 \
# *** Uncomment and edit to reflect where your X11 libraries are:
-L/usr/X11R6/lib \
# *** Or uncomment this for Solaris:
# -L/usr/openwin/lib \
# *** Uncomment these for TOGL extension only:
# -lGL -lGLU -lXext -lXmu \
# *** Uncomment for AIX:
# -lld \
# *** Always uncomment this; X11 libraries to link with:
-lX11
4) Rebuild Python and reinstall.
You should now have a working Tix implementation in Python. To see if all
is as it should be, run the 'tixwidgets.py' script in the Demo/tix directory.
Under X windows, do
/usr/local/bin/python Demo/tix/tixwidgets.py
If this does not work, you may need to tell python where to find
the Tcl, Tk and Tix library files. This is done by setting the
TCL_LIBRARY, TK_LIBRARY and TIX_LIBRARY environment variables. Try this:
env TCL_LIBRARY=/usr/local/lib/tcl8.3 \
TK_LIBRARY=/usr/local/lib/tk8.3 \
TIX_LIBRARY=/usr/local/lib/tix8.1 \
/usr/local/bin/python Demo/tix/tixwidgets.py
If you find any bugs or have suggestions for improvement, please report them
via http://tix.sourceforge.net

View File

@@ -0,0 +1,19 @@
About Tix.py
-----------
Tix.py is based on an idea of Jean-Marc Lugrin (lugrin@ms.com) who wrote
pytix (another Python-Tix marriage). Tix widgets are an attractive and
useful extension to Tk. See http://tix.sourceforge.net
for more details about Tix and how to get it.
Features:
1) It is almost complete.
2) Tix widgets are represented by classes in Python. Sub-widgets
are members of the mega-widget class. For example, if a
particular TixWidget (e.g. ScrolledText) has an embedded widget
(Text in this case), it is possible to call the methods of the
child directly.
3) The members of the class are created automatically. In the case
of widgets like ButtonBox, the members are added dynamically.

View File

@@ -0,0 +1,50 @@
/* XPM */
static char * about_xpm[] = {
"50 40 7 1",
" s None c None",
". c black",
"X c white",
"o c gray70",
"O c navy",
"+ c red",
"@ c yellow",
" ",
" ",
" ",
" ................................. ",
" ..XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXoo. ",
" .XooooooooooooooooooooooooooooooXo. ",
" .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXooXo. ",
" ..oooooooooooooooooooooooooooooooXo. ",
" ...............................XoXo. ",
" .OOOOOOOOOOOOOOOOOOOOOOOOOOOOO.XoXo. ",
" .OOOOOOOOOOOOOOOOOOOOOOOOOOOOO.XoXo. ",
" .OOOOOOOOOOOOOOOOOOOOOOOOOOOOO.XoXo. ",
" .OOOOOOOOOOOOOOOOOOOOOOOOOOOOO.XoXo. ",
" .OOOOOOOOOOOOOOOOOOOOOOOOOOOOO.XoXo.++++ ",
" .OOOOOOOOOOOOOOOOOOOOOOOOOOOOO.XoXo+++ ",
" .OOOOOOOOOOOOOOOOOOOOOOOOOOOOO.Xo+++++ ",
" .OOOOOOOOOOOOOOOOOOOOOOOOOOOOO.Xo++++++ ",
" .OOOOOOOOOOOOOOOOOOOOOOOOOOOOO.Xo+++ + ",
" .OOOOO@@@@@OOOOOOOOOOOOOOOOOOO.Xo++. ",
" .OOOOOOO@OOOOO@OOOOOOOOOOOOOOO.XoXo. ",
" .OOOOOOO@OOOOOOOOOOOOOOOOOOOOO.XoXo. ",
" .OOOOOOO@OOOO@@OOO@OOO@OOOOOOO.XoXo. ",
" .OOOOOOO@OOOOO@OOOO@O@OOOOOOOO.XoXo. ",
" .OOOOOOO@OOOOO@OOOOO@OOOOOOOOO.XoXo. ",
" .OOOOOOO@OOOOO@OOOOO@OOOOOOOOO.XoXo. ",
" .OOOOOOO@OOOOO@OOOO@O@OOOOOOOO.XoXo. ",
" .OOOOOOO@OOOO@@@OO@OOO@OOOOOOO.XoXo. ",
" .OOOOOOOOOOOOOOOOOOOOOOOOOOOOO.XoXo. ",
" .OOOOOOOOOOOOOOOOOOOOOOOOOOOOO.XoXo. ",
" .OOOOOOOOOOOOOOOOOOOOOOOOOOOOO.XoXo. ",
" .OOOOOOOOOOOOOOOOOOOOOOOOOOOOO.XoXo. ",
" .OOOOOOOOOOOOOOOOOOOOOOOOOOOOO.XoXo. ",
" .OOOOOOOOOOOOOOOOOOOOOOOOOOOOO.XoXo. ",
" .OOOOOOOOOOOOOOOOOOOOOOOOOOOOO.Xo.. ",
" .OOOOOOOOOOOOOOOOOOOOOOOOOOOOO.Xo ",
" OOOOOOOOOOOOOOOOOOOOOOOOOOOOO.X. ",
" ............................. ",
" ",
" ",
" "};

View File

@@ -0,0 +1,6 @@
#define bold_width 16
#define bold_height 16
static unsigned char bold_bits[] = {
0x00, 0x00, 0x00, 0x00, 0xfc, 0x07, 0xfc, 0x0f, 0x18, 0x1c, 0x18, 0x18,
0x18, 0x18, 0x18, 0x1c, 0xf8, 0x0f, 0xf8, 0x0f, 0x18, 0x18, 0x18, 0x30,
0x18, 0x30, 0x18, 0x38, 0xfc, 0x3f, 0xfc, 0x1f};

View File

@@ -0,0 +1,6 @@
#define capital_width 16
#define capital_height 16
static unsigned char capital_bits[] = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x08, 0x30, 0x0c, 0x30, 0x06,
0x30, 0x03, 0xb0, 0x01, 0xf0, 0x00, 0xf0, 0x00, 0xf0, 0x01, 0xb0, 0x03,
0x30, 0x07, 0x30, 0x0e, 0x30, 0x1c, 0x00, 0x00};

View File

@@ -0,0 +1,6 @@
#define centerj_width 16
#define centerj_height 16
static unsigned char centerj_bits[] = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x3e, 0x00, 0x00, 0xc0, 0x0d,
0x00, 0x00, 0x58, 0x77, 0x00, 0x00, 0xb0, 0x3b, 0x00, 0x00, 0xdc, 0xf7,
0x00, 0x00, 0xf0, 0x3e, 0x00, 0x00, 0xd8, 0x7e};

View File

@@ -0,0 +1,14 @@
#define combobox_width 32
#define combobox_height 32
static unsigned char combobox_bits[] = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xfc, 0xff, 0xff, 0x3e, 0x04, 0x00, 0x80, 0x2a, 0x04, 0x00, 0x80, 0x2a,
0x04, 0x00, 0x80, 0x2a, 0x04, 0x00, 0x80, 0x2b, 0xfc, 0xff, 0xff, 0x3e,
0x08, 0x00, 0x00, 0x20, 0x08, 0x00, 0x00, 0x3e, 0x08, 0x00, 0x00, 0x2a,
0x28, 0x49, 0x00, 0x2a, 0x08, 0x00, 0x00, 0x3e, 0x08, 0x00, 0x00, 0x22,
0x08, 0x00, 0x00, 0x22, 0x28, 0x49, 0x12, 0x22, 0x08, 0x00, 0x00, 0x22,
0x08, 0x00, 0x00, 0x22, 0x08, 0x00, 0x00, 0x22, 0x28, 0x49, 0x02, 0x22,
0x08, 0x00, 0x00, 0x3e, 0x08, 0x00, 0x00, 0x2a, 0x08, 0x00, 0x00, 0x2a,
0xf8, 0xff, 0xff, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};

View File

@@ -0,0 +1,49 @@
/* XPM */
static char * combobox_xpm[] = {
"50 40 6 1",
" s None c None",
". c black",
"X c white",
"o c #FFFF80808080",
"O c gray70",
"+ c #808000008080",
" ",
" ",
" ",
" .................................... XXXXXXX ",
" .ooooooooooooooooooooooooooooooooooX X . . ",
" .ooooooooooooooooooooooooooooooooooX X . . ",
" .oooo.oooooooooooooooooooooooooooooX X . . ",
" .oo.o..oo.o.oo.o.ooooooooooooooooooX X . . ",
" .o..o.o.o.oo.oo.oo.ooooooooooooooooX X ... . ",
" .oo.oo.oo.o.oo.ooo.ooooooooooooooooX X . . ",
" .ooooooooooooooooooooooooooooooooooX X . ",
" .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX X...... ",
" ",
" ",
" ",
" XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ",
" X............................................ ",
" X.OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOX.OOOOX. ",
" X.O+OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOX.OX OX. ",
" X.O++OOO+OO+++OOOOOOOOOOOOOOOOOOOOOOOX.X ..X. ",
" X.O+O+O+OOO+O+OOOOOOOOOOOOOOOOOOOOOOOX.OOOOX. ",
" X.O++OOO+OO+++OOOOOOOOOOOOOOOOOOOOOOOX.OOOOX. ",
" X.OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOX.XXXXX. ",
" X.O.....X..........................OOX.X .X. ",
" X.OX...XXX.X.XX.XX.................OOX.X .X. ",
" X.OX.X..X..X.XX..XX.X..............OOX.X .X. ",
" X.O.X...X..X.X...X..X..............OOX.X .X. ",
" X.OOOOOOOOOOOOOOOOOOOOOOOO+OOOOOOOOOOX.X .X. ",
" X.OOOOOOOOO+OOO+OOOOO+OOOO+OOOOOOOOOOX.X .X. ",
" X.O+++OO+OO+O+OO++O++OO+OO+OOOOOOOOOOX.X...X. ",
" X.OO+OO++OO+O+OO+OOO+OO+O++OOOOOOOOOOX.OOOOX. ",
" X.OOOOOOOO+OOOOO++OO+OOOOOOOOOOOOOOOOX.OOOOX. ",
" X.OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOX.X .X. ",
" X.OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOX.O .OX. ",
" X.OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOX.OOOOX. ",
" X.XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.XXXXX. ",
" X............................................ ",
" ",
" ",
" "};

View File

@@ -0,0 +1,47 @@
/* XPM */
static char * combobox_xpm[] = {
"50 40 4 1",
" s None c None",
". c black",
"X c #FFFF80808080",
"o c gray70",
" ",
" ",
" ",
" .................................... ....... ",
" .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX. . . . ",
" .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX. . . . ",
" .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX. . . . ",
" .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX. . . . ",
" .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX. . ... . ",
" .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX. . . . ",
" .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX. . . ",
" .................................... ....... ",
" ",
" ............................................. ",
" .ooooooooooooooooooooooooooooooooooooo.ooooo. ",
" .ooooooooooooooooooooooooooooooooooooo.ooooo. ",
" .o...................................o.ooooo. ",
" .o...................................o.ooooo. ",
" .o...................................o.ooooo. ",
" .o...................................o.ooooo. ",
" .ooooooooooooooooooooooooooooooooooooo.ooooo. ",
" .ooooooooooooooooooooooooooooooooooooo.ooooo. ",
" .ooooooooooooooooooooooooooooooooooooo.ooooo. ",
" .ooooooooooooooooooooooooooooooooooooo.ooooo. ",
" .ooooooooooooooooooooooooooooooooooooo.ooooo. ",
" .ooooooooooooooooooooooooooooooooooooo.ooooo. ",
" .ooooooooooooooooooooooooooooooooooooo.ooooo. ",
" .ooooooooooooooooooooooooooooooooooooo.ooooo. ",
" .ooooooooooooooooooooooooooooooooooooo.ooooo. ",
" .ooooooooooooooooooooooooooooooooooooo.ooooo. ",
" .ooooooooooooooooooooooooooooooooooooo.ooooo. ",
" .ooooooooooooooooooooooooooooooooooooo.ooooo. ",
" .ooooooooooooooooooooooooooooooooooooo.ooooo. ",
" .ooooooooooooooooooooooooooooooooooooo.ooooo. ",
" ............................................. ",
" ",
" ",
" ",
" ",
" "};

View File

@@ -0,0 +1,14 @@
#define drivea_width 32
#define drivea_height 32
static unsigned char drivea_bits[] = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xf8, 0xff, 0xff, 0x1f, 0x08, 0x00, 0x00, 0x18, 0xa8, 0xaa, 0xaa, 0x1a,
0x48, 0x55, 0xd5, 0x1d, 0xa8, 0xaa, 0xaa, 0x1b, 0x48, 0x55, 0x55, 0x1d,
0xa8, 0xfa, 0xaf, 0x1a, 0xc8, 0xff, 0xff, 0x1d, 0xa8, 0xfa, 0xaf, 0x1a,
0x48, 0x55, 0x55, 0x1d, 0xa8, 0xaa, 0xaa, 0x1a, 0x48, 0x55, 0x55, 0x1d,
0xa8, 0xaa, 0xaa, 0x1a, 0xf8, 0xff, 0xff, 0x1f, 0xf8, 0xff, 0xff, 0x1f,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};

View File

@@ -0,0 +1,43 @@
/* XPM */
static char * drivea_xpm[] = {
/* width height ncolors chars_per_pixel */
"32 32 5 1",
/* colors */
" s None c None",
". c #000000000000",
"X c white",
"o c #c000c000c000",
"O c #800080008000",
/* pixels */
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" .......................... ",
" .XXXXXXXXXXXXXXXXXXXXXXXo. ",
" .XooooooooooooooooooooooO. ",
" .Xooooooooooooooooo..oooO. ",
" .Xooooooooooooooooo..oooO. ",
" .XooooooooooooooooooooooO. ",
" .Xoooooooo.......oooooooO. ",
" .Xoo...................oO. ",
" .Xoooooooo.......oooooooO. ",
" .XooooooooooooooooooooooO. ",
" .XooooooooooooooooooooooO. ",
" .XooooooooooooooooooooooO. ",
" .XooooooooooooooooooooooO. ",
" .oOOOOOOOOOOOOOOOOOOOOOOO. ",
" .......................... ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" "};

View File

@@ -0,0 +1,48 @@
/* XPM */
static char * exit_xpm[] = {
"50 40 5 1",
" s None c None",
". c black",
"X c white",
"o c #000080800000",
"O c yellow",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ....................................... ",
" .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX. ",
" .XoooooooooooooooooooooooooooooooooooX. ",
" .XoooooooooooooooooooooooooooooooooooX. ",
" .XoooooooooooooooooooooooOoooooooooooX. ",
" .XoooooooooooooooooooooooOOooooooooooX. ",
" .XoooooooooooooooooooooooOOOoooooooooX. ",
" .XoooooOOOOOOOOOOOOOOOOOOOOOOooooooooX. ",
" .XoooooOOOOOOOOOOOOOOOOOOOOOOOoooooooX. ",
" .XoooooOOOOOOOOOOOOOOOOOOOOOOOOooooooX. ",
" .XoooooOOOOOOOOOOOOOOOOOOOOOOOOOoooooX. ",
" .XoooooOOOOOOOOOOOOOOOOOOOOOOOOooooooX. ",
" .XoooooOOOOOOOOOOOOOOOOOOOOOOOoooooooX. ",
" .XoooooOOOOOOOOOOOOOOOOOOOOOOooooooooX. ",
" .XoooooooooooooooooooooooOOOoooooooooX. ",
" .XoooooooooooooooooooooooOOooooooooooX. ",
" .XoooooooooooooooooooooooOoooooooooooX. ",
" .XoooooooooooooooooooooooooooooooooooX. ",
" .XoooooooooooooooooooooooooooooooooooX. ",
" .XoooooooooooooooooooooooooooooooooooX. ",
" .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX. ",
" ....................................... ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" "};

View File

@@ -0,0 +1,14 @@
#define filebox_width 32
#define filebox_height 32
static unsigned char filebox_bits[] = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0xfc, 0xff, 0xff, 0x3f, 0x04, 0x00, 0x00, 0x20,
0xe4, 0xff, 0xff, 0x27, 0x24, 0x00, 0x00, 0x24, 0x24, 0x00, 0x00, 0x24,
0xe4, 0xff, 0xff, 0x27, 0x04, 0x00, 0x00, 0x20, 0xe4, 0x7f, 0xfe, 0x27,
0x24, 0x50, 0x02, 0x25, 0x24, 0x40, 0x02, 0x24, 0x24, 0x50, 0x02, 0x25,
0x24, 0x40, 0x02, 0x24, 0x24, 0x50, 0x02, 0x25, 0x24, 0x40, 0x02, 0x24,
0x24, 0x50, 0x02, 0x25, 0xe4, 0x7f, 0xfe, 0x27, 0x04, 0x00, 0x00, 0x20,
0xe4, 0xff, 0xff, 0x27, 0x24, 0x00, 0x00, 0x24, 0x24, 0x00, 0x00, 0x24,
0xe4, 0xff, 0xff, 0x27, 0x04, 0x00, 0x00, 0x20, 0xfc, 0xff, 0xff, 0x3f,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};

View File

@@ -0,0 +1,49 @@
/* XPM */
static char * filebox_xpm[] = {
"50 40 6 1",
" s None c None",
". c white",
"X c gray80",
"o c black",
"O c #FFFF80808080",
"+ c gray70",
" ",
" ",
" ",
" ............................................ ",
" .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXo ",
" .XXooXooXoXooXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXo ",
" .XXooXooXoXooXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXo ",
" .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXo ",
" .XXooooooooooooooooooooooooooooooooooooo.XXo ",
" .XXoOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO.XXo ",
" .XXoOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO.XXo ",
" .XX......................................XXo ",
" .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXo ",
" .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXo ",
" .XXoooooooooooooooo.XXXXoooooooooooooooo.XXo ",
" .XXo+++++++++++++++.XXXXo+++++++++++++++.XXo ",
" .XXo+++++++++++++++.XXXXo+++++++++++++++.XXo ",
" .XXo+++++++++++++++.XXXXo+++++++++++++++.XXo ",
" .XXo+++++++++++++++.XXXXo+++++++++++++++.XXo ",
" .XXo+++++++++++++++.XXXXo+++++++++++++++.XXo ",
" .XXo+++++++++++++++.XXXXo+++++++++++++++.XXo ",
" .XXo+++++++++++++++.XXXXo+++++++++++++++.XXo ",
" .XXo+++++++++++++++.XXXXo+++++++++++++++.XXo ",
" .XXo+++++++++++++++.XXXXo+++++++++++++++.XXo ",
" .XXo+++++++++++++++.XXXXo+++++++++++++++.XXo ",
" .XXo+++++++++++++++.XXXXo+++++++++++++++.XXo ",
" .XX.................XXXX.................XXo ",
" .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXo ",
" .XXooXooXoXooXoXXXXXXXXXXXXXXXXXXXXXXXXXXXXo ",
" .XXooXooXoXooXoXooXXXXXXXXXXXXXXXXXXXXXXXXXo ",
" .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXo ",
" .XXoooooooooooooooooooooooooooooooooooooo.Xo ",
" .XXoOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO.Xo ",
" .XXoOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO.Xo ",
" .XX.......................................Xo ",
" .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXo ",
" .ooooooooooooooooooooooooooooooooooooooooooo ",
" ",
" ",
" "};

View File

@@ -0,0 +1,6 @@
#define italic_width 16
#define italic_height 16
static unsigned char italic_bits[] = {
0x00, 0x00, 0x00, 0x00, 0x80, 0x3f, 0x80, 0x3f, 0x00, 0x06, 0x00, 0x06,
0x00, 0x03, 0x00, 0x03, 0x80, 0x01, 0x80, 0x01, 0xc0, 0x00, 0xc0, 0x00,
0x60, 0x00, 0x60, 0x00, 0xfc, 0x01, 0xfc, 0x01};

View File

@@ -0,0 +1,6 @@
#define justify_width 16
#define justify_height 16
static unsigned char justify_bits[] = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xec, 0xdb, 0x00, 0x00, 0x7c, 0xdb,
0x00, 0x00, 0xbc, 0xf7, 0x00, 0x00, 0xdc, 0xde, 0x00, 0x00, 0x6c, 0xdf,
0x00, 0x00, 0x6c, 0xef, 0x00, 0x00, 0xdc, 0xdf};

View File

@@ -0,0 +1,6 @@
#define leftj_width 16
#define leftj_height 16
static unsigned char leftj_bits[] = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xcc, 0x6d, 0x00, 0x00, 0xdc, 0x01,
0x00, 0x00, 0xec, 0x0e, 0x00, 0x00, 0xfc, 0x7e, 0x00, 0x00, 0xdc, 0x03,
0x00, 0x00, 0x6c, 0x3b, 0x00, 0x00, 0x6c, 0x1f};

View File

@@ -0,0 +1,14 @@
#define netw_width 32
#define netw_height 32
static unsigned char netw_bits[] = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x7f, 0x00, 0x00, 0x02, 0x40,
0x00, 0x00, 0xfa, 0x5f, 0x00, 0x00, 0x0a, 0x50, 0x00, 0x00, 0x0a, 0x52,
0x00, 0x00, 0x0a, 0x52, 0x00, 0x00, 0x8a, 0x51, 0x00, 0x00, 0x0a, 0x50,
0x00, 0x00, 0x4a, 0x50, 0x00, 0x00, 0x0a, 0x50, 0x00, 0x00, 0x0a, 0x50,
0x00, 0x00, 0xfa, 0x5f, 0x00, 0x00, 0x02, 0x40, 0xfe, 0x7f, 0x52, 0x55,
0x02, 0x40, 0xaa, 0x6a, 0xfa, 0x5f, 0xfe, 0x7f, 0x0a, 0x50, 0xfe, 0x7f,
0x0a, 0x52, 0x80, 0x00, 0x0a, 0x52, 0x80, 0x00, 0x8a, 0x51, 0x80, 0x00,
0x0a, 0x50, 0x80, 0x00, 0x4a, 0x50, 0x80, 0x00, 0x0a, 0x50, 0xe0, 0x03,
0x0a, 0x50, 0x20, 0x02, 0xfa, 0xdf, 0x3f, 0x03, 0x02, 0x40, 0xa0, 0x02,
0x52, 0x55, 0xe0, 0x03, 0xaa, 0x6a, 0x00, 0x00, 0xfe, 0x7f, 0x00, 0x00,
0xfe, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};

View File

@@ -0,0 +1,45 @@
/* XPM */
static char * netw_xpm[] = {
/* width height ncolors chars_per_pixel */
"32 32 7 1",
/* colors */
" s None c None",
". c #000000000000",
"X c white",
"o c #c000c000c000",
"O c #404040",
"+ c blue",
"@ c red",
/* pixels */
" ",
" .............. ",
" .XXXXXXXXXXXX. ",
" .XooooooooooO. ",
" .Xo.......XoO. ",
" .Xo.++++o+XoO. ",
" .Xo.++++o+XoO. ",
" .Xo.++oo++XoO. ",
" .Xo.++++++XoO. ",
" .Xo.+o++++XoO. ",
" .Xo.++++++XoO. ",
" .Xo.XXXXXXXoO. ",
" .XooooooooooO. ",
" .Xo@ooo....oO. ",
" .............. .XooooooooooO. ",
" .XXXXXXXXXXXX. .XooooooooooO. ",
" .XooooooooooO. .OOOOOOOOOOOO. ",
" .Xo.......XoO. .............. ",
" .Xo.++++o+XoO. @ ",
" .Xo.++++o+XoO. @ ",
" .Xo.++oo++XoO. @ ",
" .Xo.++++++XoO. @ ",
" .Xo.+o++++XoO. @ ",
" .Xo.++++++XoO. ..... ",
" .Xo.XXXXXXXoO. .XXX. ",
" .XooooooooooO.@@@@@@.X O. ",
" .Xo@ooo....oO. .OOO. ",
" .XooooooooooO. ..... ",
" .XooooooooooO. ",
" .OOOOOOOOOOOO. ",
" .............. ",
" "};

View File

@@ -0,0 +1,48 @@
/* XPM */
static char * optmenu_xpm[] = {
"50 40 5 1",
" s None c None",
". c white",
"X c gray80",
"o c gray50",
"O c black",
" ",
" ",
" .............................. ",
" .XXXXXXXXXXXXXXXXXXXXXXXXXXXXo ",
" .XXXXXXXXXXXXXXXXXXXXXXXXXXXXo ",
" .XXXXXXXXXXXXXXXXXXXXXXXXXXXXo ",
" .XXXOXOXXOXXOXXXXOOXXXXXXXXXXo ",
" .XXXOXOXXOXOXXXOXXOXXXXXXXXXXo ",
" .XXXXOXXOXXOXXXOXXXOXXXXXXXXXo ",
" .XXXXOXXXOXXOOXXOXOXXXXXXXXXXo ",
" .XXXXXXXXXXXXXXXXXXXXXXXXXXXXo ",
" .XXXXXXXXXXXXXXXXXXXXXXXXXXXXo.............o ",
" .............................o o ",
" ..XXXOXXXXXOXXXXXXXXOXXXXXXXOo o ",
" ..XXOXOXOXXOXOXXXOXXOXXXXXXXOo ...... o ",
" ..XXXOXXXOXXOXXXOXXXOXXXXXXXOo . o o ",
" ..XXOXXXOXXXOXOXXOXXOXXXXXXXOo . o o ",
" ..XXXXXXXXXXXXXXXXXXXXXXXXXXOo .ooooo o ",
" .OOOOOOOOOOOOOOOOOOOOOOOOOOOOo o ",
" .XXXXXXXXXXXXXXXXXXXXXXXXXXXXo o ",
" .XXXXXXXXXXXXXXXXXXXXXXXXXXXXooooooooooooooo ",
" .XXXXOXXXXXOXXXXXXXXXXXXXXXXXo ",
" .XXXOXXXXXXXXXOXXXXXXXXXXXXXXo ",
" .XXXXOXXOXXOXOXOXXXXXXXXXXXXXo ",
" .XXXXXOXXOXOXXXXXXXXXXXXXXXXXo ",
" .XXXXXXXXXXXXXOXXXXXXXXXXXXXXo ",
" .XXXXXXXXXXXXXXXXXXXXXXXXXXXXo ",
" .XXXXXXXXXXXXXXXXXXXXXXXXXXXXo ",
" .XXXOXOXXXXXXXOXOXXXXXOXXXXXXo ",
" .XXXXXOXOXOXXOXXXXXOXXOXXXXXXo ",
" .XXXXOXXOXOXOXXXOXOXOXXOXXXXXo ",
" .XXXOXXXXOXXOXXXOXXOXXXXOXXXXo ",
" .XXXXXXXXXXXXXXXXXXXXXXXXXXXXo ",
" .XXXXXXXXXXXXXXXXXXXXXXXXXXXXo ",
" .XXXXXXXXXXXXXXXXXXXXXXXXXXXXo ",
" oooooooooooooooooooooooooooooo ",
" ",
" ",
" ",
" "};

View File

@@ -0,0 +1,6 @@
#define rightj_width 16
#define rightj_height 16
static unsigned char rightj_bits[] = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xdb, 0x00, 0x00, 0x70, 0xdb,
0x00, 0x00, 0x00, 0xef, 0x00, 0x00, 0xd8, 0xde, 0x00, 0x00, 0xc0, 0xdd,
0x00, 0x00, 0xa0, 0xef, 0x00, 0x00, 0xd8, 0xde};

View File

@@ -0,0 +1,52 @@
/* XPM */
static char * select_xpm[] = {
"50 40 9 1",
" s None c None",
". c black",
"X c gray95",
"o c gray50",
"O c gray70",
"+ c navy",
"@ c #000080800000",
"# c #808000000000",
"$ c white",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" .............................................. ",
" .XXXXXXXXXXooooooooooooXXXXXXXXXXXoXXXXXXXXXX. ",
" .X ooOOOOOOOOOOXX oX o. ",
" .X ooOOOOOOOOOOXX oX o. ",
" .X ++++ ooOOOOOOOOOOXX ... oX @ o. ",
" .X +++++ ooOOOOOOOOOOXX . . oX @@@ o. ",
" .X +++ + ooOOOOOOOOOOXX . . oX @ @ o. ",
" .X + + ooOO#####OOOXX . . oX @ @ o. ",
" .X + + ooOO#OOO##OOXX . oX @ @ o. ",
" .X + + ooO##OOOO##OXX . oX @ @ o. ",
" .X ++ ++ ooO###OOO#OOXX . oX @ @ o. ",
" .X +++++++ ooO#######OOXX . oX @ @ o. ",
" .X + + ooO##O#OO#OOXX . oX @ @ o. ",
" .X + ++ ooO##OOOOO#OXX . . oX @ @ o. ",
" .X + + ooOO#OOOOO#OXX . . oX @ @@ o. ",
" .X + ++ ooOO#OOOOO#OXX .... oX @@@@@ o. ",
" .X ooOO######OOXX oX o. ",
" .X ooOOOOOOOOOOXX $oX o. ",
" .XoooooooooooXXXXXXXXXXXoooooooooooXooooooooo. ",
" .............................................. ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" "};

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

View File

@@ -0,0 +1,6 @@
#define underline_width 16
#define underline_height 16
static unsigned char underline_bits[] = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1c, 0x38, 0x1c,
0x30, 0x0c, 0x30, 0x0c, 0x30, 0x0c, 0x30, 0x0c, 0x30, 0x0c, 0x70, 0x0e,
0xf0, 0x0f, 0xe0, 0x07, 0x00, 0x00, 0xf8, 0x1f};

View File

@@ -0,0 +1,68 @@
# -*-mode: python; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
#
# $Id: Balloon.py,v 1.1 2001/12/09 23:29:43 idiscovery Exp $
#
# Tix Demostration Program
#
# This sample program is structured in such a way so that it can be
# executed from the Tix demo program "tixwidgets.py": it must have a
# procedure called "RunSample". It should also have the "if" statment
# at the end of this file so that it can be run as a standalone
# program.
# This file demonstrates the use of the tixBalloon widget, which provides
# a interesting way to give help tips about elements in your user interface.
# Your can display the help message in a "balloon" and a status bar widget.
#
import Tix
TCL_ALL_EVENTS = 0
def RunSample (root):
balloon = DemoBalloon(root)
balloon.mainloop()
balloon.destroy()
class DemoBalloon:
def __init__(self, w):
self.root = w
self.exit = -1
z = w.winfo_toplevel()
z.wm_protocol("WM_DELETE_WINDOW", lambda self=self: self.quitcmd())
status = Tix.Label(w, width=40, relief=Tix.SUNKEN, bd=1)
status.pack(side=Tix.BOTTOM, fill=Tix.Y, padx=2, pady=1)
# Create two mysterious widgets that need balloon help
button1 = Tix.Button(w, text='Something Unexpected',
command=self.quitcmd)
button2 = Tix.Button(w, text='Something Else Unexpected')
button2['command'] = lambda w=button2: w.destroy()
button1.pack(side=Tix.TOP, expand=1)
button2.pack(side=Tix.TOP, expand=1)
# Create the balloon widget and associate it with the widgets that we want
# to provide tips for:
b = Tix.Balloon(w, statusbar=status)
b.bind_widget(button1, balloonmsg='Close Window',
statusmsg='Press this button to close this window')
b.bind_widget(button2, balloonmsg='Self-destruct button',
statusmsg='Press this button and it will destroy itself')
def quitcmd (self):
self.exit = 0
def mainloop(self):
foundEvent = 1
while self.exit < 0 and foundEvent > 0:
foundEvent = self.root.tk.dooneevent(TCL_ALL_EVENTS)
def destroy (self):
self.root.destroy()
if __name__ == '__main__':
root = Tix.Tk()
RunSample(root)

View File

@@ -0,0 +1,44 @@
# -*-mode: python; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
#
# $Id: BtnBox.py,v 1.1 2001/12/09 23:29:43 idiscovery Exp $
#
# Tix Demostration Program
#
# This sample program is structured in such a way so that it can be
# executed from the Tix demo program "tixwidgets.py": it must have a
# procedure called "RunSample". It should also have the "if" statment
# at the end of this file so that it can be run as a standalone
# program.
# This file demonstrates the use of the tixButtonBox widget, which is a
# group of TK buttons. You can use it to manage the buttons in a dialog box,
# for example.
#
import Tix
def RunSample(w):
# Create the label on the top of the dialog box
#
top = Tix.Label(w, padx=20, pady=10, bd=1, relief=Tix.RAISED,
anchor=Tix.CENTER, text='This dialog box is\n a demonstration of the\n tixButtonBox widget')
# Create the button box and add a few buttons in it. Set the
# -width of all the buttons to the same value so that they
# appear in the same size.
#
# Note that the -text, -underline, -command and -width options are all
# standard options of the button widgets.
#
box = Tix.ButtonBox(w, orientation=Tix.HORIZONTAL)
box.add('ok', text='OK', underline=0, width=5,
command=lambda w=w: w.destroy())
box.add('close', text='Cancel', underline=0, width=5,
command=lambda w=w: w.destroy())
box.pack(side=Tix.BOTTOM, fill=Tix.X)
top.pack(side=Tix.TOP, fill=Tix.BOTH, expand=1)
if __name__ == '__main__':
root = Tix.Tk()
RunSample(root)
root.mainloop()

View File

@@ -0,0 +1,197 @@
# -*-mode: python; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
#
# $Id: CmpImg.py,v 1.1 2001/12/09 23:29:43 idiscovery Exp $
#
# Tix Demostration Program
#
# This sample program is structured in such a way so that it can be
# executed from the Tix demo program "tixwidgets.py": it must have a
# procedure called "RunSample". It should also have the "if" statment
# at the end of this file so that it can be run as a standalone
# program.
# This file demonstrates the use of the compound images: it uses compound
# images to display a text string together with a pixmap inside
# buttons
#
import Tix
network_pixmap = """/* XPM */
static char * netw_xpm[] = {
/* width height ncolors chars_per_pixel */
"32 32 7 1",
/* colors */
" s None c None",
". c #000000000000",
"X c white",
"o c #c000c000c000",
"O c #404040",
"+ c blue",
"@ c red",
/* pixels */
" ",
" .............. ",
" .XXXXXXXXXXXX. ",
" .XooooooooooO. ",
" .Xo.......XoO. ",
" .Xo.++++o+XoO. ",
" .Xo.++++o+XoO. ",
" .Xo.++oo++XoO. ",
" .Xo.++++++XoO. ",
" .Xo.+o++++XoO. ",
" .Xo.++++++XoO. ",
" .Xo.XXXXXXXoO. ",
" .XooooooooooO. ",
" .Xo@ooo....oO. ",
" .............. .XooooooooooO. ",
" .XXXXXXXXXXXX. .XooooooooooO. ",
" .XooooooooooO. .OOOOOOOOOOOO. ",
" .Xo.......XoO. .............. ",
" .Xo.++++o+XoO. @ ",
" .Xo.++++o+XoO. @ ",
" .Xo.++oo++XoO. @ ",
" .Xo.++++++XoO. @ ",
" .Xo.+o++++XoO. @ ",
" .Xo.++++++XoO. ..... ",
" .Xo.XXXXXXXoO. .XXX. ",
" .XooooooooooO.@@@@@@.X O. ",
" .Xo@ooo....oO. .OOO. ",
" .XooooooooooO. ..... ",
" .XooooooooooO. ",
" .OOOOOOOOOOOO. ",
" .............. ",
" "};
"""
hard_disk_pixmap = """/* XPM */
static char * drivea_xpm[] = {
/* width height ncolors chars_per_pixel */
"32 32 5 1",
/* colors */
" s None c None",
". c #000000000000",
"X c white",
"o c #c000c000c000",
"O c #800080008000",
/* pixels */
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" .......................... ",
" .XXXXXXXXXXXXXXXXXXXXXXXo. ",
" .XooooooooooooooooooooooO. ",
" .Xooooooooooooooooo..oooO. ",
" .Xooooooooooooooooo..oooO. ",
" .XooooooooooooooooooooooO. ",
" .Xoooooooo.......oooooooO. ",
" .Xoo...................oO. ",
" .Xoooooooo.......oooooooO. ",
" .XooooooooooooooooooooooO. ",
" .XooooooooooooooooooooooO. ",
" .XooooooooooooooooooooooO. ",
" .XooooooooooooooooooooooO. ",
" .oOOOOOOOOOOOOOOOOOOOOOOO. ",
" .......................... ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" "};
"""
network_bitmap = """
#define netw_width 32
#define netw_height 32
static unsigned char netw_bits[] = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x7f, 0x00, 0x00, 0x02, 0x40,
0x00, 0x00, 0xfa, 0x5f, 0x00, 0x00, 0x0a, 0x50, 0x00, 0x00, 0x0a, 0x52,
0x00, 0x00, 0x0a, 0x52, 0x00, 0x00, 0x8a, 0x51, 0x00, 0x00, 0x0a, 0x50,
0x00, 0x00, 0x4a, 0x50, 0x00, 0x00, 0x0a, 0x50, 0x00, 0x00, 0x0a, 0x50,
0x00, 0x00, 0xfa, 0x5f, 0x00, 0x00, 0x02, 0x40, 0xfe, 0x7f, 0x52, 0x55,
0x02, 0x40, 0xaa, 0x6a, 0xfa, 0x5f, 0xfe, 0x7f, 0x0a, 0x50, 0xfe, 0x7f,
0x0a, 0x52, 0x80, 0x00, 0x0a, 0x52, 0x80, 0x00, 0x8a, 0x51, 0x80, 0x00,
0x0a, 0x50, 0x80, 0x00, 0x4a, 0x50, 0x80, 0x00, 0x0a, 0x50, 0xe0, 0x03,
0x0a, 0x50, 0x20, 0x02, 0xfa, 0xdf, 0x3f, 0x03, 0x02, 0x40, 0xa0, 0x02,
0x52, 0x55, 0xe0, 0x03, 0xaa, 0x6a, 0x00, 0x00, 0xfe, 0x7f, 0x00, 0x00,
0xfe, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
"""
hard_disk_bitmap = """
#define drivea_width 32
#define drivea_height 32
static unsigned char drivea_bits[] = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xf8, 0xff, 0xff, 0x1f, 0x08, 0x00, 0x00, 0x18, 0xa8, 0xaa, 0xaa, 0x1a,
0x48, 0x55, 0xd5, 0x1d, 0xa8, 0xaa, 0xaa, 0x1b, 0x48, 0x55, 0x55, 0x1d,
0xa8, 0xfa, 0xaf, 0x1a, 0xc8, 0xff, 0xff, 0x1d, 0xa8, 0xfa, 0xaf, 0x1a,
0x48, 0x55, 0x55, 0x1d, 0xa8, 0xaa, 0xaa, 0x1a, 0x48, 0x55, 0x55, 0x1d,
0xa8, 0xaa, 0xaa, 0x1a, 0xf8, 0xff, 0xff, 0x1f, 0xf8, 0xff, 0xff, 0x1f,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
"""
def RunSample(w):
w.img0 = Tix.Image('pixmap', data=network_pixmap)
if not w.img0:
w.img0 = Tix.Image('bitmap', data=network_bitmap)
w.img1 = Tix.Image('pixmap', data=hard_disk_pixmap)
if not w.img0:
w.img1 = Tix.Image('bitmap', data=hard_disk_bitmap)
hdd = Tix.Button(w, padx=4, pady=1, width=120)
net = Tix.Button(w, padx=4, pady=1, width=120)
# Create the first image: we create a line, then put a string,
# a space and a image into this line, from left to right.
# The result: we have a one-line image that consists of three
# individual items
#
# The tk.calls should be methods in Tix ...
w.hdd_img = Tix.Image('compound', window=hdd)
w.hdd_img.tk.call(str(w.hdd_img), 'add', 'line')
w.hdd_img.tk.call(str(w.hdd_img), 'add', 'text', '-text', 'Hard Disk',
'-underline', '0')
w.hdd_img.tk.call(str(w.hdd_img), 'add', 'space', '-width', '7')
w.hdd_img.tk.call(str(w.hdd_img), 'add', 'image', '-image', w.img1)
# Put this image into the first button
#
hdd['image'] = w.hdd_img
# Next button
w.net_img = Tix.Image('compound', window=net)
w.net_img.tk.call(str(w.net_img), 'add', 'line')
w.net_img.tk.call(str(w.net_img), 'add', 'text', '-text', 'Network',
'-underline', '0')
w.net_img.tk.call(str(w.net_img), 'add', 'space', '-width', '7')
w.net_img.tk.call(str(w.net_img), 'add', 'image', '-image', w.img0)
# Put this image into the first button
#
net['image'] = w.net_img
close = Tix.Button(w, pady=1, text='Close',
command=lambda w=w: w.destroy())
hdd.pack(side=Tix.LEFT, padx=10, pady=10, fill=Tix.Y, expand=1)
net.pack(side=Tix.LEFT, padx=10, pady=10, fill=Tix.Y, expand=1)
close.pack(side=Tix.LEFT, padx=10, pady=10, fill=Tix.Y, expand=1)
if __name__ == '__main__':
root = Tix.Tk()
RunSample(root)
root.mainloop()

View File

@@ -0,0 +1,102 @@
# -*-mode: python; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
#
# $Id: ComboBox.py,v 1.1 2001/12/09 23:29:43 idiscovery Exp $
#
# Tix Demostration Program
#
# This sample program is structured in such a way so that it can be
# executed from the Tix demo program "tixwidgets.py": it must have a
# procedure called "RunSample". It should also have the "if" statment
# at the end of this file so that it can be run as a standalone
# program.
# This file demonstrates the use of the tixComboBox widget, which is close
# to the MS Window Combo Box control.
#
import Tix
def RunSample(w):
global demo_month, demo_year
top = Tix.Frame(w, bd=1, relief=Tix.RAISED)
demo_month = Tix.StringVar()
demo_year = Tix.StringVar()
# $w.top.a is a drop-down combo box. It is not editable -- who wants
# to invent new months?
#
# [Hint] The -options switch sets the options of the subwidgets.
# [Hint] We set the label.width subwidget option of both comboboxes to
# be 10 so that their labels appear to be aligned.
#
a = Tix.ComboBox(top, label="Month: ", dropdown=1,
command=select_month, editable=0, variable=demo_month,
options='listbox.height 6 label.width 10 label.anchor e')
# $w.top.b is a non-drop-down combo box. It is not editable: we provide
# four choices for the user, but he can enter an alternative year if he
# wants to.
#
# [Hint] Use the padY and anchor options of the label subwidget to
# align the label with the entry subwidget.
# [Hint] Notice that you should use padY (the NAME of the option) and not
# pady (the SWITCH of the option).
#
b = Tix.ComboBox(top, label="Year: ", dropdown=0,
command=select_year, editable=1, variable=demo_year,
options='listbox.height 4 label.padY 5 label.width 10 label.anchor ne')
a.pack(side=Tix.TOP, anchor=Tix.W)
b.pack(side=Tix.TOP, anchor=Tix.W)
a.insert(Tix.END, 'January')
a.insert(Tix.END, 'February')
a.insert(Tix.END, 'March')
a.insert(Tix.END, 'April')
a.insert(Tix.END, 'May')
a.insert(Tix.END, 'June')
a.insert(Tix.END, 'July')
a.insert(Tix.END, 'August')
a.insert(Tix.END, 'September')
a.insert(Tix.END, 'October')
a.insert(Tix.END, 'November')
a.insert(Tix.END, 'December')
b.insert(Tix.END, '1992')
b.insert(Tix.END, '1993')
b.insert(Tix.END, '1994')
b.insert(Tix.END, '1995')
b.insert(Tix.END, '1996')
# Use "tixSetSilent" to set the values of the combo box if you
# don't want your -command procedures (cbx:select_month and
# cbx:select_year) to be called.
#
a.set_silent('January')
b.set_silent('1995')
box = Tix.ButtonBox(w, orientation=Tix.HORIZONTAL)
box.add('ok', text='Ok', underline=0, width=6,
command=lambda w=w: ok_command(w))
box.add('cancel', text='Cancel', underline=0, width=6,
command=lambda w=w: w.destroy())
box.pack(side=Tix.BOTTOM, fill=Tix.X)
top.pack(side=Tix.TOP, fill=Tix.BOTH, expand=1)
def select_month(event=None):
# tixDemo:Status "Month = %s" % demo_month.get()
pass
def select_year(event=None):
# tixDemo:Status "Year = %s" % demo_year.get()
pass
def ok_command(w):
# tixDemo:Status "Month = %s, Year= %s" % (demo_month.get(), demo_year.get())
w.destroy()
if __name__ == '__main__':
root = Tix.Tk()
RunSample(root)
root.mainloop()

View File

@@ -0,0 +1,123 @@
# -*-mode: python; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
#
# $Id: Control.py,v 1.1 2001/12/09 23:29:43 idiscovery Exp $
#
# Tix Demostration Program
#
# This sample program is structured in such a way so that it can be
# executed from the Tix demo program "tixwidgets.py": it must have a
# procedure called "RunSample". It should also have the "if" statment
# at the end of this file so that it can be run as a standalone
# program.
# This file demonstrates the use of the tixControl widget -- it is an
# entry widget with up/down arrow buttons. You can use the arrow buttons
# to adjust the value inside the entry widget.
#
# This example program uses three Control widgets. One lets you select
# integer values; one lets you select floating point values and the last
# one lets you select a few names.
import Tix
TCL_ALL_EVENTS = 0
def RunSample (root):
control = DemoControl(root)
control.mainloop()
control.destroy()
class DemoControl:
def __init__(self, w):
self.root = w
self.exit = -1
global demo_maker, demo_thrust, demo_num_engines
demo_maker = Tix.StringVar()
demo_thrust = Tix.DoubleVar()
demo_num_engines = Tix.IntVar()
demo_maker.set('P&W')
demo_thrust.set(20000.0)
demo_num_engines.set(2)
top = Tix.Frame(w, bd=1, relief=Tix.RAISED)
# $w.top.a allows only integer values
#
# [Hint] The -options switch sets the options of the subwidgets.
# [Hint] We set the label.width subwidget option of the Controls to
# be 16 so that their labels appear to be aligned.
#
a = Tix.Control(top, label='Number of Engines: ', integer=1,
variable=demo_num_engines, min=1, max=4,
options='entry.width 10 label.width 20 label.anchor e')
b = Tix.Control(top, label='Thrust: ', integer=0,
min='10000.0', max='60000.0', step=500,
variable=demo_thrust,
options='entry.width 10 label.width 20 label.anchor e')
c = Tix.Control(top, label='Engine Maker: ', value='P&W',
variable=demo_maker,
options='entry.width 10 label.width 20 label.anchor e')
# We can't define these in the init because the widget 'c' doesn't
# exist yet and we need to reference it
c['incrcmd'] = lambda w=c: adjust_maker(w, 1)
c['decrcmd'] = lambda w=c: adjust_maker(w, -1)
c['validatecmd'] = lambda w=c: validate_maker(w)
a.pack(side=Tix.TOP, anchor=Tix.W)
b.pack(side=Tix.TOP, anchor=Tix.W)
c.pack(side=Tix.TOP, anchor=Tix.W)
box = Tix.ButtonBox(w, orientation=Tix.HORIZONTAL)
box.add('ok', text='Ok', underline=0, width=6,
command=self.okcmd)
box.add('cancel', text='Cancel', underline=0, width=6,
command=self.quitcmd)
box.pack(side=Tix.BOTTOM, fill=Tix.X)
top.pack(side=Tix.TOP, fill=Tix.BOTH, expand=1)
def okcmd (self):
# tixDemo:Status "Selected %d of %s engines each of thrust %d", (demo_num_engines.get(), demo_maker.get(), demo_thrust.get())
self.quitcmd()
def quitcmd (self):
self.exit = 0
def mainloop(self):
while self.exit < 0:
self.root.tk.dooneevent(TCL_ALL_EVENTS)
def destroy (self):
self.root.destroy()
maker_list = ['P&W', 'GE', 'Rolls Royce']
def adjust_maker(w, inc):
i = maker_list.index(demo_maker.get())
i = i + inc
if i >= len(maker_list):
i = 0
elif i < 0:
i = len(maker_list) - 1
# In Tcl/Tix we should return the string maker_list[i]. We can't
# do that in Tkinter so we set the global variable. (This works).
demo_maker.set(maker_list[i])
def validate_maker(w):
try:
i = maker_list.index(demo_maker.get())
except ValueError:
# Works here though. Why ? Beats me.
return maker_list[0]
# Works here though. Why ? Beats me.
return maker_list[i]
if __name__ == '__main__':
root = Tix.Tk()
RunSample(root)

View File

@@ -0,0 +1,132 @@
# -*-mode: python; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
#
# $Id: DirList.py,v 1.1 2001/12/09 23:29:43 idiscovery Exp $
#
# Tix Demostration Program
#
# This sample program is structured in such a way so that it can be
# executed from the Tix demo program "tixwidgets.py": it must have a
# procedure called "RunSample". It should also have the "if" statment
# at the end of this file so that it can be run as a standalone
# program using tixwish.
# This file demonstrates the use of the tixDirList widget -- you can
# use it for the user to select a directory. For example, an installation
# program can use the tixDirList widget to ask the user to select the
# installation directory for an application.
#
import Tix, os, copy
from Tkconstants import *
TCL_ALL_EVENTS = 0
def RunSample (root):
dirlist = DemoDirList(root)
dirlist.mainloop()
dirlist.destroy()
class DemoDirList:
def __init__(self, w):
self.root = w
self.exit = -1
z = w.winfo_toplevel()
z.wm_protocol("WM_DELETE_WINDOW", lambda self=self: self.quitcmd())
# Create the tixDirList and the tixLabelEntry widgets on the on the top
# of the dialog box
# bg = root.tk.eval('tix option get bg')
# adding bg=bg crashes Windows pythonw tk8.3.3 Python 2.1.0
top = Tix.Frame( w, relief=RAISED, bd=1)
# Create the DirList widget. By default it will show the current
# directory
#
#
top.dir = Tix.DirList(top)
top.dir.hlist['width'] = 40
# When the user presses the ".." button, the selected directory
# is "transferred" into the entry widget
#
top.btn = Tix.Button(top, text = " >> ", pady = 0)
# We use a LabelEntry to hold the installation directory. The user
# can choose from the DirList widget, or he can type in the directory
# manually
#
top.ent = Tix.LabelEntry(top, label="Installation Directory:",
labelside = 'top',
options = '''
entry.width 40
label.anchor w
''')
font = self.root.tk.eval('tix option get fixed_font')
# font = self.root.master.tix_option_get('fixed_font')
top.ent.entry['font'] = font
self.dlist_dir = copy.copy(os.curdir)
# This should work setting the entry's textvariable
top.ent.entry['textvariable'] = self.dlist_dir
top.btn['command'] = lambda dir=top.dir, ent=top.ent, self=self: \
self.copy_name(dir,ent)
# top.ent.entry.insert(0,'tix'+`self`)
top.ent.entry.bind('<Return>', lambda self=self: self.okcmd () )
top.pack( expand='yes', fill='both', side=TOP)
top.dir.pack( expand=1, fill=BOTH, padx=4, pady=4, side=LEFT)
top.btn.pack( anchor='s', padx=4, pady=4, side=LEFT)
top.ent.pack( expand=1, fill=X, anchor='s', padx=4, pady=4, side=LEFT)
# Use a ButtonBox to hold the buttons.
#
box = Tix.ButtonBox (w, orientation='horizontal')
box.add ('ok', text='Ok', underline=0, width=6,
command = lambda self=self: self.okcmd () )
box.add ('cancel', text='Cancel', underline=0, width=6,
command = lambda self=self: self.quitcmd () )
box.pack( anchor='s', fill='x', side=BOTTOM)
def copy_name (self, dir, ent):
# This should work as it is the entry's textvariable
self.dlist_dir = dir.cget('value')
# but it isn't so I'll do it manually
ent.entry.delete(0,'end')
ent.entry.insert(0, self.dlist_dir)
def okcmd (self):
# tixDemo:Status "You have selected the directory" + self.dlist_dir
self.quitcmd()
def quitcmd (self):
self.exit = 0
def mainloop(self):
while self.exit < 0:
self.root.tk.dooneevent(TCL_ALL_EVENTS)
def destroy (self):
self.root.destroy()
# This "if" statement makes it possible to run this script file inside or
# outside of the main demo program "tixwidgets.py".
#
if __name__== '__main__' :
import tkMessageBox, traceback
try:
root=Tix.Tk()
RunSample(root)
except:
t, v, tb = sys.exc_info()
text = "Error running the demo script:\n"
for line in traceback.format_exception(t,v,tb):
text = text + line + '\n'
d = tkMessageBox.showerror ( 'Tix Demo Error', text)

View File

@@ -0,0 +1,118 @@
# -*-mode: python; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
#
# $Id: DirTree.py,v 1.1 2001/12/09 23:29:43 idiscovery Exp $
#
# Tix Demostration Program
#
# This sample program is structured in such a way so that it can be
# executed from the Tix demo program "tixwidgets.py": it must have a
# procedure called "RunSample". It should also have the "if" statment
# at the end of this file so that it can be run as a standalone
# program using tixwish.
# This file demonstrates the use of the tixDirTree widget -- you can
# use it for the user to select a directory. For example, an installation
# program can use the tixDirTree widget to ask the user to select the
# installation directory for an application.
#
import Tix, os, copy
from Tkconstants import *
TCL_ALL_EVENTS = 0
def RunSample (root):
dirtree = DemoDirTree(root)
dirtree.mainloop()
dirtree.destroy()
class DemoDirTree:
def __init__(self, w):
self.root = w
self.exit = -1
z = w.winfo_toplevel()
z.wm_protocol("WM_DELETE_WINDOW", lambda self=self: self.quitcmd())
# Create the tixDirTree and the tixLabelEntry widgets on the on the top
# of the dialog box
# bg = root.tk.eval('tix option get bg')
# adding bg=bg crashes Windows pythonw tk8.3.3 Python 2.1.0
top = Tix.Frame( w, relief=RAISED, bd=1)
# Create the DirTree widget. By default it will show the current
# directory
#
#
top.dir = Tix.DirTree(top)
top.dir.hlist['width'] = 40
# When the user presses the ".." button, the selected directory
# is "transferred" into the entry widget
#
top.btn = Tix.Button(top, text = " >> ", pady = 0)
# We use a LabelEntry to hold the installation directory. The user
# can choose from the DirTree widget, or he can type in the directory
# manually
#
top.ent = Tix.LabelEntry(top, label="Installation Directory:",
labelside = 'top',
options = '''
entry.width 40
label.anchor w
''')
self.dlist_dir = copy.copy(os.curdir)
top.ent.entry['textvariable'] = self.dlist_dir
top.btn['command'] = lambda dir=top.dir, ent=top.ent, self=self: \
self.copy_name(dir,ent)
top.ent.entry.bind('<Return>', lambda self=self: self.okcmd () )
top.pack( expand='yes', fill='both', side=TOP)
top.dir.pack( expand=1, fill=BOTH, padx=4, pady=4, side=LEFT)
top.btn.pack( anchor='s', padx=4, pady=4, side=LEFT)
top.ent.pack( expand=1, fill=X, anchor='s', padx=4, pady=4, side=LEFT)
# Use a ButtonBox to hold the buttons.
#
box = Tix.ButtonBox (w, orientation='horizontal')
box.add ('ok', text='Ok', underline=0, width=6,
command = lambda self=self: self.okcmd () )
box.add ('cancel', text='Cancel', underline=0, width=6,
command = lambda self=self: self.quitcmd () )
box.pack( anchor='s', fill='x', side=BOTTOM)
def copy_name (self, dir, ent):
# This should work as it is the entry's textvariable
self.dlist_dir = dir.cget('value')
# but it isn't so I'll do it manually
ent.entry.delete(0,'end')
ent.entry.insert(0, self.dlist_dir)
def okcmd (self):
# tixDemo:Status "You have selected the directory" + self.dlist_dir
self.quitcmd()
def quitcmd (self):
# tixDemo:Status "You have selected the directory" + self.dlist_dir
self.exit = 0
def mainloop(self):
while self.exit < 0:
self.root.tk.dooneevent(TCL_ALL_EVENTS)
def destroy (self):
self.root.destroy()
# This "if" statement makes it possible to run this script file inside or
# outside of the main demo program "tixwidgets.py".
#
if __name__== '__main__' :
root=Tix.Tk()
RunSample(root)

View File

@@ -0,0 +1,119 @@
# -*-mode: python; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
#
# $Id: NoteBook.py,v 1.1 2001/12/09 23:29:43 idiscovery Exp $
#
# Tix Demostration Program
#
# This sample program is structured in such a way so that it can be
# executed from the Tix demo program "tixwidgets.py": it must have a
# procedure called "RunSample". It should also have the "if" statment
# at the end of this file so that it can be run as a standalone
# program.
# This file demonstrates the use of the tixNoteBook widget, which allows
# you to lay out your interface using a "notebook" metaphore
#
import Tix
def RunSample(w):
global root
root = w
# We use these options to set the sizes of the subwidgets inside the
# notebook, so that they are well-aligned on the screen.
prefix = Tix.OptionName(w)
if prefix:
prefix = '*'+prefix
else:
prefix = ''
w.option_add(prefix+'*TixControl*entry.width', 10)
w.option_add(prefix+'*TixControl*label.width', 18)
w.option_add(prefix+'*TixControl*label.anchor', Tix.E)
w.option_add(prefix+'*TixNoteBook*tagPadX', 8)
# Create the notebook widget and set its backpagecolor to gray.
# Note that the -backpagecolor option belongs to the "nbframe"
# subwidget.
nb = Tix.NoteBook(w, name='nb', ipadx=6, ipady=6)
nb['bg'] = 'gray'
nb.nbframe['backpagecolor'] = 'gray'
# Create the two tabs on the notebook. The -underline option
# puts a underline on the first character of the labels of the tabs.
# Keyboard accelerators will be defined automatically according
# to the underlined character.
nb.add('hard_disk', label="Hard Disk", underline=0)
nb.add('network', label="Network", underline=0)
nb.pack(expand=1, fill=Tix.BOTH, padx=5, pady=5 ,side=Tix.TOP)
#----------------------------------------
# Create the first page
#----------------------------------------
# Create two frames: one for the common buttons, one for the
# other widgets
#
tab=nb.hard_disk
f = Tix.Frame(tab)
common = Tix.Frame(tab)
f.pack(side=Tix.LEFT, padx=2, pady=2, fill=Tix.BOTH, expand=1)
common.pack(side=Tix.RIGHT, padx=2, fill=Tix.Y)
a = Tix.Control(f, value=12, label='Access time: ')
w = Tix.Control(f, value=400, label='Write Throughput: ')
r = Tix.Control(f, value=400, label='Read Throughput: ')
c = Tix.Control(f, value=1021, label='Capacity: ')
a.pack(side=Tix.TOP, padx=20, pady=2)
w.pack(side=Tix.TOP, padx=20, pady=2)
r.pack(side=Tix.TOP, padx=20, pady=2)
c.pack(side=Tix.TOP, padx=20, pady=2)
# Create the common buttons
createCommonButtons(common)
#----------------------------------------
# Create the second page
#----------------------------------------
tab = nb.network
f = Tix.Frame(tab)
common = Tix.Frame(tab)
f.pack(side=Tix.LEFT, padx=2, pady=2, fill=Tix.BOTH, expand=1)
common.pack(side=Tix.RIGHT, padx=2, fill=Tix.Y)
a = Tix.Control(f, value=12, label='Access time: ')
w = Tix.Control(f, value=400, label='Write Throughput: ')
r = Tix.Control(f, value=400, label='Read Throughput: ')
c = Tix.Control(f, value=1021, label='Capacity: ')
u = Tix.Control(f, value=10, label='Users: ')
a.pack(side=Tix.TOP, padx=20, pady=2)
w.pack(side=Tix.TOP, padx=20, pady=2)
r.pack(side=Tix.TOP, padx=20, pady=2)
c.pack(side=Tix.TOP, padx=20, pady=2)
u.pack(side=Tix.TOP, padx=20, pady=2)
createCommonButtons(common)
def doDestroy():
global root
root.destroy()
def createCommonButtons(master):
ok = Tix.Button(master, name='ok', text='OK', width=6,
command=doDestroy)
cancel = Tix.Button(master, name='cancel',
text='Cancel', width=6,
command=doDestroy)
ok.pack(side=Tix.TOP, padx=2, pady=2)
cancel.pack(side=Tix.TOP, padx=2, pady=2)
if __name__ == '__main__':
root = Tix.Tk()
RunSample(root)
root.mainloop()

View File

@@ -0,0 +1,68 @@
# -*-mode: python; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
#
# $Id: OptMenu.py,v 1.1 2001/12/09 23:29:43 idiscovery Exp $
#
# Tix Demostration Program
#
# This sample program is structured in such a way so that it can be
# executed from the Tix demo program "tixwidgets.py": it must have a
# procedure called "RunSample". It should also have the "if" statment
# at the end of this file so that it can be run as a standalone
# program.
# This file demonstrates the use of the tixOptionMenu widget -- you can
# use it for the user to choose from a fixed set of options
#
import Tix
options = {'text':'Plain Text', 'post':'PostScript', 'html':'HTML',
'tex':'LaTeX', 'rtf':'Rich Text Format'}
def RunSample(w):
global demo_opt_from, demo_opt_to
demo_opt_from = Tix.StringVar()
demo_opt_to = Tix.StringVar()
top = Tix.Frame(w, bd=1, relief=Tix.RAISED)
from_file = Tix.OptionMenu(top, label="From File Format : ",
variable=demo_opt_from,
options = 'label.width 19 label.anchor e menubutton.width 15')
to_file = Tix.OptionMenu(top, label="To File Format : ",
variable=demo_opt_to,
options='label.width 19 label.anchor e menubutton.width 15')
# Add the available options to the two OptionMenu widgets
#
# [Hint] You have to add the options first before you set the
# global variables "demo_opt_from" and "demo_opt_to". Otherwise
# the OptionMenu widget will complain about "unknown options"!
#
for opt in options.keys():
from_file.add_command(opt, label=options[opt])
to_file.add_command(opt, label=options[opt])
demo_opt_from.set('html')
demo_opt_to.set('post')
from_file.pack(side=Tix.TOP, anchor=Tix.W, pady=3, padx=6)
to_file.pack(side=Tix.TOP, anchor=Tix.W, pady=3, padx=6)
box = Tix.ButtonBox(w, orientation=Tix.HORIZONTAL)
box.add('ok', text='Ok', underline=0, width=6,
command=lambda w=w: ok_command(w))
box.add('cancel', text='Cancel', underline=0, width=6,
command=lambda w=w: w.destroy())
box.pack(side=Tix.BOTTOM, fill=Tix.X)
top.pack(side=Tix.TOP, fill=Tix.BOTH, expand=1)
def ok_command(w):
# tixDemo:Status "Convert file from %s to %s" % ( demo_opt_from.get(), demo_opt_to.get())
w.destroy()
if __name__ == '__main__':
root = Tix.Tk()
RunSample(root)
root.mainloop()

View File

@@ -0,0 +1,99 @@
# -*-mode: python; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
#
# $Id: PanedWin.py,v 1.1 2001/12/09 23:29:43 idiscovery Exp $
#
# Tix Demostration Program
#
# This sample program is structured in such a way so that it can be
# executed from the Tix demo program "tixwidgets.py": it must have a
# procedure called "RunSample". It should also have the "if" statment
# at the end of this file so that it can be run as a standalone
# program.
# This file demonstrates the use of the tixPanedWindow widget. This program
# is a dummy news reader: the user can adjust the sizes of the list
# of artical names and the size of the text widget that shows the body
# of the article.
import Tix
TCL_ALL_EVENTS = 0
def RunSample (root):
panedwin = DemoPanedwin(root)
panedwin.mainloop()
panedwin.destroy()
class DemoPanedwin:
def __init__(self, w):
self.root = w
self.exit = -1
z = w.winfo_toplevel()
z.wm_protocol("WM_DELETE_WINDOW", lambda self=self: self.quitcmd())
group = Tix.LabelEntry(w, label='Newsgroup:', options='entry.width 25')
group.entry.insert(0,'comp.lang.python')
pane = Tix.PanedWindow(w, orientation='vertical')
p1 = pane.add('list', min=70, size=100)
p2 = pane.add('text', min=70)
list = Tix.ScrolledListBox(p1)
list.listbox['width'] = 80
list.listbox['height'] = 5
text = Tix.ScrolledText(p2)
text.text['width'] = 80
text.text['height'] = 20
list.listbox.insert(Tix.END, " 12324 Re: Tkinter is good for your health")
list.listbox.insert(Tix.END, "+ 12325 Re: Tkinter is good for your health")
list.listbox.insert(Tix.END, "+ 12326 Re: Tix is even better for your health (Was: Tkinter is good...)")
list.listbox.insert(Tix.END, " 12327 Re: Tix is even better for your health (Was: Tkinter is good...)")
list.listbox.insert(Tix.END, "+ 12328 Re: Tix is even better for your health (Was: Tkinter is good...)")
list.listbox.insert(Tix.END, " 12329 Re: Tix is even better for your health (Was: Tkinter is good...)")
list.listbox.insert(Tix.END, "+ 12330 Re: Tix is even better for your health (Was: Tkinter is good...)")
text.text['bg'] = list.listbox['bg']
text.text['wrap'] = 'none'
text.text.insert(Tix.END, """
Mon, 19 Jun 1995 11:39:52 comp.lang.python Thread 34 of 220
Lines 353 A new way to put text and bitmaps together iNo responses
ioi@blue.seas.upenn.edu Ioi K. Lam at University of Pennsylvania
Hi,
I have implemented a new image type called "compound". It allows you
to glue together a bunch of bitmaps, images and text strings together
to form a bigger image. Then you can use this image with widgets that
support the -image option. For example, you can display a text string string
together with a bitmap, at the same time, inside a TK button widget.
""")
text.text['state'] = 'disabled'
list.pack(expand=1, fill=Tix.BOTH, padx=4, pady=6)
text.pack(expand=1, fill=Tix.BOTH, padx=4, pady=6)
group.pack(side=Tix.TOP, padx=3, pady=3, fill=Tix.BOTH)
pane.pack(side=Tix.TOP, padx=3, pady=3, fill=Tix.BOTH, expand=1)
box = Tix.ButtonBox(w, orientation=Tix.HORIZONTAL)
box.add('ok', text='Ok', underline=0, width=6,
command=self.quitcmd)
box.add('cancel', text='Cancel', underline=0, width=6,
command=self.quitcmd)
box.pack(side=Tix.BOTTOM, fill=Tix.X)
def quitcmd (self):
self.exit = 0
def mainloop(self):
while self.exit < 0:
self.root.tk.dooneevent(TCL_ALL_EVENTS)
def destroy (self):
self.root.destroy()
if __name__ == '__main__':
root = Tix.Tk()
RunSample(root)

View File

@@ -0,0 +1,57 @@
# -*-mode: python; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
#
# $Id: PopMenu.py,v 1.1 2001/12/09 23:29:43 idiscovery Exp $
#
# Tix Demostration Program
#
# This sample program is structured in such a way so that it can be
# executed from the Tix demo program "tixwidgets.py": it must have a
# procedure called "RunSample". It should also have the "if" statment
# at the end of this file so that it can be run as a standalone
# program using tixwish.
# This file demonstrates the use of the tixPopupMenu widget.
#
import Tix
def RunSample(w):
# We create the frame and the button, then we'll bind the PopupMenu
# to both widgets. The result is, when you press the right mouse
# button over $w.top or $w.top.but, the PopupMenu will come up.
#
top = Tix.Frame(w, relief=Tix.RAISED, bd=1)
but = Tix.Button(top, text='Press the right mouse button over this button or its surrounding area')
but.pack(expand=1, fill=Tix.BOTH, padx=50, pady=50)
p = Tix.PopupMenu(top, title='Popup Test')
p.bind_widget(top)
p.bind_widget(but)
# Set the entries inside the PopupMenu widget.
# [Hint] You have to manipulate the "menu" subwidget.
# $w.top.p itself is NOT a menu widget.
# [Hint] Watch carefully how the sub-menu is created
#
p.menu.add_command(label='Desktop', underline=0)
p.menu.add_command(label='Select', underline=0)
p.menu.add_command(label='Find', underline=0)
p.menu.add_command(label='System', underline=1)
p.menu.add_command(label='Help', underline=0)
m1 = Tix.Menu(p.menu)
m1.add_command(label='Hello')
p.menu.add_cascade(label='More', menu=m1)
but.pack(side=Tix.TOP, padx=40, pady=50)
box = Tix.ButtonBox(w, orientation=Tix.HORIZONTAL)
box.add('ok', text='Ok', underline=0, width=6,
command=lambda w=w: w.destroy())
box.add('cancel', text='Cancel', underline=0, width=6,
command=lambda w=w: w.destroy())
box.pack(side=Tix.BOTTOM, fill=Tix.X)
top.pack(side=Tix.TOP, fill=Tix.BOTH, expand=1)
if __name__ == '__main__':
root = Tix.Tk()
RunSample(root)
root.mainloop()

View File

@@ -0,0 +1,132 @@
# -*-mode: python; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
#
# $Id: SHList1.py,v 1.1 2001/12/09 23:29:43 idiscovery Exp $
#
# Tix Demostration Program
#
# This sample program is structured in such a way so that it can be
# executed from the Tix demo program "tixwidgets.py": it must have a
# procedure called "RunSample". It should also have the "if" statment
# at the end of this file so that it can be run as a standalone
# program using tixwish.
# This file demonstrates the use of the tixScrolledHList widget.
#
import Tix
TCL_ALL_EVENTS = 0
def RunSample (root):
shlist = DemoSHList(root)
shlist.mainloop()
shlist.destroy()
class DemoSHList:
def __init__(self, w):
self.root = w
self.exit = -1
z = w.winfo_toplevel()
z.wm_protocol("WM_DELETE_WINDOW", lambda self=self: self.quitcmd())
# We create the frame and the ScrolledHList widget
# at the top of the dialog box
#
top = Tix.Frame( w, relief=Tix.RAISED, bd=1)
# Put a simple hierachy into the HList (two levels). Use colors and
# separator widgets (frames) to make the list look fancy
#
top.a = Tix.ScrolledHList(top)
top.a.pack( expand=1, fill=Tix.BOTH, padx=10, pady=10, side=Tix.TOP)
# This is our little relational database
#
bosses = [
('jeff', 'Jeff Waxman'),
('john', 'John Lee'),
('peter', 'Peter Kenson')
]
employees = [
('alex', 'john', 'Alex Kellman'),
('alan', 'john', 'Alan Adams'),
('andy', 'peter', 'Andreas Crawford'),
('doug', 'jeff', 'Douglas Bloom'),
('jon', 'peter', 'Jon Baraki'),
('chris', 'jeff', 'Chris Geoffrey'),
('chuck', 'jeff', 'Chuck McLean')
]
hlist=top.a.hlist
# Let configure the appearance of the HList subwidget
#
hlist.config( separator='.', width=25, drawbranch=0, indent=10)
count=0
for boss,name in bosses :
if count :
f=Tix.Frame(hlist, name='sep%d' % count, height=2, width=150,
bd=2, relief=Tix.SUNKEN )
hlist.add_child( itemtype=Tix.WINDOW,
window=f, state=Tix.DISABLED )
hlist.add(boss, itemtype=Tix.TEXT, text=name)
count = count+1
for person,boss,name in employees :
# '.' is the separator character we chose above
#
key= boss + '.' + person
# ^^^^ ^^^^^^
# parent entryPath / child's name
hlist.add( key, text=name )
# [Hint] Make sure the keys (e.g. 'boss.person') you choose
# are unique names. If you cannot be sure of this (because of
# the structure of your database, e.g.) you can use the
# "add_child" command instead:
#
# hlist.addchild( boss, text=name)
# ^^^^
# parent entryPath
# Use a ButtonBox to hold the buttons.
#
box= Tix.ButtonBox(top, orientation=Tix.HORIZONTAL )
box.add( 'ok', text='Ok', underline=0, width=6,
command = self.okcmd)
box.add( 'cancel', text='Cancel', underline=0, width=6,
command = self.quitcmd)
box.pack( side=Tix.BOTTOM, fill=Tix.X)
top.pack( side=Tix.TOP, fill=Tix.BOTH, expand=1 )
def okcmd (self):
self.quitcmd()
def quitcmd (self):
self.exit = 0
def mainloop(self):
while self.exit < 0:
self.root.tk.dooneevent(TCL_ALL_EVENTS)
def destroy (self):
self.root.destroy()
# This "if" statement makes it possible to run this script file inside or
# outside of the main demo program "tixwidgets.py".
#
if __name__== '__main__' :
root=Tix.Tk()
RunSample(root)

View File

@@ -0,0 +1,169 @@
# -*-mode: python; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
#
# $Id: SHList2.py,v 1.1 2001/12/09 23:29:43 idiscovery Exp $
#
# Tix Demostration Program
#
# This sample program is structured in such a way so that it can be
# executed from the Tix demo program "tixwidget": it must have a
# procedure called "RunSample". It should also have the "if" statment
# at the end of this file so that it can be run as a standalone
# program using tixwish.
# This file demonstrates how to use multiple columns and multiple styles
# in the tixHList widget
#
# In a tixHList widget, you can have one ore more columns.
#
import Tix
TCL_ALL_EVENTS = 0
def RunSample (root):
shlist = DemoSHList(root)
shlist.mainloop()
shlist.destroy()
class DemoSHList:
def __init__(self, w):
self.root = w
self.exit = -1
z = w.winfo_toplevel()
z.wm_protocol("WM_DELETE_WINDOW", lambda self=self: self.quitcmd())
# We create the frame and the ScrolledHList widget
# at the top of the dialog box
#
top = Tix.Frame( w, relief=Tix.RAISED, bd=1)
# Put a simple hierachy into the HList (two levels). Use colors and
# separator widgets (frames) to make the list look fancy
#
top.a = Tix.ScrolledHList(top, options='hlist.columns 3 hlist.header 1' )
top.a.pack( expand=1, fill=Tix.BOTH, padx=10, pady=10, side=Tix.TOP)
hlist=top.a.hlist
# Create the title for the HList widget
# >> Notice that we have set the hlist.header subwidget option to true
# so that the header is displayed
#
boldfont=hlist.tk.call('tix','option','get','bold_font')
# First some styles for the headers
style={}
style['header'] = Tix.DisplayStyle(Tix.TEXT, refwindow=hlist,
anchor=Tix.CENTER, padx=8, pady=2, font = boldfont )
hlist.header_create(0, itemtype=Tix.TEXT, text='Name',
style=style['header'])
hlist.header_create(1, itemtype=Tix.TEXT, text='Position',
style=style['header'])
# Notice that we use 3 columns in the hlist widget. This way when the user
# expands the windows wide, the right side of the header doesn't look
# chopped off. The following line ensures that the 3 column header is
# not shown unless the hlist window is wider than its contents.
#
hlist.column_width(2,0)
# This is our little relational database
#
boss = ('doe', 'John Doe', 'Director')
managers = [
('jeff', 'Jeff Waxman', 'Manager'),
('john', 'John Lee', 'Manager'),
('peter', 'Peter Kenson', 'Manager')
]
employees = [
('alex', 'john', 'Alex Kellman', 'Clerk'),
('alan', 'john', 'Alan Adams', 'Clerk'),
('andy', 'peter', 'Andreas Crawford', 'Salesman'),
('doug', 'jeff', 'Douglas Bloom', 'Clerk'),
('jon', 'peter', 'Jon Baraki', 'Salesman'),
('chris', 'jeff', 'Chris Geoffrey', 'Clerk'),
('chuck', 'jeff', 'Chuck McLean', 'Cleaner')
]
style['mgr_name'] = Tix.DisplayStyle(Tix.TEXT, refwindow=hlist)
style['mgr_posn'] = Tix.DisplayStyle(Tix.TEXT, padx=8, refwindow=hlist)
style['empl_name'] = Tix.DisplayStyle(Tix.TEXT, refwindow=hlist)
style['empl_posn'] = Tix.DisplayStyle(Tix.TEXT, padx=8, refwindow=hlist)
# Let configure the appearance of the HList subwidget
#
hlist.config(separator='.', width=25, drawbranch=0, indent=10)
hlist.column_width(0, chars=20)
# Create the boss
#
hlist.add ('.', itemtype=Tix.TEXT, text=boss[1],
style=style['mgr_name'])
hlist.item_create('.', 1, itemtype=Tix.TEXT, text=boss[2],
style=style['mgr_posn'])
# Create the managers
#
for key,name,posn in managers :
e= '.'+ key
hlist.add(e, itemtype=Tix.TEXT, text=name,
style=style['mgr_name'])
hlist.item_create(e, 1, itemtype=Tix.TEXT, text=posn,
style=style['mgr_posn'])
for key,mgr,name,posn in employees :
# "." is the separator character we chose above
entrypath = '.' + mgr + '.' + key
# ^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^
# parent entryPath / child's name
hlist.add(entrypath, text=name, style=style['empl_name'])
hlist.item_create(entrypath, 1, itemtype=Tix.TEXT,
text = posn, style = style['empl_posn'] )
# Use a ButtonBox to hold the buttons.
#
box= Tix.ButtonBox(top, orientation=Tix.HORIZONTAL )
box.add( 'ok', text='Ok', underline=0, width=6,
command = self.okcmd )
box.add( 'cancel', text='Cancel', underline=0, width=6,
command = self.quitcmd )
box.pack( side=Tix.BOTTOM, fill=Tix.X)
top.pack( side=Tix.TOP, fill=Tix.BOTH, expand=1 )
def okcmd (self):
self.quitcmd()
def quitcmd (self):
self.exit = 0
def mainloop(self):
while self.exit < 0:
self.root.tk.dooneevent(TCL_ALL_EVENTS)
def destroy (self):
self.root.destroy()
# This "if" statement makes it possible to run this script file inside or
# outside of the main demo program "tixwidgets.py".
#
if __name__== '__main__' :
root=Tix.Tk()
RunSample(root)

View File

@@ -0,0 +1,80 @@
# -*-mode: python; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
#
# $Id: Tree.py,v 1.1 2001/12/09 23:29:43 idiscovery Exp $
#
# Tix Demostration Program
#
# This sample program is structured in such a way so that it can be
# executed from the Tix demo program "tixwidgets.py": it must have a
# procedure called "RunSample". It should also have the "if" statment
# at the end of this file so that it can be run as a standalone
# program.
# This file demonstrates how to use the TixTree widget to display
# dynamic hierachical data (the files in the Unix file system)
#
import Tix, os
def RunSample(w):
top = Tix.Frame(w, relief=Tix.RAISED, bd=1)
tree = Tix.Tree(top, options='separator "/"')
tree.pack(expand=1, fill=Tix.BOTH, padx=10, pady=10, side=Tix.LEFT)
tree['opencmd'] = lambda dir=None, w=tree: opendir(w, dir)
# The / directory is added in the "open" mode. The user can open it
# and then browse its subdirectories ...
adddir(tree, "/")
box = Tix.ButtonBox(w, orientation=Tix.HORIZONTAL)
box.add('ok', text='Ok', underline=0, command=w.destroy, width=6)
box.add('cancel', text='Cancel', underline=0, command=w.destroy, width=6)
box.pack(side=Tix.BOTTOM, fill=Tix.X)
top.pack(side=Tix.TOP, fill=Tix.BOTH, expand=1)
def adddir(tree, dir):
if dir == '/':
text = '/'
else:
text = os.path.basename(dir)
tree.hlist.add(dir, itemtype=Tix.IMAGETEXT, text=text,
image=tree.tk.call('tix', 'getimage', 'folder'))
try:
os.listdir(dir)
tree.setmode(dir, 'open')
except os.error:
# No read permission ?
pass
# This function is called whenever the user presses the (+) indicator or
# double clicks on a directory whose mode is "open". It loads the files
# inside that directory into the Tree widget.
#
# Note we didn't specify the closecmd option for the Tree widget, so it
# performs the default action when the user presses the (-) indicator or
# double clicks on a directory whose mode is "close": hide all of its child
# entries
def opendir(tree, dir):
entries = tree.hlist.info_children(dir)
if entries:
# We have already loaded this directory. Let's just
# show all the child entries
#
# Note: since we load the directory only once, it will not be
# refreshed if the you add or remove files from this
# directory.
#
for entry in entries:
tree.hlist.show_entry(entry)
files = os.listdir(dir)
for file in files:
if os.path.isdir(dir + '/' + file):
adddir(tree, dir + '/' + file)
else:
tree.hlist.add(dir + '/' + file, itemtype=Tix.IMAGETEXT, text=file,
image=tree.tk.call('tix', 'getimage', 'file'))
if __name__ == '__main__':
root = Tix.Tk()
RunSample(root)
root.mainloop()

File diff suppressed because it is too large Load Diff

107
Python/INSTALL-2.1.txt Normal file
View File

@@ -0,0 +1,107 @@
# -*-mode: text; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
#
# $Id: INSTALL-2.1.txt,v 1.2 2001/12/09 05:01:28 idiscovery Exp $
INSTALLING TIX
0) To use Tix.py, you need Tcl/Tk (V8.3.3), Tix (V8.2.0) and Python (V2.1.1).
Tix.py has been written and tested on a Intel Pentium running RH Linux 5.2
and Mandrake Linux 6.x and 7.0 and Windows with the above mentioned packages.
Any version of Tcl 8.3.x should work with any version of Python >= 2.1.0
and any version of Tix >= 8.1.1 from http://tix.sourceforge.net. However,
tcl/tk8.4* is likely to cause problems and may not work by default.
Older versions, e.g. Tix 4.1 and Tk 8.0, might also work;
there is nothing OS-specific in Tix.py itself so it should work on
any machine with Tix and Python installed. You can get Tcl and Tk
from http://dev.scriptics.com and Tix from http://tix.sourceforge.net.
1) Build and install Tcl/Tk 8.3. Build and install Tix 8.1.2 or 8.2.x.
Ensure that Tix is properly installed by running tixwish and executing
the demo programs. Under Unix, use the --enable-shared configure option
for all three. We recommend tcl8.3.3 for this release of Tix.py.
2a) If you have a distribution like ActiveState with a tcl subdirectory
of $PYTHONHOME, which contains the directories tcl8.3 and tk8.3,
make a directory tix8.2 as well. Recursively copy the files from the
*installed* <tix>/lib8.2 to $PYTHONHOME/lib/tix8.2, and copy the dynamic
library (tix8283.dll or libtix8.2.8.3.so) to the same place as the tcl
dynamic libraries ($PYTHONHOME/Dlls or lib/python-2.1/lib-dynload).
For shared library install such as this are all down, and you
can skip to the section TESTING.
2b) To build statically, modify Modules/Setup.dist and setup.py to change
the version of the tix library from tix4.1.8.0 to tix8.2.8.3 if necessary.
These modified files can be used for Tkinter with or without Tix.
3) The default is to build dynamically, and use the Tcl 'package require'.
Under Windows, you will have to modify the MS VC project files,
which is complex: use a text editor to modify the PCBuild/_tkinter.dsp file.
To build statically under Unix, modify the Modules/Setup file to link
in the Tix library according to the comments in the file.
On Linux this looks like:
# *** Always uncomment this (leave the leading underscore in!):
_tkinter _tkinter.c tkappinit.c -DWITH_APPINIT \
# *** Uncomment and edit to reflect where your Tcl/Tk libraries are:
-L/usr/local/lib \
# *** Uncomment and edit to reflect where your Tcl/Tk headers are:
-I/usr/local/include \
# *** Uncomment and edit to reflect where your X11 header files are:
-I/usr/X11R6/include \
# *** Or uncomment this for Solaris:
# -I/usr/openwin/include \
# *** Uncomment and edit for BLT extension only:
# -DWITH_BLT -I/usr/local/blt/blt8.0-unoff/include -lBLT8.0 \
# *** Uncomment and edit for PIL (TkImaging) extension only:
# (See http://www.pythonware.com/products/pil/ for more info)
# -DWITH_PIL -I../Extensions/Imaging/libImaging tkImaging.c \
# *** Uncomment and edit for TOGL extension only:
# -DWITH_TOGL togl.c \
# *** Uncomment and edit for Tix extension only:
-DWITH_TIX -ltix8.2.8.3 \
# *** Uncomment and edit to reflect your Tcl/Tk versions:
-ltk8.3 -ltcl8.3 \
# *** Uncomment and edit to reflect where your X11 libraries are:
-L/usr/X11R6/lib \
# *** Or uncomment this for Solaris:
# -L/usr/openwin/lib \
# *** Uncomment these for TOGL extension only:
# -lGL -lGLU -lXext -lXmu \
# *** Uncomment for AIX:
# -lld \
# *** Always uncomment this; X11 libraries to link with:
-lX11
4) Rebuild Python and reinstall.
TESTING
-------
You should now have a working Tix implementation in Python. To see if all
is as it should be, run the 'tixwidgets.py' script in the Demo/tix directory.
Under X windows, do
/usr/local/bin/python Demo/tix/tixwidgets.py
If this does not work, you may need to tell python where to find
the Tcl, Tk and Tix library files. This is done by setting the
TCL_LIBRARY, TK_LIBRARY and TIX_LIBRARY environment variables.
Try this under Unix:
env TCL_LIBRARY=/usr/local/lib/tcl8.3 \
TK_LIBRARY=/usr/local/lib/tk8.3 \
TIX_LIBRARY=/usr/local/lib/tix8.2 \
/usr/local/bin/python Demo/tix/tixwidgets.py
or under Windows:
set TCL_LIBRARY=\usr\local\lib\tcl8.3
set TK_LIBRARY=\usr\local\lib\tk8.3
set TIX_LIBRARY=\usr\local\lib\tix8.2
pythonw.exe Demo\tix\tixwidgets.py
If you find any bugs or have suggestions for improvement, please report them
via http://tix.sourceforge.net

1625
Python/Lib/lib-tk/Tix.py Normal file

File diff suppressed because it is too large Load Diff

30
Python/README-2.1.txt Normal file
View File

@@ -0,0 +1,30 @@
# -*-mode: python; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
#
# $Id: README-2.1.txt,v 1.2 2001/12/09 05:01:28 idiscovery Exp $
#
About Tix.py
-----------
Tix.py is based on an idea of Jean-Marc Lugrin (lugrin@ms.com) who wrote
pytix (another Python-Tix marriage). Tix widgets are an attractive and
useful extension to Tk. See http://tix.sourceforge.net
for more details about Tix and how to get it.
As of version 2.1, Tix.py is a part of the standard Python library.
You should find Tix.py in the Lib/lib-tk directory, and demos in the Demo/tix
directory. The files here were current as of Python 2.2 and should work with
any version of Python, but may have updated in the standard Python distribution
(http://python.sourceforge.net and http://www.python.org).
Features:
1) It is almost complete.
2) Tix widgets are represented by classes in Python. Sub-widgets
are members of the mega-widget class. For example, if a
particular TixWidget (e.g. ScrolledText) has an embedded widget
(Text in this case), it is possible to call the methods of the
child directly.
3) The members of the class are created automatically. In the case
of widgets like ButtonBox, the members are added dynamically.

15
Python/README-2.2.txt Normal file
View File

@@ -0,0 +1,15 @@
# -*-mode: python; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
#
# $Id: README-2.2.txt,v 1.1 2002/01/24 09:48:42 idiscovery Exp $
#
About Tix.py
-----------
As of version 2.1, Tix.py is a part of the standard Python library.
However, the Tix shipped with Python 2.2 is broken.
You should replace Tix.py in the Lib/lib-tk directory, and demos in the Demo/tix
directory with the files found here.

1625
Python/Tix.py Normal file

File diff suppressed because it is too large Load Diff