Compare commits

..

2 Commits
tix ... zlib

Author SHA1 Message Date
Zachary Ware
75277be173 Import zlib 1.2.11 from https://zlib.net/zlib-1.2.11.tar.gz 2017-09-05 14:55:50 -07:00
Zachary Ware
4b29e0458f Update README.md 2017-05-22 12:17:48 -07:00
1020 changed files with 76107 additions and 136357 deletions

View File

@@ -1,58 +0,0 @@
<HTML>
<HEAD>
<TITLE>About Tix</TITLE>
<!-- $Id: ABOUT.html,v 1.5 2001/12/09 05:23:39 idiscovery Exp $ -->
</HEAD>
<BODY BGCOLOR="#ffffff" TEXT="#000000" LINK="#0000ff" VLINK="#800000" ALINK="#800080">
<FONT FACE="Tahoma, Arial, Helvetica">
<H2>About Tix</H2>
<blockquote>
Tix, which stands for Tk Interface Extension, is an extension
library for Tcl/Tk. Tix adds many <a
href="man/html/TixCmd/TixIntro.htm"> new widgets </a>, <a
href="man/html/TixCmd/TixIntro.htm"> image types </a> and <a
href="man/html/TixCmd/TixIntro.htm"> other commands </a> that
allows you to create compelling Tcl/Tk-based GUI applications. <p>
The following sample screen shows some widgets provided by Tix,
such as such as <a href="man/html/TixCmd/tixHList.htm">Hierarchical
Listbox</a>, <a href="man/html/TixCmd/tixNoteBook.htm">NoteBook </a>
and <a href="man/html/TixCmd/tixComboBox.htm">ComboBox </a>.
For a list of all the features in Tix, as well as how to use Tix
in your applications, see the <a
href="man/index.html"> Tix Manual Index</a>. <p>
One advantage of Tix over other Tk widget libraries is many of the
Tix core widgets are implemented in native code. This enhances
performance and provides native look-and-feel for your
applications. <p>
Tix is open-source software. See <a
href="license.terms">license.terms</a> for details. <p>
</blockquote>
<h3>Getting more information about Tix</h3>
<blockquote>
To contact the Tix Project Group, reach your fellow Tix users,
submit patches or bug reports, and find a range of other
information, please visit our web site at <a
HREF="http://tix.sourceforge.net">http://tix.sourceforge.net</A>.
</blockquote>
<hr>
<a href=index.html>Documentation Index</a><br>
</BODY>
</HTML>

249
CMakeLists.txt Normal file
View File

@@ -0,0 +1,249 @@
cmake_minimum_required(VERSION 2.4.4)
set(CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS ON)
project(zlib C)
set(VERSION "1.2.11")
option(ASM686 "Enable building i686 assembly implementation")
option(AMD64 "Enable building amd64 assembly implementation")
set(INSTALL_BIN_DIR "${CMAKE_INSTALL_PREFIX}/bin" CACHE PATH "Installation directory for executables")
set(INSTALL_LIB_DIR "${CMAKE_INSTALL_PREFIX}/lib" CACHE PATH "Installation directory for libraries")
set(INSTALL_INC_DIR "${CMAKE_INSTALL_PREFIX}/include" CACHE PATH "Installation directory for headers")
set(INSTALL_MAN_DIR "${CMAKE_INSTALL_PREFIX}/share/man" CACHE PATH "Installation directory for manual pages")
set(INSTALL_PKGCONFIG_DIR "${CMAKE_INSTALL_PREFIX}/share/pkgconfig" CACHE PATH "Installation directory for pkgconfig (.pc) files")
include(CheckTypeSize)
include(CheckFunctionExists)
include(CheckIncludeFile)
include(CheckCSourceCompiles)
enable_testing()
check_include_file(sys/types.h HAVE_SYS_TYPES_H)
check_include_file(stdint.h HAVE_STDINT_H)
check_include_file(stddef.h HAVE_STDDEF_H)
#
# Check to see if we have large file support
#
set(CMAKE_REQUIRED_DEFINITIONS -D_LARGEFILE64_SOURCE=1)
# We add these other definitions here because CheckTypeSize.cmake
# in CMake 2.4.x does not automatically do so and we want
# compatibility with CMake 2.4.x.
if(HAVE_SYS_TYPES_H)
list(APPEND CMAKE_REQUIRED_DEFINITIONS -DHAVE_SYS_TYPES_H)
endif()
if(HAVE_STDINT_H)
list(APPEND CMAKE_REQUIRED_DEFINITIONS -DHAVE_STDINT_H)
endif()
if(HAVE_STDDEF_H)
list(APPEND CMAKE_REQUIRED_DEFINITIONS -DHAVE_STDDEF_H)
endif()
check_type_size(off64_t OFF64_T)
if(HAVE_OFF64_T)
add_definitions(-D_LARGEFILE64_SOURCE=1)
endif()
set(CMAKE_REQUIRED_DEFINITIONS) # clear variable
#
# Check for fseeko
#
check_function_exists(fseeko HAVE_FSEEKO)
if(NOT HAVE_FSEEKO)
add_definitions(-DNO_FSEEKO)
endif()
#
# Check for unistd.h
#
check_include_file(unistd.h Z_HAVE_UNISTD_H)
if(MSVC)
set(CMAKE_DEBUG_POSTFIX "d")
add_definitions(-D_CRT_SECURE_NO_DEPRECATE)
add_definitions(-D_CRT_NONSTDC_NO_DEPRECATE)
include_directories(${CMAKE_CURRENT_SOURCE_DIR})
endif()
if(NOT CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_CURRENT_BINARY_DIR)
# If we're doing an out of source build and the user has a zconf.h
# in their source tree...
if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/zconf.h)
message(STATUS "Renaming")
message(STATUS " ${CMAKE_CURRENT_SOURCE_DIR}/zconf.h")
message(STATUS "to 'zconf.h.included' because this file is included with zlib")
message(STATUS "but CMake generates it automatically in the build directory.")
file(RENAME ${CMAKE_CURRENT_SOURCE_DIR}/zconf.h ${CMAKE_CURRENT_SOURCE_DIR}/zconf.h.included)
endif()
endif()
set(ZLIB_PC ${CMAKE_CURRENT_BINARY_DIR}/zlib.pc)
configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/zlib.pc.cmakein
${ZLIB_PC} @ONLY)
configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/zconf.h.cmakein
${CMAKE_CURRENT_BINARY_DIR}/zconf.h @ONLY)
include_directories(${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_SOURCE_DIR})
#============================================================================
# zlib
#============================================================================
set(ZLIB_PUBLIC_HDRS
${CMAKE_CURRENT_BINARY_DIR}/zconf.h
zlib.h
)
set(ZLIB_PRIVATE_HDRS
crc32.h
deflate.h
gzguts.h
inffast.h
inffixed.h
inflate.h
inftrees.h
trees.h
zutil.h
)
set(ZLIB_SRCS
adler32.c
compress.c
crc32.c
deflate.c
gzclose.c
gzlib.c
gzread.c
gzwrite.c
inflate.c
infback.c
inftrees.c
inffast.c
trees.c
uncompr.c
zutil.c
)
if(NOT MINGW)
set(ZLIB_DLL_SRCS
win32/zlib1.rc # If present will override custom build rule below.
)
endif()
if(CMAKE_COMPILER_IS_GNUCC)
if(ASM686)
set(ZLIB_ASMS contrib/asm686/match.S)
elseif (AMD64)
set(ZLIB_ASMS contrib/amd64/amd64-match.S)
endif ()
if(ZLIB_ASMS)
add_definitions(-DASMV)
set_source_files_properties(${ZLIB_ASMS} PROPERTIES LANGUAGE C COMPILE_FLAGS -DNO_UNDERLINE)
endif()
endif()
if(MSVC)
if(ASM686)
ENABLE_LANGUAGE(ASM_MASM)
set(ZLIB_ASMS
contrib/masmx86/inffas32.asm
contrib/masmx86/match686.asm
)
elseif (AMD64)
ENABLE_LANGUAGE(ASM_MASM)
set(ZLIB_ASMS
contrib/masmx64/gvmat64.asm
contrib/masmx64/inffasx64.asm
)
endif()
if(ZLIB_ASMS)
add_definitions(-DASMV -DASMINF)
endif()
endif()
# parse the full version number from zlib.h and include in ZLIB_FULL_VERSION
file(READ ${CMAKE_CURRENT_SOURCE_DIR}/zlib.h _zlib_h_contents)
string(REGEX REPLACE ".*#define[ \t]+ZLIB_VERSION[ \t]+\"([-0-9A-Za-z.]+)\".*"
"\\1" ZLIB_FULL_VERSION ${_zlib_h_contents})
if(MINGW)
# This gets us DLL resource information when compiling on MinGW.
if(NOT CMAKE_RC_COMPILER)
set(CMAKE_RC_COMPILER windres.exe)
endif()
add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/zlib1rc.obj
COMMAND ${CMAKE_RC_COMPILER}
-D GCC_WINDRES
-I ${CMAKE_CURRENT_SOURCE_DIR}
-I ${CMAKE_CURRENT_BINARY_DIR}
-o ${CMAKE_CURRENT_BINARY_DIR}/zlib1rc.obj
-i ${CMAKE_CURRENT_SOURCE_DIR}/win32/zlib1.rc)
set(ZLIB_DLL_SRCS ${CMAKE_CURRENT_BINARY_DIR}/zlib1rc.obj)
endif(MINGW)
add_library(zlib SHARED ${ZLIB_SRCS} ${ZLIB_ASMS} ${ZLIB_DLL_SRCS} ${ZLIB_PUBLIC_HDRS} ${ZLIB_PRIVATE_HDRS})
add_library(zlibstatic STATIC ${ZLIB_SRCS} ${ZLIB_ASMS} ${ZLIB_PUBLIC_HDRS} ${ZLIB_PRIVATE_HDRS})
set_target_properties(zlib PROPERTIES DEFINE_SYMBOL ZLIB_DLL)
set_target_properties(zlib PROPERTIES SOVERSION 1)
if(NOT CYGWIN)
# This property causes shared libraries on Linux to have the full version
# encoded into their final filename. We disable this on Cygwin because
# it causes cygz-${ZLIB_FULL_VERSION}.dll to be created when cygz.dll
# seems to be the default.
#
# This has no effect with MSVC, on that platform the version info for
# the DLL comes from the resource file win32/zlib1.rc
set_target_properties(zlib PROPERTIES VERSION ${ZLIB_FULL_VERSION})
endif()
if(UNIX)
# On unix-like platforms the library is almost always called libz
set_target_properties(zlib zlibstatic PROPERTIES OUTPUT_NAME z)
if(NOT APPLE)
set_target_properties(zlib PROPERTIES LINK_FLAGS "-Wl,--version-script,\"${CMAKE_CURRENT_SOURCE_DIR}/zlib.map\"")
endif()
elseif(BUILD_SHARED_LIBS AND WIN32)
# Creates zlib1.dll when building shared library version
set_target_properties(zlib PROPERTIES SUFFIX "1.dll")
endif()
if(NOT SKIP_INSTALL_LIBRARIES AND NOT SKIP_INSTALL_ALL )
install(TARGETS zlib zlibstatic
RUNTIME DESTINATION "${INSTALL_BIN_DIR}"
ARCHIVE DESTINATION "${INSTALL_LIB_DIR}"
LIBRARY DESTINATION "${INSTALL_LIB_DIR}" )
endif()
if(NOT SKIP_INSTALL_HEADERS AND NOT SKIP_INSTALL_ALL )
install(FILES ${ZLIB_PUBLIC_HDRS} DESTINATION "${INSTALL_INC_DIR}")
endif()
if(NOT SKIP_INSTALL_FILES AND NOT SKIP_INSTALL_ALL )
install(FILES zlib.3 DESTINATION "${INSTALL_MAN_DIR}/man3")
endif()
if(NOT SKIP_INSTALL_FILES AND NOT SKIP_INSTALL_ALL )
install(FILES ${ZLIB_PC} DESTINATION "${INSTALL_PKGCONFIG_DIR}")
endif()
#============================================================================
# Example binaries
#============================================================================
add_executable(example test/example.c)
target_link_libraries(example zlib)
add_test(example example)
add_executable(minigzip test/minigzip.c)
target_link_libraries(minigzip zlib)
if(HAVE_OFF64_T)
add_executable(example64 test/example.c)
target_link_libraries(example64 zlib)
set_target_properties(example64 PROPERTIES COMPILE_FLAGS "-D_FILE_OFFSET_BITS=64")
add_test(example64 example64)
add_executable(minigzip64 test/minigzip.c)
target_link_libraries(minigzip64 zlib)
set_target_properties(minigzip64 PROPERTIES COMPILE_FLAGS "-D_FILE_OFFSET_BITS=64")
endif()

1936
ChangeLog

File diff suppressed because it is too large Load Diff

368
FAQ Normal file
View File

@@ -0,0 +1,368 @@
Frequently Asked Questions about zlib
If your question is not there, please check the zlib home page
http://zlib.net/ which may have more recent information.
The lastest zlib FAQ is at http://zlib.net/zlib_faq.html
1. Is zlib Y2K-compliant?
Yes. zlib doesn't handle dates.
2. Where can I get a Windows DLL version?
The zlib sources can be compiled without change to produce a DLL. See the
file win32/DLL_FAQ.txt in the zlib distribution. Pointers to the
precompiled DLL are found in the zlib web site at http://zlib.net/ .
3. Where can I get a Visual Basic interface to zlib?
See
* http://marknelson.us/1997/01/01/zlib-engine/
* win32/DLL_FAQ.txt in the zlib distribution
4. compress() returns Z_BUF_ERROR.
Make sure that before the call of compress(), the length of the compressed
buffer is equal to the available size of the compressed buffer and not
zero. For Visual Basic, check that this parameter is passed by reference
("as any"), not by value ("as long").
5. deflate() or inflate() returns Z_BUF_ERROR.
Before making the call, make sure that avail_in and avail_out are not zero.
When setting the parameter flush equal to Z_FINISH, also make sure that
avail_out is big enough to allow processing all pending input. Note that a
Z_BUF_ERROR is not fatal--another call to deflate() or inflate() can be
made with more input or output space. A Z_BUF_ERROR may in fact be
unavoidable depending on how the functions are used, since it is not
possible to tell whether or not there is more output pending when
strm.avail_out returns with zero. See http://zlib.net/zlib_how.html for a
heavily annotated example.
6. Where's the zlib documentation (man pages, etc.)?
It's in zlib.h . Examples of zlib usage are in the files test/example.c
and test/minigzip.c, with more in examples/ .
7. Why don't you use GNU autoconf or libtool or ...?
Because we would like to keep zlib as a very small and simple package.
zlib is rather portable and doesn't need much configuration.
8. I found a bug in zlib.
Most of the time, such problems are due to an incorrect usage of zlib.
Please try to reproduce the problem with a small program and send the
corresponding source to us at zlib@gzip.org . Do not send multi-megabyte
data files without prior agreement.
9. Why do I get "undefined reference to gzputc"?
If "make test" produces something like
example.o(.text+0x154): undefined reference to `gzputc'
check that you don't have old files libz.* in /usr/lib, /usr/local/lib or
/usr/X11R6/lib. Remove any old versions, then do "make install".
10. I need a Delphi interface to zlib.
See the contrib/delphi directory in the zlib distribution.
11. Can zlib handle .zip archives?
Not by itself, no. See the directory contrib/minizip in the zlib
distribution.
12. Can zlib handle .Z files?
No, sorry. You have to spawn an uncompress or gunzip subprocess, or adapt
the code of uncompress on your own.
13. How can I make a Unix shared library?
By default a shared (and a static) library is built for Unix. So:
make distclean
./configure
make
14. How do I install a shared zlib library on Unix?
After the above, then:
make install
However, many flavors of Unix come with a shared zlib already installed.
Before going to the trouble of compiling a shared version of zlib and
trying to install it, you may want to check if it's already there! If you
can #include <zlib.h>, it's there. The -lz option will probably link to
it. You can check the version at the top of zlib.h or with the
ZLIB_VERSION symbol defined in zlib.h .
15. I have a question about OttoPDF.
We are not the authors of OttoPDF. The real author is on the OttoPDF web
site: Joel Hainley, jhainley@myndkryme.com.
16. Can zlib decode Flate data in an Adobe PDF file?
Yes. See http://www.pdflib.com/ . To modify PDF forms, see
http://sourceforge.net/projects/acroformtool/ .
17. Why am I getting this "register_frame_info not found" error on Solaris?
After installing zlib 1.1.4 on Solaris 2.6, running applications using zlib
generates an error such as:
ld.so.1: rpm: fatal: relocation error: file /usr/local/lib/libz.so:
symbol __register_frame_info: referenced symbol not found
The symbol __register_frame_info is not part of zlib, it is generated by
the C compiler (cc or gcc). You must recompile applications using zlib
which have this problem. This problem is specific to Solaris. See
http://www.sunfreeware.com for Solaris versions of zlib and applications
using zlib.
18. Why does gzip give an error on a file I make with compress/deflate?
The compress and deflate functions produce data in the zlib format, which
is different and incompatible with the gzip format. The gz* functions in
zlib on the other hand use the gzip format. Both the zlib and gzip formats
use the same compressed data format internally, but have different headers
and trailers around the compressed data.
19. Ok, so why are there two different formats?
The gzip format was designed to retain the directory information about a
single file, such as the name and last modification date. The zlib format
on the other hand was designed for in-memory and communication channel
applications, and has a much more compact header and trailer and uses a
faster integrity check than gzip.
20. Well that's nice, but how do I make a gzip file in memory?
You can request that deflate write the gzip format instead of the zlib
format using deflateInit2(). You can also request that inflate decode the
gzip format using inflateInit2(). Read zlib.h for more details.
21. Is zlib thread-safe?
Yes. However any library routines that zlib uses and any application-
provided memory allocation routines must also be thread-safe. zlib's gz*
functions use stdio library routines, and most of zlib's functions use the
library memory allocation routines by default. zlib's *Init* functions
allow for the application to provide custom memory allocation routines.
Of course, you should only operate on any given zlib or gzip stream from a
single thread at a time.
22. Can I use zlib in my commercial application?
Yes. Please read the license in zlib.h.
23. Is zlib under the GNU license?
No. Please read the license in zlib.h.
24. The license says that altered source versions must be "plainly marked". So
what exactly do I need to do to meet that requirement?
You need to change the ZLIB_VERSION and ZLIB_VERNUM #defines in zlib.h. In
particular, the final version number needs to be changed to "f", and an
identification string should be appended to ZLIB_VERSION. Version numbers
x.x.x.f are reserved for modifications to zlib by others than the zlib
maintainers. For example, if the version of the base zlib you are altering
is "1.2.3.4", then in zlib.h you should change ZLIB_VERNUM to 0x123f, and
ZLIB_VERSION to something like "1.2.3.f-zachary-mods-v3". You can also
update the version strings in deflate.c and inftrees.c.
For altered source distributions, you should also note the origin and
nature of the changes in zlib.h, as well as in ChangeLog and README, along
with the dates of the alterations. The origin should include at least your
name (or your company's name), and an email address to contact for help or
issues with the library.
Note that distributing a compiled zlib library along with zlib.h and
zconf.h is also a source distribution, and so you should change
ZLIB_VERSION and ZLIB_VERNUM and note the origin and nature of the changes
in zlib.h as you would for a full source distribution.
25. Will zlib work on a big-endian or little-endian architecture, and can I
exchange compressed data between them?
Yes and yes.
26. Will zlib work on a 64-bit machine?
Yes. It has been tested on 64-bit machines, and has no dependence on any
data types being limited to 32-bits in length. If you have any
difficulties, please provide a complete problem report to zlib@gzip.org
27. Will zlib decompress data from the PKWare Data Compression Library?
No. The PKWare DCL uses a completely different compressed data format than
does PKZIP and zlib. However, you can look in zlib's contrib/blast
directory for a possible solution to your problem.
28. Can I access data randomly in a compressed stream?
No, not without some preparation. If when compressing you periodically use
Z_FULL_FLUSH, carefully write all the pending data at those points, and
keep an index of those locations, then you can start decompression at those
points. You have to be careful to not use Z_FULL_FLUSH too often, since it
can significantly degrade compression. Alternatively, you can scan a
deflate stream once to generate an index, and then use that index for
random access. See examples/zran.c .
29. Does zlib work on MVS, OS/390, CICS, etc.?
It has in the past, but we have not heard of any recent evidence. There
were working ports of zlib 1.1.4 to MVS, but those links no longer work.
If you know of recent, successful applications of zlib on these operating
systems, please let us know. Thanks.
30. Is there some simpler, easier to read version of inflate I can look at to
understand the deflate format?
First off, you should read RFC 1951. Second, yes. Look in zlib's
contrib/puff directory.
31. Does zlib infringe on any patents?
As far as we know, no. In fact, that was originally the whole point behind
zlib. Look here for some more information:
http://www.gzip.org/#faq11
32. Can zlib work with greater than 4 GB of data?
Yes. inflate() and deflate() will process any amount of data correctly.
Each call of inflate() or deflate() is limited to input and output chunks
of the maximum value that can be stored in the compiler's "unsigned int"
type, but there is no limit to the number of chunks. Note however that the
strm.total_in and strm_total_out counters may be limited to 4 GB. These
counters are provided as a convenience and are not used internally by
inflate() or deflate(). The application can easily set up its own counters
updated after each call of inflate() or deflate() to count beyond 4 GB.
compress() and uncompress() may be limited to 4 GB, since they operate in a
single call. gzseek() and gztell() may be limited to 4 GB depending on how
zlib is compiled. See the zlibCompileFlags() function in zlib.h.
The word "may" appears several times above since there is a 4 GB limit only
if the compiler's "long" type is 32 bits. If the compiler's "long" type is
64 bits, then the limit is 16 exabytes.
33. Does zlib have any security vulnerabilities?
The only one that we are aware of is potentially in gzprintf(). If zlib is
compiled to use sprintf() or vsprintf(), then there is no protection
against a buffer overflow of an 8K string space (or other value as set by
gzbuffer()), other than the caller of gzprintf() assuring that the output
will not exceed 8K. On the other hand, if zlib is compiled to use
snprintf() or vsnprintf(), which should normally be the case, then there is
no vulnerability. The ./configure script will display warnings if an
insecure variation of sprintf() will be used by gzprintf(). Also the
zlibCompileFlags() function will return information on what variant of
sprintf() is used by gzprintf().
If you don't have snprintf() or vsnprintf() and would like one, you can
find a portable implementation here:
http://www.ijs.si/software/snprintf/
Note that you should be using the most recent version of zlib. Versions
1.1.3 and before were subject to a double-free vulnerability, and versions
1.2.1 and 1.2.2 were subject to an access exception when decompressing
invalid compressed data.
34. Is there a Java version of zlib?
Probably what you want is to use zlib in Java. zlib is already included
as part of the Java SDK in the java.util.zip package. If you really want
a version of zlib written in the Java language, look on the zlib home
page for links: http://zlib.net/ .
35. I get this or that compiler or source-code scanner warning when I crank it
up to maximally-pedantic. Can't you guys write proper code?
Many years ago, we gave up attempting to avoid warnings on every compiler
in the universe. It just got to be a waste of time, and some compilers
were downright silly as well as contradicted each other. So now, we simply
make sure that the code always works.
36. Valgrind (or some similar memory access checker) says that deflate is
performing a conditional jump that depends on an uninitialized value.
Isn't that a bug?
No. That is intentional for performance reasons, and the output of deflate
is not affected. This only started showing up recently since zlib 1.2.x
uses malloc() by default for allocations, whereas earlier versions used
calloc(), which zeros out the allocated memory. Even though the code was
correct, versions 1.2.4 and later was changed to not stimulate these
checkers.
37. Will zlib read the (insert any ancient or arcane format here) compressed
data format?
Probably not. Look in the comp.compression FAQ for pointers to various
formats and associated software.
38. How can I encrypt/decrypt zip files with zlib?
zlib doesn't support encryption. The original PKZIP encryption is very
weak and can be broken with freely available programs. To get strong
encryption, use GnuPG, http://www.gnupg.org/ , which already includes zlib
compression. For PKZIP compatible "encryption", look at
http://www.info-zip.org/
39. What's the difference between the "gzip" and "deflate" HTTP 1.1 encodings?
"gzip" is the gzip format, and "deflate" is the zlib format. They should
probably have called the second one "zlib" instead to avoid confusion with
the raw deflate compressed data format. While the HTTP 1.1 RFC 2616
correctly points to the zlib specification in RFC 1950 for the "deflate"
transfer encoding, there have been reports of servers and browsers that
incorrectly produce or expect raw deflate data per the deflate
specification in RFC 1951, most notably Microsoft. So even though the
"deflate" transfer encoding using the zlib format would be the more
efficient approach (and in fact exactly what the zlib format was designed
for), using the "gzip" transfer encoding is probably more reliable due to
an unfortunate choice of name on the part of the HTTP 1.1 authors.
Bottom line: use the gzip format for HTTP 1.1 encoding.
40. Does zlib support the new "Deflate64" format introduced by PKWare?
No. PKWare has apparently decided to keep that format proprietary, since
they have not documented it as they have previous compression formats. In
any case, the compression improvements are so modest compared to other more
modern approaches, that it's not worth the effort to implement.
41. I'm having a problem with the zip functions in zlib, can you help?
There are no zip functions in zlib. You are probably using minizip by
Giles Vollant, which is found in the contrib directory of zlib. It is not
part of zlib. In fact none of the stuff in contrib is part of zlib. The
files in there are not supported by the zlib authors. You need to contact
the authors of the respective contribution for help.
42. The match.asm code in contrib is under the GNU General Public License.
Since it's part of zlib, doesn't that mean that all of zlib falls under the
GNU GPL?
No. The files in contrib are not part of zlib. They were contributed by
other authors and are provided as a convenience to the user within the zlib
distribution. Each item in contrib has its own license.
43. Is zlib subject to export controls? What is its ECCN?
zlib is not subject to export controls, and so is classified as EAR99.
44. Can you please sign these lengthy legal documents and fax them back to us
so that we can use your software in our product?
No. Go away. Shoo.

68
INDEX Normal file
View File

@@ -0,0 +1,68 @@
CMakeLists.txt cmake build file
ChangeLog history of changes
FAQ Frequently Asked Questions about zlib
INDEX this file
Makefile dummy Makefile that tells you to ./configure
Makefile.in template for Unix Makefile
README guess what
configure configure script for Unix
make_vms.com makefile for VMS
test/example.c zlib usages examples for build testing
test/minigzip.c minimal gzip-like functionality for build testing
test/infcover.c inf*.c code coverage for build coverage testing
treebuild.xml XML description of source file dependencies
zconf.h.cmakein zconf.h template for cmake
zconf.h.in zconf.h template for configure
zlib.3 Man page for zlib
zlib.3.pdf Man page in PDF format
zlib.map Linux symbol information
zlib.pc.in Template for pkg-config descriptor
zlib.pc.cmakein zlib.pc template for cmake
zlib2ansi perl script to convert source files for C++ compilation
amiga/ makefiles for Amiga SAS C
as400/ makefiles for AS/400
doc/ documentation for formats and algorithms
msdos/ makefiles for MSDOS
nintendods/ makefile for Nintendo DS
old/ makefiles for various architectures and zlib documentation
files that have not yet been updated for zlib 1.2.x
qnx/ makefiles for QNX
watcom/ makefiles for OpenWatcom
win32/ makefiles for Windows
zlib public header files (required for library use):
zconf.h
zlib.h
private source files used to build the zlib library:
adler32.c
compress.c
crc32.c
crc32.h
deflate.c
deflate.h
gzclose.c
gzguts.h
gzlib.c
gzread.c
gzwrite.c
infback.c
inffast.c
inffast.h
inffixed.h
inflate.c
inflate.h
inftrees.c
inftrees.h
trees.c
trees.h
uncompr.c
zutil.c
zutil.h
source files for sample programs
See examples/README.examples
unsupported contributions by third parties
See contrib/README.contrib

5
Makefile Normal file
View File

@@ -0,0 +1,5 @@
all:
-@echo "Please use ./configure first. Thank you."
distclean:
make -f Makefile.in distclean

View File

@@ -1,456 +1,410 @@
# Makefile.in --
#
# This file is a Makefile for Sample TEA Extension. If it has the name
# "Makefile.in" then it is a template for a Makefile; to generate the
# actual Makefile, run "./configure", which is a configuration script
# generated by the "autoconf" program (constructs like "@foo@" will get
# replaced in the actual Makefile.
#
# Copyright (c) 1999 Scriptics Corporation.
# Copyright 2004 ActiveState
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
# RCS: @(#) $Id: Makefile.in,v 1.5 2006/11/16 22:33:42 hobbs Exp $
#========================================================================
# Nothing of the variables below this line need to be changed. Please
# check the TARGETS section below to make sure the make targets are
# correct.
#========================================================================
#========================================================================
# The names of the source files is defined in the configure script.
# The object files are used for linking into the final library.
# This will be used when a dist target is added to the Makefile.
# It is not important to specify the directory, as long as it is the
# $(srcdir) or in the generic, win or unix subdirectory.
#========================================================================
PKG_SOURCES = @PKG_SOURCES@
PKG_OBJECTS = @PKG_OBJECTS@
#========================================================================
# PKG_TCL_SOURCES identifies Tcl runtime files that are associated with
# this package that need to be installed, if any.
#========================================================================
PKG_TCL_SOURCES = \
library/Init.tcl library/Balloon.tcl library/BtnBox.tcl \
library/CObjView.tcl library/ChkList.tcl library/ComboBox.tcl \
library/Compat.tcl library/Console.tcl library/Control.tcl \
library/DefSchm.tcl library/DialogS.tcl library/DirBox.tcl \
library/DirDlg.tcl library/DirList.tcl library/DirTree.tcl \
library/DragDrop.tcl library/DtlList.tcl library/EFileBox.tcl \
library/EFileDlg.tcl library/Event.tcl library/FileBox.tcl \
library/FileCbx.tcl library/FileDlg.tcl \
library/FileEnt.tcl library/FloatEnt.tcl library/Grid.tcl \
library/HList.tcl library/HListDD.tcl library/IconView.tcl \
library/LabEntry.tcl library/LabFrame.tcl library/LabWidg.tcl \
library/ListNBk.tcl library/Meter.tcl library/MultView.tcl \
library/NoteBook.tcl library/OldUtil.tcl library/OptMenu.tcl \
library/PanedWin.tcl library/PopMenu.tcl library/Primitiv.tcl \
library/ResizeH.tcl library/SGrid.tcl library/SHList.tcl \
library/SListBox.tcl library/STList.tcl library/SText.tcl \
library/SWidget.tcl library/SWindow.tcl library/Select.tcl \
library/Shell.tcl library/SimpDlg.tcl library/StackWin.tcl \
library/StatBar.tcl library/StdBBox.tcl library/StdShell.tcl \
library/TList.tcl library/Tix.tcl library/Tree.tcl \
library/Utils.tcl library/VResize.tcl library/VStack.tcl \
library/VTree.tcl library/Variable.tcl \
library/WInfo.tcl library/fs.tcl
#========================================================================
# This is a list of public header files to be installed, if any.
#========================================================================
PKG_HEADERS = @PKG_HEADERS@
PKG_EXTRA_FILES = license.terms README.txt
PKG_MAN_PAGES =
#========================================================================
# "PKG_LIB_FILE" refers to the library (dynamic or static as per
# configuration options) composed of the named objects.
#========================================================================
PKG_LIB_FILE = @PKG_LIB_FILE@
PKG_STUB_LIB_FILE = @PKG_STUB_LIB_FILE@
lib_BINARIES = $(PKG_LIB_FILE)
BINARIES = $(lib_BINARIES)
SHELL = @SHELL@
srcdir = @srcdir@
prefix = @prefix@
exec_prefix = @exec_prefix@
bindir = @bindir@
libdir = @libdir@
datadir = @datadir@
mandir = @mandir@
includedir = @includedir@
DESTDIR =
PKG_DIR = $(PACKAGE_NAME)$(PACKAGE_VERSION)
pkgdatadir = $(datadir)/$(PKG_DIR)
pkglibdir = $(libdir)/$(PKG_DIR)
pkgincludedir = $(includedir)/$(PKG_DIR)
top_builddir = .
INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_VERSION = @PACKAGE_VERSION@
CC = @CC@
CFLAGS_DEFAULT = @CFLAGS_DEFAULT@
CFLAGS_WARNING = @CFLAGS_WARNING@
CLEANFILES = @CLEANFILES@
EXEEXT = @EXEEXT@
LDFLAGS_DEFAULT = @LDFLAGS_DEFAULT@
MAKE_LIB = @MAKE_LIB@
MAKE_SHARED_LIB = @MAKE_SHARED_LIB@
MAKE_STATIC_LIB = @MAKE_STATIC_LIB@
MAKE_STUB_LIB = @MAKE_STUB_LIB@
OBJEXT = @OBJEXT@
RANLIB = @RANLIB@
RANLIB_STUB = @RANLIB_STUB@
SHLIB_CFLAGS = @SHLIB_CFLAGS@
SHLIB_LD = @SHLIB_LD@
SHLIB_LD_FLAGS = @SHLIB_LD_FLAGS@
SHLIB_LD_LIBS = @SHLIB_LD_LIBS@
STLIB_LD = @STLIB_LD@
TCL_DEFS = @TCL_DEFS@
TCL_SRC_DIR = @TCL_SRC_DIR@
TCL_BIN_DIR = @TCL_BIN_DIR@
TK_SRC_DIR = @TK_SRC_DIR@
TK_BIN_DIR = @TK_BIN_DIR@
# Not used by sample, but retained for reference of what Tcl required
TCL_LIBS = @TCL_LIBS@
TK_LIBS = @TK_LIBS@
#========================================================================
# TCLLIBPATH seeds the auto_path in Tcl's init.tcl so we can test our
# package without installing. The other environment variables allow us
# to test against an uninstalled Tcl. Add special env vars that you
# require for testing here (like TCLX_LIBRARY).
#========================================================================
EXTRA_PATH = $(top_builddir):$(TCL_BIN_DIR):$(TK_BIN_DIR)
TCLSH_ENV = TCL_LIBRARY=`@CYGPATH@ $(TCL_SRC_DIR)/library` \
TK_LIBRARY=`@CYGPATH@ $(TK_SRC_DIR)/library` \
TIX_LIBRARY=`@CYGPATH@ $(srcdir)/library` \
@LD_LIBRARY_PATH_VAR@="$(EXTRA_PATH):$(@LD_LIBRARY_PATH_VAR@)" \
PATH="$(EXTRA_PATH):$(PATH)" \
TCLLIBPATH="$(top_builddir)"
TCLSH_PROG = @TCLSH_PROG@
WISH_PROG = @WISH_PROG@
TCLSH = $(TCLSH_ENV) $(TCLSH_PROG)
WISH = $(TCLSH_ENV) $(WISH_PROG)
# The local includes must come first, because the TK_XINCLUDES can be
# just a comment
INCLUDES = @PKG_INCLUDES@ \
@TCL_INCLUDES@ @TK_INCLUDES@ @TK_XINCLUDES@
PKG_CFLAGS = @PKG_CFLAGS@
DEFS = @DEFS@ $(PKG_CFLAGS)
CONFIG_CLEAN_FILES = Makefile
CPPFLAGS = @CPPFLAGS@
LIBS = @PKG_LIBS@ @LIBS@
AR = ar
CFLAGS = @CFLAGS@
COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
#========================================================================
# Start of user-definable TARGETS section
#========================================================================
#========================================================================
# TEA TARGETS. Please note that the "libraries:" target refers to platform
# independent files, and the "binaries:" target inclues executable programs and
# platform-dependent libraries. Modify these targets so that they install
# the various pieces of your package. The make and install rules
# for the BINARIES that you specified above have already been done.
#========================================================================
all: binaries libraries doc
#========================================================================
# The binaries target builds executable programs, Windows .dll's, unix
# shared/static libraries, and any other platform-dependent files.
# The list of targets to build for "binaries:" is specified at the top
# of the Makefile, in the "BINARIES" variable.
#========================================================================
binaries: $(BINARIES) pkgIndex.tcl
libraries:
doc:
install: all install-binaries install-libraries install-doc
install-binaries: binaries install-lib-binaries install-bin-binaries
@mkdir -p $(DESTDIR)$(pkglibdir)
$(INSTALL_DATA) pkgIndex.tcl $(DESTDIR)$(pkglibdir)
@list='$(PKG_EXTRA_FILES)'; for p in $$list; do \
if test -f $(srcdir)/$$p; then \
destp=`basename $$p`; \
echo " Install $$destp $(DESTDIR)$(pkglibdir)/$$destp"; \
$(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(pkglibdir)/$$destp; \
fi; \
done
#========================================================================
# This rule installs platform-independent files, such as header files.
#========================================================================
install-libraries: libraries
#========================================================================
# Install documentation. Unix manpages should go in the $(mandir)
# directory.
#========================================================================
install-doc: doc
@mkdir -p $(DESTDIR)$(pkglibdir)/html
@list='$(PKG_MAN_PAGES)'; for p in $$list; do \
html=`basename $$p|sed -e 's/.[^.]*$$//'`.html; \
$(INSTALL_DATA) $(srcdir)/doc/$$html $(DESTDIR)$(pkglibdir)/html/; \
done
html:
@cd $(srcdir)/doc; \
list='$(PKG_MAN_PAGES)'; for p in $$list; do \
html=`basename $$p|sed -e 's/.[^.]*$$//'`.html; \
echo "Creating \"$$html\" from \"$$p\""; \
rm -f $$html; \
nroff -man $$p | rman -f HTML > $$html; \
done
# Piping to cat is necessary on Windows to see the output, and
# harmless on Unix
test: binaries libraries
$(WISH) `@CYGPATH@ $(srcdir)/tests/all.tcl` $(TESTFLAGS) | cat
shell: binaries libraries
@$(WISH) $(SCRIPT)
demo: binaries libraries
$(WISH) `@CYGPATH@ $(srcdir)/demos/tixwidgets.tcl` $(TESTFLAGS) | cat
gdb:
$(TCLSH_ENV) gdb $(WISH_PROG) $(SCRIPT)
depend:
#========================================================================
# $(PKG_LIB_FILE) should be listed as part of the BINARIES variable
# mentioned above. That will ensure that this target is built when you
# run "make binaries".
#
# The $(PKG_OBJECTS) objects are created and linked into the final
# library. In most cases these object files will correspond to the
# source files above.
#========================================================================
$(PKG_LIB_FILE): $(PKG_OBJECTS)
-rm -f $(PKG_LIB_FILE)
${MAKE_LIB}
$(RANLIB) $(PKG_LIB_FILE)
#========================================================================
# In the following lines, $(srcdir) refers to the toplevel directory
# containing your extension. If your sources are in a subdirectory,
# you will have to modify the paths to reflect this:
#
# tkpkg.$(OBJEXT): $(srcdir)/src/win/tkpkg.c
# $(COMPILE) -c `@CYGPATH@ $(srcdir)/generic/tkpkg.c` -o $@
#
# Setting the VPATH variable to a list of paths will cause the
# makefile to look into these paths when resolving .c to .obj
# dependencies.
#========================================================================
VPATH = $(srcdir):$(srcdir)/generic:$(srcdir)/unix:$(srcdir)/win
.SUFFIXES: .c .$(OBJEXT)
.c.@OBJEXT@:
$(COMPILE) -c `@CYGPATH@ $<`
pkgIndex.tcl:
(\
echo 'if {[catch {package require Tcl 8.4}]} return';\
echo 'package ifneeded $(PACKAGE_NAME) $(PACKAGE_VERSION) \
[list load [file join $$dir $(PKG_LIB_FILE)] $(PACKAGE_NAME)]'\
) > pkgIndex.tcl
#========================================================================
# End of user-definable section
#========================================================================
#========================================================================
# Don't modify the file to clean here. Instead, set the "CLEANFILES"
# variable in configure.in
#========================================================================
clean:
-test -z "$(BINARIES)" || rm -f $(BINARIES)
-rm -f *.$(OBJEXT) core *.core
-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
distclean: clean
-rm -f *.tab.c
-rm -f $(CONFIG_CLEAN_FILES)
-rm -f config.cache config.log config.status
#========================================================================
# Install binary object libraries. On Windows this includes both .dll and
# .lib files. Because the .lib files are not explicitly listed anywhere,
# we need to deduce their existence from the .dll file of the same name.
#
# You should not have to modify this target.
#========================================================================
install-lib-binaries:
@mkdir -p $(DESTDIR)$(pkglibdir)
@list='$(lib_BINARIES)'; for p in $$list; do \
if test -f $$p; then \
echo " $(INSTALL_PROGRAM) $$p $(DESTDIR)$(pkglibdir)/$$p"; \
$(INSTALL_PROGRAM) $$p $(DESTDIR)$(pkglibdir)/$$p; \
echo " $(RANLIB) $(DESTDIR)$(pkglibdir)/$$p"; \
$(RANLIB) $(DESTDIR)$(pkglibdir)/$$p; \
ext=`echo $$p|sed -e "s/.*\.//"`; \
if test "x$$ext" = "xdll"; then \
lib=`basename $$p|sed -e 's/.[^.]*$$//'`.lib; \
if test -f $$lib; then \
echo " $(INSTALL_DATA) $$lib $(DESTDIR)$(pkglibdir)/$$lib"; \
$(INSTALL_DATA) $$lib $(DESTDIR)$(pkglibdir)/$$lib; \
fi; \
fi; \
fi; \
done
@echo "Installing library files to $(DESTDIR)$(pkglibdir)/$$destp";
@list='$(PKG_TCL_SOURCES)'; for p in $$list; do \
if test -f $(srcdir)/$$p; then \
destp=`basename $$p`; \
$(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(pkglibdir)/$$destp; \
fi; \
done
@echo "Installing preference sets to $(DESTDIR)$(pkglibdir)/pref"
@mkdir -p $(DESTDIR)$(pkglibdir)/pref
@cp -p $(srcdir)/library/pref/*.* $(DESTDIR)$(pkglibdir)/pref/
@echo "Installing bitmaps to $(DESTDIR)$(pkglibdir)/bitmaps"
@mkdir -p $(DESTDIR)$(pkglibdir)/bitmaps
@cp -p $(srcdir)/library/bitmaps/*.* $(DESTDIR)$(pkglibdir)/bitmaps/
#========================================================================
# Install binary executables (e.g. .exe files)
#
# You should not have to modify this target.
#========================================================================
install-bin-binaries:
@mkdir -p $(DESTDIR)$(bindir)
@list='$(bin_BINARIES)'; for p in $$list; do \
if test -f $$p; then \
echo " $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/$$p"; \
$(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/$$p; \
fi; \
done
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
cd $(top_builddir) \
&& CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
uninstall-binaries:
list='$(lib_BINARIES)'; for p in $$list; do \
rm -f $(DESTDIR)$(pkglibdir)/$$p; \
done
list='$(PKG_TCL_SOURCES)'; for p in $$list; do \
p=`basename $$p`; \
rm -f $(DESTDIR)$(pkglibdir)/$$p; \
done
list='$(bin_BINARIES)'; for p in $$list; do \
rm -f $(DESTDIR)$(bindir)/$$p; \
done
#========================================================================
# Starkit creation - requires ActiveTcl or compatible tclsh
# You should not have to modify this target.
#========================================================================
STARKIT_EXT = .kit.tcl
STARKIT_TCLSH = $(TCLSH)
STARKIT_BASE = tclsh
STARKIT = $(PACKAGE_NAME)$(STARKIT_EXT)
starkit-clean:
rm -f $(STARKIT)
starkit: starkit-clean
@echo "Building $(STARKIT)"
(\
echo 'package require vfs'; \
echo 'package require Mk4tcl'; \
echo ''; \
echo 'set HEADER {#!/bin/sh';\
echo '# \\'; \
echo 'exec %1s "$$0" $${1+"$$@"}'; \
echo 'package require starkit'; \
echo 'starkit::header mk4 -readonly}'; \
echo ''; \
echo 'set HEADER [format "$$HEADER\n%c" [file tail [info nameofexe]] 0x1a]'; \
echo 'set file "$(STARKIT)"'; \
echo 'set fid [open $$file w]'; \
echo 'puts $$fid $$HEADER'; \
echo 'close $$fid'; \
echo ''; \
echo 'vfs::mk4::Mount $$file $$file'; \
echo 'file copy $(PKG_LIB_FILE) $$file/'; \
echo 'vfs::unmount $$file'; \
) | $(STARKIT_TCLSH)
#========================================================================
# Distribution creation
# You should not have to modify this target.
#========================================================================
TAR = tar
#COMPRESS = $(TAR) cvf $(PKG_DIR)-src.tar $(PKG_DIR); compress $(PKG_DIR).tar
COMPRESS = $(TAR) zcvf $(PKG_DIR)-src.tar.gz $(PKG_DIR)
DIST_ROOT = /tmp/dist
DIST_DIR = $(DIST_ROOT)/$(PKG_DIR)
dist-clean:
rm -rf $(DIST_DIR) $(DIST_ROOT)/$(PKG_DIR)-src.tar.*
dist: dist-clean
mkdir -p $(DIST_DIR)
cp -pr $(srcdir)/* $(DIST_DIR)/
chmod 664 $(DIST_DIR)/Makefile.in $(DIST_DIR)/aclocal.m4
chmod 775 $(DIST_DIR)/configure $(DIST_DIR)/configure.in
find $(DIST_DIR) -type d -name CVS | xargs rm -rf
(cd $(DIST_ROOT); $(COMPRESS);)
.PHONY: all binaries clean depend distclean doc install libraries test
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
# Makefile for zlib
# Copyright (C) 1995-2017 Jean-loup Gailly, Mark Adler
# For conditions of distribution and use, see copyright notice in zlib.h
# To compile and test, type:
# ./configure; make test
# Normally configure builds both a static and a shared library.
# If you want to build just a static library, use: ./configure --static
# To use the asm code, type:
# cp contrib/asm?86/match.S ./match.S
# make LOC=-DASMV OBJA=match.o
# To install /usr/local/lib/libz.* and /usr/local/include/zlib.h, type:
# make install
# To install in $HOME instead of /usr/local, use:
# make install prefix=$HOME
CC=cc
CFLAGS=-O
#CFLAGS=-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7
#CFLAGS=-g -DZLIB_DEBUG
#CFLAGS=-O3 -Wall -Wwrite-strings -Wpointer-arith -Wconversion \
# -Wstrict-prototypes -Wmissing-prototypes
SFLAGS=-O
LDFLAGS=
TEST_LDFLAGS=-L. libz.a
LDSHARED=$(CC)
CPP=$(CC) -E
STATICLIB=libz.a
SHAREDLIB=libz.so
SHAREDLIBV=libz.so.1.2.11
SHAREDLIBM=libz.so.1
LIBS=$(STATICLIB) $(SHAREDLIBV)
AR=ar
ARFLAGS=rc
RANLIB=ranlib
LDCONFIG=ldconfig
LDSHAREDLIBC=-lc
TAR=tar
SHELL=/bin/sh
EXE=
prefix = /usr/local
exec_prefix = ${prefix}
libdir = ${exec_prefix}/lib
sharedlibdir = ${libdir}
includedir = ${prefix}/include
mandir = ${prefix}/share/man
man3dir = ${mandir}/man3
pkgconfigdir = ${libdir}/pkgconfig
SRCDIR=
ZINC=
ZINCOUT=-I.
OBJZ = adler32.o crc32.o deflate.o infback.o inffast.o inflate.o inftrees.o trees.o zutil.o
OBJG = compress.o uncompr.o gzclose.o gzlib.o gzread.o gzwrite.o
OBJC = $(OBJZ) $(OBJG)
PIC_OBJZ = adler32.lo crc32.lo deflate.lo infback.lo inffast.lo inflate.lo inftrees.lo trees.lo zutil.lo
PIC_OBJG = compress.lo uncompr.lo gzclose.lo gzlib.lo gzread.lo gzwrite.lo
PIC_OBJC = $(PIC_OBJZ) $(PIC_OBJG)
# to use the asm code: make OBJA=match.o, PIC_OBJA=match.lo
OBJA =
PIC_OBJA =
OBJS = $(OBJC) $(OBJA)
PIC_OBJS = $(PIC_OBJC) $(PIC_OBJA)
all: static shared
static: example$(EXE) minigzip$(EXE)
shared: examplesh$(EXE) minigzipsh$(EXE)
all64: example64$(EXE) minigzip64$(EXE)
check: test
test: all teststatic testshared
teststatic: static
@TMPST=tmpst_$$; \
if echo hello world | ./minigzip | ./minigzip -d && ./example $$TMPST ; then \
echo ' *** zlib test OK ***'; \
else \
echo ' *** zlib test FAILED ***'; false; \
fi; \
rm -f $$TMPST
testshared: shared
@LD_LIBRARY_PATH=`pwd`:$(LD_LIBRARY_PATH) ; export LD_LIBRARY_PATH; \
LD_LIBRARYN32_PATH=`pwd`:$(LD_LIBRARYN32_PATH) ; export LD_LIBRARYN32_PATH; \
DYLD_LIBRARY_PATH=`pwd`:$(DYLD_LIBRARY_PATH) ; export DYLD_LIBRARY_PATH; \
SHLIB_PATH=`pwd`:$(SHLIB_PATH) ; export SHLIB_PATH; \
TMPSH=tmpsh_$$; \
if echo hello world | ./minigzipsh | ./minigzipsh -d && ./examplesh $$TMPSH; then \
echo ' *** zlib shared test OK ***'; \
else \
echo ' *** zlib shared test FAILED ***'; false; \
fi; \
rm -f $$TMPSH
test64: all64
@TMP64=tmp64_$$; \
if echo hello world | ./minigzip64 | ./minigzip64 -d && ./example64 $$TMP64; then \
echo ' *** zlib 64-bit test OK ***'; \
else \
echo ' *** zlib 64-bit test FAILED ***'; false; \
fi; \
rm -f $$TMP64
infcover.o: $(SRCDIR)test/infcover.c $(SRCDIR)zlib.h zconf.h
$(CC) $(CFLAGS) $(ZINCOUT) -c -o $@ $(SRCDIR)test/infcover.c
infcover: infcover.o libz.a
$(CC) $(CFLAGS) -o $@ infcover.o libz.a
cover: infcover
rm -f *.gcda
./infcover
gcov inf*.c
libz.a: $(OBJS)
$(AR) $(ARFLAGS) $@ $(OBJS)
-@ ($(RANLIB) $@ || true) >/dev/null 2>&1
match.o: match.S
$(CPP) match.S > _match.s
$(CC) -c _match.s
mv _match.o match.o
rm -f _match.s
match.lo: match.S
$(CPP) match.S > _match.s
$(CC) -c -fPIC _match.s
mv _match.o match.lo
rm -f _match.s
example.o: $(SRCDIR)test/example.c $(SRCDIR)zlib.h zconf.h
$(CC) $(CFLAGS) $(ZINCOUT) -c -o $@ $(SRCDIR)test/example.c
minigzip.o: $(SRCDIR)test/minigzip.c $(SRCDIR)zlib.h zconf.h
$(CC) $(CFLAGS) $(ZINCOUT) -c -o $@ $(SRCDIR)test/minigzip.c
example64.o: $(SRCDIR)test/example.c $(SRCDIR)zlib.h zconf.h
$(CC) $(CFLAGS) $(ZINCOUT) -D_FILE_OFFSET_BITS=64 -c -o $@ $(SRCDIR)test/example.c
minigzip64.o: $(SRCDIR)test/minigzip.c $(SRCDIR)zlib.h zconf.h
$(CC) $(CFLAGS) $(ZINCOUT) -D_FILE_OFFSET_BITS=64 -c -o $@ $(SRCDIR)test/minigzip.c
adler32.o: $(SRCDIR)adler32.c
$(CC) $(CFLAGS) $(ZINC) -c -o $@ $(SRCDIR)adler32.c
crc32.o: $(SRCDIR)crc32.c
$(CC) $(CFLAGS) $(ZINC) -c -o $@ $(SRCDIR)crc32.c
deflate.o: $(SRCDIR)deflate.c
$(CC) $(CFLAGS) $(ZINC) -c -o $@ $(SRCDIR)deflate.c
infback.o: $(SRCDIR)infback.c
$(CC) $(CFLAGS) $(ZINC) -c -o $@ $(SRCDIR)infback.c
inffast.o: $(SRCDIR)inffast.c
$(CC) $(CFLAGS) $(ZINC) -c -o $@ $(SRCDIR)inffast.c
inflate.o: $(SRCDIR)inflate.c
$(CC) $(CFLAGS) $(ZINC) -c -o $@ $(SRCDIR)inflate.c
inftrees.o: $(SRCDIR)inftrees.c
$(CC) $(CFLAGS) $(ZINC) -c -o $@ $(SRCDIR)inftrees.c
trees.o: $(SRCDIR)trees.c
$(CC) $(CFLAGS) $(ZINC) -c -o $@ $(SRCDIR)trees.c
zutil.o: $(SRCDIR)zutil.c
$(CC) $(CFLAGS) $(ZINC) -c -o $@ $(SRCDIR)zutil.c
compress.o: $(SRCDIR)compress.c
$(CC) $(CFLAGS) $(ZINC) -c -o $@ $(SRCDIR)compress.c
uncompr.o: $(SRCDIR)uncompr.c
$(CC) $(CFLAGS) $(ZINC) -c -o $@ $(SRCDIR)uncompr.c
gzclose.o: $(SRCDIR)gzclose.c
$(CC) $(CFLAGS) $(ZINC) -c -o $@ $(SRCDIR)gzclose.c
gzlib.o: $(SRCDIR)gzlib.c
$(CC) $(CFLAGS) $(ZINC) -c -o $@ $(SRCDIR)gzlib.c
gzread.o: $(SRCDIR)gzread.c
$(CC) $(CFLAGS) $(ZINC) -c -o $@ $(SRCDIR)gzread.c
gzwrite.o: $(SRCDIR)gzwrite.c
$(CC) $(CFLAGS) $(ZINC) -c -o $@ $(SRCDIR)gzwrite.c
adler32.lo: $(SRCDIR)adler32.c
-@mkdir objs 2>/dev/null || test -d objs
$(CC) $(SFLAGS) $(ZINC) -DPIC -c -o objs/adler32.o $(SRCDIR)adler32.c
-@mv objs/adler32.o $@
crc32.lo: $(SRCDIR)crc32.c
-@mkdir objs 2>/dev/null || test -d objs
$(CC) $(SFLAGS) $(ZINC) -DPIC -c -o objs/crc32.o $(SRCDIR)crc32.c
-@mv objs/crc32.o $@
deflate.lo: $(SRCDIR)deflate.c
-@mkdir objs 2>/dev/null || test -d objs
$(CC) $(SFLAGS) $(ZINC) -DPIC -c -o objs/deflate.o $(SRCDIR)deflate.c
-@mv objs/deflate.o $@
infback.lo: $(SRCDIR)infback.c
-@mkdir objs 2>/dev/null || test -d objs
$(CC) $(SFLAGS) $(ZINC) -DPIC -c -o objs/infback.o $(SRCDIR)infback.c
-@mv objs/infback.o $@
inffast.lo: $(SRCDIR)inffast.c
-@mkdir objs 2>/dev/null || test -d objs
$(CC) $(SFLAGS) $(ZINC) -DPIC -c -o objs/inffast.o $(SRCDIR)inffast.c
-@mv objs/inffast.o $@
inflate.lo: $(SRCDIR)inflate.c
-@mkdir objs 2>/dev/null || test -d objs
$(CC) $(SFLAGS) $(ZINC) -DPIC -c -o objs/inflate.o $(SRCDIR)inflate.c
-@mv objs/inflate.o $@
inftrees.lo: $(SRCDIR)inftrees.c
-@mkdir objs 2>/dev/null || test -d objs
$(CC) $(SFLAGS) $(ZINC) -DPIC -c -o objs/inftrees.o $(SRCDIR)inftrees.c
-@mv objs/inftrees.o $@
trees.lo: $(SRCDIR)trees.c
-@mkdir objs 2>/dev/null || test -d objs
$(CC) $(SFLAGS) $(ZINC) -DPIC -c -o objs/trees.o $(SRCDIR)trees.c
-@mv objs/trees.o $@
zutil.lo: $(SRCDIR)zutil.c
-@mkdir objs 2>/dev/null || test -d objs
$(CC) $(SFLAGS) $(ZINC) -DPIC -c -o objs/zutil.o $(SRCDIR)zutil.c
-@mv objs/zutil.o $@
compress.lo: $(SRCDIR)compress.c
-@mkdir objs 2>/dev/null || test -d objs
$(CC) $(SFLAGS) $(ZINC) -DPIC -c -o objs/compress.o $(SRCDIR)compress.c
-@mv objs/compress.o $@
uncompr.lo: $(SRCDIR)uncompr.c
-@mkdir objs 2>/dev/null || test -d objs
$(CC) $(SFLAGS) $(ZINC) -DPIC -c -o objs/uncompr.o $(SRCDIR)uncompr.c
-@mv objs/uncompr.o $@
gzclose.lo: $(SRCDIR)gzclose.c
-@mkdir objs 2>/dev/null || test -d objs
$(CC) $(SFLAGS) $(ZINC) -DPIC -c -o objs/gzclose.o $(SRCDIR)gzclose.c
-@mv objs/gzclose.o $@
gzlib.lo: $(SRCDIR)gzlib.c
-@mkdir objs 2>/dev/null || test -d objs
$(CC) $(SFLAGS) $(ZINC) -DPIC -c -o objs/gzlib.o $(SRCDIR)gzlib.c
-@mv objs/gzlib.o $@
gzread.lo: $(SRCDIR)gzread.c
-@mkdir objs 2>/dev/null || test -d objs
$(CC) $(SFLAGS) $(ZINC) -DPIC -c -o objs/gzread.o $(SRCDIR)gzread.c
-@mv objs/gzread.o $@
gzwrite.lo: $(SRCDIR)gzwrite.c
-@mkdir objs 2>/dev/null || test -d objs
$(CC) $(SFLAGS) $(ZINC) -DPIC -c -o objs/gzwrite.o $(SRCDIR)gzwrite.c
-@mv objs/gzwrite.o $@
placebo $(SHAREDLIBV): $(PIC_OBJS) libz.a
$(LDSHARED) $(SFLAGS) -o $@ $(PIC_OBJS) $(LDSHAREDLIBC) $(LDFLAGS)
rm -f $(SHAREDLIB) $(SHAREDLIBM)
ln -s $@ $(SHAREDLIB)
ln -s $@ $(SHAREDLIBM)
-@rmdir objs
example$(EXE): example.o $(STATICLIB)
$(CC) $(CFLAGS) -o $@ example.o $(TEST_LDFLAGS)
minigzip$(EXE): minigzip.o $(STATICLIB)
$(CC) $(CFLAGS) -o $@ minigzip.o $(TEST_LDFLAGS)
examplesh$(EXE): example.o $(SHAREDLIBV)
$(CC) $(CFLAGS) -o $@ example.o -L. $(SHAREDLIBV)
minigzipsh$(EXE): minigzip.o $(SHAREDLIBV)
$(CC) $(CFLAGS) -o $@ minigzip.o -L. $(SHAREDLIBV)
example64$(EXE): example64.o $(STATICLIB)
$(CC) $(CFLAGS) -o $@ example64.o $(TEST_LDFLAGS)
minigzip64$(EXE): minigzip64.o $(STATICLIB)
$(CC) $(CFLAGS) -o $@ minigzip64.o $(TEST_LDFLAGS)
install-libs: $(LIBS)
-@if [ ! -d $(DESTDIR)$(exec_prefix) ]; then mkdir -p $(DESTDIR)$(exec_prefix); fi
-@if [ ! -d $(DESTDIR)$(libdir) ]; then mkdir -p $(DESTDIR)$(libdir); fi
-@if [ ! -d $(DESTDIR)$(sharedlibdir) ]; then mkdir -p $(DESTDIR)$(sharedlibdir); fi
-@if [ ! -d $(DESTDIR)$(man3dir) ]; then mkdir -p $(DESTDIR)$(man3dir); fi
-@if [ ! -d $(DESTDIR)$(pkgconfigdir) ]; then mkdir -p $(DESTDIR)$(pkgconfigdir); fi
rm -f $(DESTDIR)$(libdir)/$(STATICLIB)
cp $(STATICLIB) $(DESTDIR)$(libdir)
chmod 644 $(DESTDIR)$(libdir)/$(STATICLIB)
-@($(RANLIB) $(DESTDIR)$(libdir)/libz.a || true) >/dev/null 2>&1
-@if test -n "$(SHAREDLIBV)"; then \
rm -f $(DESTDIR)$(sharedlibdir)/$(SHAREDLIBV); \
cp $(SHAREDLIBV) $(DESTDIR)$(sharedlibdir); \
echo "cp $(SHAREDLIBV) $(DESTDIR)$(sharedlibdir)"; \
chmod 755 $(DESTDIR)$(sharedlibdir)/$(SHAREDLIBV); \
echo "chmod 755 $(DESTDIR)$(sharedlibdir)/$(SHAREDLIBV)"; \
rm -f $(DESTDIR)$(sharedlibdir)/$(SHAREDLIB) $(DESTDIR)$(sharedlibdir)/$(SHAREDLIBM); \
ln -s $(SHAREDLIBV) $(DESTDIR)$(sharedlibdir)/$(SHAREDLIB); \
ln -s $(SHAREDLIBV) $(DESTDIR)$(sharedlibdir)/$(SHAREDLIBM); \
($(LDCONFIG) || true) >/dev/null 2>&1; \
fi
rm -f $(DESTDIR)$(man3dir)/zlib.3
cp $(SRCDIR)zlib.3 $(DESTDIR)$(man3dir)
chmod 644 $(DESTDIR)$(man3dir)/zlib.3
rm -f $(DESTDIR)$(pkgconfigdir)/zlib.pc
cp zlib.pc $(DESTDIR)$(pkgconfigdir)
chmod 644 $(DESTDIR)$(pkgconfigdir)/zlib.pc
# The ranlib in install is needed on NeXTSTEP which checks file times
# ldconfig is for Linux
install: install-libs
-@if [ ! -d $(DESTDIR)$(includedir) ]; then mkdir -p $(DESTDIR)$(includedir); fi
rm -f $(DESTDIR)$(includedir)/zlib.h $(DESTDIR)$(includedir)/zconf.h
cp $(SRCDIR)zlib.h zconf.h $(DESTDIR)$(includedir)
chmod 644 $(DESTDIR)$(includedir)/zlib.h $(DESTDIR)$(includedir)/zconf.h
uninstall:
cd $(DESTDIR)$(includedir) && rm -f zlib.h zconf.h
cd $(DESTDIR)$(libdir) && rm -f libz.a; \
if test -n "$(SHAREDLIBV)" -a -f $(SHAREDLIBV); then \
rm -f $(SHAREDLIBV) $(SHAREDLIB) $(SHAREDLIBM); \
fi
cd $(DESTDIR)$(man3dir) && rm -f zlib.3
cd $(DESTDIR)$(pkgconfigdir) && rm -f zlib.pc
docs: zlib.3.pdf
zlib.3.pdf: $(SRCDIR)zlib.3
groff -mandoc -f H -T ps $(SRCDIR)zlib.3 | ps2pdf - $@
zconf.h.cmakein: $(SRCDIR)zconf.h.in
-@ TEMPFILE=zconfh_$$; \
echo "/#define ZCONF_H/ a\\\\\n#cmakedefine Z_PREFIX\\\\\n#cmakedefine Z_HAVE_UNISTD_H\n" >> $$TEMPFILE &&\
sed -f $$TEMPFILE $(SRCDIR)zconf.h.in > $@ &&\
touch -r $(SRCDIR)zconf.h.in $@ &&\
rm $$TEMPFILE
zconf: $(SRCDIR)zconf.h.in
cp -p $(SRCDIR)zconf.h.in zconf.h
mostlyclean: clean
clean:
rm -f *.o *.lo *~ \
example$(EXE) minigzip$(EXE) examplesh$(EXE) minigzipsh$(EXE) \
example64$(EXE) minigzip64$(EXE) \
infcover \
libz.* foo.gz so_locations \
_match.s maketree contrib/infback9/*.o
rm -rf objs
rm -f *.gcda *.gcno *.gcov
rm -f contrib/infback9/*.gcda contrib/infback9/*.gcno contrib/infback9/*.gcov
maintainer-clean: distclean
distclean: clean zconf zconf.h.cmakein docs
rm -f Makefile zlib.pc configure.log
-@rm -f .DS_Store
@if [ -f Makefile.in ]; then \
printf 'all:\n\t-@echo "Please use ./configure first. Thank you."\n' > Makefile ; \
printf '\ndistclean:\n\tmake -f Makefile.in distclean\n' >> Makefile ; \
touch -r $(SRCDIR)Makefile.in Makefile ; fi
@if [ ! -f zconf.h.in ]; then rm -f zconf.h zconf.h.cmakein ; fi
@if [ ! -f zlib.3 ]; then rm -f zlib.3.pdf ; fi
tags:
etags $(SRCDIR)*.[ch]
adler32.o zutil.o: $(SRCDIR)zutil.h $(SRCDIR)zlib.h zconf.h
gzclose.o gzlib.o gzread.o gzwrite.o: $(SRCDIR)zlib.h zconf.h $(SRCDIR)gzguts.h
compress.o example.o minigzip.o uncompr.o: $(SRCDIR)zlib.h zconf.h
crc32.o: $(SRCDIR)zutil.h $(SRCDIR)zlib.h zconf.h $(SRCDIR)crc32.h
deflate.o: $(SRCDIR)deflate.h $(SRCDIR)zutil.h $(SRCDIR)zlib.h zconf.h
infback.o inflate.o: $(SRCDIR)zutil.h $(SRCDIR)zlib.h zconf.h $(SRCDIR)inftrees.h $(SRCDIR)inflate.h $(SRCDIR)inffast.h $(SRCDIR)inffixed.h
inffast.o: $(SRCDIR)zutil.h $(SRCDIR)zlib.h zconf.h $(SRCDIR)inftrees.h $(SRCDIR)inflate.h $(SRCDIR)inffast.h
inftrees.o: $(SRCDIR)zutil.h $(SRCDIR)zlib.h zconf.h $(SRCDIR)inftrees.h
trees.o: $(SRCDIR)deflate.h $(SRCDIR)zutil.h $(SRCDIR)zlib.h zconf.h $(SRCDIR)trees.h
adler32.lo zutil.lo: $(SRCDIR)zutil.h $(SRCDIR)zlib.h zconf.h
gzclose.lo gzlib.lo gzread.lo gzwrite.lo: $(SRCDIR)zlib.h zconf.h $(SRCDIR)gzguts.h
compress.lo example.lo minigzip.lo uncompr.lo: $(SRCDIR)zlib.h zconf.h
crc32.lo: $(SRCDIR)zutil.h $(SRCDIR)zlib.h zconf.h $(SRCDIR)crc32.h
deflate.lo: $(SRCDIR)deflate.h $(SRCDIR)zutil.h $(SRCDIR)zlib.h zconf.h
infback.lo inflate.lo: $(SRCDIR)zutil.h $(SRCDIR)zlib.h zconf.h $(SRCDIR)inftrees.h $(SRCDIR)inflate.h $(SRCDIR)inffast.h $(SRCDIR)inffixed.h
inffast.lo: $(SRCDIR)zutil.h $(SRCDIR)zlib.h zconf.h $(SRCDIR)inftrees.h $(SRCDIR)inflate.h $(SRCDIR)inffast.h
inftrees.lo: $(SRCDIR)zutil.h $(SRCDIR)zlib.h zconf.h $(SRCDIR)inftrees.h
trees.lo: $(SRCDIR)deflate.h $(SRCDIR)zutil.h $(SRCDIR)zlib.h zconf.h $(SRCDIR)trees.h

File diff suppressed because it is too large Load Diff

View File

@@ -1,99 +0,0 @@
*** Tkinter.py.dist Mon Oct 16 14:49:40 2000
--- Tkinter.py Wed Nov 22 01:56:28 2000
***************
*** 45,51 ****
TkVersion = _string.atof(_tkinter.TK_VERSION)
TclVersion = _string.atof(_tkinter.TCL_VERSION)
!
READABLE = _tkinter.READABLE
WRITABLE = _tkinter.WRITABLE
EXCEPTION = _tkinter.EXCEPTION
--- 45,53 ----
TkVersion = _string.atof(_tkinter.TK_VERSION)
TclVersion = _string.atof(_tkinter.TCL_VERSION)
! try: TixVersion = _string.atof(_tkinter.TIX_VERSION)
! except AttributeError: TixVersion = None
!
READABLE = _tkinter.READABLE
WRITABLE = _tkinter.WRITABLE
EXCEPTION = _tkinter.EXCEPTION
***************
*** 1770,1781 ****
# XXX Obsolete -- better use self.tk.call directly!
return self.tk.call((self._w, name) + args)
! class Widget(BaseWidget, Pack, Place, Grid):
! """Internal class.
!
! Base class for a widget which can be positioned with the geometry managers
! Pack, Place or Grid."""
! pass
class Toplevel(BaseWidget, Wm):
"""Toplevel widget, e.g. for dialogs."""
--- 1772,1834 ----
# XXX Obsolete -- better use self.tk.call directly!
return self.tk.call((self._w, name) + args)
! if TixVersion:
! # The Tix 'tixForm' geometry manager
! class Form:
! """The Tix Form geometry manager
!
! Widgets can be arranged by specifying attachments to other widgets.
! See Tix documentation for complete details"""
!
! def config(self, cnf={}, **kw):
! apply(self.tk.call, ('tixForm', self._w) + self._options(cnf, kw))
! form = config
!
! def __setitem__(self, key, value):
! Form.form({key: value})
!
! def check(self):
! return self.tk.call('tixForm', 'check', self._w)
!
! def forget(self):
! self.tk.call('tixForm', 'forget', self._w)
!
! def grid(self, xsize=0, ysize=0):
! if (not xsize) and (not ysize):
! x = self.tk.call('tixForm', 'grid', self._w)
! y = self.tk.splitlist(x)
! z = ()
! for x in y:
! z = z + (self.tk.getint(x),)
! return z
! self.tk.call('tixForm', 'grid', self._w, xsize, ysize)
!
! def info(self, option=None):
! if not option:
! return self.tk.call('tixForm', 'info', self._w)
! if option[0] != '-':
! option = '-' + option
! return self.tk.call('tixForm', 'info', self._w, option)
!
! def slaves(self):
! return map(self._nametowidget,
! self.tk.splitlist(
! self.tk.call(
! 'tixForm', 'slaves', self._w)))
!
! class Widget(BaseWidget, Pack, Place, Grid, Form):
! """Internal class.
!
! Base class for a widget which can be positioned with the geometry managers
! Pack, Place, Grid or Form."""
! pass
! else:
! class Widget(BaseWidget, Pack, Place, Grid):
! """Internal class.
!
! Base class for a widget which can be positioned with the geometry managers
! Pack, Place or Grid."""
! pass
class Toplevel(BaseWidget, Wm):
"""Toplevel widget, e.g. for dialogs."""

File diff suppressed because it is too large Load Diff

View File

@@ -1,41 +0,0 @@
*** _tkinter.c.dist Mon Oct 16 14:49:32 2000
--- _tkinter.c Wed Nov 22 00:27:54 2000
***************
*** 43,48 ****
--- 43,51 ----
#include <tcl.h>
#include <tk.h>
+ #ifdef WITH_TIX
+ #include <tix.h>
+ #endif
#define TKMAJORMINOR (TK_MAJOR_VERSION*1000 + TK_MINOR_VERSION)
***************
*** 427,432 ****
--- 430,441 ----
PySys_WriteStderr("Tk_Init error: %s\n", Tcl_GetStringResult(interp));
return TCL_ERROR;
}
+ #ifdef WITH_TIX
+ if (Tix_Init(interp) == TCL_ERROR) {
+ PySys_WriteStderr("Tix_Init error: %s\n", Tcl_GetStringResult(interp));
+ return TCL_ERROR;
+ }
+ #endif
return TCL_OK;
}
#endif /* !WITH_APPINIT */
***************
*** 2121,2126 ****
--- 2130,2138 ----
ins_long(d, "DONT_WAIT", TCL_DONT_WAIT);
ins_string(d, "TK_VERSION", TK_VERSION);
ins_string(d, "TCL_VERSION", TCL_VERSION);
+ #ifdef WITH_TIX
+ ins_string(d, "TIX_VERSION", TIX_VERSION);
+ #endif
PyDict_SetItemString(d, "TkappType", (PyObject *)&Tkapp_Type);

View File

@@ -1,94 +0,0 @@
/* appinit.c -- Tcl and Tk application initialization.
The function Tcl_AppInit() below initializes various Tcl packages.
It is called for each Tcl interpreter created by _tkinter.create().
It needs to be compiled with -DWITH_<package> flags for each package
that you are statically linking with. You may have to add sections
for packages not yet listed below.
Note that those packages for which Tcl_StaticPackage() is called with
a NULL first argument are known as "static loadable" packages to
Tcl but not actually initialized. To use these, you have to load
it explicitly, e.g. tkapp.eval("load {} Blt").
*/
#include <tcl.h>
#include <tk.h>
int
Tcl_AppInit(Tcl_Interp *interp)
{
Tk_Window main_window;
if (Tcl_Init (interp) == TCL_ERROR)
return TCL_ERROR;
if (Tk_Init (interp) == TCL_ERROR)
return TCL_ERROR;
main_window = Tk_MainWindow(interp);
#ifdef WITH_MOREBUTTONS
{
extern Tcl_CmdProc studButtonCmd;
extern Tcl_CmdProc triButtonCmd;
Tcl_CreateCommand(interp, "studbutton", studButtonCmd,
(ClientData) main_window, NULL);
Tcl_CreateCommand(interp, "tributton", triButtonCmd,
(ClientData) main_window, NULL);
}
#endif
#ifdef WITH_PIL /* 0.2b5 and later -- not yet released as of May 14 */
{
extern void TkImaging_Init(Tcl_Interp *);
TkImaging_Init(interp);
/* XXX TkImaging_Init() doesn't have the right return type */
/*Tcl_StaticPackage(interp, "Imaging", TkImaging_Init, NULL);*/
}
#endif
#ifdef WITH_PIL_OLD /* 0.2b4 and earlier */
{
extern void TkImaging_Init(void);
/* XXX TkImaging_Init() doesn't have the right prototype */
/*Tcl_StaticPackage(interp, "Imaging", TkImaging_Init, NULL);*/
}
#endif
#ifdef WITH_TIX
{
extern int Tix_Init(Tcl_Interp *interp);
extern int Tix_SafeInit(Tcl_Interp *interp);
if (Tix_Init(interp) == TCL_ERROR) {
return TCL_ERROR;
}
Tcl_StaticPackage(interp, "Tix", Tix_Init, Tix_SafeInit);
}
#endif
#ifdef WITH_BLT
{
extern int Blt_Init(Tcl_Interp *);
extern int Blt_SafeInit(Tcl_Interp *);
Tcl_StaticPackage(NULL, "Blt", Blt_Init, Blt_SafeInit);
}
#endif
#ifdef WITH_TOGL
{
/* XXX I've heard rumors that this doesn't work */
extern int Togl_Init(Tcl_Interp *);
/* XXX Is there no Togl_SafeInit? */
Tcl_StaticPackage(NULL, "Togl", Togl_Init, NULL);
}
#endif
#ifdef WITH_XXX
#endif
return TCL_OK;
}

View File

@@ -1,36 +0,0 @@
*** tkappinit.c.dist Mon Oct 16 14:49:34 2000
--- tkappinit.c Wed Nov 22 02:00:13 2000
***************
*** 25,32 ****
--- 25,34 ----
if (Tk_Init (interp) == TCL_ERROR)
return TCL_ERROR;
+
main_window = Tk_MainWindow(interp);
+
#ifdef WITH_MOREBUTTONS
{
extern Tcl_CmdProc studButtonCmd;
***************
*** 60,66 ****
{
extern int Tix_Init(Tcl_Interp *interp);
extern int Tix_SafeInit(Tcl_Interp *interp);
! Tcl_StaticPackage(NULL, "Tix", Tix_Init, Tix_SafeInit);
}
#endif
--- 62,72 ----
{
extern int Tix_Init(Tcl_Interp *interp);
extern int Tix_SafeInit(Tcl_Interp *interp);
!
! if (Tix_Init(interp) == TCL_ERROR) {
! return TCL_ERROR;
! }
! Tcl_StaticPackage(interp, "Tix", Tix_Init, Tix_SafeInit);
}
#endif

View File

@@ -1,15 +0,0 @@
1) The compound image stuff doesn't work. CmpImg core dumps.
This seems to be something to do with Tcl/Tkinter
**** FIXED **** as of Tcl7.6, Tk4.2, Tix4.0.5
2) tk.call is used a lot in the demos. These functions should be
encapsulated somewhere in Python (more mods to Tkinter ?)
3) Callback definition is not straightforward. A lot of the time
a lambda definition has to be written. However, this is a
general Tkinter problem.
4) In the Control widget, the callbacks for increment, decrement
and validate should return a string to Tix. Find a way to do
this.

View File

@@ -1,6 +0,0 @@
$Id: BUGS-2.0.txt,v 1.1 2000/11/05 19:46:32 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.

View File

@@ -1,67 +0,0 @@
$Id: ChangeLog,v 1.1 2000/11/05 19:46:02 idiscovery Exp $
PyTix version 2.0 alpha
-----------------------
CHANGES
-------
1) Made diffs against Python 2.0 and put them in the 2.0 subdirectory.
2) Changed _tkinter.c to define TIX_VERSION and call Tix_Init.
BUG FIXES
---------
1) Fixed demo/samples/CmpImg.py to make the images be descendents
of the root window (see the Python FAQ for an explanation).
PyTix version 1.12
------------------
CHANGES
-------
1) Tkinter.py now only has the addition of the Form class since
the globalsetvar() etc. has been rolled into the 1.4 Tkinter
BUG FIXES
---------
1) Fixed typo in TixWidgets.subwidgets_all()
2) Fixed bug in TixWidgets.subwidgets_all where some Tix internal
widgets were causing an exception.
3) Added new method config_all to set common configuration options
for a tree of subwidgets
4) The label subwidget of the ComboBox was inadvertently left out
5) The orientation option of a PanedWindow was not marked static
PyTix Version 1.11
-------------------
ADDITIONS
---------
Tix ver. 4.0.1 has enhanced HList functionality and an additional widget (Tree).
Tix.py V1.11 has been updated to reflect these changes as well. However,
it will still work with Tix v4.0 since there are no incompatible changes (only
additions).
A new DisplayStyle class has been added (thanks to Steffen Kremser). This
allows the user to create a display style and apply it to many items
subsequently (via the -style switch).
BUG FIXES
---------
0) In the __init__ methods for all the __dummy... Tix widgets, initialization
of the subwidgets was missing in V1.1. Thanks to Guenter Kolousek for
pointing this out.
1) Removed listbox child of ComboBox as result of (0). It can now be accessed
as combobox.slistbox.listbox
2) The dirlist member in ExFileSelectBox was actually a DirList and not a
ScrolledListBox.
3) The HList widget method 'column' was renamed and modified to 'column_width'
4) NoteBook.raised_page() renamed to NoteBook.raised()
5) Various other small bug fixes

View File

@@ -1,52 +0,0 @@
Installing PyTix
----------------
0) To use PyTix, you need Tcl (V7.6), Tk (V4.2), Tix (V4.0.5) and Python (V1.4).
PyTix has been written and tested on a Sun Sparc running Solaris 2.5
with the above mentioned packages.
Tcl7.5 and Tk4.1 should work just as well but I haven't tried it. If
you are using Tcl7.4 and Tk4.0, there are bugs with the handling of
compound images.
There is nothing OS-specific in PyTix itself so it should work on
any machine with Tix and Python installed.
1) Build and install Tcl 7.6, Tk 4.2 and Tix 4.0.5.
Ensure that Tix is properly installed by running tixwish and executing
the demo programs
Note that Tix 4.0.5 does not compile with Tcl 7.6 / Tk 4.2 out of the
box although it seems to compile and run OK. You might want to use
Tcl 7.5/ Tk 4.1 instead.
2) Modify _tkinter.c in the Modules directory of the Python distribution.
In the routine Tcl_AppInit(), add the following lines just after the
block which calls to Tk_Init().
if (Tix_Init (interp) == TCL_ERROR) {
fprintf(stderr, "Tix_Init error: %s\n", interp->result);
return TCL_ERROR;
}
The modified _tkinter.c is supplied.
3) Modify the Modules/Setup file to link in the Tix library. On Solaris,
this looks like
tkinter tkintermodule.c -I/usr/local/include -L/usr/local/lib \
-ltix4.0-tk4.1 -ltk4.2 -ltcl7.6 -lX11
4) Copy Tix.py and the modified Tkinter.py to Lib/tkinter. If you have
modified Tkinter for any reason, just apply the diffs by hand. There
are only a few changes (see Tkinter.diff)
5) 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 demos directory.
If you find any bugs or have suggestions for improvement, please report them
to me.
Sudhir Shenoy (sshenoy@gol.com)

View File

@@ -1,76 +0,0 @@
$Id: INSTALL-2.0.txt,v 1.4 2000/11/23 02:32:30 idiscovery Exp $
Installing PyTix
----------------
0) To use PyTix, you need Tcl/Tk (V8.[012]), Tix (V8.1) and Python (V2.0).
PyTix has been written and tested on a Intel Pentium running RH Linux 5.2
with the above mentioned packages.
There is nothing OS-specific in PyTix itself so it should work on
any machine with Tix and Python installed.
1) Build and install Tcl/Tk 8.0 8.1 or 8.2 and 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 tcl tcl8.2.3 for this release of PyTix.
Note that Tix 8.1 does not compile with Tcl 8.3 under Windows out of the
box although it seems to compile and run OK. You might want to use
Tcl 8.2 instead.
2) Modify _tkinter.c in the Modules directory of the Python distribution.
The modified _tkinter.c is supplied in the 2.0 subdirectory.
Modify tkappinit.c in the Modules directory of the Python distribution.
The modified tkappinit.c is supplied in the 2.0 subdirectory.
These modified files can be used for Tkinter with or without Tix.
3) 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 headers are:
-I/usr/local/src/tcl8.2.3/generic -I/usr/local/src/tk8.2.3/generic \
# *** 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 Tix extension only:
-DWITH_TIX -I/usr/local/src/tix-8.1.1/generic -L/usr/local/src/tix-8.1.1/unix/tk8.2 -ltix8.1.8.2 \
# *** 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:
# -DWITH_PIL -I../Extensions/Imaging/libImaging tkImaging.c \
# *** Uncomment and edit for TOGL extension only:
# -DWITH_TOGL togl.c \
# *** Uncomment and edit to reflect where your Tcl/Tk libraries are:
-L/usr/local/src/tcl8.2.3/unix -L/usr/local/src/tk8.2.3/unix \
# *** Uncomment and edit to reflect your Tcl/Tk versions:
-ltk8.2 -ltcl8.2 \
# *** 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) Modify Tkinter.py in the Lib/lib-tk directory of the Python distribution.
The modified Tkinter.py is supplied in the 2.0 subdirectory.
This modified file can be used for Tkinter with or without Tix.
5) Copy Tix.py to the Lib/lib-tk directory of the Python distribution.
6) 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 demos directory.
If you find any bugs or have suggestions for improvement, please report them
via http://tix.sourceforge.net

View File

@@ -1,100 +0,0 @@
About PyTix
-----------
PyTix 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://www.cis.upenn.edu/~ioi/tix/tix.html
for more details about Tix and how to get it.
PyTix differs from Pytix in the following ways -
1) It is complete at least as far as the Tix documentation
would allow !!
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.
Changes in Version 1.12 (see ChangeLog for details)
-----------------------
1) Minor bug fixes
2) Tested with Python 1.4, Tk 4.2, Tcl 7.6 and Tix 4.0.5
3) Compound Images now work !!
Modifications to Tkinter
------------------------
To support the full Tix functionality, the Tkinter module has been
modified. The modifications are quite minor (see Tkinter.diff for a diff
listing). Basically, in order to support the 'tixForm' geometry manager,
a new class 'Form' has been added. The class 'Widget' now also inherits
from this class.
Tix.py
------
PyTix has Tix.py as the wrapper for Tix widgets. It defines a couple of new
classes (TixWidget and TixSubWidget) which do the dirty work of initializing
a new widget instance.
The problem in Tix is that a single widget is actually a composite of many
smaller widgets. For example, a LabelEntry widget contains a Label and
and Entry. When we instantiate the LabelEntry widget, Python code is not
aware of the subwidgets. This is a problem because we cannot refer to
the widgets e.g. to change the color. We cannot instantiate a new widget
either because this would send a call to Tk to create a widget that is
already created. To separate the instantiation of the Python class and
the Tk widget, we need to have the new classes.
The subwidgets instances in Python is properly subclassed from the
appropriate base class. For example the 'entry' child of the LabelEntry
widget is subclassed from the Entry class. Thus all the methods of the
Entry class are known by the subwidget. This makes it possible to write
code like
w = Tix.LabelEntry(master)
w.text['bg'] = 'gray'
w.text.insert(Tix.END, 'Hello, world')
The appropriate subwidgets are created automatically (they are kept in a
list in the parent). Member access is provided by writing the __getattr__
method.
There is a separate class for each Tix widget.
There are a few Tix convenience routines defined at the end as well.
How to install
--------------
See the file INSTALL for installation directions
How to use
----------
You must import the module Tix in your program. You no longer have to
import Tkinter since Tix.py does it for you.
See the sample programs in demos and demos/samples for an idea of how
to use Tix.
The basic documentation remains the Tix man pages. Note that currently
this documentation is not complete but it is expected to be so by Jan.
1996.
Credits
-------
The original pytix was written by Jean-Marc Lugrin (lugrin@ms.com).
PyTix (this package) is written by Sudhir Shenoy (sshenoy@gol.com)
Version 1.11 was only possible with help from Steffen Kremser(kremser@danet.de)
who helped a lot on cleaning up the HList widget and also translated the HList
demos from the Tix distribution

View File

@@ -1,19 +0,0 @@
About PyTix
-----------
PyTix 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.

File diff suppressed because it is too large Load Diff

View File

@@ -1,50 +0,0 @@
/* 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

@@ -1,6 +0,0 @@
#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

@@ -1,6 +0,0 @@
#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

@@ -1,6 +0,0 @@
#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

@@ -1,14 +0,0 @@
#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

@@ -1,49 +0,0 @@
/* 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

@@ -1,47 +0,0 @@
/* 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

@@ -1,14 +0,0 @@
#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

@@ -1,43 +0,0 @@
/* 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

@@ -1,48 +0,0 @@
/* 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

@@ -1,14 +0,0 @@
#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

@@ -1,49 +0,0 @@
/* 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

@@ -1,6 +0,0 @@
#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

@@ -1,6 +0,0 @@
#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

@@ -1,6 +0,0 @@
#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

@@ -1,14 +0,0 @@
#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

@@ -1,45 +0,0 @@
/* 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

@@ -1,48 +0,0 @@
/* 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

@@ -1,6 +0,0 @@
#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

@@ -1,52 +0,0 @@
/* 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.

Before

Width:  |  Height:  |  Size: 11 KiB

View File

@@ -1,6 +0,0 @@
#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

@@ -1,536 +0,0 @@
#! /usr/local/bin/python
#
#
# $Id: pman.py,v 1.1 2000/11/05 19:52:02 idiscovery Exp $
#
# An xman like program. - Sudhir Shenoy, January 1996.
#
# Features:
#
# Can have multiple man pages open at the same time.
#
# Hypertext: Manual page cross references in the Apropos output or a man page
# are highlighted when the mouse moves on top of them. Clicking button 1 over
# the highlighted reference displays the relevant page.
#
# Regexp search in manual page window with wrap around.
#
# Handles MANPATH correctly. If the same man page (e.g. 'make') is in more
# than one directory (/usr/man/man1 and /usr/local/man/man1), precedence is
# decided by which dir appears first in the MANPATH.
#
# BUGS: Doesn't handle the case when the reference is split across two lines.
# This can be fixed by sucking in the whole text from the text widget and then
# doing the search e.g., in class ManWindow but this involves more work.
#
# Page display is slow.
#
import os, regex, regsub, string, sys, Tix
BOLDFONT = '*-Courier-Bold-R-Normal-*-140-*'
ITALICFONT = '*-Courier-Medium-O-Normal-*-140-*'
footer_pat = regex.compile('^ Page [1-9][0-9]*[ \t]+\|^.*Last change:.*[1-9][0-9]*\n')
empty_pat = regex.compile('^[ \t]*\n')
underline_pat = regex.compile('^[ \t]*[Xv!_][Xv!_ \t]*\n')
link_pat = regex.compile('\([A-Za-z0-9._]+\)[ \t]*([ \t]*\([A-Za-z0-9]+\)[ \t]*)')
# Man Page display widget - borrowed from Guido's demos with minor changes.
class ManPageWidget(Tix.ScrolledText):
def __init__(self, master=None, cnf={}):
# Initialize base class
Tix.ScrolledText.__init__(self, master, cnf)
self.text['state'] = 'disabled'
# Define tags for formatting styles
self.text.tag_config('X', {'underline': 1})
self.text.tag_config('!', {'font': BOLDFONT})
self.text.tag_config('_', {'font': ITALICFONT})
# Set state to idle
self.fp = None
self.lineno = 0
self.tagnum = 0
# Test whether we are busy parsing a file
def busy(self):
return self.fp != None
# Ensure we're not busy
def kill(self):
if self.busy():
self._endparser()
# Parse a file, in the background
def asyncparsefile(self, fp):
self._startparser(fp)
self.tk.createfilehandler(fp, Tix.READABLE, self._filehandler)
parsefile = asyncparsefile # Alias
# I/O handler used by background parsing
def _filehandler(self, fp, mask):
nextline = self.fp.readline()
if not nextline:
self._endparser()
return
self._parseline(nextline)
# Parse a file, now (cannot be aborted)
def syncparsefile(self, fp):
from select import select
def avail(fp=fp, tout=0.0, select=select):
return select([fp], [], [], tout)[0]
height = self.getint(self['height'])
self._startparser(fp)
while 1:
nextline = fp.readline()
if not nextline:
break
self._parseline(nextline)
self._endparser()
# Initialize parsing from a particular file -- must not be busy
def _startparser(self, fp):
if self.busy():
raise RuntimeError, 'startparser: still busy'
fp.fileno() # Test for file-ness
self.fp = fp
self.lineno = 0
self.tagnum = 0
self.ok = 0
self.empty = 0
self.buffer = None
self.text['state'] = 'normal'
self.text.delete('1.0', 'end')
self.text['state'] = 'disabled'
# End parsing -- must be busy, need not be at EOF
def _endparser(self):
if not self.busy():
raise RuntimeError, 'endparser: not busy'
if self.buffer:
self._parseline('')
try:
self.tk.deletefilehandler(self.fp)
except Tix.TclError, msg:
pass
self.fp.close()
self.fp = None
del self.ok, self.empty, self.buffer
# Parse a single line
def _parseline(self, nextline):
if not self.buffer:
# Save this line -- we need one line read-ahead
self.buffer = nextline
return
if empty_pat.match(self.buffer) >= 0:
# Buffered line was empty -- set a flag
self.empty = 1
self.buffer = nextline
return
textline = self.buffer
if underline_pat.match(nextline) >= 0:
# Next line is properties for buffered line
propline = nextline
self.buffer = None
else:
# Next line is read-ahead
propline = None
self.buffer = nextline
if not self.ok:
# First non blank line after footer must be header
# -- skip that too
self.ok = 1
self.empty = 0
return
if footer_pat.match(textline) >= 0:
# Footer -- start skipping until next non-blank line
self.ok = 0
self.empty = 0
return
self.text['state'] = 'normal'
if Tix.TkVersion >= 4.0:
self.text.mark_set('insert', 'end-1c')
else:
self.text.mark_set('insert', 'end')
if self.empty:
# One or more previous lines were empty
# -- insert one blank line in the text
self._insert_prop('\n')
self.lineno = self.lineno + 1
self.empty = 0
if not propline:
# No properties
self._insert_prop(textline)
else:
# Search for properties
p = ''
j = 0
for i in range(min(len(propline), len(textline))):
if propline[i] != p:
if j < i:
self._insert_prop(textline[j:i], p)
j = i
p = propline[i]
self._insert_prop(textline[j:])
startpos = 0
line = textline[:]
while 1:
pos = link_pat.search(line)
if pos < 0:
break
pos = pos + startpos
startpos = startpos + link_pat.regs[0][1]
tag = self._w + `self.tagnum`
self.tagnum = self.tagnum + 1
self.text.tag_add(tag, '%d.%d' % (self.lineno + 1, pos),
'%d.%d' % (self.lineno + 1, startpos))
self.text.tag_bind(tag, '<Any-Enter>',
lambda e=None,t=tag,w=self: w._highlight(t, 1))
self.text.tag_bind(tag, '<Any-Leave>',
lambda e=None,t=tag,w=self: w._highlight(t, 0))
self.text.tag_bind(tag, '<1>',
lambda e=None,w=self,t=textline[pos:startpos]:
w._hyper_link(t))
if startpos >= len(textline):
break
line = textline[startpos:]
self.lineno = self.lineno + 1
self.text['state'] = 'disabled'
def _highlight(self, tag, how):
if how:
self.text.tag_config(tag, background="#43ce80", relief=Tix.RAISED)
else:
self.text.tag_config(tag, background="", relief=Tix.FLAT)
def _hyper_link(self, txt):
if link_pat.search(txt) < 0:
print "Invalid man reference string"
return
pagename = txt[link_pat.regs[1][0]:link_pat.regs[1][1]]
section = txt[link_pat.regs[2][0]:link_pat.regs[2][1]]
mandirs = ManDirectories()
pipe = mandirs.FormattedPipe(section, pagename)
self.parsefile(pipe)
# Insert a string at the end, with at most one property (tag)
def _insert_prop(self, str, prop = ' '):
here = self.text.index('insert')
self.text.insert('insert', str)
if prop != ' ':
self.text.tag_add(prop, here, 'insert')
#end class ManPageWidget
class ManDirectories:
"""Find all man directories (using MANPATH if defined)
The section names are kept in the list sections.
Descriptive names are in the dictionary section_names
The full path name(s) for each section are in the dictionary secpaths."""
def __init__(self):
known_names = {'1':'User Commands', '1b':'Commands: BSD',
'1c':'Commands: Communications',
'1f':'Commands: FMLI', '1m':'Commands: Maintenance',
'1s':'Commands: SunOS specific',
'2':'System Calls',
'3':'Subroutines', '3b':'Routines: BSD',
'3c':'Routines: C Library', '3e':'Routines: ELF',
'3g':'Routines: General', '3i':'Routines: Wide Char',
'3k':'Routines: Kernel VM', '3m':'Routines: Math',
'3n':'Routines: Network', '3r':'Routines: Realtime',
'3s':'Routines: Std. I/O', '3t':'Routines: Threads',
'3x':'Routines: Misc.',
'4':'File Formats', '4b':'Files: BSD',
'5':'Miscellaneous',
'6':'Games',
'7':'Devices',
'9':'Device Drivers', '9e':'Drivers: Entry Points',
'9f':'Drivers: Functions',
'9s':'Drivers: Data Structures',
'l':'Local',
'n':'New'}
if os.environ.has_key('MANPATH'):
manpath = os.environ["MANPATH"]
if not manpath:
manpath = "/usr/share/man"
manpath = string.splitfields(manpath, ':')
self.secpaths = {}
for path in manpath:
files = os.listdir(path)
for f in files:
if os.path.isdir(path + '/' + f) and len(f) > 3 and f[:3] == 'man':
sec = f[3:]
if self.secpaths.has_key(sec):
temp = self.secpaths[sec] + ':'
else:
temp = ''
self.secpaths[sec] = temp + path + '/' + f
self.sections = self.secpaths.keys()
self.sections.sort()
self.section_names = {}
for s in self.sections:
if s in known_names.keys():
self.section_names[s + ': ' + known_names[s]] = s
else:
self.section_names[s] = s
def Pages(self, secname):
if not self.secpaths.has_key(secname):
return []
paths = string.splitfields(self.secpaths[secname], ':')
wid = len(secname)
names = []
for path in paths:
files = os.listdir(path)
for file in files:
if file[-(wid + 1):-wid] == '.' and file[-wid:] == secname:
file = file[:-(wid + 1)]
if file not in names:
# if duplicate - preceding path takes precedence
names.append(file)
names.sort()
return names
def FormattedPipe(self, secname, page):
secname = string.lower(secname)
if not self.secpaths.has_key(secname):
raise ValueError
file = page + '.' + secname
paths = string.splitfields(self.secpaths[secname], ':')
cwd = os.getcwd()
for path in paths:
files = os.listdir(path)
if file in files:
file = path + '/' + file
os.chdir(path)
os.chdir('..')
break
pipe = os.popen('nroff -man %s | ul -i' % file)
os.chdir(cwd)
return pipe
#end class ManDirectories
class ManPageWindow:
def __init__(self, pipe):
self.top = Tix.Toplevel()
frame = Tix.Frame(self.top)
frame2 = Tix.Frame(frame)
self.search_str = Tix.StringVar()
self.case_sensitive = Tix.StringVar()
btn = Tix.Button(frame2, text='Regexp Search:', command=self.Search)
entry = Tix.Entry(frame2, relief=Tix.SUNKEN)
entry['textvariable'] = self.search_str
entry.bind('<Return>', self.Search)
casesense = Tix.Checkbutton(frame2, text='Case Sensitive',
relief=Tix.FLAT,
variable=self.case_sensitive)
btn.pack(side=Tix.LEFT, expand=0)
entry.pack(side=Tix.LEFT, expand=1, fill=Tix.X)
casesense.pack(side=Tix.RIGHT, expand=0)
self.man = ManPageWidget(frame)
btn = Tix.Button(frame, text='Close', command=self.Quit)
frame2.pack(side=Tix.TOP, expand=0, fill=Tix.X)
self.man.pack(side=Tix.TOP, expand=1, fill=Tix.BOTH)
btn.pack(side=Tix.BOTTOM, expand=0, fill=Tix.X)
frame.pack(expand=1, fill=Tix.BOTH)
self.man.parsefile(pipe)
def Search(self, event=None):
str = self.search_str.get()
if not str:
self.top.bell()
print "No search string ?"
return
try:
if self.case_sensitive.get() == '1':
pat = regex.compile(str, regex.casefold)
else:
pat = regex.compile(str)
except regex.error, msg:
self.top.bell()
print "regex error"
return
pos = self.man.text.index('insert')
lineno = string.atoi(pos[:string.find(pos, '.')])
endpos = self.man.text.index('end')
endlineno = string.atoi(endpos[:string.find(endpos, '.')])
wraplineno = lineno
found = 0
while 1:
lineno = lineno + 1
if lineno > endlineno:
if wraplineno <= 0:
break
endlineno = wraplineno
lineno = 0
wraplineno = 0
line = self.man.text.get('%d.0 linestart' % lineno,
'%d.0 lineend' % lineno)
i = pat.search(line)
if i >= 0:
found = 1
n = max(1, len(pat.group(0)))
try:
self.man.text.tag_remove('sel', 'sel.first', 'sel.last')
except Tix.TclError:
pass
self.man.text.tag_add('sel', '%d.%d' % (lineno, i),
'%d.%d' % (lineno, i+n))
self.man.text.mark_set('insert', '%d.%d' % (lineno, i))
self.man.text.yview_pickplace('insert')
break
if not found:
self.frame.bell()
def Quit(self):
del self.search_str
del self.case_sensitive
self.top.destroy()
#end class ManPageWindow
class AproposWindow:
def __init__(self):
self.top = Tix.Toplevel()
frame = Tix.Frame(self.top)
frame2 = Tix.Frame(frame)
self.apropos_str = Tix.StringVar()
btn = Tix.Button(frame2, text='Apropos:', command=self.Apropos)
entry = Tix.Entry(frame2, relief=Tix.SUNKEN, width=20)
entry['textvariable'] = self.apropos_str
entry.bind('<Return>', self.Apropos)
btn.pack(side=Tix.LEFT, expand=0)
entry.pack(side=Tix.RIGHT, expand=1, fill=Tix.X)
frame2.pack(side=Tix.TOP, expand=0, fill=Tix.X)
self.stext = Tix.ScrolledText(frame)
self.stext.text.tag_config('!', font=BOLDFONT)
btn = Tix.Button(frame, text='Close', command=self.Quit)
self.stext.pack(side=Tix.TOP, expand=1, fill=Tix.BOTH)
btn.pack(side=Tix.BOTTOM, expand=0, fill=Tix.X)
frame.pack(expand=1, fill=Tix.BOTH)
def Apropos(self, event=None):
str = self.apropos_str.get()
if not str:
self.top.bell()
print "No string ?"
return
pipe = os.popen('apropos ' + str, 'r')
self.stext.text.delete('1.0', Tix.END)
tabs = regex.compile('\011+')
num = 1
while 1:
line = pipe.readline()
if not line:
break
line = regsub.gsub(tabs, '\011', line)
fields = string.splitfields(line, '\011')
if len(fields) == 1:
line = line[string.find(line, ' ') + 1:]
line = regsub.gsub('^ *', '', line)
fields = ['???', line]
if len(fields) == 2:
tmp = string.splitfields(fields[1], '-')
fields = fields[0:1] + tmp
num = num + 1
self.stext.text.insert('insert', fields[0]+'\t', '!')
self.stext.text.insert('insert', fields[1], `num`)
self.stext.text.tag_bind(`num`, '<Any-Enter>',
lambda e=None,t=`num`,w=self:
w._highlight(t, 1))
self.stext.text.tag_bind(`num`, '<Any-Leave>',
lambda e=None,t=`num`,w=self:
w._highlight(t, 0))
self.stext.text.tag_bind(`num`, '<1>',
lambda e=None,w=self,t=fields[1]:
w._hyper_link(t))
self.stext.text.insert('insert', fields[2])
def _highlight(self, tag, how):
if how:
self.stext.text.tag_config(tag, background="#43ce80",
relief=Tix.RAISED)
else:
self.stext.text.tag_config(tag, background="", relief=Tix.FLAT)
def _hyper_link(self, txt):
if link_pat.search(txt) < 0:
print "Invalid man reference string"
return
pagename = txt[link_pat.regs[1][0]:link_pat.regs[1][1]]
section = txt[link_pat.regs[2][0]:link_pat.regs[2][1]]
mandirs = ManDirectories()
pipe = mandirs.FormattedPipe(section, pagename)
disp = ManPageWindow(pipe)
def Quit(self):
del self.apropos_str
self.top.destroy()
class PManWindow:
def __init__(self, master=None):
self.mandirs = ManDirectories()
self.frame = Tix.Frame(master)
self.section = Tix.StringVar()
combo = Tix.ComboBox(self.frame, label='Section: ', dropdown=1,
editable=0, variable=self.section,
command=self.UpdatePageList)
pagelist = Tix.ScrolledListBox(self.frame, scrollbar='auto')
self.listbox = pagelist.listbox
self.listbox.bind('<Double-1>', self.ShowPage)
temp = self.mandirs.section_names.keys()
temp.sort()
for s in temp:
combo.insert(Tix.END, s)
box = Tix.ButtonBox(self.frame, orientation=Tix.HORIZONTAL)
box.add('show', text='Show Page ...', underline=0, width=13,
command=self.ShowPage)
box.add('aprop', text='Apropos ...', underline=0, width=13,
command=self.Apropos)
box.add('quit', text='Quit', underline=0, width=13,
command=self.Quit)
combo.pack(side=Tix.TOP, expand=0, fill=Tix.X)
pagelist.pack(side=Tix.TOP, expand=1, fill=Tix.BOTH)
box.pack(side=Tix.BOTTOM, expand=0, fill=Tix.X)
self.frame.pack(expand=1, fill=Tix.BOTH)
def UpdatePageList(self, event=None):
secname = self.section.get()
if not self.mandirs.section_names.has_key(secname):
return
secname = self.mandirs.section_names[secname]
pages = self.mandirs.Pages(secname)
self.listbox.delete(0, Tix.END)
for page in pages:
self.listbox.insert(Tix.END, page)
def ShowPage(self, event=None):
secname = self.section.get()
secname = self.mandirs.section_names[secname]
idx = self.listbox.curselection()
pagename = self.listbox.get(idx)
pipe = self.mandirs.FormattedPipe(secname, pagename)
page_display = ManPageWindow(pipe)
def Apropos(self):
apropos_disp = AproposWindow()
def Quit(self):
sys.exit()
#end class PManWindow
def main():
root = Tix.Tk()
root.minsize(10, 10)
win = PManWindow(root)
root.mainloop()
if __name__ == '__main__':
main()

View File

@@ -1,45 +0,0 @@
#!/usr/local/bin/python
#
# $Id: Balloon.py,v 1.1 2000/11/05 19:54:53 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": 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
def RunSample(w):
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=lambda w=w: w.destroy())
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')
if __name__ == '__main__':
root = Tix.Tk()
RunSample(root)
root.mainloop()

View File

@@ -1,44 +0,0 @@
#!/usr/local/bin/python
#
# $Id: BtnBox.py,v 1.1 2000/11/05 19:56:48 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": 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

@@ -1,197 +0,0 @@
#!/usr/local/bin/python
#
# $Id: CmpImg.py,v 1.1 2000/11/05 19:57:44 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": 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

@@ -1,100 +0,0 @@
#!/usr/local/bin/python
#
# $Id: ComboBox.py,v 1.1 2000/11/05 19:58:00 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": 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):
print "Month =", demo_month.get()
def select_year(event=None):
print "Year =", demo_year.get()
def ok_command(w):
print "Month =", demo_month.get(), ", Year=", demo_year.get()
w.destroy()
if __name__ == '__main__':
root = Tix.Tk()
RunSample(root)
root.mainloop()

View File

@@ -1,102 +0,0 @@
#!/usr/local/bin/python
#
# $Id: Control.py,v 1.1 2000/11/05 19:58:13 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": 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
def RunSample(w):
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=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)
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:
# Works here though. Why ? Beats me.
return maker_list[0]
# Works here though. Why ? Beats me.
return maker_list[i]
def ok_command(w):
print "Selected", demo_num_engines.get(), "of", demo_maker.get(), " engines each of thrust", demo_thrust.get()
w.destroy()
if __name__ == '__main__':
root = Tix.Tk()
RunSample(root)
root.mainloop()

View File

@@ -1,119 +0,0 @@
#!/usr/local/bin/python
#
# $Id: NoteBook.py,v 1.1 2000/11/05 19:58:27 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": 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

@@ -1,68 +0,0 @@
#!/usr/local/bin/python
#
# $Id: OptMenu.py,v 1.1 2000/11/05 19:58:41 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": 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):
print "Convert file from", demo_opt_from.get(), " to", demo_opt_to.get()
w.destroy()
if __name__ == '__main__':
root = Tix.Tk()
RunSample(root)
root.mainloop()

View File

@@ -1,56 +0,0 @@
# Tix Demostration Program
#
# $Id: PopMenu.py,v 1.1 2000/11/05 19:58:57 idiscovery Exp $
#
#
# This sample program is structured in such a way so that it can be
# executed from the Tix demo program "widget": 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

@@ -1,107 +0,0 @@
#!/usr/local/bin/python
#
# $Id: SHList1.py,v 1.1 2000/11/05 19:59:11 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": 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
def RunSample (w) :
# 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, bg=hlist['bg'] )
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 = 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 )
# This "if" statement makes it possible to run this script file inside or
# outside of the main demo program "widget".
#
if __name__== '__main__' :
root=Tix.Tk()
RunSample(root)
root.mainloop()

View File

@@ -1,148 +0,0 @@
#!/usr/local/bin/python
#
# $Id: SHList2.py,v 1.1 2000/11/05 19:59:27 idiscovery Exp $
#
# Tix Demostration Program
#
# This sample program is structured in such a way so that it can be
# executed from the PyTix 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
def RunSample (w) :
# 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, fg='black', refwindow=top,
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=top,
fg='#202060', selectforeground = '#202060', font = boldfont )
style['mgr_posn'] = Tix.DisplayStyle(Tix.TEXT, padx=8, refwindow=top,
fg='#202060', selectforeground='#202060' )
style['empl_name'] = Tix.DisplayStyle(Tix.TEXT, refwindow=top,
fg='#602020', selectforeground = '#602020', font = boldfont )
style['empl_posn'] = Tix.DisplayStyle(Tix.TEXT, padx=8, refwindow=top,
fg='#602020', selectforeground = '#602020' )
# 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 = 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 )
# This "if" statement makes it possible to run this script file inside or
# outside of the main demo program "widget".
#
if __name__== '__main__' :
root=Tix.Tk()
RunSample(root)
root.mainloop()

View File

@@ -1,80 +0,0 @@
#!/usr/local/bin/python
#
# $Id: Tree.py,v 1.1 2000/11/05 19:59:48 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": 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()

View File

@@ -1,823 +0,0 @@
#! /usr/local/bin/python
#
# $Id: tixwidgets.py,v 1.2 2000/11/22 08:03:01 idiscovery Exp $
#
# tixwidgets.py --
# This is a demo program of all Tix widgets available from Python. If
# you have installed Python & Tix properly, you can execute this as
#
# % tixwidget.py
#
import os, sys, Tix
class Demo:
pass
root = Tix.Tk()
demo = Demo()
demo.dir = None # script directory
demo.balloon = None # balloon widget
demo.useBalloons = Tix.StringVar()
demo.useBalloons.set('0')
demo.statusbar = None # status bar widget
demo.welmsg = None # Msg widget
demo.welfont = '' # font name
demo.welsize = '' # font size
def main():
global demo, root
progname = sys.argv[0]
dirname = os.path.dirname(progname)
if dirname and dirname != os.curdir:
demo.dir = dirname
index = -1
for i in range(len(sys.path)):
p = sys.path[i]
if p in ("", os.curdir):
index = i
if index >= 0:
sys.path[index] = dirname
else:
sys.path.insert(0, dirname)
else:
demo.dir = os.getcwd()
sys.path.insert(0, demo.dir+'/samples')
root.withdraw()
root = Tix.Toplevel()
root.title('Tix Widget Demonstration')
root.geometry('780x570+50+50')
demo.balloon = Tix.Balloon(root)
frame1 = MkMainMenu(root)
frame2 = MkMainNotebook(root)
frame3 = MkMainStatus(root)
frame1.pack(side=Tix.TOP, fill=Tix.X)
frame3.pack(side=Tix.BOTTOM, fill=Tix.X)
frame2.pack(side=Tix.TOP, expand=1, fill=Tix.BOTH, padx=4, pady=4)
demo.balloon['statusbar'] = demo.statusbar
root.mainloop()
def exit_cmd(event=None):
sys.exit()
def MkMainMenu(top):
global demo
w = Tix.Frame(top, bd=2, relief=Tix.RAISED)
file = Tix.Menubutton(w, text='File', underline=0, takefocus=0)
help = Tix.Menubutton(w, text='Help', underline=0, takefocus=0)
file.pack(side=Tix.LEFT)
help.pack(side=Tix.RIGHT)
fm = Tix.Menu(file)
file['menu'] = fm
hm = Tix.Menu(help)
help['menu'] = hm
fm.add_command(label='Exit', underline=1, accelerator='Ctrl+X',
command=exit_cmd)
hm.add_checkbutton(label='BalloonHelp', underline=0, command=ToggleHelp,
variable=demo.useBalloons)
# The trace variable option doesn't seem to work, instead I use 'command'
#apply(w.tk.call, ('trace', 'variable', demo.useBalloons, 'w',
# ToggleHelp))
top.bind_all("<Control-x>", exit_cmd)
top.bind_all("<Control-X>", exit_cmd)
return w
def MkMainNotebook(top):
top.option_add('*TixNoteBook*tagPadX', 6)
top.option_add('*TixNoteBook*tagPadY', 4)
top.option_add('*TixNoteBook*borderWidth', 2)
top.option_add('*TixNoteBook*font',
'-*-helvetica-bold-o-normal-*-14-*-*-*-*-*-*-*')
w = Tix.NoteBook(top, ipadx=5, ipady=5)
w.add('wel', label='Welcome', underline=0,
createcmd=lambda w=w, name='wel': MkWelcome(w, name))
w.add('cho', label='Choosers', underline=0,
createcmd=lambda w=w, name='cho': MkChoosers(w, name))
w.add('scr', label='Scrolled Widgets', underline=0,
createcmd=lambda w=w, name='scr': MkScroll(w, name))
w.add('mgr', label='Manager Widgets', underline=0,
createcmd=lambda w=w, name='mgr': MkManager(w, name))
w.add('dir', label='Directory List', underline=0,
createcmd=lambda w=w, name='dir': MkDirList(w, name))
w.add('exp', label='Run Sample Programs', underline=0,
createcmd=lambda w=w, name='exp': MkSample(w, name))
return w
def MkMainStatus(top):
global demo
w = Tix.Frame(top, relief=Tix.RAISED, bd=1)
demo.statusbar = Tix.Label(w, relief=Tix.SUNKEN, bd=1, font='-*-helvetica-medium-r-normal-*-14-*-*-*-*-*-*-*')
demo.statusbar.form(padx=3, pady=3, left=0, right='%70')
return w
def MkWelcome(nb, name):
w = nb.page(name)
bar = MkWelcomeBar(w)
text = MkWelcomeText(w)
bar.pack(side=Tix.TOP, fill=Tix.X, padx=2, pady=2)
text.pack(side=Tix.TOP, fill=Tix.BOTH, expand=1)
def MkWelcomeBar(top):
global demo
w = Tix.Frame(top, bd=2, relief=Tix.GROOVE)
b1 = Tix.ComboBox(w, command=lambda w=top: MainTextFont(w))
b2 = Tix.ComboBox(w, command=lambda w=top: MainTextFont(w))
b1.entry['width'] = 15
b1.slistbox.listbox['height'] = 3
b2.entry['width'] = 4
b2.slistbox.listbox['height'] = 3
demo.welfont = b1
demo.welsize = b2
b1.insert(Tix.END, 'Courier')
b1.insert(Tix.END, 'Helvetica')
b1.insert(Tix.END, 'Lucida')
b1.insert(Tix.END, 'Times Roman')
b2.insert(Tix.END, '8')
b2.insert(Tix.END, '10')
b2.insert(Tix.END, '12')
b2.insert(Tix.END, '14')
b2.insert(Tix.END, '18')
b1.pick(1)
b2.pick(3)
b1.pack(side=Tix.LEFT, padx=4, pady=4)
b2.pack(side=Tix.LEFT, padx=4, pady=4)
demo.balloon.bind_widget(b1, msg='Choose\na font',
statusmsg='Choose a font for this page')
demo.balloon.bind_widget(b2, msg='Point size',
statusmsg='Choose the font size for this page')
return w
def MkWelcomeText(top):
global demo
w = Tix.ScrolledWindow(top, scrollbar='auto')
win = w.window
title = Tix.Label(win, font='-*-times-bold-r-normal-*-18-*-*-*-*-*-*-*',
bd=0, width=30, anchor=Tix.N, text='Welcome to TIX Version 4.0 from Python Version 1.3')
msg = Tix.Message(win, font='-*-helvetica-bold-r-normal-*-14-*-*-*-*-*-*-*',
bd=0, width=400, anchor=Tix.N,
text='Tix 4.0 is a set of mega-widgets based on TK. This program \
demonstrates the widgets in the Tix widget set. You can choose the pages \
in this window to look at the corresponding widgets. \n\n\
To quit this program, choose the "File | Exit" command.')
title.pack(expand=1, fill=Tix.BOTH, padx=10, pady=10)
msg.pack(expand=1, fill=Tix.BOTH, padx=10, pady=10)
demo.welmsg = msg
return w
def MainTextFont(w):
global demo
if not demo.welmsg:
return
font = demo.welfont['value']
point = demo.welsize['value']
if font == 'Times Roman':
font = 'times'
fontstr = '-*-%s-bold-r-normal-*-%s-*-*-*-*-*-*-*' % (font, point)
demo.welmsg['font'] = fontstr
def ToggleHelp():
if demo.useBalloons.get() == '1':
demo.balloon['state'] = 'both'
else:
demo.balloon['state'] = 'none'
def MkChoosers(nb, name):
w = nb.page(name)
prefix = Tix.OptionName(w)
if not prefix:
prefix = ''
w.option_add('*' + prefix + '*TixLabelFrame*label.padX', 4)
til = Tix.LabelFrame(w, label='Chooser Widgets')
cbx = Tix.LabelFrame(w, label='tixComboBox')
ctl = Tix.LabelFrame(w, label='tixControl')
sel = Tix.LabelFrame(w, label='tixSelect')
opt = Tix.LabelFrame(w, label='tixOptionMenu')
fil = Tix.LabelFrame(w, label='tixFileEntry')
fbx = Tix.LabelFrame(w, label='tixFileSelectBox')
tbr = Tix.LabelFrame(w, label='Tool Bar')
MkTitle(til.frame)
MkCombo(cbx.frame)
MkControl(ctl.frame)
MkSelect(sel.frame)
MkOptMenu(opt.frame)
MkFileEnt(fil.frame)
MkFileBox(fbx.frame)
MkToolBar(tbr.frame)
# First column: comBox and selector
cbx.form(top=0, left=0, right='%33')
sel.form(left=0, right='&'+str(cbx), top=cbx)
opt.form(left=0, right='&'+str(cbx), top=sel, bottom=-1)
# Second column: title .. etc
til.form(left=cbx, top=0,right='%66')
ctl.form(left=cbx, right='&'+str(til), top=til)
fil.form(left=cbx, right='&'+str(til), top=ctl)
tbr.form(left=cbx, right='&'+str(til), top=fil, bottom=-1)
#
# Third column: file selection
fbx.form(right=-1, top=0, left='%66')
def MkCombo(w):
prefix = Tix.OptionName(w)
if not prefix: prefix = ''
w.option_add('*' + prefix + '*TixComboBox*label.width', 10)
w.option_add('*' + prefix + '*TixComboBox*label.anchor', Tix.E)
w.option_add('*' + prefix + '*TixComboBox*entry.width', 14)
static = Tix.ComboBox(w, label='Static', editable=0)
editable = Tix.ComboBox(w, label='Editable', editable=1)
history = Tix.ComboBox(w, label='History', editable=1, history=1,
anchor=Tix.E)
static.insert(Tix.END, 'January')
static.insert(Tix.END, 'February')
static.insert(Tix.END, 'March')
static.insert(Tix.END, 'April')
static.insert(Tix.END, 'May')
static.insert(Tix.END, 'June')
static.insert(Tix.END, 'July')
static.insert(Tix.END, 'August')
static.insert(Tix.END, 'September')
static.insert(Tix.END, 'October')
static.insert(Tix.END, 'November')
static.insert(Tix.END, 'December')
editable.insert(Tix.END, 'Angola')
editable.insert(Tix.END, 'Bangladesh')
editable.insert(Tix.END, 'China')
editable.insert(Tix.END, 'Denmark')
editable.insert(Tix.END, 'Ecuador')
history.insert(Tix.END, '/usr/bin/ksh')
history.insert(Tix.END, '/usr/local/lib/python')
history.insert(Tix.END, '/var/adm')
static.pack(side=Tix.TOP, padx=5, pady=3)
editable.pack(side=Tix.TOP, padx=5, pady=3)
history.pack(side=Tix.TOP, padx=5, pady=3)
states = ['Bengal', 'Delhi', 'Karnataka', 'Tamil Nadu']
def spin_cmd(w, inc):
idx = states.index(demo_spintxt.get()) + inc
if idx < 0:
idx = len(states) - 1
elif idx >= len(states):
idx = 0
# following doesn't work.
# return states[idx]
demo_spintxt.set(states[idx]) # this works
def spin_validate(w):
global states, demo_spintxt
try:
i = states.index(demo_spintxt.get())
except:
return states[0]
return states[i]
# why this procedure works as opposed to the previous one beats me.
def MkControl(w):
global demo_spintxt
prefix = Tix.OptionName(w)
if not prefix: prefix = ''
w.option_add('*' + prefix + '*TixControl*label.width', 10)
w.option_add('*' + prefix + '*TixControl*label.anchor', Tix.E)
w.option_add('*' + prefix + '*TixControl*entry.width', 13)
demo_spintxt = Tix.StringVar()
demo_spintxt.set(states[0])
simple = Tix.Control(w, label='Numbers')
spintxt = Tix.Control(w, label='States', variable=demo_spintxt)
spintxt['incrcmd'] = lambda w=spintxt: spin_cmd(w, 1)
spintxt['decrcmd'] = lambda w=spintxt: spin_cmd(w, -1)
spintxt['validatecmd'] = lambda w=spintxt: spin_validate(w)
simple.pack(side=Tix.TOP, padx=5, pady=3)
spintxt.pack(side=Tix.TOP, padx=5, pady=3)
def MkSelect(w):
prefix = Tix.OptionName(w)
if not prefix: prefix = ''
w.option_add('*' + prefix + '*TixSelect*label.anchor', Tix.CENTER)
w.option_add('*' + prefix + '*TixSelect*orientation', Tix.VERTICAL)
w.option_add('*' + prefix + '*TixSelect*labelSide', Tix.TOP)
sel1 = Tix.Select(w, label='Mere Mortals', allowzero=1, radio=1)
sel2 = Tix.Select(w, label='Geeks', allowzero=1, radio=0)
sel1.add('eat', text='Eat')
sel1.add('work', text='Work')
sel1.add('play', text='Play')
sel1.add('party', text='Party')
sel1.add('sleep', text='Sleep')
sel2.add('eat', text='Eat')
sel2.add('prog1', text='Program')
sel2.add('prog2', text='Program')
sel2.add('prog3', text='Program')
sel2.add('sleep', text='Sleep')
sel1.pack(side=Tix.LEFT, padx=5, pady=3, fill=Tix.X)
sel2.pack(side=Tix.LEFT, padx=5, pady=3, fill=Tix.X)
def MkOptMenu(w):
prefix = Tix.OptionName(w)
if not prefix: prefix = ''
w.option_add('*' + prefix + '*TixOptionMenu*label.anchor', Tix.E)
m = Tix.OptionMenu(w, label='File Format : ', options='menubutton.width 15')
m.add_command('text', label='Plain Text')
m.add_command('post', label='PostScript')
m.add_command('format', label='Formatted Text')
m.add_command('html', label='HTML')
m.add_command('sep')
m.add_command('tex', label='LaTeX')
m.add_command('rtf', label='Rich Text Format')
m.pack(fill=Tix.X, padx=5, pady=3)
def MkFileEnt(w):
msg = Tix.Message(w, font='-*-helvetica-bold-r-normal-*-14-*-*-*-*-*-*-*',
relief=Tix.FLAT, width=240, anchor=Tix.N,
text='Press the "open file" icon button and a TixFileSelectDialog will popup.')
ent = Tix.FileEntry(w, label='Select a file : ')
msg.pack(side=Tix.TOP, expand=1, fill=Tix.BOTH, padx=3, pady=3)
ent.pack(side=Tix.TOP, fill=Tix.X, padx=3, pady=3)
def MkFileBox(w):
msg = Tix.Message(w, font='-*-helvetica-bold-r-normal-*-14-*-*-*-*-*-*-*',
relief=Tix.FLAT, width=240, anchor=Tix.N,
text='The TixFileSelectBox is a Motif-style box with various enhancements. For example, you can adjust the size of the two listboxes and your past selections are recorded.')
box = Tix.FileSelectBox(w)
msg.pack(side=Tix.TOP, expand=1, fill=Tix.BOTH, padx=3, pady=3)
box.pack(side=Tix.TOP, fill=Tix.X, padx=3, pady=3)
def MkToolBar(w):
global demo
prefix = Tix.OptionName(w)
if not prefix: prefix = ''
w.option_add('*' + prefix + '*TixSelect*frame.borderWidth', 1)
msg = Tix.Message(w, font='-*-helvetica-bold-r-normal-*-14-*-*-*-*-*-*-*',
relief=Tix.FLAT, width=240, anchor=Tix.N,
text='The Select widget is also good for arranging buttons in a tool bar.')
bar = Tix.Frame(w, bd=2, relief=Tix.RAISED)
font = Tix.Select(w, allowzero=1, radio=0, label='')
para = Tix.Select(w, allowzero=0, radio=1, label='')
font.add('bold', bitmap='@' + demo.dir + '/bitmaps/bold.xbm')
font.add('italic', bitmap='@' + demo.dir + '/bitmaps/italic.xbm')
font.add('underline', bitmap='@' + demo.dir + '/bitmaps/underline.xbm')
font.add('capital', bitmap='@' + demo.dir + '/bitmaps/capital.xbm')
para.add('left', bitmap='@' + demo.dir + '/bitmaps/leftj.xbm')
para.add('right', bitmap='@' + demo.dir + '/bitmaps/rightj.xbm')
para.add('center', bitmap='@' + demo.dir + '/bitmaps/centerj.xbm')
para.add('justify', bitmap='@' + demo.dir + '/bitmaps/justify.xbm')
msg.pack(side=Tix.TOP, expand=1, fill=Tix.BOTH, padx=3, pady=3)
bar.pack(side=Tix.TOP, fill=Tix.X, padx=3, pady=3)
font.pack({'in':bar}, side=Tix.LEFT, padx=3, pady=3)
para.pack({'in':bar}, side=Tix.LEFT, padx=3, pady=3)
def MkTitle(w):
prefix = Tix.OptionName(w)
if not prefix: prefix = ''
w.option_add('*' + prefix + '*TixSelect*frame.borderWidth', 1)
msg = Tix.Message(w, font='-*-helvetica-bold-r-normal-*-14-*-*-*-*-*-*-*',
relief=Tix.FLAT, width=240, anchor=Tix.N,
text='There are many types of "chooser" widgets that allow the user to input different types of information')
msg.pack(side=Tix.TOP, expand=1, fill=Tix.BOTH, padx=3, pady=3)
def MkScroll(nb, name):
w = nb.page(name)
prefix = Tix.OptionName(w)
if not prefix:
prefix = ''
w.option_add('*' + prefix + '*TixLabelFrame*label.padX', 4)
sls = Tix.LabelFrame(w, label='tixScrolledListBox')
swn = Tix.LabelFrame(w, label='tixScrolledWindow')
stx = Tix.LabelFrame(w, label='tixScrolledText')
MkSList(sls.frame)
MkSWindow(swn.frame)
MkSText(stx.frame)
sls.form(top=0, left=0, right='%33', bottom=-1)
swn.form(top=0, left=sls, right='%66', bottom=-1)
stx.form(top=0, left=swn, right=-1, bottom=-1)
def MkSList(w):
top = Tix.Frame(w, width=300, height=330)
bot = Tix.Frame(w)
msg = Tix.Message(top, font='-*-helvetica-bold-r-normal-*-14-*-*-*-*-*-*-*',
relief=Tix.FLAT, width=200, anchor=Tix.N,
text='This TixScrolledListBox is configured so that it uses scrollbars only when it is necessary. Use the handles to resize the listbox and watch the scrollbars automatically appear and disappear.')
list = Tix.ScrolledListBox(top, scrollbar='auto')
list.place(x=50, y=150, width=120, height=80)
list.listbox.insert(Tix.END, 'Alabama')
list.listbox.insert(Tix.END, 'California')
list.listbox.insert(Tix.END, 'Montana')
list.listbox.insert(Tix.END, 'New Jersey')
list.listbox.insert(Tix.END, 'New York')
list.listbox.insert(Tix.END, 'Pennsylvania')
list.listbox.insert(Tix.END, 'Washington')
rh = Tix.ResizeHandle(top, bg='black',
relief=Tix.RAISED,
handlesize=8, gridded=1, minwidth=50, minheight=30)
btn = Tix.Button(bot, text='Reset', command=lambda w=rh, x=list: SList_reset(w,x))
top.propagate(0)
msg.pack(fill=Tix.X)
btn.pack(anchor=Tix.CENTER)
top.pack(expand=1, fill=Tix.BOTH)
bot.pack(fill=Tix.BOTH)
list.bind('<Map>', func=lambda arg=0, rh=rh, list=list:
list.tk.call('tixDoWhenIdle', str(rh), 'attachwidget', str(list)))
def SList_reset(rh, list):
list.place(x=50, y=150, width=120, height=80)
list.update()
rh.attach_widget(list)
def MkSWindow(w):
global demo
top = Tix.Frame(w, width=330, height=330)
bot = Tix.Frame(w)
msg = Tix.Message(top, font='-*-helvetica-bold-r-normal-*-14-*-*-*-*-*-*-*',
relief=Tix.FLAT, width=200, anchor=Tix.N,
text='The TixScrolledWindow widget allows you to scroll any kind of Tk widget. It is more versatile than a scrolled canvas widget.')
win = Tix.ScrolledWindow(top, scrollbar='auto')
image = Tix.Image('photo', file=demo.dir + "/bitmaps/tix.gif")
lbl = Tix.Label(win.window, image=image)
lbl.pack(expand=1, fill=Tix.BOTH)
win.place(x=30, y=150, width=190, height=120)
rh = Tix.ResizeHandle(top, bg='black',
relief=Tix.RAISED,
handlesize=8, gridded=1, minwidth=50, minheight=30)
btn = Tix.Button(bot, text='Reset', command=lambda w=rh, x=win: SWindow_reset(w,x))
top.propagate(0)
msg.pack(fill=Tix.X)
btn.pack(anchor=Tix.CENTER)
top.pack(expand=1, fill=Tix.BOTH)
bot.pack(fill=Tix.BOTH)
win.bind('<Map>', func=lambda arg=0, rh=rh, win=win:
win.tk.call('tixDoWhenIdle', str(rh), 'attachwidget', str(win)))
def SWindow_reset(rh, win):
win.place(x=30, y=150, width=190, height=120)
win.update()
rh.attach_widget(win)
def MkSText(w):
top = Tix.Frame(w, width=330, height=330)
bot = Tix.Frame(w)
msg = Tix.Message(top, font='-*-helvetica-bold-r-normal-*-14-*-*-*-*-*-*-*',
relief=Tix.FLAT, width=200, anchor=Tix.N,
text='The TixScrolledWindow widget allows you to scroll any kind of Tk widget. It is more versatile than a scrolled canvas widget.')
win = Tix.ScrolledText(top, scrollbar='auto')
# win.text['wrap'] = 'none'
win.text.insert(Tix.END, 'This is a text widget embedded in a scrolled window. Although the original Tix demo does not have any text here, I decided to put in some so that you can see the effect of scrollbars etc.')
win.place(x=30, y=150, width=190, height=100)
rh = Tix.ResizeHandle(top, bg='black',
relief=Tix.RAISED,
handlesize=8, gridded=1, minwidth=50, minheight=30)
btn = Tix.Button(bot, text='Reset', command=lambda w=rh, x=win: SText_reset(w,x))
top.propagate(0)
msg.pack(fill=Tix.X)
btn.pack(anchor=Tix.CENTER)
top.pack(expand=1, fill=Tix.BOTH)
bot.pack(fill=Tix.BOTH)
win.bind('<Map>', func=lambda arg=0, rh=rh, win=win:
win.tk.call('tixDoWhenIdle', str(rh), 'attachwidget', str(win)))
def SText_reset(rh, win):
win.place(x=30, y=150, width=190, height=120)
win.update()
rh.attach_widget(win)
def MkManager(nb, name):
w = nb.page(name)
prefix = Tix.OptionName(w)
if not prefix:
prefix = ''
w.option_add('*' + prefix + '*TixLabelFrame*label.padX', 4)
pane = Tix.LabelFrame(w, label='tixPanedWindow')
note = Tix.LabelFrame(w, label='tixNoteBook')
MkPanedWindow(pane.frame)
MkNoteBook(note.frame)
pane.form(top=0, left=0, right=note, bottom=-1)
note.form(top=0, right=-1, bottom=-1)
def MkPanedWindow(w):
msg = Tix.Message(w, font='-*-helvetica-bold-r-normal-*-14-*-*-*-*-*-*-*',
relief=Tix.FLAT, width=240, anchor=Tix.N,
text='The PanedWindow widget allows the user to interactively manipulate the sizes of several panes. The panes can be arranged either vertically or horizontally.')
group = Tix.Label(w, text='Newsgroup: 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)
text = Tix.ScrolledText(p2)
list.listbox.insert(Tix.END, " 12324 Re: TK is good for your health")
list.listbox.insert(Tix.END, "+ 12325 Re: TK is good for your health")
list.listbox.insert(Tix.END, "+ 12326 Re: Tix is even better for your health (Was: TK is good...)")
list.listbox.insert(Tix.END, " 12327 Re: Tix is even better for your health (Was: TK is good...)")
list.listbox.insert(Tix.END, "+ 12328 Re: Tix is even better for your health (Was: TK is good...)")
list.listbox.insert(Tix.END, " 12329 Re: Tix is even better for your health (Was: TK is good...)")
list.listbox.insert(Tix.END, "+ 12330 Re: Tix is even better for your health (Was: TK 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.tcl 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. This way you can display very fancy stuffs
in your GUI. For example, you can display a text string string
together with a bitmap, at the same time, inside a TK button widget. A
screenshot of compound images can be found at the bottom of this page:
http://www.cis.upenn.edu/~ioi/tix/screenshot.html
You can also you is in other places such as putting fancy bitmap+text
in menus, tabs of tixNoteBook widgets, etc. This feature will be
included in the next release of Tix (4.0b1). Count on it to make jazzy
interfaces!""")
list.pack(expand=1, fill=Tix.BOTH, padx=4, pady=6)
text.pack(expand=1, fill=Tix.BOTH, padx=4, pady=6)
msg.pack(side=Tix.TOP, padx=3, pady=3, fill=Tix.BOTH)
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)
def MkNoteBook(w):
msg = Tix.Message(w, font='-*-helvetica-bold-r-normal-*-14-*-*-*-*-*-*-*',
relief=Tix.FLAT, width=240, anchor=Tix.N,
text='The NoteBook widget allows you to layout a complex interface into individual pages.')
prefix = Tix.OptionName(w)
if not prefix:
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)
nb = Tix.NoteBook(w, ipadx=6, ipady=6)
nb.add('hard_disk', label="Hard Disk", underline=0)
nb.add('network', label="Network", underline=0)
# Frame for the buttons that are present on all pages
common = Tix.Frame(nb.hard_disk)
common.pack(side=Tix.RIGHT, padx=2, pady=2, fill=Tix.Y)
CreateCommonButtons(common)
# Widgets belonging only to this page
a = Tix.Control(nb.hard_disk, value=12, label='Access Time: ')
w = Tix.Control(nb.hard_disk, value=400, label='Write Throughput: ')
r = Tix.Control(nb.hard_disk, value=400, label='Read Throughput: ')
c = Tix.Control(nb.hard_disk, 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)
common = Tix.Frame(nb.network)
common.pack(side=Tix.RIGHT, padx=2, pady=2, fill=Tix.Y)
CreateCommonButtons(common)
a = Tix.Control(nb.network, value=12, label='Access Time: ')
w = Tix.Control(nb.network, value=400, label='Write Throughput: ')
r = Tix.Control(nb.network, value=400, label='Read Throughput: ')
c = Tix.Control(nb.network, value=1021, label='Capacity: ')
u = Tix.Control(nb.network, 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)
msg.pack(side=Tix.TOP, padx=3, pady=3, fill=Tix.BOTH)
nb.pack(side=Tix.TOP, padx=5, pady=5, fill=Tix.BOTH, expand=1)
def CreateCommonButtons(f):
ok = Tix.Button(f, text='OK', width = 6)
cancel = Tix.Button(f, text='Cancel', width = 6)
ok.pack(side=Tix.TOP, padx=2, pady=2)
cancel.pack(side=Tix.TOP, padx=2, pady=2)
def MkDirList(nb, name):
w = nb.page(name)
prefix = Tix.OptionName(w)
if not prefix:
prefix = ''
w.option_add('*' + prefix + '*TixLabelFrame*label.padX', 4)
dir = Tix.LabelFrame(w, label='tixDirList')
fsbox = Tix.LabelFrame(w, label='tixExFileSelectBox')
MkDirListWidget(dir.frame)
MkExFileWidget(fsbox.frame)
dir.form(top=0, left=0, right='%40', bottom=-1)
fsbox.form(top=0, left='%40', right=-1, bottom=-1)
def MkDirListWidget(w):
msg = Tix.Message(w, font='-*-helvetica-bold-r-normal-*-14-*-*-*-*-*-*-*',
relief=Tix.FLAT, width=240, anchor=Tix.N,
text='The TixDirList widget gives a graphical representation of the file system directory and makes it easy for the user to choose and access directories.')
dirlist = Tix.DirList(w, options='hlist.padY 1 hlist.width 25 hlist.height 16')
msg.pack(side=Tix.TOP, expand=1, fill=Tix.BOTH, padx=3, pady=3)
dirlist.pack(side=Tix.TOP, padx=3, pady=3)
def MkExFileWidget(w):
msg = Tix.Message(w, font='-*-helvetica-bold-r-normal-*-14-*-*-*-*-*-*-*',
relief=Tix.FLAT, width=240, anchor=Tix.N,
text='The TixExFileSelectBox widget is more user friendly than the Motif style FileSelectBox.')
# There's a bug in the ComboBoxes - the scrolledlistbox is destroyed
box = Tix.ExFileSelectBox(w, bd=2, relief=Tix.RAISED)
msg.pack(side=Tix.TOP, expand=1, fill=Tix.BOTH, padx=3, pady=3)
box.pack(side=Tix.TOP, padx=3, pady=3)
###
### List of all the demos we want to show off
comments = {'widget' : 'Widget Demos', 'image' : 'Image Demos'}
samples = {'Balloon' : 'Balloon',
'Button Box' : 'BtnBox',
'Combo Box' : 'ComboBox',
'Compound Image' : 'CmpImg',
'Control' : 'Control',
'Notebook' : 'NoteBook',
'Option Menu' : 'OptMenu',
'Popup Menu' : 'PopMenu',
'ScrolledHList (1)' : 'SHList1',
'ScrolledHList (2)' : 'SHList2',
'Tree (dynamic)' : 'Tree'
}
stypes = {}
stypes['widget'] = ['Balloon', 'Button Box', 'Combo Box', 'Control',
'Notebook', 'Option Menu', 'Popup Menu',
'ScrolledHList (1)', 'ScrolledHList (2)', 'Tree (dynamic)']
stypes['image'] = ['Compound Image']
def MkSample(nb, name):
w = nb.page(name)
prefix = Tix.OptionName(w)
if not prefix:
prefix = ''
w.option_add('*' + prefix + '*TixLabelFrame*label.padX', 4)
lab = Tix.Label(w, text='Select a sample program:', anchor=Tix.W)
lab1 = Tix.Label(w, text='Source:', anchor=Tix.W)
slb = Tix.ScrolledHList(w, options='listbox.exportSelection 0')
slb.hlist['command'] = lambda args=0, w=w,slb=slb: Sample_Action(w, slb, 'run')
slb.hlist['browsecmd'] = lambda args=0, w=w,slb=slb: Sample_Action(w, slb, 'browse')
stext = Tix.ScrolledText(w, name='stext')
stext.text.bind('<1>', stext.text.focus())
stext.text.bind('<Up>', lambda w=stext.text: w.yview(scroll='-1 unit'))
stext.text.bind('<Down>', lambda w=stext.text: w.yview(scroll='1 unit'))
stext.text.bind('<Left>', lambda w=stext.text: w.xview(scroll='-1 unit'))
stext.text.bind('<Right>', lambda w=stext.text: w.xview(scroll='1 unit'))
run = Tix.Button(w, text='Run ...', name='run', command=lambda args=0, w=w,slb=slb: Sample_Action(w, slb, 'run'))
view = Tix.Button(w, text='View Source ...', name='view', command=lambda args=0,w=w,slb=slb: Sample_Action(w, slb, 'view'))
lab.form(top=0, left=0, right='&'+str(slb))
slb.form(left=0, top=lab, bottom=-4)
lab1.form(left='&'+str(stext), top=0, right='&'+str(stext), bottom=stext)
run.form(left=str(slb)+' 30', bottom=-4)
view.form(left=run, bottom=-4)
stext.form(bottom=str(run)+' -5', left='&'+str(run), right='-0', top='&'+str(slb))
stext.text['bg'] = slb.hlist['bg']
stext.text['state'] = 'disabled'
stext.text['wrap'] = 'none'
#XXX stext.text['font'] = fixed_font
slb.hlist['separator'] = '.'
slb.hlist['width'] = 25
slb.hlist['drawbranch'] = 0
slb.hlist['indent'] = 10
slb.hlist['wideselect'] = 1
for type in ['widget', 'image']:
if type != 'widget':
x = Tix.Frame(slb.hlist, bd=2, height=2, width=150,
relief=Tix.SUNKEN, bg=slb.hlist['bg'])
slb.hlist.add_child(itemtype=Tix.WINDOW, window=x, state='disabled')
x = slb.hlist.add_child(itemtype=Tix.TEXT, state='disabled',
text=comments[type])
for key in stypes[type]:
slb.hlist.add_child(x, itemtype=Tix.TEXT, data=key,
text=key)
slb.hlist.selection_clear()
run['state'] = 'disabled'
view['state'] = 'disabled'
def Sample_Action(w, slb, action):
global demo
run = w._nametowidget(str(w) + '.run')
view = w._nametowidget(str(w) + '.view')
stext = w._nametowidget(str(w) + '.stext')
hlist = slb.hlist
anchor = hlist.info_anchor()
if not anchor:
run['state'] = 'disabled'
view['state'] = 'disabled'
elif not hlist.info_parent(anchor):
# a comment
return
run['state'] = 'normal'
view['state'] = 'normal'
key = hlist.info_data(anchor)
title = key
prog = samples[key]
if action == 'run':
exec('import ' + prog)
w = Tix.Toplevel()
w.title(title)
rtn = eval(prog + '.RunSample')
rtn(w)
elif action == 'view':
w = Tix.Toplevel()
w.title('Source view: ' + title)
LoadFile(w, demo.dir + '/samples/' + prog + '.py')
elif action == 'browse':
ReadFile(stext.text, demo.dir + '/samples/' + prog + '.py')
def LoadFile(w, fname):
b = Tix.Button(w, text='Close', command=w.destroy)
t = Tix.ScrolledText(w)
# b.form(left=0, bottom=0, padx=4, pady=4)
# t.form(left=0, bottom=b, right='-0', top=0)
t.pack()
b.pack()
t.text['highlightcolor'] = t['bg']
t.text['bd'] = 2
t.text['bg'] = t['bg']
t.text['wrap'] = 'none'
ReadFile(t.text, fname)
def ReadFile(w, fname):
old_state = w['state']
w['state'] = 'normal'
w.delete('0.0', Tix.END)
try:
f = open(fname)
lines = f.readlines()
for s in lines:
w.insert(Tix.END, s)
f.close()
finally:
# w.see('1.0')
w['state'] = old_state
if __name__ == '__main__':
main()

View File

@@ -1,9 +0,0 @@
# -*-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.

View File

@@ -1,8 +0,0 @@
$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

@@ -1,89 +0,0 @@
$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

@@ -1,19 +0,0 @@
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

@@ -1,50 +0,0 @@
/* 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

@@ -1,6 +0,0 @@
#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

@@ -1,6 +0,0 @@
#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

@@ -1,6 +0,0 @@
#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

@@ -1,14 +0,0 @@
#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

@@ -1,49 +0,0 @@
/* 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

@@ -1,47 +0,0 @@
/* 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

@@ -1,14 +0,0 @@
#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

@@ -1,43 +0,0 @@
/* 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

@@ -1,48 +0,0 @@
/* 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

@@ -1,14 +0,0 @@
#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

@@ -1,49 +0,0 @@
/* 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

@@ -1,6 +0,0 @@
#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

@@ -1,6 +0,0 @@
#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

@@ -1,6 +0,0 @@
#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

@@ -1,14 +0,0 @@
#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

@@ -1,45 +0,0 @@
/* 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

@@ -1,48 +0,0 @@
/* 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

@@ -1,6 +0,0 @@
#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

@@ -1,52 +0,0 @@
/* 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.

Before

Width:  |  Height:  |  Size: 11 KiB

View File

@@ -1,6 +0,0 @@
#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

@@ -1,68 +0,0 @@
# -*-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

@@ -1,44 +0,0 @@
# -*-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

@@ -1,197 +0,0 @@
# -*-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

@@ -1,102 +0,0 @@
# -*-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

@@ -1,123 +0,0 @@
# -*-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

@@ -1,132 +0,0 @@
# -*-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

@@ -1,118 +0,0 @@
# -*-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

@@ -1,119 +0,0 @@
# -*-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

@@ -1,68 +0,0 @@
# -*-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

@@ -1,99 +0,0 @@
# -*-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

@@ -1,57 +0,0 @@
# -*-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

@@ -1,132 +0,0 @@
# -*-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

@@ -1,169 +0,0 @@
# -*-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

@@ -1,80 +0,0 @@
# -*-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

View File

@@ -1,107 +0,0 @@
# -*-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

File diff suppressed because it is too large Load Diff

View File

@@ -1,30 +0,0 @@
# -*-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.

Some files were not shown because too many files have changed in this diff Show More