Compare commits

..

1 Commits

Author SHA1 Message Date
Zachary Ware
60cae1c5a1 Import xz 5.2.2 (as of svn r86089) 2017-05-22 16:21:28 -05:00
1216 changed files with 145258 additions and 134289 deletions

1327
ABOUT-NLS Normal file

File diff suppressed because it is too large Load Diff

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>

27
AUTHORS Normal file
View File

@@ -0,0 +1,27 @@
Authors of XZ Utils
===================
XZ Utils is developed and maintained by Lasse Collin
<lasse.collin@tukaani.org>.
Major parts of liblzma are based on code written by Igor Pavlov,
specifically the LZMA SDK <http://7-zip.org/sdk.html>. Without
this code, XZ Utils wouldn't exist.
The SHA-256 implementation in liblzma is based on the code found from
7-Zip <http://7-zip.org/>, which has a modified version of the SHA-256
code found from Crypto++ <http://www.cryptopp.com/>. The SHA-256 code
in Crypto++ was written by Kevin Springle and Wei Dai.
Some scripts have been adapted from gzip. The original versions
were written by Jean-loup Gailly, Charles Levert, and Paul Eggert.
Andrew Dudman helped adapting the scripts and their man pages for
XZ Utils.
The GNU Autotools-based build system contains files from many authors,
which I'm not trying to list here.
Several people have contributed fixes or reported bugs. Most of them
are mentioned in the file THANKS.

65
COPYING Normal file
View File

@@ -0,0 +1,65 @@
XZ Utils Licensing
==================
Different licenses apply to different files in this package. Here
is a rough summary of which licenses apply to which parts of this
package (but check the individual files to be sure!):
- liblzma is in the public domain.
- xz, xzdec, and lzmadec command line tools are in the public
domain unless GNU getopt_long had to be compiled and linked
in from the lib directory. The getopt_long code is under
GNU LGPLv2.1+.
- The scripts to grep, diff, and view compressed files have been
adapted from gzip. These scripts and their documentation are
under GNU GPLv2+.
- All the documentation in the doc directory and most of the
XZ Utils specific documentation files in other directories
are in the public domain.
- Translated messages are in the public domain.
- The build system contains public domain files, and files that
are under GNU GPLv2+ or GNU GPLv3+. None of these files end up
in the binaries being built.
- Test files and test code in the tests directory, and debugging
utilities in the debug directory are in the public domain.
- The extra directory may contain public domain files, and files
that are under various free software licenses.
You can do whatever you want with the files that have been put into
the public domain. If you find public domain legally problematic,
take the previous sentence as a license grant. If you still find
the lack of copyright legally problematic, you have too many
lawyers.
As usual, this software is provided "as is", without any warranty.
If you copy significant amounts of public domain code from XZ Utils
into your project, acknowledging this somewhere in your software is
polite (especially if it is proprietary, non-free software), but
naturally it is not legally required. Here is an example of a good
notice to put into "about box" or into documentation:
This software includes code from XZ Utils <http://tukaani.org/xz/>.
The following license texts are included in the following files:
- COPYING.LGPLv2.1: GNU Lesser General Public License version 2.1
- COPYING.GPLv2: GNU General Public License version 2
- COPYING.GPLv3: GNU General Public License version 3
Note that the toolchain (compiler, linker etc.) may add some code
pieces that are copyrighted. Thus, it is possible that e.g. liblzma
binary wouldn't actually be in the public domain in its entirety
even though it contains no copyrighted code from the XZ Utils source
package.
If you have questions, don't hesitate to ask the author(s) for more
information.

339
COPYING.GPLv2 Normal file
View File

@@ -0,0 +1,339 @@
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Lesser General Public License instead.) You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must show them these terms so they know their
rights.
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term "modification".) Each licensee is addressed as "you".
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.
1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.
You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
b) You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.
c) If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.
In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:
a) Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange; or,
b) Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such
an offer, in accord with Subsection b above.)
The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.
If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.
5. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all. For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.
9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.
10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) year name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, the commands you use may
be called something other than `show w' and `show c'; they could even be
mouse-clicks or menu items--whatever suits your program.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
`Gnomovision' (which makes passes at compilers) written by James Hacker.
<signature of Ty Coon>, 1 April 1989
Ty Coon, President of Vice
This General Public License does not permit incorporating your program into
proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License.

674
COPYING.GPLv3 Normal file
View File

@@ -0,0 +1,674 @@
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The GNU General Public License is a free, copyleft license for
software and other kinds of works.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
the GNU General Public License is intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users. We, the Free Software Foundation, use the
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors. You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
To protect your rights, we need to prevent others from denying you
these rights or asking you to surrender the rights. Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received. You must make sure that they, too, receive
or can get the source code. And you must show them these terms so they
know their rights.
Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.
For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software. For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.
Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the manufacturer
can do so. This is fundamentally incompatible with the aim of
protecting users' freedom to change the software. The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable. Therefore, we
have designed this version of the GPL to prohibit the practice for those
products. If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.
Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to
avoid the special danger that patents applied to a free program could
make it effectively proprietary. To prevent this, the GPL assures that
patents cannot be used to render the program non-free.
The precise terms and conditions for copying, distribution and
modification follow.
TERMS AND CONDITIONS
0. Definitions.
"This License" refers to version 3 of the GNU General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work based
on the Program.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
1. Source Code.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The Corresponding Source for a work in source code form is that
same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Use with the GNU Affero General Public License.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU Affero General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the special requirements of the GNU Affero General Public License,
section 13, concerning interaction through a network will apply to the
combination as such.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:
<program> Copyright (C) <year> <name of author>
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, your program's commands
might be different; for a GUI interface, you would use an "about box".
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
<http://www.gnu.org/licenses/>.
The GNU General Public License does not permit incorporating your program
into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
<http://www.gnu.org/philosophy/why-not-lgpl.html>.

502
COPYING.LGPLv2.1 Normal file
View File

@@ -0,0 +1,502 @@
GNU LESSER GENERAL PUBLIC LICENSE
Version 2.1, February 1999
Copyright (C) 1991, 1999 Free Software Foundation, Inc.
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
[This is the first released version of the Lesser GPL. It also counts
as the successor of the GNU Library Public License, version 2, hence
the version number 2.1.]
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
Licenses are intended to guarantee your freedom to share and change
free software--to make sure the software is free for all its users.
This license, the Lesser General Public License, applies to some
specially designated software packages--typically libraries--of the
Free Software Foundation and other authors who decide to use it. You
can use it too, but we suggest you first think carefully about whether
this license or the ordinary General Public License is the better
strategy to use in any particular case, based on the explanations below.
When we speak of free software, we are referring to freedom of use,
not price. Our General Public Licenses are designed to make sure that
you have the freedom to distribute copies of free software (and charge
for this service if you wish); that you receive source code or can get
it if you want it; that you can change the software and use pieces of
it in new free programs; and that you are informed that you can do
these things.
To protect your rights, we need to make restrictions that forbid
distributors to deny you these rights or to ask you to surrender these
rights. These restrictions translate to certain responsibilities for
you if you distribute copies of the library or if you modify it.
For example, if you distribute copies of the library, whether gratis
or for a fee, you must give the recipients all the rights that we gave
you. You must make sure that they, too, receive or can get the source
code. If you link other code with the library, you must provide
complete object files to the recipients, so that they can relink them
with the library after making changes to the library and recompiling
it. And you must show them these terms so they know their rights.
We protect your rights with a two-step method: (1) we copyright the
library, and (2) we offer you this license, which gives you legal
permission to copy, distribute and/or modify the library.
To protect each distributor, we want to make it very clear that
there is no warranty for the free library. Also, if the library is
modified by someone else and passed on, the recipients should know
that what they have is not the original version, so that the original
author's reputation will not be affected by problems that might be
introduced by others.
Finally, software patents pose a constant threat to the existence of
any free program. We wish to make sure that a company cannot
effectively restrict the users of a free program by obtaining a
restrictive license from a patent holder. Therefore, we insist that
any patent license obtained for a version of the library must be
consistent with the full freedom of use specified in this license.
Most GNU software, including some libraries, is covered by the
ordinary GNU General Public License. This license, the GNU Lesser
General Public License, applies to certain designated libraries, and
is quite different from the ordinary General Public License. We use
this license for certain libraries in order to permit linking those
libraries into non-free programs.
When a program is linked with a library, whether statically or using
a shared library, the combination of the two is legally speaking a
combined work, a derivative of the original library. The ordinary
General Public License therefore permits such linking only if the
entire combination fits its criteria of freedom. The Lesser General
Public License permits more lax criteria for linking other code with
the library.
We call this license the "Lesser" General Public License because it
does Less to protect the user's freedom than the ordinary General
Public License. It also provides other free software developers Less
of an advantage over competing non-free programs. These disadvantages
are the reason we use the ordinary General Public License for many
libraries. However, the Lesser license provides advantages in certain
special circumstances.
For example, on rare occasions, there may be a special need to
encourage the widest possible use of a certain library, so that it becomes
a de-facto standard. To achieve this, non-free programs must be
allowed to use the library. A more frequent case is that a free
library does the same job as widely used non-free libraries. In this
case, there is little to gain by limiting the free library to free
software only, so we use the Lesser General Public License.
In other cases, permission to use a particular library in non-free
programs enables a greater number of people to use a large body of
free software. For example, permission to use the GNU C Library in
non-free programs enables many more people to use the whole GNU
operating system, as well as its variant, the GNU/Linux operating
system.
Although the Lesser General Public License is Less protective of the
users' freedom, it does ensure that the user of a program that is
linked with the Library has the freedom and the wherewithal to run
that program using a modified version of the Library.
The precise terms and conditions for copying, distribution and
modification follow. Pay close attention to the difference between a
"work based on the library" and a "work that uses the library". The
former contains code derived from the library, whereas the latter must
be combined with the library in order to run.
GNU LESSER GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License Agreement applies to any software library or other
program which contains a notice placed by the copyright holder or
other authorized party saying it may be distributed under the terms of
this Lesser General Public License (also called "this License").
Each licensee is addressed as "you".
A "library" means a collection of software functions and/or data
prepared so as to be conveniently linked with application programs
(which use some of those functions and data) to form executables.
The "Library", below, refers to any such software library or work
which has been distributed under these terms. A "work based on the
Library" means either the Library or any derivative work under
copyright law: that is to say, a work containing the Library or a
portion of it, either verbatim or with modifications and/or translated
straightforwardly into another language. (Hereinafter, translation is
included without limitation in the term "modification".)
"Source code" for a work means the preferred form of the work for
making modifications to it. For a library, complete source code means
all the source code for all modules it contains, plus any associated
interface definition files, plus the scripts used to control compilation
and installation of the library.
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running a program using the Library is not restricted, and output from
such a program is covered only if its contents constitute a work based
on the Library (independent of the use of the Library in a tool for
writing it). Whether that is true depends on what the Library does
and what the program that uses the Library does.
1. You may copy and distribute verbatim copies of the Library's
complete source code as you receive it, in any medium, provided that
you conspicuously and appropriately publish on each copy an
appropriate copyright notice and disclaimer of warranty; keep intact
all the notices that refer to this License and to the absence of any
warranty; and distribute a copy of this License along with the
Library.
You may charge a fee for the physical act of transferring a copy,
and you may at your option offer warranty protection in exchange for a
fee.
2. You may modify your copy or copies of the Library or any portion
of it, thus forming a work based on the Library, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) The modified work must itself be a software library.
b) You must cause the files modified to carry prominent notices
stating that you changed the files and the date of any change.
c) You must cause the whole of the work to be licensed at no
charge to all third parties under the terms of this License.
d) If a facility in the modified Library refers to a function or a
table of data to be supplied by an application program that uses
the facility, other than as an argument passed when the facility
is invoked, then you must make a good faith effort to ensure that,
in the event an application does not supply such function or
table, the facility still operates, and performs whatever part of
its purpose remains meaningful.
(For example, a function in a library to compute square roots has
a purpose that is entirely well-defined independent of the
application. Therefore, Subsection 2d requires that any
application-supplied function or table used by this function must
be optional: if the application does not supply it, the square
root function must still compute square roots.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Library,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Library, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote
it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Library.
In addition, mere aggregation of another work not based on the Library
with the Library (or with a work based on the Library) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may opt to apply the terms of the ordinary GNU General Public
License instead of this License to a given copy of the Library. To do
this, you must alter all the notices that refer to this License, so
that they refer to the ordinary GNU General Public License, version 2,
instead of to this License. (If a newer version than version 2 of the
ordinary GNU General Public License has appeared, then you can specify
that version instead if you wish.) Do not make any other change in
these notices.
Once this change is made in a given copy, it is irreversible for
that copy, so the ordinary GNU General Public License applies to all
subsequent copies and derivative works made from that copy.
This option is useful when you wish to copy part of the code of
the Library into a program that is not a library.
4. You may copy and distribute the Library (or a portion or
derivative of it, under Section 2) in object code or executable form
under the terms of Sections 1 and 2 above provided that you accompany
it with the complete corresponding machine-readable source code, which
must be distributed under the terms of Sections 1 and 2 above on a
medium customarily used for software interchange.
If distribution of object code is made by offering access to copy
from a designated place, then offering equivalent access to copy the
source code from the same place satisfies the requirement to
distribute the source code, even though third parties are not
compelled to copy the source along with the object code.
5. A program that contains no derivative of any portion of the
Library, but is designed to work with the Library by being compiled or
linked with it, is called a "work that uses the Library". Such a
work, in isolation, is not a derivative work of the Library, and
therefore falls outside the scope of this License.
However, linking a "work that uses the Library" with the Library
creates an executable that is a derivative of the Library (because it
contains portions of the Library), rather than a "work that uses the
library". The executable is therefore covered by this License.
Section 6 states terms for distribution of such executables.
When a "work that uses the Library" uses material from a header file
that is part of the Library, the object code for the work may be a
derivative work of the Library even though the source code is not.
Whether this is true is especially significant if the work can be
linked without the Library, or if the work is itself a library. The
threshold for this to be true is not precisely defined by law.
If such an object file uses only numerical parameters, data
structure layouts and accessors, and small macros and small inline
functions (ten lines or less in length), then the use of the object
file is unrestricted, regardless of whether it is legally a derivative
work. (Executables containing this object code plus portions of the
Library will still fall under Section 6.)
Otherwise, if the work is a derivative of the Library, you may
distribute the object code for the work under the terms of Section 6.
Any executables containing that work also fall under Section 6,
whether or not they are linked directly with the Library itself.
6. As an exception to the Sections above, you may also combine or
link a "work that uses the Library" with the Library to produce a
work containing portions of the Library, and distribute that work
under terms of your choice, provided that the terms permit
modification of the work for the customer's own use and reverse
engineering for debugging such modifications.
You must give prominent notice with each copy of the work that the
Library is used in it and that the Library and its use are covered by
this License. You must supply a copy of this License. If the work
during execution displays copyright notices, you must include the
copyright notice for the Library among them, as well as a reference
directing the user to the copy of this License. Also, you must do one
of these things:
a) Accompany the work with the complete corresponding
machine-readable source code for the Library including whatever
changes were used in the work (which must be distributed under
Sections 1 and 2 above); and, if the work is an executable linked
with the Library, with the complete machine-readable "work that
uses the Library", as object code and/or source code, so that the
user can modify the Library and then relink to produce a modified
executable containing the modified Library. (It is understood
that the user who changes the contents of definitions files in the
Library will not necessarily be able to recompile the application
to use the modified definitions.)
b) Use a suitable shared library mechanism for linking with the
Library. A suitable mechanism is one that (1) uses at run time a
copy of the library already present on the user's computer system,
rather than copying library functions into the executable, and (2)
will operate properly with a modified version of the library, if
the user installs one, as long as the modified version is
interface-compatible with the version that the work was made with.
c) Accompany the work with a written offer, valid for at
least three years, to give the same user the materials
specified in Subsection 6a, above, for a charge no more
than the cost of performing this distribution.
d) If distribution of the work is made by offering access to copy
from a designated place, offer equivalent access to copy the above
specified materials from the same place.
e) Verify that the user has already received a copy of these
materials or that you have already sent this user a copy.
For an executable, the required form of the "work that uses the
Library" must include any data and utility programs needed for
reproducing the executable from it. However, as a special exception,
the materials to be distributed need not include anything that is
normally distributed (in either source or binary form) with the major
components (compiler, kernel, and so on) of the operating system on
which the executable runs, unless that component itself accompanies
the executable.
It may happen that this requirement contradicts the license
restrictions of other proprietary libraries that do not normally
accompany the operating system. Such a contradiction means you cannot
use both them and the Library together in an executable that you
distribute.
7. You may place library facilities that are a work based on the
Library side-by-side in a single library together with other library
facilities not covered by this License, and distribute such a combined
library, provided that the separate distribution of the work based on
the Library and of the other library facilities is otherwise
permitted, and provided that you do these two things:
a) Accompany the combined library with a copy of the same work
based on the Library, uncombined with any other library
facilities. This must be distributed under the terms of the
Sections above.
b) Give prominent notice with the combined library of the fact
that part of it is a work based on the Library, and explaining
where to find the accompanying uncombined form of the same work.
8. You may not copy, modify, sublicense, link with, or distribute
the Library except as expressly provided under this License. Any
attempt otherwise to copy, modify, sublicense, link with, or
distribute the Library is void, and will automatically terminate your
rights under this License. However, parties who have received copies,
or rights, from you under this License will not have their licenses
terminated so long as such parties remain in full compliance.
9. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Library or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Library (or any work based on the
Library), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Library or works based on it.
10. Each time you redistribute the Library (or any work based on the
Library), the recipient automatically receives a license from the
original licensor to copy, distribute, link with or modify the Library
subject to these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties with
this License.
11. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Library at all. For example, if a patent
license would not permit royalty-free redistribution of the Library by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Library.
If any portion of this section is held invalid or unenforceable under any
particular circumstance, the balance of the section is intended to apply,
and the section as a whole is intended to apply in other circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
12. If the distribution and/or use of the Library is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Library under this License may add
an explicit geographical distribution limitation excluding those countries,
so that distribution is permitted only in or among countries not thus
excluded. In such case, this License incorporates the limitation as if
written in the body of this License.
13. The Free Software Foundation may publish revised and/or new
versions of the Lesser General Public License from time to time.
Such new versions will be similar in spirit to the present version,
but may differ in detail to address new problems or concerns.
Each version is given a distinguishing version number. If the Library
specifies a version number of this License which applies to it and
"any later version", you have the option of following the terms and
conditions either of that version or of any later version published by
the Free Software Foundation. If the Library does not specify a
license version number, you may choose any version ever published by
the Free Software Foundation.
14. If you wish to incorporate parts of the Library into other free
programs whose distribution conditions are incompatible with these,
write to the author to ask for permission. For software which is
copyrighted by the Free Software Foundation, write to the Free
Software Foundation; we sometimes make exceptions for this. Our
decision will be guided by the two goals of preserving the free status
of all derivatives of our free software and of promoting the sharing
and reuse of software generally.
NO WARRANTY
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Libraries
If you develop a new library, and you want it to be of the greatest
possible use to the public, we recommend making it free software that
everyone can redistribute and change. You can do so by permitting
redistribution under these terms (or, alternatively, under the terms of the
ordinary General Public License).
To apply these terms, attach the following notices to the library. It is
safest to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least the
"copyright" line and a pointer to where the full notice is found.
<one line to give the library's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Also add information on how to contact you by electronic and paper mail.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the library, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the
library `Frob' (a library for tweaking knobs) written by James Random Hacker.
<signature of Ty Coon>, 1 April 1990
Ty Coon, President of Vice
That's all there is to it!

15250
ChangeLog

File diff suppressed because it is too large Load Diff

1234
Doxyfile.in Normal file

File diff suppressed because it is too large Load Diff

554
INSTALL Normal file
View File

@@ -0,0 +1,554 @@
XZ Utils Installation
=====================
0. Preface
1. Supported platforms
1.1. Compilers
1.2. Platform-specific notes
1.2.1. AIX
1.2.2. IRIX
1.2.3. MINIX 3
1.2.4. OpenVMS
1.2.5. Solaris, OpenSolaris, and derivatives
1.2.6. Tru64
1.2.7. Windows
1.2.8. DOS
1.3. Adding support for new platforms
2. configure options
2.1. Static vs. dynamic linking of liblzma
2.2. Optimizing xzdec and lzmadec
3. xzgrep and other scripts
3.1. Dependencies
3.2. PATH
4. Troubleshooting
4.1. "No C99 compiler was found."
4.2. "No POSIX conforming shell (sh) was found."
4.3. configure works but build fails at crc32_x86.S
4.4. Lots of warnings about symbol visibility
4.5. "make check" fails
4.6. liblzma.so (or similar) not found when running xz
0. Preface
----------
If you aren't familiar with building packages that use GNU Autotools,
see the file INSTALL.generic for generic instructions before reading
further.
If you are going to build a package for distribution, see also the
file PACKAGERS. It contains information that should help making the
binary packages as good as possible, but the information isn't very
interesting to those making local builds for private use or for use
in special situations like embedded systems.
1. Supported platforms
----------------------
XZ Utils are developed on GNU/Linux, but they should work on many
POSIX-like operating systems like *BSDs and Solaris, and even on
a few non-POSIX operating systems.
1.1. Compilers
A C99 compiler is required to compile XZ Utils. If you use GCC, you
need at least version 3.x.x. GCC version 2.xx.x doesn't support some
C99 features used in XZ Utils source code, thus GCC 2 won't compile
XZ Utils.
XZ Utils takes advantage of some GNU C extensions when building
with GCC. Because these extensions are used only when building
with GCC, it should be possible to use any C99 compiler.
1.2. Platform-specific notes
1.2.1. AIX
If you use IBM XL C compiler, pass CC=xlc_r to configure. If
you use CC=xlc instead, you must disable threading support
with --disable-threads (usually not recommended).
1.2.2. IRIX
MIPSpro 7.4.4m has been reported to produce broken code if using
the -O2 optimization flag ("make check" fails). Using -O1 should
work.
A problem has been reported when using shared liblzma. Passing
--disable-shared to configure works around this. Alternatively,
putting "-64" to CFLAGS to build a 64-bit version might help too.
1.2.3. MINIX 3
The default install of MINIX 3 includes Amsterdam Compiler Kit (ACK),
which doesn't support C99. Install GCC to compile XZ Utils.
MINIX 3.1.8 and older have bugs in /usr/include/stdint.h, which has
to be patched before XZ Utils can be compiled correctly. See
<http://gforge.cs.vu.nl/gf/project/minix/tracker/?action=TrackerItemEdit&tracker_item_id=537>.
MINIX 3.2.0 and later use a different libc and aren't affected by
the above bug.
XZ Utils doesn't have code to detect the amount of physical RAM and
number of CPU cores on MINIX 3.
See section 4.4 in this file about symbol visibility warnings (you
may want to pass gl_cv_cc_visibility=no to configure).
1.2.4. OpenVMS
XZ Utils can be built for OpenVMS, but the build system files
are not included in the XZ Utils source package. The required
OpenVMS-specific files are maintained by Jouk Jansen and can be
downloaded here:
http://nchrem.tnw.tudelft.nl/openvms/software2.html#xzutils
1.2.5. Solaris, OpenSolaris, and derivatives
The following linker error has been reported on some x86 systems:
ld: fatal: relocation error: R_386_GOTOFF: ...
This can be worked around by passing gl_cv_cc_visibility=no
as an argument to the configure script.
test_scripts.sh in "make check" may fail if good enough tools are
missing from PATH (/usr/xpg4/bin or /usr/xpg6/bin). See sections
4.5 and 3.2 for more information.
1.2.6. Tru64
If you try to use the native C compiler on Tru64 (passing CC=cc to
configure), you may need the workaround mention in section 4.1 in
this file (pass also ac_cv_prog_cc_c99= to configure).
1.2.7. Windows
Building XZ Utils on Windows is supported under the following
environments:
- MinGW-w64 + MSYS (32-bit and 64-bit x86): This is used
for building the official binary packages for Windows.
There is windows/build.bash to ease packaging XZ Utils with
MinGW(-w64) + MSYS into a redistributable .zip or .7z file.
See windows/INSTALL-MinGW.txt for more information.
- MinGW + MSYS (32-bit x86): I haven't recently tested this.
- Cygwin 1.7.35 and later: NOTE that using XZ Utils >= 5.2.0
under Cygwin older than 1.7.35 can lead to DATA LOSS! If
you must use an old Cygwin version, stick to XZ Utils 5.0.x
which is safe under older Cygwin versions. You can check
the Cygwin version with the command "cygcheck -V".
- Microsoft Visual Studio 2013 update 2 or later (MSVC for short):
See windows/INSTALL-MSVC.txt for more information.
It may be possible to build liblzma with other toolchains too, but
that will probably require writing a separate makefile. Building
the command line tools with non-GNU toolchains will be harder than
building only liblzma.
Even if liblzma is built with MinGW(-w64), the resulting DLL can
be used by other compilers and linkers, including MSVC. See
windows/README-Windows.txt for details.
1.2.8. DOS
There is an experimental Makefile in the "dos" directory to build
XZ Utils on DOS using DJGPP. Support for long file names (LFN) is
needed. See dos/README for more information.
GNU Autotools based build hasn't been tried on DOS. If you try, I
would like to hear if it worked.
1.3. Adding support for new platforms
If you have written patches to make XZ Utils to work on previously
unsupported platform, please send the patches to me! I will consider
including them to the official version. It's nice to minimize the
need of third-party patching.
One exception: Don't request or send patches to change the whole
source package to C89. I find C99 substantially nicer to write and
maintain. However, the public library headers must be in C89 to
avoid frustrating those who maintain programs, which are strictly
in C89 or C++.
2. configure options
--------------------
In most cases, the defaults are what you want. Many of the options
below are useful only when building a size-optimized version of
liblzma or command line tools.
--enable-encoders=LIST
--disable-encoders
Specify a comma-separated LIST of filter encoders to
build. See "./configure --help" for exact list of
available filter encoders. The default is to build all
supported encoders.
If LIST is empty or --disable-encoders is used, no filter
encoders will be built and also the code shared between
encoders will be omitted.
Disabling encoders will remove some symbols from the
liblzma ABI, so this option should be used only when it
is known to not cause problems.
--enable-decoders=LIST
--disable-decoders
This is like --enable-encoders but for decoders. The
default is to build all supported decoders.
--enable-match-finders=LIST
liblzma includes two categories of match finders:
hash chains and binary trees. Hash chains (hc3 and hc4)
are quite fast but they don't provide the best compression
ratio. Binary trees (bt2, bt3 and bt4) give excellent
compression ratio, but they are slower and need more
memory than hash chains.
You need to enable at least one match finder to build the
LZMA1 or LZMA2 filter encoders. Usually hash chains are
used only in the fast mode, while binary trees are used to
when the best compression ratio is wanted.
The default is to build all the match finders if LZMA1
or LZMA2 filter encoders are being built.
--enable-checks=LIST
liblzma support multiple integrity checks. CRC32 is
mandatory, and cannot be omitted. See "./configure --help"
for exact list of available integrity check types.
liblzma and the command line tools can decompress files
which use unsupported integrity check type, but naturally
the file integrity cannot be verified in that case.
Disabling integrity checks may remove some symbols from
the liblzma ABI, so this option should be used only when
it is known to not cause problems.
--disable-xz
--disable-xzdec
--disable-lzmadec
--disable-lzmainfo
Don't build and install the command line tool mentioned
in the option name.
NOTE: Disabling xz will skip some tests in "make check".
NOTE: If xzdec is disabled and lzmadec is left enabled,
a dangling man page symlink lzmadec.1 -> xzdec.1 is
created.
--disable-lzma-links
Don't create symlinks for LZMA Utils compatibility.
This includes lzma, unlzma, and lzcat. If scripts are
installed, also lzdiff, lzcmp, lzgrep, lzegrep, lzfgrep,
lzmore, and lzless will be omitted if this option is used.
--disable-scripts
Don't install the scripts xzdiff, xzgrep, xzmore, xzless,
and their symlinks.
--disable-doc
Don't install the documentation files to $docdir
(often /usr/doc/xz or /usr/local/doc/xz). Man pages
will still be installed. The $docdir can be changed
with --docdir=DIR.
--disable-assembler
liblzma includes some assembler optimizations. Currently
there is only assembler code for CRC32 and CRC64 for
32-bit x86.
All the assembler code in liblzma is position-independent
code, which is suitable for use in shared libraries and
position-independent executables. So far only i386
instructions are used, but the code is optimized for i686
class CPUs. If you are compiling liblzma exclusively for
pre-i686 systems, you may want to disable the assembler
code.
--enable-unaligned-access
Allow liblzma to use unaligned memory access for 16-bit
and 32-bit loads and stores. This should be enabled only
when the hardware supports this, i.e. when unaligned
access is fast. Some operating system kernels emulate
unaligned access, which is extremely slow. This option
shouldn't be used on systems that rely on such emulation.
Unaligned access is enabled by default on x86, x86-64,
and big endian PowerPC.
--enable-small
Reduce the size of liblzma by selecting smaller but
semantically equivalent version of some functions, and
omit precomputed lookup tables. This option tends to
make liblzma slightly slower.
Note that while omitting the precomputed tables makes
liblzma smaller on disk, the tables are still needed at
run time, and need to be computed at startup. This also
means that the RAM holding the tables won't be shared
between applications linked against shared liblzma.
This option doesn't modify CFLAGS to tell the compiler
to optimize for size. You need to add -Os or equivalent
flag(s) to CFLAGS manually.
--enable-assume-ram=SIZE
On the most common operating systems, XZ Utils is able to
detect the amount of physical memory on the system. This
information is used by the options --memlimit-compress,
--memlimit-decompress, and --memlimit when setting the
limit to a percentage of total RAM.
On some systems, there is no code to detect the amount of
RAM though. Using --enable-assume-ram one can set how much
memory to assume on these systems. SIZE is given as MiB.
The default is 128 MiB.
Feel free to send patches to add support for detecting
the amount of RAM on the operating system you use. See
src/common/tuklib_physmem.c for details.
--enable-threads=METHOD
Threading support is enabled by default so normally there
is no need to specify this option.
Supported values for METHOD:
yes Autodetect the threading method. If none
is found, configure will give an error.
posix Use POSIX pthreads. This is the default
except on Windows outside Cygwin.
win95 Use Windows 95 compatible threads. This
is compatible with Windows XP and later
too. This is the default for 32-bit x86
Windows builds. The `win95' threading is
incompatible with --enable-small.
vista Use Windows Vista compatible threads. The
resulting binaries won't run on Windows XP
or older. This is the default for Windows
excluding 32-bit x86 builds (that is, on
x86-64 the default is `vista').
no Disable threading support. This is the
same as using --disable-threads.
NOTE: If combined with --enable-small, the
resulting liblzma won't be thread safe,
that is, if a multi-threaded application
calls any liblzma functions from more than
one thread, something bad may happen.
--enable-symbol-versions
Use symbol versioning for liblzma. This is enabled by
default on GNU/Linux, other GNU-based systems, and
FreeBSD.
--enable-debug
This enables the assert() macro and possibly some other
run-time consistency checks. It makes the code slower, so
you normally don't want to have this enabled.
--enable-werror
If building with GCC, make all compiler warnings an error,
that abort the compilation. This may help catching bugs,
and should work on most systems. This has no effect on the
resulting binaries.
2.1. Static vs. dynamic linking of liblzma
On 32-bit x86, linking against static liblzma can give a minor
speed improvement. Static libraries on x86 are usually compiled as
position-dependent code (non-PIC) and shared libraries are built as
position-independent code (PIC). PIC wastes one register, which can
make the code slightly slower compared to a non-PIC version. (Note
that this doesn't apply to x86-64.)
If you want to link xz against static liblzma, the simplest way
is to pass --disable-shared to configure. If you want also shared
liblzma, run configure again and run "make install" only for
src/liblzma.
2.2. Optimizing xzdec and lzmadec
xzdec and lzmadec are intended to be relatively small instead of
optimizing for the best speed. Thus, it is a good idea to build
xzdec and lzmadec separately:
- To link the tools against static liblzma, pass --disable-shared
to configure.
- To select somewhat size-optimized variant of some things in
liblzma, pass --enable-small to configure.
- Tell the compiler to optimize for size instead of speed.
E.g. with GCC, put -Os into CFLAGS.
- xzdec and lzmadec will never use multithreading capabilities of
liblzma. You can avoid dependency on libpthread by passing
--disable-threads to configure.
- There are and will be no translated messages for xzdec and
lzmadec, so it is fine to pass also --disable-nls to configure.
- Only decoder code is needed, so you can speed up the build
slightly by passing --disable-encoders to configure. This
shouldn't affect the final size of the executables though,
because the linker is able to omit the encoder code anyway.
If you have no use for xzdec or lzmadec, you can disable them with
--disable-xzdec and --disable-lzmadec.
3. xzgrep and other scripts
---------------------------
3.1. Dependencies
POSIX shell (sh) and bunch of other standard POSIX tools are required
to run the scripts. The configure script tries to find a POSIX
compliant sh, but if it fails, you can force the shell by passing
gl_cv_posix_shell=/path/to/posix-sh as an argument to the configure
script.
xzdiff (xzcmp/lzdiff/lzcmp) may use mktemp if it is available. As
a fallback xzdiff will use mkdir to securely create a temporary
directory. Having mktemp available is still recommended since the
mkdir fallback method isn't as robust as mktemp is. The original
mktemp can be found from <http://www.mktemp.org/>. On GNU, most will
use the mktemp program from GNU coreutils instead of the original
implementation. Both mktemp versions are fine.
In addition to using xz to decompress .xz files, xzgrep and xzdiff
use gzip, bzip2, and lzop to support .gz, bz2, and .lzo files.
3.2. PATH
The scripts assume that the required tools (standard POSIX utilities,
mktemp, and xz) are in PATH; the scripts don't set the PATH themselves.
Some people like this while some think this is a bug. Those in the
latter group can easily patch the scripts before running the configure
script by taking advantage of a placeholder line in the scripts.
For example, to make the scripts prefix /usr/bin:/bin to PATH:
perl -pi -e 's|^#SET_PATH.*$|PATH=/usr/bin:/bin:\$PATH|' \
src/scripts/xz*.in
4. Troubleshooting
------------------
4.1. "No C99 compiler was found."
You need a C99 compiler to build XZ Utils. If the configure script
cannot find a C99 compiler and you think you have such a compiler
installed, set the compiler command by passing CC=/path/to/c99 as
an argument to the configure script.
If you get this error even when you think your compiler supports C99,
you can override the test by passing ac_cv_prog_cc_c99= as an argument
to the configure script. The test for C99 compiler is not perfect (and
it is not as easy to make it perfect as it sounds), so sometimes this
may be needed. You will get a compile error if your compiler doesn't
support enough C99.
4.2. "No POSIX conforming shell (sh) was found."
xzgrep and other scripts need a shell that (roughly) conforms
to POSIX. The configure script tries to find such a shell. If
it fails, you can force the shell to be used by passing
gl_cv_posix_shell=/path/to/posix-sh as an argument to the configure
script. Alternatively you can omit the installation of scripts and
this error by passing --disable-scripts to configure.
4.3. configure works but build fails at crc32_x86.S
The easy fix is to pass --disable-assembler to the configure script.
The configure script determines if assembler code can be used by
looking at the configure triplet; there is currently no check if
the assembler code can actually actually be built. The x86 assembler
code should work on x86 GNU/Linux, *BSDs, Solaris, Darwin, MinGW,
Cygwin, and DJGPP. On other x86 systems, there may be problems and
the assembler code may need to be disabled with the configure option.
If you get this error when building for x86-64, you have specified or
the configure script has misguessed your architecture. Pass the
correct configure triplet using the --build=CPU-COMPANY-SYSTEM option
(see INSTALL.generic).
4.4. Lots of warnings about symbol visibility
On some systems where symbol visibility isn't supported, GCC may
still accept the visibility options and attributes, which will make
configure think that visibility is supported. This will result in
many compiler warnings. You can avoid the warnings by forcing the
visibility support off by passing gl_cv_cc_visibility=no as an
argument to the configure script. This has no effect on the
resulting binaries, but fewer warnings looks nicer and may allow
using --enable-werror.
4.5. "make check" fails
If the other tests pass but test_scripts.sh fails, then the problem
is in the scripts in src/scripts. Comparing the contents of
tests/xzgrep_test_output to tests/xzgrep_expected_output might
give a good idea about problems in xzgrep. One possibility is that
some tools are missing from the current PATH or the tools lack
support for some POSIX features. This can happen at least on
Solaris where the tools in /bin may be ancient but good enough
tools are available in /usr/xpg4/bin or /usr/xpg6/bin. One fix
for this problem is described in section 3.2 of this file.
If tests other than test_scripts.sh fail, a likely reason is that
libtool links the test programs against an installed version of
liblzma instead of the version that was just built. This is
obviously a bug which seems to happen on some platforms.
A workaround is to uninstall the old liblzma versions first.
If the problem isn't any of those described above, then it's likely
a bug in XZ Utils or in the compiler. See the platform-specific
notes in this file for possible known problems. Please report
a bug if you cannot solve the problem. See README for contact
information.
4.6. liblzma.so (or similar) not found when running xz
If you installed the package with "make install" and get an error
about liblzma.so (or a similarly named file) being missing, try
running "ldconfig" to update the run-time linker cache (if your
operating system has such a command).

365
INSTALL.generic Normal file
View File

@@ -0,0 +1,365 @@
Installation Instructions
*************************
Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005,
2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
Copying and distribution of this file, with or without modification,
are permitted in any medium without royalty provided the copyright
notice and this notice are preserved. This file is offered as-is,
without warranty of any kind.
Basic Installation
==================
Briefly, the shell commands `./configure; make; make install' should
configure, build, and install this package. The following
more-detailed instructions are generic; see the `README' file for
instructions specific to this package. Some packages provide this
`INSTALL' file but do not implement all of the features documented
below. The lack of an optional feature in a given package is not
necessarily a bug. More recommendations for GNU packages can be found
in *note Makefile Conventions: (standards)Makefile Conventions.
The `configure' shell script attempts to guess correct values for
various system-dependent variables used during compilation. It uses
those values to create a `Makefile' in each directory of the package.
It may also create one or more `.h' files containing system-dependent
definitions. Finally, it creates a shell script `config.status' that
you can run in the future to recreate the current configuration, and a
file `config.log' containing compiler output (useful mainly for
debugging `configure').
It can also use an optional file (typically called `config.cache'
and enabled with `--cache-file=config.cache' or simply `-C') that saves
the results of its tests to speed up reconfiguring. Caching is
disabled by default to prevent problems with accidental use of stale
cache files.
If you need to do unusual things to compile the package, please try
to figure out how `configure' could check whether to do them, and mail
diffs or instructions to the address given in the `README' so they can
be considered for the next release. If you are using the cache, and at
some point `config.cache' contains results you don't want to keep, you
may remove or edit it.
The file `configure.ac' (or `configure.in') is used to create
`configure' by a program called `autoconf'. You need `configure.ac' if
you want to change it or regenerate `configure' using a newer version
of `autoconf'.
The simplest way to compile this package is:
1. `cd' to the directory containing the package's source code and type
`./configure' to configure the package for your system.
Running `configure' might take a while. While running, it prints
some messages telling which features it is checking for.
2. Type `make' to compile the package.
3. Optionally, type `make check' to run any self-tests that come with
the package, generally using the just-built uninstalled binaries.
4. Type `make install' to install the programs and any data files and
documentation. When installing into a prefix owned by root, it is
recommended that the package be configured and built as a regular
user, and only the `make install' phase executed with root
privileges.
5. Optionally, type `make installcheck' to repeat any self-tests, but
this time using the binaries in their final installed location.
This target does not install anything. Running this target as a
regular user, particularly if the prior `make install' required
root privileges, verifies that the installation completed
correctly.
6. You can remove the program binaries and object files from the
source code directory by typing `make clean'. To also remove the
files that `configure' created (so you can compile the package for
a different kind of computer), type `make distclean'. There is
also a `make maintainer-clean' target, but that is intended mainly
for the package's developers. If you use it, you may have to get
all sorts of other programs in order to regenerate files that came
with the distribution.
7. Often, you can also type `make uninstall' to remove the installed
files again. In practice, not all packages have tested that
uninstallation works correctly, even though it is required by the
GNU Coding Standards.
8. Some packages, particularly those that use Automake, provide `make
distcheck', which can by used by developers to test that all other
targets like `make install' and `make uninstall' work correctly.
This target is generally not run by end users.
Compilers and Options
=====================
Some systems require unusual options for compilation or linking that
the `configure' script does not know about. Run `./configure --help'
for details on some of the pertinent environment variables.
You can give `configure' initial values for configuration parameters
by setting variables in the command line or in the environment. Here
is an example:
./configure CC=c99 CFLAGS=-g LIBS=-lposix
*Note Defining Variables::, for more details.
Compiling For Multiple Architectures
====================================
You can compile the package for more than one kind of computer at the
same time, by placing the object files for each architecture in their
own directory. To do this, you can use GNU `make'. `cd' to the
directory where you want the object files and executables to go and run
the `configure' script. `configure' automatically checks for the
source code in the directory that `configure' is in and in `..'. This
is known as a "VPATH" build.
With a non-GNU `make', it is safer to compile the package for one
architecture at a time in the source code directory. After you have
installed the package for one architecture, use `make distclean' before
reconfiguring for another architecture.
On MacOS X 10.5 and later systems, you can create libraries and
executables that work on multiple system types--known as "fat" or
"universal" binaries--by specifying multiple `-arch' options to the
compiler but only a single `-arch' option to the preprocessor. Like
this:
./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
CPP="gcc -E" CXXCPP="g++ -E"
This is not guaranteed to produce working output in all cases, you
may have to build one architecture at a time and combine the results
using the `lipo' tool if you have problems.
Installation Names
==================
By default, `make install' installs the package's commands under
`/usr/local/bin', include files under `/usr/local/include', etc. You
can specify an installation prefix other than `/usr/local' by giving
`configure' the option `--prefix=PREFIX', where PREFIX must be an
absolute file name.
You can specify separate installation prefixes for
architecture-specific files and architecture-independent files. If you
pass the option `--exec-prefix=PREFIX' to `configure', the package uses
PREFIX as the prefix for installing programs and libraries.
Documentation and other data files still use the regular prefix.
In addition, if you use an unusual directory layout you can give
options like `--bindir=DIR' to specify different values for particular
kinds of files. Run `configure --help' for a list of the directories
you can set and what kinds of files go in them. In general, the
default for these options is expressed in terms of `${prefix}', so that
specifying just `--prefix' will affect all of the other directory
specifications that were not explicitly provided.
The most portable way to affect installation locations is to pass the
correct locations to `configure'; however, many packages provide one or
both of the following shortcuts of passing variable assignments to the
`make install' command line to change installation locations without
having to reconfigure or recompile.
The first method involves providing an override variable for each
affected directory. For example, `make install
prefix=/alternate/directory' will choose an alternate location for all
directory configuration variables that were expressed in terms of
`${prefix}'. Any directories that were specified during `configure',
but not in terms of `${prefix}', must each be overridden at install
time for the entire installation to be relocated. The approach of
makefile variable overrides for each directory variable is required by
the GNU Coding Standards, and ideally causes no recompilation.
However, some platforms have known limitations with the semantics of
shared libraries that end up requiring recompilation when using this
method, particularly noticeable in packages that use GNU Libtool.
The second method involves providing the `DESTDIR' variable. For
example, `make install DESTDIR=/alternate/directory' will prepend
`/alternate/directory' before all installation names. The approach of
`DESTDIR' overrides is not required by the GNU Coding Standards, and
does not work on platforms that have drive letters. On the other hand,
it does better at avoiding recompilation issues, and works well even
when some directory options were not specified in terms of `${prefix}'
at `configure' time.
Optional Features
=================
If the package supports it, you can cause programs to be installed
with an extra prefix or suffix on their names by giving `configure' the
option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
Some packages pay attention to `--enable-FEATURE' options to
`configure', where FEATURE indicates an optional part of the package.
They may also pay attention to `--with-PACKAGE' options, where PACKAGE
is something like `gnu-as' or `x' (for the X Window System). The
`README' should mention any `--enable-' and `--with-' options that the
package recognizes.
For packages that use the X Window System, `configure' can usually
find the X include and library files automatically, but if it doesn't,
you can use the `configure' options `--x-includes=DIR' and
`--x-libraries=DIR' to specify their locations.
Some packages offer the ability to configure how verbose the
execution of `make' will be. For these packages, running `./configure
--enable-silent-rules' sets the default to minimal output, which can be
overridden with `make V=1'; while running `./configure
--disable-silent-rules' sets the default to verbose, which can be
overridden with `make V=0'.
Particular systems
==================
On HP-UX, the default C compiler is not ANSI C compatible. If GNU
CC is not installed, it is recommended to use the following options in
order to use an ANSI C compiler:
./configure CC="cc -Ae -D_XOPEN_SOURCE=500"
and if that doesn't work, install pre-built binaries of GCC for HP-UX.
On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
parse its `<wchar.h>' header file. The option `-nodtk' can be used as
a workaround. If GNU CC is not installed, it is therefore recommended
to try
./configure CC="cc"
and if that doesn't work, try
./configure CC="cc -nodtk"
On Solaris, don't put `/usr/ucb' early in your `PATH'. This
directory contains several dysfunctional programs; working variants of
these programs are available in `/usr/bin'. So, if you need `/usr/ucb'
in your `PATH', put it _after_ `/usr/bin'.
On Haiku, software installed for all users goes in `/boot/common',
not `/usr/local'. It is recommended to use the following options:
./configure --prefix=/boot/common
Specifying the System Type
==========================
There may be some features `configure' cannot figure out
automatically, but needs to determine by the type of machine the package
will run on. Usually, assuming the package is built to be run on the
_same_ architectures, `configure' can figure that out, but if it prints
a message saying it cannot guess the machine type, give it the
`--build=TYPE' option. TYPE can either be a short name for the system
type, such as `sun4', or a canonical name which has the form:
CPU-COMPANY-SYSTEM
where SYSTEM can have one of these forms:
OS
KERNEL-OS
See the file `config.sub' for the possible values of each field. If
`config.sub' isn't included in this package, then this package doesn't
need to know the machine type.
If you are _building_ compiler tools for cross-compiling, you should
use the option `--target=TYPE' to select the type of system they will
produce code for.
If you want to _use_ a cross compiler, that generates code for a
platform different from the build platform, you should specify the
"host" platform (i.e., that on which the generated programs will
eventually be run) with `--host=TYPE'.
Sharing Defaults
================
If you want to set default values for `configure' scripts to share,
you can create a site shell script called `config.site' that gives
default values for variables like `CC', `cache_file', and `prefix'.
`configure' looks for `PREFIX/share/config.site' if it exists, then
`PREFIX/etc/config.site' if it exists. Or, you can set the
`CONFIG_SITE' environment variable to the location of the site script.
A warning: not all `configure' scripts look for a site script.
Defining Variables
==================
Variables not defined in a site shell script can be set in the
environment passed to `configure'. However, some packages may run
configure again during the build, and the customized values of these
variables may be lost. In order to avoid this problem, you should set
them in the `configure' command line, using `VAR=value'. For example:
./configure CC=/usr/local2/bin/gcc
causes the specified `gcc' to be used as the C compiler (unless it is
overridden in the site shell script).
Unfortunately, this technique does not work for `CONFIG_SHELL' due to
an Autoconf bug. Until the bug is fixed you can use this workaround:
CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash
`configure' Invocation
======================
`configure' recognizes the following options to control how it
operates.
`--help'
`-h'
Print a summary of all of the options to `configure', and exit.
`--help=short'
`--help=recursive'
Print a summary of the options unique to this package's
`configure', and exit. The `short' variant lists options used
only in the top level, while the `recursive' variant lists options
also present in any nested packages.
`--version'
`-V'
Print the version of Autoconf used to generate the `configure'
script, and exit.
`--cache-file=FILE'
Enable the cache: use and save the results of the tests in FILE,
traditionally `config.cache'. FILE defaults to `/dev/null' to
disable caching.
`--config-cache'
`-C'
Alias for `--cache-file=config.cache'.
`--quiet'
`--silent'
`-q'
Do not print messages saying which checks are being made. To
suppress all normal output, redirect it to `/dev/null' (any error
messages will still be shown).
`--srcdir=DIR'
Look for the package's source code in directory DIR. Usually
`configure' can determine that directory automatically.
`--prefix=DIR'
Use DIR as the installation prefix. *note Installation Names::
for more details, including other options available for fine-tuning
the installation locations.
`--no-create'
`-n'
Run the configure checks, but stop before creating any output
files.
`configure' also accepts some other, not widely useful, options. Run
`configure --help' for more details.

109
Makefile.am Normal file
View File

@@ -0,0 +1,109 @@
##
## Author: Lasse Collin
##
## This file has been put into the public domain.
## You can do whatever you want with this file.
##
# Use -n to prevent gzip from adding a timestamp to the .gz headers.
GZIP_ENV = -9n
DIST_SUBDIRS = lib src po tests debug
SUBDIRS =
if COND_GNULIB
SUBDIRS += lib
endif
SUBDIRS += src po tests
if COND_DOC
dist_doc_DATA = \
AUTHORS \
COPYING \
COPYING.GPLv2 \
NEWS \
README \
THANKS \
TODO \
doc/faq.txt \
doc/history.txt \
doc/xz-file-format.txt \
doc/lzma-file-format.txt
examplesdir = $(docdir)/examples
dist_examples_DATA = \
doc/examples/00_README.txt \
doc/examples/01_compress_easy.c \
doc/examples/02_decompress.c \
doc/examples/03_compress_custom.c \
doc/examples/04_compress_easy_mt.c \
doc/examples/Makefile
examplesolddir = $(docdir)/examples_old
dist_examplesold_DATA = \
doc/examples_old/xz_pipe_comp.c \
doc/examples_old/xz_pipe_decomp.c
endif
EXTRA_DIST = \
extra \
dos \
windows \
macosx \
autogen.sh \
Doxyfile.in \
COPYING.GPLv2 \
COPYING.GPLv3 \
COPYING.LGPLv2.1 \
INSTALL.generic \
PACKAGERS \
build-aux/manconv.sh \
build-aux/version.sh
ACLOCAL_AMFLAGS = -I m4
# List of man pages to conver to PDF and plain text in the dist-hook target.
manfiles = \
src/xz/xz.1 \
src/xzdec/xzdec.1 \
src/lzmainfo/lzmainfo.1 \
src/scripts/xzdiff.1 \
src/scripts/xzgrep.1 \
src/scripts/xzless.1 \
src/scripts/xzmore.1
# Create ChangeLog from output of "git log --date=iso --stat".
# Convert the man pages to PDF and plain text (ASCII only) formats.
dist-hook:
if test -d "$(srcdir)/.git" && type git > /dev/null 2>&1; then \
( cd "$(srcdir)" && git log --date=iso --stat ) \
> "$(distdir)/ChangeLog"; \
fi
if type groff > /dev/null 2>&1 && type ps2pdf > /dev/null 2>&1; then \
dest="$(distdir)/doc/man" && \
$(MKDIR_P) "$$dest/pdf-a4" "$$dest/pdf-letter" "$$dest/txt" && \
for FILE in $(manfiles); do \
BASE=`basename $$FILE .1` && \
sh "$(srcdir)/build-aux/manconv.sh" pdf a4 \
< "$(srcdir)/$$FILE" \
> "$$dest/pdf-a4/$$BASE-a4.pdf" && \
sh "$(srcdir)/build-aux/manconv.sh" pdf letter \
< "$(srcdir)/$$FILE" \
> "$$dest/pdf-letter/$$BASE-letter.pdf" && \
sh "$(srcdir)/build-aux/manconv.sh" ascii \
< "$(srcdir)/$$FILE" \
> "$$dest/txt/$$BASE.txt"; \
done; \
fi
# This works with GNU tar and gives cleaner package than normal 'make dist'.
mydist:
sh "$(srcdir)/src/liblzma/validate_map.sh"
VERSION=$(VERSION); \
if test -d "$(srcdir)/.git" && type git > /dev/null 2>&1; then \
SNAPSHOT=`cd "$(srcdir)" && git describe --abbrev=4 | cut -b2-`; \
test -n "$$SNAPSHOT" && VERSION=$$SNAPSHOT; \
fi; \
TAR_OPTIONS='--owner=0 --group=0 --numeric-owner --mode=u+rw,go+r-w' \
$(MAKE) VERSION="$$VERSION" dist-gzip

File diff suppressed because it is too large Load Diff

505
NEWS Normal file
View File

@@ -0,0 +1,505 @@
XZ Utils Release Notes
======================
5.2.2 (2015-09-29)
* Fixed bugs in QNX-specific code.
* Omitted the use of pipe2() even if it is available to avoid
portability issues with some old Linux and glibc combinations.
* Updated German translation.
* Added project files to build static and shared liblzma (not the
whole XZ Utils) with Visual Studio 2013 update 2 or later.
* Documented that threaded decompression hasn't been implemented
yet. A 5.2.0 NEWS entry describing multi-threading support had
incorrectly said "decompression" when it should have said
"compression".
5.2.1 (2015-02-26)
* Fixed a compression-ratio regression in fast mode of LZMA1 and
LZMA2. The bug is present in 5.1.4beta and 5.2.0 releases.
* Fixed a portability problem in xz that affected at least OpenBSD.
* Fixed xzdiff to be compatible with FreeBSD's mktemp which differs
from most other mktemp implementations.
* Changed CPU core count detection to use cpuset_getaffinity() on
FreeBSD.
5.2.0 (2014-12-21)
Since 5.1.4beta:
* All fixes from 5.0.8
* liblzma: Fixed lzma_stream_encoder_mt_memusage() when a preset
was used.
* xzdiff: If mktemp isn't installed, mkdir will be used as
a fallback to create a temporary directory. Installing mktemp
is still recommended.
* Updated French, German, Italian, Polish, and Vietnamese
translations.
Summary of fixes and new features added in the 5.1.x development
releases:
* liblzma:
- Added support for multi-threaded compression. See the
lzma_mt structure, lzma_stream_encoder_mt(), and
lzma_stream_encoder_mt_memusage() in <lzma/container.h>,
lzma_get_progress() in <lzma/base.h>, and lzma_cputhreads()
in <lzma/hardware.h> for details.
- Made the uses of lzma_allocator const correct.
- Added lzma_block_uncomp_encode() to create uncompressed
.xz Blocks using LZMA2 uncompressed chunks.
- Added support for LZMA_IGNORE_CHECK.
- A few speed optimizations were made.
- Added support for symbol versioning. It is enabled by default
on GNU/Linux, other GNU-based systems, and FreeBSD.
- liblzma (not the whole XZ Utils) should now be buildable
with MSVC 2013 update 2 or later using windows/config.h.
* xz:
- Fixed a race condition in the signal handling. It was
possible that e.g. the first SIGINT didn't make xz exit
if reading or writing blocked and one had bad luck. The fix
is non-trivial, so as of writing it is unknown if it will be
backported to the v5.0 branch.
- Multi-threaded compression can be enabled with the
--threads (-T) option.
[Fixed: This originally said "decompression".]
- New command line options in xz: --single-stream,
--block-size=SIZE, --block-list=SIZES,
--flush-timeout=TIMEOUT, and --ignore-check.
- xz -lvv now shows the minimum xz version that is required to
decompress the file. Currently it is 5.0.0 for all supported
.xz files except files with empty LZMA2 streams require 5.0.2.
* xzdiff and xzgrep now support .lzo files if lzop is installed.
The .tzo suffix is also recognized as a shorthand for .tar.lzo.
5.1.4beta (2014-09-14)
* All fixes from 5.0.6
* liblzma: Fixed the use of presets in threaded encoder
initialization.
* xz --block-list and --block-size can now be used together
in single-threaded mode. Previously the combination only
worked in multi-threaded mode.
* Added support for LZMA_IGNORE_CHECK to liblzma and made it
available in xz as --ignore-check.
* liblzma speed optimizations:
- Initialization of a new LZMA1 or LZMA2 encoder has been
optimized. (The speed of reinitializing an already-allocated
encoder isn't affected.) This helps when compressing many
small buffers with lzma_stream_buffer_encode() and other
similar situations where an already-allocated encoder state
isn't reused. This speed-up is visible in xz too if one
compresses many small files one at a time instead running xz
once and giving all files as command-line arguments.
- Buffer comparisons are now much faster when unaligned access
is allowed (configured with --enable-unaligned-access). This
speeds up encoding significantly. There is arch-specific code
for 32-bit and 64-bit x86 (32-bit needs SSE2 for the best
results and there's no run-time CPU detection for now).
For other archs there is only generic code which probably
isn't as optimal as arch-specific solutions could be.
- A few speed optimizations were made to the SHA-256 code.
(Note that the builtin SHA-256 code isn't used on all
operating systems.)
* liblzma can now be built with MSVC 2013 update 2 or later
using windows/config.h.
* Vietnamese translation was added.
5.1.3alpha (2013-10-26)
* All fixes from 5.0.5
* liblzma:
- Fixed a deadlock in the threaded encoder.
- Made the uses of lzma_allocator const correct.
- Added lzma_block_uncomp_encode() to create uncompressed
.xz Blocks using LZMA2 uncompressed chunks.
- Added support for native threads on Windows and the ability
to detect the number of CPU cores.
* xz:
- Fixed a race condition in the signal handling. It was
possible that e.g. the first SIGINT didn't make xz exit
if reading or writing blocked and one had bad luck. The fix
is non-trivial, so as of writing it is unknown if it will be
backported to the v5.0 branch.
- Made the progress indicator work correctly in threaded mode.
- Threaded encoder now works together with --block-list=SIZES.
- Added preliminary support for --flush-timeout=TIMEOUT.
It can be useful for (somewhat) real-time streaming. For
now the decompression side has to be done with something
else than the xz tool due to how xz does buffering, but this
should be fixed.
5.1.2alpha (2012-07-04)
* All fixes from 5.0.3 and 5.0.4
* liblzma:
- Fixed a deadlock and an invalid free() in the threaded encoder.
- Added support for symbol versioning. It is enabled by default
on GNU/Linux, other GNU-based systems, and FreeBSD.
- Use SHA-256 implementation from the operating system if one is
available in libc, libmd, or libutil. liblzma won't use e.g.
OpenSSL or libgcrypt to avoid introducing new dependencies.
- Fixed liblzma.pc for static linking.
- Fixed a few portability bugs.
* xz --decompress --single-stream now fixes the input position after
successful decompression. Now the following works:
echo foo | xz > foo.xz
echo bar | xz >> foo.xz
( xz -dc --single-stream ; xz -dc --single-stream ) < foo.xz
Note that it doesn't work if the input is not seekable
or if there is Stream Padding between the concatenated
.xz Streams.
* xz -lvv now shows the minimum xz version that is required to
decompress the file. Currently it is 5.0.0 for all supported .xz
files except files with empty LZMA2 streams require 5.0.2.
* Added an *incomplete* implementation of --block-list=SIZES to xz.
It only works correctly in single-threaded mode and when
--block-size isn't used at the same time. --block-list allows
specifying the sizes of Blocks which can be useful e.g. when
creating files for random-access reading.
5.1.1alpha (2011-04-12)
* All fixes from 5.0.2
* liblzma fixes that will also be included in 5.0.3:
- A memory leak was fixed.
- lzma_stream_buffer_encode() no longer creates an empty .xz
Block if encoding an empty buffer. Such an empty Block with
LZMA2 data would trigger a bug in 5.0.1 and older (see the
first bullet point in 5.0.2 notes). When releasing 5.0.2,
I thought that no encoder creates this kind of files but
I was wrong.
- Validate function arguments better in a few functions. Most
importantly, specifying an unsupported integrity check to
lzma_stream_buffer_encode() no longer creates a corrupt .xz
file. Probably no application tries to do that, so this
shouldn't be a big problem in practice.
- Document that lzma_block_buffer_encode(),
lzma_easy_buffer_encode(), lzma_stream_encoder(), and
lzma_stream_buffer_encode() may return LZMA_UNSUPPORTED_CHECK.
- The return values of the _memusage() functions are now
documented better.
* Support for multithreaded compression was added using the simplest
method, which splits the input data into blocks and compresses
them independently. Other methods will be added in the future.
The current method has room for improvement, e.g. it is possible
to reduce the memory usage.
* Added the options --single-stream and --block-size=SIZE to xz.
* xzdiff and xzgrep now support .lzo files if lzop is installed.
The .tzo suffix is also recognized as a shorthand for .tar.lzo.
* Support for short 8.3 filenames under DOS was added to xz. It is
experimental and may change before it gets into a stable release.
5.0.8 (2014-12-21)
* Fixed an old bug in xzgrep that affected OpenBSD and probably
a few other operating systems too.
* Updated French and German translations.
* Added support for detecting the amount of RAM on AmigaOS/AROS.
* Minor build system updates.
5.0.7 (2014-09-20)
* Fix regressions introduced in 5.0.6:
- Fix building with non-GNU make.
- Fix invalid Libs.private value in liblzma.pc which broke
static linking against liblzma if the linker flags were
taken from pkg-config.
5.0.6 (2014-09-14)
* xzgrep now exits with status 0 if at least one file matched.
* A few minor portability and build system fixes
5.0.5 (2013-06-30)
* lzmadec and liblzma's lzma_alone_decoder(): Support decompressing
.lzma files that have less common settings in the headers
(dictionary size other than 2^n or 2^n + 2^(n-1), or uncompressed
size greater than 256 GiB). The limitations existed to avoid false
positives when detecting .lzma files. The lc + lp <= 4 limitation
still remains since liblzma's LZMA decoder has that limitation.
NOTE: xz's .lzma support or liblzma's lzma_auto_decoder() are NOT
affected by this change. They still consider uncommon .lzma headers
as not being in the .lzma format. Changing this would give way too
many false positives.
* xz:
- Interaction of preset and custom filter chain options was
made less illogical. This affects only certain less typical
uses cases so few people are expected to notice this change.
Now when a custom filter chain option (e.g. --lzma2) is
specified, all preset options (-0 ... -9, -e) earlier are on
the command line are completely forgotten. Similarly, when
a preset option is specified, all custom filter chain options
earlier on the command line are completely forgotten.
Example 1: "xz -9 --lzma2=preset=5 -e" is equivalent to "xz -e"
which is equivalent to "xz -6e". Earlier -e didn't put xz back
into preset mode and thus the example command was equivalent
to "xz --lzma2=preset=5".
Example 2: "xz -9e --lzma2=preset=5 -7" is equivalent to
"xz -7". Earlier a custom filter chain option didn't make
xz forget the -e option so the example was equivalent to
"xz -7e".
- Fixes and improvements to error handling.
- Various fixes to the man page.
* xzless: Fixed to work with "less" versions 448 and later.
* xzgrep: Made -h an alias for --no-filename.
* Include the previously missing debug/translation.bash which can
be useful for translators.
* Include a build script for Mac OS X. This has been in the Git
repository since 2010 but due to a mistake in Makefile.am the
script hasn't been included in a release tarball before.
5.0.4 (2012-06-22)
* liblzma:
- Fix lzma_index_init(). It could crash if memory allocation
failed.
- Fix the possibility of an incorrect LZMA_BUF_ERROR when a BCJ
filter is used and the application only provides exactly as
much output space as is the uncompressed size of the file.
- Fix a bug in doc/examples_old/xz_pipe_decompress.c. It didn't
check if the last call to lzma_code() really returned
LZMA_STREAM_END, which made the program think that truncated
files are valid.
- New example programs in doc/examples (old programs are now in
doc/examples_old). These have more comments and more detailed
error handling.
* Fix "xz -lvv foo.xz". It could crash on some corrupted files.
* Fix output of "xz --robot -lv" and "xz --robot -lvv" which
incorrectly printed the filename also in the "foo (x/x)" format.
* Fix exit status of "xzdiff foo.xz bar.xz".
* Fix exit status of "xzgrep foo binary_file".
* Fix portability to EBCDIC systems.
* Fix a configure issue on AIX with the XL C compiler. See INSTALL
for details.
* Update French, German, Italian, and Polish translations.
5.0.3 (2011-05-21)
* liblzma fixes:
- A memory leak was fixed.
- lzma_stream_buffer_encode() no longer creates an empty .xz
Block if encoding an empty buffer. Such an empty Block with
LZMA2 data would trigger a bug in 5.0.1 and older (see the
first bullet point in 5.0.2 notes). When releasing 5.0.2,
I thought that no encoder creates this kind of files but
I was wrong.
- Validate function arguments better in a few functions. Most
importantly, specifying an unsupported integrity check to
lzma_stream_buffer_encode() no longer creates a corrupt .xz
file. Probably no application tries to do that, so this
shouldn't be a big problem in practice.
- Document that lzma_block_buffer_encode(),
lzma_easy_buffer_encode(), lzma_stream_encoder(), and
lzma_stream_buffer_encode() may return LZMA_UNSUPPORTED_CHECK.
- The return values of the _memusage() functions are now
documented better.
* Fix command name detection in xzgrep. xzegrep and xzfgrep now
correctly use egrep and fgrep instead of grep.
* French translation was added.
5.0.2 (2011-04-01)
* LZMA2 decompressor now correctly accepts LZMA2 streams with no
uncompressed data. Previously it considered them corrupt. The
bug can affect applications that use raw LZMA2 streams. It is
very unlikely to affect .xz files because no compressor creates
.xz files with empty LZMA2 streams. (Empty .xz files are a
different thing than empty LZMA2 streams.)
* "xz --suffix=.foo filename.foo" now refuses to compress the
file due to it already having the suffix .foo. It was already
documented on the man page, but the code lacked the test.
* "xzgrep -l foo bar.xz" works now.
* Polish translation was added.
5.0.1 (2011-01-29)
* xz --force now (de)compresses files that have setuid, setgid,
or sticky bit set and files that have multiple hard links.
The man page had it documented this way already, but the code
had a bug.
* gzip and bzip2 support in xzdiff was fixed.
* Portability fixes
* Minor fix to Czech translation
5.0.0 (2010-10-23)
Only the most important changes compared to 4.999.9beta are listed
here. One change is especially important:
* The memory usage limit is now disabled by default. Some scripts
written before this change may have used --memory=max on xz command
line or in XZ_OPT. THESE USES OF --memory=max SHOULD BE REMOVED
NOW, because they interfere with user's ability to set the memory
usage limit himself. If user-specified limit causes problems to
your script, blame the user.
Other significant changes:
* Added support for XZ_DEFAULTS environment variable. This variable
allows users to set default options for xz, e.g. default memory
usage limit or default compression level. Scripts that use xz
must never set or unset XZ_DEFAULTS. Scripts should use XZ_OPT
instead if they need a way to pass options to xz via an
environment variable.
* The compression settings associated with the preset levels
-0 ... -9 have been changed. --extreme was changed a little too.
It is now less likely to make compression worse, but with some
files the new --extreme may compress slightly worse than the old
--extreme.
* If a preset level (-0 ... -9) is specified after a custom filter
chain options have been used (e.g. --lzma2), the custom filter
chain will be forgotten. Earlier the preset options were
completely ignored after custom filter chain options had been
seen.
* xz will create sparse files when decompressing if the uncompressed
data contains long sequences of binary zeros. This is done even
when writing to standard output that is connected to a regular
file and certain additional conditions are met to make it safe.
* Support for "xz --list" was added. Combine with --verbose or
--verbose --verbose (-vv) for detailed output.
* I had hoped that liblzma API would have been stable after
4.999.9beta, but there have been a couple of changes in the
advanced features, which don't affect most applications:
- Index handling code was revised. If you were using the old
API, you will get a compiler error (so it's easy to notice).
- A subtle but important change was made to the Block handling
API. lzma_block.version has to be initialized even for
lzma_block_header_decode(). Code that doesn't do it will work
for now, but might break in the future, which makes this API
change easy to miss.
* The major soname has been bumped to 5.0.0. liblzma API and ABI
are now stable, so the need to recompile programs linking against
liblzma shouldn't arise soon.

231
PACKAGERS Normal file
View File

@@ -0,0 +1,231 @@
Information to packagers of XZ Utils
====================================
0. Preface
1. Package naming
2. Package description
3. License
4. configure options
5. Additional documentation
6. Extra files
7. Installing XZ Utils and LZMA Utils in parallel
8. Example
0. Preface
----------
This document is meant for people who create and maintain XZ Utils
packages for operating system distributions. The focus is on GNU/Linux
systems, but most things apply to other systems too.
While the standard "configure && make DESTDIR=$PKG install" should
give a pretty good package, there are some details which packagers
may want to tweak.
Packagers should also read the INSTALL file.
1. Package naming
-----------------
The preferred name for the XZ Utils package is "xz", because that's
the name of the upstream tarball. Naturally you may have good reasons
to use some other name; I won't get angry about it. ;-) It's just nice
to be able to point people to the correct package name without asking
what distro they have.
If your distro policy is to split things into small pieces, here is
one suggestion:
xz xz, xzdec, scripts (xzdiff, xzgrep, etc.), docs
xz-lzma lzma, unlzma, lzcat, lzgrep etc. symlinks and
lzmadec binary for compatibility with LZMA Utils
liblzma liblzma.so.*
liblzma-devel liblzma.so, liblzma.a, API headers
2. Package description
----------------------
Here is a suggestion which you may use as the package description.
If you can use only one-line description, pick only the first line.
Naturally, feel free to use some other description if you find it
better, and maybe send it to me too.
Library and command line tools for XZ and LZMA compressed files
XZ Utils provide a general purpose data compression library
and command line tools. The native file format is the .xz
format, but also the legacy .lzma format is supported. The .xz
format supports multiple compression algorithms, of which LZMA2
is currently the primary algorithm. With typical files, XZ Utils
create about 30 % smaller files than gzip.
If you are splitting XZ Utils into multiple packages, here are some
suggestions for package descriptions:
xz:
Command line tools for XZ and LZMA compressed files
This package includes the xz compression tool and other command
line tools from XZ Utils. xz has command line syntax similar to
that of gzip. The native file format is the .xz format, but also
the legacy .lzma format is supported. The .xz format supports
multiple compression algorithms, of which LZMA2 is currently the
primary algorithm. With typical files, XZ Utils create about 30 %
smaller files than gzip.
Note that this package doesn't include the files needed for
LZMA Utils 4.32.x compatibility. Install also the xz-lzma
package to make XZ Utils emulate LZMA Utils 4.32.x.
xz-lzma:
LZMA Utils emulation with XZ Utils
This package includes executables and symlinks to make
XZ Utils emulate lzma, unlzma, lzcat, and other command
line tools found from the legacy LZMA Utils 4.32.x package.
liblzma:
Library for XZ and LZMA compressed files
liblzma is a general purpose data compression library with
an API similar to that of zlib. liblzma supports multiple
algorithms, of which LZMA2 is currently the primary algorithm.
The native file format is .xz, but also the legacy .lzma
format and raw streams (no headers at all) are supported.
This package includes the shared library.
liblzma-devel:
Library for XZ and LZMA compressed files
This package includes the API headers, static library, and
other development files related to liblzma.
3. License
----------
If the package manager supports a license field, you probably should
put GPLv2+ there (GNU GPL v2 or later). The interesting parts of
XZ Utils are in the public domain, but some less important files
ending up into the binary package are under GPLv2+. So it is simplest
to just say GPLv2+ if you cannot specify "public domain and GPLv2+".
If you split XZ Utils into multiple packages as described earlier
in this file, liblzma and liblzma-dev packages will contain only
public domain code (from XZ Utils at least; compiler or linker may
add some third-party code, which may be copyrighted).
4. configure options
--------------------
Unless you are building a package for a distribution that is meant
only for embedded systems, don't use the following configure options:
--enable-debug
--enable-encoders (*)
--enable-decoders
--enable-match-finders
--enable-checks
--enable-small (*)
--disable-threads (*)
(*) These are OK when building xzdec and lzmadec as described
in INSTALL.
xzdec and lzmadec don't provide any functionality that isn't already
available in the xz tool. Shipping xzdec and lzmadec without size
optimization and statically-linked liblzma isn't very useful. Doing
that would give users the xzdec man page, which may make it easier
for people to find out that such tools exists, but the executables
wouldn't have any advantage over the full-featured xz.
5. Additional documentation
---------------------------
"make install" copies some additional documentation to $docdir
(--docdir in configure). There is a copy of the GNU GPL v2, which
can be replaced with a symlink if your distro ships with shared
copies of the common license texts.
liblzma API is currently only documented using Doxygen tags in the
API headers. It hasn't been tested much how good results Doxygen
is able to make from the tags (e.g. Doxyfile might need tweaking,
the tagging may need to be improved etc.), so it might be simpler
to just let people read docs directly from the .h files for now,
and also save quite a bit in package size at the same time.
6. Extra files
--------------
The "extra" directory contains some small extra tools or other files.
The exact set of extra files can vary between XZ Utils releases. The
extra files have only limited use or they are too dangerous to be
put directly to $bindir (7z2lzma.sh is a good example, since it can
silently create corrupt output if certain conditions are not met).
If you feel like it, you may copy the extra directory under the doc
directory (e.g. /usr/share/doc/xz/extra). Maybe some people will find
them useful. However, most people needing these tools probably are
able to find them from the source package too.
The "debug" directory contains some tools that are useful only when
hacking on XZ Utils. Don't package these tools.
7. Installing XZ Utils and LZMA Utils in parallel
-------------------------------------------------
XZ Utils and LZMA Utils 4.32.x can be installed in parallel by
omitting the compatibility symlinks (lzma, unlzma, lzcat, lzgrep etc.)
from the XZ Utils package. It's probably a good idea to still package
the symlinks into a separate package so that users may choose if they
want to use XZ Utils or LZMA Utils for handling .lzma files.
8. Example
----------
Here is an example for i686 GNU/Linux that
- links xz and lzmainfo against shared liblzma;
- links size-optimized xzdec and lzmadec against static liblzma
while avoiding libpthread dependency;
- includes only shared liblzma in the final package; and
- copies also the "extra" directory to the package.
PKG=/tmp/xz-pkg
tar xf xz-x.y.z.tar.gz
cd xz-x.y.z
./configure \
--prefix=/usr \
--disable-static \
--disable-xzdec \
--disable-lzmadec \
CFLAGS='-march=i686 -mtune=generic -O2'
make
make DESTDIR=$PKG install-strip
make clean
./configure \
--prefix=/usr \
--disable-shared \
--disable-nls \
--disable-encoders \
--enable-small \
--disable-threads \
CFLAGS='-march=i686 -mtune=generic -Os'
make -C src/liblzma
make -C src/xzdec
make -C src/xzdec DESTDIR=$PKG install-strip
cp -a extra $PKG/usr/share/doc/xz

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)

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