Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit b21cb5f

Browse files
committed
Patch #410231: Add the Python Tix library.
1 parent 2c91c81 commit b21cb5f

38 files changed

Lines changed: 3794 additions & 0 deletions

Demo/tix/BUGS.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
$Id$
2+
3+
1) There seems to be a problem with ComboBox that shows up
4+
in the ExFileSelectBox demo. The popdown scrolled list widget
5+
is being created, then destroyed. This does not happen in Tcl Tix.
6+
This is probably a sympton in Tix from _tkinter; if you find the cause
7+
of this, please post a patch on http://tix.sourceforge.net.
8+

Demo/tix/INSTALL.txt

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
$Id$
2+
3+
Installing PyTix
4+
----------------
5+
6+
0) To use PyTix, you need Tcl/Tk (V8.2+), Tix (V8.1+) and Python (V2.1+).
7+
PyTix has been written and tested on a Intel Pentium running RH Linux 5.2
8+
and Mandrake Linux 7.0 and Windows with the above mentioned packages.
9+
10+
Older versions, e.g. Tix 4.1 and Tk 8.0, might also work.
11+
12+
There is nothing OS-specific in PyTix itself so it should work on
13+
any machine with Tix and Python installed. You can get Tcl and Tk
14+
from http://dev.scriptics.com and Tix from http://tix.sourceforge.net.
15+
16+
1) Build and install Tcl/Tk 8.2 or 8.3. Build and install Tix 8.1 or better.
17+
Ensure that Tix is properly installed by running tixwish and executing
18+
the demo programs. Under Unix, use the --enable-shared configure option
19+
for all three. We recommend tcl8.2.3 for this release of PyTix.
20+
21+
2) Modify Modules/Setup.dist and setup.py to change the version of the
22+
tix library from tix4.1.8.0 to tix8.1.8.2
23+
These modified files can be used for Tkinter with or without Tix.
24+
25+
3) The default is to build dynamically, and use the Tcl 'package require'.
26+
To build statically, modify the Modules/Setup file to link in the Tix
27+
library according to the comments in the file. On Linux this looks like:
28+
29+
# *** Always uncomment this (leave the leading underscore in!):
30+
_tkinter _tkinter.c tkappinit.c -DWITH_APPINIT \
31+
# *** Uncomment and edit to reflect where your Tcl/Tk libraries are:
32+
-L/usr/local/lib \
33+
# *** Uncomment and edit to reflect where your Tcl/Tk headers are:
34+
-I/usr/local/include \
35+
# *** Uncomment and edit to reflect where your X11 header files are:
36+
-I/usr/X11R6/include \
37+
# *** Or uncomment this for Solaris:
38+
# -I/usr/openwin/include \
39+
# *** Uncomment and edit for BLT extension only:
40+
# -DWITH_BLT -I/usr/local/blt/blt8.0-unoff/include -lBLT8.0 \
41+
# *** Uncomment and edit for PIL (TkImaging) extension only:
42+
# (See http://www.pythonware.com/products/pil/ for more info)
43+
# -DWITH_PIL -I../Extensions/Imaging/libImaging tkImaging.c \
44+
# *** Uncomment and edit for TOGL extension only:
45+
# -DWITH_TOGL togl.c \
46+
# *** Uncomment and edit for Tix extension only:
47+
-DWITH_TIX -ltix8.1.8.2 \
48+
# *** Uncomment and edit to reflect your Tcl/Tk versions:
49+
-ltk8.2 -ltcl8.2 \
50+
# *** Uncomment and edit to reflect where your X11 libraries are:
51+
-L/usr/X11R6/lib \
52+
# *** Or uncomment this for Solaris:
53+
# -L/usr/openwin/lib \
54+
# *** Uncomment these for TOGL extension only:
55+
# -lGL -lGLU -lXext -lXmu \
56+
# *** Uncomment for AIX:
57+
# -lld \
58+
# *** Always uncomment this; X11 libraries to link with:
59+
-lX11
60+
61+
4) Rebuild Python and reinstall.
62+
63+
You should now have a working Tix implementation in Python. To see if all
64+
is as it should be, run the 'tixwidgets.py' script in the Demo/tix directory.
65+
Under X windows, do
66+
/usr/local/bin/python Demo/tix/tixwidgets.py
67+
68+
If this does not work, you may need to tell python where to find
69+
the Tcl, Tk and Tix library files. This is done by setting the
70+
TCL_LIBRARY, TK_LIBRARY and TIX_LIBRARY environment variables. Try this:
71+
72+
env TCL_LIBRARY=/usr/local/lib/tcl8.2 \
73+
TK_LIBRARY=/usr/local/lib/tk8.2 \
74+
TIX_LIBRARY=/usr/local/lib/tix8.1 \
75+
/usr/local/bin/python Demo/tix/tixwidgets.py
76+
77+
78+
If you find any bugs or have suggestions for improvement, please report them
79+
via http://tix.sourceforge.net
80+
81+

Demo/tix/README.txt

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
About PyTix
2+
-----------
3+
4+
PyTix is based on an idea of Jean-Marc Lugrin ([email protected]) who wrote
5+
pytix (another Python-Tix marriage). Tix widgets are an attractive and
6+
useful extension to Tk. See http://tix.sourceforge.net
7+
for more details about Tix and how to get it.
8+
9+
Features:
10+
1) It is almost complete.
11+
2) Tix widgets are represented by classes in Python. Sub-widgets
12+
are members of the mega-widget class. For example, if a
13+
particular TixWidget (e.g. ScrolledText) has an embedded widget
14+
(Text in this case), it is possible to call the methods of the
15+
child directly.
16+
3) The members of the class are created automatically. In the case
17+
of widgets like ButtonBox, the members are added dynamically.
18+
19+

Demo/tix/bitmaps/about.xpm

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
/* XPM */
2+
static char * about_xpm[] = {
3+
"50 40 7 1",
4+
" s None c None",
5+
". c black",
6+
"X c white",
7+
"o c gray70",
8+
"O c navy",
9+
"+ c red",
10+
"@ c yellow",
11+
" ",
12+
" ",
13+
" ",
14+
" ................................. ",
15+
" ..XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXoo. ",
16+
" .XooooooooooooooooooooooooooooooXo. ",
17+
" .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXooXo. ",
18+
" ..oooooooooooooooooooooooooooooooXo. ",
19+
" ...............................XoXo. ",
20+
" .OOOOOOOOOOOOOOOOOOOOOOOOOOOOO.XoXo. ",
21+
" .OOOOOOOOOOOOOOOOOOOOOOOOOOOOO.XoXo. ",
22+
" .OOOOOOOOOOOOOOOOOOOOOOOOOOOOO.XoXo. ",
23+
" .OOOOOOOOOOOOOOOOOOOOOOOOOOOOO.XoXo. ",
24+
" .OOOOOOOOOOOOOOOOOOOOOOOOOOOOO.XoXo.++++ ",
25+
" .OOOOOOOOOOOOOOOOOOOOOOOOOOOOO.XoXo+++ ",
26+
" .OOOOOOOOOOOOOOOOOOOOOOOOOOOOO.Xo+++++ ",
27+
" .OOOOOOOOOOOOOOOOOOOOOOOOOOOOO.Xo++++++ ",
28+
" .OOOOOOOOOOOOOOOOOOOOOOOOOOOOO.Xo+++ + ",
29+
" .OOOOO@@@@@OOOOOOOOOOOOOOOOOOO.Xo++. ",
30+
" .OOOOOOO@[email protected]. ",
31+
32+
" .OOOOOOO@OOOO@@OOO@[email protected]. ",
33+
" .OOOOOOO@OOOOO@OOOO@[email protected]. ",
34+
" .OOOOOOO@OOOOO@[email protected]. ",
35+
" .OOOOOOO@OOOOO@[email protected]. ",
36+
" .OOOOOOO@OOOOO@OOOO@[email protected]. ",
37+
" .OOOOOOO@OOOO@@@OO@[email protected]. ",
38+
" .OOOOOOOOOOOOOOOOOOOOOOOOOOOOO.XoXo. ",
39+
" .OOOOOOOOOOOOOOOOOOOOOOOOOOOOO.XoXo. ",
40+
" .OOOOOOOOOOOOOOOOOOOOOOOOOOOOO.XoXo. ",
41+
" .OOOOOOOOOOOOOOOOOOOOOOOOOOOOO.XoXo. ",
42+
" .OOOOOOOOOOOOOOOOOOOOOOOOOOOOO.XoXo. ",
43+
" .OOOOOOOOOOOOOOOOOOOOOOOOOOOOO.XoXo. ",
44+
" .OOOOOOOOOOOOOOOOOOOOOOOOOOOOO.Xo.. ",
45+
" .OOOOOOOOOOOOOOOOOOOOOOOOOOOOO.Xo ",
46+
" OOOOOOOOOOOOOOOOOOOOOOOOOOOOO.X. ",
47+
" ............................. ",
48+
" ",
49+
" ",
50+
" "};

Demo/tix/bitmaps/bold.xbm

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#define bold_width 16
2+
#define bold_height 16
3+
static unsigned char bold_bits[] = {
4+
0x00, 0x00, 0x00, 0x00, 0xfc, 0x07, 0xfc, 0x0f, 0x18, 0x1c, 0x18, 0x18,
5+
0x18, 0x18, 0x18, 0x1c, 0xf8, 0x0f, 0xf8, 0x0f, 0x18, 0x18, 0x18, 0x30,
6+
0x18, 0x30, 0x18, 0x38, 0xfc, 0x3f, 0xfc, 0x1f};

Demo/tix/bitmaps/capital.xbm

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#define capital_width 16
2+
#define capital_height 16
3+
static unsigned char capital_bits[] = {
4+
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x08, 0x30, 0x0c, 0x30, 0x06,
5+
0x30, 0x03, 0xb0, 0x01, 0xf0, 0x00, 0xf0, 0x00, 0xf0, 0x01, 0xb0, 0x03,
6+
0x30, 0x07, 0x30, 0x0e, 0x30, 0x1c, 0x00, 0x00};

Demo/tix/bitmaps/centerj.xbm

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#define centerj_width 16
2+
#define centerj_height 16
3+
static unsigned char centerj_bits[] = {
4+
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x3e, 0x00, 0x00, 0xc0, 0x0d,
5+
0x00, 0x00, 0x58, 0x77, 0x00, 0x00, 0xb0, 0x3b, 0x00, 0x00, 0xdc, 0xf7,
6+
0x00, 0x00, 0xf0, 0x3e, 0x00, 0x00, 0xd8, 0x7e};

Demo/tix/bitmaps/combobox.xbm

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#define combobox_width 32
2+
#define combobox_height 32
3+
static unsigned char combobox_bits[] = {
4+
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5+
0xfc, 0xff, 0xff, 0x3e, 0x04, 0x00, 0x80, 0x2a, 0x04, 0x00, 0x80, 0x2a,
6+
0x04, 0x00, 0x80, 0x2a, 0x04, 0x00, 0x80, 0x2b, 0xfc, 0xff, 0xff, 0x3e,
7+
0x08, 0x00, 0x00, 0x20, 0x08, 0x00, 0x00, 0x3e, 0x08, 0x00, 0x00, 0x2a,
8+
0x28, 0x49, 0x00, 0x2a, 0x08, 0x00, 0x00, 0x3e, 0x08, 0x00, 0x00, 0x22,
9+
0x08, 0x00, 0x00, 0x22, 0x28, 0x49, 0x12, 0x22, 0x08, 0x00, 0x00, 0x22,
10+
0x08, 0x00, 0x00, 0x22, 0x08, 0x00, 0x00, 0x22, 0x28, 0x49, 0x02, 0x22,
11+
0x08, 0x00, 0x00, 0x3e, 0x08, 0x00, 0x00, 0x2a, 0x08, 0x00, 0x00, 0x2a,
12+
0xf8, 0xff, 0xff, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
13+
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
14+
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};

Demo/tix/bitmaps/combobox.xpm

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
/* XPM */
2+
static char * combobox_xpm[] = {
3+
"50 40 6 1",
4+
" s None c None",
5+
". c black",
6+
"X c white",
7+
"o c #FFFF80808080",
8+
"O c gray70",
9+
"+ c #808000008080",
10+
" ",
11+
" ",
12+
" ",
13+
" .................................... XXXXXXX ",
14+
" .ooooooooooooooooooooooooooooooooooX X . . ",
15+
" .ooooooooooooooooooooooooooooooooooX X . . ",
16+
" .oooo.oooooooooooooooooooooooooooooX X . . ",
17+
" .oo.o..oo.o.oo.o.ooooooooooooooooooX X . . ",
18+
" .o..o.o.o.oo.oo.oo.ooooooooooooooooX X ... . ",
19+
" .oo.oo.oo.o.oo.ooo.ooooooooooooooooX X . . ",
20+
" .ooooooooooooooooooooooooooooooooooX X . ",
21+
" .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX X...... ",
22+
" ",
23+
" ",
24+
" ",
25+
" XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ",
26+
" X............................................ ",
27+
" X.OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOX.OOOOX. ",
28+
" X.O+OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOX.OX OX. ",
29+
" X.O++OOO+OO+++OOOOOOOOOOOOOOOOOOOOOOOX.X ..X. ",
30+
" X.O+O+O+OOO+O+OOOOOOOOOOOOOOOOOOOOOOOX.OOOOX. ",
31+
" X.O++OOO+OO+++OOOOOOOOOOOOOOOOOOOOOOOX.OOOOX. ",
32+
" X.OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOX.XXXXX. ",
33+
" X.O.....X..........................OOX.X .X. ",
34+
" X.OX...XXX.X.XX.XX.................OOX.X .X. ",
35+
" X.OX.X..X..X.XX..XX.X..............OOX.X .X. ",
36+
" X.O.X...X..X.X...X..X..............OOX.X .X. ",
37+
" X.OOOOOOOOOOOOOOOOOOOOOOOO+OOOOOOOOOOX.X .X. ",
38+
" X.OOOOOOOOO+OOO+OOOOO+OOOO+OOOOOOOOOOX.X .X. ",
39+
" X.O+++OO+OO+O+OO++O++OO+OO+OOOOOOOOOOX.X...X. ",
40+
" X.OO+OO++OO+O+OO+OOO+OO+O++OOOOOOOOOOX.OOOOX. ",
41+
" X.OOOOOOOO+OOOOO++OO+OOOOOOOOOOOOOOOOX.OOOOX. ",
42+
" X.OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOX.X .X. ",
43+
" X.OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOX.O .OX. ",
44+
" X.OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOX.OOOOX. ",
45+
" X.XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.XXXXX. ",
46+
" X............................................ ",
47+
" ",
48+
" ",
49+
" "};

Demo/tix/bitmaps/combobox.xpm.1

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
/* XPM */
2+
static char * combobox_xpm[] = {
3+
"50 40 4 1",
4+
" s None c None",
5+
". c black",
6+
"X c #FFFF80808080",
7+
"o c gray70",
8+
" ",
9+
" ",
10+
" ",
11+
" .................................... ....... ",
12+
" .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX. . . . ",
13+
" .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX. . . . ",
14+
" .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX. . . . ",
15+
" .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX. . . . ",
16+
" .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX. . ... . ",
17+
" .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX. . . . ",
18+
" .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX. . . ",
19+
" .................................... ....... ",
20+
" ",
21+
" ............................................. ",
22+
" .ooooooooooooooooooooooooooooooooooooo.ooooo. ",
23+
" .ooooooooooooooooooooooooooooooooooooo.ooooo. ",
24+
" .o...................................o.ooooo. ",
25+
" .o...................................o.ooooo. ",
26+
" .o...................................o.ooooo. ",
27+
" .o...................................o.ooooo. ",
28+
" .ooooooooooooooooooooooooooooooooooooo.ooooo. ",
29+
" .ooooooooooooooooooooooooooooooooooooo.ooooo. ",
30+
" .ooooooooooooooooooooooooooooooooooooo.ooooo. ",
31+
" .ooooooooooooooooooooooooooooooooooooo.ooooo. ",
32+
" .ooooooooooooooooooooooooooooooooooooo.ooooo. ",
33+
" .ooooooooooooooooooooooooooooooooooooo.ooooo. ",
34+
" .ooooooooooooooooooooooooooooooooooooo.ooooo. ",
35+
" .ooooooooooooooooooooooooooooooooooooo.ooooo. ",
36+
" .ooooooooooooooooooooooooooooooooooooo.ooooo. ",
37+
" .ooooooooooooooooooooooooooooooooooooo.ooooo. ",
38+
" .ooooooooooooooooooooooooooooooooooooo.ooooo. ",
39+
" .ooooooooooooooooooooooooooooooooooooo.ooooo. ",
40+
" .ooooooooooooooooooooooooooooooooooooo.ooooo. ",
41+
" .ooooooooooooooooooooooooooooooooooooo.ooooo. ",
42+
" ............................................. ",
43+
" ",
44+
" ",
45+
" ",
46+
" ",
47+
" "};

0 commit comments

Comments
 (0)