Initial release

This commit is contained in:
unknown 2015-10-19 14:27:31 +04:00
commit 32f28094bf
644 changed files with 94529 additions and 0 deletions

35
BUGS Normal file
View File

@ -0,0 +1,35 @@
######################################################
# Tcl/Tk project Manager
# Distributed under GNU Public License
# Author: Sergey Kalinin banzaj@lrn.ru
# Copyright (c) "CONERO lab", 2002, http://conero.lrn.ru
######################################################
- Файл проекта, убрать расширение
- Глюки подсветки
* Изменение размера шрифтов для редактора вступает в силу только после
перезагрузки, что не очень-то удобно.
* При запуске приходится делать лишнее усилие по открытию root
элемента в TreeView. Сделай это по умолчанию автоматом, плиз. И чтобы
это также работало при команде refresh.
* Есть refresh для TreeView хорошо бы тогда чтобы он или другая
функция обновляла syntax hightlight, а то когда большие куски
ставляешь кода и он их не рассчвечивает неудобно.
* При вводе текста если ввести proc, то твой редактор подставит
автоматом скобки. Вообще-то это не очень правильно, к примеру я
ставлю после функции комментарий вида } ;# proc testFunct
И вот тут он вставляет не нужные мне сейчас ковычки. По идеи надо в
balloon окне показать формат этой команды (также для все остальных).
Посмотри как это сделано в VisualBasic версии > 4. А так есть еще
один баг. Если у меня перед командой proc стоят пробелы, то точно
такое же их количество должно стоять и после последней закрывающей
скобкой иначе все форматирование едит и надо править ручками.
- При установки переменной editor(wrap) значения none на длинных строках при появлениии нижнего скролбара наблюдается глюк пока не объяснимый :(
Скрол бар начинает мерцать (то появиться то исчезнет)

348
CHANGELOG Normal file
View File

@ -0,0 +1,348 @@
#########################################################
# Tcl/Tk Project Manager
# Distributed under GNU Public License
# Copyright (c) "CONERO lab", 2001, http://conero.lrn.ru
# Author: Sergey Kalinin (aka BanZaj) banzaj@lrn.ru
#########################################################
0.3.7
18/10/2007
-Added text encoding support from koi8-r,cpp1251,cp866 to UTF-8
20/02/2007
- Fixed settings dialog
- Fixed saved settings parameter
27/01/2006
- Remove SuperText widget now use native TEXT
29/12/2005
- Added RUBY projects support
- Fixed remove project if some files is open in editor
- Add function for added interpritator into new like #!/usr/bin/wish
0.3.6
18/02/2005
- Fixed correctly file attributes in WIN OS as like a date and time
01/02/2005
- Added DOT-file support
07/12/2004
- Added PHP projects support
0.3.5
01/11/2004
- Added Rivet and TclHttpd template files support
- Removed BWidget documentation
- Fixed bug with One Click mouse button on folder in TreeWidget
25/10/2004
Fixed bug with PageRise function
27/09/2004
- Added "Create New Directory" dialog into main and pop-up menu
14/09/2004
- Added image viewer
- Fixed close projman if was not opened projects
0.3.4
15/07/2004
- Fixed closes "About" window with popup menu
13/04/2004
- Added O'Caml (ML) support (not stable)
- Fixed settings dialog
0.3.3
04/12/2003
- Fix perl source code navigation ('sub' keyword)
22/09/2003
- Added fortran project support
- Added STDERR output in text widget when project or file compile (running)
10/07/2003
- Fix buf with runing TkCVS and other modules
07/07/2003
- Added PERL project support
- Added "Control+ PageUp" and "Control+ PageDown" key switching editors tabs
- Added popupmenus for tabs
0.3.2
20/12/2002
- Fixed "Open project" from any directoryes, now files don't copying into default projects dir
- Fixed "Delete project" procedure
- Change work dir in windows - now .projman
- Small change install dialog
15/12/2002
- Fixed error with delete file
06/12/2002
- Fixed error with comments highlight in JAVA-source
0.3.1
20/11/2002
- Added comand line option in compiler string (for projects)
- Fixed file compile procedure
- Fixed add (create new) file to project procedure. Now file created in any location.
05/11/2002
- Fixed error with run project on press F9 key
- Fixed error with different project location
- Fixed "Select All" procedure
- Small bugs fixes in projects.tcl
- Code cleaning
- Fixed Save/Close editing file
0.3.0
28/10/2002
- Correct main menus and popup-menus ("file" and "projects" menus)
25/10/2002
- Fixed settings dialog - now full working :)
- Added JAVA files and project compiling
14/10/2002
- Remove editor.conf, now all setting placement in projman.conf need replace old ~/.projman/projman.conf file
- Fixed "Settings dialog"
16/09/2002
- Changed TCL highlight procedure
10/09/2002
- Added JAVA project support like source code highlightning, project managment, class navigation
0.2.5
02/09/2002
- New release VisualRegexp added (thanks Laurent Riesterer)
17/06/2002
- Bug in Help procedure (<pre></pre> tag) fixed (by Alexander Danilov)
0.2.4
11/06/2002
- Fixed copying french documentation files
- Now interface language setting on $env(LANG) variable (system lacale) and HOMEPATH HOMEDRIVE vars (for windows)
- Change Procedure Complitition proc
- Change load modules procedure
05/06/2002
- Change tcl highlight procedure for braces and options (by Korwin)
03/06/2002
- Small GUI changes (Tree view, AboutBox)(by Alexander Danilov)
- Fixed help files path in install.tcl (by Alexander Danilov)
- Added "Close" button into toolbar
- Change Settins dialog (now self window) - DON'T WORKING developers only
- Code clean (procedure.tcl)
- Changes NoteBook title (save/modify file veiew)
0.2.3
30/05/2002
- Added icon for XML files
- Added XML highlightning (used highlight/html.tcl)
- Added "Select All" command into "Edit" menu
- Fixed "Overwrite/Insert" procedure
- Fixed On/Off toolbar
21/05/2002
- Rewrite all TCL and TK docs by Alexander Danilov <daapp@land.ru>
0.2.2
17/05/2002
- Fixed calling external modules procedure
0.2.1
14/05/2002
- Fixed location help files
- Added menu support into spec
15/04/2002
- Changes highlight procedure - now all highlight files puts into /highlight directory and loaded automaticaly and now creation new highlight module so easy...
- Added TeX highlightning
09/04/2002
- Added french localisation and Tcl help by Michel SALVAGNIAC
01/04/2002
- Added german localisation by Roman Schaller <r.schaller@gmx.ch>
0.2.0 (26/03/2002)
- Added Close opened file procedure when Delete file
- Fix calling Ctags module if ctags package not installed
- Added paned windows (for changes Tree size)
22/03/2002
- Autocomplitition procedure (by Alexander Dederer (aka Korwin))
- Added procedure names and parameters complitition
- Changed Create New File dialog
- Fixed directory setings and created into Windows
- Added CTags support (*nix only)
- Fixed error with Pop-Up menu
- Added Edit pop-up menu into editor window
- Small fix with some keys binding
- Small fix with quit ProjMan and saved modifing files
0.1.5 (01/03/2002)
- Fix autoindent text procedure
- Include updated ducumenation (by Alex Danilov)
0.1.4 (20/02/2002)
- Fix some problem with Close/Open file
- Added bracket highlightning and corsor jumping for bracket!!! (by Korwin)
07/02/2002
- Added refresh Tree procedure and ToolBar On/Off procedure
- Some changes menu structure
05/02/2002
- Changed GUI for installiation dialog
- Added english ProjMan user manual
04/02/2002
- Changes documentation structure, now documentation split by chapters and languages
- Changes Help procedure for working with new directory structure
- Include new Tcl documentation by Alexander Danilov
- Changes installiation procedure - added select Documentation language for install
- Fixed problem with encoding russian documentation in Windows OS
- Fixed problem with names like "proc::name" into Help system
- Added Tcl/Tk and BWidget english documentation
0.1.3 (31/01/2002)
- Replase SelectDir on standart dialog tk_chooseDirectory
- Fixed error into TkDIFF+ with convert date procedure
- Added find history in Find dialog, and now used F3 for repeat searching
- Fixed hot keys bindings into Find (F3, Enter) and Replace (F4, Enter) dialogs
- Fixed changing "File modify" flag after successfully replaceing
0.1.2 (29/01/2002)
- Fix error with "Close all" procedure if raised About (Debug, Settings e.t.c.) dialog
- Translate TODO on English
24/01/2002
- Added mouse wheel support on Tree widget (by Korwin)
- Added "editor.conf" for change editor preferences and source highlightning colors
0.1.1 (23/01/2002)
- Fix correct cursor position viewed
- Added highlightning comments like ";#" (by Korwin)
22/01/2002
- Added raised notebook tab when click mouse on opened file name
- Fix correct windows path to tcl interpritator into Project Setting dialog
- Added TkREGEXP module (aka VisualREGEXP) from Laurent Riesterer
- Added new diff'ing module TkDIFF+ (with compare dirrectoryes) from Laurent Riesterer
- Added TkREGEXP and TkDIFF+ documentation
19/01/2002
- Fix callback links procedure into help system (thanks Dederer)
0.1.0 (17/01/2002)
- Added graphical installiation
- Corrected path for work in windows
16/01/2002
- Fix error with create and select directory into install.tcl
- Some Windows bugs fix
- Add invoke tkDiff for one or two selected files
- Add saved all files before run project
0.0.19 (15/01/2002)
- Add "Select Directory" procedure into settings page
- Add "Open project" procedure for adding existing project
- Add invoke TkCVS for Active project
- Fix error with open files with names like "some.file.name"
- Code cleaning
14/01/2001
- Add close window procedure into "Settings" and "Project Settings" dialog
after pushed "Save" button
0.0.17 (11/01/2002)
- Fix error with "New file" in new project procedure
- Fix small errors
10/01/2002
- Replaced hotkey "Ctrl-T" with "Ctrl-M". And now "Control-T" reverses the order of the two
characters to the right of the insertion cursor.
- Fix small bug
09/01/2002
- Added "Interface Language" select procedure into "Settings" dialog
- Fix error with close opening and modifing file procedure
- Fix read procedure with names "Proc::Name" and "Proc_name"
- Fix Insert/Overwrite editor mode
08/01/2002
- Fix error in notebook with mouse button click
- Changes mouse click procedure in Tree widget
07/01/2002
- Added "Print file" command
- Added "Print Selected text" command
- Fix error with "Save Setting" procedure (CheckBox verify)
- Fix error with "Find dialog" "Replace dialog", e.t.c. if no files opened
- Added "Editor font" option
04/01/2002
- Fixed many small bugs
- Fix error with Ctrl+T keys
- Fix error with "Save As" procedure
03/01/2002
- Added THANKS file, and view this into About window
- Fix problem with execute external browser from About window
- Fix create new text file in "Add To Project" dialog
- Fix some errors in MakeRPM procedure, but not working yet :(
- Fix error with select active project after creating new project
- Fix small error with delete project procedure
- Fix uncorrect cursor position counter into editor

341
COPYING Normal file
View File

@ -0,0 +1,341 @@
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
675 Mass Ave, Cambridge, MA 02139, 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 Library 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
Appendix: 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) 19yy <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., 675 Mass Ave, Cambridge, MA 02139, 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) 19yy 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 Library General
Public License instead of this License.

11
INSTALL Normal file
View File

@ -0,0 +1,11 @@
#########################################################
# Tcl/Tk Project Manager
# Copyright (c) "CONERO lab", 2001, http://conero.lrn.ru
# Author: Sergey Kalinin (aka BanZaj) banzaj@lrn.ru
#########################################################
1. Install Tcl/Tk, BWidget first
3. Run install.tcl script for copying files, or use RedHat Package Manager
3. Type from the command line 'projman' and enjoy

48
README Normal file
View File

@ -0,0 +1,48 @@
######################################################
# Tcl/Tk Project Manager #
# Distributed under GPL #
# Author: Sergey Kalinin (aka BanZaj) banzaj@lrn.ru #
# Home page: http://conero.lrn.ru #
######################################################
ABOUT
Tcl/Tk Project Manager is a full IDE for programming in TCL/Tk.
It includes a project and file manager, a source editor with
syntax highlighting and procedure navigation, a context-sensitive
help system, and much more.
Working an Unix (Linux tested) and Windows.
INSTALLATION
See INSTALL
REQUIREMENTS
For UNIX-like OS
Tcl/Tk http://www.scriptics.com
BWidget http://sourceforge.net/projects/tcllib
CTags
tcl-img - for image viewer
For WINDOWS
ActiveTcl http://tcl.activestate.com
CREDITS
Sergey Kalinin (aka Banzaj) - main project programmer and coordinator
banzaj@lrn.ru
http://conero.lrn.ru
Laurent Riesterer - VisualREGEXP and TkDIFF+ parts
laurent.riesterer@free.fr
http://laurent.riesterer.free.fr
Alexander Danilov - rewrite all documentation
daapp@chat.ru
Alexandr Dederer (aka Korwin) - many features and bugs fixed
dederer-a@mail.ru

10
THANKS Normal file
View File

@ -0,0 +1,10 @@
Alexander Danilov, daapp@chat.ru (documentation rewrite)
Laurent Riesterer, laurent.riesterer@free.fr, http://laurent.riesterer.free.fr (VisualRegexp module)
Alexander Dederer (aka Korwin) dederer-a@mail.ru (many features and bugs fixed)
Igor Didkovsky, ididkovsky@mail.ru, http://langos.lrn.ru/ (programm tester)
Oleg S. Gints (pogramm tester)
Victor Wagner (aka Vitus), http://www.ice.ru/~vitus
Serg Oskin, http://oskin.msk.ru/
DataX/FLORIN Inc. http://www.florin.ru (documentation)
Peter Campbell, http://fastbase.co.nz/edit (ML-editor)
Alexey Kakunin, http://kakunin.chat.ru/ (TCL Developer Studio)

82
TODO Normal file
View File

@ -0,0 +1,82 @@
##########################################################
# Tcl/Tk project Manager
# Distributed under GNU Public License
# Copyright (c) "CONERO lab", 2002, http://conero.lrn.ru
# Author: Sergey Kalinin (aka BanZaj) banzaj@lrn.ru
##########################################################
1. GUI
- one click tree procedure
- added tcl-console
- added readline widget
- into settings dialog
-- on/off highligttning
-- on/off
- Add color scheme
- ðÅÒÅËÌÀÞÅÎÉÅ ÚÁËÌÁÄÏË Ó ÐÏÍÏÝØÀ Alt+> Alt+<
- ÐÅÒÅÄ ÐÅÒ×ÏÊ ÆÕËÎÃÉÅÊ ×ÏÚÍÏÖÎÏÓÔØ ÐÅÒÅÊÔÉ × ÎÁÞÁÌÏ ÄÏËÕÍÅÎÔÁ, Á ÐÏÓÌÅ ÐÏÓÌÅÄÎÅÊ ÎÁ ËÏÎÅÃ
ÄÏËÕÍÅÎÔÁ
- ÷ ÓÔÁÔÕÓÂÁÒÅ ÓÁÍÙÊ ÐÏÓÌÅÄÎÅÅ ÐÏÌÅ (ÐÒÁ×ÏÅ) ÇÄÅ ÔÅÓÔ file saved ÕÖ
ÂÏÌØÎÏ ÂÏÌØÛÏÅ ÄÌÑ ÔÁËÉÈ ËÒÁÔËÉÈ ÓÏÏÂÝÅÎÉÊ.
- Edit Window split
2. An package managers system independed files
- rpm spec file
- deb
4. Working with release (distribute)
- ftp received
5. Working with files
- open file dialog
- include internal cvs support
- search and replacement text into all projects files (ala grep)
6. Working with projects
- - making project procedure
-- compile error out
- generate installiation script for projects (install.tcl)
- synchronize version number into all projects file (if needed)
- added template file with headers
- documentation projects (LaTeX)
- added Select license procedure (settings dialog)
- change project dir (put into .proj file)
8. Internal editor
- files export
-- ps
-- html
- alphabetics ordered procedure list
- code/encode text files
- Add Insert curent date procedure
- search procedure with reguliar expretions
- Comment/uncomment selected area
- On/Off wrap function
9. Locale (messages)
- autodetect system locale
10. Help system
- patching html_lib
- searchin in help
- lock mouse and keyboard when help file opened
11. Multiplatform featuring
- Windows printing
ÆÏÌÄÉÎÇ
ÐÏÄÄÅÒÖËÁ frink (Á×ÔÏÆÏÒÍÁÔÔÅÒ)
ÎÕÍÅÒÁÃÉÑ ÓÔÒÏË
########################################

87
baloon.tcl Normal file
View File

@ -0,0 +1,87 @@
#######################################################################
# Baloon help
# Author: Alexander Dederer
# Usage:
# Set balloon tips to widget:
# balloon $widget set "Hello World"
# balloon [button .exit -text "exit" -command exit] set "Hello world"
#
# Clear ballon tips from widget:
# balloon $widget clear
#
# Show balloon tips on widget:
# balloon $widget show "Hello World"
#######################################################################
proc balloon { widget action args } {
global BALLOON
switch -- $action {
set {
if { $args != {{}} } {
balloon $widget clear
#bind $widget <Any-Enter> "after 1000 [list balloon %W show $args mousepointer %X %Y]"
#bind $widget <Any-Leave> "catch { destroy %W.balloon }"
bind $widget <Enter> " balloon $widget show $args "
bind $widget <Leave> " wm withdraw .bubble "
}
}
show {
if ![winfo exists .bubble] {
toplevel .bubble -relief flat -background black -bd 1
wm withdraw .bubble
update
array set attrFont [font actual fixed]
set attrFont(-size) [expr $attrFont(-size) - 2]
eval pack [message .bubble.txt -aspect 5000 -bg lightyellow \
-font [array get attrFont] -text [lindex $args 0]]
pack .bubble.txt
wm transient .bubble .
wm overrideredirect .bubble 1
bind .bubble <Enter> "wm withdraw .bubble"
} ;# if
if {$args == ""} { wm withdraw .bubble }
set text [lindex $args 0]
set BALLOON $text
switch $text {
"" { wm withdraw .bubble ; update }
"default" {
after 1000 "raise_balloon $widget {$text}"
after 7000 "if { \$BALLOON == {$text} } { wm withdraw .bubble ; update }"
}
} ;# switch
}
clear {
catch { destroy .balloon }
bind $widget <Enter> {}
bind $widget <Leave> {}
}
} ;# switch action
} ;# proc balloon
proc raise_balloon {widget text} {
global BALLOON
if { $BALLOON != $text } { wm withdraw .bubble ; update ; return }
set cur_widget [winfo containing [winfo pointerx .] [winfo pointery .]]
if { $cur_widget != $widget } { return }
raise .bubble
.bubble.txt configure -text $text
set b_x [expr [winfo pointerx .] - [winfo reqwidth .bubble]/2]
set b_y [expr [winfo pointery .] + 15]
wm geometry .bubble +$b_x+$b_y
wm deiconify .bubble
update
} ;# proc raise_balloon

167
completition.tcl Normal file
View File

@ -0,0 +1,167 @@
###########################################################
# Tcl/Tk Project Manager #
# Distrubuted under GPL #
# Copyright (c) "CONERO lab", 2002, http://conero.lrn.ru #
# Author: Sergey Kalinin (aka BanZaj) banzaj@lrn.ru #
###########################################################
# AutoCompletition Procedure #
# Author Alex DEDERER #
###########################################################
proc auto_completition { widget } {
set start_word [$widget get "insert - 1 chars wordstart" insert]
set box [$widget bbox insert]
set box_x [expr [lindex $box 0] + [winfo rootx $widget] ]
set box_y [expr [lindex $box 1] + [winfo rooty $widget] + [lindex $box 3] ]
set cnt 0
set pos "1.0"
set last_pos ""
set pattern "$start_word\\w*"
#set pattern ""
set list_word($start_word) 1
while { ([set start [$widget search -count cnt -regexp -- $pattern $pos end]] != "") } {
set word [$widget get $start "$start + $cnt chars"]
if { ![string equal $start_word $word] } { set list_word($word) 1 }
set pos [$widget index "$pos + [expr $cnt + 1] chars"]
if { [string equal $last_pos $pos] } { break }
set last_pos $pos
} ;# while
bindtags $widget [list CompletitionBind [winfo toplevel $widget] $widget Text sysAfter all]
bind CompletitionBind <Escape> "bindtags $widget {[list [winfo toplevel $widget] $widget Text sysAfter all]}; catch { destroy .aCompletition }"
bind CompletitionBind <Key> { auto_completition_key %W %K %A ; break}
eval auto_completition_win $box_x $box_y [array names list_word]
} ;# proc auto_completition
## PROCEDURE LIST ##
## by BanZaj ##
proc auto_completition_proc { widget } {
global procList activeProject noteBook
set nodeEdit [$noteBook raise]
if {$nodeEdit == "" || $nodeEdit == "newproj" || $nodeEdit == "about" || $nodeEdit == "debug"} {
return
}
set start_word [$widget get "insert - 1 chars wordstart" insert]
set box [$widget bbox insert]
set box_x [expr [lindex $box 0] + [winfo rootx $widget] ]
set box_y [expr [lindex $box 1] + [winfo rooty $widget] + [lindex $box 3] ]
set cnt 0
set pos "1.0"
set last_pos ""
set pattern "$start_word\\w*"
#set list_word($start_word) 1
if [info exists procList($activeProject)] {
set len [llength $procList($activeProject)]
} else {
return
}
set i 0
while {$len >=$i} {
set line [lindex $procList($activeProject) $i]
scan $line "%s" word
if [regexp -nocase -all -- {\s\{.*?\}+\s} $line par] {
regsub -all (\{|\}) $par " " par
set word_ "$word [string trim $par]"
if {[string match "$start_word*" $word]} {set list_word($word_) $i}
}
incr i
}
bindtags $widget [list CompletitionBind [winfo toplevel $widget] $widget Text sysAfter all]
bind CompletitionBind <Escape> "bindtags $widget {[list [winfo toplevel $widget] $widget Text sysAfter all]}; catch { destroy .aCompletition }"
bind CompletitionBind <Key> {auto_completition_key %W %K %A ; break}
eval auto_completition_win $box_x $box_y [array names list_word]
} ;# proc auto_completition_proc
proc auto_completition_win { x y args} {
set win .aCompletition
if { [winfo exists $win] } { destroy $win }
toplevel $win
wm transient $win .
wm overrideredirect $win 1
listbox $win.lBox -width 30 -border 2 -yscrollcommand "$win.yscroll set" -border 1
scrollbar $win.yscroll -orient vertical -command "$win.lBox yview" -width 13 -border 1
pack $win.lBox -expand true -fill y -side left
pack $win.yscroll -side left -expand false -fill y
foreach { word } $args {
$win.lBox insert end $word
} ;# foreach | insert all word
catch { $win.lBox activate 0 ; $win.lBox selection set 0 0 }
if { [set height [llength $args]] > 10 } { set height 10 }
$win.lBox configure -height $height
bind $win <Escape> " destroy $win "
bind $win.lBox <Escape> " destroy $win "
wm geom $win +$x+$y
} ;# auto_completition_win
proc auto_completition_key { widget K A } {
set win .aCompletition
set ind [$win.lBox curselection]
switch -- $K {
Prior {
set up [expr [$win.lBox index active] - [$win.lBox cget -height]]
if { $up < 0 } { set up 0 }
$win.lBox activate $up
$win.lBox selection clear 0 end
$win.lBox selection set $up $up
}
Next {
set down [expr [$win.lBox index active] + [$win.lBox cget -height]]
if { $down >= [$win.lBox index end] } { set down end }
$win.lBox activate $down
$win.lBox selection clear 0 end
$win.lBox selection set $down $down
}
Up {
set up [expr [$win.lBox index active] - 1]
if { $up < 0 } { set up 0 }
$win.lBox activate $up
$win.lBox selection clear 0 end
$win.lBox selection set $up $up
}
Down {
set down [expr [$win.lBox index active] + 1]
if { $down >= [$win.lBox index end] } { set down end }
$win.lBox activate $down
$win.lBox selection clear 0 end
$win.lBox selection set $down $down
}
Return {
$widget delete "insert - 1 chars wordstart" "insert wordend - 1 chars"
$widget insert "insert" [$win.lBox get [$win.lBox curselection]]
eval [bind CompletitionBind <Escape>]
}
default {
$widget insert "insert" $A
eval [bind CompletitionBind <Escape>]
}
}
} ;# proc auto_completition_key

1161
editor.tcl Normal file

File diff suppressed because it is too large Load Diff

0
errors Normal file
View File

362
help.tcl Normal file
View File

@ -0,0 +1,362 @@
##!/usr/bin/wish
###########################################################
# Tcl/Tk Project Manager #
# version 0.0.1 #
# help module #
# Copyright (c) "CONERO lab", 2002, http://conero.lrn.ru #
# Author: Sergey Kalinin (aka BanZaj) banzaj@lrn.ru #
###########################################################
#package require BWidget
#package require msgcat
## GETTING TABLES OF CONTENT ##
#set homeDir "$env(HOME)/projects/tcl/projman"
#set docDir "$env(HOME)/projects/tcl/projman/hlp"
#set imgDir "$env(HOME)/projects/tcl/projman/img"
#set msgDir "$env(HOME)/projects/tcl/projman/msgs"
#set workDir "$env(HOME)/.projman"
#source $workDir/projman.conf
source [file join $dataDir html_lib.tcl]
#source [file join $dataDir htmllib.tcl]
set sourceEncode "koi8-r"
## LOAD MESSAGES FILE? LANGUAGE AND NEDDED FILES ##
#source $homeDir/html.tcl
#::msgcat::mclocale $locale
#::msgcat::mcload $msgDir
proc HlpTreeOneClick {node} {
global fontNormal hlpTree wordList hlpNoteBook findString imgDir fontBold fontNormal
global lstSearch nodeParent
$hlpTree selection set $node
set nodeParent [$hlpTree parent $node]
set item [$hlpTree itemcget $node -data]
set file [string range $item 4 end]
#puts "$file" ;#debuf info
if {[string range $item 0 2] == "toc"} {
# $hlpTree configure
}
if {[$hlpTree itemcget $node -open] == 1} {
$hlpTree itemconfigure $node -open 0
} elseif {[$hlpTree itemcget $node -open] == 0} {
$hlpTree itemconfigure $node -open 1
}
if {[string range $item 0 2] == "doc"} {
GetContent $file
}
}
## GETTING TABLE OF CONTENT ##
proc GetTOC {} {
global docDir hlpTree imgDir fontNormal lstSearch arr sourceEncode
if {[catch {cd $docDir}] != 0} {
return ""
}
foreach dir [lsort [glob -nocomplain *]] {
if {[file isdirectory $dir] == 1} {
foreach file [lsort [glob -nocomplain [file join $dir *toc.html]]] {
#puts $file
set fileName [file join $file]
set tocFile [open $fileName r]
fconfigure $tocFile -encoding binary
set dot "_"
#set nodeParent [string range $fileName 0 [expr [string first "." $fileName]-1]]
#puts $fileName
set nodeParent [file dirname $fileName]
while {[gets $tocFile line]>=0} {
set a ""
set b ""
set line [encoding convertfrom $sourceEncode $line]
if {[regexp -nocase "<title>.+\</title>" $line a]} {
if {[regexp ">.+\<" $line a]} {
set length [string length $a]
set title [string range $a 1 [expr $length-2]]
#puts $nodeParent ;# debug info
$hlpTree insert end root $nodeParent -text "$title" -font $fontNormal \
-data "toc_$nodeParent" -open 0\
-image [Bitmap::get [file join $imgDir books.gif]]
}
} elseif {[regexp "\".+\"" $line a]} {
set data [string range $a 1 [expr [string last "\"" $a]-1]]
if {[regexp ">.+\<" $line b]} {
set line [string range $b 1 [expr [string first "<" $b]-1]]
regsub -all {[ :]} $line "_" subNode
#regsub -all ":" $ubNode "_" node
set subNode "$nodeParent$dot$subNode"
if {[info exists arr($subNode)] == 0} {
set arr($subNode) [file join $dir $data]
}
set data [file join $dir $data]
#puts "$subNode" ;# debug info
$hlpTree insert end "$nodeParent" $subNode -text "$line"\
-font $fontNormal -data "doc_$data" -open 0\
-image [Bitmap::get [file join $imgDir file.gif]]
$lstSearch insert end $line
}
} else {
break
}
}
} ;# foreach
}
}
$hlpTree configure -redraw 1
}
proc SearchWord {word} {
global arr nBookTree
set word [string tolower [string trim $word]]
puts $word
$nBookTree raise hlpSearch
InsertEnt .help.frmBody.frmCat.nBookTree.fhlpSearch.frmScrhEnt.entSearch $word
foreach wrd [array names arr] {
set name "[file rootname [file tail $arr($wrd)]]"
set file "$arr($wrd)"
if {[string match "$word*" [string tolower $name]] == 1} {
GetContent $file
}
}
}
## GETTING CONTENT FROM FILES ##
proc GetContent {file} {
global docDir hlpNoteBook fontNormal sourceEncode
$hlpNoteBook raise [$hlpNoteBook page 0]
set node [$hlpNoteBook raise]
if {$node != ""} {
$hlpNoteBook delete hlpHTML
}
set nbTitle ""
set html ""
set file [open $file r]
fconfigure $file -encoding binary
while {[gets $file line]>=0} {
# if {$line == ""} {
# set html "<h1>æÁÊÌ $file ÎÅ ÓÏÄÅÒÖÉÔ ÄÁÎÎÙÈ</h1>"
# }
set line [encoding convertfrom $sourceEncode $line]
if {[regexp -nocase "<title>.+\</title>" $line a]} {
if {[regexp ">.+\<" $a a]} {
set length [string length $a]
set nbTitle [string range $a 1 [expr $length-2]]
#puts $nbTitle
#puts $a
}
}
append html $line\n
}
set frmHTML [$hlpNoteBook insert end hlpHTML -text $nbTitle]
set txt [text $frmHTML.txtHTML -yscrollcommand "$frmHTML.yscroll set" \
-relief sunken -wrap word -highlightthickness 0 -font $fontNormal\
-selectborderwidth 0 -selectbackground #55c4d1 -width 10]
scrollbar $frmHTML.yscroll -relief sunken -borderwidth {1} -width {10} -takefocus 0\
-command "$frmHTML.txtHTML yview"
pack $txt -side left -fill both -expand true
pack $frmHTML.yscroll -side left -fill y
$hlpNoteBook raise hlpHTML
focus -force $txt
# $txt configure -state disabled
HM::init_win $txt
HM::set_link_callback LinkCallback
HM::set_state $txt -size 0
HM::set_indent $txt 1.2
HM::parse_html $html "HM::render $txt"
# HM::tag_title .help "Help - $nbTitle"
$txt configure -state disabled
}
## GOTO URL PROCEDURE ##
proc LinkCallback {w url} {
global docDir nodeParent
set url "[file join $docDir $nodeParent $url]"
if {[catch {open $url r} oHTML]} {
tk_messageBox -title "[::msgcat::mc "Error open URL"]"\
-message "[::msgcat::mc "Can't found file:"] $url"\
-icon error -type ok
} else {
GetContent $url
}
}
## autor DEDERER ##
proc LinkCallback_ {w url} {
global docDir
set url "[file join $docDir $url]"
if {[catch {open $url r} oHTML]} {
tk_messageBox -title "[::msgcat::mc "Error open URL"]"\
-message "[::msgcat::mc "Can't founf file: $url"]"\
-icon error -type ok
} else {
set html [read $oHTML]
$w configure -state normal
HM::reset_win $w
HM::parse_html $html "HM::render $w"
$w configure -state disable
}
# HM::render [winfo toplevel $w] $url
}
## MAIN HELP WINDOW ##
proc TopLevelHelp {} {
global fontNormal fontBold hlpTree hlpNoteBook nBookTree homeDir docDir lstSearch w frmSrchList
global imgDir
set w .help
set w_exist [winfo exists $w]
if !$w_exist {
toplevel $w
# wm resizable .help 0 0
wm geometry $w 900x800+0+0
wm title $w [::msgcat::mc "Help"]
# wm protocol $w WM_DELETE_WINDOW {destroy .msg .help}
#wm geometry . 600x400+0+0
wm title $w [::msgcat::mc "Help"]
frame $w.frmMenu -border 1 -relief raised
frame $w.frmTool -border 1 -relief raised
frame $w.frmBody -border 1 -relief raised
frame $w.frmStatus -border 1 -relief sunken
pack $w.frmMenu -side top -padx 1 -fill x
pack $w.frmTool -side top -padx 1 -fill x
pack $w.frmBody -side top -padx 1 -fill both -expand true
pack $w.frmStatus -side top -padx 1 -fill x
button $w.frmTool.btnBack -relief groove -font $fontBold -command Back -state disable
button $w.frmTool.btnForward -relief groove -font $fontBold -command Forward -state disable
button $w.frmTool.btnRefresh -relief groove -font $fontBold -command Refresh -state disable
button $w.frmTool.btnPrint -relief groove -font $fontBold -command Print -state disable
image create photo imgBack -format gif -file [file join $imgDir back.gif]
image create photo imgForward -format gif -file [file join $imgDir forward.gif]
image create photo imgRefresh -format gif -file [file join $imgDir refresh.gif]
image create photo imgPrint -format png -file [file join $imgDir printer.png]
$w.frmTool.btnBack configure -image imgBack
$w.frmTool.btnForward configure -image imgForward
$w.frmTool.btnRefresh configure -image imgRefresh
$w.frmTool.btnPrint configure -image imgPrint
pack $w.frmTool.btnBack $w.frmTool.btnForward $w.frmTool.btnRefresh $w.frmTool.btnPrint\
-side left -fill x
set frmCat [frame $w.frmBody.frmCat -border 1 -relief sunken]
pack $frmCat -side left -fill y
set frmWork [frame $w.frmBody.frmWork -border 1 -relief sunken]
pack $frmWork -side left -fill both -expand true
set nBookTree [NoteBook $frmCat.nBookTree -font $fontNormal]
pack $nBookTree -fill both -expand true -padx 2 -pady 2
set frmTreeNb [$nBookTree insert end hlpTree -text "[::msgcat::mc "Contents"]"]
set frmSearch [$nBookTree insert end hlpSearch -text "[::msgcat::mc "Search"]"]
$nBookTree raise hlpTree
set frmScrlX [frame $frmTreeNb.frmScrlX -border 0 -relief sunken]
set frmTree [frame $frmTreeNb.frmTree -border 1 -relief sunken]
set hlpTree [Tree $frmTree.tree \
-relief sunken -borderwidth 1 -width 20 -highlightthickness 0\
-redraw 0 -dropenabled 1 -dragenabled 1 -dragevent 3 \
-yscrollcommand {.help.frmBody.frmCat.nBookTree.fhlpTree.frmTree.scrlY set} \
-xscrollcommand {.help.frmBody.frmCat.nBookTree.fhlpTree.frmScrlX.scrlX set} \
-background "#d3d3d3" -selectbackground "#55c4d1" \
-droptypes {
TREE_NODE {copy {} move {} link {}}
LISTBOX_ITEM {copy {} move {} link {}}
} -opencmd "" -closecmd ""]
pack $frmTree -side top -fill y -expand true
pack $frmScrlX -side top -fill x
scrollbar $frmTree.scrlY -command {$hlpTree yview} \
-borderwidth {1} -width {10} -takefocus 0
pack $hlpTree $frmTree.scrlY -side left -fill y
scrollbar $frmScrlX.scrlX -command {$hlpTree xview} \
-orient horizontal -borderwidth {1} -width {10} -takefocus 0
pack $frmScrlX.scrlX -fill x -expand true
set frmSrchList [frame $frmSearch.frmScrhList -border 0 -relief sunken]
set frmSrchEnt [frame $frmSearch.frmScrhEnt -border 0 -relief sunken]
set frmSrchScrollX [frame $frmSearch.frmScrhScrollX -border 0 -relief sunken]
pack $frmSrchEnt -side top -fill x
pack $frmSrchList -side top -fill both -expand true
pack $frmSrchScrollX -side top -fill x
entry $frmSrchEnt.entSearch
set lstSearch [listbox $frmSrchList.lstSearch -font $fontNormal\
-yscrollcommand\
{.help.frmBody.frmCat.nBookTree.fhlpSearch.frmScrhList.scrListY set}\
-xscrollcommand\
{.help.frmBody.frmCat.nBookTree.fhlpSearch.frmScrhScrollX.scrListX set}\
-selectmode single -selectbackground #55c4d1\
-selectborderwidth 0]
scrollbar $frmSrchList.scrListY -command\
{$frmSrchList.lstSearch yview} -borderwidth {1} -width {10} -takefocus 0
pack $frmSrchEnt.entSearch -side top -fill x -expand true
pack $frmSrchList.lstSearch -side left -fill both -expand true
pack $frmSrchList.scrListY -side left -fill y
scrollbar $frmSrchScrollX.scrListX -orient horizontal -command\
{$frmSrchList.lstSearch xview} -borderwidth {1} -width {10} -takefocus 0
pack $frmSrchScrollX.scrListX -fill x
# $hlpTree bindText <ButtonRelease-4> [puts %k]
# $hlpTree bindText <ButtonRelease-3> [puts %k]
# bind $frmTree <ButtonPress-4> {$frmSrchList.lstSearch xview}
# $hlpTree bindText <Double-ButtonPress-1> "HlpTreeDoubleClick [$hlpTree selection get]"
# $hlpTree bindImage <Double-ButtonPress-1> "HlpTreeDoubleClick [$hlpTree selection get]"
$hlpTree bindText <ButtonPress-1> "HlpTreeOneClick [$hlpTree selection get]"
$hlpTree bindImage <ButtonPress-1> "HlpTreeOneClick [$hlpTree selection get]"
bind .help <Escape> "destroy .help"
# bind $frmSrchEnt.entSearch <KeyRelease>\
# {SearchWord [Text .help.frmBody.frmCat.nBookTree.fhlpSearch.frmScrhEnt.entSearch]}
#bind $w <Escape> exit
#bind $frmTree <Down> {TreeClick [$hlpTree selection get]}
#bind $frmTree <Up> {TreeClick [$hlpTree selection get]}
#bind $frmTree <Return> {TreeClick [$hlpTree selection get]}
bind $frmTree.tree.c <Button-4> "$hlpTree yview scroll -3 units"
bind $frmTree.tree.c <Button-5> "$hlpTree yview scroll 3 units"
bind $frmTree.tree.c <Shift-Button-4> "$hlpTree xview scroll -2 units"
bind $frmTree.tree.c <Shift-Button-5> "$hlpTree xview scroll 2 units"
set hlpNoteBook [NoteBook $frmWork.hlpNoteBook -font $fontNormal]
pack $hlpNoteBook -fill both -expand true -padx 2 -pady 2
GetTOC
}
}
##################################################
#TopLevelHelp
#GetTOC
#GetContent $docDir/tcl.toc.html

219
highlight/caml.tcl Normal file
View File

@ -0,0 +1,219 @@
###########################################################
# Tcl/Tk Project Manager #
# version 0.0.1 #
# TCL highlight file #
# Copyright (c) "CONERO lab", 2001, http://conero.lrn.ru #
# Author: Sergey Kalinin (aka BanZaj) banzaj@lrn.ru #
###########################################################
set beginQuote "0.0"
set endQuote "2.0"
set endQuotePrev "0.0"
proc HighLightML {text line lineNumber node} {
global fontNormal fontBold editorFontBold tree imgDir noteBook
global editor color
global beginQuote endQuote endQuotePrev
set startIndex 0
$text tag configure bold -font $editor(fontBold)
$text tag configure className -font $editor(fontBold) -foreground $color(procName)
$text tag configure keyWord -foreground $color(keyWord)
$text tag configure comments -foreground $color(comments)
$text tag configure variable -foreground $color(var)
$text tag configure string -foreground $color(string)
$text tag configure braceHighLight -font $editor(fontBold)\
-foreground $color(braceBG) -background $color(braceFG)
$text tag configure brace -foreground $color(brace)
$text tag configure percent -foreground $color(percent)
$text tag configure bindKey -foreground $color(bindKey)
$text tag configure sql -font $editor(fontBold) -foreground $color(sql)
set keyWord [info commands]
# for OOP extention
foreach n {let match compile load exception function bol begin end then type done with class method attribute constructor destructor invariant attribute binding new delete extends final finally implements import interface native new private protected public static super this throw synchronized throws transient try volatile void else} {lappend keyWord $n}
set dataType {list abstract boolean byte char double float int long short}
set sqlOperators {select from where and or count sum in order cast as by}
set a ""
set startPos 0
set endPos 0
set length 0
set workLine $line
set className ""
while {$workLine != ""} {
if {[regexp "(^|\t| )\[a-zA-Z\\_:\]+" $workLine word]} {
set length [string length $word]
set startPos [string first [string trim $word] $line]
set endPos [expr $startPos + $length]
set workLine [string range $workLine $length end]
if {[lsearch $keyWord [string trim $word]] != -1} {
$text tag add keyWord $lineNumber.$startPos $lineNumber.$endPos
}
if {[lsearch $dataType [string trim $word]] != -1} {
$text tag add bold $lineNumber.$startPos $lineNumber.$endPos
}
if {[lsearch $sqlOperators [string trim $word]] != -1} {
$text tag add sql $lineNumber.$startPos $lineNumber.$endPos
}
if {[string trim $word]=="let" || [string trim $word]=="extends" || [string trim $word]=="implements"} {
$text tag add className $lineNumber.[expr $startPos + $length] $lineNumber.[string wordend $line [expr $startPos + $length +2]]
}
set startPos [expr $endPos + 1]
} else {
break
}
}
# key binding highlight
set startPos 0
set workLine $line
while {$workLine != ""} {
if {[regexp "<.*?>" $workLine a b]} {
set start [string first $a $workLine]
set end $start
incr end [string length $a]
set workLine [string range $workLine $end end]
incr start $startPos
incr end $startPos
$text tag add bindKey $lineNumber.$start $lineNumber.$end
set startPos $end
} else {
break
}
}
# variable highlight #
set startPos 0
set workLine $line
while {$workLine != ""} {
if {[regexp "\\$\[a-zA-Z\\_:\]+" $workLine a]} {
set start [string first $a $workLine]
set end $start
incr end [string length $a]
set workLine [string range $workLine $end end]
incr start $startPos
incr end $startPos
if {$a != ""} {
$text tag add variable $lineNumber.$start $lineNumber.$end
}
set startPos $end
} else {
break
}
}
# string " " highlight
set startPos 0
set workLine $line
while {$workLine != ""} {
if {[regexp "\".*?\"" $workLine a b]} {
set start [string first $a $workLine]
set end $start
incr end [string length $a]
set workLine [string range $workLine $end end]
incr start $startPos
incr end $startPos
$text tag add string $lineNumber.$start $lineNumber.$end
set startPos $end
} else {
break
}
}
# persent % highlight
set startPos 0
set workLine $line
while {$workLine != ""} {
# if {[regexp "\%.*? " $workLine a b]}
if {[regexp "\%" $workLine a b]} {
set start [string first $a $workLine]
set end $start
incr end [string length $a]
set workLine [string range $workLine $end end]
incr start $startPos
incr end $startPos
$text tag add percent $lineNumber.$start $lineNumber.$end
set startPos $end
} else {
break
}
}
## COMENTS ##
set workLine [$text get $lineNumber.0 $lineNumber.end]
if {[regexp -indices {(^|\t|;| )\(\*} $workLine begin]} {
set p [lindex $begin 0]
$text tag add comments $lineNumber.[expr $p - 0] $lineNumber.end
} elseif {[regexp -indices {(^|\t|;| )\*} $workLine beginIndex]} {
set beginQuote "$lineNumber.[lindex $beginIndex 0]"
set endQuote [$text search -forward -regexp -- {\*\)} $beginQuote end]
if {$endQuote != ""} {
$text tag add comments $beginQuote "$endQuote + 2 chars"
} else {
$text tag add comments $beginQuote end
}
set endQuotePrev [$text search -backward -regexp -- {\*\)} [expr $lineNumber - 1].end 0.0]
if {$endQuotePrev != ""} {
$text tag remove comments "$endQuotePrev + 2 chars" $beginQuote
}
} elseif {[regexp -indices {\*\)} $workLine endIndex]} {
set endQuote "$lineNumber.[lindex $endIndex 1]"
set beginQuote [$text search -backward -regexp -- {\(\*} $endQuote 0.0]
if {$beginQuote != ""} {
$text tag add comments $beginQuote "$endQuote + 1 chars"
} else {
$text tag add comments 0.0 "$endQuote + 1 chars"
}
set beginQuoteNext [$text search -forward -regexp -- {\(\*} $endQuote end]
if {$beginQuoteNext != ""} {
$text tag remove comments "$endQuote + 2 chars" $beginQuoteNext
}
} else {
if {[lindex [split $beginQuote "."] 0] <= $lineNumber && [lindex [split $endQuote "."] 0] >= $lineNumber} {
#$text tag add comments $lineNumber.0 $lineNumber.end
} else {
$text tag remove comments $lineNumber.0 $lineNumber.end
}
}
# DEDERER
# hightlight [, {, }, ], ( , )
set startPos 0
set workLine $line
while {$workLine != ""} {
if {[regexp {\(|\[|{|}|\]|\)} $workLine a b]} {
set start [string first $a $workLine]
set end $start
incr end [string length $a]
set workLine [string range $workLine $end end]
incr start $startPos
incr end $startPos
$text tag add bold $lineNumber.$start $lineNumber.$end
set startPos $end
} else {
break
}
}
# parameter for command hightlight
set startPos 0
set workLine $line
while {$workLine != ""} {
if {[regexp -- {\s-\w+(?=\s)} $workLine a b]} {
set start [expr [string first $a $workLine] + 1]
set end $start
incr end [string length $a]
set workLine [string range $workLine $end end]
incr start $startPos
incr end $startPos
$text tag add bindKey $lineNumber.$start $lineNumber.$end
set startPos $end
} else {
break
}
}
}

220
highlight/erlang.tcl Normal file
View File

@ -0,0 +1,220 @@
###########################################################
# Tcl/Tk Project Manager #
# version 0.0.1 #
# TCL highlight file #
# Copyright (c) "CONERO lab", 2001, http://conero.lrn.ru #
# Author: Sergey Kalinin (aka BanZaj) banzaj@lrn.ru #
###########################################################
set beginQuote "0.0"
set endQuote "2.0"
set endQuotePrev "0.0"
proc HighLightErl {text line lineNumber node} {
global fontNormal fontBold editorFontBold tree imgDir noteBook
global editor color
global beginQuote endQuote endQuotePrev
set startIndex 0
$text tag configure bold -font $editor(fontBold)
$text tag configure className -font $editor(fontBold) -foreground $color(procName)
$text tag configure keyWord -foreground $color(keyWord)
$text tag configure comments -foreground $color(comments)
$text tag configure variable -foreground $color(var)
$text tag configure string -foreground $color(string)
$text tag configure braceHighLight -font $editor(fontBold)\
-foreground $color(braceBG) -background $color(braceFG)
$text tag configure brace -foreground $color(brace)
$text tag configure percent -foreground $color(percent)
$text tag configure bindKey -foreground $color(bindKey)
$text tag configure sql -font $editor(fontBold) -foreground $color(sql)
set keyWord [info commands]
# for OOP extention
foreach n {let match compile load exception function bol begin end then type done with class method attribute constructor destructor invariant attribute binding new delete extends final finally implements import interface native new private protected public static super this throw synchronized throws transient try volatile void else} {lappend keyWord $n}
set dataType {list abstract boolean byte char double float int long short}
set sqlOperators {select from where and or count sum in order cast as by}
set a ""
set startPos 0
set endPos 0
set length 0
set workLine $line
set className ""
while {$workLine != ""} {
if {[regexp "(^|\t| )\[a-zA-Z\\_:\]+" $workLine word]} {
set length [string length $word]
set startPos [string first [string trim $word] $line]
set endPos [expr $startPos + $length]
set workLine [string range $workLine $length end]
if {[lsearch $keyWord [string trim $word]] != -1} {
$text tag add keyWord $lineNumber.$startPos $lineNumber.$endPos
}
if {[lsearch $dataType [string trim $word]] != -1} {
$text tag add bold $lineNumber.$startPos $lineNumber.$endPos
}
if {[lsearch $sqlOperators [string trim $word]] != -1} {
$text tag add sql $lineNumber.$startPos $lineNumber.$endPos
}
if {[string trim $word]=="let" || [string trim $word]=="extends" || [string trim $word]=="implements"} {
$text tag add className $lineNumber.[expr $startPos + $length] $lineNumber.[string wordend $line [expr $startPos + $length +2]]
}
set startPos [expr $endPos + 1]
} else {
break
}
}
# key binding highlight
set startPos 0
set workLine $line
while {$workLine != ""} {
if {[regexp "<.*?>" $workLine a b]} {
set start [string first $a $workLine]
set end $start
incr end [string length $a]
set workLine [string range $workLine $end end]
incr start $startPos
incr end $startPos
$text tag add bindKey $lineNumber.$start $lineNumber.$end
set startPos $end
} else {
break
}
}
# variable highlight #
set startPos 0
set workLine $line
while {$workLine != ""} {
if {[regexp "\\$\[a-zA-Z\\_:\]+" $workLine a]} {
set start [string first $a $workLine]
set end $start
incr end [string length $a]
set workLine [string range $workLine $end end]
incr start $startPos
incr end $startPos
if {$a != ""} {
$text tag add variable $lineNumber.$start $lineNumber.$end
}
set startPos $end
} else {
break
}
}
# string " " highlight
set startPos 0
set workLine $line
while {$workLine != ""} {
if {[regexp "\".*?\"" $workLine a b]} {
set start [string first $a $workLine]
set end $start
incr end [string length $a]
set workLine [string range $workLine $end end]
incr start $startPos
incr end $startPos
$text tag add string $lineNumber.$start $lineNumber.$end
set startPos $end
} else {
break
}
}
# persent % highlight
set startPos 0
set workLine $line
while {$workLine != ""} {
# if {[regexp "\%.*? " $workLine a b]}
if {[regexp "\%" $workLine a b]} {
set start [string first $a $workLine]
set end $start
incr end [string length $a]
set workLine [string range $workLine $end end]
incr start $startPos
incr end $startPos
$text tag add percent $lineNumber.$start $lineNumber.$end
set startPos $end
} else {
break
}
}
## COMENTS ##
set workLine [$text get $lineNumber.0 $lineNumber.end]
if {[regexp -indices {(^|\t|;| )\(\*} $workLine begin]} {
set p [lindex $begin 0]
$text tag add comments $lineNumber.[expr $p - 0] $lineNumber.end
} elseif {[regexp -indices {(^|\t|;| )\*} $workLine beginIndex]} {
set beginQuote "$lineNumber.[lindex $beginIndex 0]"
set endQuote [$text search -forward -regexp -- {\*\)} $beginQuote end]
if {$endQuote != ""} {
$text tag add comments $beginQuote "$endQuote + 2 chars"
} else {
$text tag add comments $beginQuote end
}
set endQuotePrev [$text search -backward -regexp -- {\*\)} [expr $lineNumber - 1].end 0.0]
if {$endQuotePrev != ""} {
$text tag remove comments "$endQuotePrev + 2 chars" $beginQuote
}
} elseif {[regexp -indices {\*\)} $workLine endIndex]} {
set endQuote "$lineNumber.[lindex $endIndex 1]"
set beginQuote [$text search -backward -regexp -- {\(\*} $endQuote 0.0]
if {$beginQuote != ""} {
$text tag add comments $beginQuote "$endQuote + 1 chars"
} else {
$text tag add comments 0.0 "$endQuote + 1 chars"
}
set beginQuoteNext [$text search -forward -regexp -- {\(\*} $endQuote end]
if {$beginQuoteNext != ""} {
$text tag remove comments "$endQuote + 2 chars" $beginQuoteNext
}
} else {
if {[lindex [split $beginQuote "."] 0] <= $lineNumber && [lindex [split $endQuote "."] 0] >= $lineNumber} {
#$text tag add comments $lineNumber.0 $lineNumber.end
} else {
$text tag remove comments $lineNumber.0 $lineNumber.end
}
}
# DEDERER
# hightlight [, {, }, ], ( , )
set startPos 0
set workLine $line
while {$workLine != ""} {
if {[regexp {\(|\[|{|}|\]|\)} $workLine a b]} {
set start [string first $a $workLine]
set end $start
incr end [string length $a]
set workLine [string range $workLine $end end]
incr start $startPos
incr end $startPos
$text tag add bold $lineNumber.$start $lineNumber.$end
set startPos $end
} else {
break
}
}
# parameter for command hightlight
set startPos 0
set workLine $line
while {$workLine != ""} {
if {[regexp -- {\s-\w+(?=\s)} $workLine a b]} {
set start [expr [string first $a $workLine] + 1]
set end $start
incr end [string length $a]
set workLine [string range $workLine $end end]
incr start $startPos
incr end $startPos
$text tag add bindKey $lineNumber.$start $lineNumber.$end
set startPos $end
} else {
break
}
}
}

214
highlight/fortran.tcl Normal file
View File

@ -0,0 +1,214 @@
###########################################################
# Tcl/Tk Project Manager #
# version 0.0.1 #
# TCL highlight file #
# Copyright (c) "CONERO lab", 2001, http://conero.lrn.ru #
# Author: Sergey Kalinin (aka BanZaj) banzaj@lrn.ru #
###########################################################
set beginQuote "0.0"
set endQuote "2.0"
set endQuotePrev "0.0"
proc HighLightFORTRAN {text line lineNumber node} {
global fontNormal fontBold editorFontBold tree imgDir noteBook
global editor color
global beginQuote endQuote endQuotePrev
set startIndex 0
$text tag configure bold -font $editor(fontBold)
$text tag configure className -font $editor(fontBold) -foreground $color(procName)
$text tag configure keyWord -foreground $color(keyWord)
$text tag configure comments -foreground $color(comments) ;#-background $editor(bg)
$text tag configure variable -foreground $color(var)
$text tag configure string -foreground $color(string)
$text tag configure braceHighLight -font $editor(fontBold)\
-foreground $color(braceBG) -background $color(braceFG)
$text tag configure brace -foreground $color(brace)
$text tag configure percent -foreground $color(percent)
$text tag configure bindKey -foreground $color(bindKey)
$text tag configure label -background $color(label)
$text tag configure six -foreground $color(sixFG) -background $color(sixBG)
$text tag configure operator -background $editor(bg)
set keyWord [info commands]
# for OOP extention
foreach n {program function subroutine entry block data implicit integer real double precision complex\
logical character dimension common equivalence parameter external intrinsic save data goto assign if then\
else elseif endif end do while enddo continue stop pause end open close read write print\
inquire rewind backspace endfile format call return include} {lappend keyWord $n}
#set dataType {list abstract boolean byte char double float int long short}
set dataType ""
set a ""
set startPos 0
set endPos 0
set length 0
set workLine $line
set className ""
while {$workLine != ""} {
if {[regexp "(^|\t| )\[a-zA-Z\\_:\]+" $workLine word]} {
set length [string length $word]
set startPos [string first [string trim $word] $line]
set endPos [expr $startPos + $length]
set workLine [string range $workLine $length end]
if {[lsearch $keyWord [string trim $word]] != -1} {
$text tag add keyWord $lineNumber.$startPos $lineNumber.$endPos
}
if {[lsearch $dataType [string trim $word]] != -1} {
$text tag add bold $lineNumber.$startPos $lineNumber.$endPos
}
if {[string trim $word]=="class" || [string trim $word]=="extends" || [string trim $word]=="implements"} {
$text tag add className $lineNumber.[expr $startPos + $length] $lineNumber.[string wordend $line [expr $startPos + $length +2]]
}
set startPos [expr $endPos + 1]
} else {
break
}
}
# key binding highlight
set startPos 0
set workLine $line
while {$workLine != ""} {
if {[regexp "<.*?>" $workLine a b]} {
set start [string first $a $workLine]
set end $start
incr end [string length $a]
set workLine [string range $workLine $end end]
incr start $startPos
incr end $startPos
$text tag add bindKey $lineNumber.$start $lineNumber.$end
set startPos $end
} else {
break
}
}
# variable highlight #
set startPos 0
set workLine $line
while {$workLine != ""} {
if {[regexp "\\$\[a-zA-Z\\_:\]+" $workLine a]} {
set start [string first $a $workLine]
set end $start
incr end [string length $a]
set workLine [string range $workLine $end end]
incr start $startPos
incr end $startPos
if {$a != ""} {
$text tag add variable $lineNumber.$start $lineNumber.$end
}
set startPos $end
} else {
break
}
}
# string " " highlight
set startPos 0
set workLine $line
while {$workLine != ""} {
if {[regexp "\".*?\"" $workLine a b] || [regexp "\'.*?\'" $workLine a b]} {
set start [string first $a $workLine]
set end $start
incr end [string length $a]
set workLine [string range $workLine $end end]
incr start $startPos
incr end $startPos
$text tag add string $lineNumber.$start $lineNumber.$end
set startPos $end
} else {
break
}
}
# persent % highlight
set startPos 0
set workLine $line
while {$workLine != ""} {
# if {[regexp "\%.*? " $workLine a b]}
if {[regexp "\%" $workLine a b]} {
set start [string first $a $workLine]
set end $start
incr end [string length $a]
set workLine [string range $workLine $end end]
incr start $startPos
incr end $startPos
$text tag add percent $lineNumber.$start $lineNumber.$end
set startPos $end
} else {
break
}
}
$text tag remove label $lineNumber.0 $lineNumber.end
$text tag add label $lineNumber.0 $lineNumber.5
$text tag remove six $lineNumber.0 $lineNumber.5
$text tag remove six $lineNumber.6 $lineNumber.end
$text tag add six $lineNumber.5 $lineNumber.6
$text tag remove operator $lineNumber.6 $lineNumber.end
$text tag add operator $lineNumber.7 $lineNumber.71
$text tag remove comments $lineNumber.72 $lineNumber.end
$text tag add comments $lineNumber.72 $lineNumber.end
## COMENTS ##
set workLine [$text get $lineNumber.0 $lineNumber.end]
#if {[regexp -indices -nocase {^(c|\*)} $workLine word]}
if {[regexp -indices -nocase {^(c|\*)} $workLine word]} {
set p [lindex $word 1]
#puts "$p $lineNumber -- $workLine"
$text tag remove label $lineNumber.0 $lineNumber.end
$text tag remove operator $lineNumber.0 $lineNumber.end
$text tag add comments $lineNumber.$p $lineNumber.end
$text tag remove six $lineNumber.5 $lineNumber.6
#puts [$text dump -tag $lineNumber.0 $lineNumber.end]
#$text tag raise comments
#puts [$text tag ranges comments]
} else {
$text tag remove comments $lineNumber.0 $lineNumber.end
}
set workLine [$text get $lineNumber.0 $lineNumber.end]
if {[regexp -indices -nocase {\!} $workLine word]} {
set p [lindex $word 1]
if {([string index $workLine [expr $p + 1]] == "\'") || ([string index $workLine [expr $p + 1]] == "\"")} {
} else {
#$text tag add comments $lineNumber.$p $lineNumber.end
}
} else {
#$text tag remove comments $lineNumber.0 $lineNumber.end
}
# DEDERER
# hightlight [, {, }, ], ( , )
set startPos 0
set workLine $line
while {$workLine != ""} {
if {[regexp {\(|\[|{|}|\]|\)} $workLine a b]} {
set start [string first $a $workLine]
set end $start
incr end [string length $a]
set workLine [string range $workLine $end end]
incr start $startPos
incr end $startPos
$text tag add bold $lineNumber.$start $lineNumber.$end
set startPos $end
} else {
break
}
}
# parameter for command hightlight
set startPos 0
set workLine $line
while {$workLine != ""} {
if {[regexp -- {\s-\w+(?=\s)} $workLine a b]} {
set start [expr [string first $a $workLine] + 1]
set end $start
incr end [string length $a]
set workLine [string range $workLine $end end]
incr start $startPos
incr end $startPos
$text tag add bindKey $lineNumber.$start $lineNumber.$end
set startPos $end
} else {
break
}
}
}

106
highlight/html.tcl Normal file
View File

@ -0,0 +1,106 @@
###########################################################
# Tcl/Tk Project Manager #
# version 0.0.1 #
# TCL highlight file #
# Copyright (c) "CONERO lab", 2001, http://conero.lrn.ru #
# Author: Sergey Kalinin (aka BanZaj) banzaj@lrn.ru #
###########################################################
proc HighLightHTML {text line lineNumber node} {
global fontNormal editorFontBold tree imgDir fontBold
global editor color
set startIndex 0
# bind text tags for highlightning #
$text tag configure bold -font $editor(fontBold)
$text tag configure procName -font $editor(fontBold) -foreground $color(procName)
$text tag configure keyWord -foreground $color(keyWord)
$text tag configure comments -foreground $color(comments)
$text tag configure variable -foreground $color(var)
$text tag configure string -foreground $color(string)
$text tag configure braceHighLight -font $editor(fontBold)\
-foreground $color(braceBG) -background $color(braceFG)
$text tag configure brace -foreground $color(brace)
$text tag configure percent -foreground $color(percent)
$text tag configure bindKey -foreground $color(bindKey)
# incr lineNumber
set keyWord [info commands]
# for OOP extention
foreach n {class method attribute constructor destructor invariant attribute binding new delete} {
lappend keyWord $n
}
# add comment #
set startPos 0
set workLine $line
while {$workLine != ""} {
if {[regexp "<\!--.+-->" $workLine a]} {
set start [string first $a $workLine]
set end $start
incr end [string length $a]
set workLine [string range $workLine $end end]
incr start $startPos
incr end $startPos
$text tag add coments $lineNumber.$start $lineNumber.$end
set startPos $end
} else {
break
}
}
# get keywords
set startPos 0
set workLine $line
while {$workLine != ""} {
if {[regexp "(</?\[a-zA-Z0-9\]+\[> \t\])|>" $workLine a]} {
set start [string first $a $workLine]
set end $start
incr end [string length $a]
set workLine [string range $workLine $end end]
incr start $startPos
incr end $startPos
$text tag add keyWord $lineNumber.$start $lineNumber.$end
set startPos $end
} else {
break
}
}
# get variables
set workLine $line
set startPos 0
while {$workLine != ""} {
if {[regexp "\[a-zA-Z0-9\]+=" $workLine a]} {
set start [string first $a $workLine]
set end $start
incr end [string length $a]
set workLine [string range $workLine $end end]
incr start $startPos
incr end $startPos
$text tag add variable $lineNumber.$start $lineNumber.$end
set startPos $end
} else {
break
}
}
# get strings
set startPos 0
set workLine $line
while {$workLine != ""} {
if {[regexp "\".+\"" $workLine a]} {
set start [string first $a $workLine]
set end $start
incr end [string length $a]
set workLine [string range $workLine $end end]
incr start $startPos
incr end $startPos
$text tag add string $lineNumber.$start $lineNumber.$end
set startPos $end
} else {
break
}
}
}

215
highlight/java.tcl Normal file
View File

@ -0,0 +1,215 @@
###########################################################
# Tcl/Tk Project Manager #
# version 0.0.1 #
# TCL highlight file #
# Copyright (c) "CONERO lab", 2001, http://conero.lrn.ru #
# Author: Sergey Kalinin (aka BanZaj) banzaj@lrn.ru #
###########################################################
set beginQuote "0.0"
set endQuote "2.0"
set endQuotePrev "0.0"
proc HighLightJAVA {text line lineNumber node} {
global fontNormal fontBold editorFontBold tree imgDir noteBook
global editor color
global beginQuote endQuote endQuotePrev
set startIndex 0
$text tag configure bold -font $editor(fontBold)
$text tag configure className -font $editor(fontBold) -foreground $color(procName)
$text tag configure keyWord -foreground $color(keyWord)
$text tag configure comments -foreground $color(comments)
$text tag configure variable -foreground $color(var)
$text tag configure string -foreground $color(string)
$text tag configure braceHighLight -font $editor(fontBold)\
-foreground $color(braceBG) -background $color(braceFG)
$text tag configure brace -foreground $color(brace)
$text tag configure percent -foreground $color(percent)
$text tag configure bindKey -foreground $color(bindKey)
$text tag configure sql -font $editor(fontBold) -foreground $color(sql)
set keyWord [info commands]
# for OOP extention
foreach n {class method attribute constructor destructor invariant attribute binding new delete extends final finally implements import interface native new private protected public static super this throw synchronized throws transient try volatile void else} {lappend keyWord $n}
set dataType {list abstract boolean byte char double float int long short}
set sqlOperators {select from where and or count sum in order cast as by}
set a ""
set startPos 0
set endPos 0
set length 0
set workLine $line
set className ""
while {$workLine != ""} {
if {[regexp "(^|\t| )\[a-zA-Z\\_:\]+" $workLine word]} {
set length [string length $word]
set startPos [string first [string trim $word] $line]
set endPos [expr $startPos + $length]
set workLine [string range $workLine $length end]
if {[lsearch $keyWord [string trim $word]] != -1} {
$text tag add keyWord $lineNumber.$startPos $lineNumber.$endPos
}
if {[lsearch $dataType [string trim $word]] != -1} {
$text tag add bold $lineNumber.$startPos $lineNumber.$endPos
}
if {[lsearch $sqlOperators [string trim $word]] != -1} {
$text tag add sql $lineNumber.$startPos $lineNumber.$endPos
}
if {[string trim $word]=="class" || [string trim $word]=="extends" || [string trim $word]=="implements"} {
$text tag add className $lineNumber.[expr $startPos + $length] $lineNumber.[string wordend $line [expr $startPos + $length +2]]
}
set startPos [expr $endPos + 1]
} else {
break
}
}
# key binding highlight
set startPos 0
set workLine $line
while {$workLine != ""} {
if {[regexp "<.*?>" $workLine a b]} {
set start [string first $a $workLine]
set end $start
incr end [string length $a]
set workLine [string range $workLine $end end]
incr start $startPos
incr end $startPos
$text tag add bindKey $lineNumber.$start $lineNumber.$end
set startPos $end
} else {
break
}
}
# variable highlight #
set startPos 0
set workLine $line
while {$workLine != ""} {
if {[regexp "\\$\[a-zA-Z\\_:\]+" $workLine a]} {
set start [string first $a $workLine]
set end $start
incr end [string length $a]
set workLine [string range $workLine $end end]
incr start $startPos
incr end $startPos
if {$a != ""} {
$text tag add variable $lineNumber.$start $lineNumber.$end
}
set startPos $end
} else {
break
}
}
# string " " highlight
set startPos 0
set workLine $line
while {$workLine != ""} {
if {[regexp "\".*?\"" $workLine a b]} {
set start [string first $a $workLine]
set end $start
incr end [string length $a]
set workLine [string range $workLine $end end]
incr start $startPos
incr end $startPos
$text tag add string $lineNumber.$start $lineNumber.$end
set startPos $end
} else {
break
}
}
# persent % highlight
set startPos 0
set workLine $line
while {$workLine != ""} {
# if {[regexp "\%.*? " $workLine a b]}
if {[regexp "\%" $workLine a b]} {
set start [string first $a $workLine]
set end $start
incr end [string length $a]
set workLine [string range $workLine $end end]
incr start $startPos
incr end $startPos
$text tag add percent $lineNumber.$start $lineNumber.$end
set startPos $end
} else {
break
}
}
## COMENTS ##
set workLine [$text get $lineNumber.0 $lineNumber.end]
if {[regexp -indices "(^|\t|;| )//" $workLine begin]} {
set p [lindex $begin 0]
$text tag add comments $lineNumber.[expr $p - 0] $lineNumber.end
} elseif {[regexp -indices {(^|\t|;| )/\*} $workLine beginIndex]} {
set beginQuote "$lineNumber.[lindex $beginIndex 0]"
set endQuote [$text search -forward -regexp -- {\*/} $beginQuote end]
if {$endQuote != ""} {
$text tag add comments $beginQuote "$endQuote + 2 chars"
} else {
$text tag add comments $beginQuote end
}
set endQuotePrev [$text search -backward -regexp -- {\*/} [expr $lineNumber - 1].end 0.0]
if {$endQuotePrev != ""} {
$text tag remove comments "$endQuotePrev + 2 chars" $beginQuote
}
} elseif {[regexp -indices {\*/} $workLine endIndex]} {
set endQuote "$lineNumber.[lindex $endIndex 1]"
set beginQuote [$text search -backward -regexp -- {/\*} $endQuote 0.0]
if {$beginQuote != ""} {
$text tag add comments $beginQuote "$endQuote + 1 chars"
} else {
$text tag add comments 0.0 "$endQuote + 1 chars"
}
set beginQuoteNext [$text search -forward -regexp -- {/\*} $endQuote end]
if {$beginQuoteNext != ""} {
$text tag remove comments "$endQuote + 2 chars" $beginQuoteNext
}
} else {
if {[lindex [split $beginQuote "."] 0] <= $lineNumber && [lindex [split $endQuote "."] 0] >= $lineNumber} {
#$text tag add comments $lineNumber.0 $lineNumber.end
} else {
$text tag remove comments $lineNumber.0 $lineNumber.end
}
}
# DEDERER
# hightlight [, {, }, ], ( , )
set startPos 0
set workLine $line
while {$workLine != ""} {
if {[regexp {\(|\[|{|}|\]|\)} $workLine a b]} {
set start [string first $a $workLine]
set end $start
incr end [string length $a]
set workLine [string range $workLine $end end]
incr start $startPos
incr end $startPos
$text tag add bold $lineNumber.$start $lineNumber.$end
set startPos $end
} else {
break
}
}
# parameter for command hightlight
set startPos 0
set workLine $line
while {$workLine != ""} {
if {[regexp -- {\s-\w+(?=\s)} $workLine a b]} {
set start [expr [string first $a $workLine] + 1]
set end $start
incr end [string length $a]
set workLine [string range $workLine $end end]
incr start $startPos
incr end $startPos
$text tag add bindKey $lineNumber.$start $lineNumber.$end
set startPos $end
} else {
break
}
}
}

204
highlight/perl.tcl Normal file
View File

@ -0,0 +1,204 @@
###########################################################
# Tcl/Tk Project Manager #
# version 0.0.1 #
# TCL highlight file #
# Copyright (c) "CONERO lab", 2001, http://conero.lrn.ru #
# Author: Sergey Kalinin (aka BanZaj) banzaj@lrn.ru #
###########################################################
set beginQuote "0.0"
set endQuote "2.0"
set endQuotePrev "0.0"
proc HighLightPERL {text line lineNumber node} {
global fontNormal fontBold editorFontBold tree imgDir noteBook
global editor color
global beginQuote endQuote endQuotePrev
set startIndex 0
$text tag configure bold -font $editor(fontBold)
$text tag configure className -font $editor(fontBold) -foreground $color(procName)
$text tag configure keyWord -foreground $color(keyWord)
$text tag configure comments -foreground $color(comments)
$text tag configure variable -foreground $color(var)
$text tag configure string -foreground $color(string)
$text tag configure braceHighLight -font $editor(fontBold)\
-foreground $color(braceBG) -background $color(braceFG)
$text tag configure brace -foreground $color(brace)
$text tag configure percent -foreground $color(percent)
$text tag configure bindKey -foreground $color(bindKey)
$text tag configure sql -font $editor(fontBold) -foreground $color(sql)
set keyWord [info commands]
# for OOP extention
foreach n {print my use sub printf substr ord class method attribute constructor destructor invariant attribute binding new delete extends final finally implements import interface native new private protected public static super this throw synchronized throws transient try volatile void else } {lappend keyWord $n}
set dataType {list abstract boolean byte char double float int long short}
set sqlOperators {select from where and or count sum in order cast as by}
set a ""
set startPos 0
set endPos 0
set length 0
set workLine $line
set className ""
while {$workLine != ""} {
if {[regexp "(^|\t| )\[a-zA-Z\\_:\]+" $workLine word]} {
set length [string length $word]
set startPos [string first [string trim $word] $line]
set endPos [expr $startPos + $length]
set workLine [string range $workLine $length end]
if {[lsearch $keyWord [string trim $word]] != -1} {
$text tag add keyWord $lineNumber.$startPos $lineNumber.$endPos
}
if {[lsearch $dataType [string trim $word]] != -1} {
$text tag add bold $lineNumber.$startPos $lineNumber.$endPos
}
if {[lsearch $sqlOperators [string trim $word]] != -1} {
$text tag add sql $lineNumber.$startPos $lineNumber.$endPos
}
if {[string trim $word]=="class" || [string trim $word]=="extends" || [string trim $word]=="implements" || [string trim $word]=="use"} {
$text tag add className $lineNumber.[expr $startPos + $length] $lineNumber.[string wordend $line [expr $startPos + $length +2]]
}
set startPos [expr $endPos + 1]
} else {
break
}
}
# key binding highlight
set startPos 0
set workLine $line
while {$workLine != ""} {
if {[regexp "<.*?>" $workLine a b]} {
set start [string first $a $workLine]
set end $start
incr end [string length $a]
set workLine [string range $workLine $end end]
incr start $startPos
incr end $startPos
$text tag add bindKey $lineNumber.$start $lineNumber.$end
set startPos $end
} else {
break
}
}
# variable highlight #
set startPos 0
set workLine $line
while {$workLine != ""} {
if {[regexp "\\$\[a-zA-Z\\_:\]+" $workLine a]} {
set start [string first $a $workLine]
set end $start
incr end [string length $a]
set workLine [string range $workLine $end end]
incr start $startPos
incr end $startPos
if {$a != ""} {
$text tag add variable $lineNumber.$start $lineNumber.$end
}
set startPos $end
} else {
break
}
}
set startPos 0
set workLine $line
while {$workLine != ""} {
if {[regexp "\\@\[a-zA-Z\\_:\]+" $workLine a]} {
set start [string first $a $workLine]
set end $start
incr end [string length $a]
set workLine [string range $workLine $end end]
incr start $startPos
incr end $startPos
if {$a != ""} {
$text tag add variable $lineNumber.$start $lineNumber.$end
}
set startPos $end
} else {
break
}
}
# string " " highlight
set startPos 0
set workLine $line
while {$workLine != ""} {
if {[regexp "\".*?\"" $workLine a b] || [regexp "\'.*?\'" $workLine a b]} {
set start [string first $a $workLine]
set end $start
incr end [string length $a]
set workLine [string range $workLine $end end]
incr start $startPos
incr end $startPos
$text tag add string $lineNumber.$start $lineNumber.$end
set startPos $end
} else {
break
}
}
# persent % highlight
set startPos 0
set workLine $line
while {$workLine != ""} {
# if {[regexp "\%.*? " $workLine a b]}
if {[regexp "\%" $workLine a b] || [regexp "(\-\>)" $workLine a b]} {
set start [string first $a $workLine]
set end $start
incr end [string length $a]
set workLine [string range $workLine $end end]
incr start $startPos
incr end $startPos
$text tag add percent $lineNumber.$start $lineNumber.$end
set startPos $end
} else {
break
}
}
## COMENTS ##
set workLine [$text get $lineNumber.0 $lineNumber.end]
if {[regexp -indices "(^|\t|;| )#" $workLine word]} {
set p [lindex $word 1]
$text tag add comments $lineNumber.$p $lineNumber.end
} else {
$text tag remove comments $lineNumber.0 $lineNumber.end
}
# DEDERER
# hightlight [, {, }, ], ( , )
set startPos 0
set workLine $line
while {$workLine != ""} {
if {[regexp {\(|\[|{|}|\]|\)} $workLine a b]} {
set start [string first $a $workLine]
set end $start
incr end [string length $a]
set workLine [string range $workLine $end end]
incr start $startPos
incr end $startPos
$text tag add bold $lineNumber.$start $lineNumber.$end
set startPos $end
} else {
break
}
}
# parameter for command hightlight
set startPos 0
set workLine $line
while {$workLine != ""} {
if {[regexp -- {\s-\w+(?=\s)} $workLine a b]} {
set start [expr [string first $a $workLine] + 1]
set end $start
incr end [string length $a]
set workLine [string range $workLine $end end]
incr start $startPos
incr end $startPos
$text tag add bindKey $lineNumber.$start $lineNumber.$end
set startPos $end
} else {
break
}
}
}

270
highlight/php.tcl Normal file
View File

@ -0,0 +1,270 @@
###########################################################
# Tcl/Tk Project Manager #
# version 0.0.1 #
# TCL highlight file #
# Copyright (c) "CONERO lab", 2001, http://conero.lrn.ru #
# Author: Sergey Kalinin (aka BanZaj) banzaj@lrn.ru #
###########################################################
proc HighLightPHP {text line lineNumber node} {
global fontNormal fontBold editorFontBold tree imgDir noteBook
global editor color
global beginQuote endQuote endQuotePrev
# set pos [$text index insert]
# set lineNumber [lindex [split $pos "."] 0]
set startIndex 0
# bind text tags for highlightning #
$text tag configure bold -font $editor(fontBold)
$text tag configure procName -font $editor(fontBold) -foreground $color(procName)
$text tag configure keyWord -foreground $color(keyWord)
$text tag configure comments -foreground $color(comments)
$text tag configure variable -foreground $color(var)
$text tag configure string -foreground $color(string)
$text tag configure braceHighLight -font $editor(fontBold)\
-foreground $color(braceBG) -background $color(braceFG)
$text tag configure brace -foreground $color(brace)
$text tag configure percent -foreground $color(percent)
$text tag configure bindKey -foreground $color(bindKey)
$text tag configure rivet -foreground $color(bindKey) -font $editor(fontBold) -foreground "#ff8800" ;#-background "#c6c6c6"
$text tag configure sql -font $editor(fontBold) -foreground $color(sql)
# incr lineNumber
set keyWord [info commands]
# for OOP extention
foreach n {class method attribute constructor destructor invariant attribute binding new delete \
mcset mc mclocale mcpreferences mcload mcunknown configure match else elseif} {
lappend keyWord $n
}
foreach n {var include_once include function case echo select from where in order by and or} {
lappend keyWord $n
}
set dataType {true false}
set sqlOperators {select from where and or count sum in order cast as by}
set a ""
set startPos 0
set endPos 0
set length 0
set workLine $line
while {$workLine != ""} {
if {[regexp "(^|\t| )\[a-zA-Z\\_:\]+" $workLine word]} {
set length [string length $word]
set startPos [string first [string trim $word] $line]
set endPos [expr $startPos + $length]
set workLine [string range $workLine $length end]
if {[lsearch $keyWord [string trim $word]] != -1} {
$text tag add keyWord $lineNumber.$startPos $lineNumber.$endPos
}
if {[lsearch $dataType [string trim $word]] != -1} {
$text tag add bold $lineNumber.$startPos $lineNumber.$endPos
}
if {[lsearch $sqlOperators [string trim $word]] != -1} {
$text tag add sql $lineNumber.$startPos $lineNumber.$endPos
}
if {[string trim $word]=="proc"} {
$text tag add procName $lineNumber.[expr $startPos + $length] $lineNumber.[string wordend $line [expr $startPos + $length +2]]
}
set startPos [expr $endPos + 1]
} else {
break
}
}
set workLine $line
while {$workLine != ""} {
if {[regexp {(\{|\[)[a-zA-Z\\_:]+} $workLine word v]} {
set word [string trim $word $v]
set length [string length $word]
set startPos [string first [string trim $word] $line]
set endPos [expr $startPos + $length]
set workLine [string range $workLine $length end]
if {[lsearch $keyWord [string trim $word]] != -1} {
$text tag add keyWord $lineNumber.$startPos $lineNumber.$endPos
}
if {[string trim $word]=="proc"} {
$text tag add procName $lineNumber.[expr $startPos + $length] $lineNumber.[string wordend $line [expr $startPos + $length +2]]
}
set startPos [expr $endPos + 1]
} else {
break
}
}
# key binding highlight
set startPos 0
set workLine $line
while {$workLine != ""} {
if {[regexp "(</?\[a-zA-Z0-9\]+\[> \t\])|>" $workLine a]} {
set start [string first $a $workLine]
set end $start
incr end [string length $a]
set workLine [string range $workLine $end end]
incr start $startPos
incr end $startPos
$text tag add keyWord $lineNumber.$start $lineNumber.$end
set startPos $end
} else {
break
}
}
# variable highlight #
set startPos 0
set workLine $line
while {$workLine != ""} {
if {[regexp "\\$\[a-zA-Z\\_:\]+" $workLine a]} {
set start [string first $a $workLine]
set end $start
incr end [string length $a]
set workLine [string range $workLine $end end]
incr start $startPos
incr end $startPos
if {$a != ""} {
$text tag add variable $lineNumber.$start $lineNumber.$end
}
set startPos $end
} else {
break
}
}
# persent % highlight
set startPos 0
set workLine $line
while {$workLine != ""} {
if {[regexp "\%" $workLine a b]} {
set start [string first $a $workLine]
set end $start
incr end [string length $a]
set workLine [string range $workLine $end end]
incr start $startPos
incr end $startPos
$text tag add percent $lineNumber.$start $lineNumber.$end
set startPos $end
} else {
break
}
}
# DEDERER
# hightlight [, {, }, ]
set startPos 0
set workLine $line
while {$workLine != ""} {
if {[regexp {\(|\[|{|}|\]|\)} $workLine a b]} {
set start [string first $a $workLine]
set end $start
incr end [string length $a]
set workLine [string range $workLine $end end]
incr start $startPos
incr end $startPos
$text tag add bold $lineNumber.$start $lineNumber.$end
set startPos $end
} else {
break
}
}
set startPos 0
set workLine $line
while {$workLine != ""} {
if {[regexp {\<\?|\?>} $workLine a b]} {
set start [string first $a $workLine]
set end $start
incr end [string length $a]
set workLine [string range $workLine $end end]
incr start $startPos
incr end $startPos
$text tag add rivet $lineNumber.$start $lineNumber.end
set startPos $end
} else {
break
}
}
# string " " highlight
set startPos 0
set workLine $line
while {$workLine != ""} {
if {[regexp "\".*?\"" $workLine a b]} {
set start [string first $a $workLine]
set end $start
incr end [string length $a]
set workLine [string range $workLine $end end]
incr start $startPos
incr end $startPos
$text tag add string $lineNumber.$start $lineNumber.$end
set startPos $end
} else {
break
}
}
# parameter for command hightlight
set startPos 0
set workLine $line
while {$workLine != ""} {
if {[regexp -- {\s-\w+(?=\s)} $workLine a b]} {
set start [expr [string first $a $workLine] + 1]
set end $start
incr end [string length $a]
set workLine [string range $workLine $end end]
incr start $startPos
incr end $startPos
$text tag add bindKey $lineNumber.$start $lineNumber.$end
set startPos $end
} else {
break
}
}
set startPos 0
set workLine $line
while {$workLine != ""} {
if {[regexp "<!.+>" $workLine a]} {
set start [string first $a $workLine]
set end $start
incr end [string length $a]
set workLine [string range $workLine $end end]
incr start $startPos
incr end $startPos
$text tag add coments $lineNumber.$start $lineNumber.$end
set startPos $end
} else {
break
}
}
# add comment #
set workLine [$text get $lineNumber.0 $lineNumber.end]
if {[regexp -indices "(^|\t|;| )//" $workLine begin]} {
set p [lindex $begin 0]
$text tag add comments $lineNumber.[expr $p - 0] $lineNumber.end
} elseif {[regexp -indices {(^|\t|;| )/\*} $workLine beginIndex]} {
set beginQuote "$lineNumber.[lindex $beginIndex 0]"
set endQuote [$text search -forward -regexp -- {\*/} $beginQuote end]
if {$endQuote != ""} {
$text tag add comments $beginQuote "$endQuote + 2 chars"
} else {
$text tag add comments $beginQuote end
}
set endQuotePrev [$text search -backward -regexp -- {\*/} [expr $lineNumber - 1].end 0.0]
if {$endQuotePrev != ""} {
$text tag remove comments "$endQuotePrev + 2 chars" $beginQuote
}
} elseif {[regexp -indices {\*/} $workLine endIndex]} {
set endQuote "$lineNumber.[lindex $endIndex 1]"
set beginQuote [$text search -backward -regexp -- {/\*} $endQuote 0.0]
if {$beginQuote != ""} {
$text tag add comments $beginQuote "$endQuote + 1 chars"
} else {
$text tag add comments 0.0 "$endQuote + 1 chars"
}
set beginQuoteNext [$text search -forward -regexp -- {/\*} $endQuote end]
if {$beginQuoteNext != ""} {
$text tag remove comments "$endQuote + 2 chars" $beginQuoteNext
}
} else {
if {[lindex [split $beginQuote "."] 0] <= $lineNumber && [lindex [split $endQuote "."] 0] >= $lineNumber} {
#$text tag add comments $lineNumber.0 $lineNumber.end
} else {
$text tag remove comments $lineNumber.0 $lineNumber.end
}
}
}

249
highlight/rivet.tcl Normal file
View File

@ -0,0 +1,249 @@
###########################################################
# Tcl/Tk Project Manager #
# version 0.0.1 #
# TCL highlight file #
# Copyright (c) "CONERO lab", 2001, http://conero.lrn.ru #
# Author: Sergey Kalinin (aka BanZaj) banzaj@lrn.ru #
###########################################################
proc HighLightRIVET {text line lineNumber node} {
global fontNormal fontBold editorFontBold tree imgDir noteBook
global editor color
# set pos [$text index insert]
# set lineNumber [lindex [split $pos "."] 0]
set startIndex 0
# bind text tags for highlightning #
$text tag configure bold -font $editor(fontBold)
$text tag configure sql -font $editor(fontBold) -foreground $color(sql)
$text tag configure procName -font $editor(fontBold) -foreground $color(procName)
$text tag configure keyWord -foreground $color(keyWord)
$text tag configure comments -foreground $color(comments)
$text tag configure variable -foreground $color(var)
$text tag configure string -foreground $color(string)
$text tag configure braceHighLight -font $editor(fontBold)\
-foreground $color(braceBG) -background $color(braceFG)
$text tag configure brace -foreground $color(brace)
$text tag configure percent -foreground $color(percent)
$text tag configure bindKey -foreground $color(bindKey)
$text tag configure rivet -foreground $color(bindKey) -font $editor(fontBold) -foreground "#ff8800" ;#-background "#c6c6c6"
# incr lineNumber
set keyWord [info commands]
# for OOP extention
foreach n {class method attribute constructor destructor invariant attribute binding new delete \
mcset mc mclocale mcpreferences mcload mcunknown configure match else elseif} {
lappend keyWord $n
}
set dataType {true false}
set sqlOperators {select from where and or count sum in order cast as by}
set a ""
set startPos 0
set endPos 0
set length 0
set workLine $line
while {$workLine != ""} {
if {[regexp "(^|\t| )\[a-zA-Z\\_:\]+" $workLine word]} {
set length [string length $word]
set startPos [string first [string trim $word] $line]
set endPos [expr $startPos + $length]
set workLine [string range $workLine $length end]
if {[lsearch $keyWord [string trim $word]] != -1} {
$text tag add keyWord $lineNumber.$startPos $lineNumber.$endPos
}
if {[lsearch $dataType [string trim $word]] != -1} {
$text tag add bold $lineNumber.$startPos $lineNumber.$endPos
}
if {[lsearch $sqlOperators [string tolower [string trim $word]]] != -1} {
$text tag add sql $lineNumber.$startPos $lineNumber.[expr $endPos - 1]
}
if {[string trim $word]=="proc"} {
$text tag add procName $lineNumber.[expr $startPos + $length] $lineNumber.[string wordend $line [expr $startPos + $length +2]]
}
set startPos [expr $endPos + 1]
} else {
break
}
}
set workLine $line
while {$workLine != ""} {
if {[regexp {(\{|\[)[a-zA-Z\\_:]+} $workLine word v]} {
set word [string trim $word $v]
set length [string length $word]
set startPos [string first [string trim $word] $line]
set endPos [expr $startPos + $length]
set workLine [string range $workLine $length end]
if {[lsearch $keyWord [string trim $word]] != -1} {
$text tag add keyWord $lineNumber.$startPos $lineNumber.$endPos
}
if {[string trim $word]=="proc"} {
$text tag add procName $lineNumber.[expr $startPos + $length] $lineNumber.[string wordend $line [expr $startPos + $length +2]]
}
set startPos [expr $endPos + 1]
} else {
break
}
}
# key binding highlight
set startPos 0
set workLine $line
while {$workLine != ""} {
if {[regexp "(</?\[a-zA-Z0-9\]+\[> \t\])|>" $workLine a]} {
set start [string first $a $workLine]
set end $start
incr end [string length $a]
set workLine [string range $workLine $end end]
incr start $startPos
incr end $startPos
$text tag add keyWord $lineNumber.$start $lineNumber.$end
set startPos $end
} else {
break
}
}
# variable highlight #
set startPos 0
set workLine $line
while {$workLine != ""} {
if {[regexp "\\$\[a-zA-Z\\_:\]+" $workLine a]} {
set start [string first $a $workLine]
set end $start
incr end [string length $a]
set workLine [string range $workLine $end end]
incr start $startPos
incr end $startPos
if {$a != ""} {
$text tag add variable $lineNumber.$start $lineNumber.$end
}
set startPos $end
} else {
break
}
}
# string " " highlight
set startPos 0
set workLine $line
while {$workLine != ""} {
if {[regexp "\".*?\"" $workLine a b] || [regexp "\'.*?\'" $workLine a b]} {
set start [string first $a $workLine]
set end $start
incr end [string length $a]
set workLine [string range $workLine $end end]
incr start $startPos
incr end $startPos
$text tag add string $lineNumber.$start $lineNumber.$end
set startPos $end
} else {
break
}
}
# persent % highlight
set startPos 0
set workLine $line
while {$workLine != ""} {
if {[regexp "\%" $workLine a b]} {
set start [string first $a $workLine]
set end $start
incr end [string length $a]
set workLine [string range $workLine $end end]
incr start $startPos
incr end $startPos
$text tag add percent $lineNumber.$start $lineNumber.$end
set startPos $end
} else {
break
}
}
# add comment #
set workLine [$text get $lineNumber.0 $lineNumber.end]
if {[regexp -indices "(^|\t|;| )#" $workLine word]} {
set p [lindex $word 1]
$text tag add comments $lineNumber.$p $lineNumber.end
} else {
$text tag remove comments $lineNumber.0 $lineNumber.end
}
# DEDERER
# hightlight [, {, }, ]
set startPos 0
set workLine $line
while {$workLine != ""} {
if {[regexp {\(|\[|{|}|\]|\)} $workLine a b]} {
set start [string first $a $workLine]
set end $start
incr end [string length $a]
set workLine [string range $workLine $end end]
incr start $startPos
incr end $startPos
$text tag add bold $lineNumber.$start $lineNumber.$end
set startPos $end
} else {
break
}
}
set startPos 0
set workLine $line
while {$workLine != ""} {
if {[regexp {\<\?|\?>} $workLine a b]} {
set start [string first $a $workLine]
set end $start
incr end [string length $a]
set workLine [string range $workLine $end end]
incr start $startPos
incr end $startPos
$text tag add rivet $lineNumber.$start $lineNumber.end
set startPos $end
} else {
break
}
}
# parameter for command hightlight
set startPos 0
set workLine $line
while {$workLine != ""} {
if {[regexp -- {\s-\w+(?=\s)} $workLine a b]} {
set start [expr [string first $a $workLine] + 1]
set end $start
incr end [string length $a]
set workLine [string range $workLine $end end]
incr start $startPos
incr end $startPos
$text tag add bindKey $lineNumber.$start $lineNumber.$end
set startPos $end
} else {
break
}
}
set startPos 0
set workLine $line
while {$workLine != ""} {
if {[regexp "<!.+>" $workLine a]} {
set start [string first $a $workLine]
set end $start
incr end [string length $a]
set workLine [string range $workLine $end end]
incr start $startPos
incr end $startPos
$text tag add coments $lineNumber.$start $lineNumber.$end
set startPos $end
} else {
break
}
}
}

189
highlight/ruby.tcl Normal file
View File

@ -0,0 +1,189 @@
###########################################################
# Tcl/Tk Project Manager #
# version 0.0.1 #
# TCL highlight file #
# Copyright (c) "CONERO lab", 2001, http://conero.lrn.ru #
# Author: Sergey Kalinin (aka BanZaj) banzaj@lrn.ru #
###########################################################
set beginQuote "0.0"
set endQuote "2.0"
set endQuotePrev "0.0"
proc HighLightRUBY {text line lineNumber node} {
global fontNormal fontBold editorFontBold tree imgDir noteBook
global editor color
global beginQuote endQuote endQuotePrev
set startIndex 0
$text tag configure bold -font $editor(fontBold)
$text tag configure procName -font $editor(fontBold) -foreground $color(procName)
$text tag configure keyWord -foreground $color(keyWord)
$text tag configure comments -foreground $color(comments)
$text tag configure variable -foreground $color(var)
$text tag configure string -foreground $color(string)
$text tag configure braceHighLight -font $editor(fontBold)\
-foreground $color(braceBG) -background $color(braceFG)
$text tag configure brace -foreground $color(brace)
$text tag configure percent -foreground $color(percent)
$text tag configure bindKey -foreground $color(bindKey)
$text tag configure sql -font $editor(fontBold) -foreground $color(sql)
set keyWord [info commands]
# for OOP extention
foreach n {class method attribute constructor destructor invariant attribute binding new delete extends final finally implements import interface native new private protected public static super this throw synchronized throws transient try volatile void else def end slots require} {lappend keyWord $n}
set dataType {list abstract boolean byte char double float int long short}
set sqlOperators {select from where and or count sum in order cast as by}
set a ""
set startPos 0
set endPos 0
set length 0
set workLine $line
set className ""
while {$workLine != ""} {
if {[regexp "(^|\t| )\[a-zA-Z\\_:\]+" $workLine word]} {
set length [string length $word]
set startPos [string first [string trim $word] $line]
set endPos [expr $startPos + $length]
set workLine [string range $workLine $length end]
if {[lsearch $keyWord [string trim $word]] != -1} {
$text tag add keyWord $lineNumber.$startPos $lineNumber.$endPos
}
if {[lsearch $dataType [string trim $word]] != -1} {
$text tag add bold $lineNumber.$startPos $lineNumber.$endPos
}
if {[string trim $word]=="class"} {
$text tag add procName $lineNumber.[expr $startPos + $length] $lineNumber.[string wordend $line [expr $startPos + $length +2]]
puts "$text tag add procName $lineNumber.[expr $startPos + $length] $lineNumber.[string wordend $line [expr $startPos + $length +2]]"
}
set startPos [expr $endPos + 1]
} else {
break
}
}
# key binding highlight
set startPos 0
set workLine $line
while {$workLine != ""} {
if {[regexp "<.*?>" $workLine a b]} {
set start [string first $a $workLine]
set end $start
incr end [string length $a]
set workLine [string range $workLine $end end]
incr start $startPos
incr end $startPos
$text tag add bindKey $lineNumber.$start $lineNumber.$end
set startPos $end
} else {
break
}
}
# variable highlight #
set startPos 0
set workLine $line
while {$workLine != ""} {
if {[regexp "\\@\[a-zA-Z\\_:\]+" $workLine a]} {
set start [string first $a $workLine]
set end $start
incr end [string length $a]
set workLine [string range $workLine $end end]
incr start $startPos
incr end $startPos
if {$a != ""} {
$text tag add variable $lineNumber.$start $lineNumber.$end
}
set startPos $end
} else {
break
}
}
# string " " highlight
set startPos 0
set workLine $line
while {$workLine != ""} {
if {[regexp "\".*?\"" $workLine a b]} {
set start [string first $a $workLine]
set end $start
incr end [string length $a]
set workLine [string range $workLine $end end]
incr start $startPos
incr end $startPos
$text tag add string $lineNumber.$start $lineNumber.$end
set startPos $end
} else {
break
}
}
# persent % highlight
set startPos 0
set workLine $line
while {$workLine != ""} {
# if {[regexp "\%.*? " $workLine a b]}
if {[regexp "\%" $workLine a b]} {
set start [string first $a $workLine]
set end $start
incr end [string length $a]
set workLine [string range $workLine $end end]
incr start $startPos
incr end $startPos
$text tag add percent $lineNumber.$start $lineNumber.$end
set startPos $end
} else {
break
}
}
## COMENTS ##
# add comment #
set workLine [$text get $lineNumber.0 $lineNumber.end]
if {[regexp -indices "(^|\t|;| )#" $workLine word]} {
set p [lindex $word 1]
$text tag add comments $lineNumber.$p $lineNumber.end
} else {
$text tag remove comments $lineNumber.0 $lineNumber.end
}
# DEDERER
# hightlight [, {, }, ], ( , )
set startPos 0
set workLine $line
while {$workLine != ""} {
if {[regexp {\(|\[|{|}|\]|\)} $workLine a b]} {
set start [string first $a $workLine]
set end $start
incr end [string length $a]
set workLine [string range $workLine $end end]
incr start $startPos
incr end $startPos
$text tag add bold $lineNumber.$start $lineNumber.$end
set startPos $end
} else {
break
}
}
# parameter for command hightlight
set startPos 0
set workLine $line
while {$workLine != ""} {
if {[regexp -- {\s-\w+(?=\s)} $workLine a b]} {
set start [expr [string first $a $workLine] + 1]
set end $start
incr end [string length $a]
set workLine [string range $workLine $end end]
incr start $startPos
incr end $startPos
$text tag add bindKey $lineNumber.$start $lineNumber.$end
set startPos $end
} else {
break
}
}
}

136
highlight/spec.tcl Normal file
View File

@ -0,0 +1,136 @@
###########################################################
# Tcl/Tk Project Manager #
# version 0.0.1 #
# SPEC highlight file #
# Copyright (c) "CONERO lab", 2001, http://conero.lrn.ru #
# Author: Sergey Kalinin (aka BanZaj) banzaj@lrn.ru #
###########################################################
proc HighLightSPEC {text line lineNumber node} {
global fontNormal editorFontBold fontBold tree imgDir noteBook
global editor color
# set pos [$text index insert]
# set lineNumber [lindex [split $pos "."] 0]
set startIndex 0
# bind text tags for highlightning #
# foreach tag {bold procName comments string number variable} {
# $text tag remove $tag $lineNumber.0 $lineNumber.end
# }
$text tag configure bold -font $editor(fontBold)
$text tag configure procName -font $editor(fontBold) -foreground $color(procName)
$text tag configure keyWord -foreground $color(keyWord)
$text tag configure comments -foreground $color(comments)
$text tag configure variable -foreground $color(var)
$text tag configure string -foreground $color(string)
$text tag configure braceHighLight -font $editor(fontBold)\
-foreground $color(braceBG) -background $color(braceFG)
$text tag configure brace -foreground $color(brace)
$text tag configure percent -foreground $color(percent)
$text tag configure bindKey -foreground $color(bindKey)
# $text tag configure bold -font $fontBold
# $text tag configure procName -font $editorFontBold -foreground blue
# $text tag configure keyWord -foreground #0000a8
# $text tag configure comments -foreground #9b9b9b
# $text tag configure variable -foreground #e50000
# $text tag configure string -foreground #168400
# $text tag configure braceHighLight -font $editorFontBold -foreground green -background black
# $text tag configure brace -foreground brown
# $text tag configure percent -foreground #a500c6
foreach n {define name version release description prep setup build install post postun clean files defattr changelog doc} {
lappend keyWord $n
}
# add comment #
if {[string range [string trim $line] 0 0] == "#"} {
$text tag add comments $lineNumber.0 $lineNumber.end
return 0
}
set a ""
regexp "^( |\t|\%)*(\[a-z\]|\[A-Z\]|\[0-9\]|_|:|~|\\.|/)+" $line a
if {$a != ""} {
# gets name
set b ""
regexp "^( |\t|\%)*" $line b
set nameStart [string length $b]
set nameEnd [string length $a]
set name [string range $a [string length $b] end]
# is it keyword?
if {[lsearch $keyWord $name] != -1} {
incr nameStart $startIndex
incr nameEnd $startIndex
$text tag add keyWord $lineNumber.$nameStart $lineNumber.$nameEnd
}
}
# variable highlight #
set startPos 0
set workLine $line
while {$workLine != ""} {
if {[regexp "\\$\[a-zA-Z\\_:\]+" $workLine a]} {
set start [string first $a $workLine]
set end $start
incr end [string length $a]
set workLine [string range $workLine $end end]
incr start $startPos
incr end $startPos
if {$a != ""} {
$text tag add variable $lineNumber.$start $lineNumber.$end
}
set startPos $end
} else {
break
}
}
# string { } highlight
set startPos 0
set workLine $line
while {$workLine != ""} {
if {[regexp "\{.*?\}" $workLine a b]} {
set start [string first $a $workLine]
set end $start
incr end [string length $a]
set workLine [string range $workLine $end end]
incr start $startPos
incr end $startPos
$text tag add string $lineNumber.$start $lineNumber.$end
set startPos $end
} else {
break
}
}
# persent % highlight
set startPos 0
set workLine $line
while {$workLine != ""} {
# if {[regexp "\%.*? " $workLine a b]}
if {[regexp "\%" $workLine a b]} {
set start [string first $a $workLine]
set end $start
incr end [string length $a]
set workLine [string range $workLine $end end]
incr start $startPos
incr end $startPos
$text tag add percent $lineNumber.$start $lineNumber.$end
set startPos $end
} else {
break
}
}
#find [
# set i [string first "\[" $line]
# if {$i != -1} {
# incr i
# set line [string range $line $i end]
# incr i $startIndex
# set l [HighLight $text $line $i $node]
# eval lappend res $l
# }
# return $res
}

227
highlight/tcl.tcl Normal file
View File

@ -0,0 +1,227 @@
###########################################################
# Tcl/Tk Project Manager #
# version 0.0.1 #
# TCL highlight file #
# Copyright (c) "CONERO lab", 2001, http://conero.lrn.ru #
# Author: Sergey Kalinin (aka BanZaj) banzaj@lrn.ru #
###########################################################
proc HighLightTCL {text line lineNumber node} {
global fontNormal fontBold editorFontBold tree imgDir noteBook
global editor color
# set pos [$text index insert]
# set lineNumber [lindex [split $pos "."] 0]
set startIndex 0
# bind text tags for highlightning #
$text tag configure bold -font $editor(fontBold)
$text tag configure procName -font $editor(fontBold) -foreground $color(procName)
$text tag configure keyWord -foreground $color(keyWord)
$text tag configure comments -foreground $color(comments)
$text tag configure variable -foreground $color(var)
$text tag configure string -foreground $color(string)
$text tag configure braceHighLight -font $editor(fontBold)\
-foreground $color(braceBG) -background $color(braceFG)
$text tag configure brace -foreground $color(brace)
$text tag configure bracequad -foreground $color(bracequad)
$text tag configure percent -foreground $color(percent)
$text tag configure bindKey -foreground $color(bindKey)
# incr lineNumber
set keyWord [info commands]
# for OOP extention
foreach n {class method attribute constructor destructor invariant attribute binding new delete \
mcset mc mclocale mcpreferences mcload mcunknown configure match else elseif} {
lappend keyWord $n
}
set dataType {true false}
set a ""
set startPos 0
set endPos 0
set length 0
set workLine $line
while {$workLine != ""} {
if {[regexp "(^|\t| )\[a-zA-Z\\_:\]+" $workLine word]} {
set length [string length $word]
set startPos [string first [string trim $word] $line]
set endPos [expr $startPos + $length]
set workLine [string range $workLine $length end]
if {[lsearch $keyWord [string trim $word]] != -1} {
$text tag add keyWord $lineNumber.$startPos $lineNumber.$endPos
}
if {[lsearch $dataType [string trim $word]] != -1} {
$text tag add bold $lineNumber.$startPos $lineNumber.$endPos
}
if {[string trim $word]=="proc"} {
$text tag add procName $lineNumber.[expr $startPos + $length] $lineNumber.[string wordend $line [expr $startPos + $length +2]]
}
set startPos [expr $endPos + 1]
} else {
break
}
}
set workLine $line
while {$workLine != ""} {
if {[regexp {(\{|\[)[a-zA-Z\\_:]+} $workLine word v]} {
set word [string trim $word $v]
set length [string length $word]
set startPos [string first [string trim $word] $line]
set endPos [expr $startPos + $length]
set workLine [string range $workLine $length end]
if {[lsearch $keyWord [string trim $word]] != -1} {
$text tag add keyWord $lineNumber.$startPos $lineNumber.$endPos
}
if {[string trim $word]=="proc"} {
$text tag add procName $lineNumber.[expr $startPos + $length] $lineNumber.[string wordend $line [expr $startPos + $length +2]]
}
set startPos [expr $endPos + 1]
} else {
break
}
}
# key binding highlight
set startPos 0
set workLine $line
while {$workLine != ""} {
if {[regexp "<.*?>" $workLine a b]} {
set start [string first $a $workLine]
set end $start
incr end [string length $a]
set workLine [string range $workLine $end end]
incr start $startPos
incr end $startPos
$text tag add bindKey $lineNumber.$start $lineNumber.$end
set startPos $end
} else {
break
}
}
# variable highlight #
set startPos 0
set workLine $line
while {$workLine != ""} {
if {[regexp "\\$\[a-zA-Z\\_:\]+" $workLine a]} {
set start [string first $a $workLine]
set end $start
incr end [string length $a]
set workLine [string range $workLine $end end]
incr start $startPos
incr end $startPos
if {$a != ""} {
$text tag add variable $lineNumber.$start $lineNumber.$end
}
set startPos $end
} else {
break
}
}
# string " " highlight
set startPos 0
set workLine $line
while {$workLine != ""} {
if {[regexp "\".*?\"" $workLine a b]} {
set start [string first $a $workLine]
set end $start
incr end [string length $a]
set workLine [string range $workLine $end end]
incr start $startPos
incr end $startPos
$text tag add string $lineNumber.$start $lineNumber.$end
set startPos $end
} else {
break
}
}
# persent % highlight
set startPos 0
set workLine $line
while {$workLine != ""} {
if {[regexp "\%" $workLine a b]} {
set start [string first $a $workLine]
set end $start
incr end [string length $a]
set workLine [string range $workLine $end end]
incr start $startPos
incr end $startPos
$text tag add percent $lineNumber.$start $lineNumber.$end
set startPos $end
} else {
break
}
}
set startPos 0
set workLine $line
while {$workLine != ""} {
if {[regexp "\{|\}" $workLine a b]} {
set start [string first $a $workLine]
set end $start
incr end [string length $a]
set workLine [string range $workLine $end end]
incr start $startPos
incr end $startPos
$text tag add brace $lineNumber.$start $lineNumber.$end
set startPos $end
} else {
break
}
}
# add comment #
set workLine [$text get $lineNumber.0 $lineNumber.end]
if {[regexp -indices "(^|\t|;| )#" $workLine word]} {
set p [lindex $word 1]
$text tag add comments $lineNumber.$p $lineNumber.end
} else {
$text tag remove comments $lineNumber.0 $lineNumber.end
}
# DEDERER
# hightlight [, {, }, ]
set startPos 0
set workLine $line
while {$workLine != ""} {
if {[regexp {\(|\[|\]|\)} $workLine a b]} {
set start [string first $a $workLine]
set end $start
incr end [string length $a]
set workLine [string range $workLine $end end]
incr start $startPos
incr end $startPos
$text tag add bracequad $lineNumber.$start $lineNumber.$end
set startPos $end
} else {
break
}
}
# parameter for command hightlight
set startPos 0
set workLine $line
while {$workLine != ""} {
if {[regexp -- {\s-\w+(?=\s)} $workLine a b]} {
set start [expr [string first $a $workLine] + 1]
set end $start
incr end [string length $a]
set workLine [string range $workLine $end end]
incr start $startPos
incr end $startPos
$text tag add bindKey $lineNumber.$start $lineNumber.$end
set startPos $end
} else {
break
}
}
}

114
highlight/tex.tcl Normal file
View File

@ -0,0 +1,114 @@
###########################################################
# Tcl/Tk Project Manager #
# version 0.0.1 #
# TCL highlight file #
# Copyright (c) "CONERO lab", 2001, http://conero.lrn.ru #
# Author: Sergey Kalinin (aka BanZaj) banzaj@lrn.ru #
###########################################################
proc HighLightTEX {text line lineNumber node} {
global tree color noteBook
global editor
$text tag configure bold -font $editor(fontBold)
$text tag configure procName -font $editor(fontBold) -foreground $color(procName)
$text tag configure param -foreground $color(param)
$text tag configure subParam -foreground $color(subParam)
$text tag configure keyWord -foreground $color(keyWord)
$text tag configure comments -foreground $color(comments)
$text tag configure variable -foreground $color(var)
$text tag configure string -foreground $color(string)
$text tag configure brace -foreground $color(brace)
$text tag configure percent -foreground $color(percent)
$text tag configure bindKey -foreground $color(bindKey)
$text tag configure lightBracket -background $color(braceBG) -foreground $color(braceFG)
set startIndex 0
set keyWord [info commands]
# for OOP extention
foreach n {class method attribute constructor destructor invariant attribute binding new delete} {
lappend keyWord $n
}
set startPos 0
set workLine $line
regexp -nocase -all -- {(\\)([a-zA-Z])*} string match v1 v2
while {$workLine != ""} {
if {[regexp -nocase -all {(\\)([a-zA-Z])*} $workLine a b c]} {
set start [string first $a $workLine]
set end $start
incr end [string length $a]
set workLine [string range $workLine $end end]
incr start $startPos
incr end $startPos
$text tag add keyWord $lineNumber.$start $lineNumber.$end
set startPos $end
} else {
break
}
}
# string " " highlight
set startPos 0
set workLine $line
while {$workLine != ""} {
if {[regexp "\".*?\"" $workLine a b]} {
set start [string first $a $workLine]
set end $start
incr end [string length $a]
set workLine [string range $workLine $end end]
incr start $startPos
incr end $startPos
$text tag add string $lineNumber.$start $lineNumber.$end
set startPos $end
} else {
break
}
}
set startPos 0
set workLine $line
while {$workLine != ""} {
if {[regexp {\{.*?\}} $workLine a b]} {
set start [string first $a $workLine]
set end $start
incr end [string length $a]
set workLine [string range $workLine $end end]
incr start [expr $startPos +1]
incr end [expr $startPos - 1]
$text tag add param $lineNumber.$start $lineNumber.$end
set startPos $end
} else {
break
}
}
set startPos 0
set workLine $line
while {$workLine != ""} {
if {[regexp {\[.*?\]} $workLine a b]} {
set start [string first $a $workLine]
set end $start
incr end [string length $a]
set workLine [string range $workLine $end end]
incr start [expr $startPos + 1]
incr end [expr $startPos - 1]
$text tag add subParam $lineNumber.$start $lineNumber.$end
set startPos $end
} else {
break
}
}
# add comment #
if [regexp -nocase -all -indices -- {%} $line pos] {
set cur [lindex $pos 1]
$text tag add comments $lineNumber.$cur $lineNumber.end
return 0
}
}

16
hlp/ab.htm Normal file
View File

@ -0,0 +1,16 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>about</title>
</head>
<body>
<center><h1>Документация</h1></center>
<p>Документация предоставлена компанией
<b><a href="http://www.florin.ru">DataX/FLORIN, Inc.</a></b>
<P>&copy; Все права защищены 1992-2001.
<p>Разрешается не коммерческое использование документации как целиком так и отдельных частей с разрешения авторов и с обязательной ссылкой на
<b><a href="http://www.florin.ru">DataX/FLORIN, Inc.</a></b> и на
<b><a href="http://conero.lrn.ru">CONERO lab</a></b>
</body>
</html>

View File

@ -0,0 +1,276 @@
<HTML>
<HEAD><TITLE>ArrowButton</TITLE></HEAD>
<BODY BGCOLOR=white>
<DL><DT><I><A HREF="#descr">NAME</A></I></DT>
<DD><B>ArrowButton</B>
- Button widget with an arrow shape.
</DD></DL>
<DL>
<DT><I>CREATION</I></DT>
<DD><A HREF="#descr"><B>ArrowButton</B></A> <I>pathName</I> ?<I>option value...</I>?</DD>
</DL>
<DL>
<DT><I>STANDARD OPTIONS</I></DT>
<DD><TABLE CELLSPACING=0 CELLSPACING=0 BORDER=0>
<TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-activebackground">-activebackground</A></TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-activeforeground">-activeforeground</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-background">-background or -bg</A></TD>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-borderwidth">-borderwidth or -bd</A></TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-disabledforeground">-disabledforeground</A></TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-foreground">-foreground or -fg</A></TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-highlightbackground">-highlightbackground</A></TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-highlightcolor">-highlightcolor</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-highlightthickness">-highlightthickness</A></TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-relief">-relief</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-repeatdelay">-repeatdelay</A></TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-repeatinterval">-repeatinterval</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-takefocus">-takefocus</A></TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-troughcolor">-troughcolor</A></TR>
</TR>
</TABLE></DD>
</DL>
<DL>
<DT><I><A HREF="#wso">WIDGET-SPECIFIC OPTIONS</A></I></DT>
<DD><TABLE CELLSPACING=0 CELLSPACING=0 BORDER=0>
<TR>
<TD>&nbsp;&nbsp;<A HREF="#-armcommand">-armcommand</A></TR>
<TD>&nbsp;&nbsp;<A HREF="#-arrowbd">-arrowbd</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="#-arrowrelief">-arrowrelief</A></TR>
<TD>&nbsp;&nbsp;<A HREF="#-clean">-clean</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="#-command">-command</A></TR>
<TD>&nbsp;&nbsp;<A HREF="#-dir">-dir</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="#-disarmcommand">-disarmcommand</A></TR>
<TD>&nbsp;&nbsp;<A HREF="#-height">-height</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="#-helptext">-helptext</A></TR>
<TD>&nbsp;&nbsp;<A HREF="#-helptype">-helptype</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="#-helpvar">-helpvar</A></TR>
<TD>&nbsp;&nbsp;<A HREF="#-ipadx">-ipadx</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="#-ipady">-ipady</A></TR>
<TD>&nbsp;&nbsp;<A HREF="#-state">-state</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="#-type">-type</A></TR>
<TD>&nbsp;&nbsp;<A HREF="#-width">-width</A></TR>
</TR>
</TABLE></DD>
</DL>
<DL>
<DT><I><A HREF="#wc">WIDGET COMMAND</A></I></DT>
<DD><I>pathName</I> <A HREF="#cget"><B>cget</B></A>
<I>option</I>
</DD>
<DD><I>pathName</I> <A HREF="#configure"><B>configure</B></A>
?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
</DD>
<DD><I>pathName</I> <A HREF="#invoke"><B>invoke</B></A>
</DD>
</DL>
<BR><HR WIDTH="100%"><BR>
<B><A NAME="descr"></A>DESCRIPTION</B><BR>
<P>
ArrowButton can be of two types following <B>type</B> option:
for <B>button</B> type, it is standard button with an arrow drawn on it;
for <B>arrow</B> type, it is an arrow like scrollbar's arrow.
</P>
<BR><HR WIDTH="50%"><BR>
<B><A NAME="wso">WIDGET-SPECIFIC OPTIONS</A></B><BR>
<DL><DT><A NAME="-armcommand"><B>-armcommand</B></A></DT>
<DD>
Specifies a Tcl command to associate with the ArrowButton when mouse button 1 is pressed
over the ArrowButton. When <B>repeatdelay</B> or <B>repeatinterval</B> option is positive
integer, this command is repeatedly called if mouse pointer is over the button and until
mouse button 1 is released.
</DD>
</DL>
<DL><DT><A NAME="-arrowbd"><B>-arrowbd</B></A></DT>
<DD>
When ArrowButton <B>type</B> is <I>arrow</I>, specifies the border width of the
arrow. Must be 1 or 2.
</DD>
</DL>
<DL><DT><A NAME="-arrowrelief"><B>-arrowrelief</B></A></DT>
<DD>
When ArrowButton <B>type</B> is <I>arrow</I>, specifies the relief of the arrow.
Must be <B>raised</B> or <B>sunken</B>.
</DD>
</DL>
<DL><DT><A NAME="-clean"><B>-clean</B></A></DT>
<DD>
Specifies a level of quality, between 0 and 2, for the arrow.
If 0, the arrow is drawn with its maximum width and height.
If 1, the base of arrow is arranged to be odd to have same edges.
If 2, the base of arrow is arranged to be odd and the orthogonal to be (base+1)/2 to
have 'straight' diagonal for edges.
</DD>
</DL>
<DL><DT><A NAME="-command"><B>-command</B></A></DT>
<DD>
Specifies a Tcl command to associate with the ArrowButton. This command
is typically invoked when mouse button 1 is released over the ArrowButton
window.
</DD>
</DL>
<DL><DT><A NAME="-dir"><B>-dir</B></A></DT>
<DD>
Specifies the direction of the arrow: <B>top</B>, <B>bottom</B>, <B>left</B>
or <B>right</B>.
</DD>
</DL>
<DL><DT><A NAME="-disarmcommand"><B>-disarmcommand</B></A></DT>
<DD>
Specifies a Tcl command to associate with the ArrowButton when mouse button 1 is released.
This command is called even if pointer is not over the ArrowButton, and always before
the command specified by <B>command</B> option.
It is typically used in conjuntion with <B>armcommand</B>, <B>repeatdelay</B> and
<B>repeatinterval</B>.
</DD>
</DL>
<DL><DT><A NAME="-height"><B>-height</B></A></DT>
<DD>
Specifies a desired height for the ArrowButton. The value is in screen units.
</DD>
</DL>
<DL><DT><A NAME="-helptext"><B>-helptext</B></A></DT>
<DD>
Text for dynamic help. If empty, no help is available for this widget.
See also <A HREF="DynamicHelp.html">DynamicHelp</A>.
</DD>
</DL>
<DL><DT><A NAME="-helptype"><B>-helptype</B></A></DT>
<DD>
Type of dynamic help. Use <I>balloon</I> or <I>variable</I>.
See also <A HREF="DynamicHelp.html">DynamicHelp</A>.
</DD>
</DL>
<DL><DT><A NAME="-helpvar"><B>-helpvar</B></A></DT>
<DD>
Variable to use when <B>helptype</B> option is <I>variable</I>.
See also <A HREF="DynamicHelp.html">DynamicHelp</A>.
</DD>
</DL>
<DL><DT><A NAME="-ipadx"><B>-ipadx</B></A></DT>
<DD>
Specifies a minimun pad between the ArrowButton border and the right and left side
of the arrow. The value is in screen units.
</DD>
</DL>
<DL><DT><A NAME="-ipady"><B>-ipady</B></A></DT>
<DD>
Specifies a minimun pad between the ArrowButton border and the top and bottom side
of the arrow. The value is in screen units.
</DD>
</DL>
<DL><DT><A NAME="-state"><B>-state</B></A></DT>
<DD>
Specifies one of three states for the ArrowButton: <B>normal</B>, <B>active</B>,
or <B>disabled</B>.
<DL><DT>If ArrowButton <B>type</B> is <I>button</I>:</DT>
<DD>In normal state the ArrowButton is displayed using the
<B>foreground</B> and <B>background</B> options. The active state is
typically used when the pointer is over the ArrowButton. In active state
the ArrowButton is displayed using the <B>activeforeground</B> and
<B>activebackground</B> options. In disabled state the <B>disabledforeground</B> and
<B>background</B> options determine how the ArrowButton is displayed.
</DD>
<DT>If ArrowButton <B>type</B> is <I>arrow</I>:</DT>
<DD>Only colors of arrow change. The background of ArrowButton is always
displayed using <B>troughcolor</B> option.
In normal state the ArrowButton is displayed using the <B>background</B> option. The active
state is typically used when the pointer is over the ArrowButton. In active state
the ArrowButton is displayed using the <B>activebackground</B> option. In disabled state
the ArrowButton is displayed with a dark stipple.
</DD>
</DL>
Disabled state means that the ArrowButton
should be insensitive: the default bindings will refuse to activate
the widget and will ignore mouse button presses.
</DD>
</DL>
<DL><DT><A NAME="-type"><B>-type</B></A></DT>
<DD>
Determines the type of the ArrowButton: <B>button</B> for standard button look, or
<B>arrow</B> scrollbar's arrow look.
</DD>
</DL>
<DL><DT><A NAME="-width"><B>-width</B></A></DT>
<DD>
Specifies a desired width for the ArrowButton. The value is in screen units.
</DD>
</DL>
<HR WIDTH="50%"><BR>
<B><A NAME="wc">WIDGET COMMAND</A></B><BR>
<DL><DT><A NAME="cget"><I>pathName</I> <B>cget</B></A>
<I>option</I>
</DT><DD>
Returns the current value of the configuration option given by <I>option</I>.
<I>Option</I> may have any of the values accepted by the creation command.
</DD></DL>
<DL><DT><A NAME="configure"><I>pathName</I> <B>configure</B></A>
?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
</DT><DD>
Query or modify the configuration options of the widget. If no <I>option</I> is specified,
returns a list describing all of the available options for <I>pathName</I>.
If <I>option</I> is specified with no <I>value</I>, then the command returns a list
describing the one named <I>option</I> (this list will be identical to the corresponding
sublist of the value returned if no <I>option</I> is specified). If one or
more <I>option-value</I> pairs are specified, then the command modifies the given widget
option(s) to have the given value(s); in this case the command returns an empty string.
<I>Option</I> may have any of the values accepted by the creation command.
Read-only options are not be modified.
</DD></DL>
<DL><DT><A NAME="invoke"><I>pathName</I> <B>invoke</B></A>
</DT><DD>
If ArrowButton <B>state</B> is not disabled, this invoke the commands of the button.
ArrowButton is redisplayed with active color and sunken relief, and
<B>armcommand</B> is called. Then ArrowButton is redisplayed with
normal color and its defined relief, and <B>disarmcommand</B> then <B>command</B>
are called.
<P><B>invoke</B> is called when ArrowButton has input focus and user press the space bar.
</DD></DL>
</BODY></HTML>

116
hlp/en/bwidget/BWidget.html Normal file
View File

@ -0,0 +1,116 @@
<HTML>
<HEAD><TITLE>BWidget</TITLE></HEAD>
<BODY BGCOLOR=white>
<DL><DT><I><A HREF="#descr">NAME</A></I></DT>
<DD><B>BWidget</B>
- Description text
</DD></DL>
<DL>
<DT><I><A HREF="#wc">COMMAND</A></I></DT>
<DD>BWidget::<A HREF="#XLFDfont"><B>XLFDfont</B></A>
<I>cmd</I>
?<I>arg...</I>?
</DD>
<DD>BWidget::<A HREF="#assert"><B>assert</B></A>
<I>exp</I>
?<I>msg</I>?
</DD>
<DD>BWidget::<A HREF="#clonename"><B>clonename</B></A>
<I>menu</I>
</DD>
<DD>BWidget::<A HREF="#focus"><B>focus</B></A>
<I>option</I>
<I>path</I>
</DD>
<DD>BWidget::<A HREF="#get3dcolor"><B>get3dcolor</B></A>
<I>path</I>
<I>bgcolor</I>
</DD>
<DD>BWidget::<A HREF="#getname"><B>getname</B></A>
<I>name</I>
</DD>
<DD>BWidget::<A HREF="#grab"><B>grab</B></A>
<I>option</I>
<I>path</I>
</DD>
<DD>BWidget::<A HREF="#lreorder"><B>lreorder</B></A>
<I>list</I>
<I>neworder</I>
</DD>
<DD>BWidget::<A HREF="#parsetext"><B>parsetext</B></A>
<I>text</I>
</DD>
<DD>BWidget::<A HREF="#place"><B>place</B></A>
<I>path</I>
<I>w</I>
<I>h</I>
?<I>arg...</I>?
</DD>
</DL>
<BR><HR WIDTH="100%"><BR>
<B><A NAME="descr"></A>DESCRIPTION</B><BR>
<P>
Description text
</P>
<HR WIDTH="50%"><BR>
<B><A NAME="wc">COMMAND</A></B><BR>
<DL><DT><A NAME="XLFDfont">BWidget::<B>XLFDfont</B></A>
<I>cmd</I>
?<I>arg...</I>?
</DT><DD>
Description text
</DD></DL>
<DL><DT><A NAME="assert">BWidget::<B>assert</B></A>
<I>exp</I>
?<I>msg</I>?
</DT><DD>
Description text
</DD></DL>
<DL><DT><A NAME="clonename">BWidget::<B>clonename</B></A>
<I>menu</I>
</DT><DD>
Description text
</DD></DL>
<DL><DT><A NAME="focus">BWidget::<B>focus</B></A>
<I>option</I>
<I>path</I>
</DT><DD>
Description text
</DD></DL>
<DL><DT><A NAME="get3dcolor">BWidget::<B>get3dcolor</B></A>
<I>path</I>
<I>bgcolor</I>
</DT><DD>
Description text
</DD></DL>
<DL><DT><A NAME="getname">BWidget::<B>getname</B></A>
<I>name</I>
</DT><DD>
Description text
</DD></DL>
<DL><DT><A NAME="grab">BWidget::<B>grab</B></A>
<I>option</I>
<I>path</I>
</DT><DD>
Description text
</DD></DL>
<DL><DT><A NAME="lreorder">BWidget::<B>lreorder</B></A>
<I>list</I>
<I>neworder</I>
</DT><DD>
Description text
</DD></DL>
<DL><DT><A NAME="parsetext">BWidget::<B>parsetext</B></A>
<I>text</I>
</DT><DD>
Description text
</DD></DL>
<DL><DT><A NAME="place">BWidget::<B>place</B></A>
<I>path</I>
<I>w</I>
<I>h</I>
?<I>arg...</I>?
</DT><DD>
Description text
</DD></DL>
</BODY></HTML>

273
hlp/en/bwidget/Button.html Normal file
View File

@ -0,0 +1,273 @@
<HTML>
<HEAD><TITLE>Button</TITLE></HEAD>
<BODY BGCOLOR=white>
<DL><DT><I><A HREF="#descr">NAME</A></I></DT>
<DD><B>Button</B>
- Button widget with enhanced options
</DD></DL>
<DL>
<DT><I>CREATION</I></DT>
<DD><A HREF="#descr"><B>Button</B></A> <I>pathName</I> ?<I>option value...</I>?</DD>
</DL>
<DL>
<DT><I>STANDARD OPTIONS</I></DT>
<DD><TABLE CELLSPACING=0 CELLSPACING=0 BORDER=0>
<TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-activebackground">-activebackground</A></TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-activeforeground">-activeforeground</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-anchor">-anchor</A></TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-background">-background or -bg</A></TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-bitmap">-bitmap</A></TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-borderwidth">-borderwidth or -bd</A></TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-cursor">-cursor</A></TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-disabledforeground">-disabledforeground</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-font">-font</A></TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-foreground">-foreground or -fg</A></TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-highlightbackground">-highlightbackground</A></TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-highlightcolor">-highlightcolor</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-highlightthickness">-highlightthickness</A></TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-image">-image</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-justify">-justify</A></TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-padx">-padx</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-pady">-pady</A></TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-repeatdelay">-repeatdelay</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-repeatinterval">-repeatinterval</A></TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-takefocus">-takefocus</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-text">-text</A></TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-textvariable">-textvariable</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-wraplength">-wraplength</A></TR>
</TABLE></DD>
</DL>
<DL>
<DT><I><A HREF="#wso">WIDGET-SPECIFIC OPTIONS</A></I></DT>
<DD><TABLE CELLSPACING=0 CELLSPACING=0 BORDER=0>
<TR>
<TD>&nbsp;&nbsp;<A HREF="#-armcommand">-armcommand</A></TR>
<TD>&nbsp;&nbsp;<A HREF="#-command">-command</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="#-default">-default</A></TR>
<TD>&nbsp;&nbsp;<A HREF="#-disarmcommand">-disarmcommand</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="#-height">-height</A></TR>
<TD>&nbsp;&nbsp;<A HREF="#-helptext">-helptext</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="#-helptype">-helptype</A></TR>
<TD>&nbsp;&nbsp;<A HREF="#-helpvar">-helpvar</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="#-name">-name</A></TR>
<TD>&nbsp;&nbsp;<A HREF="#-relief">-relief</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="#-state">-state</A></TR>
<TD>&nbsp;&nbsp;<A HREF="#-underline">-underline</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="#-width">-width</A></TR>
</TABLE></DD>
</DL>
<DL>
<DT><I><A HREF="#wc">WIDGET COMMAND</A></I></DT>
<DD><I>pathName</I> <A HREF="#cget"><B>cget</B></A>
<I>option</I>
</DD>
<DD><I>pathName</I> <A HREF="#configure"><B>configure</B></A>
?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
</DD>
<DD><I>pathName</I> <A HREF="#invoke"><B>invoke</B></A>
</DD>
</DL>
<BR><HR WIDTH="100%"><BR>
<B><A NAME="descr"></A>DESCRIPTION</B><BR>
<P>
Button widget extends the Tk button with new options.
<A HREF="DynamicHelp.html">DynamicHelp</A> options,
a new relief style, callback for <B>arm</B>/<B>disarm</B>, and
<B>repeatdelay</B>/<B>repeatinterval</B> options has been added.
</P>
<BR><HR WIDTH="50%"><BR>
<B><A NAME="wso">WIDGET-SPECIFIC OPTIONS</A></B><BR>
<DL><DT><A NAME="-armcommand"><B>-armcommand</B></A></DT>
<DD>
Specifies a Tcl command to associate with the Button when mouse button 1 is pressed over the
Button. When <B>repeatdelay</B> or <B>repeatinterval</B> option is positive integer,
this command is repeatedly called if mouse pointer is over the Button and until mouse
button 1 is released.
</DD>
</DL>
<DL><DT><A NAME="-command"><B>-command</B></A></DT>
<DD>
Specifies a Tcl command to associate with the Button. This command
is typically invoked when mouse button 1 is released over the Button
window.
</DD>
</DL>
<DL><DT><A NAME="-default"><B>-default</B></A></DT>
<DD>
Specifies one of three states for the default ring: <B>normal</B>, <B>active</B>,
or <B>disabled</B>. In active state, the button is drawn with the platform specific
appearance for a default button. In normal state, the button is drawn with the platform
specific appearance for a non-default button, leaving enough space to draw the default
button appearance. The normal and active states will result in buttons of the same size.
In disabled state, the button is drawn with the non-default button appearance without
leaving space for the default appearance. The disabled state may result
in a smaller button than the active state.
</DD>
</DL>
<DL><DT><A NAME="-disarmcommand"><B>-disarmcommand</B></A></DT>
<DD>
Specifies a Tcl command to associate with the Button when mouse button 1 is released.
This command is called even if pointer is not over the Button, and always before
the command specified by <B>command</B> option.
It is typically used in conjuntion with <B>armcommand</B>, <B>repeatdelay</B> and
<B>repeatinterval</B>.
</DD>
</DL>
<DL><DT><A NAME="-height"><B>-height</B></A></DT>
<DD>
Specifies a desired height for the Button.
If an image or bitmap is being displayed in the Button then the value is in
screen units;
for text it is in lines of text.
If this option isn't specified, the Button's desired height is computed
from the size of the image or bitmap or text being displayed in it.
</DD>
</DL>
<DL><DT><A NAME="-helptext"><B>-helptext</B></A></DT>
<DD>
Text for dynamic help. If empty, no help is available for this widget.
See also <A HREF="DynamicHelp.html">DynamicHelp</A>.
</DD>
</DL>
<DL><DT><A NAME="-helptype"><B>-helptype</B></A></DT>
<DD>
Type of dynamic help. Use <I>balloon</I> or <I>variable</I>.
See also <A HREF="DynamicHelp.html">DynamicHelp</A>.
</DD>
</DL>
<DL><DT><A NAME="-helpvar"><B>-helpvar</B></A></DT>
<DD>
Variable to use when <B>helptype</B> option is <I>variable</I>.
See also <A HREF="DynamicHelp.html">DynamicHelp</A>.
</DD>
</DL>
<DL><DT><A NAME="-name"><B>-name</B></A></DT>
<DD>
Specifies a standard name for the button. If the option <B>*<I>name</I>Name</B> is
found in the resources database, then <B>text</B> and <B>underline</B> options
are extracted from its value.
</DD>
</DL>
<DL><DT><A NAME="-relief"><B>-relief</B></A></DT>
<DD>
Specifies the 3-D effect desired for the widget. Acceptable values are standard values for
button relief (<B>raised</B>, <B>sunken</B>, <B>flat</B>, <B>ridge</B>, <B>solid</B>, and <B>groove</B>) and <B>link</B>, which specifies that button relief is <B>flat</B> when pointer
is outside the button and <B>raised</B> when pointer is inside.
</DD>
</DL>
<DL><DT><A NAME="-state"><B>-state</B></A></DT>
<DD>
Specifies one of three states for the Button: <B>normal</B>, <B>active</B>,
or <B>disabled</B>. In normal state the Button is displayed using the
<B>foreground</B> and <B>background</B> options. The active state is
typically used when the pointer is over the Button. In active state
the Button is displayed using the <B>activeforeground</B> and
<B>activebackground</B> options. Disabled state means that the Button
should be insensitive: the default bindings will refuse to activate
the widget and will ignore mouse button presses.
In this state the <B>disabledforeground</B> and
<B>background</B> options determine how the Button is displayed.
</DD>
</DL>
<DL><DT><A NAME="-underline"><B>-underline</B></A></DT>
<DD>
Specifies the integer index of a character to underline in the label of the button.
0 corresponds to the first character of the text displayed, 1 to the next character,
and so on.
<BR>The binding <B>&lt;Alt-<I>char</I>&gt;</B> is automatically set on the toplevel
of the Button to call Button::<B>setfocus</B>.
</DD>
</DL>
<DL><DT><A NAME="-width"><B>-width</B></A></DT>
<DD>
If an image or bitmap is being displayed in the Button then the value is in
screen units;
for text it is in characters.
If this option isn't specified, the Button's desired width is computed
from the size of the image or bitmap or text being displayed in it.
</DD>
</DL>
<HR WIDTH="50%"><BR>
<B><A NAME="wc">WIDGET COMMAND</A></B><BR>
<DL><DT><A NAME="cget"><I>pathName</I> <B>cget</B></A>
<I>option</I>
</DT><DD>
Returns the current value of the configuration option given by <I>option</I>.
<I>Option</I> may have any of the values accepted by the creation command.
</DD></DL>
<DL><DT><A NAME="configure"><I>pathName</I> <B>configure</B></A>
?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
</DT><DD>
Query or modify the configuration options of the widget. If no <I>option</I> is specified,
returns a list describing all of the available options for <I>pathName</I>.
If <I>option</I> is specified with no <I>value</I>, then the command returns a list
describing the one named <I>option</I> (this list will be identical to the corresponding
sublist of the value returned if no <I>option</I> is specified). If one or
more <I>option-value</I> pairs are specified, then the command modifies the given widget
option(s) to have the given value(s); in this case the command returns an empty string.
<I>Option</I> may have any of the values accepted by the creation command.
Read-only options are not be modified.
</DD></DL>
<DL><DT><A NAME="invoke"><I>pathName</I> <B>invoke</B></A>
</DT><DD>
If Button <B>state</B> is not disabled, this invoke the commands of the Button.
Button is redisplayed with active color and sunken relief, and
<B>armcommand</B> is called. Then Button is redisplayed with
normal color and its defined relief, and <B>disarmcommand</B> then <B>command</B>
are called.
<P><B>invoke</B> is called when Button has input focus and user press the space bar.
</DD></DL>
</BODY></HTML>

View File

@ -0,0 +1,220 @@
<HTML>
<HEAD><TITLE>ButtonBox</TITLE></HEAD>
<BODY BGCOLOR=white>
<DL><DT><I><A HREF="#descr">NAME</A></I></DT>
<DD><B>ButtonBox</B>
- Set of buttons with horizontal or vertical layout
</DD></DL>
<DL>
<DT><I>CREATION</I></DT>
<DD><A HREF="#descr"><B>ButtonBox</B></A> <I>pathName</I> ?<I>option value...</I>?</DD>
</DL>
<DL>
<DT><I><A HREF="#wso">WIDGET-SPECIFIC OPTIONS</A></I></DT>
<DD><TABLE CELLSPACING=0 CELLSPACING=0 BORDER=0>
<TR>
<TD>&nbsp;&nbsp;<A HREF="#-background">-background or -bg</A></TD>
<TD>&nbsp;&nbsp;<A HREF="#-default">-default</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="#-homogeneous">-homogeneous</A></TR>
<TD>&nbsp;&nbsp;<A HREF="#-orient">-orient</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="#-padx">-padx</A></TR>
<TD>&nbsp;&nbsp;<A HREF="#-pady">-pady</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="#-spacing">-spacing</A></TR>
</TABLE></DD>
</DL>
<DL>
<DT><I><A HREF="#wc">WIDGET COMMAND</A></I></DT>
<DD><I>pathName</I> <A HREF="#add"><B>add</B></A>
?<I>option value...</I>?
</DD>
<DD><I>pathName</I> <A HREF="#cget"><B>cget</B></A>
<I>option</I>
</DD>
<DD><I>pathName</I> <A HREF="#configure"><B>configure</B></A>
?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
</DD>
<DD><I>pathName</I> <A HREF="#index"><B>index</B></A>
<I>index</I>
</DD>
<DD><I>pathName</I> <A HREF="#invoke"><B>invoke</B></A>
<I>index</I>
</DD>
<DD><I>pathName</I> <A HREF="#itemcget"><B>itemcget</B></A>
<I>index</I>
<I>option</I>
</DD>
<DD><I>pathName</I> <A HREF="#itemconfigure"><B>itemconfigure</B></A>
<I>index</I>
?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
</DD>
<DD><I>pathName</I> <A HREF="#setfocus"><B>setfocus</B></A>
<I>index</I>
</DD>
</DL>
<BR><HR WIDTH="100%"><BR>
<B><A NAME="descr"></A>DESCRIPTION</B><BR>
<P>
ButtonBox layouts Button horizontally or vertically.
Some commands take an <I>index</I> as argument indicating on which
Button it work. This index may be specified in any of the following forms:
<P>
<DL COMPACT>
<DT>
<I>number</I>
<DD>
Specifies the Button numerically, where 0 corresponds
to the first added Button, 1 to the next, and so on.
<DT>
<B>end</B> or <B>last</B>
<DD>
Indicates the last item added.
<DT><B>default</B>
<DD>
Indicates the default Button.
</DL>
</P>
<BR><HR WIDTH="50%"><BR>
<B><A NAME="wso">WIDGET-SPECIFIC OPTIONS</A></B><BR>
<DL><DT><A NAME="-background"><B>-background</B></A></DT>
<DD>
Specifies a default background color for all added buttons and for the frame.
</DD>
</DL>
<DL><DT><A NAME="-default"><B>-default</B></A></DT>
<DD>
Specifies the default button of the button box. The value is an integer
referencing the n-th added button, starting from 0.
If this value is -1 (the default), all button wil be drawn with their -default
option set to disabled, and this value can not be changed. <BR>If this value is
not -1, the associated button is drawn with -default option set to active and
the others are drawn with -default option set to normal. The value can be changed
by configure.
</DD>
</DL>
<DL><DT><A NAME="-homogeneous"><B>-homogeneous (read-only)</B></A></DT>
<DD>
Specifies wether or not buttons must have the same width for horizontal layout.
</DD>
</DL>
<DL><DT><A NAME="-orient"><B>-orient (read-only)</B></A></DT>
<DD>
Specifies the orientation of the button box. If this option is <B>horizontal</B>
(the default), buttons are added from top to bottom.
If this option is <B>vertical</B>, buttons are added from left to right.
</DD>
</DL>
<DL><DT><A NAME="-padx"><B>-padx</B></A></DT>
<DD>
Specifies a default value for the -padx option of all added buttons.
</DD>
</DL>
<DL><DT><A NAME="-pady"><B>-pady</B></A></DT>
<DD>
Specifies a default value for the -pady option of all added buttons.
</DD>
</DL>
<DL><DT><A NAME="-spacing"><B>-spacing</B></A></DT>
<DD>
Specifies the default spacing between buttons. This value can be changed before each
call to <B>add</B>.
</DD>
</DL>
<HR WIDTH="50%"><BR>
<B><A NAME="wc">WIDGET COMMAND</A></B><BR>
<DL><DT><A NAME="add"><I>pathName</I> <B>add</B></A>
?<I>option value...</I>?
</DT><DD>
Add a button to the button box.
<P>
See <A HREF="Button.html"><B>Button</B></A> for description of options.
</DD></DL>
<DL><DT><A NAME="cget"><I>pathName</I> <B>cget</B></A>
<I>option</I>
</DT><DD>
Returns the current value of the configuration option given by <I>option</I>.
<I>Option</I> may have any of the values accepted by the creation command.
</DD></DL>
<DL><DT><A NAME="configure"><I>pathName</I> <B>configure</B></A>
?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
</DT><DD>
Query or modify the configuration options of the widget. If no <I>option</I> is specified,
returns a list describing all of the available options for <I>pathName</I>.
If <I>option</I> is specified with no <I>value</I>, then the command returns a list
describing the one named <I>option</I> (this list will be identical to the corresponding
sublist of the value returned if no <I>option</I> is specified). If one or
more <I>option-value</I> pairs are specified, then the command modifies the given widget
option(s) to have the given value(s); in this case the command returns an empty string.
<I>Option</I> may have any of the values accepted by the creation command.
Read-only options are not be modified.
</DD></DL>
<DL><DT><A NAME="index"><I>pathName</I> <B>index</B></A>
<I>index</I>
</DT><DD>
Return the numerical index corresponding to the item.
</DD></DL>
<DL><DT><A NAME="invoke"><I>pathName</I> <B>invoke</B></A>
<I>index</I>
</DT><DD>
Invoke the Button given by <I>index</I>.
</DD></DL>
<DL><DT><A NAME="itemcget"><I>pathName</I> <B>itemcget</B></A>
<I>index</I>
<I>option</I>
</DT><DD>
Returns the current value of a configuration option for the item.
<I>Option</I> may have any of the values accepted by the item creation command.
</DD></DL>
<DL><DT><A NAME="itemconfigure"><I>pathName</I> <B>itemconfigure</B></A>
<I>index</I>
?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
</DT><DD>
This command is similar to the <B>configure</B> command, except that it applies to the
options for an individual item, whereas <B>configure</B> applies to the options for
the widget as a whole. <B>Options</B> may have any of the values accepted by the
item creation widget command. If options are specified, options are modified as indicated
in the command and the command returns an empty string. If no options are specified,
returns a list describing the current options for the item.
Read-only options are not be modified.
</DD></DL>
<DL><DT><A NAME="setfocus"><I>pathName</I> <B>setfocus</B></A>
<I>index</I>
</DT><DD>
Set the focus to the Button given by <I>index</I>.
</DD></DL>
</BODY></HTML>

View File

@ -0,0 +1,306 @@
<HTML>
<HEAD><TITLE>ComboBox</TITLE></HEAD>
<BODY BGCOLOR=white>
<DL><DT><I><A HREF="#descr">NAME</A></I></DT>
<DD><B>ComboBox</B>
- ComboBox widget
</DD></DL>
<DL>
<DT><I>CREATION</I></DT>
<DD><A HREF="#descr"><B>ComboBox</B></A> <I>pathName</I> ?<I>option value...</I>?</DD>
</DL>
<DL>
<DT><I><A HREF="ArrowButton.html">OPTIONS from <B>ArrowButton</B></A></I></DT>
<DD><TABLE CELLSPACING=0 CELLPADDING=0 BORDER=0>
<TR>
<TD>&nbsp;&nbsp;-background or -bg</TD>
<TD>&nbsp;&nbsp;-disabledforeground</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-foreground or -fg</TD>
<TD>&nbsp;&nbsp;-state</TD>
</TR>
</TABLE></DD>
</DL>
<DL>
<DT><I><A HREF="Entry.html">OPTIONS from <B>Entry</B></A></I></DT>
<DD><TABLE CELLSPACING=0 CELLPADDING=0 BORDER=0>
<TR>
<TD>&nbsp;&nbsp;-command</TD>
<TD>&nbsp;&nbsp;-disabledforeground</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-dragenabled</TD>
<TD>&nbsp;&nbsp;-dragendcmd</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-dragevent</TD>
<TD>&nbsp;&nbsp;-draginitcmd</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-dragtype</TD>
<TD>&nbsp;&nbsp;-dropcmd</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-dropenabled</TD>
<TD>&nbsp;&nbsp;-dropovercmd</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-droptypes</TD>
<TD>&nbsp;&nbsp;-editable</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-entrybg (see <B>-background</B>)</TD>
<TD>&nbsp;&nbsp;-entryfg (see <B>-foreground</B>)</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-exportselection</TD>
<TD>&nbsp;&nbsp;-font</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-helptext</TD>
<TD>&nbsp;&nbsp;-helptype</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-helpvar</TD>
<TD>&nbsp;&nbsp;-highlightbackground</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-highlightcolor</TD>
<TD>&nbsp;&nbsp;-highlightthickness</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-insertbackground</TD>
<TD>&nbsp;&nbsp;-insertborderwidth</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-insertofftime</TD>
<TD>&nbsp;&nbsp;-insertontime</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-insertwidth</TD>
<TD>&nbsp;&nbsp;-justify</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-selectbackground</TD>
<TD>&nbsp;&nbsp;-selectborderwidth</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-selectforeground</TD>
<TD>&nbsp;&nbsp;-show</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-state</TD>
<TD>&nbsp;&nbsp;-takefocus</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-text</TD>
<TD>&nbsp;&nbsp;-textvariable</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-width</TD>
<TD>&nbsp;&nbsp;-xscrollcommand</TD>
</TR>
</TABLE></DD>
</DL>
<DL>
<DT><I><A HREF="LabelFrame.html">OPTIONS from <B>LabelFrame</B></A></I></DT>
<DD><TABLE CELLSPACING=0 CELLPADDING=0 BORDER=0>
<TR>
<TD>&nbsp;&nbsp;-background or -bg</TD>
<TD>&nbsp;&nbsp;-borderwidth or -bd</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-disabledforeground</TD>
<TD>&nbsp;&nbsp;-foreground or -fg</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-helptext</TD>
<TD>&nbsp;&nbsp;-helptype</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-helpvar</TD>
<TD>&nbsp;&nbsp;-label (see <B>-text</B>)</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-labelanchor (see <B>-anchor</B>)</TD>
<TD>&nbsp;&nbsp;-labelfont (see <B>-font</B>)</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-labelheight (see <B>-height</B>)</TD>
<TD>&nbsp;&nbsp;-labeljustify (see <B>-justify</B>)</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-labelwidth (see <B>-width</B>)</TD>
<TD>&nbsp;&nbsp;-name</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-padx</TD>
<TD>&nbsp;&nbsp;-pady</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-relief</TD>
<TD>&nbsp;&nbsp;-side</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-state</TD>
<TD>&nbsp;&nbsp;-underline</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-wraplength</TD>
</TABLE></DD>
</DL>
<DL>
<DT><I><A HREF="#wso">WIDGET-SPECIFIC OPTIONS</A></I></DT>
<DD><TABLE CELLSPACING=0 CELLSPACING=0 BORDER=0>
<TR>
<TD>&nbsp;&nbsp;<A HREF="#-height">-height</A></TR>
<TD>&nbsp;&nbsp;<A HREF="#-modifycmd">-modifycmd</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="#-postcommand">-postcommand</A></TR>
<TD>&nbsp;&nbsp;<A HREF="#-values">-values</A></TR>
</TR>
</TABLE></DD>
</DL>
<DL>
<DT><I><A HREF="#wc">WIDGET COMMAND</A></I></DT>
<DD><I>pathName</I> <A HREF="#bind"><B>bind</B></A>
?<I>arg...</I>?
</DD>
<DD><I>pathName</I> <A HREF="#cget"><B>cget</B></A>
<I>option</I>
</DD>
<DD><I>pathName</I> <A HREF="#configure"><B>configure</B></A>
?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
</DD>
<DD><I>pathName</I> <A HREF="#getvalue"><B>getvalue</B></A>
</DD>
<DD><I>pathName</I> <A HREF="#setvalue"><B>setvalue</B></A>
<I>index</I>
</DD>
</DL>
<BR><HR WIDTH="100%"><BR>
<B><A NAME="descr"></A>DESCRIPTION</B><BR>
<P>
ComboBox widget enables the user to select a value among a list given by the <B>values</B> option.
The list of possible values can be popped by pressing the ArrowButton or by clicking in the entry
when <B>editable</B> value of the ComboBox is <B>false</B>.<BR>
If <B>editable</B> value of the ComboBox is <B>true</B> and the entry has the focus, the user can
press the top and bottom arrow keys to modify its value. If the current value exactly match a value in the list,
then the previous (for top arrow key) or then next (for bottom arrow key) value in the list is displayed.
If the current value match the beginning of a value in the list, then this value is displayed.
If the current value doesnt match anything, then the first value is displayed.
</P>
<BR><HR WIDTH="50%"><BR>
<B><A NAME="wso">WIDGET-SPECIFIC OPTIONS</A></B><BR>
<DL><DT><A NAME="-height"><B>-height</B></A></DT>
<DD>
Specifies the desired height for the window, in lines. If zero or less, then the desired
height for the window is made just large enough to hold all the elements in the listbox.
</DD>
</DL>
<DL><DT><A NAME="-modifycmd"><B>-modifycmd</B></A></DT>
<DD>
Specifies a Tcl command called when the user modify the value of the ComboBox by selecting it in the listbox or pressing arrow key.
</DD>
</DL>
<DL><DT><A NAME="-postcommand"><B>-postcommand</B></A></DT>
<DD>
Specifies a Tcl command called before the listbox of the ComboBox is mapped.
</DD>
</DL>
<DL><DT><A NAME="-values"><B>-values</B></A></DT>
<DD>
Specifies the values to display in the listbox of the ComboBox.
</DD>
</DL>
<HR WIDTH="50%"><BR>
<B><A NAME="wc">WIDGET COMMAND</A></B><BR>
<DL><DT><A NAME="bind"><I>pathName</I> <B>bind</B></A>
?<I>arg...</I>?
</DT><DD>
Set bindings on the entry widget.
</DD></DL>
<DL><DT><A NAME="cget"><I>pathName</I> <B>cget</B></A>
<I>option</I>
</DT><DD>
Returns the current value of the configuration option given by <I>option</I>.
<I>Option</I> may have any of the values accepted by the creation command.
</DD></DL>
<DL><DT><A NAME="configure"><I>pathName</I> <B>configure</B></A>
?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
</DT><DD>
Query or modify the configuration options of the widget. If no <I>option</I> is specified,
returns a list describing all of the available options for <I>pathName</I>.
If <I>option</I> is specified with no <I>value</I>, then the command returns a list
describing the one named <I>option</I> (this list will be identical to the corresponding
sublist of the value returned if no <I>option</I> is specified). If one or
more <I>option-value</I> pairs are specified, then the command modifies the given widget
option(s) to have the given value(s); in this case the command returns an empty string.
<I>Option</I> may have any of the values accepted by the creation command.
Read-only options are not be modified.
</DD></DL>
<DL><DT><A NAME="getvalue"><I>pathName</I> <B>getvalue</B></A>
</DT><DD>
Returns the index of the current text of the ComboBox in the list of values,
or -1 if it doesn't match any value.
</DD></DL>
<DL><DT><A NAME="setvalue"><I>pathName</I> <B>setvalue</B></A>
<I>index</I>
</DT><DD>
Set the text of the ComboBox to the value indicated by <I>index</I> in the list of values.
<I>index</I> may be specified in any of the following forms:
<P>
<DL COMPACT>
<DT>
<B>last</B>
<DD>
Specifies the last element of the list of values.
<DT><B>first</B>
<DD>
Specifies the first element of the list of values.
<DT>
<B>next</B>
<DD>
Specifies the element following the current (ie returned by <B>getvalue</B>) in the list
of values.
<DT><B>previous</B>
<DD>
Specifies the element preceding the current (ie returned by <B>getvalue</B>) in the list
of values.
<DT>
@<I>number</I>
<DD>
Specifies the integer index in the list of values.
</DL>
</DD></DL>
<HR><BR><B>BINDINGS</B><BR><BR>
When Entry of the ComboBox has the input focus, it has the following bindings, in addition
to the default Entry bindings:
<UL>
<LI>Page up set the value of the ComboBox to the first value.
<LI>Page down set the value of the ComboBox to the last value.
<LI>Arrow up set the value of the ComboBox to the previous value.
<LI>Arrow down set the value of the ComboBox to the next value.
</UL>
If the listbox is not mapped and ComboBox is not editable or disabled,
mouse button 1 on the Entry cause the listbox to popup, as if the user press the ArrowButton.
</BODY></HTML>

293
hlp/en/bwidget/Dialog.html Normal file
View File

@ -0,0 +1,293 @@
<HTML>
<HEAD><TITLE>Dialog</TITLE></HEAD>
<BODY BGCOLOR=white>
<DL><DT><I><A HREF="#descr">NAME</A></I></DT>
<DD><B>Dialog</B>
- Dialog abstraction with custom buttons
</DD></DL>
<DL>
<DT><I>CREATION</I></DT>
<DD><A HREF="#descr"><B>Dialog</B></A> <I>pathName</I> ?<I>option value...</I>?</DD>
</DL>
<DL>
<DT><I><A HREF="ButtonBox.html">OPTIONS from <B>ButtonBox</B></A></I></DT>
<DD><TABLE CELLSPACING=0 CELLPADDING=0 BORDER=0>
<TR>
<TD>&nbsp;&nbsp;-background or -bg</TD>
<TD>&nbsp;&nbsp;-homogeneous</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-padx</TD>
<TD>&nbsp;&nbsp;-pady</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-spacing</TD>
</TABLE></DD>
</DL>
<DL>
<DT><I><A HREF="#wso">WIDGET-SPECIFIC OPTIONS</A></I></DT>
<DD><TABLE CELLSPACING=0 CELLSPACING=0 BORDER=0>
<TR>
<TD>&nbsp;&nbsp;<A HREF="#-anchor">-anchor</A></TR>
<TD>&nbsp;&nbsp;<A HREF="#-bitmap">-bitmap</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="#-cancel">-cancel</A></TR>
<TD>&nbsp;&nbsp;<A HREF="#-default">-default</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="#-image">-image</A></TR>
<TD>&nbsp;&nbsp;<A HREF="#-modal">-modal</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="#-parent">-parent</A></TR>
<TD>&nbsp;&nbsp;<A HREF="#-separator">-separator</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="#-side">-side</A></TR>
<TD>&nbsp;&nbsp;<A HREF="#-title">-title</A></TR>
</TR>
</TABLE></DD>
</DL>
<DL>
<DT><I><A HREF="#wc">WIDGET COMMAND</A></I></DT>
<DD><I>pathName</I> <A HREF="#add"><B>add</B></A>
?<I>arg...</I>?
</DD>
<DD><I>pathName</I> <A HREF="#cget"><B>cget</B></A>
<I>option</I>
</DD>
<DD><I>pathName</I> <A HREF="#configure"><B>configure</B></A>
?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
</DD>
<DD><I>pathName</I> <A HREF="#draw"><B>draw</B></A>
?<I>focus</I>?
</DD>
<DD><I>pathName</I> <A HREF="#enddialog"><B>enddialog</B></A>
<I>result</I>
</DD>
<DD><I>pathName</I> <A HREF="#getframe"><B>getframe</B></A>
</DD>
<DD><I>pathName</I> <A HREF="#invoke"><B>invoke</B></A>
<I>index</I>
</DD>
<DD><I>pathName</I> <A HREF="#itemcget"><B>itemcget</B></A>
<I>index</I>
<I>option</I>
</DD>
<DD><I>pathName</I> <A HREF="#itemconfigure"><B>itemconfigure</B></A>
<I>index</I>
?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
</DD>
<DD><I>pathName</I> <A HREF="#setfocus"><B>setfocus</B></A>
<I>index</I>
</DD>
<DD><I>pathName</I> <A HREF="#withdraw"><B>withdraw</B></A>
</DD>
</DL>
<BR><HR WIDTH="100%"><BR>
<B><A NAME="descr"></A>DESCRIPTION</B><BR>
<P>
Dialog widget enables the user to create a dialog box.
Some commands take an <I>index</I> as argument indicating on which
Button it work. This index is the same specified for equivalent ButtonBox command:
<P>
<DL COMPACT>
<DT>
<I>number</I>
<DD>
Specifies the Button numerically, where 0 corresponds
to the first added Button, 1 to the next, and so on.
<DT>
<B>end</B> or <B>last</B>
<DD>
Indicates the last item added.
<DT><B>default</B>
<DD>
Indicates the default Button.
</DL>
</P>
<BR><HR WIDTH="50%"><BR>
<B><A NAME="wso">WIDGET-SPECIFIC OPTIONS</A></B><BR>
<DL><DT><A NAME="-anchor"><B>-anchor (read-only)</B></A></DT>
<DD>
Specifies the anchor point of the ButtonBox.
Must be one of <B>w</B>, <B>e</B>, <B>n</B>, <B>s</B> or <B>c</B>.
If <B>side</B> option is set to <I>top</I> or <I>bottom</I>,
<B>anchor</B> values <I>n</I>, <I>s</I> and <I>c</I> have the same effect.
If <B>side</B> option is set to <I>left</I> or <I>right</I>,
<B>anchor</B> values <I>w</I>, <I>e</I> and <I>c</I> have the same effect.
</DD>
</DL>
<DL><DT><A NAME="-bitmap"><B>-bitmap (read-only)</B></A></DT>
<DD>
Specifies a bitmap to display at the left of the user frame.
<B>image</B> option override <B>bitmap</B>.
</DD>
</DL>
<DL><DT><A NAME="-cancel"><B>-cancel</B></A></DT>
<DD>
Specifies the number of the cancel button of the Dialog. When user press Esc in the Dialog,
this button is invoked.
</DD>
</DL>
<DL><DT><A NAME="-default"><B>-default</B></A></DT>
<DD>
Specifies the number of the default button of the Dialog.
When user press Return in the Dialog, this button is invoked.
</DD>
</DL>
<DL><DT><A NAME="-image"><B>-image (read-only)</B></A></DT>
<DD>
Specifies an image to display at the left of the user frame.
<B>image</B> option override <B>bitmap</B>.
</DD>
</DL>
<DL><DT><A NAME="-modal"><B>-modal</B></A></DT>
<DD>
This option must be <B>none</B>, <B>local</B> or <B>global</B>. The value of this option
specifies the grab mode of the dialog and how works Dialog::<B>draw</B>.
</DD>
</DL>
<DL><DT><A NAME="-parent"><B>-parent</B></A></DT>
<DD>
Parent of the Dialog. Dialog is centered in its parent. If empty, it is centered in
root window.
</DD>
</DL>
<DL><DT><A NAME="-separator"><B>-separator (read-only)</B></A></DT>
<DD>
Specifies wether or not to draw a separator between the user frame and the ButtonBox.
</DD>
</DL>
<DL><DT><A NAME="-side"><B>-side (read-only)</B></A></DT>
<DD>
Specifies where to draw the ButtonBox relative to the user frame. Must be one of
<B>top</B>, <B>left</B>, <B>bottom</B> or <B>right</B>.
</DD>
</DL>
<DL><DT><A NAME="-title"><B>-title</B></A></DT>
<DD>
Title of the Dialog toplevel.
</DD>
</DL>
<HR WIDTH="50%"><BR>
<B><A NAME="wc">WIDGET COMMAND</A></B><BR>
<DL><DT><A NAME="add"><I>pathName</I> <B>add</B></A>
?<I>arg...</I>?
</DT><DD>
Add a button to the button box of the dialog box. Default -command option is
<I>Dialog::enddialog $path index</I> where <I>index</I> is number of button added.
</DD></DL>
<DL><DT><A NAME="cget"><I>pathName</I> <B>cget</B></A>
<I>option</I>
</DT><DD>
Returns the current value of the configuration option given by <I>option</I>.
<I>Option</I> may have any of the values accepted by the creation command.
</DD></DL>
<DL><DT><A NAME="configure"><I>pathName</I> <B>configure</B></A>
?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
</DT><DD>
Query or modify the configuration options of the widget. If no <I>option</I> is specified,
returns a list describing all of the available options for <I>pathName</I>.
If <I>option</I> is specified with no <I>value</I>, then the command returns a list
describing the one named <I>option</I> (this list will be identical to the corresponding
sublist of the value returned if no <I>option</I> is specified). If one or
more <I>option-value</I> pairs are specified, then the command modifies the given widget
option(s) to have the given value(s); in this case the command returns an empty string.
<I>Option</I> may have any of the values accepted by the creation command.
Read-only options are not be modified.
</DD></DL>
<DL><DT><A NAME="draw"><I>pathName</I> <B>draw</B></A>
?<I>focus</I>?
</DT><DD>
This command draw the Dialog, and set grab to it following <B>modal</B> option.
If <B>modal</B> option is set to <I>none</I>, the command returns immediatly
an empty string. In all other case, the command returns when Dialog::<B>enddialog</B>
is called or when Dialog is destroyed.
The return value is the result argument of Dialog::<B>enddialog</B> or -1 if it is destroyed.
<P>
By default, the focus is set to the default button referenced by <B>default</B> option,
or to the toplevel of Dialog if no default button has been set.
If <I>focus</I> is present, it must be a pathname, or an index to a button.
Initial focus is set on this pathname or corresponding button.
</DD></DL>
<DL><DT><A NAME="enddialog"><I>pathName</I> <B>enddialog</B></A>
<I>result</I>
</DT><DD>
This command is typically called within a command of a button to make Dialog::<B>draw</B>
return.
</DD></DL>
<DL><DT><A NAME="getframe"><I>pathName</I> <B>getframe</B></A>
</DT><DD>
Returns the pathname of the user window.
</DD></DL>
<DL><DT><A NAME="invoke"><I>pathName</I> <B>invoke</B></A>
<I>index</I>
</DT><DD>
Invoke the Button given by <I>index</I>.
</DD></DL>
<DL><DT><A NAME="itemcget"><I>pathName</I> <B>itemcget</B></A>
<I>index</I>
<I>option</I>
</DT><DD>
Returns the current value of a configuration option for the item.
<I>Option</I> may have any of the values accepted by the item creation command.
</DD></DL>
<DL><DT><A NAME="itemconfigure"><I>pathName</I> <B>itemconfigure</B></A>
<I>index</I>
?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
</DT><DD>
This command is similar to the <B>configure</B> command, except that it applies to the
options for an individual item, whereas <B>configure</B> applies to the options for
the widget as a whole. <B>Options</B> may have any of the values accepted by the
item creation widget command. If options are specified, options are modified as indicated
in the command and the command returns an empty string. If no options are specified,
returns a list describing the current options for the item.
Read-only options are not be modified.
</DD></DL>
<DL><DT><A NAME="setfocus"><I>pathName</I> <B>setfocus</B></A>
<I>index</I>
</DT><DD>
Set the focus to the Button given by <I>index</I>.
</DD></DL>
<DL><DT><A NAME="withdraw"><I>pathName</I> <B>withdraw</B></A>
</DT><DD>
Call this command to hide the dialog box.
</DD></DL>
</BODY></HTML>

View File

@ -0,0 +1,139 @@
<HTML>
<HEAD><TITLE>DragSite</TITLE></HEAD>
<BODY BGCOLOR=white>
<DL><DT><I><A HREF="#descr">NAME</A></I></DT>
<DD><B>DragSite</B>
- Commands set for Drag facilities
</DD></DL>
<DL>
<DT><I><A HREF="#wc">COMMAND</A></I></DT>
<DD>DragSite::<A HREF="#include"><B>include</B></A>
<I>class</I>
<I>type</I>
<I>event</I>
</DD>
<DD>DragSite::<A HREF="#register"><B>register</B></A>
<I>path</I>
?<I>option value...</I>?
</DD>
<DD>DragSite::<A HREF="#setdrag"><B>setdrag</B></A>
<I>path</I>
<I>subpath</I>
<I>initcmd</I>
<I>endcmd</I>
?<I>force</I>?
</DD>
</DL>
<BR><HR WIDTH="100%"><BR>
<B><A NAME="descr"></A>DESCRIPTION</B><BR>
<P>
Commands of this namespace enable user to define a BWidget or a Tk widget as a drag site.
</P>
<HR WIDTH="50%"><BR>
<B><A NAME="wc">COMMAND</A></B><BR>
<DL><DT><A NAME="include">DragSite::<B>include</B></A>
<I>class</I>
<I>type</I>
<I>event</I>
</DT><DD>
This command provides a simple way to include options relatives to a drag site into
BWidget resources definition.
It includes the options needed for <B>register</B>: <I>-dragevent</I>, initialized to
<I>event</I>, <I>-draginitcmd</I> and <I>-dragendcmd</I>, initialized to empty string,
and two new options:
<TABLE BORDER=0 CELLSPACING=1>
<TR><TD><I>-dragenabled</I><TD>Specifies wether or not drag is active (initialized to 0)
<TR><TD><I>-dragtype</I><TD>Default or alternate dragged data type (initialized to <I>type</I>)
</TABLE>
</DD></DL>
<DL><DT><A NAME="register">DragSite::<B>register</B></A>
<I>path</I>
?<I>option value...</I>?
</DT><DD>
This command is used to declare <I>path</I> as a drag site. Options are:
<P>
<DL><DT><A NAME="DragSite-dragendcmd"><B>-dragendcmd</B></A></DT>
<DD>
Command called when drag terminates (ie when user release drag icon).
This command is called with the following arguments:
<UL>
<LI>the pathname of the drag source (the widget itself),
<LI>the pathname of the drop target,
<LI>the operation,
<LI>the type of the dragged data,
<LI>the dragged data,
<LI>result of the drop (result of the call to <B>-dropcmd</B> of the target),
</UL>
If the drop does not occurs, the target and the operation are empty string and the result
is 0.
</DD>
</DL>
<DL><DT><A NAME="DragSite-dragevent"><B>-dragevent</B></A></DT>
<DD>
Specifies the number of the mouse button associated to the drag.
Must be <B>1</B>, <B>2</B> or <B>3</B>.
</DD>
</DL>
<DL><DT><A NAME="DragSite-draginitcmd"><B>-draginitcmd</B></A></DT>
<DD>
Command called when drag initiates. When the event of option <B>dragevent</B> occurs on
<I>path</I>, this command is called with the following arguments:
<UL>
<LI>pathname of the drag source (<I>path</I>),
<LI>root x-coordinate of pointer,
<LI>root y-coordinate of pointer,
<LI>a toplevel created to represent dragged data. When returning, if it
has no children, a bitmap is automatically displayed.
</UL>
The command must return a list containing three elements:
<UL>
<LI>the type of the data,
<LI>the list of acceptable basic operations (<B>copy</B>, <B>move</B> and <B>link</B>)
<LI>and the data.
</UL>
Note that even if <B>copy</b> does not appear in the list of basic operation,
it is considered as an acceptable operation, since <B>copy</B> semantic does not modify
the drag source.
</DD>
</DL>
</DD></DL>
<DL><DT><A NAME="setdrag">DragSite::<B>setdrag</B></A>
<I>path</I>
<I>subpath</I>
<I>initcmd</I>
<I>endcmd</I>
?<I>force</I>?
</DT><DD>
This command provides a simple way to call <B>register</B> during a BWidget creation or
configuration.
<UL>
<LI><I>path</I> is the pathname of the BWidget,
<LI><I>subpath</I> is the pathname of the tk widget where drag event occurs,
<LI><I>initcmd</I> BWidget command for <I>drag-init</I> event,
<LI><I>endcmd</I> BWidget command for <I>drag-end</I> event,
<LI><I>force</I> specifies wether or not to call <B>register</B> whenever no option value has
changed (0 by default - for BWidget configuration, use 1 for BWidget creation).
</UL>
<B>setdrag</B> verifies the modification flag of options <B>dragenabled</B> and
<B>dragevent</B> and calls <B>register</B> if needed according to the options values and
<I>initcmd</I> and <I>endcmd</I> arguments. <B>draginitcmd</B> and <B>dragendcmd</B> are not
taken from options of widget because they are considered as user command, called by
BWidget implementation of <I>drag-init</I> and <I>drag-end</I> events.
</DD></DL>
</BODY>
</HTML>

View File

@ -0,0 +1,258 @@
<HTML>
<HEAD><TITLE>DropSite</TITLE></HEAD>
<BODY BGCOLOR=white>
<DL><DT><I><A HREF="#descr">NAME</A></I></DT>
<DD><B>DropSite</B>
- Commands set for Drop facilities
</DD></DL>
<DL>
<DT><I><A HREF="#wc">COMMAND</A></I></DT>
<DD>DropSite::<A HREF="#include"><B>include</B></A>
<I>class</I>
<I>types</I>
</DD>
<DD>DropSite::<A HREF="#register"><B>register</B></A>
<I>path</I>
?<I>option value...</I>?
</DD>
<DD>DropSite::<A HREF="#setcursor"><B>setcursor</B></A>
<I>cursor</I>
</DD>
<DD>DropSite::<A HREF="#setdrop"><B>setdrop</B></A>
<I>path</I>
<I>subpath</I>
<I>dropover</I>
<I>drop</I>
?<I>force</I>?
</DD>
<DD>DropSite::<A HREF="#setoperation"><B>setoperation</B></A>
<I>op</I>
</DD>
</DL>
<BR><HR WIDTH="100%"><BR>
<B><A NAME="descr"></A>DESCRIPTION</B><BR>
<P>
Commands of this namespace enable user to define a BWidget or a Tk widget as a drop site.
A drop site is composed of the type of object that can be dropped and associated operation,
a command called when drop occurs, and a command when an object is dragged over the widget.
A drop site must have at least one type of acceptable object and a drop command.
</P>
<HR WIDTH="50%"><BR>
<B><A NAME="wc">COMMAND</A></B><BR>
<DL><DT><A NAME="include">DropSite::<B>include</B></A>
<I>class</I>
<I>types</I>
</DT><DD>
This command provides a simple way to include options relatives to a drop site into
BWidget resources definition.
It includes the options needed for <B>register</B>, <I>-dropovercmd</I> and <I>-dropcmd</I>,
initialized to empty string, and <I>-droptypes</I>, initialized to <I>types</I>,
and one new option:
<TABLE BORDER=0 CELLSPACING=1>
<TR><TD><I>-dropenabled</I><TD>Specifies wether or not drop is active (initialized to 0)
</TABLE>
</DD></DL>
<DL><DT><A NAME="register">DropSite::<B>register</B></A>
<I>path</I>
?<I>option value...</I>?
</DT><DD>
This command is used to declare <I>path</I> as a drop site. Options are:
<P>
<DL><DT><A NAME="DropSite-dropcmd"><B>-dropcmd</B></A></DT>
<DD>
This command is called when user release the drag icon over a valid drop target widget.
It takes the same arguments as <B>-dragovercmd</B> command. Its return values is passed
as a result to the <B>-dragendcmd</B> command of the drag source widget.
</DD>
</DL>
<DL><DT><A NAME="DropSite-dropovercmd"><B>-dropovercmd</B></A></DT>
<DD>
This command can be used to provide a dynamic drag while <I>drag-over</I> events.
While a drag occurs, events &lt;Enter&gt;, &lt;Motion&gt; and &lt;Leave&gt; are catched.
Arguments passed to the command are:
<UL>
<LI>pathname of the drop target (the widget itself),
<LI>pathname of the drag source,
<LI>event over the drop target: <I>enter</I>, <I>motion</I> or <I>leave</I>,
<LI>root x-coordinate of the pointer,
<LI>root y-coordinate of the pointer,
<LI>operation,
<LI>type of the dragged data,
<LI>dragged data.
</UL>
Command must the new status of the drag:
<UL>
<LI>0 if widget refuse this drag. Command will not be recalled on motion/leave event.
<LI>1 if widget accept this drag. Command will not be recalled on motion/leave event.
<LI>2 if widget refuse this drag. Command will be recalled on each motion event to reevaluate.
<LI>3 if widget accept this drag. Command will be recalled on each motion event to reevaluate.
</UL>
Here is a list of events and associated actions on a DropSite widget. This example
assumes that dragged data type is valid for the drop target.
<B>status</B> is the status of the drag on a DropSite. Its value is:
<BR><BR>
<TABLE BORDER CELLSPACING=1 CELLPADDING=4>
<TR><TD WIDTH="18%" VALIGN="TOP">
<P ALIGN="CENTER"><FONT SIZE=2>Event</FONT></TD>
<TD WIDTH="10%" VALIGN="TOP">
<FONT SIZE=2><P ALIGN="CENTER">Old status</FONT></TD>
<TD WIDTH="48%" VALIGN="TOP">
<FONT SIZE=2><P ALIGN="CENTER">Action</FONT></TD>
<TD WIDTH="24%" VALIGN="TOP">
<FONT SIZE=2><P ALIGN="CENTER">New status</FONT></TD>
</TR>
<TR><TD WIDTH="18%" VALIGN="TOP" ROWSPAN=2>
<FONT SIZE=2><P>&lt;Enter&gt;</FONT></TD>
<TD WIDTH="10%" VALIGN="TOP" ROWSPAN=2>
<FONT SIZE=2><P>-</FONT></TD>
<TD WIDTH="48%" VALIGN="TOP">
<FONT SIZE=2><P>if DropSite has <B>dropovercmd</B>, call it with <I>enter</I></FONT></TD>
<TD WIDTH="24%" VALIGN="TOP">
<FONT SIZE=2><P>result of <B>dropovercmd</B></FONT></TD>
</TR>
<TR><TD WIDTH="48%" VALIGN="TOP">
<FONT SIZE=2><P>else</FONT></TD>
<TD WIDTH="24%" VALIGN="TOP">
<FONT SIZE=2><P>1</FONT></TD>
</TR>
<TR><TD WIDTH="18%" VALIGN="TOP" ROWSPAN=2>
<FONT SIZE=2><P>&lt;Motion&gt;</FONT></TD>
<TD WIDTH="10%" VALIGN="TOP">
<FONT SIZE=2><P>0 or 1</FONT></TD>
<TD WIDTH="48%" VALIGN="TOP">&nbsp;</TD>
<TD WIDTH="24%" VALIGN="TOP">
<FONT SIZE=2><P>unchanged</FONT></TD>
</TR>
<TR><TD WIDTH="10%" VALIGN="TOP">
<FONT SIZE=2><P>2 or 3</FONT></TD>
<TD WIDTH="48%" VALIGN="TOP">
<FONT SIZE=2><P>call <B>dropovercmd</B> with <I>motion</I></FONT></TD>
<TD WIDTH="24%" VALIGN="TOP">
<FONT SIZE=2><P>result of <B>dropovercmd</B></FONT></TD>
</TR>
<TR><TD WIDTH="18%" VALIGN="TOP" ROWSPAN=2>
<FONT SIZE=2><P>&lt;Leave&gt;</P>
</FONT><P>&nbsp;</TD>
<TD WIDTH="10%" VALIGN="TOP">
<FONT SIZE=2><P>0 or 1</FONT></TD>
<TD WIDTH="48%" VALIGN="TOP">&nbsp;</TD>
<TD WIDTH="24%" VALIGN="TOP">
<FONT SIZE=2><P>-</FONT></TD>
</TR>
<TR><TD WIDTH="10%" VALIGN="TOP">
<FONT SIZE=2><P>2 or 3</FONT></TD>
<TD WIDTH="48%" VALIGN="TOP">
<FONT SIZE=2><P>call <B>dropovercmd</B> with <I>leave</I></FONT></TD>
<TD WIDTH="24%" VALIGN="TOP">
<FONT SIZE=2><P>-</FONT></TD>
</TR>
<TR><TD WIDTH="18%" VALIGN="TOP" ROWSPAN=4>
<FONT SIZE=2><P>&lt;Drop&gt;</FONT></TD>
<TD WIDTH="10%" VALIGN="TOP">
<FONT SIZE=2><P>0</FONT></TD>
<TD WIDTH="48%" VALIGN="TOP">
<FONT SIZE=2><P>call <B>dragendcmd</B> of drag source</FONT></TD>
<TD WIDTH="24%" VALIGN="TOP" ROWSPAN=4>
<FONT SIZE=2><P>-</FONT></TD>
</TR>
<TR><TD WIDTH="10%" VALIGN="TOP">
<FONT SIZE=2><P>1</FONT></TD>
<TD WIDTH="48%" VALIGN="TOP">
<FONT SIZE=2><P>call <B>dropcmd</B> and call <B>dragendcmd</B> of drag source</FONT></TD>
</TR>
<TR><TD WIDTH="10%" VALIGN="TOP">
<FONT SIZE=2><P>2</FONT></TD>
<TD WIDTH="48%" VALIGN="TOP">
<FONT SIZE=2><P>call <B>dropovercmd</B> with <I>leave</I> and call <B>dragendcmd</B> of drag source</FONT></TD>
</TR>
<TR><TD WIDTH="10%" VALIGN="TOP">
<FONT SIZE=2><P>3</FONT></TD>
<TD WIDTH="48%" VALIGN="TOP">
<FONT SIZE=2><P>call <B>dropcmd</B> and call <B>dragendcmd</B> of drag source</FONT></TD>
</TR>
</TABLE>
<BR>
</DD>
</DL>
<DL><DT><A NAME="DropSite-droptypes"><B>-droptypes</B></A></DT>
<DD>
Specifies a list {<I>type</I> <I>oplist</I> ?<I>type</I> <I>oplist</I>? ...} of acceptable
types and associated operations for the drop target.
For each type, <I>oplist</I> is a list
{<I>descops</I> <I>mod</I> ?<I>descops</I> <I>mod</I>? ...} describing operations and
modifier keys for these operations.
<I>descops</I> describe an operation. It can be a predefined operations (<B>copy</B>,
<B>move</B> or <B>link</B>) or a new user defined operation, of the form {<I>subop</I>
<B>baseop</I> ?<I>bitmap</I>?}.
<I>subop</I> is the name given to the sub operation, <I>baseop</I> is the name of the
base operation (<B>copy</B>, <B>move</B> or <B>link</B>) and <I>bitmap</I> is a bitmap
to display for the operation.
<BR>If <I>bitmap</I> is empty, the default bitmap of the base operation is used for the
sub operation.
<BR><I>subop</I> can be a base operation, in order to change the bitmap of a base operation.
In this case, <I>baseop</I> must be empty or equal to <I>subop</I>.
<BR><I>mod</I> is the modifer key for the operation. It can be:
<UL>
<LI><B>none</B> to specify that no modifier key is pressed. This modifier can only be used
with a sub operation named <B>default</B> (and vice versa), which has the behaviour of not
display any bitmap operation. For all type, if the modifier <B>none</B> is not given, it is
automatically associated to the <B>default</B> sub operation of a <B>copy</B> base operation.
<LI><B>program</B> to specifies a sub operation accessible only by <B>DropSite::setoperation</B>.
<LI>A list combining <B>shift</B>, <B>control</B> and <B>alt</B>, which means their
corresponding key.
</UL>
</DD>
</DL>
</DD></DL>
<DL><DT><A NAME="setcursor">DropSite::<B>setcursor</B></A>
<I>cursor</I>
</DT><DD>
This command can be used within the script <B>dragovercmd</B>. It is usefull to provide
visual effect about the state of the drag.
</DD></DL>
<DL><DT><A NAME="setdrop">DropSite::<B>setdrop</B></A>
<I>path</I>
<I>subpath</I>
<I>dropover</I>
<I>drop</I>
?<I>force</I>?
</DT><DD>
This command provides a simple way to call <B>register</B> during a BWidget creation or
configuration.
<UL>
<LI><I>path</I> is the pathname of the BWidget,
<LI><I>subpath</I> is the pathname of the tk widget where drag event occurs,
<LI><I>dropover</I> is a command for <I>drag-over</I> event,
<LI><I>drop</I> is a command for <I>drop</I> event,
<LI><I>force</I> specifies wether or not to call <B>register</B> whenever no option value
has changed (0 by default - for BWidget configuration, use 1 for BWidget creation).
</UL>
<B>setdrop</B> verifies the modification flag of options <B>dropenabled</B> and
<B>droptypes</B> and calls <B>register</B> if needed according to the options values and
<I>dropover</I> and <I>drop</I> arguments. <B>dropovercmd</B> and <B>dropcmd</B> are not
taken from options of widget because they are considered as user command, called by
BWidget implementation of <I>drag-over</I> and <I>drop</I> events.
</DD></DL>
<DL><DT><A NAME="setoperation">DropSite::<B>setoperation</B></A>
<I>op</I>
</DT><DD>
Description text
</DD></DL>
</BODY></HTML>

View File

@ -0,0 +1,126 @@
<HTML>
<HEAD><TITLE>DynamicHelp</TITLE></HEAD>
<BODY BGCOLOR=white>
<DL><DT><I><A HREF="#descr">NAME</A></I></DT>
<DD><B>DynamicHelp</B>
- Provide help to Tk widget or BWidget
</DD></DL>
<DL>
<DT><I><A HREF="#wc">COMMAND</A></I></DT>
<DD>DynamicHelp::<A HREF="#configure"><B>configure</B></A>
?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
</DD>
<DD>DynamicHelp::<A HREF="#include"><B>include</B></A>
<I>class</I>
<I>type</I>
</DD>
<DD>DynamicHelp::<A HREF="#register"><B>register</B></A>
<I>path</I>
<I>type</I>
?<I>arg...</I>?
</DD>
<DD>DynamicHelp::<A HREF="#sethelp"><B>sethelp</B></A>
<I>path</I>
<I>subpath</I>
?<I>force</I>?
</DD>
</DL>
<BR><HR WIDTH="100%"><BR>
<B><A NAME="descr"></A>DESCRIPTION</B><BR>
<P>
Description text
</P>
<HR WIDTH="50%"><BR>
<B><A NAME="wc">COMMAND</A></B><BR>
<DL><DT><A NAME="configure">DynamicHelp::<B>configure</B></A>
?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
</DT><DD>
This command configure the ballon help.
<P>
<DL><DT><A NAME="DynamicHelp-borderwidth"><B>-borderwidth</B></A></DT>
<DD>
Width of the black border around the balloon.
</DD>
</DL>
<DL><DT><A NAME="DynamicHelp-delay"><B>-delay</B></A></DT>
<DD>
Define the delay in millisecond of mouse inactivity before displaying
the balloon.
</DD>
</DL>
<BR>Other standard options are:
<DD><TABLE CELLSPACING=0 CELLSPACING=0 BORDER=0>
<TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-background">-background or -bg</A></TD>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-font">-font</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-foreground">-foreground or -fg</A></TD>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-justify">-justify</A></TR>
</TR>
</TABLE></DD>
</DD></DL>
<DL><DT><A NAME="include">DynamicHelp::<B>include</B></A>
<I>class</I>
<I>type</I>
</DT><DD>
Description text
</DD></DL>
<DL><DT><A NAME="register">DynamicHelp::<B>register</B></A>
<I>path</I>
<I>type</I>
?<I>arg...</I>?
</DT><DD>
Register a help text to the widget <I>path</I>.
<I>type</I> determines the type of the help or the type of the widget.
Depending on <I>type</I>, other options must be provided.
<BR>
<TABLE CELLSPACING=5 CELLPADDING=0 BORDER=0>
<TR><TD><B> type </B></TD><TD><B> options </B></TD></TR>
<TR><TD><B><I> balloon </I></B></TD><TD><I> text </I></TD></TR>
<TR><TD><B><I> variable </I></B></TD><TD><I> varName text </I></TD></TR>
<TR><TD><B><I> menu </I></B></TD><TD><I> varName </I></TD></TR>
<TR><TD><B><I> menuentry </I></B></TD><TD><I> index text </I></TD></TR>
</TABLE>
<BR>If one of the option is missing or is empty, help is removed for this widget.
<BR>For type other than <I>balloon</I>, <I>varName</I> is typically a variable
linked to a label.
<BR>For menu, balloon type help is not available. To declare a help for menu,
you first declare the menu, and then entries of this menu.
<BR>For example:
<BR><BR>
<CENTER>
<TABLE BORDER=2 CELLSPACING=2 WIDTH="80%">
<TR><TD><PRE>
<FONT COLOR=red><I># create menu</I></FONT>
menu .m -type menubar
<FONT COLOR=red><I># associate menubar to toplevel BEFORE DynamicHelp::register</I></FONT>
<FONT COLOR=red><I># to make it works with menu clone name</I></FONT>
. configure -menu .m
.m add cascade -label "File" -menu .m.file
menu .m.file
.m.file add command -label "Open..."
.m.file add command -label "Quit"
<FONT COLOR=red><I># create label for help, using variable varinfo</I></FONT>
label .l -textvariable varinfo
<FONT COLOR=red><I># associate all entries of menu .m.file to variable varinfo</I></FONT>
DynamicHelp::register .m.file menu varinfo
<FONT COLOR=red><I># then declare entries of .m.file</I></FONT>
DynamicHelp::register .m.file menuentry 0 "Detach menu"
DynamicHelp::register .m.file menuentry 1 "Open a file"
DynamicHelp::register .m.file menuentry 2 "Exit demo"
</PRE></TD></TR></TABLE></CENTER>
<BR>
<BR>Notice that if popup menu is owned by a menubar, you must associate first the menubar
to its toplevel. In this case, when you create a menu popup, its clone window is also
created, and DynamicHelp::register detects the exitence of the clone window and maps
events to it.
</DD></DL>
<DL><DT><A NAME="sethelp">DynamicHelp::<B>sethelp</B></A>
<I>path</I>
<I>subpath</I>
?<I>force</I>?
</DT><DD>
Description text
</DD></DL>
</BODY></HTML>

340
hlp/en/bwidget/Entry.html Normal file
View File

@ -0,0 +1,340 @@
<HTML>
<HEAD><TITLE>Entry</TITLE></HEAD>
<BODY BGCOLOR=white>
<DL><DT><I><A HREF="#descr">NAME</A></I></DT>
<DD><B>Entry</B>
- Entry widget with <B>state</B> option, dynamic help and drag and drop facilities
</DD></DL>
<DL>
<DT><I>CREATION</I></DT>
<DD><A HREF="#descr"><B>Entry</B></A> <I>pathName</I> ?<I>option value...</I>?</DD>
</DL>
<DL>
<DT><I>STANDARD OPTIONS</I></DT>
<DD><TABLE CELLSPACING=0 CELLSPACING=0 BORDER=0>
<TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-background">-background or -bg</A></TD>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-borderwidth">-borderwidth or -bd</A></TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-disabledforeground">-disabledforeground</A></TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-exportselection">-exportselection</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-font">-font</A></TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-foreground">-foreground or -fg</A></TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-highlightbackground">-highlightbackground</A></TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-highlightcolor">-highlightcolor</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-highlightthickness">-highlightthickness</A></TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-insertbackground">-insertbackground</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-insertborderwidth">-insertborderwidth</A></TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-insertofftime">-insertofftime</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-insertontime">-insertontime</A></TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-insertwidth">-insertwidth</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-justify">-justify</A></TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-relief">-relief</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-selectbackground">-selectbackground</A></TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-selectborderwidth">-selectborderwidth</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-selectforeground">-selectforeground</A></TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-takefocus">-takefocus</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-text">-text</A></TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-textvariable">-textvariable</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-xscrollcommand">-xscrollcommand</A></TR>
</TABLE></DD>
</DL>
<DL>
<DT><I><A HREF="#wso">WIDGET-SPECIFIC OPTIONS</A></I></DT>
<DD><TABLE CELLSPACING=0 CELLSPACING=0 BORDER=0>
<TR>
<TD>&nbsp;&nbsp;<A HREF="#-command">-command</A></TR>
<TD>&nbsp;&nbsp;<A HREF="#-dragenabled">-dragenabled</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="#-dragendcmd">-dragendcmd</A></TR>
<TD>&nbsp;&nbsp;<A HREF="#-dragevent">-dragevent</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="#-draginitcmd">-draginitcmd</A></TR>
<TD>&nbsp;&nbsp;<A HREF="#-dragtype">-dragtype</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="#-dropcmd">-dropcmd</A></TR>
<TD>&nbsp;&nbsp;<A HREF="#-dropenabled">-dropenabled</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="#-dropovercmd">-dropovercmd</A></TR>
<TD>&nbsp;&nbsp;<A HREF="#-droptypes">-droptypes</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="#-editable">-editable</A></TR>
<TD>&nbsp;&nbsp;<A HREF="#-helptext">-helptext</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="#-helptype">-helptype</A></TR>
<TD>&nbsp;&nbsp;<A HREF="#-helpvar">-helpvar</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="#-show">-show</A></TR>
<TD>&nbsp;&nbsp;<A HREF="#-state">-state</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="#-width">-width</A></TR>
</TABLE></DD>
</DL>
<DL>
<DT><I><A HREF="#wc">WIDGET COMMAND</A></I></DT>
<DD><I>pathName</I> <A HREF="#cget"><B>cget</B></A>
<I>option</I>
</DD>
<DD><I>pathName</I> <A HREF="#configure"><B>configure</B></A>
?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
</DD>
<DD><I>pathName</I> <A HREF="#invoke"><B>invoke</B></A>
</DD>
</DL>
<BR><HR WIDTH="100%"><BR>
<B><A NAME="descr"></A>DESCRIPTION</B><BR>
<P>
The <B>Entry</B> widget extends the default Tk entry. Options have been added to provide
visual effect depending on the state of the Entry,
<A HREF="DynamicHelp.html">DynamicHelp</A> options,
and <A HREF="DragSite.html">Drag</A> and
<A HREF="DropSite.html">Drop</A>.
Entry behaves much like a Label, with <B>text</B> option to set its contents.
<BR>Tk entry command can also be used on Entry widget.
</P>
<BR><HR WIDTH="50%"><BR>
<B><A NAME="wso">WIDGET-SPECIFIC OPTIONS</A></B><BR>
<DL><DT><A NAME="-command"><B>-command</B></A></DT>
<DD>
Specifies a command when user press &lt;Return&gt; in the Entry.
</DD>
</DL>
<DL><DT><A NAME="-dragenabled"><B>-dragenabled</B></A></DT>
<DD>
A boolean specifying if drag is enabled.
</DD>
</DL>
<DL><DT><A NAME="-dragendcmd"><B>-dragendcmd</B></A></DT>
<DD>
Specifies a command to be called when drag ended.
<B>dragendcmd</B> must be a command conforming to the description of the
option <B>dragendcmd</B> of <B>DragSite::<A HREF="DragSite.html#register">register</A></B>.
<BR>If <B>dragendcmd</B> is empty, the internal <I>dragend</I> command updates the entry
following the operation (<B>move</B> or <B>copy</B>) and the dragged data
(whole or selected part of the entry).
</DD>
</DL>
<DL><DT><A NAME="-dragevent"><B>-dragevent</B></A></DT>
<DD>
Specifies the number of the mouse button associated to the drag.
Must be <B>1</B>, <B>2</B> or <B>3</B>.
</DD>
</DL>
<DL><DT><A NAME="-draginitcmd"><B>-draginitcmd</B></A></DT>
<DD>
Specifies a command to be called when <B>dragevent</B> occurs on widget.
<B>draginitcmd</B> must be a command conforming to the description of the
option <B>draginitcmd</B> of <B>DragSite::<A HREF="DragSite.html#register">register</A></B>.
<BR>if <B>draginitcmd</B> is empty, the command refuse the drag if entry is empty or if
portion of text is selected and event doesn't occur above the selection. In all other cases,
the command returns:
<UL>
<LI>as the data type, the value of option <B>dragtype</B> or <I>TEXT</I> if empty,
<LI>as the operations, <I>{copy move}</I> if <B>state</B> is normal and <B>editable</B>
is true, or <I>{copy}</I> only in other cases,
<LI>as the data, the whole content or the selected portion of the entry.
</UL>
</DD>
</DL>
<DL><DT><A NAME="-dragtype"><B>-dragtype</B></A></DT>
<DD>
Specifies an alternate type of dragged object.
</DD>
</DL>
<DL><DT><A NAME="-dropcmd"><B>-dropcmd</B></A></DT>
<DD>
Entry has a command wrapper for <I>drop</I> events. This command stops auto scrolling
and extract current position.
<BR>If <B>dropcmd</B> is not empty, it is called with the following arguments:
<UL>
<LI>the pathname of the Entry,
<LI>the pathname of the drag source,
<LI>the numeric index in the entry designated by the cursor,
<LI>the current operation,
<LI>the data type,
<LI>the data.
</UL>
and must return a value conforming to <B>dropcmd</B> option described in
<B>DropSite::<A HREF="DropSite.html#register">register</A></B>.
If <B>dropcmd</B> is empty, the wrapper updates the entry following the type of data:
<DL><DD><TABLE BORDER=0 CELLSPACING=1>
<TR><TD><I>COLOR</I> or <I>FGCOLOR</I></TD>
<TD>reconfigure the <B>foreground</B> of the Entry</TD>
<TR><TD><I>BGCOLOR</I></TD>
<TD>reconfigure the <B>background</B> of the Entry</TD>
<TR><TD><I>TEXT</I>,<BR>or any other tag</TD>
<TD>reconfigure the Entry to display the associated string.</TD>
</TABLE></DL>
and returns 1.
</DD>
</DL>
<DL><DT><A NAME="-dropenabled"><B>-dropenabled</B></A></DT>
<DD>
A boolean specifying if drop is enabled.
</DD>
</DL>
<DL><DT><A NAME="-dropovercmd"><B>-dropovercmd</B></A></DT>
<DD>
Entry has a command wrapper for <I>drag-over</I> events. This command enables auto scrolling
and position extraction during the <I>drag-over</I>.
<BR>If <B>dropovercmd</B> is empty, the wrapper accepts the drop if <B>editable</b> option is
true and <B>state</B> option is normal.
<BR>If <B>dropovercmd</B> is not empty, it is called with the following arguments:
<UL>
<LI>the pathname of the Entry,
<LI>the pathname of the drag source,
<LI>the event,
<LI>the numeric index in the entry designated by the cursor,
<LI>the current operation,
<LI>the data type,
<LI>the data.
</UL>
and must return a value conforming to <B>dropovercmd</B> option described in
<B>DropSite::<A HREF="DropSite.html#register">register</A></B>.
</DD>
</DL>
<DL><DT><A NAME="-droptypes"><B>-droptypes</B></A></DT>
<DD>
Specifies a list of accepted dropped object/operation.
See option <B>droptypes</B> of
<B>DropSite::<A HREF="DropSite.html#register">register</A></B>.
for more infromation.
Default accepts <I>FGCOLOR</I>, <I>COLOR</I>, <I>BGCOLOR</I> and <I>TEXT</I>,
all with <B>copy</B> and <B>move</B> operations.
</DD>
</DL>
<DL><DT><A NAME="-editable"><B>-editable</B></A></DT>
<DD>
Specifies whether the Entry is editable by the user. Equivalent to the <B>state</B> option
of the Tk entry widget.
</DD>
</DL>
<DL><DT><A NAME="-helptext"><B>-helptext</B></A></DT>
<DD>
Text for dynamic help. If empty, no help is available for this widget.
See also <A HREF="DynamicHelp.html">DynamicHelp</A>.
</DD>
</DL>
<DL><DT><A NAME="-helptype"><B>-helptype</B></A></DT>
<DD>
Type of dynamic help. Use <I>balloon</I> or <I>variable</I>.
See also <A HREF="DynamicHelp.html">DynamicHelp</A>.
</DD>
</DL>
<DL><DT><A NAME="-helpvar"><B>-helpvar</B></A></DT>
<DD>
Variable to use when <B>helptype</B> option is <I>variable</I>.
See also <A HREF="DynamicHelp.html">DynamicHelp</A>.
</DD>
</DL>
<DL><DT><A NAME="-show"><B>-show</B></A></DT>
<DD>
If this option is specified, then the true contents of the entry are not displayed in the
window. Instead, each character in the entry's value will be displayed as the first character
in the value of this option, such as ``*''. This is useful, for example, if the entry is to
be used to enter a password. If characters in the entry are selected and copied elsewhere, the
information copied will be what is displayed, not the true contents of the entry.
</DD>
</DL>
<DL><DT><A NAME="-state"><B>-state</B></A></DT>
<DD>
Specifies one of two states for the Entry: <B>normal</B> or <B>disabled</B>.
In normal state the text of the Entry is displayed using the <B>foreground</B> option.
In disabled state the text of the Entry is displayed using the <B>disabledforeground</B>
option. If the entry is disabled then the value may not be changed by user input
and no insertion cursor will be displayed, even if the input focus is in the widget.
Disabled state is the same as not editable with visual effect.
</DD>
</DL>
<DL><DT><A NAME="-width"><B>-width</B></A></DT>
<DD>
Specifies an integer value indicating the desired width of the entry window, in average-size
characters of the widget's font. If the value is less than or equal to zero, the widget picks
a size just large enough to hold its current text.
</DD>
</DL>
<HR WIDTH="50%"><BR>
<B><A NAME="wc">WIDGET COMMAND</A></B><BR>
<DL><DT><A NAME="cget"><I>pathName</I> <B>cget</B></A>
<I>option</I>
</DT><DD>
Returns the current value of the configuration option given by <I>option</I>.
<I>Option</I> may have any of the values accepted by the creation command.
</DD></DL>
<DL><DT><A NAME="configure"><I>pathName</I> <B>configure</B></A>
?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
</DT><DD>
Query or modify the configuration options of the widget. If no <I>option</I> is specified,
returns a list describing all of the available options for <I>pathName</I>.
If <I>option</I> is specified with no <I>value</I>, then the command returns a list
describing the one named <I>option</I> (this list will be identical to the corresponding
sublist of the value returned if no <I>option</I> is specified). If one or
more <I>option-value</I> pairs are specified, then the command modifies the given widget
option(s) to have the given value(s); in this case the command returns an empty string.
<I>Option</I> may have any of the values accepted by the creation command.
Read-only options are not be modified.
</DD></DL>
<DL><DT><A NAME="invoke"><I>pathName</I> <B>invoke</B></A>
</DT><DD>
Calls the command specified by the option <B>-command</B>.
</DD></DL>
</BODY></HTML>

331
hlp/en/bwidget/Label.html Normal file
View File

@ -0,0 +1,331 @@
<HTML>
<HEAD><TITLE>Label</TITLE></HEAD>
<BODY BGCOLOR=white>
<DL><DT><I><A HREF="#descr">NAME</A></I></DT>
<DD><B>Label</B>
- Label widget with <B>state</B> option, dynamic help and drag and drop facilities
</DD></DL>
<DL>
<DT><I>CREATION</I></DT>
<DD><A HREF="#descr"><B>Label</B></A> <I>pathName</I> ?<I>option value...</I>?</DD>
</DL>
<DL>
<DT><I>STANDARD OPTIONS</I></DT>
<DD><TABLE CELLSPACING=0 CELLSPACING=0 BORDER=0>
<TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-anchor">-anchor</A></TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-background">-background or -bg</A></TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-bitmap">-bitmap</A></TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-borderwidth">-borderwidth or -bd</A></TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-cursor">-cursor</A></TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-disabledforeground">-disabledforeground</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-font">-font</A></TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-foreground">-foreground or -fg</A></TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-highlightbackground">-highlightbackground</A></TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-highlightcolor">-highlightcolor</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-highlightthickness">-highlightthickness</A></TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-image">-image</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-justify">-justify</A></TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-padx">-padx</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-pady">-pady</A></TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-relief">-relief</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-takefocus">-takefocus</A></TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-text">-text</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-textvariable">-textvariable</A></TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-wraplength">-wraplength</A></TR>
</TR>
</TABLE></DD>
</DL>
<DL>
<DT><I><A HREF="#wso">WIDGET-SPECIFIC OPTIONS</A></I></DT>
<DD><TABLE CELLSPACING=0 CELLSPACING=0 BORDER=0>
<TR>
<TD>&nbsp;&nbsp;<A HREF="#-dragenabled">-dragenabled</A></TR>
<TD>&nbsp;&nbsp;<A HREF="#-dragendcmd">-dragendcmd</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="#-dragevent">-dragevent</A></TR>
<TD>&nbsp;&nbsp;<A HREF="#-draginitcmd">-draginitcmd</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="#-dragtype">-dragtype</A></TR>
<TD>&nbsp;&nbsp;<A HREF="#-dropcmd">-dropcmd</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="#-dropenabled">-dropenabled</A></TR>
<TD>&nbsp;&nbsp;<A HREF="#-dropovercmd">-dropovercmd</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="#-droptypes">-droptypes</A></TR>
<TD>&nbsp;&nbsp;<A HREF="#-focus">-focus</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="#-height">-height</A></TR>
<TD>&nbsp;&nbsp;<A HREF="#-helptext">-helptext</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="#-helptype">-helptype</A></TR>
<TD>&nbsp;&nbsp;<A HREF="#-helpvar">-helpvar</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="#-name">-name</A></TR>
<TD>&nbsp;&nbsp;<A HREF="#-state">-state</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="#-underline">-underline</A></TR>
<TD>&nbsp;&nbsp;<A HREF="#-width">-width</A></TR>
</TR>
</TABLE></DD>
</DL>
<DL>
<DT><I><A HREF="#wc">WIDGET COMMAND</A></I></DT>
<DD><I>pathName</I> <A HREF="#cget"><B>cget</B></A>
<I>option</I>
</DD>
<DD><I>pathName</I> <A HREF="#configure"><B>configure</B></A>
?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
</DD>
<DD><I>pathName</I> <A HREF="#setfocus"><B>setfocus</B></A>
</DD>
</DL>
<BR><HR WIDTH="100%"><BR>
<B><A NAME="descr"></A>DESCRIPTION</B><BR>
<P>
The <B>Label</B> widget extends the default Tk label. Options have been added to provide
visual effect depending on the state of the Label, <A HREF="DynamicHelp.html">DynamicHelp</A> options, and <A HREF="DragSite.html">Drag
</A> and <A HREF="DropSite.html">Drop</A>.
</P>
<BR><HR WIDTH="50%"><BR>
<B><A NAME="wso">WIDGET-SPECIFIC OPTIONS</A></B><BR>
<DL><DT><A NAME="-dragenabled"><B>-dragenabled</B></A></DT>
<DD>
A boolean specifying if drag is enabled.
</DD>
</DL>
<DL><DT><A NAME="-dragendcmd"><B>-dragendcmd</B></A></DT>
<DD>
Specifies a command to be called when drag ended.
<B>dragendcmd</B> must be a command conforming to the description of the
option <B>dragendcmd</B> of <B>DragSite::<A HREF="DragSite.html#register">register</A></B>.
</DD>
</DL>
<DL><DT><A NAME="-dragevent"><B>-dragevent</B></A></DT>
<DD>
Specifies the number of the mouse button associated to the drag.
Must be <B>1</B>, <B>2</B> or <B>3</B>.
</DD>
</DL>
<DL><DT><A NAME="-draginitcmd"><B>-draginitcmd</B></A></DT>
<DD>
Specifies a command to be called when <B>dragevent</B> occurs on widget.
<B>draginitcmd</B> must be a command conforming to the description of the
option <B>draginitcmd</B> of <B>DragSite::<A HREF="DragSite.html#register">register</A></B>.
<BR>If <B>draginitcmd</B> is empty, the internal <B>draginitcmd</B> command is used instead
and returns:
<DL><DD><TABLE BORDER=0 CELLSPACING=1>
<TR><TD valign=top><I>IMAGE&nbsp;{copy}&nbsp;&lt;image&nbsp;name&gt;</I>
<TD>if an image is displayed.
<TR><TD valign=top><I>BITMAP&nbsp;{copy}&nbsp;&lt;bitmap&nbsp;name&gt;</I>
<TD>if a bitmap is displayed.
<TR><TD valign=top><I>TEXT&nbsp;{copy}&nbsp;&lt;text&gt;</I>
<TD>if a text is displayed.
</TABLE></DL>
Note that if <B>dragtype</B> option is not empty, its value is used instead of those above.
</DD>
</DL>
<DL><DT><A NAME="-dragtype"><B>-dragtype</B></A></DT>
<DD>
Specifies an alternate type of dragged object.
</DD>
</DL>
<DL><DT><A NAME="-dropcmd"><B>-dropcmd</B></A></DT>
<DD>
Specifies a command to be called when drop occurs on the widget.
<B>dropcmd</B> must be a command conforming to the description of the
option <B>dropcmd</B> of <B>DropSite::<A HREF="DropSite.html#register">register</A></B>.
<BR>If <B>dropcmd</B> is empty, the command updates the label following the type of the data:
<DL><DD><TABLE BORDER=0 CELLSPACING=1>
<TR><TD><I>COLOR</I> or <I>FGCOLOR</I></TD>
<TD>reconfigure the <B>foreground</B> of the Label.</TD>
<TR><TD><I>BGCOLOR</I></TD>
<TD>reconfigure the <B>background</B> of the Label.</TD>
<TR><TD><I>IMAGE</I></TD>
<TD>reconfigure the Label to display the associated image.</TD>
<TR><TD><I>BITMAP</I></TD>
<TD>reconfigure the Label to display the associated bitmap.
<B>image</B> option is set to empty.</TD>
<TR><TD><I>TEXT</I>,<BR>or any other tag</TD>
<TD>reconfigure the Label to display the associated string.
<B>image</B> and <B>bitmap</B> options are set to empty.</TD>
</TABLE></DL>
and returns 1.
</DD>
</DL>
<DL><DT><A NAME="-dropenabled"><B>-dropenabled</B></A></DT>
<DD>
A boolean specifying if drop is enabled.
</DD>
</DL>
<DL><DT><A NAME="-dropovercmd"><B>-dropovercmd</B></A></DT>
<DD>
Specifies a command to be called when drag icon is over the widget.
<B>dropovercmd</B> must be a command conforming to the description of the
option <B>dropovercmd</B> of <B>DropSite::<A HREF="DropSite.html#register">register</A></B>.
<BR>If <B>dropovercmd</B> is empty, Label always accepts the drop if data type is
<I>FGCOLOR</I>, <I>COLOR</I>, <I>BGCOLOR</I>, and accepts all other data type only if
<B>state</B> is normal.
</DD>
</DL>
<DL><DT><A NAME="-droptypes"><B>-droptypes</B></A></DT>
<DD>
Specifies a list of accepted dropped object/operation.
See option <B>droptypes</B> of
<B>DropSite::<A HREF="DropSite.html#register">register</A></B>.
for more infromation.
Default accepts <I>FGCOLOR</I>, <I>COLOR</I>, <I>BGCOLOR</I>, <I>TEXT</I>, <I>BITMAP</I>
and <I>IMAGE</I>, all with <B>copy</B> and <B>move</B> operations.
</DD>
</DL>
<DL><DT><A NAME="-focus"><B>-focus</B></A></DT>
<DD>
Specifies a pathname to set the focus on for Label::<B>setfocus</B> command.
</DD>
</DL>
<DL><DT><A NAME="-height"><B>-height</B></A></DT>
<DD>
Specifies a desired height for the label.
If an image or bitmap is being displayed in the label then the value is in
screen units, for text it is in lines of text.
If this option isn't specified, the label's desired height is computed
from the size of the image or bitmap or text being displayed in it.
</DD>
</DL>
<DL><DT><A NAME="-helptext"><B>-helptext</B></A></DT>
<DD>
Text for dynamic help. If empty, no help is available for this widget.
See also <A HREF="DynamicHelp.html">DynamicHelp</A>.
</DD>
</DL>
<DL><DT><A NAME="-helptype"><B>-helptype</B></A></DT>
<DD>
Type of dynamic help. Use <I>balloon</I> or <I>variable</I>.
See also <A HREF="DynamicHelp.html">DynamicHelp</A>.
</DD>
</DL>
<DL><DT><A NAME="-helpvar"><B>-helpvar</B></A></DT>
<DD>
Variable to use when <B>helptype</B> option is <I>variable</I>.
See also <A HREF="DynamicHelp.html">DynamicHelp</A>.
</DD>
</DL>
<DL><DT><A NAME="-name"><B>-name</B></A></DT>
<DD>
Specifies a standard name for the label. If the option <B>*<I>name</I>Name</B> is
found in the resource database, then <B>text</B> and <B>underline</B> options
are extracted from its value.
</DD>
</DL>
<DL><DT><A NAME="-state"><B>-state</B></A></DT>
<DD>
Specifies one of two states for the Label: <B>normal</B> or <B>disabled</B>.
In normal state the text of the Label is displayed using the <B>foreground</B> option.
In disabled state the text of the Label is displayed using the <B>disabledforeground</B> option.
</DD>
</DL>
<DL><DT><A NAME="-underline"><B>-underline</B></A></DT>
<DD>
Specifies the integer index of a character to underline in the label.
0 corresponds to the first character of the text displayed, 1 to the next character,
and so on.
<BR>The binding <B>&lt;Alt-<I>char</I>&gt;</B> is automatically set on the toplevel
of the Label to call Label::<B>setfocus</B>.
</DD>
</DL>
<DL><DT><A NAME="-width"><B>-width</B></A></DT>
<DD>
Specifies a desired width for the label.
If an image or bitmap is being displayed in the label then the value is in
screen units, for text it is in characters.
If this option isn't specified, the label's desired width is computed
from the size of the image or bitmap or text being displayed in it.
</DD>
</DL>
<HR WIDTH="50%"><BR>
<B><A NAME="wc">WIDGET COMMAND</A></B><BR>
<DL><DT><A NAME="cget"><I>pathName</I> <B>cget</B></A>
<I>option</I>
</DT><DD>
Returns the current value of the configuration option given by <I>option</I>.
<I>Option</I> may have any of the values accepted by the creation command.
</DD></DL>
<DL><DT><A NAME="configure"><I>pathName</I> <B>configure</B></A>
?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
</DT><DD>
Query or modify the configuration options of the widget. If no <I>option</I> is specified,
returns a list describing all of the available options for <I>pathName</I>.
If <I>option</I> is specified with no <I>value</I>, then the command returns a list
describing the one named <I>option</I> (this list will be identical to the corresponding
sublist of the value returned if no <I>option</I> is specified). If one or
more <I>option-value</I> pairs are specified, then the command modifies the given widget
option(s) to have the given value(s); in this case the command returns an empty string.
<I>Option</I> may have any of the values accepted by the creation command.
Read-only options are not be modified.
</DD></DL>
<DL><DT><A NAME="setfocus"><I>pathName</I> <B>setfocus</B></A>
</DT><DD>
Set the focus on the pathname given by <B>-focus</B> option if <B>-state</B> is <I>normal</I>.
</DD></DL>
</BODY></HTML>

View File

@ -0,0 +1,194 @@
<HTML>
<HEAD><TITLE>LabelEntry</TITLE></HEAD>
<BODY BGCOLOR=white>
<DL><DT><I><A HREF="#descr">NAME</A></I></DT>
<DD><B>LabelEntry</B>
-
LabelFrame containing an Entry widget.
</DD></DL>
<DL>
<DT><I>CREATION</I></DT>
<DD><A HREF="#descr"><B>LabelEntry</B></A> <I>pathName</I> ?<I>option value...</I>?</DD>
</DL>
<DL>
<DT><I><A HREF="Entry.html">OPTIONS from <B>Entry</B></A></I></DT>
<DD><TABLE CELLSPACING=0 CELLPADDING=0 BORDER=0>
<TR>
<TD>&nbsp;&nbsp;-borderwidth or -bd</TD>
<TD>&nbsp;&nbsp;-command</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-disabledforeground</TD>
<TD>&nbsp;&nbsp;-dragenabled</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-dragendcmd</TD>
<TD>&nbsp;&nbsp;-dragevent</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-draginitcmd</TD>
<TD>&nbsp;&nbsp;-dragtype</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-dropcmd</TD>
<TD>&nbsp;&nbsp;-dropenabled</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-dropovercmd</TD>
<TD>&nbsp;&nbsp;-droptypes</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-editable</TD>
<TD>&nbsp;&nbsp;-entrybg (see <B>-background</B>)</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-entryfg (see <B>-foreground</B>)</TD>
<TD>&nbsp;&nbsp;-exportselection</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-font</TD>
<TD>&nbsp;&nbsp;-helptext</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-helptype</TD>
<TD>&nbsp;&nbsp;-helpvar</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-highlightbackground</TD>
<TD>&nbsp;&nbsp;-highlightcolor</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-highlightthickness</TD>
<TD>&nbsp;&nbsp;-insertbackground</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-insertborderwidth</TD>
<TD>&nbsp;&nbsp;-insertofftime</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-insertontime</TD>
<TD>&nbsp;&nbsp;-insertwidth</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-justify</TD>
<TD>&nbsp;&nbsp;-relief</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-selectbackground</TD>
<TD>&nbsp;&nbsp;-selectborderwidth</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-selectforeground</TD>
<TD>&nbsp;&nbsp;-show</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-state</TD>
<TD>&nbsp;&nbsp;-takefocus</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-text</TD>
<TD>&nbsp;&nbsp;-textvariable</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-width</TD>
<TD>&nbsp;&nbsp;-xscrollcommand</TD>
</TR>
</TABLE></DD>
</DL>
<DL>
<DT><I><A HREF="LabelFrame.html">OPTIONS from <B>LabelFrame</B></A></I></DT>
<DD><TABLE CELLSPACING=0 CELLPADDING=0 BORDER=0>
<TR>
<TD>&nbsp;&nbsp;-background or -bg</TD>
<TD>&nbsp;&nbsp;-disabledforeground</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-foreground or -fg</TD>
<TD>&nbsp;&nbsp;-helptext</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-helptype</TD>
<TD>&nbsp;&nbsp;-helpvar</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-label (see <B>-text</B>)</TD>
<TD>&nbsp;&nbsp;-labelanchor (see <B>-anchor</B>)</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-labelfont (see <B>-font</B>)</TD>
<TD>&nbsp;&nbsp;-labelheight (see <B>-height</B>)</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-labeljustify (see <B>-justify</B>)</TD>
<TD>&nbsp;&nbsp;-labelwidth (see <B>-width</B>)</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-name</TD>
<TD>&nbsp;&nbsp;-padx</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-pady</TD>
<TD>&nbsp;&nbsp;-side</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-state</TD>
<TD>&nbsp;&nbsp;-underline</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-wraplength</TD>
</TABLE></DD>
</DL>
<DL>
<DT><I><A HREF="#wc">WIDGET COMMAND</A></I></DT>
<DD><I>pathName</I> <A HREF="#bind"><B>bind</B></A>
?<I>arg...</I>?
</DD>
<DD><I>pathName</I> <A HREF="#cget"><B>cget</B></A>
<I>option</I>
</DD>
<DD><I>pathName</I> <A HREF="#configure"><B>configure</B></A>
?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
</DD>
</DL>
<BR><HR WIDTH="100%"><BR>
<B><A NAME="descr"></A>DESCRIPTION</B><BR>
<P>
LabelEntry is a widget composed of <A HREF="LabelFrame.html">LabelFrame</A> widget
containing an <A HREF="Entry.html">Entry</A> widget.
Tk entry command can also be used on LabelEntry widget.
</P>
<HR WIDTH="50%"><BR>
<B><A NAME="wc">WIDGET COMMAND</A></B><BR>
<DL><DT><A NAME="bind"><I>pathName</I> <B>bind</B></A>
?<I>arg...</I>?
</DT><DD>
Set bindings on the entry widget.
</DD></DL>
<DL><DT><A NAME="cget"><I>pathName</I> <B>cget</B></A>
<I>option</I>
</DT><DD>
Returns the current value of the configuration option given by <I>option</I>.
<I>Option</I> may have any of the values accepted by the creation command.
</DD></DL>
<DL><DT><A NAME="configure"><I>pathName</I> <B>configure</B></A>
?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
</DT><DD>
Query or modify the configuration options of the widget. If no <I>option</I> is specified,
returns a list describing all of the available options for <I>pathName</I>.
If <I>option</I> is specified with no <I>value</I>, then the command returns a list
describing the one named <I>option</I> (this list will be identical to the corresponding
sublist of the value returned if no <I>option</I> is specified). If one or
more <I>option-value</I> pairs are specified, then the command modifies the given widget
option(s) to have the given value(s); in this case the command returns an empty string.
<I>Option</I> may have any of the values accepted by the creation command.
Read-only options are not be modified.
</DD></DL>
</BODY></HTML>

View File

@ -0,0 +1,139 @@
<HTML>
<HEAD><TITLE>LabelFrame</TITLE></HEAD>
<BODY BGCOLOR=white>
<DL><DT><I><A HREF="#descr">NAME</A></I></DT>
<DD><B>LabelFrame</B>
- Frame with a Label
</DD></DL>
<DL>
<DT><I>CREATION</I></DT>
<DD><A HREF="#descr"><B>LabelFrame</B></A> <I>pathName</I> ?<I>option value...</I>?</DD>
</DL>
<DL>
<DT><I>STANDARD OPTIONS</I></DT>
<DD><TABLE CELLSPACING=0 CELLSPACING=0 BORDER=0>
<TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-borderwidth">-borderwidth or -bd</A></TD>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-relief">-relief</A></TR>
</TR>
</TABLE></DD>
</DL>
<DL>
<DT><I><A HREF="Label.html">OPTIONS from <B>Label</B></A></I></DT>
<DD><TABLE CELLSPACING=0 CELLPADDING=0 BORDER=0>
<TR>
<TD>&nbsp;&nbsp;-anchor</TD>
<TD>&nbsp;&nbsp;-background or -bg</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-disabledforeground</TD>
<TD>&nbsp;&nbsp;-focus</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-font</TD>
<TD>&nbsp;&nbsp;-foreground or -fg</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-height</TD>
<TD>&nbsp;&nbsp;-helptext</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-helptype</TD>
<TD>&nbsp;&nbsp;-helpvar</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-justify</TD>
<TD>&nbsp;&nbsp;-name</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-padx</TD>
<TD>&nbsp;&nbsp;-pady</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-state</TD>
<TD>&nbsp;&nbsp;-text</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-underline</TD>
<TD>&nbsp;&nbsp;-width</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-wraplength</TD>
</TABLE></DD>
</DL>
<DL>
<DT><I><A HREF="#wso">WIDGET-SPECIFIC OPTIONS</A></I></DT>
<DD><TABLE CELLSPACING=0 CELLSPACING=0 BORDER=0>
<TR>
<TD>&nbsp;&nbsp;<A HREF="#-side">-side</A></TR>
</TABLE></DD>
</DL>
<DL>
<DT><I><A HREF="#wc">WIDGET COMMAND</A></I></DT>
<DD>LabelFrame::<A HREF="#align"><B>align</B></A>
?<I>arg...</I>?
</DD>
<DD><I>pathName</I> <A HREF="#cget"><B>cget</B></A>
<I>option</I>
</DD>
<DD><I>pathName</I> <A HREF="#configure"><B>configure</B></A>
?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
</DD>
<DD><I>pathName</I> <A HREF="#getframe"><B>getframe</B></A>
</DD>
</DL>
<BR><HR WIDTH="100%"><BR>
<B><A NAME="descr"></A>DESCRIPTION</B><BR>
<P>
LabelFrame enables user to create a frame with a
<A HREF="Label.html">Label</A> positionned at any side.
LabelFrame is used by <A HREF="ComboBox.html">ComboBox</A>
and <A HREF="SpinBox.html">SpinBox</A>.
</P>
<BR><HR WIDTH="50%"><BR>
<B><A NAME="wso">WIDGET-SPECIFIC OPTIONS</A></B><BR>
<DL><DT><A NAME="-side"><B>-side (read-only)</B></A></DT>
<DD>
Specifies where to position the Label relative to the user frame: <B>top</B>, <B>bottom</B>, <B>left</B> or <B>right</B>.
</DD>
</DL>
<HR WIDTH="50%"><BR>
<B><A NAME="wc">WIDGET COMMAND</A></B><BR>
<DL><DT><A NAME="align">LabelFrame::<B>align</B></A>
?<I>arg...</I>?
</DT><DD>
This command align label of all widget given by <I>args</I> of class LabelFrame
(or "derived") by setting their width to the max one +1
</DD></DL>
<DL><DT><A NAME="cget"><I>pathName</I> <B>cget</B></A>
<I>option</I>
</DT><DD>
Returns the current value of the configuration option given by <I>option</I>.
<I>Option</I> may have any of the values accepted by the creation command.
</DD></DL>
<DL><DT><A NAME="configure"><I>pathName</I> <B>configure</B></A>
?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
</DT><DD>
Query or modify the configuration options of the widget. If no <I>option</I> is specified,
returns a list describing all of the available options for <I>pathName</I>.
If <I>option</I> is specified with no <I>value</I>, then the command returns a list
describing the one named <I>option</I> (this list will be identical to the corresponding
sublist of the value returned if no <I>option</I> is specified). If one or
more <I>option-value</I> pairs are specified, then the command modifies the given widget
option(s) to have the given value(s); in this case the command returns an empty string.
<I>Option</I> may have any of the values accepted by the creation command.
Read-only options are not be modified.
</DD></DL>
<DL><DT><A NAME="getframe"><I>pathName</I> <B>getframe</B></A>
</DT><DD>
Return the frame where the user can create any other widget.
</DD></DL>
</BODY></HTML>

608
hlp/en/bwidget/ListBox.html Normal file
View File

@ -0,0 +1,608 @@
<HTML>
<HEAD><TITLE>ListBox</TITLE></HEAD>
<BODY BGCOLOR=white>
<DL><DT><I><A HREF="#descr">NAME</A></I></DT>
<DD><B>ListBox</B>
- ListBox widget
</DD></DL>
<DL>
<DT><I>CREATION</I></DT>
<DD><A HREF="#descr"><B>ListBox</B></A> <I>pathName</I> ?<I>option value...</I>?</DD>
</DL>
<DL>
<DT><I>STANDARD OPTIONS</I></DT>
<DD><TABLE CELLSPACING=0 CELLSPACING=0 BORDER=0>
<TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-background">-background or -bg</A></TD>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-borderwidth">-borderwidth or -bd</A></TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-cursor">-cursor</A></TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-highlightbackground">-highlightbackground</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-highlightcolor">-highlightcolor</A></TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-highlightthickness">-highlightthickness</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-relief">-relief</A></TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-selectbackground">-selectbackground</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-selectforeground">-selectforeground</A></TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-takefocus">-takefocus</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-xscrollcommand">-xscrollcommand</A></TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-yscrollcommand">-yscrollcommand</A></TR>
</TR>
</TABLE></DD>
</DL>
<DL>
<DT><I><A HREF="#wso">WIDGET-SPECIFIC OPTIONS</A></I></DT>
<DD><TABLE CELLSPACING=0 CELLSPACING=0 BORDER=0>
<TR>
<TD>&nbsp;&nbsp;<A HREF="#-deltax">-deltax</A></TR>
<TD>&nbsp;&nbsp;<A HREF="#-deltay">-deltay</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="#-dragenabled">-dragenabled</A></TR>
<TD>&nbsp;&nbsp;<A HREF="#-dragendcmd">-dragendcmd</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="#-dragevent">-dragevent</A></TR>
<TD>&nbsp;&nbsp;<A HREF="#-draginitcmd">-draginitcmd</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="#-dragtype">-dragtype</A></TR>
<TD>&nbsp;&nbsp;<A HREF="#-dropcmd">-dropcmd</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="#-dropenabled">-dropenabled</A></TR>
<TD>&nbsp;&nbsp;<A HREF="#-dropovercmd">-dropovercmd</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="#-dropovermode">-dropovermode</A></TR>
<TD>&nbsp;&nbsp;<A HREF="#-droptypes">-droptypes</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="#-height">-height</A></TR>
<TD>&nbsp;&nbsp;<A HREF="#-multicolumn">-multicolumn</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="#-padx">-padx</A></TR>
<TD>&nbsp;&nbsp;<A HREF="#-redraw">-redraw</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="#-width">-width</A></TR>
</TABLE></DD>
</DL>
<DL>
<DT><I><A HREF="#wc">WIDGET COMMAND</A></I></DT>
<DD><I>pathName</I> <A HREF="#bindImage"><B>bindImage</B></A>
<I>event</I>
<I>script</I>
</DD>
<DD><I>pathName</I> <A HREF="#bindText"><B>bindText</B></A>
<I>event</I>
<I>script</I>
</DD>
<DD><I>pathName</I> <A HREF="#cget"><B>cget</B></A>
<I>option</I>
</DD>
<DD><I>pathName</I> <A HREF="#configure"><B>configure</B></A>
?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
</DD>
<DD><I>pathName</I> <A HREF="#delete"><B>delete</B></A>
?<I>arg...</I>?
</DD>
<DD><I>pathName</I> <A HREF="#edit"><B>edit</B></A>
<I>item</I>
<I>text</I>
?<I>verifycmd</I>?
?<I>clickres</I>?
?<I>select</I>?
</DD>
<DD><I>pathName</I> <A HREF="#exists"><B>exists</B></A>
<I>item</I>
</DD>
<DD><I>pathName</I> <A HREF="#index"><B>index</B></A>
<I>item</I>
</DD>
<DD><I>pathName</I> <A HREF="#insert"><B>insert</B></A>
<I>index</I>
<I>item</I>
?<I>option value...</I>?
</DD>
<DD><I>pathName</I> <A HREF="#item"><B>item</B></A>
<I>first</I>
?<I>last</I>?
</DD>
<DD><I>pathName</I> <A HREF="#itemcget"><B>itemcget</B></A>
<I>item</I>
<I>option</I>
</DD>
<DD><I>pathName</I> <A HREF="#itemconfigure"><B>itemconfigure</B></A>
<I>item</I>
?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
</DD>
<DD><I>pathName</I> <A HREF="#items"><B>items</B></A>
?<I>first</I>?
?<I>last</I>?
</DD>
<DD><I>pathName</I> <A HREF="#move"><B>move</B></A>
<I>item</I>
<I>index</I>
</DD>
<DD><I>pathName</I> <A HREF="#reorder"><B>reorder</B></A>
<I>neworder</I>
</DD>
<DD><I>pathName</I> <A HREF="#see"><B>see</B></A>
<I>item</I>
</DD>
<DD><I>pathName</I> <A HREF="#selection"><B>selection</B></A>
<I>cmd</I>
?<I>arg...</I>?
</DD>
<DD><I>pathName</I> <A HREF="#xview"><B>xview</B></A>
?<I>arg...</I>?
</DD>
<DD><I>pathName</I> <A HREF="#yview"><B>yview</B></A>
?<I>arg...</I>?
</DD>
</DL>
<BR><HR WIDTH="100%"><BR>
<B><A NAME="descr"></A>DESCRIPTION</B><BR>
<P>
<B>ListBox</B> widget uses canvas to display a list of items.
Each item is composed of a label with its own font and foreground attributes, and an optional
image or window. Each item is drawn in a single line, whose height is defined by the
<B>deltay</B> option, so they must have at most this height.
A item is uniquely identified by a string given at creation (by the
<B>insert</B> command). The ListBox can have one or more columns, depending on
<B>multicolumn</B> option. The user do not handle columns; the number of columns
is determined following the height of the ListBox in order to see each item vertically.
</P>
<BR><HR WIDTH="50%"><BR>
<B><A NAME="wso">WIDGET-SPECIFIC OPTIONS</A></B><BR>
<DL><DT><A NAME="-deltax"><B>-deltax</B></A></DT>
<DD>
Specifies horizontal pad between each columns.
</DD>
</DL>
<DL><DT><A NAME="-deltay"><B>-deltay</B></A></DT>
<DD>
Specifies vertical size of the items.
</DD>
</DL>
<DL><DT><A NAME="-dragenabled"><B>-dragenabled</B></A></DT>
<DD>
A boolean specifying if drag is enabled.
</DD>
</DL>
<DL><DT><A NAME="-dragendcmd"><B>-dragendcmd</B></A></DT>
<DD>
Specifies a command to be called when drag ended.
<B>dragendcmd</B> must be a command conforming to the description of the
option <B>dragendcmd</B> of <B>DragSite::<A HREF="DragSite.html#register">register</A></B>.
</DD>
</DL>
<DL><DT><A NAME="-dragevent"><B>-dragevent</B></A></DT>
<DD>
Specifies the number of the mouse button associated to the drag.
Must be <B>1</B>, <B>2</B> or <B>3</B>.
</DD>
</DL>
<DL><DT><A NAME="-draginitcmd"><B>-draginitcmd</B></A></DT>
<DD>
ListBox has a command wrapper for <I>drag-init</I> events. This command refused the drag
if no item is designated. In other cases:
<BR>If <B>draginitcmd</B> is empty, it returns:
<UL>
<LI>the value of option <B>dragtype</B> or <I>LISTBOX_ITEM</I> if empty as the data type,
<LI><I>{move copy link}</I> as the operations,
<LI>the item identifier as the data.
</UL>
If <B>draginitcmd</B> is not empty, it is called with the following arguments:
<UL>
<LI>the pathname of the listbox,
<LI>the identifier of the dragged item,
<LI>the toplevel created to represent dragged data.
</UL>
and must return a value conforming to <B>draginitcmd</B> option described in
<B>DragSite::<A HREF="DragSite.html#register">register</A></B>.
</DD>
</DL>
<DL><DT><A NAME="-dragtype"><B>-dragtype</B></A></DT>
<DD>
Specifies an alternate type of dragged object.
</DD>
</DL>
<DL><DT><A NAME="-dropcmd"><B>-dropcmd</B></A></DT>
<DD>
ListBox has a command wrapper for <I>drop</I> events. This command stops auto scrolling
and extract item and position.
<BR>If <B>dropcmd</B> is not empty, it is called with the following arguments:
<UL>
<LI>the pathname of the listbox,
<LI>the pathname of the drag source,
<LI>a list describing where the drop occurs. It can be:
<UL>
<LI><I>{</I><B>widget</B><I>}</I>,
<LI><I>{</I><B>item</B> <I>item}</I> or
<LI><I>{</I><B>position</B> <I>index}</I>.
</UL>
<LI>the current operation,
<LI>the data type,
<LI>the data.
</UL>
</DD>
</DL>
<DL><DT><A NAME="-dropenabled"><B>-dropenabled</B></A></DT>
<DD>
A boolean specifying if drop is enabled.
</DD>
</DL>
<DL><DT><A NAME="-dropovercmd"><B>-dropovercmd</B></A></DT>
<DD>
LsitBox has a command wrapper for <I>drag-over</I> events. This command enables auto scrolling
and position extraction during the <I>drag-over</I>.
If <B>dropovercmd</B> is not empty, the command is called with the following aguments:
<UL>
<LI>the pathname of the listbox,
<LI>the pathname of the drag source,
<LI>a list describing where the drop can occur, whose elements are:
<UL>
<LI>the string <I>widget</I> if <B>dropovertype</B> option contains <I>w</I>, else empty string.
<LI>the targeted item if drag icon points an item and <B>dropovertype</B> option contains
<I>i</I>, else empty string.
<LI>an index within two items where drag icon points to if <B>dropovertype</B> option
contains <I>p</I>, else empty string.
<LI>optionally, the preferred method if drop can occur both inside an item and between two
items. The value is <I>position</I> or <I>item</I>.
</UL>
<LI>the current operation,
<LI>the data type,
<LI>the data.
</UL>
The command must return a list with two elements:
<UL>
<LI>the drop status, conforming to those described in <B>dropovercmd</B> option of
<B>DropSite::<A HREF="DropSite.html#register">register</A></B>,
<LI>the choosen method: <I>widget</I>, <I>item</I> or <I>position</I>.
</UL>
</DD>
</DL>
<DL><DT><A NAME="-dropovermode"><B>-dropovermode</B></A></DT>
<DD>
Specifies the type of <I>drop-over</I> interaction. Must be a combination of
<B>w</B>, which specifies that drop can occurs everywhere on widget,
<B>p</B>, which specifies that drop can occurs between two items,
and <B>i</B>, which specifies that drop occurs inside items.
</DD>
</DL>
<DL><DT><A NAME="-droptypes"><B>-droptypes</B></A></DT>
<DD>
Specifies a list of accepted dropped object/operation.
See option <B>droptypes</B> of
<B>DropSite::<A HREF="DropSite.html#register">register</A></B>.
for more infromation.
<BR>Default is <I>LISTBOX_ITEM</I> with operations <B>copy</B> and <B>move</B>.
</DD>
</DL>
<DL><DT><A NAME="-height"><B>-height</B></A></DT>
<DD>
Specifies the desired height for the listbox in units of <B>deltay</B> pixels.
</DD>
</DL>
<DL><DT><A NAME="-multicolumn"><B>-multicolumn</B></A></DT>
<DD>
Specifies wether or not ListBox layouts items in order to see each one vertically.
</DD>
</DL>
<DL><DT><A NAME="-padx"><B>-padx</B></A></DT>
<DD>
Specifies distance between image or window and text of the items.
</DD>
</DL>
<DL><DT><A NAME="-redraw"><B>-redraw</B></A></DT>
<DD>
Specifies wether or not the listbox should be redrawn when entering idle.
Set it to false if you call <B>update</B> while modifying the listbox.
</DD>
</DL>
<DL><DT><A NAME="-width"><B>-width</B></A></DT>
<DD>
Specifies the desired width for the listbox in units of 8 pixels.
</DD>
</DL>
<HR WIDTH="50%"><BR>
<B><A NAME="wc">WIDGET COMMAND</A></B><BR>
<DL><DT><A NAME="bindImage"><I>pathName</I> <B>bindImage</B></A>
<I>event</I>
<I>script</I>
</DT><DD>
This command associates a command to execute whenever the event
sequence given by <I>event</I> occurs on the image of a item.
The item idenfier on which the event occurs is appended to the command.
</DD></DL>
<DL><DT><A NAME="bindText"><I>pathName</I> <B>bindText</B></A>
<I>event</I>
<I>script</I>
</DT><DD>
This command associates a command to execute whenever the event
sequence given by <I>event</I> occurs on the label of a item.
The item idenfier on which the event occurs is appended to the command.
</DD></DL>
<DL><DT><A NAME="cget"><I>pathName</I> <B>cget</B></A>
<I>option</I>
</DT><DD>
Returns the current value of the configuration option given by <I>option</I>.
<I>Option</I> may have any of the values accepted by the creation command.
</DD></DL>
<DL><DT><A NAME="configure"><I>pathName</I> <B>configure</B></A>
?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
</DT><DD>
Query or modify the configuration options of the widget. If no <I>option</I> is specified,
returns a list describing all of the available options for <I>pathName</I>.
If <I>option</I> is specified with no <I>value</I>, then the command returns a list
describing the one named <I>option</I> (this list will be identical to the corresponding
sublist of the value returned if no <I>option</I> is specified). If one or
more <I>option-value</I> pairs are specified, then the command modifies the given widget
option(s) to have the given value(s); in this case the command returns an empty string.
<I>Option</I> may have any of the values accepted by the creation command.
Read-only options are not be modified.
</DD></DL>
<DL><DT><A NAME="delete"><I>pathName</I> <B>delete</B></A>
?<I>arg...</I>?
</DT><DD>
Deletes all items in <I>arg</I>. <I>arg</I> can be a list
of items or a list of list of items.
To delete all items, do <I>$pathName delete [$pathName items]</I>.
</DD></DL>
<DL><DT><A NAME="edit"><I>pathName</I> <B>edit</B></A>
<I>item</I>
<I>text</I>
?<I>verifycmd</I>?
?<I>clickres</I>?
?<I>select</I>?
</DT><DD>
Provides a way for the user to edit in place the label of an item.
<BR>The command takes the initial text as argument and does not modify the label of the
edited node, but returns an empty string if edition is canceled, or the typed text
if edition is accepted.
<BR>When editing, the user can cancel by pressing Escape, or accept by pressing Return.
<BR><I>clickres</I> specifies what to do if the user click outside the editable area.
If <I>clickres</I> is 0 (the default), the edition is canceled.
If <I>clickres</I> is 1, the edition is accepted.
In all other case, the edition continues.
<BR>If edition is accepted and <I>modifycmd</I> is not empty, then it is called with
the new text as argument and must return 1 to accept the new text, 0 to refuse it
and continue edition.
<BR><I>select</I> specifies wether or not the initial text should be selected. Default is 1.
</DD></DL>
<DL><DT><A NAME="exists"><I>pathName</I> <B>exists</B></A>
<I>item</I>
</DT><DD>
Returns 1 if <I>item</I> exists in the listbox, else 0.
</DD></DL>
<DL><DT><A NAME="index"><I>pathName</I> <B>index</B></A>
<I>item</I>
</DT><DD>
Returns the position of <I>item</I> in the list.
</DD></DL>
<DL><DT><A NAME="insert"><I>pathName</I> <B>insert</B></A>
<I>index</I>
<I>item</I>
?<I>option value...</I>?
</DT><DD>
Inserts a new item identified by <I>item</I> in the list at position <I>index</I>.
<P>
<DL><DT><A NAME="Item-data"><B>-data</B></A></DT>
<DD>
User data associated to the item.
</DD>
</DL>
<DL><DT><A NAME="Item-fill"><B>-fill</B></A></DT>
<DD>
Specifies the foreground color of the label of the item.
</DD>
</DL>
<DL><DT><A NAME="Item-font"><B>-font</B></A></DT>
<DD>
Specifies a font for the label of the item.
</DD>
</DL>
<DL><DT><A NAME="Item-image"><B>-image</B></A></DT>
<DD>
Specifies an image to display at the left of the label of the item.
<B>window</B> option override <B>image</B>.
</DD>
</DL>
<DL><DT><A NAME="Item-indent"><B>-indent</B></A></DT>
<DD>
Specifies the amount of extra space in pixels at the left of the item.
</DD>
</DL>
<DL><DT><A NAME="Item-text"><B>-text</B></A></DT>
<DD>
Specifies the label of the item.
</DD>
</DL>
<DL><DT><A NAME="Item-window"><B>-window</B></A></DT>
<DD>
Specifies a pathname to display at the left of the label of the item.
<B>window</B> option override <B>image</B>.
</DD>
</DL>
</DD></DL>
<DL><DT><A NAME="item"><I>pathName</I> <B>item</B></A>
<I>first</I>
?<I>last</I>?
</DT><DD>
<B>Its use is deprecated. Use <I>items</I> instead.</B><BR>
If <I>last</I> is omitted, returns the item at index <I>first</I> in the list,
or an empty string if <I>first</I> refers to a non-existent element.
If <I>last</I> is specified, the command returns a list whose elements are all
of the items between <I>first</I> and <I>last</I>, inclusive.
Both <I>first</I> and <I>last</I> may have any of the standard forms for indices.
</DD></DL>
<DL><DT><A NAME="itemcget"><I>pathName</I> <B>itemcget</B></A>
<I>item</I>
<I>option</I>
</DT><DD>
Returns the current value of a configuration option for the item.
<I>Option</I> may have any of the values accepted by the item creation command.
</DD></DL>
<DL><DT><A NAME="itemconfigure"><I>pathName</I> <B>itemconfigure</B></A>
<I>item</I>
?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
</DT><DD>
This command is similar to the <B>configure</B> command, except that it applies to the
options for an individual item, whereas <B>configure</B> applies to the options for
the widget as a whole. <B>Options</B> may have any of the values accepted by the
item creation widget command. If options are specified, options are modified as indicated
in the command and the command returns an empty string. If no options are specified,
returns a list describing the current options for the item.
Read-only options are not be modified.
</DD></DL>
<DL><DT><A NAME="items"><I>pathName</I> <B>items</B></A>
?<I>first</I>?
?<I>last</I>?
</DT><DD>
If <I>first</I> and <I>last</I> are omitted, returns the list of all items.
If <I>first</I> is specified and <I>last</I> omitted, returns the item at index
<I>first</I>, or an empty string if <I>first</I> refers to a non-existent element.
If <I>first</I> and <I>last</I> are specified, the command returns a list whose elements
are all of the items between <I>first</I> and <I>last</I>,
inclusive. Both <I>first</I> and <I>last</I> may have any of the standard
forms for indices.
</DD></DL>
<DL><DT><A NAME="move"><I>pathName</I> <B>move</B></A>
<I>item</I>
<I>index</I>
</DT><DD>
Moves <I>item</I> at position <I>index</I> in the list.
</DD></DL>
<DL><DT><A NAME="reorder"><I>pathName</I> <B>reorder</B></A>
<I>neworder</I>
</DT><DD>
Modifies the order of items in the listbox given by <I>neworder</I>. Items that do not
appear in <I>neworder</I> are no moved.
</DD></DL>
<DL><DT><A NAME="see"><I>pathName</I> <B>see</B></A>
<I>item</I>
</DT><DD>
Arrange the scrolling area to make <I>item</I> visible.
</DD></DL>
<DL><DT><A NAME="selection"><I>pathName</I> <B>selection</B></A>
<I>cmd</I>
?<I>arg...</I>?
</DT><DD>
Modifies the list of selected items following <I>cmd</I>:
<DL>
<DT><B>clear</B>
<DD>remove all items of the selection.
<DT><B>set</B>
<DD>set the selection to all items in <I>arg</I>
<DT><B>add</B>
<DD>add all items of <I>arg</I> in the selection
<DT><B>remove</B>
<DD>remove all items of <I>arg</I> of the selection
<DT><B>get</B>
<DD>return the current selected items
</DL>
</DD></DL>
<DL><DT><A NAME="xview"><I>pathName</I> <B>xview</B></A>
?<I>arg...</I>?
</DT><DD>
Standard command to enable horizontal scrolling of <I>pathName</I>.
</DD></DL>
<DL><DT><A NAME="yview"><I>pathName</I> <B>yview</B></A>
?<I>arg...</I>?
</DT><DD>
Standard command to enable vertical scrolling of <I>pathName</I>.
</DD></DL>
</BODY></HTML>

View File

@ -0,0 +1,283 @@
<HTML>
<HEAD><TITLE>MainFrame</TITLE></HEAD>
<BODY BGCOLOR=white>
<DL><DT><I><A HREF="#descr">NAME</A></I></DT>
<DD><B>MainFrame</B>
- Manage toplevel with menu, toolbar and statusbar
</DD></DL>
<DL>
<DT><I>CREATION</I></DT>
<DD><A HREF="#descr"><B>MainFrame</B></A> <I>pathName</I> ?<I>option value...</I>?</DD>
</DL>
<DL>
<DT><I><A HREF="ProgressBar.html">OPTIONS from <B>ProgressBar</B></A></I></DT>
<DD><TABLE CELLSPACING=0 CELLPADDING=0 BORDER=0>
<TR>
<TD>&nbsp;&nbsp;-background or -bg</TD>
<TD>&nbsp;&nbsp;-progressfg (see <B>-foreground</B>)</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-progressmax (see <B>-maximum</B>)</TD>
<TD>&nbsp;&nbsp;-progresstype (see <B>-type</B>)</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-progressvar (see <B>-variable</B>)</TD>
</TABLE></DD>
</DL>
<DL>
<DT><I><A HREF="#wso">WIDGET-SPECIFIC OPTIONS</A></I></DT>
<DD><TABLE CELLSPACING=0 CELLSPACING=0 BORDER=0>
<TR>
<TD>&nbsp;&nbsp;<A HREF="#-height">-height</A></TR>
<TD>&nbsp;&nbsp;<A HREF="#-menu">-menu</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="#-separator">-separator</A></TR>
<TD>&nbsp;&nbsp;<A HREF="#-textvariable">-textvariable</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="#-width">-width</A></TR>
</TABLE></DD>
</DL>
<DL>
<DT><I><A HREF="#wc">WIDGET COMMAND</A></I></DT>
<DD><I>pathName</I> <A HREF="#addindicator"><B>addindicator</B></A>
?<I>arg...</I>?
</DD>
<DD><I>pathName</I> <A HREF="#addtoolbar"><B>addtoolbar</B></A>
</DD>
<DD><I>pathName</I> <A HREF="#cget"><B>cget</B></A>
<I>option</I>
</DD>
<DD><I>pathName</I> <A HREF="#configure"><B>configure</B></A>
?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
</DD>
<DD><I>pathName</I> <A HREF="#getframe"><B>getframe</B></A>
</DD>
<DD><I>pathName</I> <A HREF="#getindicator"><B>getindicator</B></A>
<I>index</I>
</DD>
<DD><I>pathName</I> <A HREF="#getmenu"><B>getmenu</B></A>
<I>menuid</I>
</DD>
<DD><I>pathName</I> <A HREF="#gettoolbar"><B>gettoolbar</B></A>
<I>index</I>
</DD>
<DD><I>pathName</I> <A HREF="#setmenustate"><B>setmenustate</B></A>
<I>tag</I>
<I>state</I>
</DD>
<DD><I>pathName</I> <A HREF="#showstatusbar"><B>showstatusbar</B></A>
<I>name</I>
</DD>
<DD><I>pathName</I> <A HREF="#showtoolbar"><B>showtoolbar</B></A>
<I>index</I>
<I>bool</I>
</DD>
</DL>
<BR><HR WIDTH="100%"><BR>
<B><A NAME="descr"></A>DESCRIPTION</B><BR>
<P>
MainFrame manage toplevel to have:<BR>
<UL>
<LI>simple menu creation, with automatic accelerator bindings and
<A HREF="DynamicHelp.html">DynamicHelp</A> association,
<LI>one or more toolbar that user can hide,
<LI>a status bar, displaying a user message or a menu description, and optionnaly a
<A HREF="ProgressBar.html">ProgressBar</A>.
</UL>
</P>
<BR><HR WIDTH="50%"><BR>
<B><A NAME="wso">WIDGET-SPECIFIC OPTIONS</A></B><BR>
<DL><DT><A NAME="-height"><B>-height</B></A></DT>
<DD>
Specifies the desired height for the user frame in any of the forms acceptable to
Tk_GetPixels. If this option is less than or equal to zero (the default) then the window
will not request any size at all.
</DD>
</DL>
<DL><DT><A NAME="-menu"><B>-menu (read-only)</B></A></DT>
<DD>
This option describes the menu. This is a list whose each five elements describe
one cascad menu. It has the following form:
{<I>menuname</I> <I>tags</I> <I>menuId</I> <I>tearoff</I> <I>menuentries</I>...}
where <I>menuentries</I> is a list where each element describe one menu entry, which can be:
<UL>
<LI>for a separator:<BR>
{<B>separator</B>}
<LI>for a command:<BR>
{<B>command</B> <I>menuname</I> ?<I>tags</I>? ?<I>description</I>? ?<I>accelerator</I>? ?<I>option</I> <I>value</I>? ...}
<LI>for a check button:<BR>
{<B>checkbutton</B> <I>menuname</I> ?<I>tags</I>? ?<I>description</I>? ?<I>accelerator</I>? ?<I>option</I> <I>value</I>? ...}
<LI>for a radio button:<BR>
{<B>radiobutton</B> <I>menuname</I> ?<I>tags</I>? ?<I>description</I>? ?<I>accelerator</I> ?<I>option</I> <I>value</I>? ...}
<LI>for a cascad menu:<BR>
{<B>cascad</B> <I>menuname</I> <I>tags</I> <I>menuId</I> <I>tearoff</I> <I>menuentries</I>}
</UL>
where:
<UL>
<LI><I>menuname</I> is the name of the menu. If it contains a &amp;, the following character
is automatically converted to the corresponding <B>-underline</B> option of <B>menu add</B>
command.
<LI><I>tags</I> is the tags list for the entry, used for enabling or disabling menu
entries with <B>MainFrame::setmenustate</B>.
<LI><I>menuId</I> is an id for the menu, from which you can get menu pathname with
<B>MainFrame::getmenu</B>.
<LI><I>tearoff</I> specifies if menu has tearoff entry.
<LI><I>description</I> specifies a string for <A HREF=\"DynamicHelp.html\">DynamicHelp</A>.
<LI><I>accelerator</I> specifies a key sequence. It is a list of two elements, where the first
is one of <B>Ctrl</B>, <B>Alt</B> or <B>CtrlAlt</B>, and the second as letter or a digit.
An accelerator string is build and corresponding binding set on the toplevel to invoke the
menu entry.
<LI><I>option value</I> specifies additionnal options for the entry (see <B>menu add</B>
command).
</UL>
Each value enclosed by ? are optional and defaulted to empty string, but must be
provided if one or more following options is not empty.
<BR>Example:
<PRE>
set descmenu {
"&File" {} {} 0 {
{command "&New" {} "Create a new document" {Ctrl n} -command Menu::new}
{command "&Open..." {} "Open an existing document" {Ctrl o} -command Menu::open}
{command "&Save" open "Save the document" {Ctrl s} -command Menu::save}
{cascad "&Export" {} export 0 {
{command "Format &1" open "Export document to format 1" {} -command {Menu::export 1}}
{command "Format &2" open "Export document to format 2" {} -command {Menu::export 2}}
}}
{separator}
{cascad "&Recent files" {} recent 0 {}}
{separator}
{command "E&xit" {} "Exit the application" {} -command Menu::exit}
}
"&Options" {} {} 0 {
{checkbutton "Toolbar" {} "Show/hide toolbar" {}
-variable Menu::_drawtoolbar
-command {$Menu::_mainframe showtoolbar toolbar $Menu::_drawtoolbar}
}
}
}
</PRE>
</DD>
</DL>
<DL><DT><A NAME="-separator"><B>-separator (read-only)</B></A></DT>
<DD>
Specifies if separator should be drawn at the top and/or at the bottom of the user window.
Must be one of the values <B>none</B>, <B>top</B>, <B>bottom</B> or <B>both</B>.
It depends on the relief of subwidgets of user window.
</DD>
</DL>
<DL><DT><A NAME="-textvariable"><B>-textvariable</B></A></DT>
<DD>
Specifies the textvariable option for the label of the status bar.
<A HREF="DynamicHelp.html">DynamicHelp</A> description
of menu entries are mapped to this variable at the creation of the MainFrame.
If this variable is changed by MainFrame::configure, menu description will
not be available.
<BR>You change the text of the label by modifying the value of the variable.
</DD>
</DL>
<DL><DT><A NAME="-width"><B>-width</B></A></DT>
<DD>
Specifies the desired width for the user frame in any of the forms acceptable to
Tk_GetPixels. If this option is less than or equal to zero (the default) then the window
will not request any size at all.
</DD>
</DL>
<HR WIDTH="50%"><BR>
<B><A NAME="wc">WIDGET COMMAND</A></B><BR>
<DL><DT><A NAME="addindicator"><I>pathName</I> <B>addindicator</B></A>
?<I>arg...</I>?
</DT><DD>
Add an indicator box at the right of the status bar. Each indicator are added from left
to right. An indicator is a Tk label widget configured with option-value pair
given by ?<I>arg...</I>?. <B>-relief</B> and <B>-borderwidth</B> options are respetively
defaulted to <I>sunken</I> and 1. Returns the pathname of the created label.
</DD></DL>
<DL><DT><A NAME="addtoolbar"><I>pathName</I> <B>addtoolbar</B></A>
</DT><DD>
Add a toolbar to the MainFrame. Returns the pathname of the new window where to place
toolbar items.
</DD></DL>
<DL><DT><A NAME="cget"><I>pathName</I> <B>cget</B></A>
<I>option</I>
</DT><DD>
Returns the current value of the configuration option given by <I>option</I>.
<I>Option</I> may have any of the values accepted by the creation command.
</DD></DL>
<DL><DT><A NAME="configure"><I>pathName</I> <B>configure</B></A>
?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
</DT><DD>
Query or modify the configuration options of the widget. If no <I>option</I> is specified,
returns a list describing all of the available options for <I>pathName</I>.
If <I>option</I> is specified with no <I>value</I>, then the command returns a list
describing the one named <I>option</I> (this list will be identical to the corresponding
sublist of the value returned if no <I>option</I> is specified). If one or
more <I>option-value</I> pairs are specified, then the command modifies the given widget
option(s) to have the given value(s); in this case the command returns an empty string.
<I>Option</I> may have any of the values accepted by the creation command.
Read-only options are not be modified.
</DD></DL>
<DL><DT><A NAME="getframe"><I>pathName</I> <B>getframe</B></A>
</DT><DD>
Returns the pathname of the user window.
</DD></DL>
<DL><DT><A NAME="getindicator"><I>pathName</I> <B>getindicator</B></A>
<I>index</I>
</DT><DD>
Returns the pathname of the <I>index</I>th added indicator.
</DD></DL>
<DL><DT><A NAME="getmenu"><I>pathName</I> <B>getmenu</B></A>
<I>menuid</I>
</DT><DD>
Returns the pathname of the menu whose id is <I>menuid</I>.
</DD></DL>
<DL><DT><A NAME="gettoolbar"><I>pathName</I> <B>gettoolbar</B></A>
<I>index</I>
</DT><DD>
Returns the pathname of the <I>index</I>th added toolbar.
</DD></DL>
<DL><DT><A NAME="setmenustate"><I>pathName</I> <B>setmenustate</B></A>
<I>tag</I>
<I>state</I>
</DT><DD>
Set the <B>-state</B> option value of all the menu entries that have the tag <I>tag</I>
to <I>state</I>.
</DD></DL>
<DL><DT><A NAME="showstatusbar"><I>pathName</I> <B>showstatusbar</B></A>
<I>name</I>
</DT><DD>
<I>name</I> is one of <B>none</B>, <B>status</B> or <B>progression</B>.
Use <B>none</B> to hide the status bar, <B>status</B> to display the label only, or
<B>progression</B> to display the label and the
<A HREF="ProgressBar.html">ProgressBar</A>.
</DD></DL>
<DL><DT><A NAME="showtoolbar"><I>pathName</I> <B>showtoolbar</B></A>
<I>index</I>
<I>bool</I>
</DT><DD>
Hide if <I>bool</I> is 0, or show if <I>bool</I> is 1 the <I>index</I>th added toolbar.
To prevent your toplevel from resizing while hiding/showing toolbar,
do [wm geometry $top [wm geometry $top]] when it is managed.
</DD></DL>
</BODY></HTML>

View File

@ -0,0 +1,208 @@
<HTML>
<HEAD><TITLE>MessageDlg</TITLE></HEAD>
<BODY BGCOLOR=white>
<DL><DT><I><A HREF="#descr">NAME</A></I></DT>
<DD><B>MessageDlg</B>
- Message dialog box
</DD></DL>
<DL>
<DT><I>CREATION</I></DT>
<DD><A HREF="#descr"><B>MessageDlg</B></A> <I>pathName</I> ?<I>option value...</I>?</DD>
</DL>
<DL>
<DT><I>STANDARD OPTIONS</I></DT>
<DD><TABLE CELLSPACING=0 CELLSPACING=0 BORDER=0>
<TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-anchor">-anchor</A></TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-font">-font</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-foreground">-foreground or -fg</A></TD>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-padx">-padx</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-pady">-pady</A></TR>
</TABLE></DD>
</DL>
<DL>
<DT><I><A HREF="Dialog.html">OPTIONS from <B>Dialog</B></A></I></DT>
<DD><TABLE CELLSPACING=0 CELLPADDING=0 BORDER=0>
<TR>
<TD>&nbsp;&nbsp;-background or -bg</TD>
<TD>&nbsp;&nbsp;-cancel</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-default</TD>
<TD>&nbsp;&nbsp;-parent</TD>
</TR>
</TABLE></DD>
</DL>
<DL>
<DT><I><A HREF="#wso">WIDGET-SPECIFIC OPTIONS</A></I></DT>
<DD><TABLE CELLSPACING=0 CELLSPACING=0 BORDER=0>
<TR>
<TD>&nbsp;&nbsp;<A HREF="#-aspect">-aspect</A></TR>
<TD>&nbsp;&nbsp;<A HREF="#-buttons">-buttons</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="#-icon">-icon</A></TR>
<TD>&nbsp;&nbsp;<A HREF="#-justify">-justify</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="#-message">-message</A></TR>
<TD>&nbsp;&nbsp;<A HREF="#-title">-title</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="#-type">-type</A></TR>
<TD>&nbsp;&nbsp;<A HREF="#-width">-width</A></TR>
</TR>
</TABLE></DD>
</DL>
<BR><HR WIDTH="100%"><BR>
<B><A NAME="descr"></A>DESCRIPTION</B><BR>
<P>
MessageDlg provides a simple way to display a message dialog.
MessageDlg::<B>create</B> creates the message dialog, displays
it and return the index of the pressed button, or -1 if it is destroyed.
When returning, the dialog no longer exists.
</P>
<BR><HR WIDTH="50%"><BR>
<B><A NAME="wso">WIDGET-SPECIFIC OPTIONS</A></B><BR>
<DL><DT><A NAME="-aspect"><B>-aspect</B></A></DT>
<DD>
Specifies a non-negative integer value indicating desired
aspect ratio for the text. The aspect ratio is specified as
100*width/height. 100 means the text should
be as wide as it is tall, 200 means the text should
be twice as wide as it is tall, 50 means the text should
be twice as tall as it is wide, and so on.
Used to choose line length for text if <B>width</B> option
isn't specified.
Defaults to 150.
</DD>
</DL>
<DL><DT><A NAME="-buttons"><B>-buttons</B></A></DT>
<DD>
Specifies a list of buttons to display when <B>type</B> option is <I>user</I>.
If a button has a symbolic name, its associated text will be displayed.
</DD>
</DL>
<DL><DT><A NAME="-icon"><B>-icon</B></A></DT>
<DD>
Specifies an icon to display. Must be one of the following: <B>error</B>, <B>info</B>,
<B>question</B> or <B>warning</B>.
</DD>
</DL>
<DL><DT><A NAME="-justify"><B>-justify</B></A></DT>
<DD>
Specifies how to justify lines of text.
Must be one of <B>left</B>, <B>center</B>, or <B>right</B>. Defaults
to <B>left</B>.
This option works together with the <B>anchor</B>, <B>aspect</B>,
<B>padx</B>, <B>pady</B>, and <B>width</B> options to provide a variety
of arrangements of the text within the window.
The <B>aspect</B> and <B>width</B> options determine the amount of
screen space needed to display the text.
The <B>anchor</B>, <B>padx</B>, and <B>pady</B> options determine where this
rectangular area is displayed within the widget's window, and the
<B>justify</B> option determines how each line is displayed within that
rectangular region.
For example, suppose <B>anchor</B> is <B>e</B> and <B>justify</B> is
<B>left</B>, and that the message window is much larger than needed
for the text.
The the text will displayed so that the left edges of all the lines
line up and the right edge of the longest line is <B>padx</B> from
the right side of the window; the entire text block will be centered
in the vertical span of the window.
</DD>
</DL>
<DL><DT><A NAME="-message"><B>-message</B></A></DT>
<DD>
Specifies the message to display in this message box.
</DD>
</DL>
<DL><DT><A NAME="-title"><B>-title</B></A></DT>
<DD>
Specifies a string to display as the title of the message box.
If the value is empty (the default), a default title will be set corresponding
to the <B>icon</B> option.
The default associated title is in english, and can be modified to set it in
another language by specifying the resource:
<PRE> *MessageDlg.<I>name</I>Title: <I>value</I></PRE>
or the equivalent tcl command:
<PRE> option add *MessageDlg.<I>name</I>Title <I>value</I></PRE>
where <I>name</I> is the name of an icon as defined in the <B>icon</B> option.
<BR>For example, for french language, you can specify for a warning dialog:
<PRE> option add *MessageDlg.warningTitle "Attention"</PRE>
</DD>
</DL>
<DL><DT><A NAME="-type"><B>-type</B></A></DT>
<DD>
Specifies a set of buttons to be displayed. The following values are possible:
<DD>
<P>
<DL COMPACT>
<DT>
<B>abortretryignore</B>
<DD>
Displays three buttons whose symbolic names are <B>abort</B>,
<B>retry</B> and <B>ignore</B>.<P>
<DT>
<B>ok</B>
<DD>
Displays one button whose symbolic name is <B>ok</B>.<P>
<DT>
<B>okcancel</B>
<DD>
Displays two buttons whose symbolic names are <B>ok</B> and <B>cancel</B>.<P>
<DT>
<B>retrycancel</B>
<DD>
Displays two buttons whose symbolic names are <B>retry</B> and <B>cancel</B>.<P>
<DT>
<B>yesno</B>
<DD>
Displays two buttons whose symbolic names are <B>yes</B> and <B>no</B>.<P>
<DT>
<B>yesnocancel</B>
<DD>
Displays three buttons whose symbolic names are <B>yes</B>, <B>no</B>
and <B>cancel</B>.
<P>
<DT>
<B>user</B>
<DD>
Displays buttons of <B>-buttons</B> option.<P>
<DT>
</DL COMPACT>
</DD>
</DL>
<DL><DT><A NAME="-width"><B>-width</B></A></DT>
<DD>
Specifies the length of lines in the window.
If this option has a value greater than zero then the <B>aspect</B>
option is ignored and the <B>width</B> option determines the line
length.
If this option has a value less than or equal to zero, then
the <B>aspect</B> option determines the line length.
</DD>
</DL>
</BODY></HTML>

View File

@ -0,0 +1,343 @@
<HTML>
<HEAD><TITLE>NoteBook</TITLE></HEAD>
<BODY BGCOLOR=white>
<DL><DT><I><A HREF="#descr">NAME</A></I></DT>
<DD><B>NoteBook</B>
- Notebook manager widget
</DD></DL>
<DL>
<DT><I>CREATION</I></DT>
<DD><A HREF="#descr"><B>NoteBook</B></A> <I>pathName</I> ?<I>option value...</I>?</DD>
</DL>
<DL>
<DT><I>STANDARD OPTIONS</I></DT>
<DD><TABLE CELLSPACING=0 CELLSPACING=0 BORDER=0>
<TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-font">-font</A></TR>
</TABLE></DD>
</DL>
<DL>
<DT><I><A HREF="ArrowButton.html">OPTIONS from <B>ArrowButton</B></A></I></DT>
<DD><TABLE CELLSPACING=0 CELLPADDING=0 BORDER=0>
<TR>
<TD>&nbsp;&nbsp;-activebackground</TD>
<TD>&nbsp;&nbsp;-activeforeground</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-background or -bg</TD>
<TD>&nbsp;&nbsp;-borderwidth or -bd</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-disabledforeground</TD>
<TD>&nbsp;&nbsp;-foreground or -fg</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-repeatdelay</TD>
<TD>&nbsp;&nbsp;-repeatinterval</TD>
</TR>
</TABLE></DD>
</DL>
<DL>
<DT><I><A HREF="#wso">WIDGET-SPECIFIC OPTIONS</A></I></DT>
<DD><TABLE CELLSPACING=0 CELLSPACING=0 BORDER=0>
<TR>
<TD>&nbsp;&nbsp;<A HREF="#-height">-height</A></TR>
<TD>&nbsp;&nbsp;<A HREF="#-homogeneous">-homogeneous</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="#-side">-side</A></TR>
<TD>&nbsp;&nbsp;<A HREF="#-width">-width</A></TR>
</TR>
</TABLE></DD>
</DL>
<DL>
<DT><I><A HREF="#wc">WIDGET COMMAND</A></I></DT>
<DD><I>pathName</I> <A HREF="#bindtabs"><B>bindtabs</B></A>
<I>event</I>
<I>script</I>
</DD>
<DD><I>pathName</I> <A HREF="#cget"><B>cget</B></A>
<I>option</I>
</DD>
<DD><I>pathName</I> <A HREF="#compute_size"><B>compute_size</B></A>
</DD>
<DD><I>pathName</I> <A HREF="#configure"><B>configure</B></A>
?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
</DD>
<DD><I>pathName</I> <A HREF="#delete"><B>delete</B></A>
<I>page</I>
?<I>destroyframe</I>?
</DD>
<DD><I>pathName</I> <A HREF="#getframe"><B>getframe</B></A>
<I>page</I>
</DD>
<DD><I>pathName</I> <A HREF="#index"><B>index</B></A>
<I>page</I>
</DD>
<DD><I>pathName</I> <A HREF="#insert"><B>insert</B></A>
<I>index</I>
<I>page</I>
?<I>option value...</I>?
</DD>
<DD><I>pathName</I> <A HREF="#itemcget"><B>itemcget</B></A>
<I>page</I>
<I>option</I>
</DD>
<DD><I>pathName</I> <A HREF="#itemconfigure"><B>itemconfigure</B></A>
<I>page</I>
?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
</DD>
<DD><I>pathName</I> <A HREF="#move"><B>move</B></A>
<I>page</I>
<I>index</I>
</DD>
<DD><I>pathName</I> <A HREF="#page"><B>page</B></A>
<I>first</I>
?<I>last</I>?
</DD>
<DD><I>pathName</I> <A HREF="#pages"><B>pages</B></A>
?<I>first</I>?
?<I>last</I>?
</DD>
<DD><I>pathName</I> <A HREF="#raise"><B>raise</B></A>
?<I>page</I>?
</DD>
<DD><I>pathName</I> <A HREF="#see"><B>see</B></A>
<I>page</I>
</DD>
</DL>
<BR><HR WIDTH="100%"><BR>
<B><A NAME="descr"></A>DESCRIPTION</B><BR>
<P>
NoteBook widget manage a set of pages and displays one of them.
</P>
<BR><HR WIDTH="50%"><BR>
<B><A NAME="wso">WIDGET-SPECIFIC OPTIONS</A></B><BR>
<DL><DT><A NAME="-height"><B>-height</B></A></DT>
<DD>
Specifies the desired height for the pages. If this option is equal to zero (the default)
then the window will not request any size at all.
In this case, user may want to call NoteBook::<B>compute_size</B> to make NoteBook larger
enough to contains the largest page.
</DD>
</DL>
<DL><DT><A NAME="-homogeneous"><B>-homogeneous</B></A></DT>
<DD>
Specifies wether or not the label of the pages must have the same width.
</DD>
</DL>
<DL><DT><A NAME="-side"><B>-side (read-only)</B></A></DT>
<DD>
Specifies the side where to place the label of the pages. Must be one
of <B>top</B> or <B>bottom</B>.
Only <B>top</B> is implemented for the moment.
</DD>
</DL>
<DL><DT><A NAME="-width"><B>-width</B></A></DT>
<DD>
Specifies the desired width for the pages. If this option is equal to zero (the default)
then the window will not request any size at all.
In this case, user may want to call NoteBook::<B>compute_size</B> to make NoteBook larger
enough to contains the largest page.
</DD>
</DL>
<HR WIDTH="50%"><BR>
<B><A NAME="wc">WIDGET COMMAND</A></B><BR>
<DL><DT><A NAME="bindtabs"><I>pathName</I> <B>bindtabs</B></A>
<I>event</I>
<I>script</I>
</DT><DD>
This command associates a command to execute whenever the event
sequence given by <I>event</I> occurs on a tabs. The page idenfier on which
the event occurs is appended to the command.
</DD></DL>
<DL><DT><A NAME="cget"><I>pathName</I> <B>cget</B></A>
<I>option</I>
</DT><DD>
Returns the current value of the configuration option given by <I>option</I>.
<I>Option</I> may have any of the values accepted by the creation command.
</DD></DL>
<DL><DT><A NAME="compute_size"><I>pathName</I> <B>compute_size</B></A>
</DT><DD>
This command can be called to make the NoteBook large enough to contain the largest page.
Note that if all pages use -createcmd, they will have no requested size.
</DD></DL>
<DL><DT><A NAME="configure"><I>pathName</I> <B>configure</B></A>
?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
</DT><DD>
Query or modify the configuration options of the widget. If no <I>option</I> is specified,
returns a list describing all of the available options for <I>pathName</I>.
If <I>option</I> is specified with no <I>value</I>, then the command returns a list
describing the one named <I>option</I> (this list will be identical to the corresponding
sublist of the value returned if no <I>option</I> is specified). If one or
more <I>option-value</I> pairs are specified, then the command modifies the given widget
option(s) to have the given value(s); in this case the command returns an empty string.
<I>Option</I> may have any of the values accepted by the creation command.
Read-only options are not be modified.
</DD></DL>
<DL><DT><A NAME="delete"><I>pathName</I> <B>delete</B></A>
<I>page</I>
?<I>destroyframe</I>?
</DT><DD>
Deletes the page <I>page</I>. If <I>destroyframe</I> is 1 (the default), the frame
associated to <I>page</I> is destroyed. If <I>destroyframe</I> is 0, the frame is not
destroyed and is reused by further call to <B>insert</B> with the same <I>page</I>.
</DD></DL>
<DL><DT><A NAME="getframe"><I>pathName</I> <B>getframe</B></A>
<I>page</I>
</DT><DD>
Returns the pathname of the page <I>page</I>.
</DD></DL>
<DL><DT><A NAME="index"><I>pathName</I> <B>index</B></A>
<I>page</I>
</DT><DD>
Return the numerical index corresponding to the item.
</DD></DL>
<DL><DT><A NAME="insert"><I>pathName</I> <B>insert</B></A>
<I>index</I>
<I>page</I>
?<I>option value...</I>?
</DT><DD>
Insert a new page idendified by <I>page</I> at position <I>index</I> in the pages list.
<I>index</I> must be numeric or <B>end</B>. The pathname of the new page is returned.
<P>
<DL><DT><A NAME="Page-createcmd"><B>-createcmd</B></A></DT>
<DD>
Specifies a command to be called the first time the page is raised.
</DD>
</DL>
<DL><DT><A NAME="Page-image"><B>-image</B></A></DT>
<DD>
Specifies an image to display for the page at the left of the label
</DD>
</DL>
<DL><DT><A NAME="Page-leavecmd"><B>-leavecmd</B></A></DT>
<DD>
Specifies a command to be called when a page is about to be leaved.
The command must return 0 if the page can not be leaved, or 1 if it can.
</DD>
</DL>
<DL><DT><A NAME="Page-raisecmd"><B>-raisecmd</B></A></DT>
<DD>
Specifies a command to be called each time the page is raised.
</DD>
</DL>
<DL><DT><A NAME="Page-state"><B>-state</B></A></DT>
<DD>
Specifies the state of the page. Must be <B>normal</B> or <B>disabled</B>.
</DD>
</DL>
<DL><DT><A NAME="Page-text"><B>-text</B></A></DT>
<DD>
Specifies a label to display for the page.
</DD>
</DL>
</DD></DL>
<DL><DT><A NAME="itemcget"><I>pathName</I> <B>itemcget</B></A>
<I>page</I>
<I>option</I>
</DT><DD>
Returns the current value of a configuration option for the item.
<I>Option</I> may have any of the values accepted by the item creation command.
</DD></DL>
<DL><DT><A NAME="itemconfigure"><I>pathName</I> <B>itemconfigure</B></A>
<I>page</I>
?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
</DT><DD>
This command is similar to the <B>configure</B> command, except that it applies to the
options for an individual item, whereas <B>configure</B> applies to the options for
the widget as a whole. <B>Options</B> may have any of the values accepted by the
item creation widget command. If options are specified, options are modified as indicated
in the command and the command returns an empty string. If no options are specified,
returns a list describing the current options for the item.
Read-only options are not be modified.
</DD></DL>
<DL><DT><A NAME="move"><I>pathName</I> <B>move</B></A>
<I>page</I>
<I>index</I>
</DT><DD>
Moves <I>page</I> tab to index <I>index</I>.
</DD></DL>
<DL><DT><A NAME="page"><I>pathName</I> <B>page</B></A>
<I>first</I>
?<I>last</I>?
</DT><DD>
<B>Its use is deprecated. Use <I>pages</I> instead.</B><BR>
If <I>last</I> is omitted, returns the page at index <I>first</I>, or an empty string if
<I>first</I> refers to a non-existent element. If <I>last</I> is specified, the command
returns a list whose elements are all of the pages between <I>first</I> and <I>last</I>,
inclusive. Both <I>first</I> and <I>last</I> may have any of the standard
forms for indices.
</DD></DL>
<DL><DT><A NAME="pages"><I>pathName</I> <B>pages</B></A>
?<I>first</I>?
?<I>last</I>?
</DT><DD>
If <I>first</I> and <I>last</I> are omitted, returns the list of all pages.
If <I>first</I> is specified and <I>last</I> omitted, returns the page at index
<I>first</I>, or an empty string if <I>first</I> refers to a non-existent element.
If <I>first</I> and <I>last</I> are specified, the command returns a list whose elements
are all of the pages between <I>first</I> and <I>last</I>,
inclusive. Both <I>first</I> and <I>last</I> may have any of the standard
forms for indices.
</DD></DL>
<DL><DT><A NAME="raise"><I>pathName</I> <B>raise</B></A>
?<I>page</I>?
</DT><DD>
Raise the page <I>page</I>, or return the raised page if <I>page</I> is omitted.
</DD></DL>
<DL><DT><A NAME="see"><I>pathName</I> <B>see</B></A>
<I>page</I>
</DT><DD>
Scrolls labels to make the label of the page <I>page</I> visible.
</DD></DL>
</BODY></HTML>

View File

@ -0,0 +1,174 @@
<HTML>
<HEAD><TITLE>PagesManager</TITLE></HEAD>
<BODY BGCOLOR=white>
<DL><DT><I><A HREF="#descr">NAME</A></I></DT>
<DD><B>PagesManager</B>
- Pages manager widget
</DD></DL>
<DL>
<DT><I>CREATION</I></DT>
<DD><A HREF="#descr"><B>PagesManager</B></A> <I>pathName</I> ?<I>option value...</I>?</DD>
</DL>
<DL>
<DT><I>STANDARD OPTIONS</I></DT>
<DD><TABLE CELLSPACING=0 CELLSPACING=0 BORDER=0>
<TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-background">-background</A></TR>
</TABLE></DD>
</DL>
<DL>
<DT><I><A HREF="#wso">WIDGET-SPECIFIC OPTIONS</A></I></DT>
<DD><TABLE CELLSPACING=0 CELLSPACING=0 BORDER=0>
<TR>
<TD>&nbsp;&nbsp;<A HREF="#-height">-height</A></TR>
<TD>&nbsp;&nbsp;<A HREF="#-width">-width</A></TR>
</TR>
</TABLE></DD>
</DL>
<DL>
<DT><I><A HREF="#wc">WIDGET COMMAND</A></I></DT>
<DD><I>pathName</I> <A HREF="#add"><B>add</B></A>
<I>page</I>
</DD>
<DD><I>pathName</I> <A HREF="#cget"><B>cget</B></A>
<I>option</I>
</DD>
<DD><I>pathName</I> <A HREF="#compute_size"><B>compute_size</B></A>
</DD>
<DD><I>pathName</I> <A HREF="#configure"><B>configure</B></A>
?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
</DD>
<DD><I>pathName</I> <A HREF="#delete"><B>delete</B></A>
<I>page</I>
</DD>
<DD><I>pathName</I> <A HREF="#getframe"><B>getframe</B></A>
<I>page</I>
</DD>
<DD><I>pathName</I> <A HREF="#page"><B>page</B></A>
<I>first</I>
?<I>last</I>?
</DD>
<DD><I>pathName</I> <A HREF="#pages"><B>pages</B></A>
?<I>first</I>?
?<I>last</I>?
</DD>
<DD><I>pathName</I> <A HREF="#raise"><B>raise</B></A>
?<I>page</I>?
</DD>
</DL>
<BR><HR WIDTH="100%"><BR>
<B><A NAME="descr"></A>DESCRIPTION</B><BR>
<P>
PagesManager widget manage a set of pages and displays one of them.
PagesManager does not provide any user access method, as NoteBook does,
so it can be done through a listbox, a menu, radiobutton, or whatever.
</P>
<BR><HR WIDTH="50%"><BR>
<B><A NAME="wso">WIDGET-SPECIFIC OPTIONS</A></B><BR>
<DL><DT><A NAME="-height"><B>-height</B></A></DT>
<DD>
Specifies the desired height for the pages. If this option is equal to zero (the default)
then the window will not request any size at all.
In this case, user may want to call PagesManager::<B>compute_size</B> to make PagesManager
larger enough to contains the largest page.
</DD>
</DL>
<DL><DT><A NAME="-width"><B>-width</B></A></DT>
<DD>
Specifies the desired width for the pages. If this option is equal to zero (the default)
then the window will not request any size at all.
In this case, user may want to call PagesManager::<B>compute_size</B> to make PagesManager
larger enough to contains the largest page.
</DD>
</DL>
<HR WIDTH="50%"><BR>
<B><A NAME="wc">WIDGET COMMAND</A></B><BR>
<DL><DT><A NAME="add"><I>pathName</I> <B>add</B></A>
<I>page</I>
</DT><DD>
Add a new page idendified by <I>page</I>. The pathname of the new page
is returned.
</DD></DL>
<DL><DT><A NAME="cget"><I>pathName</I> <B>cget</B></A>
<I>option</I>
</DT><DD>
Returns the current value of the configuration option given by <I>option</I>.
<I>Option</I> may have any of the values accepted by the creation command.
</DD></DL>
<DL><DT><A NAME="compute_size"><I>pathName</I> <B>compute_size</B></A>
</DT><DD>
This command can be called to make the PagesManager large enough to contain the largest page.
</DD></DL>
<DL><DT><A NAME="configure"><I>pathName</I> <B>configure</B></A>
?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
</DT><DD>
Query or modify the configuration options of the widget. If no <I>option</I> is specified,
returns a list describing all of the available options for <I>pathName</I>.
If <I>option</I> is specified with no <I>value</I>, then the command returns a list
describing the one named <I>option</I> (this list will be identical to the corresponding
sublist of the value returned if no <I>option</I> is specified). If one or
more <I>option-value</I> pairs are specified, then the command modifies the given widget
option(s) to have the given value(s); in this case the command returns an empty string.
<I>Option</I> may have any of the values accepted by the creation command.
Read-only options are not be modified.
</DD></DL>
<DL><DT><A NAME="delete"><I>pathName</I> <B>delete</B></A>
<I>page</I>
</DT><DD>
Deletes the page <I>page</I>.
</DD></DL>
<DL><DT><A NAME="getframe"><I>pathName</I> <B>getframe</B></A>
<I>page</I>
</DT><DD>
Returns the pathname of the page <I>page</I>.
</DD></DL>
<DL><DT><A NAME="page"><I>pathName</I> <B>page</B></A>
<I>first</I>
?<I>last</I>?
</DT><DD>
<B>Its use is deprecated. Use <I>pages</I> instead.</B><BR>
If <I>last</I> is omitted, returns the page at index <I>first</I>, or an empty string if
<I>first</I> refers to a non-existent element. If <I>last</I> is specified, the command
returns a list whose elements are all of the pages between <I>first</I> and <I>last</I>,
inclusive. Both <I>first</I> and <I>last</I> may have any of the standard
forms for indices.
</DD></DL>
<DL><DT><A NAME="pages"><I>pathName</I> <B>pages</B></A>
?<I>first</I>?
?<I>last</I>?
</DT><DD>
If <I>first</I> and <I>last</I> are omitted, returns the list of all pages.
If <I>first</I> is specified and <I>last</I> omitted, returns the page at index
<I>first</I>, or an empty string if <I>first</I> refers to a non-existent element.
If <I>first</I> and <I>last</I> are specified, the command returns a list whose elements
are all of the pages between <I>first</I> and <I>last</I>,
inclusive. Both <I>first</I> and <I>last</I> may have any of the standard
forms for indices.
</DD></DL>
<DL><DT><A NAME="raise"><I>pathName</I> <B>raise</B></A>
?<I>page</I>?
</DT><DD>
Raise the page <I>page</I>, or return the raised page if <I>page</I> is omitted.
</DD></DL>
</BODY></HTML>

View File

@ -0,0 +1,130 @@
<HTML>
<HEAD><TITLE>PanedWindow</TITLE></HEAD>
<BODY BGCOLOR=white>
<DL><DT><I><A HREF="#descr">NAME</A></I></DT>
<DD><B>PanedWindow</B>
- Tiled layout manager widget
</DD></DL>
<DL>
<DT><I>CREATION</I></DT>
<DD><A HREF="#descr"><B>PanedWindow</B></A> <I>pathName</I> ?<I>option value...</I>?</DD>
</DL>
<DL>
<DT><I>STANDARD OPTIONS</I></DT>
<DD><TABLE CELLSPACING=0 CELLSPACING=0 BORDER=0>
<TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-background">-background or -bg</A></TD>
</TABLE></DD>
</DL>
<DL>
<DT><I><A HREF="#wso">WIDGET-SPECIFIC OPTIONS</A></I></DT>
<DD><TABLE CELLSPACING=0 CELLSPACING=0 BORDER=0>
<TR>
<TD>&nbsp;&nbsp;<A HREF="#-pad">-pad</A></TR>
<TD>&nbsp;&nbsp;<A HREF="#-side">-side</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="#-width">-width</A></TR>
</TABLE></DD>
</DL>
<DL>
<DT><I><A HREF="#wc">WIDGET COMMAND</A></I></DT>
<DD><I>pathName</I> <A HREF="#add"><B>add</B></A>
?<I>option value...</I>?
</DD>
<DD><I>pathName</I> <A HREF="#cget"><B>cget</B></A>
<I>option</I>
</DD>
<DD><I>pathName</I> <A HREF="#configure"><B>configure</B></A>
?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
</DD>
<DD><I>pathName</I> <A HREF="#getframe"><B>getframe</B></A>
<I>index</I>
</DD>
</DL>
<BR><HR WIDTH="100%"><BR>
<B><A NAME="descr"></A>DESCRIPTION</B><BR>
<P>
PanedWindow is a widget that lays out children in
a vertically or horizontally tiled format.
The user can adjust the size of the panes, with a pane control sash created
between children.
</P>
<BR><HR WIDTH="50%"><BR>
<B><A NAME="wso">WIDGET-SPECIFIC OPTIONS</A></B><BR>
<DL><DT><A NAME="-pad"><B>-pad (read-only)</B></A></DT>
<DD>
Specifies additional space between the button of the sash and children.
</DD>
</DL>
<DL><DT><A NAME="-side"><B>-side (read-only)</B></A></DT>
<DD>
Specifies the side of the sash, which implies the layout: <B>top</B> or <B>bottom</B>
(horizontal layout), <B>left</B> or <B>right</B> (vertical layout).
</DD>
</DL>
<DL><DT><A NAME="-width"><B>-width (read-only)</B></A></DT>
<DD>
Specifies the width of the button of the sash.
</DD>
</DL>
<HR WIDTH="50%"><BR>
<B><A NAME="wc">WIDGET COMMAND</A></B><BR>
<DL><DT><A NAME="add"><I>pathName</I> <B>add</B></A>
?<I>option value...</I>?
</DT><DD>
This command add a new pane. The new pane is placed below the previous pane for vertical
layout or at right for horizontal layout. This command returns a frame where user can place
its widget. Valid options are:
<P>
<DL><DT><A NAME="Pane-minsize"><B>-minsize</B></A></DT>
<DD>
Specifies the minimum size requested for the pane.
See the <B>grid</B> command for more information.
</DD>
</DL>
<DL><DT><A NAME="Pane-weight"><B>-weight</B></A></DT>
<DD>
Specifies the relative weight for apportioning any extra spaces among panes.
See the <B>grid</B> command for more information.
</DD>
</DL>
</DD></DL>
<DL><DT><A NAME="cget"><I>pathName</I> <B>cget</B></A>
<I>option</I>
</DT><DD>
Returns the current value of the configuration option given by <I>option</I>.
<I>Option</I> may have any of the values accepted by the creation command.
</DD></DL>
<DL><DT><A NAME="configure"><I>pathName</I> <B>configure</B></A>
?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
</DT><DD>
Query or modify the configuration options of the widget. If no <I>option</I> is specified,
returns a list describing all of the available options for <I>pathName</I>.
If <I>option</I> is specified with no <I>value</I>, then the command returns a list
describing the one named <I>option</I> (this list will be identical to the corresponding
sublist of the value returned if no <I>option</I> is specified). If one or
more <I>option-value</I> pairs are specified, then the command modifies the given widget
option(s) to have the given value(s); in this case the command returns an empty string.
<I>Option</I> may have any of the values accepted by the creation command.
Read-only options are not be modified.
</DD></DL>
<DL><DT><A NAME="getframe"><I>pathName</I> <B>getframe</B></A>
<I>index</I>
</DT><DD>
Returns the pathname of the <I>index</I>th added pane.
</DD></DL>
</BODY></HTML>

View File

@ -0,0 +1,214 @@
<HTML>
<HEAD><TITLE>PasswdDlg</TITLE></HEAD>
<BODY BGCOLOR=white>
<DL><DT><I><A HREF="#descr">NAME</A></I></DT>
<DD><B>PasswdDlg</B>
- Login/Password dialog box
</DD></DL>
<DL>
<DT><I>CREATION</I></DT>
<DD><A HREF="#descr"><B>PasswdDlg</B></A> <I>pathName</I> ?<I>option value...</I>?</DD>
</DL>
<DL>
<DT><I><A HREF="Dialog.html">OPTIONS from <B>Dialog</B></A></I></DT>
<DD><TABLE CELLSPACING=0 CELLPADDING=0 BORDER=0>
<TR>
<TD>&nbsp;&nbsp;-anchor</TD>
<TD>&nbsp;&nbsp;-background or -bg</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-homogeneous</TD>
<TD>&nbsp;&nbsp;-modal</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-padx</TD>
<TD>&nbsp;&nbsp;-pady</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-parent</TD>
<TD>&nbsp;&nbsp;-spacing</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-title</TD>
</TABLE></DD>
</DL>
<DL>
<DT><I><A HREF="LabelEntry.html">OPTIONS from <B>LabelEntry</B></A></I></DT>
<DD><TABLE CELLSPACING=0 CELLPADDING=0 BORDER=0>
<TR>
<TD>&nbsp;&nbsp;-background or -bg</TD>
<TD>&nbsp;&nbsp;-borderwidth or -bd</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-disabledforeground</TD>
<TD>&nbsp;&nbsp;-entrybg</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-entryfg</TD>
<TD>&nbsp;&nbsp;-exportselection</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-font</TD>
<TD>&nbsp;&nbsp;-foreground or -fg</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-helptype</TD>
<TD>&nbsp;&nbsp;-highlightbackground</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-highlightcolor</TD>
<TD>&nbsp;&nbsp;-highlightthickness</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-insertbackground</TD>
<TD>&nbsp;&nbsp;-insertborderwidth</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-insertofftime</TD>
<TD>&nbsp;&nbsp;-insertontime</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-insertwidth</TD>
<TD>&nbsp;&nbsp;-labelanchor</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-labelfont</TD>
<TD>&nbsp;&nbsp;-labelheight</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-labeljustify</TD>
<TD>&nbsp;&nbsp;-labelwidth</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-loginhelptext (see <B>-helptext</B>)</TD>
<TD>&nbsp;&nbsp;-loginhelpvar (see <B>-helpvar</B>)</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-loginlabel (see <B>-label</B>)</TD>
<TD>&nbsp;&nbsp;-logintext (see <B>-text</B>)</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-logintextvariable (see <B>-textvariable</B>)</TD>
<TD>&nbsp;&nbsp;-loginunderline (see <B>-underline</B>)</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-passwdeditable (see <B>-editable</B>)</TD>
<TD>&nbsp;&nbsp;-passwdhelptext (see <B>-helptext</B>)</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-passwdhelpvar (see <B>-helpvar</B>)</TD>
<TD>&nbsp;&nbsp;-passwdlabel (see <B>-label</B>)</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-passwdstate (see <B>-state</B>)</TD>
<TD>&nbsp;&nbsp;-passwdtext (see <B>-text</B>)</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-passwdtextvariable (see <B>-textvariable</B>)</TD>
<TD>&nbsp;&nbsp;-passwdunderline (see <B>-underline</B>)</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-relief</TD>
<TD>&nbsp;&nbsp;-selectbackground</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-selectborderwidth</TD>
<TD>&nbsp;&nbsp;-selectforeground</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-wraplength</TD>
</TABLE></DD>
</DL>
<DL>
<DT><I><A HREF="#wso">WIDGET-SPECIFIC OPTIONS</A></I></DT>
<DD><TABLE CELLSPACING=0 CELLSPACING=0 BORDER=0>
<TR>
<TD>&nbsp;&nbsp;<A HREF="#-command">-command</A></TR>
<TD>&nbsp;&nbsp;<A HREF="#-type">-type</A></TR>
</TR>
</TABLE></DD>
</DL>
<DL>
<DT><I><A HREF="#wc">WIDGET COMMAND</A></I></DT>
<DD><I>pathName</I> <A HREF="#cget"><B>cget</B></A>
<I>option</I>
</DD>
<DD><I>pathName</I> <A HREF="#configure"><B>configure</B></A>
?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
</DD>
</DL>
<BR><HR WIDTH="100%"><BR>
<B><A NAME="descr"></A>DESCRIPTION</B><BR>
<P>
PasswdDlg provides a simple way to display a login/password dialog.
PasswdDlg::<B>create</B> creates the dialog, displays it, and return the value of login
and password in a list, or an empty list if it is destroyed or user press cancel.
When returning, the dialog no longer exists.
<BR>Additionnal resources can be set to modify other text:
<PRE>
*loginName Label for login LabelEntry
*passwordName Label for password LabelEntry
</PRE>
</P>
<BR><HR WIDTH="50%"><BR>
<B><A NAME="wso">WIDGET-SPECIFIC OPTIONS</A></B><BR>
<DL><DT><A NAME="-command"><B>-command</B></A></DT>
<DD>
Specifies a command to call when user press ok button.
</DD>
</DL>
<DL><DT><A NAME="-type"><B>-type</B></A></DT>
<DD>
Specifies a set of buttons to be displayed. The following values are possible:
<DD>
<P>
<DL COMPACT>
<DT>
<B>ok</B>
<DD>
Displays one button whose symbolic name is <B>ok</B>.<P>
<DT>
<B>okcancel</B>
<DD>
Displays two buttons whose symbolic names are <B>ok</B> and <B>cancel</B>.<P>
</DL COMPACT>
</DD>
</DL>
</DD>
</DL>
<HR WIDTH="50%"><BR>
<B><A NAME="wc">WIDGET COMMAND</A></B><BR>
<DL><DT><A NAME="cget"><I>pathName</I> <B>cget</B></A>
<I>option</I>
</DT><DD>
Returns the current value of the configuration option given by <I>option</I>.
<I>Option</I> may have any of the values accepted by the creation command.
</DD></DL>
<DL><DT><A NAME="configure"><I>pathName</I> <B>configure</B></A>
?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
</DT><DD>
Query or modify the configuration options of the widget. If no <I>option</I> is specified,
returns a list describing all of the available options for <I>pathName</I>.
If <I>option</I> is specified with no <I>value</I>, then the command returns a list
describing the one named <I>option</I> (this list will be identical to the corresponding
sublist of the value returned if no <I>option</I> is specified). If one or
more <I>option-value</I> pairs are specified, then the command modifies the given widget
option(s) to have the given value(s); in this case the command returns an empty string.
<I>Option</I> may have any of the values accepted by the creation command.
Read-only options are not be modified.
</DD></DL>
<HR>
<ADRESS>Stephane Lavirotte <A HREF="mailto:Stephane.Lavirotte@sophia.inria.fr">(Stephane.Lavirotte@sophia.inria.fr)</A></ADRESS>
</BODY></HTML>

View File

@ -0,0 +1,136 @@
<HTML>
<HEAD><TITLE>ProgressBar</TITLE></HEAD>
<BODY BGCOLOR=white>
<DL><DT><I><A HREF="#descr">NAME</A></I></DT>
<DD><B>ProgressBar</B>
- Progress indicator widget
</DD></DL>
<DL>
<DT><I>CREATION</I></DT>
<DD><A HREF="#descr"><B>ProgressBar</B></A> <I>pathName</I> ?<I>option value...</I>?</DD>
</DL>
<DL>
<DT><I>STANDARD OPTIONS</I></DT>
<DD><TABLE CELLSPACING=0 CELLSPACING=0 BORDER=0>
<TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-background">-background or -bg</A></TD>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-borderwidth">-borderwidth or -bd</A></TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-foreground">-foreground or -fg</A></TD>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-orient">-orient</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-relief">-relief</A></TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-troughcolor">-troughcolor</A></TR>
</TR>
</TABLE></DD>
</DL>
<DL>
<DT><I><A HREF="#wso">WIDGET-SPECIFIC OPTIONS</A></I></DT>
<DD><TABLE CELLSPACING=0 CELLSPACING=0 BORDER=0>
<TR>
<TD>&nbsp;&nbsp;<A HREF="#-height">-height</A></TR>
<TD>&nbsp;&nbsp;<A HREF="#-maximum">-maximum</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="#-type">-type</A></TR>
<TD>&nbsp;&nbsp;<A HREF="#-variable">-variable</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="#-width">-width</A></TR>
</TABLE></DD>
</DL>
<DL>
<DT><I><A HREF="#wc">WIDGET COMMAND</A></I></DT>
<DD><I>pathName</I> <A HREF="#cget"><B>cget</B></A>
<I>option</I>
</DD>
<DD><I>pathName</I> <A HREF="#configure"><B>configure</B></A>
?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
</DD>
</DL>
<BR><HR WIDTH="100%"><BR>
<B><A NAME="descr"></A>DESCRIPTION</B><BR>
<P>
ProgressBar widget indicates the user the progress of a lengthly operation.
It is used by <A HREF="MainFrame.html">MainFrame</A>
and <A HREF="ProgressDlg.html">ProgressDlg</A>.
</P>
<BR><HR WIDTH="50%"><BR>
<B><A NAME="wso">WIDGET-SPECIFIC OPTIONS</A></B><BR>
<DL><DT><A NAME="-height"><B>-height</B></A></DT>
<DD>
Specifies the desired height for the progress indicator.
</DD>
</DL>
<DL><DT><A NAME="-maximum"><B>-maximum</B></A></DT>
<DD>
Specifies the maximum value of the variable.
</DD>
</DL>
<DL><DT><A NAME="-type"><B>-type</B></A></DT>
<DD>
Specifies the type of the ProgressBar. Must be one of <B>normal</B>, <B>incremental</B> or
<B>infinite</B>.
<BR>If <B>type</B> is <I>normal</I>, the progress indicator is drawn proportional
to the variable value and <B>maximum</B> option each time the variable is set.
<BR>If <B>type</B> is <I>incremental</I>, the value of the progress indicator is maintained internally,
and incremented each time the variable is set by its value. The progress indicator is drawn proportional
to the internal value and <B>maximum</B> option.
<BR>If <B>type</B> is <I>infinite</I>, the value of the progress indicator is maintained internally,
and incremented each time the variable is set by its value. The progress indicator grow from left to
right if internal value (modulo <B>maximum</B>) is less than <B>maximum</B>/2, and from right to left if
internal value is greater than <B>maximum</B>/2.
<BR>See <B>-variable</B> option for special case of its value,
</DD>
</DL>
<DL><DT><A NAME="-variable"><B>-variable</B></A></DT>
<DD>
Specifies the variable attached to the progress indicator.
Progress indicator is updated when the value of the variable changes.
If the value of the variable is negative, the progress indicator is not
displayed (it is drawn flat with <B>background</B> color
- usefull for ProgressDlg to make it invisible). If its value 0, progress indicator
is reinitialized.
</DD>
</DL>
<DL><DT><A NAME="-width"><B>-width</B></A></DT>
<DD>
Specifies the desired width for the progress indicator.
</DD>
</DL>
<HR WIDTH="50%"><BR>
<B><A NAME="wc">WIDGET COMMAND</A></B><BR>
<DL><DT><A NAME="cget"><I>pathName</I> <B>cget</B></A>
<I>option</I>
</DT><DD>
Returns the current value of the configuration option given by <I>option</I>.
<I>Option</I> may have any of the values accepted by the creation command.
</DD></DL>
<DL><DT><A NAME="configure"><I>pathName</I> <B>configure</B></A>
?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
</DT><DD>
Query or modify the configuration options of the widget. If no <I>option</I> is specified,
returns a list describing all of the available options for <I>pathName</I>.
If <I>option</I> is specified with no <I>value</I>, then the command returns a list
describing the one named <I>option</I> (this list will be identical to the corresponding
sublist of the value returned if no <I>option</I> is specified). If one or
more <I>option-value</I> pairs are specified, then the command modifies the given widget
option(s) to have the given value(s); in this case the command returns an empty string.
<I>Option</I> may have any of the values accepted by the creation command.
Read-only options are not be modified.
</DD></DL>
</BODY></HTML>

View File

@ -0,0 +1,143 @@
<HTML>
<HEAD><TITLE>ProgressDlg</TITLE></HEAD>
<BODY BGCOLOR=white>
<DL><DT><I><A HREF="#descr">NAME</A></I></DT>
<DD><B>ProgressDlg</B>
- Progress indicator dialog box
</DD></DL>
<DL>
<DT><I>CREATION</I></DT>
<DD><A HREF="#descr"><B>ProgressDlg</B></A> <I>pathName</I> ?<I>option value...</I>?</DD>
</DL>
<DL>
<DT><I>STANDARD OPTIONS</I></DT>
<DD><TABLE CELLSPACING=0 CELLSPACING=0 BORDER=0>
<TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-font">-font</A></TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-textvariable">-textvariable</A></TR>
</TR>
</TABLE></DD>
</DL>
<DL>
<DT><I><A HREF="Dialog.html">OPTIONS from <B>Dialog</B></A></I></DT>
<DD><TABLE CELLSPACING=0 CELLPADDING=0 BORDER=0>
<TR>
<TD>&nbsp;&nbsp;-background or -bg</TD>
<TD>&nbsp;&nbsp;-parent</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-separator</TD>
<TD>&nbsp;&nbsp;-title</TD>
</TR>
</TABLE></DD>
</DL>
<DL>
<DT><I><A HREF="ProgressBar.html">OPTIONS from <B>ProgressBar</B></A></I></DT>
<DD><TABLE CELLSPACING=0 CELLPADDING=0 BORDER=0>
<TR>
<TD>&nbsp;&nbsp;-background or -bg</TD>
<TD>&nbsp;&nbsp;-borderwidth or -bd</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-foreground or -fg</TD>
<TD>&nbsp;&nbsp;-maximum</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-relief</TD>
<TD>&nbsp;&nbsp;-troughcolor</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-type</TD>
<TD>&nbsp;&nbsp;-variable</TD>
</TR>
</TABLE></DD>
</DL>
<DL>
<DT><I><A HREF="#wso">WIDGET-SPECIFIC OPTIONS</A></I></DT>
<DD><TABLE CELLSPACING=0 CELLSPACING=0 BORDER=0>
<TR>
<TD>&nbsp;&nbsp;<A HREF="#-command">-command</A></TR>
<TD>&nbsp;&nbsp;<A HREF="#-height">-height</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="#-stop">-stop</A></TR>
<TD>&nbsp;&nbsp;<A HREF="#-width">-width</A></TR>
</TR>
</TABLE></DD>
</DL>
<DL>
<DT><I><A HREF="#wc">WIDGET COMMAND</A></I></DT>
<DD><I>pathName</I> <A HREF="#cget"><B>cget</B></A>
<I>option</I>
</DD>
<DD><I>pathName</I> <A HREF="#configure"><B>configure</B></A>
?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
</DD>
</DL>
<BR><HR WIDTH="100%"><BR>
<B><A NAME="descr"></A>DESCRIPTION</B><BR>
<P>
ProgressDlg provides a simple way to display a progress indicator dialog.
ProgressDlg::<B>create</B> creates the dialog, displays it, set a local
grab to it and immediatly return. The dialog is updated by modifying the
value of the variable of options <B>-textvariable</B> and <B>-variable</B>.
You have to destroy the dialog after use.
</P>
<BR><HR WIDTH="50%"><BR>
<B><A NAME="wso">WIDGET-SPECIFIC OPTIONS</A></B><BR>
<DL><DT><A NAME="-command"><B>-command</B></A></DT>
<DD>
Specifies a command to call when user press stop button.
</DD>
</DL>
<DL><DT><A NAME="-height"><B>-height</B></A></DT>
<DD>
Specifies a desired height for the label in lines of text.
</DD>
</DL>
<DL><DT><A NAME="-stop"><B>-stop</B></A></DT>
<DD>
Specifies the text of the button typically used to stop process. If empty, no button will
be drawn. This can be a symbolic name.
</DD>
</DL>
<DL><DT><A NAME="-width"><B>-width</B></A></DT>
<DD>
Specifies a desired width for the label in characters.
</DD>
</DL>
<HR WIDTH="50%"><BR>
<B><A NAME="wc">WIDGET COMMAND</A></B><BR>
<DL><DT><A NAME="cget"><I>pathName</I> <B>cget</B></A>
<I>option</I>
</DT><DD>
Returns the current value of the configuration option given by <I>option</I>.
<I>Option</I> may have any of the values accepted by the creation command.
</DD></DL>
<DL><DT><A NAME="configure"><I>pathName</I> <B>configure</B></A>
?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
</DT><DD>
Query or modify the configuration options of the widget. If no <I>option</I> is specified,
returns a list describing all of the available options for <I>pathName</I>.
If <I>option</I> is specified with no <I>value</I>, then the command returns a list
describing the one named <I>option</I> (this list will be identical to the corresponding
sublist of the value returned if no <I>option</I> is specified). If one or
more <I>option-value</I> pairs are specified, then the command modifies the given widget
option(s) to have the given value(s); in this case the command returns an empty string.
<I>Option</I> may have any of the values accepted by the creation command.
Read-only options are not be modified.
</DD></DL>
</BODY></HTML>

View File

@ -0,0 +1,130 @@
<HTML>
<HEAD><TITLE>ScrollView</TITLE></HEAD>
<BODY BGCOLOR=white>
<DL><DT><I><A HREF="#descr">NAME</A></I></DT>
<DD><B>ScrollView</B>
- Display the visible area of a scrolled window
</DD></DL>
<DL>
<DT><I>CREATION</I></DT>
<DD><A HREF="#descr"><B>ScrollView</B></A> <I>pathName</I> ?<I>option value...</I>?</DD>
</DL>
<DL>
<DT><I>STANDARD OPTIONS</I></DT>
<DD><TABLE CELLSPACING=0 CELLSPACING=0 BORDER=0>
<TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-background">-background or -bg</A></TD>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-borderwidth">-borderwidth or -bd</A></TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-cursor">-cursor</A></TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-relief">-relief</A></TR>
</TR>
</TABLE></DD>
</DL>
<DL>
<DT><I><A HREF="#wso">WIDGET-SPECIFIC OPTIONS</A></I></DT>
<DD><TABLE CELLSPACING=0 CELLSPACING=0 BORDER=0>
<TR>
<TD>&nbsp;&nbsp;<A HREF="#-fill">-fill</A></TR>
<TD>&nbsp;&nbsp;<A HREF="#-foreground">-foreground or -fg</A></TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="#-height">-height</A></TR>
<TD>&nbsp;&nbsp;<A HREF="#-width">-width</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="#-window">-window</A></TR>
</TABLE></DD>
</DL>
<DL>
<DT><I><A HREF="#wc">WIDGET COMMAND</A></I></DT>
<DD><I>pathName</I> <A HREF="#cget"><B>cget</B></A>
<I>option</I>
</DD>
<DD><I>pathName</I> <A HREF="#configure"><B>configure</B></A>
?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
</DD>
</DL>
<BR><HR WIDTH="100%"><BR>
<B><A NAME="descr"></A>DESCRIPTION</B><BR>
<P>
ScrollView displays the visible area of a scrolled window within
its scroll region.
</P>
<BR><HR WIDTH="50%"><BR>
<B><A NAME="wso">WIDGET-SPECIFIC OPTIONS</A></B><BR>
<DL><DT><A NAME="-fill"><B>-fill</B></A></DT>
<DD>
Specifies the fill color of the rectangle.
</DD>
</DL>
<DL><DT><A NAME="-foreground"><B>-foreground</B></A></DT>
<DD>
Specifies the color of the border of the rectangle.
</DD>
</DL>
<DL><DT><A NAME="-height"><B>-height</B></A></DT>
<DD>
Specifies the desired height for the ScrollView.
</DD>
</DL>
<DL><DT><A NAME="-width"><B>-width</B></A></DT>
<DD>
Specifies the desired width for the ScrollView.
</DD>
</DL>
<DL><DT><A NAME="-window"><B>-window</B></A></DT>
<DD>
Specifies the window to view. This widget must have <B>-xscrollcommand</B> and
<B>-yscrollcommand</B> options, and respond to <B>xview</B> and <B>yview</B> command.
In order to make ScrollView working with other scrollbar, <B>-xscrollcommand</B> and
<B>-yscrollcommand</B> options of the widget must be set before the widget is passed to
the <B>-window</B> option of the ScrollView (for example, if the widget is handled by
a ScrolledWindow, call <B>setwidget</B> before setting <B>-window</B> option).
</DD>
</DL>
<HR WIDTH="50%"><BR>
<B><A NAME="wc">WIDGET COMMAND</A></B><BR>
<DL><DT><A NAME="cget"><I>pathName</I> <B>cget</B></A>
<I>option</I>
</DT><DD>
Returns the current value of the configuration option given by <I>option</I>.
<I>Option</I> may have any of the values accepted by the creation command.
</DD></DL>
<DL><DT><A NAME="configure"><I>pathName</I> <B>configure</B></A>
?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
</DT><DD>
Query or modify the configuration options of the widget. If no <I>option</I> is specified,
returns a list describing all of the available options for <I>pathName</I>.
If <I>option</I> is specified with no <I>value</I>, then the command returns a list
describing the one named <I>option</I> (this list will be identical to the corresponding
sublist of the value returned if no <I>option</I> is specified). If one or
more <I>option-value</I> pairs are specified, then the command modifies the given widget
option(s) to have the given value(s); in this case the command returns an empty string.
<I>Option</I> may have any of the values accepted by the creation command.
Read-only options are not be modified.
</DD></DL>
<HR><BR><B>BINDINGS</B><BR><BR>
<DL><DT>If mouse button 1 is pressed and dragged over the ScrollView, the top left corner of
the visible area of the scrolled window is moved proportionally to the mouse displacement.
</DT></DL>
<DL><DT>If mouse button 3 is pressed over the ScrollView, the top left corner of the visible
area is proportionally set to this point.
</DT></DL>
</BODY></HTML>

View File

@ -0,0 +1,191 @@
<HTML>
<HEAD><TITLE>ScrollableFrame</TITLE></HEAD>
<BODY BGCOLOR=white>
<DL><DT><I><A HREF="#descr">NAME</A></I></DT>
<DD><B>ScrollableFrame</B>
- Scrollable frame containing widget
</DD></DL>
<DL>
<DT><I>CREATION</I></DT>
<DD><A HREF="#descr"><B>ScrollableFrame</B></A> <I>pathName</I> ?<I>option value...</I>?</DD>
</DL>
<DL>
<DT><I>STANDARD OPTIONS</I></DT>
<DD><TABLE CELLSPACING=0 CELLSPACING=0 BORDER=0>
<TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-background">-background or -bg</A></TD>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-xscrollcommand">-xscrollcommand</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-yscrollcommand">-yscrollcommand</A></TR>
</TABLE></DD>
</DL>
<DL>
<DT><I><A HREF="#wso">WIDGET-SPECIFIC OPTIONS</A></I></DT>
<DD><TABLE CELLSPACING=0 CELLSPACING=0 BORDER=0>
<TR>
<TD>&nbsp;&nbsp;<A HREF="#-areaheight">-areaheight</A></TR>
<TD>&nbsp;&nbsp;<A HREF="#-areawidth">-areawidth</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="#-constrainedheight">-constrainedheight</A></TR>
<TD>&nbsp;&nbsp;<A HREF="#-constrainedwidth">-constrainedwidth</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="#-height">-height</A></TR>
<TD>&nbsp;&nbsp;<A HREF="#-width">-width</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="#-xscrollincrement">-xscrollincrement</A></TR>
<TD>&nbsp;&nbsp;<A HREF="#-yscrollincrement">-yscrollincrement</A></TR>
</TR>
</TABLE></DD>
</DL>
<DL>
<DT><I><A HREF="#wc">WIDGET COMMAND</A></I></DT>
<DD><I>pathName</I> <A HREF="#cget"><B>cget</B></A>
<I>option</I>
</DD>
<DD><I>pathName</I> <A HREF="#configure"><B>configure</B></A>
?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
</DD>
<DD><I>pathName</I> <A HREF="#getframe"><B>getframe</B></A>
</DD>
<DD><I>pathName</I> <A HREF="#see"><B>see</B></A>
<I>widget</I>
?<I>vert</I>?
?<I>horz</I>?
</DD>
<DD><I>pathName</I> <A HREF="#xview"><B>xview</B></A>
?<I>arg...</I>?
</DD>
<DD><I>pathName</I> <A HREF="#yview"><B>yview</B></A>
?<I>arg...</I>?
</DD>
</DL>
<BR><HR WIDTH="100%"><BR>
<B><A NAME="descr"></A>DESCRIPTION</B><BR>
<P>
ScrollableFrame widget containing widget.
</P>
<BR><HR WIDTH="50%"><BR>
<B><A NAME="wso">WIDGET-SPECIFIC OPTIONS</A></B><BR>
<DL><DT><A NAME="-areaheight"><B>-areaheight</B></A></DT>
<DD>
Specifies the height for the scrollable area. If zero, then the height
of the scrollable area is made just large enough to hold all its children.
</DD>
</DL>
<DL><DT><A NAME="-areawidth"><B>-areawidth</B></A></DT>
<DD>
Specifies the width for the scrollable area. If zero, then the width
of the scrollable area window is made just large enough to hold all its children.
</DD>
</DL>
<DL><DT><A NAME="-constrainedheight"><B>-constrainedheight</B></A></DT>
<DD>
Specifies whether or not the scrollable area should have the same height of the
scrolled window. If true, vertical scrollbar is not needed.
</DD>
</DL>
<DL><DT><A NAME="-constrainedwidth"><B>-constrainedwidth</B></A></DT>
<DD>
Specifies whether or not the scrollable area should have the same width of the
scrolled window. If true, horizontal scrollbar is not needed.
</DD>
</DL>
<DL><DT><A NAME="-height"><B>-height</B></A></DT>
<DD>
Specifies the desired height for the window in pixels.
</DD>
</DL>
<DL><DT><A NAME="-width"><B>-width</B></A></DT>
<DD>
Specifies the desired width for the window in pixels.
</DD>
</DL>
<DL><DT><A NAME="-xscrollincrement"><B>-xscrollincrement</B></A></DT>
<DD>
See <B>xscrollincrement</B> option of <B>canvas</B> widget.
</DD>
</DL>
<DL><DT><A NAME="-yscrollincrement"><B>-yscrollincrement</B></A></DT>
<DD>
See <B>yscrollincrement</B> option of <B>canvas</B> widget.
</DD>
</DL>
<HR WIDTH="50%"><BR>
<B><A NAME="wc">WIDGET COMMAND</A></B><BR>
<DL><DT><A NAME="cget"><I>pathName</I> <B>cget</B></A>
<I>option</I>
</DT><DD>
Returns the current value of the configuration option given by <I>option</I>.
<I>Option</I> may have any of the values accepted by the creation command.
</DD></DL>
<DL><DT><A NAME="configure"><I>pathName</I> <B>configure</B></A>
?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
</DT><DD>
Query or modify the configuration options of the widget. If no <I>option</I> is specified,
returns a list describing all of the available options for <I>pathName</I>.
If <I>option</I> is specified with no <I>value</I>, then the command returns a list
describing the one named <I>option</I> (this list will be identical to the corresponding
sublist of the value returned if no <I>option</I> is specified). If one or
more <I>option-value</I> pairs are specified, then the command modifies the given widget
option(s) to have the given value(s); in this case the command returns an empty string.
<I>Option</I> may have any of the values accepted by the creation command.
Read-only options are not be modified.
</DD></DL>
<DL><DT><A NAME="getframe"><I>pathName</I> <B>getframe</B></A>
</DT><DD>
Return the pathname of the scrolled frame where widget should be created.
</DD></DL>
<DL><DT><A NAME="see"><I>pathName</I> <B>see</B></A>
<I>widget</I>
?<I>vert</I>?
?<I>horz</I>?
</DT><DD>
Arrange scrollable area to make <I>widget</I> visible in the window.
<I>vert</I> and <I>horz</I> specify which part of <I>widget</I> must be preferably
visible, in case where <I>widget</I> is too tall or too large to be entirely visible.
<I>vert</I> must be <B>top</B> (the default) or <B>bottom</B>,
and <I>horz</I> must be <B>left</B> (the default) or <B>right</B>.
If <I>vert</I> or <I>horz</I> is not a valid value, area is not scrolled in this direction.
</DD></DL>
<DL><DT><A NAME="xview"><I>pathName</I> <B>xview</B></A>
?<I>arg...</I>?
</DT><DD>
Standard command to enable horizontal scrolling of <I>pathName</I>.
</DD></DL>
<DL><DT><A NAME="yview"><I>pathName</I> <B>yview</B></A>
?<I>arg...</I>?
</DT><DD>
Standard command to enable vertical scrolling of <I>pathName</I>.
</DD></DL>
</BODY></HTML>

View File

@ -0,0 +1,115 @@
<HTML>
<HEAD><TITLE>ScrolledWindow</TITLE></HEAD>
<BODY BGCOLOR=white>
<DL><DT><I><A HREF="#descr">NAME</A></I></DT>
<DD><B>ScrolledWindow</B>
- Generic scrolled widget
</DD></DL>
<DL>
<DT><I>CREATION</I></DT>
<DD><A HREF="#descr"><B>ScrolledWindow</B></A> <I>pathName</I> ?<I>option value...</I>?</DD>
</DL>
<DL>
<DT><I>STANDARD OPTIONS</I></DT>
<DD><TABLE CELLSPACING=0 CELLSPACING=0 BORDER=0>
<TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-background">-background or -bg</A></TD>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-borderwidth">-borderwidth or -bd</A></TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-relief">-relief</A></TR>
</TABLE></DD>
</DL>
<DL>
<DT><I><A HREF="#wso">WIDGET-SPECIFIC OPTIONS</A></I></DT>
<DD><TABLE CELLSPACING=0 CELLSPACING=0 BORDER=0>
<TR>
<TD>&nbsp;&nbsp;<A HREF="#-auto">-auto</A></TR>
<TD>&nbsp;&nbsp;<A HREF="#-scrollbar">-scrollbar</A></TR>
</TR>
</TABLE></DD>
</DL>
<DL>
<DT><I><A HREF="#wc">WIDGET COMMAND</A></I></DT>
<DD><I>pathName</I> <A HREF="#cget"><B>cget</B></A>
<I>option</I>
</DD>
<DD><I>pathName</I> <A HREF="#configure"><B>configure</B></A>
?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
</DD>
<DD><I>pathName</I> <A HREF="#getframe"><B>getframe</B></A>
</DD>
<DD><I>pathName</I> <A HREF="#setwidget"><B>setwidget</B></A>
<I>widget</I>
</DD>
</DL>
<BR><HR WIDTH="100%"><BR>
<B><A NAME="descr"></A>DESCRIPTION</B><BR>
<P>
ScrolledWindow enables user to create easily a widget with its scrollbar.
Scrollbars are created by ScrolledWindow and scroll commands are automatically associated to
a scrollable widget with <B>ScrolledWindow::setwidget</B>.
</P>
<BR><HR WIDTH="50%"><BR>
<B><A NAME="wso">WIDGET-SPECIFIC OPTIONS</A></B><BR>
<DL><DT><A NAME="-auto"><B>-auto</B></A></DT>
<DD>
Specifies the desired auto managed scrollbar:
<LI><B>none</B> means scrollbar are always drawn
<LI><B>horizontal</B> means horizontal scrollbar is drawn as needed
<LI><B>vertical</B> means vertical scrollbar is drawn as needed
<LI><B>both</B> means horizontal and vertical scrollbars are drawn as needed
<LI><B>horizontal</B> means horizontal scrollbar is drawn as needed
</DD>
</DL>
<DL><DT><A NAME="-scrollbar"><B>-scrollbar (read-only)</B></A></DT>
<DD>
Specifies the desired scrollbar: <B>none</B>, <B>horizontal</B>, <B>vertical</B>
or <B>both</B>. This option is not modifiable with <B>ScrolledWindow::configure</B>.
</DD>
</DL>
<HR WIDTH="50%"><BR>
<B><A NAME="wc">WIDGET COMMAND</A></B><BR>
<DL><DT><A NAME="cget"><I>pathName</I> <B>cget</B></A>
<I>option</I>
</DT><DD>
Returns the current value of the configuration option given by <I>option</I>.
<I>Option</I> may have any of the values accepted by the creation command.
</DD></DL>
<DL><DT><A NAME="configure"><I>pathName</I> <B>configure</B></A>
?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
</DT><DD>
Query or modify the configuration options of the widget. If no <I>option</I> is specified,
returns a list describing all of the available options for <I>pathName</I>.
If <I>option</I> is specified with no <I>value</I>, then the command returns a list
describing the one named <I>option</I> (this list will be identical to the corresponding
sublist of the value returned if no <I>option</I> is specified). If one or
more <I>option-value</I> pairs are specified, then the command modifies the given widget
option(s) to have the given value(s); in this case the command returns an empty string.
<I>Option</I> may have any of the values accepted by the creation command.
Read-only options are not be modified.
</DD></DL>
<DL><DT><A NAME="getframe"><I>pathName</I> <B>getframe</B></A>
</DT><DD>
Return the pathname of the frame where the scrolled widget should be created. This command
is no longer needed. You can directly create the scrolled widget as the child
of <I>pathName</I>.
</DD></DL>
<DL><DT><A NAME="setwidget"><I>pathName</I> <B>setwidget</B></A>
<I>widget</I>
</DT><DD>
Associate <I>widget</I> to the the scrollbars. <I>widget</I> is packed
in with option <B>expand</B> to <I>yes</I> and <B>fill</B> to <I>both</I>.
<I>widget</I> must be a scrollable widget, i.e. have the options
<B>xscrollcommand</B>/<B>yscrollcommand</B> and the command <B>xview</B>/<B>yview</B>,
such as canvas or text.
</DD></DL>
</BODY></HTML>

View File

@ -0,0 +1,152 @@
<HTML>
<HEAD><TITLE>SelectColor</TITLE></HEAD>
<BODY BGCOLOR=white>
<DL><DT><I><A HREF="#descr">NAME</A></I></DT>
<DD><B>SelectColor</B>
- Color selection widget
</DD></DL>
<DL>
<DT><I>CREATION</I></DT>
<DD><A HREF="#descr"><B>SelectColor</B></A> <I>pathName</I> ?<I>option value...</I>?</DD>
</DL>
<DL>
<DT><I><A HREF="#wso">WIDGET-SPECIFIC OPTIONS</A></I></DT>
<DD><TABLE CELLSPACING=0 CELLSPACING=0 BORDER=0>
<TR>
<TD>&nbsp;&nbsp;<A HREF="#-color">-color</A></TR>
<TD>&nbsp;&nbsp;<A HREF="#-command">-command</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="#-height">-height</A></TR>
<TD>&nbsp;&nbsp;<A HREF="#-parent">-parent</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="#-title">-title</A></TR>
<TD>&nbsp;&nbsp;<A HREF="#-type">-type</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="#-variable">-variable</A></TR>
<TD>&nbsp;&nbsp;<A HREF="#-width">-width</A></TR>
</TR>
</TABLE></DD>
</DL>
<DL>
<DT><I><A HREF="#wc">WIDGET COMMAND</A></I></DT>
<DD><I>pathName</I> <A HREF="#cget"><B>cget</B></A>
<I>option</I>
</DD>
<DD><I>pathName</I> <A HREF="#configure"><B>configure</B></A>
?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
</DD>
<DD>SelectColor::<A HREF="#setcolor"><B>setcolor</B></A>
<I>index</I>
<I>color</I>
</DD>
</DL>
<BR><HR WIDTH="100%"><BR>
<B><A NAME="descr"></A>DESCRIPTION</B><BR>
<P>
SelectColor provides a simple way to select color. It can be displayed
as a dialog box or as a menubutton.
</P>
<BR><HR WIDTH="50%"><BR>
<B><A NAME="wso">WIDGET-SPECIFIC OPTIONS</A></B><BR>
<DL><DT><A NAME="-color"><B>-color</B></A></DT>
<DD>
Specifies the color value of the widget.
</DD>
</DL>
<DL><DT><A NAME="-command"><B>-command</B></A></DT>
<DD>
When <B>type</B> is <I>menubutton</I>,
specifies a command to call when user select a color.
</DD>
</DL>
<DL><DT><A NAME="-height"><B>-height</B></A></DT>
<DD>
When <B>type</B> is <I>menubutton</I>, specifies the desired height for the button.
</DD>
</DL>
<DL><DT><A NAME="-parent"><B>-parent</B></A></DT>
<DD>
Parent of the Dialog. Dialog is centered in its parent. If empty, it is centered in
root window.
</DD>
</DL>
<DL><DT><A NAME="-title"><B>-title</B></A></DT>
<DD>
Title of the Dialog toplevel.
</DD>
</DL>
<DL><DT><A NAME="-type"><B>-type (read-only)</B></A></DT>
<DD>
Specifies the type of the SelectColor widget. Must be <B>dialog</B> or <B>menubutton</B>.
<BR>If <B>type</B> option is <I>dialog</I>, SelectColor::<B>create</B> directly creates the
dialog, displays it and return an empty string if cancel button is pressed or if dialog is
destroyed, and the selected color if ok button is pressed. In all cases, dialog is destroyed.
<BR>If <B>type</B> option is <I>menubutton</I>, SelectColor::<B>create</B> returns the
pathname of the widget created. It is composed of a button from which user can access a menu
displaying predefined colors.
</DD>
</DL>
<DL><DT><A NAME="-variable"><B>-variable</B></A></DT>
<DD>
Specifies a variable to link to the color value of the widget.
</DD>
</DL>
<DL><DT><A NAME="-width"><B>-width</B></A></DT>
<DD>
When <B>type</B> is <I>menubutton</I>, specifies the desired width for the button.
</DD>
</DL>
<HR WIDTH="50%"><BR>
<B><A NAME="wc">WIDGET COMMAND</A></B><BR>
<DL><DT><A NAME="cget"><I>pathName</I> <B>cget</B></A>
<I>option</I>
</DT><DD>
Returns the current value of the configuration option given by <I>option</I>.
<I>Option</I> may have any of the values accepted by the creation command.
</DD></DL>
<DL><DT><A NAME="configure"><I>pathName</I> <B>configure</B></A>
?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
</DT><DD>
Query or modify the configuration options of the widget. If no <I>option</I> is specified,
returns a list describing all of the available options for <I>pathName</I>.
If <I>option</I> is specified with no <I>value</I>, then the command returns a list
describing the one named <I>option</I> (this list will be identical to the corresponding
sublist of the value returned if no <I>option</I> is specified). If one or
more <I>option-value</I> pairs are specified, then the command modifies the given widget
option(s) to have the given value(s); in this case the command returns an empty string.
<I>Option</I> may have any of the values accepted by the creation command.
Read-only options are not be modified.
</DD></DL>
<DL><DT><A NAME="setcolor">SelectColor::<B>setcolor</B></A>
<I>index</I>
<I>color</I>
</DT><DD>
Set the value of user predefined color at index <I>index</I> to <I>color</I>.
<I>index</I> must be between 1 and 5.
</DD></DL>
</BODY></HTML>

View File

@ -0,0 +1,132 @@
<HTML>
<HEAD><TITLE>SelectFont</TITLE></HEAD>
<BODY BGCOLOR=white>
<DL><DT><I><A HREF="#descr">NAME</A></I></DT>
<DD><B>SelectFont</B>
- Font selection widget
</DD></DL>
<DL>
<DT><I>CREATION</I></DT>
<DD><A HREF="#descr"><B>SelectFont</B></A> <I>pathName</I> ?<I>option value...</I>?</DD>
</DL>
<DL>
<DT><I>STANDARD OPTIONS</I></DT>
<DD><TABLE CELLSPACING=0 CELLSPACING=0 BORDER=0>
<TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-background">-background or -bg</A></TD>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-font">-font</A></TR>
</TR>
</TABLE></DD>
</DL>
<DL>
<DT><I><A HREF="#wso">WIDGET-SPECIFIC OPTIONS</A></I></DT>
<DD><TABLE CELLSPACING=0 CELLSPACING=0 BORDER=0>
<TR>
<TD>&nbsp;&nbsp;<A HREF="#-command">-command</A></TR>
<TD>&nbsp;&nbsp;<A HREF="#-parent">-parent</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="#-sampletext">-sampletext</A></TR>
<TD>&nbsp;&nbsp;<A HREF="#-title">-title</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="#-type">-type</A></TR>
</TABLE></DD>
</DL>
<DL>
<DT><I><A HREF="#wc">WIDGET COMMAND</A></I></DT>
<DD><I>pathName</I> <A HREF="#cget"><B>cget</B></A>
<I>option</I>
</DD>
<DD><I>pathName</I> <A HREF="#configure"><B>configure</B></A>
?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
</DD>
<DD>SelectFont::<A HREF="#loadfont"><B>loadfont</B></A>
</DD>
</DL>
<BR><HR WIDTH="100%"><BR>
<B><A NAME="descr"></A>DESCRIPTION</B><BR>
<P>
SelectFont provides a simple way to choose font. It can be displayed
as a dialog box or as a toolbar.
<BR>Textual items in Dialog box uses <B>-name</B> options so they
can be translated to any language. Symbolic name used are
<B>ok</B>, <B>cancel</B>, <B>font</B>, <B>size</B>, <B>style</B>,
<B>bold</B>, <B>italic</B>, <B>underline</B> and <B>overstrike</B>.
</P>
<BR><HR WIDTH="50%"><BR>
<B><A NAME="wso">WIDGET-SPECIFIC OPTIONS</A></B><BR>
<DL><DT><A NAME="-command"><B>-command</B></A></DT>
<DD>
Specifies a command to call when user select a new font when SelectFont <B>type</B>
option is <I>toolbar</I>.
</DD>
</DL>
<DL><DT><A NAME="-parent"><B>-parent</B></A></DT>
<DD>
Parent of the Dialog. Dialog is centered in its parent. If empty, it is centered in
root window.
</DD>
</DL>
<DL><DT><A NAME="-sampletext"><B>-sampletext</B></A></DT>
<DD>
Specifies the text displayed in the preview area.
</DD>
</DL>
<DL><DT><A NAME="-title"><B>-title</B></A></DT>
<DD>
Title of the Dialog toplevel.
</DD>
</DL>
<DL><DT><A NAME="-type"><B>-type</B></A></DT>
<DD>
Specifies the type of the SelectFont widget. Must be <B>dialog</B> or <B>toolbar</B>.
<BR>If <B>type</B> option is <I>dialog</I>, SelectFont::<B>create</B> directly creates the
dialog, displays it and return an empty string if cancel button is pressed or if dialog is
destroyed, and the selected font if ok button is pressed. In all cases, dialog is destroyed.
<BR>If <B>type</B> option is <I>toolbar</I>, SelectFont::<B>create</B> returns the pathname
of the widget created.
</DD>
</DL>
<HR WIDTH="50%"><BR>
<B><A NAME="wc">WIDGET COMMAND</A></B><BR>
<DL><DT><A NAME="cget"><I>pathName</I> <B>cget</B></A>
<I>option</I>
</DT><DD>
Returns the current value of the configuration option given by <I>option</I>.
<I>Option</I> may have any of the values accepted by the creation command.
</DD></DL>
<DL><DT><A NAME="configure"><I>pathName</I> <B>configure</B></A>
?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
</DT><DD>
Query or modify the configuration options of the widget. If no <I>option</I> is specified,
returns a list describing all of the available options for <I>pathName</I>.
If <I>option</I> is specified with no <I>value</I>, then the command returns a list
describing the one named <I>option</I> (this list will be identical to the corresponding
sublist of the value returned if no <I>option</I> is specified). If one or
more <I>option-value</I> pairs are specified, then the command modifies the given widget
option(s) to have the given value(s); in this case the command returns an empty string.
<I>Option</I> may have any of the values accepted by the creation command.
Read-only options are not be modified.
</DD></DL>
<DL><DT><A NAME="loadfont">SelectFont::<B>loadfont</B></A>
</DT><DD>
Load the font available in the system.
</DD></DL>
</BODY></HTML>

View File

@ -0,0 +1,77 @@
<HTML>
<HEAD><TITLE>Separator</TITLE></HEAD>
<BODY BGCOLOR=white>
<DL><DT><I><A HREF="#descr">NAME</A></I></DT>
<DD><B>Separator</B>
- 3D separator widget
</DD></DL>
<DL>
<DT><I>CREATION</I></DT>
<DD><A HREF="#descr"><B>Separator</B></A> <I>pathName</I> ?<I>option value...</I>?</DD>
</DL>
<DL>
<DT><I>STANDARD OPTIONS</I></DT>
<DD><TABLE CELLSPACING=0 CELLSPACING=0 BORDER=0>
<TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-background">-background or -bg</A></TD>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-orient">-orient</A></TR>
</TR>
</TABLE></DD>
</DL>
<DL>
<DT><I><A HREF="#wso">WIDGET-SPECIFIC OPTIONS</A></I></DT>
<DD><TABLE CELLSPACING=0 CELLSPACING=0 BORDER=0>
<TR>
<TD>&nbsp;&nbsp;<A HREF="#-relief">-relief</A></TR>
</TABLE></DD>
</DL>
<DL>
<DT><I><A HREF="#wc">WIDGET COMMAND</A></I></DT>
<DD><I>pathName</I> <A HREF="#cget"><B>cget</B></A>
<I>option</I>
</DD>
<DD><I>pathName</I> <A HREF="#configure"><B>configure</B></A>
?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
</DD>
</DL>
<BR><HR WIDTH="100%"><BR>
<B><A NAME="descr"></A>DESCRIPTION</B><BR>
<P>
Separator is a widget that display an horizontal or vertical 3-D line.
</P>
<BR><HR WIDTH="50%"><BR>
<B><A NAME="wso">WIDGET-SPECIFIC OPTIONS</A></B><BR>
<DL><DT><A NAME="-relief"><B>-relief</B></A></DT>
<DD>
Specifies the relief of the Separator. Must be <B>groove</B> (the default) or <B>ridge</B>.
</DD>
</DL>
<HR WIDTH="50%"><BR>
<B><A NAME="wc">WIDGET COMMAND</A></B><BR>
<DL><DT><A NAME="cget"><I>pathName</I> <B>cget</B></A>
<I>option</I>
</DT><DD>
Returns the current value of the configuration option given by <I>option</I>.
<I>Option</I> may have any of the values accepted by the creation command.
</DD></DL>
<DL><DT><A NAME="configure"><I>pathName</I> <B>configure</B></A>
?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
</DT><DD>
Query or modify the configuration options of the widget. If no <I>option</I> is specified,
returns a list describing all of the available options for <I>pathName</I>.
If <I>option</I> is specified with no <I>value</I>, then the command returns a list
describing the one named <I>option</I> (this list will be identical to the corresponding
sublist of the value returned if no <I>option</I> is specified). If one or
more <I>option-value</I> pairs are specified, then the command modifies the given widget
option(s) to have the given value(s); in this case the command returns an empty string.
<I>Option</I> may have any of the values accepted by the creation command.
Read-only options are not be modified.
</DD></DL>
</BODY></HTML>

250
hlp/en/bwidget/SpinBox.html Normal file
View File

@ -0,0 +1,250 @@
<HTML>
<HEAD><TITLE>SpinBox</TITLE></HEAD>
<BODY BGCOLOR=white>
<DL><DT><I><A HREF="#descr">NAME</A></I></DT>
<DD><B>SpinBox</B>
- SpinBox widget
</DD></DL>
<DL>
<DT><I>CREATION</I></DT>
<DD><A HREF="#descr"><B>SpinBox</B></A> <I>pathName</I> ?<I>option value...</I>?</DD>
</DL>
<DL>
<DT><I><A HREF="ArrowButton.html">OPTIONS from <B>ArrowButton</B></A></I></DT>
<DD><TABLE CELLSPACING=0 CELLPADDING=0 BORDER=0>
<TR>
<TD>&nbsp;&nbsp;-background or -bg</TD>
<TD>&nbsp;&nbsp;-disabledforeground</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-foreground or -fg</TD>
<TD>&nbsp;&nbsp;-repeatdelay</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-repeatinterval</TD>
<TD>&nbsp;&nbsp;-state</TD>
</TR>
</TABLE></DD>
</DL>
<DL>
<DT><I><A HREF="Entry.html">OPTIONS from <B>Entry</B></A></I></DT>
<DD><TABLE CELLSPACING=0 CELLPADDING=0 BORDER=0>
<TR>
<TD>&nbsp;&nbsp;-command</TD>
<TD>&nbsp;&nbsp;-disabledforeground</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-dragenabled</TD>
<TD>&nbsp;&nbsp;-dragendcmd</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-dragevent</TD>
<TD>&nbsp;&nbsp;-draginitcmd</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-dragtype</TD>
<TD>&nbsp;&nbsp;-dropcmd</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-dropenabled</TD>
<TD>&nbsp;&nbsp;-dropovercmd</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-droptypes</TD>
<TD>&nbsp;&nbsp;-editable</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-entrybg (see <B>-background</B>)</TD>
<TD>&nbsp;&nbsp;-entryfg (see <B>-foreground</B>)</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-exportselection</TD>
<TD>&nbsp;&nbsp;-font</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-helptext</TD>
<TD>&nbsp;&nbsp;-helptype</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-helpvar</TD>
<TD>&nbsp;&nbsp;-highlightbackground</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-highlightcolor</TD>
<TD>&nbsp;&nbsp;-highlightthickness</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-insertbackground</TD>
<TD>&nbsp;&nbsp;-insertborderwidth</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-insertofftime</TD>
<TD>&nbsp;&nbsp;-insertontime</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-insertwidth</TD>
<TD>&nbsp;&nbsp;-justify</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-selectbackground</TD>
<TD>&nbsp;&nbsp;-selectborderwidth</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-selectforeground</TD>
<TD>&nbsp;&nbsp;-show</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-state</TD>
<TD>&nbsp;&nbsp;-takefocus</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-text</TD>
<TD>&nbsp;&nbsp;-textvariable</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-width</TD>
<TD>&nbsp;&nbsp;-xscrollcommand</TD>
</TR>
</TABLE></DD>
</DL>
<DL>
<DT><I><A HREF="#wso">WIDGET-SPECIFIC OPTIONS</A></I></DT>
<DD><TABLE CELLSPACING=0 CELLSPACING=0 BORDER=0>
<TR>
<TD>&nbsp;&nbsp;<A HREF="#-modifycmd">-modifycmd</A></TR>
<TD>&nbsp;&nbsp;<A HREF="#-range">-range</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="#-values">-values</A></TR>
</TABLE></DD>
</DL>
<DL>
<DT><I><A HREF="#wc">WIDGET COMMAND</A></I></DT>
<DD><I>pathName</I> <A HREF="#bind"><B>bind</B></A>
?<I>arg...</I>?
</DD>
<DD><I>pathName</I> <A HREF="#cget"><B>cget</B></A>
<I>option</I>
</DD>
<DD><I>pathName</I> <A HREF="#configure"><B>configure</B></A>
?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
</DD>
<DD><I>pathName</I> <A HREF="#getvalue"><B>getvalue</B></A>
</DD>
<DD><I>pathName</I> <A HREF="#setvalue"><B>setvalue</B></A>
<I>index</I>
</DD>
</DL>
<BR><HR WIDTH="100%"><BR>
<B><A NAME="descr"></A>DESCRIPTION</B><BR>
<P>
SpinBox widget enables the user to select a value among a list given by the <B>values</B>
option or a set of values defined by a mininum, a maximum and an increment.
Notice that <B>range</B> option defines a list of values, so <B>getvalue</B> and
<B>setvalue</B> work with both values and range.
</P>
<BR><HR WIDTH="50%"><BR>
<B><A NAME="wso">WIDGET-SPECIFIC OPTIONS</A></B><BR>
<DL><DT><A NAME="-modifycmd"><B>-modifycmd</B></A></DT>
<DD>
Specifies a Tcl command called when the user modify the value of the SpinBox.
</DD>
</DL>
<DL><DT><A NAME="-range"><B>-range</B></A></DT>
<DD>
Specifies a list of three intergers (or real) describing the minimum, maximum and increment
of the SpinBox.
</DD>
</DL>
<DL><DT><A NAME="-values"><B>-values</B></A></DT>
<DD>
Specifies the values accepted by the SpinBox. This option takes precedence over
<B>range</B> option.
</DD>
</DL>
<HR WIDTH="50%"><BR>
<B><A NAME="wc">WIDGET COMMAND</A></B><BR>
<DL><DT><A NAME="bind"><I>pathName</I> <B>bind</B></A>
?<I>arg...</I>?
</DT><DD>
Set bindings on the entry widget.
</DD></DL>
<DL><DT><A NAME="cget"><I>pathName</I> <B>cget</B></A>
<I>option</I>
</DT><DD>
Returns the current value of the configuration option given by <I>option</I>.
<I>Option</I> may have any of the values accepted by the creation command.
</DD></DL>
<DL><DT><A NAME="configure"><I>pathName</I> <B>configure</B></A>
?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
</DT><DD>
Query or modify the configuration options of the widget. If no <I>option</I> is specified,
returns a list describing all of the available options for <I>pathName</I>.
If <I>option</I> is specified with no <I>value</I>, then the command returns a list
describing the one named <I>option</I> (this list will be identical to the corresponding
sublist of the value returned if no <I>option</I> is specified). If one or
more <I>option-value</I> pairs are specified, then the command modifies the given widget
option(s) to have the given value(s); in this case the command returns an empty string.
<I>Option</I> may have any of the values accepted by the creation command.
Read-only options are not be modified.
</DD></DL>
<DL><DT><A NAME="getvalue"><I>pathName</I> <B>getvalue</B></A>
</DT><DD>
Returns the index of the current text of the SpinBox in the list of values,
or -1 if it doesn't match any value.
</DD></DL>
<DL><DT><A NAME="setvalue"><I>pathName</I> <B>setvalue</B></A>
<I>index</I>
</DT><DD>
Set the text of the SpinBox to the value indicated by <I>index</I> in the list of values.
<I>index</I> may be specified in any of the following forms:
<P>
<DL COMPACT>
<DT>
<B>last</B>
<DD>
Specifies the last element of the list of values.
<DT><B>first</B>
<DD>
Specifies the first element of the list of values.
<DT>
<B>next</B>
<DD>
Specifies the element following the current (ie returned by <B>getvalue</B>) in the list
of values.
<DT><B>previous</B>
<DD>
Specifies the element preceding the current (ie returned by <B>getvalue</B>) in the list
of values.
<DT>
@<I>number</I>
<DD>
Specifies the integer index in the list of values.
</DL>
</DD></DL>
<HR><BR><B>BINDINGS</B><BR><BR>
When Entry of the SpinBox has the input focus, it has the following bindings, in addition
to the default Entry bindings:
<UL>
<LI>Page up set the value of the SpinBox to the last value.
<LI>Page down set the value of the SpinBox to the first value.
<LI>Arrow up set the value of the SpinBox to the next value.
<LI>Arrow down set the value of the SpinBox to the previous value.
</UL>
</BODY></HTML>

View File

@ -0,0 +1,107 @@
<HTML>
<HEAD><TITLE>TitleFrame</TITLE></HEAD>
<BODY BGCOLOR=white>
<DL><DT><I><A HREF="#descr">NAME</A></I></DT>
<DD><B>TitleFrame</B>
- Frame with a title
</DD></DL>
<DL>
<DT><I>CREATION</I></DT>
<DD><A HREF="#descr"><B>TitleFrame</B></A> <I>pathName</I> ?<I>option value...</I>?</DD>
</DL>
<DL>
<DT><I>STANDARD OPTIONS</I></DT>
<DD><TABLE CELLSPACING=0 CELLSPACING=0 BORDER=0>
<TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-background">-background or -bg</A></TD>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-borderwidth">-borderwidth or -bd</A></TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-font">-font</A></TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-foreground">-foreground or -fg</A></TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-relief">-relief</A></TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-text">-text</A></TR>
</TR>
</TABLE></DD>
</DL>
<DL>
<DT><I><A HREF="#wso">WIDGET-SPECIFIC OPTIONS</A></I></DT>
<DD><TABLE CELLSPACING=0 CELLSPACING=0 BORDER=0>
<TR>
<TD>&nbsp;&nbsp;<A HREF="#-baseline">-baseline</A></TR>
<TD>&nbsp;&nbsp;<A HREF="#-ipad">-ipad</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="#-side">-side</A></TR>
</TABLE></DD>
</DL>
<DL>
<DT><I><A HREF="#wc">WIDGET COMMAND</A></I></DT>
<DD><I>pathName</I> <A HREF="#cget"><B>cget</B></A>
<I>option</I>
</DD>
<DD><I>pathName</I> <A HREF="#configure"><B>configure</B></A>
?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
</DD>
<DD><I>pathName</I> <A HREF="#getframe"><B>getframe</B></A>
</DD>
</DL>
<BR><HR WIDTH="100%"><BR>
<B><A NAME="descr"></A>DESCRIPTION</B><BR>
<P>
TitleFrame enables user to create a frame with a title like XmFrame Motif widget.
</P>
<BR><HR WIDTH="50%"><BR>
<B><A NAME="wso">WIDGET-SPECIFIC OPTIONS</A></B><BR>
<DL><DT><A NAME="-baseline"><B>-baseline</B></A></DT>
<DD>
Specifies the vertical alignment of the title: <B>top</B>, <B>center</B> or <B>bottom</B>.
</DD>
</DL>
<DL><DT><A NAME="-ipad"><B>-ipad</B></A></DT>
<DD>
Specifies a pad between the border of the frame and the user frame.
The value is in screen units.
</DD>
</DL>
<DL><DT><A NAME="-side"><B>-side</B></A></DT>
<DD>
Specifies the horizontal alignment of the title: <B>left</B>, <B>center</B> or <B>right</B>.
</DD>
</DL>
<HR WIDTH="50%"><BR>
<B><A NAME="wc">WIDGET COMMAND</A></B><BR>
<DL><DT><A NAME="cget"><I>pathName</I> <B>cget</B></A>
<I>option</I>
</DT><DD>
Returns the current value of the configuration option given by <I>option</I>.
<I>Option</I> may have any of the values accepted by the creation command.
</DD></DL>
<DL><DT><A NAME="configure"><I>pathName</I> <B>configure</B></A>
?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
</DT><DD>
Query or modify the configuration options of the widget. If no <I>option</I> is specified,
returns a list describing all of the available options for <I>pathName</I>.
If <I>option</I> is specified with no <I>value</I>, then the command returns a list
describing the one named <I>option</I> (this list will be identical to the corresponding
sublist of the value returned if no <I>option</I> is specified). If one or
more <I>option-value</I> pairs are specified, then the command modifies the given widget
option(s) to have the given value(s); in this case the command returns an empty string.
<I>Option</I> may have any of the values accepted by the creation command.
Read-only options are not be modified.
</DD></DL>
<DL><DT><A NAME="getframe"><I>pathName</I> <B>getframe</B></A>
</DT><DD>
Return the frame where the user can create any other widget.
</DD></DL>
</BODY></HTML>

696
hlp/en/bwidget/Tree.html Normal file
View File

@ -0,0 +1,696 @@
<HTML>
<HEAD><TITLE>Tree</TITLE></HEAD>
<BODY BGCOLOR=white>
<DL><DT><I><A HREF="#descr">NAME</A></I></DT>
<DD><B>Tree</B>
- Tree widget
</DD></DL>
<DL>
<DT><I>CREATION</I></DT>
<DD><A HREF="#descr"><B>Tree</B></A> <I>pathName</I> ?<I>option value...</I>?</DD>
</DL>
<DL>
<DT><I>STANDARD OPTIONS</I></DT>
<DD><TABLE CELLSPACING=0 CELLSPACING=0 BORDER=0>
<TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-background">-background or -bg</A></TD>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-borderwidth">-borderwidth or -bd</A></TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-cursor">-cursor</A></TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-highlightbackground">-highlightbackground</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-highlightcolor">-highlightcolor</A></TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-highlightthickness">-highlightthickness</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-relief">-relief</A></TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-selectbackground">-selectbackground</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-selectforeground">-selectforeground</A></TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-takefocus">-takefocus</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-xscrollcommand">-xscrollcommand</A></TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-yscrollcommand">-yscrollcommand</A></TR>
</TR>
</TABLE></DD>
</DL>
<DL>
<DT><I><A HREF="#wso">WIDGET-SPECIFIC OPTIONS</A></I></DT>
<DD><TABLE CELLSPACING=0 CELLSPACING=0 BORDER=0>
<TR>
<TD>&nbsp;&nbsp;<A HREF="#-closecmd">-closecmd</A></TR>
<TD>&nbsp;&nbsp;<A HREF="#-deltax">-deltax</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="#-deltay">-deltay</A></TR>
<TD>&nbsp;&nbsp;<A HREF="#-dragenabled">-dragenabled</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="#-dragendcmd">-dragendcmd</A></TR>
<TD>&nbsp;&nbsp;<A HREF="#-dragevent">-dragevent</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="#-draginitcmd">-draginitcmd</A></TR>
<TD>&nbsp;&nbsp;<A HREF="#-dragtype">-dragtype</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="#-dropcmd">-dropcmd</A></TR>
<TD>&nbsp;&nbsp;<A HREF="#-dropenabled">-dropenabled</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="#-dropovercmd">-dropovercmd</A></TR>
<TD>&nbsp;&nbsp;<A HREF="#-dropovermode">-dropovermode</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="#-droptypes">-droptypes</A></TR>
<TD>&nbsp;&nbsp;<A HREF="#-height">-height</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="#-linesfill">-linesfill</A></TR>
<TD>&nbsp;&nbsp;<A HREF="#-linestipple">-linestipple</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="#-opencmd">-opencmd</A></TR>
<TD>&nbsp;&nbsp;<A HREF="#-padx">-padx</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="#-redraw">-redraw</A></TR>
<TD>&nbsp;&nbsp;<A HREF="#-showlines">-showlines</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="#-width">-width</A></TR>
</TABLE></DD>
</DL>
<DL>
<DT><I><A HREF="#wc">WIDGET COMMAND</A></I></DT>
<DD><I>pathName</I> <A HREF="#bindImage"><B>bindImage</B></A>
<I>event</I>
<I>script</I>
</DD>
<DD><I>pathName</I> <A HREF="#bindText"><B>bindText</B></A>
<I>event</I>
<I>script</I>
</DD>
<DD><I>pathName</I> <A HREF="#cget"><B>cget</B></A>
<I>option</I>
</DD>
<DD><I>pathName</I> <A HREF="#closetree"><B>closetree</B></A>
<I>node</I>
</DD>
<DD><I>pathName</I> <A HREF="#configure"><B>configure</B></A>
?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
</DD>
<DD><I>pathName</I> <A HREF="#delete"><B>delete</B></A>
?<I>arg...</I>?
</DD>
<DD><I>pathName</I> <A HREF="#edit"><B>edit</B></A>
<I>node</I>
<I>text</I>
?<I>verifycmd</I>?
?<I>clickres</I>?
?<I>select</I>?
</DD>
<DD><I>pathName</I> <A HREF="#exists"><B>exists</B></A>
<I>node</I>
</DD>
<DD><I>pathName</I> <A HREF="#index"><B>index</B></A>
<I>node</I>
</DD>
<DD><I>pathName</I> <A HREF="#insert"><B>insert</B></A>
<I>index</I>
<I>parent</I>
<I>node</I>
?<I>option value...</I>?
</DD>
<DD><I>pathName</I> <A HREF="#itemcget"><B>itemcget</B></A>
<I>node</I>
<I>option</I>
</DD>
<DD><I>pathName</I> <A HREF="#itemconfigure"><B>itemconfigure</B></A>
<I>node</I>
?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
</DD>
<DD><I>pathName</I> <A HREF="#move"><B>move</B></A>
<I>parent</I>
<I>node</I>
<I>index</I>
</DD>
<DD><I>pathName</I> <A HREF="#nodes"><B>nodes</B></A>
<I>node</I>
?<I>first</I>?
?<I>last</I>?
</DD>
<DD><I>pathName</I> <A HREF="#opentree"><B>opentree</B></A>
<I>node</I>
</DD>
<DD><I>pathName</I> <A HREF="#parent"><B>parent</B></A>
<I>node</I>
</DD>
<DD><I>pathName</I> <A HREF="#reorder"><B>reorder</B></A>
<I>node</I>
<I>neworder</I>
</DD>
<DD><I>pathName</I> <A HREF="#see"><B>see</B></A>
<I>node</I>
</DD>
<DD><I>pathName</I> <A HREF="#selection"><B>selection</B></A>
<I>cmd</I>
?<I>arg...</I>?
</DD>
<DD><I>pathName</I> <A HREF="#visible"><B>visible</B></A>
<I>node</I>
</DD>
<DD><I>pathName</I> <A HREF="#xview"><B>xview</B></A>
?<I>arg...</I>?
</DD>
<DD><I>pathName</I> <A HREF="#yview"><B>yview</B></A>
?<I>arg...</I>?
</DD>
</DL>
<BR><HR WIDTH="100%"><BR>
<B><A NAME="descr"></A>DESCRIPTION</B><BR>
<P>
<B>Tree</B> widget uses canvas to display a hierarchical list of items (called nodes).
Each node is composed of a label with its own font and foreground attributes, and an optional
image or window. Each node can have a list of subnodes, which can be collapsed or expanded.
Each node is drawn in a single line, whose height is defined by the
<B>deltay</B> option, so they must have at most this height.
A node is uniquely identified by a string given at creation (by the
<B>insert</B> command). The node named <I>root</I> is the root of
the tree and is not drawn.
The tree structure is directly maintained by the widget.
</P>
<BR><HR WIDTH="50%"><BR>
<B><A NAME="wso">WIDGET-SPECIFIC OPTIONS</A></B><BR>
<DL><DT><A NAME="-closecmd"><B>-closecmd</B></A></DT>
<DD>
Specifies a command to be called when user close a node. The
closed node is appended to the command.
</DD>
</DL>
<DL><DT><A NAME="-deltax"><B>-deltax</B></A></DT>
<DD>
Specifies horizontal indentation between a node and its children.
</DD>
</DL>
<DL><DT><A NAME="-deltay"><B>-deltay</B></A></DT>
<DD>
Specifies vertical size of the nodes.
</DD>
</DL>
<DL><DT><A NAME="-dragenabled"><B>-dragenabled</B></A></DT>
<DD>
A boolean specifying if drag is enabled.
</DD>
</DL>
<DL><DT><A NAME="-dragendcmd"><B>-dragendcmd</B></A></DT>
<DD>
Specifies a command to be called when drag ended.
<B>dragendcmd</B> must be a command conforming to the description of the
option <B>dragendcmd</B> of <B>DragSite::<A HREF="DragSite.html#register">register</A></B>.
</DD>
</DL>
<DL><DT><A NAME="-dragevent"><B>-dragevent</B></A></DT>
<DD>
Specifies the number of the mouse button associated to the drag.
Must be <B>1</B>, <B>2</B> or <B>3</B>.
</DD>
</DL>
<DL><DT><A NAME="-draginitcmd"><B>-draginitcmd</B></A></DT>
<DD>
Tree has a command wrapper for <I>drag-init</I> events. This command refused the drag
if no node is designated. In other cases:
<BR>If <B>draginitcmd</B> is empty, it returns:
<UL>
<LI>the value of option <B>dragtype</B> or <I>TREE_NODE</I> if empty as the data type,
<LI><I>{copy move link}</I> as the operations,
<LI>the node identifier as the data.
</UL>
If <B>draginitcmd</B> is not empty, it is called with the following arguments:
<UL>
<LI>the pathname of the tree,
<LI>the identifier of the dragged node,
<LI>the toplevel created to represent dragged data.
</UL>
and must return a value conforming to <B>draginitcmd</B> option described in
<B>DragSite::<A HREF="DragSite.html#register">register</A></B>.
</DD>
</DL>
<DL><DT><A NAME="-dragtype"><B>-dragtype</B></A></DT>
<DD>
Specifies an alternate type of dragged object.
</DD>
</DL>
<DL><DT><A NAME="-dropcmd"><B>-dropcmd</B></A></DT>
<DD>
Tree has a command wrapper for <I>drop</I> events. This command stops auto scrolling
and extract node and position.
<BR>If <B>dropcmd</B> is not empty, it is called with the following arguments:
<UL>
<LI>the pathname of the tree,
<LI>the pathname of the drag source,
<LI>a list describing where the drop occurs. It can be:
<UL>
<LI><I>{</I><B>widget</B><I>}</I>,
<LI><I>{</I><B>node</B> <I>node}</I> or
<LI><I>{</I><B>position</B> <I>node index}</I>.
</UL>
<LI>the current operation,
<LI>the data type,
<LI>the data.
</UL>
</DD>
</DL>
<DL><DT><A NAME="-dropenabled"><B>-dropenabled</B></A></DT>
<DD>
A boolean specifying if drop is enabled.
</DD>
</DL>
<DL><DT><A NAME="-dropovercmd"><B>-dropovercmd</B></A></DT>
<DD>
Tree has a command wrapper for <I>drag-over</I> events. This command enables auto scrolling
and position extraction during the <I>drag-over</I>.
If <B>dropovercmd</B> is not empty, the command is called with the following aguments:
<UL>
<LI>the pathname of the tree,
<LI>the pathname of the drag source,
<LI>a list describing where the drop can occur, whose elements are:
<UL>
<LI>the string <I>widget</I> if <B>dropovertype</B> option contains <I>w</I>, else empty string.
<LI>the targeted node if drag icon points a node and <B>dropovertype</B> option contains <I>n</I>, else empty string.
<LI>a list containing a node and the position within the children of the node where drag
icon points to if <B>dropovertype</B> option contains <I>p</I>, else empty string.
<LI>optionally, the preferred method if drop can occur both inside a node and between two
nodes. The value is <I>position</I> or <I>node</I>.
</UL>
<LI>the current operation,
<LI>the data type,
<LI>the data.
</UL>
The command must return a list with two elements:
<UL>
<LI>the drop status, conforming to those described in <B>dropovercmd</B> option of
<B>DropSite::<A HREF="DropSite.html#register">register</A></B>,
<LI>the choosen method: <I>widget</I>, <I>node</I> or <I>position</I>.
</UL>
</DD>
</DL>
<DL><DT><A NAME="-dropovermode"><B>-dropovermode</B></A></DT>
<DD>
Specifies the type of <I>drop-over</I> interaction. Must be a combination of
<B>w</B>, which specifies that drop can occurs everywhere on widget,
<B>p</B>, which specifies that drop can occurs between two nodes,
and <B>n</B>, which specifies that drop occurs inside nodes.
</DD>
</DL>
<DL><DT><A NAME="-droptypes"><B>-droptypes</B></A></DT>
<DD>
Specifies a list of accepted dropped object/operation.
See option <B>droptypes</B> of
<B>DropSite::<A HREF="DropSite.html#register">register</A></B>.
for more infromation.
<BR>Default is <I>TREE_NODE</I> with operations <B>copy</B> and <B>move</B>.
</DD>
</DL>
<DL><DT><A NAME="-height"><B>-height</B></A></DT>
<DD>
Specifies the desired height for the tree in units of <B>deltay</B> pixels.
</DD>
</DL>
<DL><DT><A NAME="-linesfill"><B>-linesfill</B></A></DT>
<DD>
Specifies a foreground color for the lines between nodes.
</DD>
</DL>
<DL><DT><A NAME="-linestipple"><B>-linestipple</B></A></DT>
<DD>
Specifies a stipple bitmap for the lines between nodes.
</DD>
</DL>
<DL><DT><A NAME="-opencmd"><B>-opencmd</B></A></DT>
<DD>
Specifies a command to be called when user open a node. The
opened node is appended to the command.
</DD>
</DL>
<DL><DT><A NAME="-padx"><B>-padx</B></A></DT>
<DD>
Specifies distance between image or window and text of the nodes.
</DD>
</DL>
<DL><DT><A NAME="-redraw"><B>-redraw</B></A></DT>
<DD>
Specifies wether or not the tree should be redrawn when entering idle.
Set it to false if you call <B>update</B> while modifying the tree.
</DD>
</DL>
<DL><DT><A NAME="-showlines"><B>-showlines</B></A></DT>
<DD>
Specifies whether or not lines should be drawn between nodes.
</DD>
</DL>
<DL><DT><A NAME="-width"><B>-width</B></A></DT>
<DD>
Specifies the desired width for the tree in units of 8 pixels.
</DD>
</DL>
<HR WIDTH="50%"><BR>
<B><A NAME="wc">WIDGET COMMAND</A></B><BR>
<DL><DT><A NAME="bindImage"><I>pathName</I> <B>bindImage</B></A>
<I>event</I>
<I>script</I>
</DT><DD>
This command associates a command to execute whenever the event
sequence given by <I>event</I> occurs on the image of a node.
The node idenfier on which the event occurs is appended to the command.
</DD></DL>
<DL><DT><A NAME="bindText"><I>pathName</I> <B>bindText</B></A>
<I>event</I>
<I>script</I>
</DT><DD>
This command associates a command to execute whenever the event
sequence given by <I>event</I> occurs on the label of a node.
The node idenfier on which the event occurs is appended to the command.
</DD></DL>
<DL><DT><A NAME="cget"><I>pathName</I> <B>cget</B></A>
<I>option</I>
</DT><DD>
Returns the current value of the configuration option given by <I>option</I>.
<I>Option</I> may have any of the values accepted by the creation command.
</DD></DL>
<DL><DT><A NAME="closetree"><I>pathName</I> <B>closetree</B></A>
<I>node</I>
</DT><DD>
This command close all the subtree given by <I>node</I> (recurse
through the tree starting at <I>node</I> and set <B>open</B> option to 0)
</DD></DL>
<DL><DT><A NAME="configure"><I>pathName</I> <B>configure</B></A>
?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
</DT><DD>
Query or modify the configuration options of the widget. If no <I>option</I> is specified,
returns a list describing all of the available options for <I>pathName</I>.
If <I>option</I> is specified with no <I>value</I>, then the command returns a list
describing the one named <I>option</I> (this list will be identical to the corresponding
sublist of the value returned if no <I>option</I> is specified). If one or
more <I>option-value</I> pairs are specified, then the command modifies the given widget
option(s) to have the given value(s); in this case the command returns an empty string.
<I>Option</I> may have any of the values accepted by the creation command.
Read-only options are not be modified.
</DD></DL>
<DL><DT><A NAME="delete"><I>pathName</I> <B>delete</B></A>
?<I>arg...</I>?
</DT><DD>
Deletes all nodes (and children of them) in <I>arg</I>. <I>arg</I> can be a list
of nodes or a list of list of nodes.
To delete all the tree, do <I>$pathName delete [$pathName nodes root]</I>.
</DD></DL>
<DL><DT><A NAME="edit"><I>pathName</I> <B>edit</B></A>
<I>node</I>
<I>text</I>
?<I>verifycmd</I>?
?<I>clickres</I>?
?<I>select</I>?
</DT><DD>
Provides a way for the user to edit in place the label of a node. This is
possible only if <I>node</I> is visible (all its parents are open).
<BR>The command takes the initial text as argument and does not modify the label of the
edited node, but returns an empty string if edition is canceled, or the typed text
if edition is accepted.
<BR>When editing, the user can cancel by pressing Escape, or accept by pressing Return.
<BR><I>clickres</I> specifies what to do if the user click outside the editable area.
If <I>clickres</I> is 0 (the default), the edition is canceled.
If <I>clickres</I> is 1, the edition is accepted.
In all other case, the edition continues.
<BR>If edition is accepted and <I>modifycmd</I> is not empty, then it is called with
the new text as argument and must return 1 to accept the new text, 0 to refuse it
and continue edition.
<BR><I>select</I> specifies wether or not the initial text should be selected. Default is 1.
</DD></DL>
<DL><DT><A NAME="exists"><I>pathName</I> <B>exists</B></A>
<I>node</I>
</DT><DD>
Returns whether or not <I>node</I> exists in the tree.
</DD></DL>
<DL><DT><A NAME="index"><I>pathName</I> <B>index</B></A>
<I>node</I>
</DT><DD>
Returns the position of <I>node</I> in its parent.
</DD></DL>
<DL><DT><A NAME="insert"><I>pathName</I> <B>insert</B></A>
<I>index</I>
<I>parent</I>
<I>node</I>
?<I>option value...</I>?
</DT><DD>
Inserts a new node identified by <I>node</I> in the children list of <I>parent</I>
at position <I>index</I>.
<P>
<DL><DT><A NAME="Node-data"><B>-data</B></A></DT>
<DD>
User data associated to the node.
</DD>
</DL>
<DL><DT><A NAME="Node-drawcross"><B>-drawcross</B></A></DT>
<DD>
Specifies how the cross used to expand or collapse the children of a node
should be drawn.
Must be one of <B>auto</B>, <B>allways</B> or <B>never</B>.
<BR>If <B>auto</B>, the cross is drawn only if the node has children.
If <B>allways</B>, the cross is always drawn.
If <B>never</B>, the cross is never drawn.
</DD>
</DL>
<DL><DT><A NAME="Node-fill"><B>-fill</B></A></DT>
<DD>
Specifies the foreground color of the label of the node.
</DD>
</DL>
<DL><DT><A NAME="Node-font"><B>-font</B></A></DT>
<DD>
Specifies a font for the label of the node.
</DD>
</DL>
<DL><DT><A NAME="Node-image"><B>-image</B></A></DT>
<DD>
Specifies an image to display at the left of the label of the node.
<B>window</B> option override <B>image</B>.
</DD>
</DL>
<DL><DT><A NAME="Node-open"><B>-open</B></A></DT>
<DD>
Specifies wether or not the children of the node should be drawn.
</DD>
</DL>
<DL><DT><A NAME="Node-text"><B>-text</B></A></DT>
<DD>
Specifies the label of the node.
</DD>
</DL>
<DL><DT><A NAME="Node-window"><B>-window</B></A></DT>
<DD>
Specifies a pathname to display at the left of the label of the node.
<B>window</B> option override <B>image</B>.
</DD>
</DL>
</DD></DL>
<DL><DT><A NAME="itemcget"><I>pathName</I> <B>itemcget</B></A>
<I>node</I>
<I>option</I>
</DT><DD>
Returns the current value of a configuration option for the item.
<I>Option</I> may have any of the values accepted by the item creation command.
</DD></DL>
<DL><DT><A NAME="itemconfigure"><I>pathName</I> <B>itemconfigure</B></A>
<I>node</I>
?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
</DT><DD>
This command is similar to the <B>configure</B> command, except that it applies to the
options for an individual item, whereas <B>configure</B> applies to the options for
the widget as a whole. <B>Options</B> may have any of the values accepted by the
item creation widget command. If options are specified, options are modified as indicated
in the command and the command returns an empty string. If no options are specified,
returns a list describing the current options for the item.
Read-only options are not be modified.
</DD></DL>
<DL><DT><A NAME="move"><I>pathName</I> <B>move</B></A>
<I>parent</I>
<I>node</I>
<I>index</I>
</DT><DD>
Moves <I>node</I> to the children list of <I>parent</I> at position <I>index</I>.
<I>parent</I> can not be a descendant of <I>node</I>.
</DD></DL>
<DL><DT><A NAME="nodes"><I>pathName</I> <B>nodes</B></A>
<I>node</I>
?<I>first</I>?
?<I>last</I>?
</DT><DD>
Returns parts of the children of <I>node</I>, following <I>first</I> and <I>last</I>.<BR>
If <I>first</I> and <I>last</I> are omitted, returns the list of all children.
If <I>first</I> is specified and <I>last</I> omitted, returns the child at index
<I>first</I>, or an empty string if <I>first</I> refers to a non-existent element.
If <I>first</I> and <I>last</I> are specified, the command returns a list whose elements
are all of the children between <I>first</I> and <I>last</I>,
inclusive. Both <I>first</I> and <I>last</I> may have any of the standard
forms for indices.
</DD></DL>
<DL><DT><A NAME="opentree"><I>pathName</I> <B>opentree</B></A>
<I>node</I>
</DT><DD>
This command open all the subtree given by <I>node</I> (recurse
through the tree starting at <I>node</I> and set <B>open</B> option to 1)
</DD></DL>
<DL><DT><A NAME="parent"><I>pathName</I> <B>parent</B></A>
<I>node</I>
</DT><DD>
Returns the parent of <I>node</I>.
</DD></DL>
<DL><DT><A NAME="reorder"><I>pathName</I> <B>reorder</B></A>
<I>node</I>
<I>neworder</I>
</DT><DD>
Modifies the order of children of <I>node</I> given by <I>neworder</I>. Children of
<I>node</I> that do not appear in <I>neworder</I> are no moved.
</DD></DL>
<DL><DT><A NAME="see"><I>pathName</I> <B>see</B></A>
<I>node</I>
</DT><DD>
Arrange the scrolling area to make <I>node</I> visible.
</DD></DL>
<DL><DT><A NAME="selection"><I>pathName</I> <B>selection</B></A>
<I>cmd</I>
?<I>arg...</I>?
</DT><DD>
Modifies the list of selected nodes following <I>cmd</I>:
<DL>
<DT><B>clear</B>
<DD>remove all nodes of the selection.
<DT><B>set</B>
<DD>set the selection to all nodes in <I>arg</I>
<DT><B>add</B>
<DD>add all nodes of <I>arg</I> in the selection
<DT><B>remove</B>
<DD>remove all nodes of <I>arg</I> of the selection
<DT><B>get</B>
<DD>return the current selected nodes
</DL>
</DD></DL>
<DL><DT><A NAME="visible"><I>pathName</I> <B>visible</B></A>
<I>node</I>
</DT><DD>
Returns whether or not <I>node</I> is visible (all its parents are open).
</DD></DL>
<DL><DT><A NAME="xview"><I>pathName</I> <B>xview</B></A>
?<I>arg...</I>?
</DT><DD>
Standard command to enable horizontal scrolling of <I>pathName</I>.
</DD></DL>
<DL><DT><A NAME="yview"><I>pathName</I> <B>yview</B></A>
?<I>arg...</I>?
</DT><DD>
Standard command to enable vertical scrolling of <I>pathName</I>.
</DD></DL>
</BODY></HTML>

409
hlp/en/bwidget/Widget.html Normal file
View File

@ -0,0 +1,409 @@
<HTML>
<HEAD><TITLE>Widget</TITLE></HEAD>
<BODY BGCOLOR=white>
<IMG SRC="constr.gif" WIDTH="40" HEIGHT="40"> Under construction ...<BR>
<DL><DT><I><A HREF="#descr">NAME</A></I></DT>
<DD><B>Widget</B>
- The Widget base class
</DD></DL>
<DL>
<DT><I><A HREF="#wc">COMMAND</A></I></DT>
<DD>Widget::<A HREF="#addmap"><B>addmap</B></A>
<I>class</I>
<I>subclass</I>
<I>subpath</I>
<I>options</I>
</DD>
<DD>Widget::<A HREF="#bwinclude"><B>bwinclude</B></A>
<I>class</I>
<I>subclass</I>
<I>subpath</I>
?<I>arg...</I>?
</DD>
<DD>Widget::<A HREF="#cget"><B>cget</B></A>
<I>path</I>
<I>option</I>
</DD>
<DD>Widget::<A HREF="#configure"><B>configure</B></A>
<I>path</I>
<I>options</I>
</DD>
<DD>Widget::<A HREF="#declare"><B>declare</B></A>
<I>class</I>
<I>optlist</I>
</DD>
<DD>Widget::<A HREF="#destroy"><B>destroy</B></A>
<I>path</I>
</DD>
<DD>Widget::<A HREF="#focusNext"><B>focusNext</B></A>
<I>w</I>
</DD>
<DD>Widget::<A HREF="#focusOK"><B>focusOK</B></A>
<I>w</I>
</DD>
<DD>Widget::<A HREF="#focusPrev"><B>focusPrev</B></A>
<I>w</I>
</DD>
<DD>Widget::<A HREF="#generate-doc"><B>generate-doc</B></A>
<I>dir</I>
<I>widgetlist</I>
</DD>
<DD>Widget::<A HREF="#generate-widget-doc"><B>generate-widget-doc</B></A>
<I>class</I>
<I>iscmd</I>
<I>file</I>
</DD>
<DD>Widget::<A HREF="#getoption"><B>getoption</B></A>
<I>path</I>
<I>option</I>
</DD>
<DD>Widget::<A HREF="#hasChanged"><B>hasChanged</B></A>
<I>path</I>
<I>option</I>
<I>pvalue</I>
</DD>
<DD>Widget::<A HREF="#init"><B>init</B></A>
<I>class</I>
<I>path</I>
<I>options</I>
</DD>
<DD>Widget::<A HREF="#setoption"><B>setoption</B></A>
<I>path</I>
<I>option</I>
<I>value</I>
</DD>
<DD>Widget::<A HREF="#subcget"><B>subcget</B></A>
<I>path</I>
<I>subwidget</I>
</DD>
<DD>Widget::<A HREF="#syncoptions"><B>syncoptions</B></A>
<I>class</I>
<I>subclass</I>
<I>subpath</I>
<I>options</I>
</DD>
<DD>Widget::<A HREF="#tkinclude"><B>tkinclude</B></A>
<I>class</I>
<I>tkwidget</I>
<I>subpath</I>
?<I>arg...</I>?
</DD>
</DL>
<BR><HR WIDTH="100%"><BR>
<B><A NAME="descr"></A>DESCRIPTION</B><BR>
<P>
The <B>Widget</B> namespace handle data associated to all BWidget and provide commands
to easily define BWidget.
<BR>For commands can be used to define a BWidget:
<B>tkinclude</B>, <B>bwinclude</B>, <B>declare</B>, <B>addmap</B> and <B>syncoptions</B>.
Here is the definition of <A HREF="ComboBox.html">ComboBox</A> widget:
<BR><BR>
<CENTER>
<TABLE BORDER=2 CELSPACING=2 WIDTH=80%>
<TR><TD><PRE>
namespace eval ComboBox {
<FONT COLOR=red><I># We're using ArrowButton, Entry and LabelFrame</I></FONT>
ArrowButton::use
Entry::use
LabelFrame::use
<FONT COLOR=red><I># Include resources of LabelFrame</I></FONT>
Widget::bwinclude ComboBox LabelFrame .labf \
rename {-text -label} \
remove {-focus} \
prefix {label -justify -width -anchor -height -font} \
initialize {-relief sunken -borderwidth 2}
<FONT COLOR=red><I># Include resources of Entry</I></FONT>
Widget::bwinclude ComboBox Entry .e \
remove {-relief -bd -borderwidth -bg -fg} \
rename {-foreground -entryfg -background -entrybg}
<FONT COLOR=red><I># Declare new resources</I></FONT>
Widget::declare ComboBox {
{-height TkResource 0 0 listbox}
{-values String "" 0}
{-modifycmd String "" 0}
{-postcommand String "" 0}
}
<FONT COLOR=red><I># Map resources to subwidget</I></FONT>
Widget::addmap ComboBox "" :cmd {-background {}}
Widget::addmap ComboBox ArrowButton .a \
{-foreground {} -background {} -disabledforeground {} -state {}}
<FONT COLOR=red><I># Synchronize subwidget options</I></FONT>
Widget::syncoptions ComboBox Entry .e {-text {}}
Widget::syncoptions ComboBox LabelFrame .labf {-label -text -underline {}}
proc use {} {}
}</PRE>
</TD></TR>
</TABLE></CENTER>
</P>
<HR WIDTH="50%"><BR>
<B><A NAME="wc">COMMAND</A></B><BR>
<DL><DT><A NAME="addmap">Widget::<B>addmap</B></A>
<I>class</I>
<I>subclass</I>
<I>subpath</I>
<I>options</I>
</DT><DD>
This command map some resources to subwidget.
Mapped resources automatically configure subwidget when widget is configured.
<UL>
<LI><I>class</I> is the class of the new BWidget
<LI><I>subclass</I> is the class the subwidget (BWidget class, e.g Entry, or empty for Tk widget)
<LI><I>subpath</I> is the path of the subwidget
<LI><I>options</I> is the list <I>{option realres ...}</I> of options to map to subwidget
</UL>
</DD></DL>
<DL><DT><A NAME="bwinclude">Widget::<B>bwinclude</B></A>
<I>class</I>
<I>subclass</I>
<I>subpath</I>
?<I>arg...</I>?
</DT><DD>
This command includes into a new BWidget the resources of another BWidget.
Arguments are:
<UL>
<LI><I>class</I> class of the new widget
<LI><I>subclass</I> class name of the BWidget to be included
<LI><I>subpath</I> path of the widget to configure when BWidget is configured
<LI><I>options</I> is:
<UL>
<LI><I><B>include</B> {option option ...}</I>
<BR>list of options to include (all if not defined)
<LI><I><B>remove</B> {option option ...}</I>
<BR> list of options to remove
<LI><I><B>rename</B> {option name option name ...}</I>
<BR>list of options to rename
<LI><I><B>prefix</B> {prefix option option ...}</I>
<BR>pefix all <I>option</I> by <I>prefix</I>
<LI><I><B>initialize</B> {option value option value ...}</I>
<BR>default value of options
<LI><I><B>readonly</B> {option value option value ...}</I>
<BR>new readonly flag
</UL></UL>
</DD></DL>
<DL><DT><A NAME="cget">Widget::<B>cget</B></A>
<I>path</I>
<I>option</I>
</DT><DD>
Returns the value of <I>option</I> of BWidget <I>path</I>. <B>cget</B> tests the option
existence and takes care of synchronization with subwidget.
Typically called by the BWidget <B>cget</B> command.
</DD></DL>
<DL><DT><A NAME="configure">Widget::<B>configure</B></A>
<I>path</I>
<I>options</I>
</DT><DD>
Description text
</DD></DL>
<DL><DT><A NAME="declare">Widget::<B>declare</B></A>
<I>class</I>
<I>optlist</I>
</DT><DD>
This command declare new resources for a BWidget.
<UL>
<LI><I>class</I> is class of the new widget
<LI><I>options</I> is the list describing new options. Each new option is a list
<B>{option type value ro ?args?}</B> where:
<UL>
<LI><I>option</I> is the name of the option
<LI><I>type</I> is the type of the option
<LI><I>value</I> is the default value of the option
<LI><I>ro</I> is the readonly flag of the option
<LI><I>args</I> depends on type
</UL></UL>
<BR>
<I>type</I> can be:
<BR>
<DL>
<DT><B>TkResource</B></DT>
<DD>
<I>value</I> of <I>option</I> denotes a resource of a Tk widget. <I>args</I> must be <I>class</I> or
<I>{class realoption}</I>. <I>class</I> is the creation command of the Tk widget, e.g.
<B>entry</B>.
The second form must be used if <I>option</I> has not the same name in Tk widget,
but <I>realoption</I>.
<BR>If <I>value</I> is empty, it is initialized to the default value of the Tk widget.
</DD>
<DT><B>BwResource</B></DT>
<DD>
<I>value</I> of <I>option</I> denotes a resource of a BWidget. <I>args</I> must be <I>class</I> or
<I>{class realoption}</I>. <I>class</I> is the name of the namespace of the BWidget, e.g.
<B>LabelFrame</B>.
The second form must be used if <I>option</I> has not the same name in BWidget,
but <I>realoption</I>.
<BR>If <I>value</I> is empty, it is initialized to the default value of the BWidget.
</DD>
<DT><B>Int</B></DT>
<DD><I>value</I> of <I>option</I> is an integer.
<I>args</I> can be <I>{?min? ?max?}</I> to force it to be in a range. The test is
<I>[expr $option>$min] && [expr $option<$max]</I> so
if args is <I>{0 10}</I>, value must be beetween 0 and 10 exclude,
if <I>args</I> is <I>{=0 =10}</I> , value must be beetween 0 and 10 include.
</DD>
<DT><B>Boolean</B></DT>
<DD><I>value</I> of <I>option</I> is a boolean. True values can be <B>1</B>, <B>true</B> or <B>yes</B>.
False values can be <B>0</B>, <B>false</B> or <B>no</B>. <B>Widget::cget</B> always return
0 or 1.
</DD>
<DT><B>Enum</B></DT>
<DD>
<I>value</I> of <I>option</I> is a element of a enumeration. <I>args</I> must be the list
of enumeration, e.g. <I>{top left bottom right}</I>.
</DD>
<DT><B>Flag</B></DT>
<DD>
<I>value</I> of <I>option</I> is a combination of a set of chars. <I>args</I> must be a
string defining the set.
</DD>
<DT><B>String</B></DT>
<DD>
<DD><I>value</I> of <I>option</I> is any uncontrolled string.
</DD>
<DT><B>Synonym</B></DT>
<DD>
<DD><I>option</I> is a synonym of option <I>args</I>. <I>value</I> has no effect here.
</DD>
</DL>
</DD></DL>
<DL><DT><A NAME="destroy">Widget::<B>destroy</B></A>
<I>path</I>
</DT><DD>
Description text
</DD></DL>
<DL><DT><A NAME="focusNext">Widget::<B>focusNext</B></A>
<I>w</I>
</DT><DD>
Description text
</DD></DL>
<DL><DT><A NAME="focusOK">Widget::<B>focusOK</B></A>
<I>w</I>
</DT><DD>
Description text
</DD></DL>
<DL><DT><A NAME="focusPrev">Widget::<B>focusPrev</B></A>
<I>w</I>
</DT><DD>
Description text
</DD></DL>
<DL><DT><A NAME="generate-doc">Widget::<B>generate-doc</B></A>
<I>dir</I>
<I>widgetlist</I>
</DT><DD>
Description text
</DD></DL>
<DL><DT><A NAME="generate-widget-doc">Widget::<B>generate-widget-doc</B></A>
<I>class</I>
<I>iscmd</I>
<I>file</I>
</DT><DD>
Description text
</DD></DL>
<DL><DT><A NAME="getoption">Widget::<B>getoption</B></A>
<I>path</I>
<I>option</I>
</DT><DD>
Returns the value of <I>option</I> of BWidget <I>path</I>. This command does not test
option existence, does not handle synonym and does not take care of synchronization with
subwidget.
</DD></DL>
<DL><DT><A NAME="hasChanged">Widget::<B>hasChanged</B></A>
<I>path</I>
<I>option</I>
<I>pvalue</I>
</DT><DD>
Description text
</DD></DL>
<DL><DT><A NAME="init">Widget::<B>init</B></A>
<I>class</I>
<I>path</I>
<I>options</I>
</DT><DD>
Description text
</DD></DL>
<DL><DT><A NAME="setoption">Widget::<B>setoption</B></A>
<I>path</I>
<I>option</I>
<I>value</I>
</DT><DD>
Set the value of <I>option</I> of BWidget <I>path</I> without option test, subwidget mapping,
synonym handling and does not set the modification flag.
</DD></DL>
<DL><DT><A NAME="subcget">Widget::<B>subcget</B></A>
<I>path</I>
<I>subwidget</I>
</DT><DD>
Returns the list of all option/value of BWidget <I>path</I> that are mapped to <I>subwidget</I>.
</DD></DL>
<DL><DT><A NAME="syncoptions">Widget::<B>syncoptions</B></A>
<I>class</I>
<I>subclass</I>
<I>subpath</I>
<I>options</I>
</DT><DD>
This command synchronize options value of a subwidget.
Used when an option of a subwidget is modified out of the BWidget <B>configure</B> command.
<UL>
<LI><I>class</I> is the class of the new BWidget
<LI><I>subclass</I> is the class the subwidget (BWidget class, e.g Entry, or empty for Tk widget)
<LI><I>subpath</I> is the path of the subwidget
<LI><I>options</I> is the list <I>{option realres ...}</I> of options to synchronize
with subwidget
</UL>
</DD></DL>
<DL><DT><A NAME="tkinclude">Widget::<B>tkinclude</B></A>
<I>class</I>
<I>tkwidget</I>
<I>subpath</I>
?<I>arg...</I>?
</DT><DD>
This command includes into a new BWidget the resources of a Tk widget.
Arguments are:
<UL>
<LI><I>class</I> class of the new widget
<LI><I>tkwidger</I> command name of the Tk widget to be included
<LI><I>subpath</I> path of the widget to configure when BWidget is configured
<LI><I>options</I> is:
<UL>
<LI><I><B>include</B> {option option ...}</I>
<BR>list of options to include (all if not defined)
<LI><I><B>remove</B> {option option ...}</I>
<BR>list of options to remove
<LI><I><B>rename</B> {option name option name ...}</I>
<BR>list of options to rename
<LI><I><B>prefix</B> {prefix option option ...}</I>
<BR>pefix all <I>option</I> by <I>prefix</I>
<LI><I><B>initialize</B> {option value option value ...}</I>
<BR>default value of options
<LI><I><B>readonly</B> {option value option value ...}</I>
<BR>new readonly flag
</UL></UL>
</DD></DL>
</BODY></HTML>

View File

@ -0,0 +1,34 @@
<title>BWidget</title>
<a href="Label.html">Label</a><br>
<a href="Entry.html">Entry</a><br>
<a href="Button.html">Button</a><br>
<a href="ArrowButton.html">ArrowButton</a><br>
<a href="ProgressBar.html">ProgressBar</a><br>
<a href="ScrollView.html">ScrollView</a><br>
<a href="Separator.html">Separator</a><br>
<a href="MainFrame.html">MainFrame</a><br>
<a href="LabelFrame.html">LabelFrame</a><br>
<a href="TitleFrame.html">TitleFrame</a><br>
<a href="ScrolledWindow.html">ScrolledWindow</a><br>
<a href="ScrollableFrame.html">ScrollableFrame</a><br>
<a href="PanedWindow.html">PanedWindow</a><br>
<a href="ButtonBox.html">ButtonBox</a><br>
<a href="PagesManager.html">PagesManager</a><br>
<a href="NoteBook.html">NoteBook</a><br>
<a href="Dialog.html">Dialog</a><br>
<a href="LabelEntry.html">LabelEntry</a><br>
<a href="ComboBox.html">ComboBox</a><br>
<a href="SpinBox.html">SpinBox</a><br>
<a href="Tree.html">Tree</a><br>
<a href="ListBox.html">ListBox</a><br>
<a href="MessageDlg.html">MessageDlg</a><br>
<a href="ProgressDlg.html">ProgressDlg</a><br>
<a href="PasswdDlg.html">PasswdDlg</a><br>
<a href="SelectFont.html">SelectFont</a><br>
<a href="SelectColor.html">SelectColor</a><br>
<a href="Widget.html">Widget</a><br>
<a href="DynamicHelp.html">DynamicHelp</a><br>
<a href="DragSite.html">DragSite</a><br>
<a href="DropSite.html">DropSite</a><br>
<a href="BWidget.html">BWidget</a><br>

View File

@ -0,0 +1,39 @@
<HTML><BODY BGCOLOR=white>
<FONT SIZE=1><STRONG><A HREF="contents.html" TARGET=Manual>Brief description</A></STRONG></FONT><BR>
<FONT SIZE=1><STRONG>Simple Widgets</STRONG></FONT><BR>
&nbsp;&nbsp;<FONT SIZE=1><A HREF="Label.html" TARGET=Manual>Label</A></FONT><BR>
&nbsp;&nbsp;<FONT SIZE=1><A HREF="Entry.html" TARGET=Manual>Entry</A></FONT><BR>
&nbsp;&nbsp;<FONT SIZE=1><A HREF="Button.html" TARGET=Manual>Button</A></FONT><BR>
&nbsp;&nbsp;<FONT SIZE=1><A HREF="ArrowButton.html" TARGET=Manual>ArrowButton</A></FONT><BR>
&nbsp;&nbsp;<FONT SIZE=1><A HREF="ProgressBar.html" TARGET=Manual>ProgressBar</A></FONT><BR>
&nbsp;&nbsp;<FONT SIZE=1><A HREF="ScrollView.html" TARGET=Manual>ScrollView</A></FONT><BR>
&nbsp;&nbsp;<FONT SIZE=1><A HREF="Separator.html" TARGET=Manual>Separator</A></FONT><BR>
<FONT SIZE=1><STRONG>Manager Widgets</STRONG></FONT><BR>
&nbsp;&nbsp;<FONT SIZE=1><A HREF="MainFrame.html" TARGET=Manual>MainFrame</A></FONT><BR>
&nbsp;&nbsp;<FONT SIZE=1><A HREF="LabelFrame.html" TARGET=Manual>LabelFrame</A></FONT><BR>
&nbsp;&nbsp;<FONT SIZE=1><A HREF="TitleFrame.html" TARGET=Manual>TitleFrame</A></FONT><BR>
&nbsp;&nbsp;<FONT SIZE=1><A HREF="ScrolledWindow.html" TARGET=Manual>ScrolledWindow</A></FONT><BR>
&nbsp;&nbsp;<FONT SIZE=1><A HREF="ScrollableFrame.html" TARGET=Manual>ScrollableFrame</A></FONT><BR>
&nbsp;&nbsp;<FONT SIZE=1><A HREF="PanedWindow.html" TARGET=Manual>PanedWindow</A></FONT><BR>
&nbsp;&nbsp;<FONT SIZE=1><A HREF="ButtonBox.html" TARGET=Manual>ButtonBox</A></FONT><BR>
&nbsp;&nbsp;<FONT SIZE=1><A HREF="PagesManager.html" TARGET=Manual>PagesManager</A></FONT><BR>
&nbsp;&nbsp;<FONT SIZE=1><A HREF="NoteBook.html" TARGET=Manual>NoteBook</A></FONT><BR>
&nbsp;&nbsp;<FONT SIZE=1><A HREF="Dialog.html" TARGET=Manual>Dialog</A></FONT><BR>
<FONT SIZE=1><STRONG>Composite Widgets</STRONG></FONT><BR>
&nbsp;&nbsp;<FONT SIZE=1><A HREF="LabelEntry.html" TARGET=Manual>LabelEntry</A></FONT><BR>
&nbsp;&nbsp;<FONT SIZE=1><A HREF="ComboBox.html" TARGET=Manual>ComboBox</A></FONT><BR>
&nbsp;&nbsp;<FONT SIZE=1><A HREF="SpinBox.html" TARGET=Manual>SpinBox</A></FONT><BR>
&nbsp;&nbsp;<FONT SIZE=1><A HREF="Tree.html" TARGET=Manual>Tree</A></FONT><BR>
&nbsp;&nbsp;<FONT SIZE=1><A HREF="ListBox.html" TARGET=Manual>ListBox</A></FONT><BR>
&nbsp;&nbsp;<FONT SIZE=1><A HREF="MessageDlg.html" TARGET=Manual>MessageDlg</A></FONT><BR>
&nbsp;&nbsp;<FONT SIZE=1><A HREF="ProgressDlg.html" TARGET=Manual>ProgressDlg</A></FONT><BR>
&nbsp;&nbsp;<FONT SIZE=1><A HREF="PasswdDlg.html" TARGET=Manual>PasswdDlg</A></FONT><BR>
&nbsp;&nbsp;<FONT SIZE=1><A HREF="SelectFont.html" TARGET=Manual>SelectFont</A></FONT><BR>
&nbsp;&nbsp;<FONT SIZE=1><A HREF="SelectColor.html" TARGET=Manual>SelectColor</A></FONT><BR>
<FONT SIZE=1><STRONG>Commands Classes</STRONG></FONT><BR>
&nbsp;&nbsp;<FONT SIZE=1><A HREF="Widget.html" TARGET=Manual>Widget</A></FONT><BR>
&nbsp;&nbsp;<FONT SIZE=1><A HREF="DynamicHelp.html" TARGET=Manual>DynamicHelp</A></FONT><BR>
&nbsp;&nbsp;<FONT SIZE=1><A HREF="DragSite.html" TARGET=Manual>DragSite</A></FONT><BR>
&nbsp;&nbsp;<FONT SIZE=1><A HREF="DropSite.html" TARGET=Manual>DropSite</A></FONT><BR>
&nbsp;&nbsp;<FONT SIZE=1><A HREF="BWidget.html" TARGET=Manual>BWidget</A></FONT><BR>
</BODY></HTML>

449
hlp/en/bwidget/options.htm Normal file
View File

@ -0,0 +1,449 @@
<HTML><HEAD><TITLE>Tk Built-In Commands - options manual page</TITLE></HEAD>
<BODY BGCOLOR=white>
<DL>
<DD><A HREF="options.htm#M2" NAME="L2">NAME</A>
<DL><DD>options - Standard options supported by widgets</DL>
<DD><A HREF="options.htm#M3" NAME="L3">DESCRIPTION</A>
<DL>
<DD><A HREF="options.htm#M-activebackground" NAME="L4">-activebackground, activeBackground, Foreground</A>
<DD><A HREF="options.htm#M-activeborderwidth" NAME="L5">-activeborderwidth, activeBorderWidth, BorderWidth</A>
<DD><A HREF="options.htm#M-activeforeground" NAME="L6">-activeforeground, activeForeground, Background</A>
<DD><A HREF="options.htm#M-anchor" NAME="L7">-anchor, anchor, Anchor</A>
<DD><A HREF="options.htm#M-background" NAME="L8">-background or -bg, background, Background</A>
<DD><A HREF="options.htm#M-bitmap" NAME="L9">-bitmap, bitmap, Bitmap</A>
<DD><A HREF="options.htm#M-borderwidth" NAME="L10">-borderwidth or -bd, borderWidth, BorderWidth</A>
<DD><A HREF="options.htm#M-cursor" NAME="L11">-cursor, cursor, Cursor</A>
<DD><A HREF="options.htm#M-disabledforeground" NAME="L12">-disabledforeground, disabledForeground, DisabledForeground</A>
<DD><A HREF="options.htm#M-exportselection" NAME="L13">-exportselection, exportSelection, ExportSelection</A>
<DD><A HREF="options.htm#M-font" NAME="L14">-font, font, Font</A>
<DD><A HREF="options.htm#M-foreground" NAME="L15">-foreground or -fg, foreground, Foreground</A>
<DD><A HREF="options.htm#M-highlightbackground" NAME="L16">-highlightbackground, highlightBackground, HighlightBackground</A>
<DD><A HREF="options.htm#M-highlightcolor" NAME="L17">-highlightcolor, highlightColor, HighlightColor</A>
<DD><A HREF="options.htm#M-highlightthickness" NAME="L18">-highlightthickness, highlightThickness, HighlightThickness</A>
<DD><A HREF="options.htm#M-image" NAME="L19">-image, image, Image</A>
<DD><A HREF="options.htm#M-insertbackground" NAME="L20">-insertbackground, insertBackground, Foreground</A>
<DD><A HREF="options.htm#M-insertborderwidth" NAME="L21">-insertborderwidth, insertBorderWidth, BorderWidth</A>
<DD><A HREF="options.htm#M-insertofftime" NAME="L22">-insertofftime, insertOffTime, OffTime</A>
<DD><A HREF="options.htm#M-insertontime" NAME="L23">-insertontime, insertOnTime, OnTime</A>
<DD><A HREF="options.htm#M-insertwidth" NAME="L24">-insertwidth, insertWidth, InsertWidth</A>
<DD><A HREF="options.htm#M-jump" NAME="L25">-jump, jump, Jump</A>
<DD><A HREF="options.htm#M-justify" NAME="L26">-justify, justify, Justify</A>
<DD><A HREF="options.htm#M-orient" NAME="L27">-orient, orient, Orient</A>
<DD><A HREF="options.htm#M-padx" NAME="L28">-padx, padX, Pad</A>
<DD><A HREF="options.htm#M-pady" NAME="L29">-pady, padY, Pad</A>
<DD><A HREF="options.htm#M-relief" NAME="L30">-relief, relief, Relief</A>
<DD><A HREF="options.htm#M-repeatdelay" NAME="L31">-repeatdelay, repeatDelay, RepeatDelay</A>
<DD><A HREF="options.htm#M-repeatinterval" NAME="L32">-repeatinterval, repeatInterval, RepeatInterval</A>
<DD><A HREF="options.htm#M-selectbackground" NAME="L33">-selectbackground, selectBackground, Foreground</A>
<DD><A HREF="options.htm#M-selectborderwidth" NAME="L34">-selectborderwidth, selectBorderWidth, BorderWidth</A>
<DD><A HREF="options.htm#M-selectforeground" NAME="L35">-selectforeground, selectForeground, Background</A>
<DD><A HREF="options.htm#M-setgrid" NAME="L36">-setgrid, setGrid, SetGrid</A>
<DD><A HREF="options.htm#M-takefocus" NAME="L37">-takefocus, takeFocus, TakeFocus</A>
<DD><A HREF="options.htm#M-text" NAME="L38">-text, text, Text</A>
<DD><A HREF="options.htm#M-textvariable" NAME="L39">-textvariable, textVariable, Variable</A>
<DD><A HREF="options.htm#M-troughcolor" NAME="L40">-troughcolor, troughColor, Background</A>
<DD><A HREF="options.htm#M-underline" NAME="L41">-underline, underline, Underline</A>
<DD><A HREF="options.htm#M-wraplength" NAME="L42">-wraplength, wrapLength, WrapLength</A>
<DD><A HREF="options.htm#M-xscrollcommand" NAME="L43">-xscrollcommand, xScrollCommand, ScrollCommand</A>
<DD><A HREF="options.htm#M-yscrollcommand" NAME="L44">-yscrollcommand, yScrollCommand, ScrollCommand</A>
</DL>
<DD><A HREF="options.htm#M4" NAME="L45">KEYWORDS</A>
</DL><HR>
<H3><A NAME="M2">NAME</A></H3>
options - Standard options supported by widgets
<H3><A NAME="M3">DESCRIPTION</A></H3>
This manual entry describes the common configuration options supported
by widgets in the Tk toolkit. Every widget does not necessarily support
every option (see the manual entries for individual widgets for a list
of the standard options supported by that widget), but if a widget does
support an option with one of the names listed below, then the option
has exactly the effect described below.
<P>
In the descriptions below, ``Command-Line Name'' refers to the
switch used in class commands and <B>configure</B> widget commands to
set this value. For example, if an option's command-line switch is
<B>-foreground</B> and there exists a widget <B>.a.b.c</B>, then the
command
<PRE><B>.a.b.c configure -foreground black</B></PRE>
may be used to specify the value <B>black</B> for the option in the
the widget <B>.a.b.c</B>. Command-line switches may be abbreviated,
as long as the abbreviation is unambiguous.
``Database Name'' refers to the option's name in the option database (e.g.
in .Xdefaults files). ``Database Class'' refers to the option's class value
in the option database.
<DL>
<DT>Command-Line Name: <B><A NAME="M-activebackground">-activebackground</A></B>
<DT>Database Name: <B>activeBackground</B>
<DT>Database Class: <B>Foreground</B>
<DD>Specifies background color to use when drawing active elements.
An element (a widget or portion of a widget) is active if the
mouse cursor is positioned over the element and pressing a mouse button
will cause some action to occur.
If strict Motif compliance has been requested by setting the
<B>tk_strictMotif</B> variable, this option will normally be
ignored; the normal background color will be used instead.
For some elements on Windows and Macintosh systems, the active color
will only be used while mouse button 1 is pressed over the element.
<P><DT>Command-Line Name: <B><A NAME="M-activeborderwidth">-activeborderwidth</A></B>
<DT>Database Name: <B>activeBorderWidth</B>
<DT>Database Class: <B>BorderWidth</B>
<DD>Specifies a non-negative value indicating
the width of the 3-D border drawn around active elements. See above for
definition of active elements.
The value may have any of the forms acceptable to <B><A HREF="../TkLib/GetPixels.htm">Tk_GetPixels</A></B>.
This option is typically only available in widgets displaying more
than one element at a time (e.g. menus but not buttons).
<P><DT>Command-Line Name: <B><A NAME="M-activeforeground">-activeforeground</A></B>
<DT>Database Name: <B>activeForeground</B>
<DT>Database Class: <B>Background</B>
<DD>Specifies foreground color to use when drawing active elements.
See above for definition of active elements.
<P><DT>Command-Line Name: <B><A NAME="M-anchor">-anchor</A></B>
<DT>Database Name: <B>anchor</B>
<DT>Database Class: <B>Anchor</B>
<DD>Specifies how the information in a widget (e.g. text or a bitmap)
is to be displayed in the widget.
Must be one of the values <B>n</B>, <B>ne</B>, <B>e</B>, <B>se</B>,
<B>s</B>, <B>sw</B>, <B>w</B>, <B>nw</B>, or <B>center</B>.
For example, <B>nw</B> means display the information such that its
top-left corner is at the top-left corner of the widget.
<P><DT>Command-Line Name: <B><A NAME="M-background">-background or -bg</A></B>
<DT>Database Name: <B>background</B>
<DT>Database Class: <B>Background</B>
<DD>Specifies the normal background color to use when displaying the
widget.
<P><DT>Command-Line Name: <B><A NAME="M-bitmap">-bitmap</A></B>
<DT>Database Name: <B>bitmap</B>
<DT>Database Class: <B>Bitmap</B>
<DD>Specifies a bitmap to display in the widget, in any of the forms
acceptable to <B><A HREF="../TkLib/GetBitmap.htm">Tk_GetBitmap</A></B>.
The exact way in which the bitmap is displayed may be affected by
other options such as <B>anchor</B> or <B>justify</B>.
Typically, if this option is specified then it overrides other
options that specify a textual value to display in the widget;
the <B>bitmap</B> option may be reset to an empty string to re-enable
a text display.
In widgets that support both <B>bitmap</B> and <B>image</B> options,
<B>image</B> will usually override <B>bitmap</B>.
<P><DT>Command-Line Name: <B><A NAME="M-borderwidth">-borderwidth or -bd</A></B>
<DT>Database Name: <B>borderWidth</B>
<DT>Database Class: <B>BorderWidth</B>
<DD>Specifies a non-negative value indicating the width
of the 3-D border to draw around the outside of the widget (if such a
border is being drawn; the <B>relief</B> option typically determines
this). The value may also be used when drawing 3-D effects in the
interior of the widget.
The value may have any of the forms acceptable to <B><A HREF="../TkLib/GetPixels.htm">Tk_GetPixels</A></B>.
<P><DT>Command-Line Name: <B><A NAME="M-cursor">-cursor</A></B>
<DT>Database Name: <B>cursor</B>
<DT>Database Class: <B>Cursor</B>
<DD>Specifies the mouse cursor to be used for the widget.
The value may have any of the forms acceptable to <B><A HREF="../TkLib/GetCursor.htm">Tk_GetCursor</A></B>.
<P><DT>Command-Line Name: <B><A NAME="M-disabledforeground">-disabledforeground</A></B>
<DT>Database Name: <B>disabledForeground</B>
<DT>Database Class: <B>DisabledForeground</B>
<DD>Specifies foreground color to use when drawing a disabled element.
If the option is specified as an empty string (which is typically the
case on monochrome displays), disabled elements are drawn with the
normal foreground color but they are dimmed by drawing them
with a stippled fill pattern.
<P><DT>Command-Line Name: <B><A NAME="M-exportselection">-exportselection</A></B>
<DT>Database Name: <B>exportSelection</B>
<DT>Database Class: <B>ExportSelection</B>
<DD>Specifies whether or not a selection in the widget should also be
the X selection.
The value may have any of the forms accepted by <B><A HREF="../TclLib/GetInt.htm">Tcl_GetBoolean</A></B>,
such as <B>true</B>, <B>false</B>, <B>0</B>, <B>1</B>, <B>yes</B>, or <B>no</B>.
If the selection is exported, then selecting in the widget deselects
the current X selection, selecting outside the widget deselects any
widget selection, and the widget will respond to selection retrieval
requests when it has a selection. The default is usually for widgets
to export selections.
<P><DT>Command-Line Name: <B><A NAME="M-font">-font</A></B>
<DT>Database Name: <B><A HREF="../TkCmd/font.htm">font</A></B>
<DT>Database Class: <B><A HREF="../TkCmd/font.htm">Font</A></B>
<DD>Specifies the font to use when drawing text inside the widget.
<P><DT>Command-Line Name: <B><A NAME="M-foreground">-foreground or -fg</A></B>
<DT>Database Name: <B>foreground</B>
<DT>Database Class: <B>Foreground</B>
<DD>Specifies the normal foreground color to use when displaying the widget.
<P><DT>Command-Line Name: <B><A NAME="M-highlightbackground">-highlightbackground</A></B>
<DT>Database Name: <B>highlightBackground</B>
<DT>Database Class: <B>HighlightBackground</B>
<DD>Specifies the color to display in the traversal highlight region when
the widget does not have the input focus.
<P><DT>Command-Line Name: <B><A NAME="M-highlightcolor">-highlightcolor</A></B>
<DT>Database Name: <B>highlightColor</B>
<DT>Database Class: <B>HighlightColor</B>
<DD>Specifies the color to use for the traversal highlight rectangle that is
drawn around the widget when it has the input focus.
<P><DT>Command-Line Name: <B><A NAME="M-highlightthickness">-highlightthickness</A></B>
<DT>Database Name: <B>highlightThickness</B>
<DT>Database Class: <B>HighlightThickness</B>
<DD>Specifies a non-negative value indicating the width of the highlight
rectangle to draw around the outside of the widget when it has the
input focus.
The value may have any of the forms acceptable to <B><A HREF="../TkLib/GetPixels.htm">Tk_GetPixels</A></B>.
If the value is zero, no focus highlight is drawn around the widget.
<P><DT>Command-Line Name: <B><A NAME="M-image">-image</A></B>
<DT>Database Name: <B>image</B>
<DT>Database Class: <B>Image</B>
<DD>Specifies an image to display in the widget, which must have been
created with the <B><A HREF="../TkCmd/image.htm">image create</A></B> command.
Typically, if the <B>image</B> option is specified then it overrides other
options that specify a bitmap or textual value to display in the widget;
the <B>image</B> option may be reset to an empty string to re-enable
a bitmap or text display.
<P><DT>Command-Line Name: <B><A NAME="M-insertbackground">-insertbackground</A></B>
<DT>Database Name: <B>insertBackground</B>
<DT>Database Class: <B>Foreground</B>
<DD>Specifies the color to use as background in the area covered by the
insertion cursor. This color will normally override either the normal
background for the widget (or the selection background if the insertion
cursor happens to fall in the selection).
<P><DT>Command-Line Name: <B><A NAME="M-insertborderwidth">-insertborderwidth</A></B>
<DT>Database Name: <B>insertBorderWidth</B>
<DT>Database Class: <B>BorderWidth</B>
<DD>Specifies a non-negative value indicating the width
of the 3-D border to draw around the insertion cursor.
The value may have any of the forms acceptable to <B><A HREF="../TkLib/GetPixels.htm">Tk_GetPixels</A></B>.
<P><DT>Command-Line Name: <B><A NAME="M-insertofftime">-insertofftime</A></B>
<DT>Database Name: <B>insertOffTime</B>
<DT>Database Class: <B>OffTime</B>
<DD>Specifies a non-negative integer value indicating the number of
milliseconds the insertion cursor should remain ``off'' in each blink cycle.
If this option is zero then the cursor doesn't blink: it is on
all the time.
<P><DT>Command-Line Name: <B><A NAME="M-insertontime">-insertontime</A></B>
<DT>Database Name: <B>insertOnTime</B>
<DT>Database Class: <B>OnTime</B>
<DD>Specifies a non-negative integer value indicating the number of
milliseconds the insertion cursor should remain ``on'' in each blink cycle.
<P><DT>Command-Line Name: <B><A NAME="M-insertwidth">-insertwidth</A></B>
<DT>Database Name: <B>insertWidth</B>
<DT>Database Class: <B>InsertWidth</B>
<DD>Specifies a value indicating the total width of the insertion cursor.
The value may have any of the forms acceptable to <B><A HREF="../TkLib/GetPixels.htm">Tk_GetPixels</A></B>.
If a border has been specified for the insertion
cursor (using the <B>insertBorderWidth</B> option), the border
will be drawn inside the width specified by the <B>insertWidth</B>
option.
<P><DT>Command-Line Name: <B><A NAME="M-jump">-jump</A></B>
<DT>Database Name: <B>jump</B>
<DT>Database Class: <B>Jump</B>
<DD>For widgets with a slider that can be dragged to adjust a value,
such as scrollbars, this option determines when
notifications are made about changes in the value.
The option's value must be a boolean of the form accepted by
<B><A HREF="../TclLib/GetInt.htm">Tcl_GetBoolean</A></B>.
If the value is false, updates are made continuously as the
slider is dragged.
If the value is true, updates are delayed until the mouse button
is released to end the drag; at that point a single notification
is made (the value ``jumps'' rather than changing smoothly).
<P><DT>Command-Line Name: <B><A NAME="M-justify">-justify</A></B>
<DT>Database Name: <B>justify</B>
<DT>Database Class: <B>Justify</B>
<DD>When there are multiple lines of text displayed in a widget, this
option determines how the lines line up with each other.
Must be one of <B>left</B>, <B>center</B>, or <B>right</B>.
<B>Left</B> means that the lines' left edges all line up, <B>center</B>
means that the lines' centers are aligned, and <B>right</B> means
that the lines' right edges line up.
<P><DT>Command-Line Name: <B><A NAME="M-orient">-orient</A></B>
<DT>Database Name: <B>orient</B>
<DT>Database Class: <B>Orient</B>
<DD>For widgets that can lay themselves out with either a horizontal
or vertical orientation, such as scrollbars, this option specifies
which orientation should be used. Must be either <B>horizontal</B>
or <B>vertical</B> or an abbreviation of one of these.
<P><DT>Command-Line Name: <B><A NAME="M-padx">-padx</A></B>
<DT>Database Name: <B>padX</B>
<DT>Database Class: <B>Pad</B>
<DD>Specifies a non-negative value indicating how much extra space
to request for the widget in the X-direction.
The value may have any of the forms acceptable to <B><A HREF="../TkLib/GetPixels.htm">Tk_GetPixels</A></B>.
When computing how large a window it needs, the widget will
add this amount to the width it would normally need (as determined
by the width of the things displayed in the widget); if the geometry
manager can satisfy this request, the widget will end up with extra
internal space to the left and/or right of what it displays inside.
Most widgets only use this option for padding text: if they are
displaying a bitmap or image, then they usually ignore padding
options.
<P><DT>Command-Line Name: <B><A NAME="M-pady">-pady</A></B>
<DT>Database Name: <B>padY</B>
<DT>Database Class: <B>Pad</B>
<DD>Specifies a non-negative value indicating how much extra space
to request for the widget in the Y-direction.
The value may have any of the forms acceptable to <B><A HREF="../TkLib/GetPixels.htm">Tk_GetPixels</A></B>.
When computing how large a window it needs, the widget will add
this amount to the height it would normally need (as determined by
the height of the things displayed in the widget); if the geometry
manager can satisfy this request, the widget will end up with extra
internal space above and/or below what it displays inside.
Most widgets only use this option for padding text: if they are
displaying a bitmap or image, then they usually ignore padding
options.
<P><DT>Command-Line Name: <B><A NAME="M-relief">-relief</A></B>
<DT>Database Name: <B>relief</B>
<DT>Database Class: <B>Relief</B>
<DD>Specifies the 3-D effect desired for the widget. Acceptable
values are <B>raised</B>, <B>sunken</B>, <B>flat</B>, <B>ridge</B>,
<B>solid</B>, and <B>groove</B>.
The value
indicates how the interior of the widget should appear relative
to its exterior; for example, <B>raised</B> means the interior of
the widget should appear to protrude from the screen, relative to
the exterior of the widget.
<P><DT>Command-Line Name: <B><A NAME="M-repeatdelay">-repeatdelay</A></B>
<DT>Database Name: <B>repeatDelay</B>
<DT>Database Class: <B>RepeatDelay</B>
<DD>Specifies the number of milliseconds a button or key must be held
down before it begins to auto-repeat. Used, for example, on the
up- and down-arrows in scrollbars.
<P><DT>Command-Line Name: <B><A NAME="M-repeatinterval">-repeatinterval</A></B>
<DT>Database Name: <B>repeatInterval</B>
<DT>Database Class: <B>RepeatInterval</B>
<DD>Used in conjunction with <B>repeatDelay</B>: once auto-repeat
begins, this option determines the number of milliseconds between
auto-repeats.
<P><DT>Command-Line Name: <B><A NAME="M-selectbackground">-selectbackground</A></B>
<DT>Database Name: <B>selectBackground</B>
<DT>Database Class: <B>Foreground</B>
<DD>Specifies the background color to use when displaying selected
items.
<P><DT>Command-Line Name: <B><A NAME="M-selectborderwidth">-selectborderwidth</A></B>
<DT>Database Name: <B>selectBorderWidth</B>
<DT>Database Class: <B>BorderWidth</B>
<DD>Specifies a non-negative value indicating the width
of the 3-D border to draw around selected items.
The value may have any of the forms acceptable to <B><A HREF="../TkLib/GetPixels.htm">Tk_GetPixels</A></B>.
<P><DT>Command-Line Name: <B><A NAME="M-selectforeground">-selectforeground</A></B>
<DT>Database Name: <B>selectForeground</B>
<DT>Database Class: <B>Background</B>
<DD>Specifies the foreground color to use when displaying selected
items.
<P><DT>Command-Line Name: <B><A NAME="M-setgrid">-setgrid</A></B>
<DT>Database Name: <B>setGrid</B>
<DT>Database Class: <B>SetGrid</B>
<DD>Specifies a boolean value that determines whether this widget controls the
resizing grid for its top-level window.
This option is typically used in text widgets, where the information
in the widget has a natural size (the size of a character) and it makes
sense for the window's dimensions to be integral numbers of these units.
These natural window sizes form a grid.
If the <B>setGrid</B> option is set to true then the widget will
communicate with the window manager so that when the user interactively
resizes the top-level window that contains the widget, the dimensions of
the window will be displayed to the user in grid units and the window
size will be constrained to integral numbers of grid units.
See the section GRIDDED GEOMETRY MANAGEMENT in the <B><A HREF="../TkCmd/wm.htm">wm</A></B> manual
entry for more details.
<P><DT>Command-Line Name: <B><A NAME="M-takefocus">-takefocus</A></B>
<DT>Database Name: <B>takeFocus</B>
<DT>Database Class: <B>TakeFocus</B>
<DD>Determines whether the window accepts the focus during keyboard
traversal (e.g., Tab and Shift-Tab).
Before setting the focus to a window, the traversal scripts
consult the value of the <B>takeFocus</B> option.
A value of <B>0</B> means that the window should be skipped entirely
during keyboard traversal.
<B>1</B> means that the window should receive the input
focus as long as it is viewable (it and all of its ancestors are mapped).
An empty value for the option means that the traversal scripts make
the decision about whether or not to focus on the window: the current
algorithm is to skip the window if it is
disabled, if it has no key bindings, or if it is not viewable.
If the value has any other form, then the traversal scripts take
the value, append the name of the window to it (with a separator space),
and evaluate the resulting string as a Tcl script.
The script must return <B>0</B>, <B>1</B>, or an empty string: a
<B>0</B> or <B>1</B> value specifies whether the window will receive
the input focus, and an empty string results in the default decision
described above.
Note: this interpretation of the option is defined entirely by
the Tcl scripts that implement traversal: the widget implementations
ignore the option entirely, so you can change its meaning if you
redefine the keyboard traversal scripts.
<P><DT>Command-Line Name: <B><A NAME="M-text">-text</A></B>
<DT>Database Name: <B><A HREF="../TkCmd/text.htm">text</A></B>
<DT>Database Class: <B><A HREF="../TkCmd/text.htm">Text</A></B>
<DD>Specifies a string to be displayed inside the widget. The way in which
the string is displayed depends on the particular widget and may be
determined by other options, such as <B>anchor</B> or <B>justify</B>.
<P><DT>Command-Line Name: <B><A NAME="M-textvariable">-textvariable</A></B>
<DT>Database Name: <B>textVariable</B>
<DT>Database Class: <B><A HREF="../TclCmd/variable.htm">Variable</A></B>
<DD>Specifies the name of a variable. The value of the variable is a text
string to be displayed inside the widget; if the variable value changes
then the widget will automatically update itself to reflect the new value.
The way in which the string is displayed in the widget depends on the
particular widget and may be determined by other options, such as
<B>anchor</B> or <B>justify</B>.
<P><DT>Command-Line Name: <B><A NAME="M-troughcolor">-troughcolor</A></B>
<DT>Database Name: <B>troughColor</B>
<DT>Database Class: <B>Background</B>
<DD>Specifies the color to use for the rectangular trough areas
in widgets such as scrollbars and scales.
<P><DT>Command-Line Name: <B><A NAME="M-underline">-underline</A></B>
<DT>Database Name: <B>underline</B>
<DT>Database Class: <B>Underline</B>
<DD>Specifies the integer index of a character to underline in the widget.
This option is used by the default bindings to implement keyboard
traversal for menu buttons and menu entries.
0 corresponds to the first character of the text displayed in the
widget, 1 to the next character, and so on.
<P><DT>Command-Line Name: <B><A NAME="M-wraplength">-wraplength</A></B>
<DT>Database Name: <B>wrapLength</B>
<DT>Database Class: <B>WrapLength</B>
<DD>For widgets that can perform word-wrapping, this option specifies
the maximum line length.
Lines that would exceed this length are wrapped onto the next line,
so that no line is longer than the specified length.
The value may be specified in any of the standard forms for
screen distances.
If this value is less than or equal to 0 then no wrapping is done: lines
will break only at newline characters in the text.
<P><DT>Command-Line Name: <B><A NAME="M-xscrollcommand">-xscrollcommand</A></B>
<DT>Database Name: <B>xScrollCommand</B>
<DT>Database Class: <B>ScrollCommand</B>
<DD>Specifies the prefix for a command used to communicate with horizontal
scrollbars.
When the view in the widget's window changes (or
whenever anything else occurs that could change the display in a
scrollbar, such as a change in the total size of the widget's
contents), the widget will
generate a Tcl command by concatenating the scroll command and
two numbers.
Each of the numbers is a fraction between 0 and 1, which indicates
a position in the document. 0 indicates the beginning of the document,
1 indicates the end, .333 indicates a position one third the way through
the document, and so on.
The first fraction indicates the first information in the document
that is visible in the window, and the second fraction indicates
the information just after the last portion that is visible.
The command is
then passed to the Tcl interpreter for execution. Typically the
<B>xScrollCommand</B> option consists of the path name of a scrollbar
widget followed by ``set'', e.g. ``.x.scrollbar set'': this will cause
the scrollbar to be updated whenever the view in the window changes.
If this option is not specified, then no command will be executed.
<P><DT>Command-Line Name: <B><A NAME="M-yscrollcommand">-yscrollcommand</A></B>
<DT>Database Name: <B>yScrollCommand</B>
<DT>Database Class: <B>ScrollCommand</B>
<DD>Specifies the prefix for a command used to communicate with vertical
scrollbars. This option is treated in the same way as the
<B>xScrollCommand</B> option, except that it is used for vertical
scrollbars and is provided by widgets that support vertical scrolling.
See the description of <B>xScrollCommand</B> for details
on how this option is used.
</DL>
<H3><A NAME="M4">KEYWORDS</A></H3>
<A href="../Keywords/C.htm#class">class</A>, <A href="../Keywords/N.htm#name">name</A>, <A href="../Keywords/S.htm#standard option">standard option</A>, <A href="../Keywords/S.htm#switch">switch</A>
<HR><PRE>
<A HREF="../copyright.htm">Copyright</A> &#169; 1990-1994 The Regents of the University of California.
<A HREF="../copyright.htm">Copyright</A> &#169; 1994-1996 Sun Microsystems, Inc.
<A HREF="../copyright.htm">Copyright</A> &#169; 1995-1997 Roger E. Critchlow Jr.</PRE>
</BODY></HTML>

339
hlp/en/projman/gpl.en Normal file
View File

@ -0,0 +1,339 @@
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
675 Mass Ave, Cambridge, MA 02139, 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 Library 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) 19yy <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., 675 Mass Ave, Cambridge, MA 02139, 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) 19yy 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 Library General
Public License instead of this License.

View File

@ -0,0 +1,15 @@
<TITLE>About Tcl/Tk Project Manager</TITLE>
<center><h1>Tcl/Tk Project Manager</h1></center>
<p>Author: Sergey Kalinin (aka BanZaj) <a href="mailto:banzaj@lrn.ru">banzaj@lrn.ru</a>
<br>Home page: <a href="http://conero.lrn.ru">http://conero.lrn.ru</a>
<p>Tcl/Tk Project Manager is a full IDE for programming in TCL/Tk.
It includes a project and file manager, a source editor with
syntax highlighting and procedure navigation, a context-sensitive
help system, and much more. Included TkDIFF+ - compare tools and TkREGEXP - a graphical front-end to write/debug regular expression.
<br>Working an Unix (Linux tested) and Windows.
<p><center>&copy; Copyright <a href="http://conero.lrn.ru">CONERO lab</a>, 2002

View File

@ -0,0 +1,14 @@
<TITLE>Begin work</TITLE>
<CENTER><h1>Begin work with ProjMan</h1></center>
<p>CREAT NEW PROJECT
<p>Select "New project" for creation new project or "Open project" for opened existing project into "Projects" menu.
<p>SET ACTIVE PROJECT
<p>All operation with projects into ProjMan implemented only active project.
Click mouse on project name in tree for set active project.
Name of current (active) project You will see into status bar.
<p>DELETING PROJECT
<p>For deleting project You must select "Delete project" into "Projects" menu.
<p>EDITING FILE
<p>For editing file click twice on file name into tree.

View File

@ -0,0 +1,3 @@
<TITLE>Help system</TITLE>
<CENTER><h1>Help system manual</h1></center>
<p>Needed translate from russian language!

View File

@ -0,0 +1,34 @@
<TITLE>Hot keys</TITLE>
<center><h1>Hot keys</h1></center>
<p><b>Ctrl + A</b> - Saved file eith different name
<p><b>Ctrl + C</b> - Copy selected text into clipboard.
<p><b>Ctrl + F</b> - Search words into text.
<p><b>Ctrl + G</b> - Goto line with number
<p><b>Ctrl + J</b> - Get procedure list
<p><b>Ctrl + L</b> - Get word list
<p><b>Ctrl + M</b> - Switch editors open tabs
<p><b>Ctrl + N</b> - Create new file
<p><b>Ctrl + O</b> - Opened existing file.
<p><b>Ctrl + Q</b> - Quit from Project Manager.
<p><b>Ctrl + R</b> - Find and replacement words into text.
<p><b>Ctrl + S</b> - Saved current opened file.
<p><b>Ctrl + T</b> - Reverses the order of the two characters to the right of the insertion cursor
<p><b>Ctrl + U</b> - Jump cursor on open/close bracked
<p><b>Ctrl + V</b> - Insert text from clipboard
<p><b>Ctrl + W</b> - Close current opened file.
<p><b>Ctrl + X</b> - Cut selected text into clipboard.
<p><b>Ctrl + Z</b> - Undo last operation
<p><b>Ctrl + /</b> - Selects the entire contents of the widget
<p><b>Ctrl + \\</b> - Clears any selection in the widget
<p><b>F1</b> - Execute context-sensitive help system
<p><b>F3</b> - Repeat search
<p><b>F5</b> - Make archive. Workined with active project only.
<p><b>F6</b> - Make RPM
<p><b>F9</b> - Run current project.

View File

@ -0,0 +1,81 @@
<title>VisualREGEXP</title>
<center><h1>VisualREGEXP</h1>
<p>Copyright (c) 2000-2001 Laurent Riesterer
<br>Latest version 2.2</center>
<p><b>ABOUT</b>
<p>VisualREGEXP helps you to design, debug or more generally work with regular
expression. As it is often difficult to write the right regexp at the first
try, this tool will show you the effect of your regexp on a sample you can
choose.
<p><b>REQUIREMENTS</b>
<p>This program requires Tcl/Tk 8.3.0 or later.
<p><b>HOW TO USE</b>
<p><b>Launching the program</b>
<p>On Unix, use 'chmod +x ...' to make the program executable. You can then
integrate it with your Window Manager or put it into an executable path.
<br>On Windows, create a shortcut and invoke the script with 'wish.exe'
<p><b>Design of regexps</b>
<p>To design regexp, just type the expression in the top text widget.
Press the 'Go' button to highlight the matched part of the text in the sample
text widget.
<p>To get a quickref of the regexp syntax use the menu 'View/Show regexp help'.
<p>You can specify some options using the checkboxes (please read Tcl help to
learn the meaning of these options).
<p><b>Recursive design of regexps</b>
<p>Sometimes you will need more than one step to extract the information you want
from the sample. For example, imagine you want to retrieve information from
an HTML table inside an another HTML table :
'<html><body>
<table border=1>
<tr><td>
<table bgcolor="#FFFF00" border=1>
<tr> <td>One</td> <td>1</td> </tr>
<tr> <td>Two</td> <td>2</td> </tr>
</table>
<tr> <td>Foo</td> <td>Bar</td> </tr>
</table>
</body></html>'
<p>You cannot use one global regexp to extract the two lines "One 1" and "Two 2".
You have to use a first regexp to narrow the processed region.
Type the following regexp '<table bg[^>]*?>(.*?)<table>' and press 'Go'.
You see now that the interessing area is shown in blue. Press the Match '1'
button which will extract the blue text (the regexp to use to get this text
is then printed on the console).
Now use '<td>(.*?)</td>.*?<td>(.*?)</td>' to get the information you need.
<p><b>Optimization of regexps</b>
<p>When you need to match a list of words, use the menu
'Insert regexp/Make regexp' to design an optimized version of the word list.
<p>For example, the list 'aa aab ab ad' is optimized into 'a(ab?|b|d)'.
<p><b>Processing the sample text</b>
<p>Use can use VisualREGEXP to perform modification of a text.
Just use the menu 'Select mode/Use replace'. You can now design a regexp to
match what you want. Then use the replace text widget to enter the substitution
you want to apply (use \0, \1, \2, ... to match the subregexp, use the color
to map the number with the matched sub-expressions).
<p>After the substitution, you can save the new text using the 'File/Save ...'
menu. You can let the program choose the end-of-line format or force them for
a specific environment (Unix, Windows, Mac).
<p><b>CONTACT</b>
<p>Send your bug reports, suggestions or any feedback to:
<dir>
<p><a href="mailto:laurent.riesterer@free.fr">laurent.riesterer@free.fr</a><br>
<a href="http://laurent.riesterer.free.fr">http://laurent.riesterer.free.fr</a>
</dir>

View File

@ -0,0 +1,108 @@
<title>TkDIFF+</title>
<center><h1>TkDIFF+</h1></center>
<p>The top row contains the File, Edit, View, Mark, Merge and Help menus. The second row contains the labels which identify the contents of each text window. Below that is a toolbar which contains navigation and merge selection tools.
<p>The left-most text widget displays the contents of FILE1, the most recently checked-in revision, REV or REV1, respectively (as per the startup options described in the "On Command Line" help). The right-most widget displays the contents of FILE2, FILE or REV2, respectively. Clicking the right mouse button over either of these windows will give you a context sensitive menu with actions that will act on the window you clicked over. For example, if you click right over the right hand window and select "Edit", the file displayed on the right hand side will be loaded into a text editor.
<p>At the bottom of the display is a two line window called the "Line Comparison" window. This will show the "current line" from the left and right windows, one on top of the other. The "current line" is defined by the line that has the blinking insertion cursor, which can be set by merely clicking on any line in the display. This window may be hidden if the View menu item Show Line Comparison is deselected.
<p>All difference regions (DRs) are highlighted to set them apart from the surrounding text. The current difference region, or CDR, is further set apart so that it can be correlated to its partner in the other text widget (that is, the CDR on the left matches the CDR on the right).
<p>Changing the CDR
<p>The CDR can be changed in a sequential manner by means of the Next and Previous buttons. The First and Last buttons allow you to quickly navigate to the first or last CDR, respectively. For random access to the DRs, use the dropdown listbox in the toolbar or the diff map, described below.
<p>By clicking right over a window and using the popup menu you can select Find Nearest Diff to find the diff record nearest the point where you clicked.
<p>You may also select any highlighted diff region as the current diff region by double-clicking on it.
<p>Operations
<p>1. From the File menu:
<p>The New... button displays a dialog where you may choose two files to compare. Selecting "Ok" from the dialog will diff the two files. The Recompute Diffs button recomputes the differences between the two files whose names appear at the top of the TkDiff window. The Write Report... lets you create a report file that contains the information visible in the windows. Lastly, the Exit button terminates TkDiff.
<p>2. From the Edit menu:
<p>Copy copies the currently selected text to the system clipboard. Find pops up a dialog to let you search either text window for a specified text string. Edit File 1 and Edit File 2 launch an editor on the files displayed in the left- and right-hand panes. Preferences pops up a dialog box from which display (and other) options can be
changed and saved.
<p>3. From the View menu:
<p>Show Line Numbers toggles the display of line numbers in the text widgets. If Synchronize Scrollbars is on, the left and right text widgets are synchronized i.e. scrolling one of the windows scrolls the other. If Auto Center is on, pressing the Next or Prev buttons centers the new CDR automatically. Show Diff Map toggles the display of the diff map (see below) on or off. Show Merge Preview shows or hides the merge preview (see below). Show Line Comparison toggles the display of the "line comparison" window at the bottom of the display.
<p>4. From the Mark menu:
The Mark Current Diff creates a new toolbar button that will jump to the current diff region. The Clear Current Diff Mark will remove the toolbar mark button associated with the current diff region, if one exists.
<p>5. From the Merge menu:
The Show Merge Window button pops up a window with the current merged version of the two files. The Write Merge File button will allow you to save the contents of that window to a file.
<p>6. From the Help menu:
The About TkDiff button displays copyright and author information. The On GUI button generates this window. The On Command Line button displays help on the TkDiff command line options. The On Preferences button displays help on the user-settable preferences.
<p>7. From the toolbar:
The first tool is a dropdown list of all of the differences in a standard diff-type format. You may use this list to go directly to any diff record. The Next and Previous buttons take you to the "next" and "previous" DR, respectively. The First and Last buttons take you to the "first" and "last" DR. The Center button centers the CDRs in their respective text windows. You can set Auto Center in Preferences to do this automatically for you as you navigate through the diff records.
<p>Keyboard Navigation
<p>When a text widget has the focus, you may use the following shortcut keys:
<dir>
f First diff
c Center current diff
l Last diff
n Next diff
p Previous diff
1 Merge Choice 1
2 Merge Choice 2
u Switch back to directories view
</dir>
<p>The cursor, Home, End, PageUp and PageDown keys work as expected, adjusting the view in whichever text window has the focus. Note that if Synchronize Scrollbars is set in Preferences, both windows will scroll at the same time.
<p>Scrolling
<p>To scroll the text widgets independently, make sure Synchronize Scrollbars in Preferences is off. If it is on, scrolling any text widget scrolls all others. Scrolling does not change the current diff record (CDR).
<p>Diff Marks
<p>You can set "markers" at specific diff regions for easier navigation. To do this, click on the Set Mark button. It will create a new toolbar button that will jump back to this diff region. To clear a diff mark, go to that diff record and click on the Clear Mark button.
<p>Diff Map
<p>The diff map is a map of all the diff regions. It is shown in the middle of the main window if "Diff Map" on the View menu is on. The map is a miniature of the file's diff regions from top to bottom. Each diff region is rendered as a patch of color, Delete as red, Insert as green and Change as blue. In the case of a 3-way merge, overlap regions are marked in yellow. The height of each patch corresponds to the relative size of the diff region. A thumb lets you interact with the map as if it were a scrollbar.
All diff regions are drawn on the map even if too small to be visible. For large files with small diff regions, this may result in patches overwriting each other.
<p>Merging
<p>To merge the two files, go through the difference regions (via "Next", "Prev" or whatever other means you prefer) and select "Left" or "Right" (next to the "Merge Choice:" label) for each. Selecting "Left" means that the the left-most file's version of the difference will be used in creating the final result; choosing "Right" means that the right-most file's difference will be used. Each choice is recorded, and can be changed arbitrarily many times. To commit the final, merged result to disk, choose "Write Merge File..." from the Merge menu.
<p>Merge Preview
<p>To see a preview of the file that would be written by "Write Merge File...", select "Show Merge Window" in the View menu. A separate window is shown containing the preview. It is updated as you change merge choices. It is synchronized with the other text widgets if "Synchronize Scrollbars" is on.
<p>Credits
<p>Thanks to Wayne Throop for beta testing, and for giving valuable suggestions (and code!) along the way. Thanks (and credit) to John Heidemann for his window tags routines, which I shamelessly stole (with permission) out of his great Tk-based Solitaire game, Klondike. Thanks to D. Elson (author of tkCVS) for writing the code that extends the RCS support to include CVS. Thanks to John Brown for writing the code that extends the revision control support to SCCS.
<p>Major thanks to Warren Jones (wjones@tc.fluke.com) and Peter Brandstrom (qraprbm@era-lvk.ericsson.se) for going way above and beyond the call. Warren added support for NT and cleaned up the Unix code as well. Peter, independently, did the same thing and then added the new interface. The end result was the 2.x series... Many, many thanks to you both!
<p>Major thanks also to Bryan Oakley (boakley@vignette.com), who made the GUI even more appealing... Bryan did a ton of work, the result of which was the 3.x series. Dorothy Robinson provided helpful comments and patches for 3.x, too. Thanks, Bryan and Dorothy!
<p>Thanks to Dean Jones (dean@gallant.com) for permission to use his icons in the toolbar.
<p>Thanks to Laurent Riesterer (laurent.riesterer@free.fr) for adding support to display the differences between files in directories.
<p>Many, many thanks also to the many others who have written and provided ideas and encouragement and code since TkDiff was first released! I haven't done much coding since the 1.x series; almost every new feature that has come about since then has been the result of volunteer efforts. Thanks, folks!
<p>Author
<br>John M. Klassa
<p>Comments
<p>Questions and comments should be sent to the TkDiff mailing list at
<a href="http://www.accurev.com/free/tkdiff">http://www.accurev.com/free/tkdiff</a>.
<p>To get it, please visit:
<br><a href="http://www.gnu.org/gnulist/production/diffutils.html">http://www.gnu.org/gnulist/production/diffutils.html

View File

@ -0,0 +1,12 @@
<title>Tcl/Tk Project Manager</title>
<a href="pmabout.html">About</a><br>
<a href="pmbegin.html">Working with projman</a><br>
<a href="pmhelp.html">Help system</a> <br>
<a href="pmregexp.html">Working with VisualREGEXP</a><br>
<a href="pmtkdiff.html">Working with TkDIFF+</a><br>
<a href="pmkeys.html">Hot keys</a><br>
<a href="gpl.en">License</a><br>

194
hlp/en/tcl/Tcl.htm Normal file
View File

@ -0,0 +1,194 @@
<HTML><HEAD><TITLE>Tcl Built-In Commands - Tcl manual page</TITLE></HEAD><BODY>
<DL>
<DD><A HREF="Tcl.htm#M2" NAME="L2">NAME</A>
<DL><DD>Tcl - Summary of Tcl language syntax.</DL>
<DD><A HREF="Tcl.htm#M3" NAME="L3">DESCRIPTION</A>
<DL>
<DL>
<DD><A HREF="Tcl.htm#M4" NAME="L4"><B>$</B><I>name</I></A>
<DD><A HREF="Tcl.htm#M5" NAME="L5"><B>$</B><I>name</I><B>(</B><I>index</I><B>)</B></A>
<DD><A HREF="Tcl.htm#M6" NAME="L6"><B>${</B><I>name</I><B>}</B></A>
</DL>
<DL>
<DD><A HREF="Tcl.htm#M7" NAME="L7">&#92;<B>a</B></A>
<DD><A HREF="Tcl.htm#M8" NAME="L8">&#92;<B>b</B></A>
<DD><A HREF="Tcl.htm#M9" NAME="L9">&#92;<B>f</B></A>
<DD><A HREF="Tcl.htm#M10" NAME="L10">&#92;<B>n</B></A>
<DD><A HREF="Tcl.htm#M11" NAME="L11">&#92;<B>r</B></A>
<DD><A HREF="Tcl.htm#M12" NAME="L12">&#92;<B>t</B></A>
<DD><A HREF="Tcl.htm#M13" NAME="L13">&#92;<B>v</B></A>
<DD><A HREF="Tcl.htm#M14" NAME="L14">&#92;<B>&lt;newline&gt;</B><I>whiteSpace</I></A>
<DD><A HREF="Tcl.htm#M15" NAME="L15">&#92;&#92;</A>
<DD><A HREF="Tcl.htm#M16" NAME="L16">&#92;<I>ooo</I></A>
<DD><A HREF="Tcl.htm#M17" NAME="L17">&#92;<B>x</B><I>hh</I></A>
<DD><A HREF="Tcl.htm#M18" NAME="L18">&#92;<B>u</B><I>hhhh</I></A>
</DL>
</DL>
</DL><HR>
<H3><A NAME="M2">NAME</A></H3>
Tcl - Summary of Tcl language syntax.
<H3><A NAME="M3">DESCRIPTION</A></H3>
The following rules define the syntax and semantics of the Tcl language:
<P>
<DL>
<P><DT>[1]<DD>
A Tcl script is a string containing one or more commands.
Semi-colons and newlines are command separators unless quoted as
described below.
Close brackets are command terminators during command substitution
(see below) unless quoted.
<P><DT>[2]<DD>
A command is evaluated in two steps.
First, the Tcl interpreter breaks the command into <I>words</I>
and performs substitutions as described below.
These substitutions are performed in the same way for all
commands.
The first word is used to locate a command procedure to
carry out the command, then all of the words of the command are
passed to the command procedure.
The command procedure is free to interpret each of its words
in any way it likes, such as an integer, variable name, list,
or Tcl script.
Different commands interpret their words differently.
<P><DT>[3]<DD>
Words of a command are separated by white space (except for
newlines, which are command separators).
<P><DT>[4]<DD>
If the first character of a word is double-quote (``&quot;'') then
the word is terminated by the next double-quote character.
If semi-colons, close brackets, or white space characters
(including newlines) appear between the quotes then they are treated
as ordinary characters and included in the word.
Command substitution, variable substitution, and backslash substitution
are performed on the characters between the quotes as described below.
The double-quotes are not retained as part of the word.
<P><DT>[5]<DD>
If the first character of a word is an open brace (``{'') then
the word is terminated by the matching close brace (``}'').
Braces nest within the word: for each additional open
brace there must be an additional close brace (however,
if an open brace or close brace within the word is
quoted with a backslash then it is not counted in locating the
matching close brace).
No substitutions are performed on the characters between the
braces except for backslash-newline substitutions described
below, nor do semi-colons, newlines, close brackets,
or white space receive any special interpretation.
The word will consist of exactly the characters between the
outer braces, not including the braces themselves.
<P><DT>[6]<DD>
If a word contains an open bracket (``['') then Tcl performs
<I>command substitution</I>.
To do this it invokes the Tcl interpreter recursively to process
the characters following the open bracket as a Tcl script.
The script may contain any number of commands and must be terminated
by a close bracket (``]'').
The result of the script (i.e. the result of its last command) is
substituted into the word in place of the brackets and all of the
characters between them.
There may be any number of command substitutions in a single word.
Command substitution is not performed on words enclosed in braces.
<P><DT>[7]<DD>
If a word contains a dollar-sign (``$'') then Tcl performs <I>variable
substitution</I>: the dollar-sign and the following characters are
replaced in the word by the value of a variable.
Variable substitution may take any of the following forms:
<P>
<DL>
<P><DT><A NAME="M4"><B>$</B><I>name</I></A><DD>
<I>Name</I> is the name of a scalar variable; the name is terminated
by any character that isn't a letter, digit, or underscore.
<P><DT><A NAME="M5"><B>$</B><I>name</I><B>(</B><I>index</I><B>)</B></A><DD>
<I>Name</I> gives the name of an array variable and <I>index</I> gives
the name of an element within that array.
<I>Name</I> must contain only letters, digits, and underscores.
Command substitutions, variable substitutions, and backslash
substitutions are performed on the characters of <I>index</I>.
<P><DT><A NAME="M6"><B>${</B><I>name</I><B>}</B></A><DD>
<I>Name</I> is the name of a scalar variable. It may contain any
characters whatsoever except for close braces.
</DL><P>There may be any number of variable substitutions in a single word.
Variable substitution is not performed on words enclosed in braces.<DL>
<P></DL>
<P><DT>[8]<DD>
If a backslash (``&#92;'') appears within a word then
<I>backslash substitution</I> occurs.
In all cases but those described below the backslash is dropped and
the following character is treated as an ordinary
character and included in the word.
This allows characters such as double quotes, close brackets,
and dollar signs to be included in words without triggering
special processing.
The following table lists the backslash sequences that are
handled specially, along with the value that replaces each sequence.
<P>
<DL>
<P><DT><A NAME="M7">&#92;<B>a</B></A><DD>
Audible alert (bell) (0x7).
<P><DT><A NAME="M8">&#92;<B>b</B></A><DD>
Backspace (0x8).
<P><DT><A NAME="M9">&#92;<B>f</B></A><DD>
Form feed (0xc).
<P><DT><A NAME="M10">&#92;<B>n</B></A><DD>
Newline (0xa).
<P><DT><A NAME="M11">&#92;<B>r</B></A><DD>
Carriage-return (0xd).
<P><DT><A NAME="M12">&#92;<B>t</B></A><DD>
Tab (0x9).
<P><DT><A NAME="M13">&#92;<B>v</B></A><DD>
Vertical tab (0xb).
<P><DT><A NAME="M14">&#92;<B>&lt;newline&gt;</B><I>whiteSpace</I></A><DD>
A single space character replaces the backslash, newline, and all spaces
and tabs after the newline. This backslash sequence is unique in that it
is replaced in a separate pre-pass before the command is actually parsed.
This means that it will be replaced even when it occurs between braces,
and the resulting space will be treated as a word separator if it isn't
in braces or quotes.
<P><DT><A NAME="M15">&#92;&#92;</A><DD>
Backslash (``&#92;'').
<P><DT><A NAME="M16">&#92;<I>ooo</I></A><DD>
The digits <I>ooo</I> (one, two, or three of them) give an eight-bit octal
value for the Unicode character that will be inserted. The upper bits of the
Unicode character will be 0.
<P><DT><A NAME="M17">&#92;<B>x</B><I>hh</I></A><DD>
The hexadecimal digits <I>hh</I> give an eight-bit hexadecimal value for the
Unicode character that will be inserted. Any number of hexadecimal digits
may be present; however, all but the last two are ignored (the result is
always a one-byte quantity). The upper bits of the Unicode character will
be 0.
<P><DT><A NAME="M18">&#92;<B>u</B><I>hhhh</I></A><DD>
The hexadecimal digits <I>hhhh</I> (one, two, three, or four of them) give a
sixteen-bit hexadecimal value for the Unicode character that will be
inserted.
</DL><P>Backslash substitution is not performed on words enclosed in braces,
except for backslash-newline as described above.<DL>
<P></DL>
<P><DT>[9]<DD>
If a hash character (``#'') appears at a point where Tcl is
expecting the first character of the first word of a command,
then the hash character and the characters that follow it, up
through the next newline, are treated as a comment and ignored.
The comment character only has significance when it appears
at the beginning of a command.
<P><DT>[10]<DD>
Each character is processed exactly once by the Tcl interpreter
as part of creating the words of a command.
For example, if variable substitution occurs then no further
substitutions are performed on the value of the variable; the
value is inserted into the word verbatim.
If command substitution occurs then the nested command is
processed entirely by the recursive call to the Tcl interpreter;
no substitutions are performed before making the recursive
call and no additional substitutions are performed on the result
of the nested script.
<P><DT>[11]<DD>
Substitutions do not affect the word boundaries of a command.
For example, during variable substitution the entire value of
the variable becomes part of a single word, even if the variable's
value contains spaces.
<P></DL>
<HR><PRE>
<A HREF="../copyright.htm">Copyright</A> &#169; 1993 The Regents of the University of California.
<A HREF="../copyright.htm">Copyright</A> &#169; 1994-1996 Sun Microsystems, Inc.
<A HREF="../copyright.htm">Copyright</A> &#169; 1995-1997 Roger E. Critchlow Jr.</PRE>
</BODY></HTML>

114
hlp/en/tcl/after.htm Normal file
View File

@ -0,0 +1,114 @@
<HTML><HEAD><TITLE>Tcl Built-In Commands - after manual page</TITLE></HEAD><BODY>
<DL>
<DD><A HREF="after.htm#M2" NAME="L19">NAME</A>
<DL><DD>after - Execute a command after a time delay</DL>
<DD><A HREF="after.htm#M3" NAME="L20">SYNOPSIS</A>
<DL>
<DD><B>after </B><I>ms</I>
<DD><B>after </B><I>ms </I>?<I>script script script ...</I>?
<DD><B>after cancel </B><I>id</I>
<DD><B>after cancel </B><I>script script script ...</I>
<DD><B>after idle </B>?<I>script script script ...</I>?
<DD><B>after info </B>?<I>id</I>?
</DL>
<DD><A HREF="after.htm#M4" NAME="L21">DESCRIPTION</A>
<DL>
<DD><A HREF="after.htm#M5" NAME="L22"><B>after </B><I>ms</I></A>
<DD><A HREF="after.htm#M6" NAME="L23"><B>after </B><I>ms </I>?<I>script script script ...</I>?</A>
<DD><A HREF="after.htm#M7" NAME="L24"><B>after cancel </B><I>id</I></A>
<DD><A HREF="after.htm#M8" NAME="L25"><B>after cancel </B><I>script script ...</I></A>
<DD><A HREF="after.htm#M9" NAME="L26"><B>after idle </B><I>script </I>?<I>script script ...</I>?</A>
<DD><A HREF="after.htm#M10" NAME="L27"><B>after info </B>?<I>id</I>?</A>
</DL>
<DD><A HREF="after.htm#M11" NAME="L28">SEE ALSO</A>
<DD><A HREF="after.htm#M12" NAME="L29">KEYWORDS</A>
</DL><HR>
<H3><A NAME="M2">NAME</A></H3>
after - Execute a command after a time delay
<H3><A NAME="M3">SYNOPSIS</A></H3>
<B>after </B><I>ms</I><BR>
<B>after </B><I>ms </I>?<I>script script script ...</I>?<BR>
<B>after cancel </B><I>id</I><BR>
<B>after cancel </B><I>script script script ...</I><BR>
<B>after idle </B>?<I>script script script ...</I>?<BR>
<B>after info </B>?<I>id</I>?<BR>
<H3><A NAME="M4">DESCRIPTION</A></H3>
This command is used to delay execution of the program or to execute
a command in background sometime in the future. It has several forms,
depending on the first argument to the command:
<P>
<DL>
<P><DT><A NAME="M5"><B>after </B><I>ms</I></A><DD>
<I>Ms</I> must be an integer giving a time in milliseconds.
The command sleeps for <I>ms</I> milliseconds and then returns.
While the command is sleeping the application does not respond to
events.
<P><DT><A NAME="M6"><B>after </B><I>ms </I>?<I>script script script ...</I>?</A><DD>
In this form the command returns immediately, but it arranges
for a Tcl command to be executed <I>ms</I> milliseconds later as an
event handler.
The command will be executed exactly once, at the given time.
The delayed command is formed by concatenating all the <I>script</I>
arguments in the same fashion as the <B><A HREF="../TkCmd/concat.htm">concat</A></B> command.
The command will be executed at global level (outside the context
of any Tcl procedure).
If an error occurs while executing the delayed command then the
<B><A HREF="../TkCmd/bgerror.htm">bgerror</A></B> mechanism is used to report the error.
The <B>after</B> command returns an identifier that can be used
to cancel the delayed command using <B>after cancel</B>.
<P><DT><A NAME="M7"><B>after cancel </B><I>id</I></A><DD>
Cancels the execution of a delayed command that
was previously scheduled.
<I>Id</I> indicates which command should be canceled; it must have
been the return value from a previous <B>after</B> command.
If the command given by <I>id</I> has already been executed then
the <B>after cancel</B> command has no effect.
<P><DT><A NAME="M8"><B>after cancel </B><I>script script ...</I></A><DD>
This command also cancels the execution of a delayed command.
The <I>script</I> arguments are concatenated together with space
separators (just as in the <B><A HREF="../TkCmd/concat.htm">concat</A></B> command).
If there is a pending command that matches the string, it is
cancelled and will never be executed; if no such command is
currently pending then the <B>after cancel</B> command has no effect.
<P><DT><A NAME="M9"><B>after idle </B><I>script </I>?<I>script script ...</I>?</A><DD>
Concatenates the <I>script</I> arguments together with space
separators (just as in the <B><A HREF="../TkCmd/concat.htm">concat</A></B> command), and arranges
for the resulting script to be evaluated later as an idle callback.
The script will be run exactly once, the next time the event
loop is entered and there are no events to process.
The command returns an identifier that can be used
to cancel the delayed command using <B>after cancel</B>.
If an error occurs while executing the script then the
<B><A HREF="../TkCmd/bgerror.htm">bgerror</A></B> mechanism is used to report the error.
<P><DT><A NAME="M10"><B>after info </B>?<I>id</I>?</A><DD>
This command returns information about existing event handlers.
If no <I>id</I> argument is supplied, the command returns
a list of the identifiers for all existing
event handlers created by the <B>after</B> command for this
interpreter.
If <I>id</I> is supplied, it specifies an existing handler;
<I>id</I> must have been the return value from some previous call
to <B>after</B> and it must not have triggered yet or been cancelled.
In this case the command returns a list with two elements.
The first element of the list is the script associated
with <I>id</I>, and the second element is either
<B>idle</B> or <B>timer</B> to indicate what kind of event
handler it is.
<P></DL>
<P>
The <B>after </B><I>ms</I> and <B>after idle</B> forms of the command
assume that the application is event driven: the delayed commands
will not be executed unless the application enters the event loop.
In applications that are not normally event-driven, such as
<B><A HREF="../UserCmd/tclsh.htm">tclsh</A></B>, the event loop can be entered with the <B><A HREF="../TkCmd/vwait.htm">vwait</A></B>
and <B><A HREF="../TkCmd/update.htm">update</A></B> commands.
<H3><A NAME="M11">SEE ALSO</A></H3>
<B><A HREF="../TkCmd/bgerror.htm">bgerror</A></B>, <B><A HREF="../TkCmd/concat.htm">concat</A></B>, <B><A HREF="../TkCmd/update.htm">update</A></B>, <B><A HREF="../TkCmd/vwait.htm">vwait</A></B>
<H3><A NAME="M12">KEYWORDS</A></H3>
<A href="../Keywords/C.htm#cancel">cancel</A>, <A href="../Keywords/D.htm#delay">delay</A>, <A href="../Keywords/I.htm#idle callback">idle callback</A>, <A href="../Keywords/S.htm#sleep">sleep</A>, <A href="../Keywords/T.htm#time">time</A>
<HR><PRE>
<A HREF="../copyright.htm">Copyright</A> &#169; 1990-1994 The Regents of the University of California.
<A HREF="../copyright.htm">Copyright</A> &#169; 1994-1996 Sun Microsystems, Inc.
<A HREF="../copyright.htm">Copyright</A> &#169; 1995-1997 Roger E. Critchlow Jr.</PRE>
</BODY></HTML>

24
hlp/en/tcl/append.htm Normal file
View File

@ -0,0 +1,24 @@
<HTML><HEAD><TITLE>Built-In Commands - append manual page</TITLE></HEAD><BODY>
<H3><A NAME="M2">NAME</A></H3>
append - Append to variable
<H3><A NAME="M3">SYNOPSIS</A></H3>
<B>append </B><I>varName </I>?<I>value value value ...</I>?<BR>
<H3><A NAME="M4">DESCRIPTION</A></H3>
Append all of the <I>value</I> arguments to the current value
of variable <I>varName</I>. If <I>varName</I> doesn't exist,
it is given a value equal to the concatenation of all the
<I>value</I> arguments.
This command provides an efficient way to build up long
variables incrementally.
For example, ``<B>append a $b</B>'' is much more efficient than
``<B>set a $a$b</B>'' if <B>$a</B> is long.
<H3><A NAME="M5">SEE ALSO</A></H3>
<B><A HREF="../TkCmd/concat.htm">concat</A></B>, <B><A HREF="../TkCmd/lappend.htm">lappend</A></B>
<H3><A NAME="M6">KEYWORDS</A></H3>
<A href="../Keywords/A.htm#append">append</A>, <A href="../Keywords/V.htm#variable">variable</A>
<HR><PRE>
<A HREF="../copyright.htm">Copyright</A> &#169; 1993 The Regents of the University of California.
<A HREF="../copyright.htm">Copyright</A> &#169; 1994-1996 Sun Microsystems, Inc.
<A HREF="../copyright.htm">Copyright</A> &#169; 1995-1997 Roger E. Critchlow Jr.</PRE>
</BODY></HTML>

128
hlp/en/tcl/array.htm Normal file
View File

@ -0,0 +1,128 @@
<HTML><HEAD><TITLE>Tcl Built-In Commands - array manual page</TITLE></HEAD><BODY>
<DL>
<DD><A HREF="array.htm#M2" NAME="L35">NAME</A>
<DL><DD>array - Manipulate array variables</DL>
<DD><A HREF="array.htm#M3" NAME="L36">SYNOPSIS</A>
<DL>
<DD><B>array </B><I>option arrayName</I> ?<I>arg arg ...</I>?
</DL>
<DD><A HREF="array.htm#M4" NAME="L37">DESCRIPTION</A>
<DL>
<DD><A HREF="array.htm#M5" NAME="L38"><B>array anymore </B><I>arrayName searchId</I></A>
<DD><A HREF="array.htm#M6" NAME="L39"><B>array donesearch </B><I>arrayName searchId</I></A>
<DD><A HREF="array.htm#M7" NAME="L40"><B>array exists </B><I>arrayName</I></A>
<DD><A HREF="array.htm#M8" NAME="L41"><B>array get </B><I>arrayName</I> ?<I>pattern</I>?</A>
<DD><A HREF="array.htm#M9" NAME="L42"><B>array names </B><I>arrayName</I> ?<I>pattern</I>?</A>
<DD><A HREF="array.htm#M10" NAME="L43"><B>array nextelement </B><I>arrayName searchId</I></A>
<DD><A HREF="array.htm#M11" NAME="L44"><B>array set </B><I>arrayName list</I></A>
<DD><A HREF="array.htm#M12" NAME="L45"><B>array size </B><I>arrayName</I></A>
<DD><A HREF="array.htm#M13" NAME="L46"><B>array startsearch </B><I>arrayName</I></A>
<DD><A HREF="array.htm#M14" NAME="L47"><B>array unset </B><I>arrayName</I> ?<I>pattern</I>?</A>
</DL>
<DD><A HREF="array.htm#M15" NAME="L48">KEYWORDS</A>
</DL><HR>
<H3><A NAME="M2">NAME</A></H3>
array - Manipulate array variables
<H3><A NAME="M3">SYNOPSIS</A></H3>
<B>array </B><I>option arrayName</I> ?<I>arg arg ...</I>?<BR>
<H3><A NAME="M4">DESCRIPTION</A></H3>
This command performs one of several operations on the
variable given by <I>arrayName</I>.
Unless otherwise specified for individual commands below,
<I>arrayName</I> must be the name of an existing array variable.
The <I>option</I> argument determines what action is carried
out by the command.
The legal <I>options</I> (which may be abbreviated) are:
<P>
<DL>
<P><DT><A NAME="M5"><B>array anymore </B><I>arrayName searchId</I></A><DD>
Returns 1 if there are any more elements left to be processed
in an array search, 0 if all elements have already been
returned.
<I>SearchId</I> indicates which search on <I>arrayName</I> to
check, and must have been the return value from a previous
invocation of <B>array startsearch</B>.
This option is particularly useful if an array has an element
with an empty name, since the return value from
<B>array nextelement</B> won't indicate whether the search
has been completed.
<P><DT><A NAME="M6"><B>array donesearch </B><I>arrayName searchId</I></A><DD>
This command terminates an array search and destroys all the
state associated with that search. <I>SearchId</I> indicates
which search on <I>arrayName</I> to destroy, and must have
been the return value from a previous invocation of
<B>array startsearch</B>. Returns an empty string.
<P><DT><A NAME="M7"><B>array exists </B><I>arrayName</I></A><DD>
Returns 1 if <I>arrayName</I> is an array variable, 0 if there
is no variable by that name or if it is a scalar variable.
<P><DT><A NAME="M8"><B>array get </B><I>arrayName</I> ?<I>pattern</I>?</A><DD>
Returns a list containing pairs of elements. The first
element in each pair is the name of an element in <I>arrayName</I>
and the second element of each pair is the value of the
array element. The order of the pairs is undefined.
If <I>pattern</I> is not specified, then all of the elements of the
array are included in the result.
If <I>pattern</I> is specified, then only those elements whose names
match <I>pattern</I> (using the matching rules of
<B><A HREF="../TkCmd/string.htm">string match</A></B>) are included.
If <I>arrayName</I> isn't the name of an array variable, or if
the array contains no elements, then an empty list is returned.
<P><DT><A NAME="M9"><B>array names </B><I>arrayName</I> ?<I>pattern</I>?</A><DD>
Returns a list containing the names of all of the elements in
the array that match <I>pattern</I> (using the matching
rules of <B><A HREF="../TkCmd/string.htm">string match</A></B>).
If <I>pattern</I> is omitted then the command returns all of
the element names in the array.
If there are no (matching) elements in the array, or if <I>arrayName</I>
isn't the name of an array variable, then an empty string is
returned.
<P><DT><A NAME="M10"><B>array nextelement </B><I>arrayName searchId</I></A><DD>
Returns the name of the next element in <I>arrayName</I>, or
an empty string if all elements of <I>arrayName</I> have
already been returned in this search. The <I>searchId</I>
argument identifies the search, and must have
been the return value of an <B>array startsearch</B> command.
Warning: if elements are added to or deleted from the array,
then all searches are automatically terminated just as if
<B>array donesearch</B> had been invoked; this will cause
<B>array nextelement</B> operations to fail for those searches.
<P><DT><A NAME="M11"><B>array set </B><I>arrayName list</I></A><DD>
Sets the values of one or more elements in <I>arrayName</I>.
<I>list</I> must have a form like that returned by <B>array get</B>,
consisting of an even number of elements.
Each odd-numbered element in <I>list</I> is treated as an element
name within <I>arrayName</I>, and the following element in <I>list</I>
is used as a new value for that array element.
If the variable <I>arrayName</I> does not already exist
and <I>list</I> is empty,
<I>arrayName</I> is created with an empty array value.
<P><DT><A NAME="M12"><B>array size </B><I>arrayName</I></A><DD>
Returns a decimal string giving the number of elements in the
array.
If <I>arrayName</I> isn't the name of an array then 0 is returned.
<P><DT><A NAME="M13"><B>array startsearch </B><I>arrayName</I></A><DD>
This command initializes an element-by-element search through the
array given by <I>arrayName</I>, such that invocations of the
<B>array nextelement</B> command will return the names of the
individual elements in the array.
When the search has been completed, the <B>array donesearch</B>
command should be invoked.
The return value is a
search identifier that must be used in <B>array nextelement</B>
and <B>array donesearch</B> commands; it allows multiple
searches to be underway simultaneously for the same array.
<P><DT><A NAME="M14"><B>array unset </B><I>arrayName</I> ?<I>pattern</I>?</A><DD>
Unsets all of the elements in the array that match <I>pattern</I> (using the
matching rules of <B><A HREF="../TkCmd/string.htm">string match</A></B>). If <I>arrayName</I> isn't the name
of an array variable or there are no matching elements in the array, then
an empty string is returned. If <I>pattern</I> is omitted and is it an
array variable, then the command unsets the entire array.
<P></DL>
<H3><A NAME="M15">KEYWORDS</A></H3>
<A href="../Keywords/A.htm#array">array</A>, <A href="../Keywords/E.htm#element names">element names</A>, <A href="../Keywords/S.htm#search">search</A>
<HR><PRE>
<A HREF="../copyright.htm">Copyright</A> &#169; 1993-1994 The Regents of the University of California.
<A HREF="../copyright.htm">Copyright</A> &#169; 1994-1996 Sun Microsystems, Inc.
<A HREF="../copyright.htm">Copyright</A> &#169; 1995-1997 Roger E. Critchlow Jr.</PRE>
</BODY></HTML>

68
hlp/en/tcl/bgerror.htm Normal file
View File

@ -0,0 +1,68 @@
<HTML><HEAD><TITLE>Tcl Built-In Commands - bgerror manual page</TITLE></HEAD><BODY>
<H3><A NAME="M2">NAME</A></H3>
bgerror - Command invoked to process background errors
<H3><A NAME="M3">SYNOPSIS</A></H3>
<B>bgerror </B><I>message</I><BR>
<H3><A NAME="M4">DESCRIPTION</A></H3>
The <B>bgerror</B> command doesn't exist as built-in part of Tcl. Instead,
individual applications or users can define a <B>bgerror</B>
command (e.g. as a Tcl procedure) if they wish to handle background
errors.
<P>
A background error is one that occurs in an event handler or some
other command that didn't originate with the application.
For example, if an error occurs while executing a command specified
with the <B><A HREF="../TkCmd/after.htm">after</A></B> command, then it is a background error.
For a non-background error, the error can simply be returned up
through nested Tcl command evaluations until it reaches the top-level
code in the application; then the application can report the error
in whatever way it wishes. When a background error occurs, the
unwinding ends in the Tcl library and there is no obvious way for Tcl
to report the error.
<P>
When Tcl detects a background error, it saves information about the
error and invokes the <B>bgerror</B> command later as an idle event
handler. Before invoking <B>bgerror</B>, Tcl restores the
<B>errorInfo</B> and <B>errorCode</B> variables to their values at the
time the error occurred, then it invokes <B>bgerror</B> with the error
message as its only argument. Tcl assumes that the application has
implemented the <B>bgerror</B> command, and that the command will
report the error in a way that makes sense for the application. Tcl
will ignore any result returned by the <B>bgerror</B> command as long
as no error is generated.
<P>
If another Tcl error occurs within the <B>bgerror</B> command (for
example, because no <B>bgerror</B> command has been defined) then Tcl
reports the error itself by writing a message to stderr.
<P>
If several background errors accumulate before <B>bgerror</B> is
invoked to process them, <B>bgerror</B> will be invoked once for each
error, in the order they occurred. However, if <B>bgerror</B> returns
with a break exception, then any remaining errors are skipped without
calling <B>bgerror</B>.
<P>
Tcl has no default implementation for <B>bgerror</B>. However, in
applications using Tk there is a default <B>bgerror</B> procedure which
posts a dialog box containing the error message and offers the user a
chance to see a stack trace showing where the error occurred. In
addition to allowing the user to view the stack trace, the dialog
provides an additional application configurable button which may be
used, for example, to save the stack trace to a file. By default,
this is the behavior associated with that button. This behavior can
be redefined by setting the option database values
<B>*ErrorDialog.function.text</B>, to specify the caption for the
function button, and <B>*ErrorDialog.function.command</B>, to specify
the command to be run. The text of the stack trace is appended to the
command when it is evaluated. If either of these options is set to
the empty string, then the additional button will not be displayed in
the dialog.
<H3><A NAME="M5">SEE ALSO</A></H3>
<B><A HREF="../TkCmd/after.htm">after</A></B>, <B><A HREF="../TkCmd/tclvars.htm">tclvars</A></B>
<H3><A NAME="M6">KEYWORDS</A></H3>
<A href="../Keywords/B.htm#background error">background error</A>, <A href="../Keywords/R.htm#reporting">reporting</A>
<HR><PRE>
<A HREF="../copyright.htm">Copyright</A> &#169; 1990-1994 The Regents of the University of California.
<A HREF="../copyright.htm">Copyright</A> &#169; 1994-1996 Sun Microsystems, Inc.
<A HREF="../copyright.htm">Copyright</A> &#169; 1995-1997 Roger E. Critchlow Jr.</PRE>
</BODY></HTML>

451
hlp/en/tcl/binary.htm Normal file
View File

@ -0,0 +1,451 @@
<HTML><HEAD><TITLE>Tcl Built-In Commands - binary manual page</TITLE></HEAD><BODY>
<DL>
<DD><A HREF="binary.htm#M2" NAME="L54">NAME</A>
<DL><DD>binary - Insert and extract fields from binary strings</DL>
<DD><A HREF="binary.htm#M3" NAME="L55">SYNOPSIS</A>
<DL>
<DD><B>binary format </B><I>formatString </I>?<I>arg arg ...</I>?
<DD><B>binary scan </B><I>string formatString </I>?<I>varName varName ...</I>?
</DL>
<DD><A HREF="binary.htm#M4" NAME="L56">DESCRIPTION</A>
<DD><A HREF="binary.htm#M5" NAME="L57">BINARY FORMAT</A>
<DL>
<DD><A HREF="binary.htm#M6" NAME="L58"><B>a</B></A>
<DD><A HREF="binary.htm#M7" NAME="L59"><B>A</B></A>
<DD><A HREF="binary.htm#M8" NAME="L60"><B>b</B></A>
<DD><A HREF="binary.htm#M9" NAME="L61"><B>B</B></A>
<DD><A HREF="binary.htm#M10" NAME="L62"><B>h</B></A>
<DD><A HREF="binary.htm#M11" NAME="L63"><B>H</B></A>
<DD><A HREF="binary.htm#M12" NAME="L64"><B>c</B></A>
<DD><A HREF="binary.htm#M13" NAME="L65"><B>s</B></A>
<DD><A HREF="binary.htm#M14" NAME="L66"><B>S</B></A>
<DD><A HREF="binary.htm#M15" NAME="L67"><B>i</B></A>
<DD><A HREF="binary.htm#M16" NAME="L68"><B>I</B></A>
<DD><A HREF="binary.htm#M17" NAME="L69"><B>f</B></A>
<DD><A HREF="binary.htm#M18" NAME="L70"><B>d</B></A>
<DD><A HREF="binary.htm#M19" NAME="L71"><B>x</B></A>
<DD><A HREF="binary.htm#M20" NAME="L72"><B>X</B></A>
<DD><A HREF="binary.htm#M21" NAME="L73"><B>@</B></A>
</DL>
<DD><A HREF="binary.htm#M22" NAME="L74">BINARY SCAN</A>
<DL>
<DD><A HREF="binary.htm#M23" NAME="L75"><B>a</B></A>
<DD><A HREF="binary.htm#M24" NAME="L76"><B>A</B></A>
<DD><A HREF="binary.htm#M25" NAME="L77"><B>b</B></A>
<DD><A HREF="binary.htm#M26" NAME="L78"><B>B</B></A>
<DD><A HREF="binary.htm#M27" NAME="L79"><B>h</B></A>
<DD><A HREF="binary.htm#M28" NAME="L80"><B>H</B></A>
<DD><A HREF="binary.htm#M29" NAME="L81"><B>c</B></A>
<DD><A HREF="binary.htm#M30" NAME="L82"><B>s</B></A>
<DD><A HREF="binary.htm#M31" NAME="L83"><B>S</B></A>
<DD><A HREF="binary.htm#M32" NAME="L84"><B>i</B></A>
<DD><A HREF="binary.htm#M33" NAME="L85"><B>I</B></A>
<DD><A HREF="binary.htm#M34" NAME="L86"><B>f</B></A>
<DD><A HREF="binary.htm#M35" NAME="L87"><B>d</B></A>
<DD><A HREF="binary.htm#M36" NAME="L88"><B>x</B></A>
<DD><A HREF="binary.htm#M37" NAME="L89"><B>X</B></A>
<DD><A HREF="binary.htm#M38" NAME="L90"><B>@</B></A>
</DL>
<DD><A HREF="binary.htm#M39" NAME="L91">PLATFORM ISSUES</A>
<DD><A HREF="binary.htm#M40" NAME="L92">SEE ALSO</A>
<DD><A HREF="binary.htm#M41" NAME="L93">KEYWORDS</A>
</DL><HR>
<H3><A NAME="M2">NAME</A></H3>
binary - Insert and extract fields from binary strings
<H3><A NAME="M3">SYNOPSIS</A></H3>
<B>binary format </B><I>formatString </I>?<I>arg arg ...</I>?<BR>
<B>binary scan </B><I>string formatString </I>?<I>varName varName ...</I>?<BR>
<H3><A NAME="M4">DESCRIPTION</A></H3>
This command provides facilities for manipulating binary data. The
first form, <B>binary format</B>, creates a binary string from normal
Tcl values. For example, given the values 16 and 22, on a 32 bit
architecture, it might produce an 8-byte binary string consisting of
two 4-byte integers, one for each of the numbers. The second form of
the command, <B>binary scan</B>, does the opposite: it extracts data
from a binary string and returns it as ordinary Tcl string values.
<H3><A NAME="M5">BINARY FORMAT</A></H3>
The <B>binary format</B> command generates a binary string whose layout
is specified by the <I>formatString</I> and whose contents come from
the additional arguments. The resulting binary value is returned.
<P>
The <I>formatString</I> consists of a sequence of zero or more field
specifiers separated by zero or more spaces. Each field specifier is
a single type character followed by an optional numeric <I>count</I>.
Most field specifiers consume one argument to obtain the value to be
formatted. The type character specifies how the value is to be
formatted. The <I>count</I> typically indicates how many items of the
specified type are taken from the value. If present, the <I>count</I>
is a non-negative decimal integer or <B>*</B>, which normally indicates
that all of the items in the value are to be used. If the number of
arguments does not match the number of fields in the format string
that consume arguments, then an error is generated.
<P>
Each type-count pair moves an imaginary cursor through the binary
data, storing bytes at the current position and advancing the cursor
to just after the last byte stored. The cursor is initially at
position 0 at the beginning of the data. The type may be any one of
the following characters:
<P>
<DL>
<P><DT><A NAME="M6"><B>a</B></A><DD>
Stores a character string of length <I>count</I> in the output string.
If <I>arg</I> has fewer than <I>count</I> bytes, then additional zero
bytes are used to pad out the field. If <I>arg</I> is longer than the
specified length, the extra characters will be ignored. If
<I>count</I> is <B>*</B>, then all of the bytes in <I>arg</I> will be
formatted. If <I>count</I> is omitted, then one character will be
formatted. For example,
<PRE><B>binary format a7a*a alpha bravo charlie</B></PRE>
will return a string equivalent to <B>alpha&#92;000&#92;000bravoc</B>.
<P><DT><A NAME="M7"><B>A</B></A><DD>
This form is the same as <B>a</B> except that spaces are used for
padding instead of nulls. For example,
<PRE><B>binary format A6A*A alpha bravo charlie</B></PRE>
will return <B>alpha bravoc</B>.
<P><DT><A NAME="M8"><B>b</B></A><DD>
Stores a string of <I>count</I> binary digits in low-to-high order
within each byte in the output string. <I>Arg</I> must contain a
sequence of <B>1</B> and <B>0</B> characters. The resulting bytes are
emitted in first to last order with the bits being formatted in
low-to-high order within each byte. If <I>arg</I> has fewer than
<I>count</I> digits, then zeros will be used for the remaining bits.
If <I>arg</I> has more than the specified number of digits, the extra
digits will be ignored. If <I>count</I> is <B>*</B>, then all of the
digits in <I>arg</I> will be formatted. If <I>count</I> is omitted,
then one digit will be formatted. If the number of bits formatted
does not end at a byte boundary, the remaining bits of the last byte
will be zeros. For example,
<PRE><B>binary format b5b* 11100 111000011010</B></PRE>
will return a string equivalent to <B>&#92;x07&#92;x87&#92;x05</B>.
<P><DT><A NAME="M9"><B>B</B></A><DD>
This form is the same as <B>b</B> except that the bits are stored in
high-to-low order within each byte. For example,
<PRE><B>binary format B5B* 11100 111000011010</B></PRE>
will return a string equivalent to <B>&#92;xe0&#92;xe1&#92;xa0</B>.
<P><DT><A NAME="M10"><B>h</B></A><DD>
Stores a string of <I>count</I> hexadecimal digits in low-to-high
within each byte in the output string. <I>Arg</I> must contain a
sequence of characters in the set ``0123456789abcdefABCDEF''. The
resulting bytes are emitted in first to last order with the hex digits
being formatted in low-to-high order within each byte. If <I>arg</I>
has fewer than <I>count</I> digits, then zeros will be used for the
remaining digits. If <I>arg</I> has more than the specified number of
digits, the extra digits will be ignored. If <I>count</I> is
<B>*</B>, then all of the digits in <I>arg</I> will be formatted. If
<I>count</I> is omitted, then one digit will be formatted. If the
number of digits formatted does not end at a byte boundary, the
remaining bits of the last byte will be zeros. For example,
<PRE><B>binary format h3h* AB def</B></PRE>
will return a string equivalent to <B>&#92;xba&#92;x00&#92;xed&#92;x0f</B>.
<P><DT><A NAME="M11"><B>H</B></A><DD>
This form is the same as <B>h</B> except that the digits are stored in
high-to-low order within each byte. For example,
<PRE><B>binary format H3H* ab DEF</B></PRE>
will return a string equivalent to <B>&#92;xab&#92;x00&#92;xde&#92;xf0</B>.
<P><DT><A NAME="M12"><B>c</B></A><DD>
Stores one or more 8-bit integer values in the output string. If no
<I>count</I> is specified, then <I>arg</I> must consist of an integer
value; otherwise <I>arg</I> must consist of a list containing at least
<I>count</I> integer elements. The low-order 8 bits of each integer
are stored as a one-byte value at the cursor position. If <I>count</I>
is <B>*</B>, then all of the integers in the list are formatted. If
the number of elements in the list is fewer than <I>count</I>, then an
error is generated. If the number of elements in the list is greater
than <I>count</I>, then the extra elements are ignored. For example,
<PRE><B>binary format c3cc* {3 -3 128 1} 260 {2 5}</B></PRE>
will return a string equivalent to
<B>&#92;x03&#92;xfd&#92;x80&#92;x04&#92;x02&#92;x05</B>, whereas
<PRE><B>binary format c {2 5}</B></PRE>
will generate an error.
<P><DT><A NAME="M13"><B>s</B></A><DD>
This form is the same as <B>c</B> except that it stores one or more
16-bit integers in little-endian byte order in the output string. The
low-order 16-bits of each integer are stored as a two-byte value at
the cursor position with the least significant byte stored first. For
example,
<PRE><B>binary format s3 {3 -3 258 1}</B></PRE>
will return a string equivalent to
<B>&#92;x03&#92;x00&#92;xfd&#92;xff&#92;x02&#92;x01</B>.
<P><DT><A NAME="M14"><B>S</B></A><DD>
This form is the same as <B>s</B> except that it stores one or more
16-bit integers in big-endian byte order in the output string. For
example,
<PRE><B>binary format S3 {3 -3 258 1}</B></PRE>
will return a string equivalent to
<B>&#92;x00&#92;x03&#92;xff&#92;xfd&#92;x01&#92;x02</B>.
<P><DT><A NAME="M15"><B>i</B></A><DD>
This form is the same as <B>c</B> except that it stores one or more
32-bit integers in little-endian byte order in the output string. The
low-order 32-bits of each integer are stored as a four-byte value at
the cursor position with the least significant byte stored first. For
example,
<PRE><B>binary format i3 {3 -3 65536 1}</B></PRE>
will return a string equivalent to
<B>&#92;x03&#92;x00&#92;x00&#92;x00&#92;xfd&#92;xff&#92;xff&#92;xff&#92;x00&#92;x00&#92;x01&#92;x00</B>
<P><DT><A NAME="M16"><B>I</B></A><DD>
This form is the same as <B>i</B> except that it stores one or more one
or more 32-bit integers in big-endian byte order in the output string.
For example,
<PRE><B>binary format I3 {3 -3 65536 1}</B></PRE>
will return a string equivalent to
<B>&#92;x00&#92;x00&#92;x00&#92;x03&#92;xff&#92;xff&#92;xff&#92;xfd&#92;x00&#92;x01&#92;x00&#92;x00</B>
<P><DT><A NAME="M17"><B>f</B></A><DD>
This form is the same as <B>c</B> except that it stores one or more one
or more single-precision floating in the machine's native
representation in the output string. This representation is not
portable across architectures, so it should not be used to communicate
floating point numbers across the network. The size of a floating
point number may vary across architectures, so the number of bytes
that are generated may vary. If the value overflows the
machine's native representation, then the value of FLT_MAX
as defined by the system will be used instead. Because Tcl uses
double-precision floating-point numbers internally, there may be some
loss of precision in the conversion to single-precision. For example,
on a Windows system running on an Intel Pentium processor,
<PRE><B>binary format f2 {1.6 3.4}</B></PRE>
will return a string equivalent to
<B>&#92;xcd&#92;xcc&#92;xcc&#92;x3f&#92;x9a&#92;x99&#92;x59&#92;x40</B>.
<P><DT><A NAME="M18"><B>d</B></A><DD>
This form is the same as <B>f</B> except that it stores one or more one
or more double-precision floating in the machine's native
representation in the output string. For example, on a
Windows system running on an Intel Pentium processor,
<PRE><B>binary format d1 {1.6}</B></PRE>
will return a string equivalent to
<B>&#92;x9a&#92;x99&#92;x99&#92;x99&#92;x99&#92;x99&#92;xf9&#92;x3f</B>.
<P><DT><A NAME="M19"><B>x</B></A><DD>
Stores <I>count</I> null bytes in the output string. If <I>count</I> is
not specified, stores one null byte. If <I>count</I> is <B>*</B>,
generates an error. This type does not consume an argument. For
example,
<PRE><B>binary format a3xa3x2a3 abc def ghi</B></PRE>
will return a string equivalent to <B>abc&#92;000def&#92;000&#92;000ghi</B>.
<P><DT><A NAME="M20"><B>X</B></A><DD>
Moves the cursor back <I>count</I> bytes in the output string. If
<I>count</I> is <B>*</B> or is larger than the current cursor position,
then the cursor is positioned at location 0 so that the next byte
stored will be the first byte in the result string. If <I>count</I> is
omitted then the cursor is moved back one byte. This type does not
consume an argument. For example,
<PRE><B>binary format a3X*a3X2a3 abc def ghi</B></PRE>
will return <B>dghi</B>.
<P><DT><A NAME="M21"><B>@</B></A><DD>
Moves the cursor to the absolute location in the output string
specified by <I>count</I>. Position 0 refers to the first byte in the
output string. If <I>count</I> refers to a position beyond the last
byte stored so far, then null bytes will be placed in the unitialized
locations and the cursor will be placed at the specified location. If
<I>count</I> is <B>*</B>, then the cursor is moved to the current end of
the output string. If <I>count</I> is omitted, then an error will be
generated. This type does not consume an argument. For example,
<PRE><B>binary format a5@2a1@*a3@10a1 abcde f ghi j</B></PRE>
will return <B>abfdeghi&#92;000&#92;000j</B>.
<P></DL>
<H3><A NAME="M22">BINARY SCAN</A></H3>
The <B>binary scan</B> command parses fields from a binary string,
returning the number of conversions performed. <I>String</I> gives the
input to be parsed and <I>formatString</I> indicates how to parse it.
Each <I>varName</I> gives the name of a variable; when a field is
scanned from <I>string</I> the result is assigned to the corresponding
variable.
<P>
As with <B>binary format</B>, the <I>formatString</I> consists of a
sequence of zero or more field specifiers separated by zero or more
spaces. Each field specifier is a single type character followed by
an optional numeric <I>count</I>. Most field specifiers consume one
argument to obtain the variable into which the scanned values should
be placed. The type character specifies how the binary data is to be
interpreted. The <I>count</I> typically indicates how many items of
the specified type are taken from the data. If present, the
<I>count</I> is a non-negative decimal integer or <B>*</B>, which
normally indicates that all of the remaining items in the data are to
be used. If there are not enough bytes left after the current cursor
position to satisfy the current field specifier, then the
corresponding variable is left untouched and <B>binary scan</B> returns
immediately with the number of variables that were set. If there are
not enough arguments for all of the fields in the format string that
consume arguments, then an error is generated.
<P>
It is <B>important</B> to note that the <B>c</B>, <B>s</B>, and <B>S</B>
(and <B>i</B> and <B>I</B> on 64bit systems) will be scanned into
long data size values. In doing this, values that have their high
bit set (0x80 for chars, 0x8000 for shorts, 0x80000000 for ints),
will be sign extended. Thus the following will occur:
<PRE><B>set signShort [binary format s1 0x8000]</B>
<B>binary scan $signShort s1 val; </B><I># val == 0xFFFF8000</I></PRE>
If you want to produce an unsigned value, then you can mask the return
value to the desired size. For example, to produce an unsigned short
value:
<PRE><B>set val [expr {$val &amp; 0xFFFF}]; </B><I># val == 0x8000</I></PRE>
<P>
Each type-count pair moves an imaginary cursor through the binary data,
reading bytes from the current position. The cursor is initially
at position 0 at the beginning of the data. The type may be any one of
the following characters:
<P>
<DL>
<P><DT><A NAME="M23"><B>a</B></A><DD>
The data is a character string of length <I>count</I>. If <I>count</I>
is <B>*</B>, then all of the remaining bytes in <I>string</I> will be
scanned into the variable. If <I>count</I> is omitted, then one
character will be scanned. For example,
<PRE><B>binary scan abcde&#92;000fghi a6a10 var1 var2</B></PRE>
will return <B>1</B> with the string equivalent to <B>abcde&#92;000</B>
stored in <B>var1</B> and <B>var2</B> left unmodified.
<P><DT><A NAME="M24"><B>A</B></A><DD>
This form is the same as <B>a</B>, except trailing blanks and nulls are stripped from
the scanned value before it is stored in the variable. For example,
<PRE><B>binary scan &quot;abc efghi &#92;000&quot; A* var1</B></PRE>
will return <B>1</B> with <B>abc efghi</B> stored in <B>var1</B>.
<P><DT><A NAME="M25"><B>b</B></A><DD>
The data is turned into a string of <I>count</I> binary digits in
low-to-high order represented as a sequence of ``1'' and ``0''
characters. The data bytes are scanned in first to last order with
the bits being taken in low-to-high order within each byte. Any extra
bits in the last byte are ignored. If <I>count</I> is <B>*</B>, then
all of the remaining bits in <B><A HREF="../TkCmd/string.htm">string</A></B> will be scanned. If
<I>count</I> is omitted, then one bit will be scanned. For example,
<PRE><B>binary scan &#92;x07&#92;x87&#92;x05 b5b* var1 var2</B></PRE>
will return <B>2</B> with <B>11100</B> stored in <B>var1</B> and
<B>1110000110100000</B> stored in <B>var2</B>.
<P><DT><A NAME="M26"><B>B</B></A><DD>
This form is the same as <B>b</B>, except the bits are taken in
high-to-low order within each byte. For example,
<PRE><B>binary scan &#92;x70&#92;x87&#92;x05 B5B* var1 var2</B></PRE>
will return <B>2</B> with <B>01110</B> stored in <B>var1</B> and
<B>1000011100000101</B> stored in <B>var2</B>.
<P><DT><A NAME="M27"><B>h</B></A><DD>
The data is turned into a string of <I>count</I> hexadecimal digits in
low-to-high order represented as a sequence of characters in the set
``0123456789abcdef''. The data bytes are scanned in first to last
order with the hex digits being taken in low-to-high order within each
byte. Any extra bits in the last byte are ignored. If <I>count</I>
is <B>*</B>, then all of the remaining hex digits in <B><A HREF="../TkCmd/string.htm">string</A></B> will be
scanned. If <I>count</I> is omitted, then one hex digit will be
scanned. For example,
<PRE><B>binary scan &#92;x07&#92;x86&#92;x05 h3h* var1 var2</B></PRE>
will return <B>2</B> with <B>706</B> stored in <B>var1</B> and
<B>50</B> stored in <B>var2</B>.
<P><DT><A NAME="M28"><B>H</B></A><DD>
This form is the same as <B>h</B>, except the digits are taken in
high-to-low order within each byte. For example,
<PRE><B>binary scan &#92;x07&#92;x86&#92;x05 H3H* var1 var2</B></PRE>
will return <B>2</B> with <B>078</B> stored in <B>var1</B> and
<B>05</B> stored in <B>var2</B>.
<P><DT><A NAME="M29"><B>c</B></A><DD>
The data is turned into <I>count</I> 8-bit signed integers and stored
in the corresponding variable as a list. If <I>count</I> is <B>*</B>,
then all of the remaining bytes in <B><A HREF="../TkCmd/string.htm">string</A></B> will be scanned. If
<I>count</I> is omitted, then one 8-bit integer will be scanned. For
example,
<PRE><B>binary scan &#92;x07&#92;x86&#92;x05 c2c* var1 var2</B></PRE>
will return <B>2</B> with <B>7 -122</B> stored in <B>var1</B> and <B>5</B>
stored in <B>var2</B>. Note that the integers returned are signed, but
they can be converted to unsigned 8-bit quantities using an expression
like:
<PRE><B>expr ( $num + 0x100 ) % 0x100</B></PRE>
<P><DT><A NAME="M30"><B>s</B></A><DD>
The data is interpreted as <I>count</I> 16-bit signed integers
represented in little-endian byte order. The integers are stored in
the corresponding variable as a list. If <I>count</I> is <B>*</B>, then
all of the remaining bytes in <B><A HREF="../TkCmd/string.htm">string</A></B> will be scanned. If
<I>count</I> is omitted, then one 16-bit integer will be scanned. For
example,
<PRE><B>binary scan &#92;x05&#92;x00&#92;x07&#92;x00&#92;xf0&#92;xff s2s* var1 var2</B></PRE>
will return <B>2</B> with <B>5 7</B> stored in <B>var1</B> and <B>-16</B>
stored in <B>var2</B>. Note that the integers returned are signed, but
they can be converted to unsigned 16-bit quantities using an expression
like:
<PRE><B>expr ( $num + 0x10000 ) % 0x10000</B></PRE>
<P><DT><A NAME="M31"><B>S</B></A><DD>
This form is the same as <B>s</B> except that the data is interpreted
as <I>count</I> 16-bit signed integers represented in big-endian byte
order. For example,
<PRE><B>binary scan &#92;x00&#92;x05&#92;x00&#92;x07&#92;xff&#92;xf0 S2S* var1 var2</B></PRE>
will return <B>2</B> with <B>5 7</B> stored in <B>var1</B> and <B>-16</B>
stored in <B>var2</B>.
<P><DT><A NAME="M32"><B>i</B></A><DD>
The data is interpreted as <I>count</I> 32-bit signed integers
represented in little-endian byte order. The integers are stored in
the corresponding variable as a list. If <I>count</I> is <B>*</B>, then
all of the remaining bytes in <B><A HREF="../TkCmd/string.htm">string</A></B> will be scanned. If
<I>count</I> is omitted, then one 32-bit integer will be scanned. For
example,
<PRE><B>binary scan &#92;x05&#92;x00&#92;x00&#92;x00&#92;x07&#92;x00&#92;x00&#92;x00&#92;xf0&#92;xff&#92;xff&#92;xff i2i* var1 var2</B></PRE>
will return <B>2</B> with <B>5 7</B> stored in <B>var1</B> and <B>-16</B>
stored in <B>var2</B>. Note that the integers returned are signed and
cannot be represented by Tcl as unsigned values.
<P><DT><A NAME="M33"><B>I</B></A><DD>
This form is the same as <B>I</B> except that the data is interpreted
as <I>count</I> 32-bit signed integers represented in big-endian byte
order. For example,
<PRE><B>binary &#92;x00&#92;x00&#92;x00&#92;x05&#92;x00&#92;x00&#92;x00&#92;x07&#92;xff&#92;xff&#92;xff&#92;xf0 I2I* var1 var2</B></PRE>
will return <B>2</B> with <B>5 7</B> stored in <B>var1</B> and <B>-16</B>
stored in <B>var2</B>.
<P><DT><A NAME="M34"><B>f</B></A><DD>
The data is interpreted as <I>count</I> single-precision floating point
numbers in the machine's native representation. The floating point
numbers are stored in the corresponding variable as a list. If
<I>count</I> is <B>*</B>, then all of the remaining bytes in
<B><A HREF="../TkCmd/string.htm">string</A></B> will be scanned. If <I>count</I> is omitted, then one
single-precision floating point number will be scanned. The size of a
floating point number may vary across architectures, so the number of
bytes that are scanned may vary. If the data does not represent a
valid floating point number, the resulting value is undefined and
compiler dependent. For example, on a Windows system running on an
Intel Pentium processor,
<PRE><B>binary scan &#92;x3f&#92;xcc&#92;xcc&#92;xcd f var1</B></PRE>
will return <B>1</B> with <B>1.6000000238418579</B> stored in
<B>var1</B>.
<P><DT><A NAME="M35"><B>d</B></A><DD>
This form is the same as <B>f</B> except that the data is interpreted
as <I>count</I> double-precision floating point numbers in the
machine's native representation. For example, on a Windows system
running on an Intel Pentium processor,
<PRE><B>binary scan &#92;x9a&#92;x99&#92;x99&#92;x99&#92;x99&#92;x99&#92;xf9&#92;x3f d var1</B></PRE>
will return <B>1</B> with <B>1.6000000000000001</B>
stored in <B>var1</B>.
<P><DT><A NAME="M36"><B>x</B></A><DD>
Moves the cursor forward <I>count</I> bytes in <I>string</I>. If
<I>count</I> is <B>*</B> or is larger than the number of bytes after the
current cursor cursor position, then the cursor is positioned after
the last byte in <I>string</I>. If <I>count</I> is omitted, then the
cursor is moved forward one byte. Note that this type does not
consume an argument. For example,
<PRE><B>binary scan &#92;x01&#92;x02&#92;x03&#92;x04 x2H* var1</B></PRE>
will return <B>1</B> with <B>0304</B> stored in <B>var1</B>.
<P><DT><A NAME="M37"><B>X</B></A><DD>
Moves the cursor back <I>count</I> bytes in <I>string</I>. If
<I>count</I> is <B>*</B> or is larger than the current cursor position,
then the cursor is positioned at location 0 so that the next byte
scanned will be the first byte in <I>string</I>. If <I>count</I>
is omitted then the cursor is moved back one byte. Note that this
type does not consume an argument. For example,
<PRE><B>binary scan &#92;x01&#92;x02&#92;x03&#92;x04 c2XH* var1 var2</B></PRE>
will return <B>2</B> with <B>1 2</B> stored in <B>var1</B> and <B>020304</B>
stored in <B>var2</B>.
<P><DT><A NAME="M38"><B>@</B></A><DD>
Moves the cursor to the absolute location in the data string specified
by <I>count</I>. Note that position 0 refers to the first byte in
<I>string</I>. If <I>count</I> refers to a position beyond the end of
<I>string</I>, then the cursor is positioned after the last byte. If
<I>count</I> is omitted, then an error will be generated. For example,
<PRE><B>binary scan &#92;x01&#92;x02&#92;x03&#92;x04 c2@1H* var1 var2</B></PRE>
will return <B>2</B> with <B>1 2</B> stored in <B>var1</B> and <B>020304</B>
stored in <B>var2</B>.
<P></DL>
<H3><A NAME="M39">PLATFORM ISSUES</A></H3>
Sometimes it is desirable to format or scan integer values in the
native byte order for the machine. Refer to the <B>byteOrder</B>
element of the <B>tcl_platform</B> array to decide which type character
to use when formatting or scanning integers.
<H3><A NAME="M40">SEE ALSO</A></H3>
<B><A HREF="../TkCmd/format.htm">format</A></B>, <B><A HREF="../TkCmd/scan.htm">scan</A></B>, <B><A HREF="../TkCmd/tclvars.htm">tclvars</A></B>
<H3><A NAME="M41">KEYWORDS</A></H3>
<A href="../Keywords/B.htm#binary">binary</A>, <A href="../Keywords/F.htm#format">format</A>, <A href="../Keywords/S.htm#scan">scan</A>
<HR><PRE>
<A HREF="../copyright.htm">Copyright</A> &#169; 1997 by Sun Microsystems, Inc.
<A HREF="../copyright.htm">Copyright</A> &#169; 1995-1997 Roger E. Critchlow Jr.</PRE>
</BODY></HTML>

26
hlp/en/tcl/break.htm Normal file
View File

@ -0,0 +1,26 @@
<HTML><HEAD><TITLE>Built-In Commands - break manual page</TITLE></HEAD><BODY>
<H3><A NAME="M2">NAME</A></H3>
break - Abort looping command
<H3><A NAME="M3">SYNOPSIS</A></H3>
<B>break</B><BR>
<H3><A NAME="M4">DESCRIPTION</A></H3>
This command is typically invoked inside the body of a looping command
such as <B><A HREF="../TkCmd/for.htm">for</A></B> or <B><A HREF="../TkCmd/foreach.htm">foreach</A></B> or <B><A HREF="../TkCmd/while.htm">while</A></B>.
It returns a TCL_BREAK code, which causes a break exception
to occur.
The exception causes the current script to be aborted
out to the innermost containing loop command, which then
aborts its execution and returns normally.
Break exceptions are also handled in a few other situations, such
as the <B><A HREF="../TkCmd/catch.htm">catch</A></B> command, Tk event bindings, and the outermost
scripts of procedure bodies.
<H3><A NAME="M5">SEE ALSO</A></H3>
<B><A HREF="../TkCmd/catch.htm">catch</A></B>, <B><A HREF="../TkCmd/continue.htm">continue</A></B>, <B><A HREF="../TkCmd/for.htm">for</A></B>, <B><A HREF="../TkCmd/foreach.htm">foreach</A></B>, <B><A HREF="../TkCmd/while.htm">while</A></B>
<H3><A NAME="M6">KEYWORDS</A></H3>
<A href="../Keywords/A.htm#abort">abort</A>, <A href="../Keywords/B.htm#break">break</A>, <A href="../Keywords/L.htm#loop">loop</A>
<HR><PRE>
<A HREF="../copyright.htm">Copyright</A> &#169; 1993-1994 The Regents of the University of California.
<A HREF="../copyright.htm">Copyright</A> &#169; 1994-1996 Sun Microsystems, Inc.
<A HREF="../copyright.htm">Copyright</A> &#169; 1995-1997 Roger E. Critchlow Jr.</PRE>
</BODY></HTML>

50
hlp/en/tcl/catch.htm Normal file
View File

@ -0,0 +1,50 @@
<HTML><HEAD><TITLE>Tcl Built-In Commands - catch manual page</TITLE></HEAD><BODY>
<H3><A NAME="M2">NAME</A></H3>
catch - Evaluate script and trap exceptional returns
<H3><A NAME="M3">SYNOPSIS</A></H3>
<B>catch</B><I> script </I>?<I>varName</I>?<BR>
<H3><A NAME="M4">DESCRIPTION</A></H3>
The <B>catch</B> command may be used to prevent errors from aborting command
interpretation. <B>Catch</B> calls the Tcl interpreter recursively to
execute <I>script</I>, and always returns without raising an error,
regardless of any errors that might occur while executing <I>script</I>.
<P>
If <I>script</I> raises an error, <B>catch</B> will return a non-zero integer
value corresponding to one of the exceptional return codes (see tcl.h
for the definitions of code values). If the <I>varName</I> argument is
given, then the variable it names is set to the error message from
interpreting <I>script</I>.
<P>
If <I>script</I> does not raise an error, <B>catch</B> will return 0
(TCL_OK) and set the variable to the value returned from <I>script</I>.
<P>
Note that <B>catch</B> catches all exceptions, including those
generated by <B><A HREF="../TkCmd/break.htm">break</A></B> and <B><A HREF="../TkCmd/continue.htm">continue</A></B> as well as errors. The
only errors that are not caught are syntax errors found when the
script is compiled. This is because the catch command only catches
errors during runtime. When the catch statement is compiled, the
script is compiled as well and any syntax errors will generate a Tcl
error.
<H3><A NAME="M5">EXAMPLES</A></H3>
The <B>catch</B> command may be used in an <B><A HREF="../TkCmd/if.htm">if</A></B> to branch based on
the success of a script.
<PRE>if { [catch {open $someFile w} fid] } {
puts stderr &quot;Could not open $someFile for writing&#92;n$fid&quot;
exit 1
}</PRE>
The <B>catch</B> command will not catch compiled syntax errors. The
first time proc <B>foo</B> is called, the body will be compiled and a
Tcl error will be generated.
<PRE>proc foo {} {
catch {expr {1 +- }}
}</PRE>
<H3><A NAME="M6">KEYWORDS</A></H3>
<A href="../Keywords/C.htm#catch">catch</A>, <A href="../Keywords/E.htm#error">error</A>
<HR><PRE>
<A HREF="../copyright.htm">Copyright</A> &#169; 1993-1994 The Regents of the University of California.
<A HREF="../copyright.htm">Copyright</A> &#169; 1994-1996 Sun Microsystems, Inc.
<A HREF="../copyright.htm">Copyright</A> &#169; 1995-1997 Roger E. Critchlow Jr.</PRE>
</BODY></HTML>

20
hlp/en/tcl/cd.htm Normal file
View File

@ -0,0 +1,20 @@
<HTML><HEAD><TITLE>Built-In Commands - cd manual page</TITLE></HEAD><BODY>
<H3><A NAME="M2">NAME</A></H3>
cd - Change working directory
<H3><A NAME="M3">SYNOPSIS</A></H3>
<B>cd </B>?<I>dirName</I>?<BR>
<H3><A NAME="M4">DESCRIPTION</A></H3>
Change the current working directory to <I>dirName</I>, or to the
home directory (as specified in the HOME environment variable) if
<I>dirName</I> is not given.
Returns an empty string.
<H3><A NAME="M5">SEE ALSO</A></H3>
<B><A HREF="../TkCmd/filename.htm">filename</A></B>, <B><A HREF="../TkCmd/glob.htm">glob</A></B>, <B><A HREF="../TkCmd/pwd.htm">pwd</A></B>
<H3><A NAME="M6">KEYWORDS</A></H3>
<A href="../Keywords/W.htm#working directory">working directory</A>
<HR><PRE>
<A HREF="../copyright.htm">Copyright</A> &#169; 1993 The Regents of the University of California.
<A HREF="../copyright.htm">Copyright</A> &#169; 1994-1996 Sun Microsystems, Inc.
<A HREF="../copyright.htm">Copyright</A> &#169; 1995-1997 Roger E. Critchlow Jr.</PRE>
</BODY></HTML>

251
hlp/en/tcl/clock.htm Normal file
View File

@ -0,0 +1,251 @@
<HTML><HEAD><TITLE>Tcl Built-In Commands - clock manual page</TITLE></HEAD><BODY>
<DL>
<DD><A HREF="clock.htm#M2" NAME="L109">NAME</A>
<DL><DD>clock - Obtain and manipulate time</DL>
<DD><A HREF="clock.htm#M3" NAME="L110">SYNOPSIS</A>
<DL>
<DD><B>clock </B><I>option</I> ?<I>arg arg ...</I>?
</DL>
<DD><A HREF="clock.htm#M4" NAME="L111">DESCRIPTION</A>
<DL>
<DD><A HREF="clock.htm#M5" NAME="L112">.VS 8.3</A>
<DD><A HREF="clock.htm#M6" NAME="L113"><B>clock format </B><I>clockValue</I> ?<B>-format </B><I>string</I>? ?<B>-gmt </B><I>boolean</I>?</A>
<DL>
<DD><A HREF="clock.htm#M7" NAME="L114"><B>%%</B></A>
<DD><A HREF="clock.htm#M8" NAME="L115"><B>%a</B></A>
<DD><A HREF="clock.htm#M9" NAME="L116"><B>%A</B></A>
<DD><A HREF="clock.htm#M10" NAME="L117"><B>%b</B></A>
<DD><A HREF="clock.htm#M11" NAME="L118"><B>%B</B></A>
<DD><A HREF="clock.htm#M12" NAME="L119"><B>%c</B></A>
<DD><A HREF="clock.htm#M13" NAME="L120"><B>%d</B></A>
<DD><A HREF="clock.htm#M14" NAME="L121"><B>%H</B></A>
<DD><A HREF="clock.htm#M15" NAME="L122"><B>%I</B></A>
<DD><A HREF="clock.htm#M16" NAME="L123"><B>%j</B></A>
<DD><A HREF="clock.htm#M17" NAME="L124"><B>%m</B></A>
<DD><A HREF="clock.htm#M18" NAME="L125"><B>%M</B></A>
<DD><A HREF="clock.htm#M19" NAME="L126"><B>%p</B></A>
<DD><A HREF="clock.htm#M20" NAME="L127"><B>%S</B></A>
<DD><A HREF="clock.htm#M21" NAME="L128"><B>%U</B></A>
<DD><A HREF="clock.htm#M22" NAME="L129"><B>%w</B></A>
<DD><A HREF="clock.htm#M23" NAME="L130"><B>%W</B></A>
<DD><A HREF="clock.htm#M24" NAME="L131"><B>%x</B></A>
<DD><A HREF="clock.htm#M25" NAME="L132"><B>%X</B></A>
<DD><A HREF="clock.htm#M26" NAME="L133"><B>%y</B></A>
<DD><A HREF="clock.htm#M27" NAME="L134"><B>%Y</B></A>
<DD><A HREF="clock.htm#M28" NAME="L135"><B>%Z</B></A>
</DL>
<DL>
<DD><A HREF="clock.htm#M29" NAME="L136"><B>%D</B></A>
<DD><A HREF="clock.htm#M30" NAME="L137"><B>%e</B></A>
<DD><A HREF="clock.htm#M31" NAME="L138"><B>%h</B></A>
<DD><A HREF="clock.htm#M32" NAME="L139"><B>%n</B></A>
<DD><A HREF="clock.htm#M33" NAME="L140"><B>%r</B></A>
<DD><A HREF="clock.htm#M34" NAME="L141"><B>%R</B></A>
<DD><A HREF="clock.htm#M35" NAME="L142"><B>%t</B></A>
<DD><A HREF="clock.htm#M36" NAME="L143"><B>%T</B></A>
</DL>
<DD><A HREF="clock.htm#M37" NAME="L144"><B>clock scan </B><I>dateString</I> ?<B>-base </B><I>clockVal</I>? ?<B>-gmt </B><I>boolean</I>?</A>
<DL>
<DD><A HREF="clock.htm#M38" NAME="L145"><I>time</I></A>
<DD><A HREF="clock.htm#M39" NAME="L146"><I>date</I></A>
<DD><A HREF="clock.htm#M40" NAME="L147"><I>ISO 8601 point-in-time</I></A>
<DD><A HREF="clock.htm#M41" NAME="L148"><I>relative time</I></A>
</DL>
<DD><A HREF="clock.htm#M42" NAME="L149"><B>clock seconds</B></A>
</DL>
<DD><A HREF="clock.htm#M43" NAME="L150">KEYWORDS</A>
</DL><HR>
<H3><A NAME="M2">NAME</A></H3>
clock - Obtain and manipulate time
<H3><A NAME="M3">SYNOPSIS</A></H3>
<B>clock </B><I>option</I> ?<I>arg arg ...</I>?<BR>
<H3><A NAME="M4">DESCRIPTION</A></H3>
This command performs one of several operations that may obtain
or manipulate strings or values that represent some notion of
time. The <I>option</I> argument determines what action is carried
out by the command. The legal <I>options</I> (which may be
abbreviated) are:
<P>
<DL>
<P><DT><A NAME="M5">.VS 8.3</A><DD>
<B>clock clicks</B> ?<B>-milliseconds</B>?
Return a high-resolution time value as a system-dependent integer
value. The unit of the value is system-dependent but should be the
highest resolution clock available on the system such as a CPU cycle
counter. If <B>-milliseconds</B> is specified, then the value is
guaranteed to be of millisecond granularity.
This value should only be used for the relative measurement
of elapsed time.
<P><DT><A NAME="M6"><B>clock format </B><I>clockValue</I> ?<B>-format </B><I>string</I>? ?<B>-gmt </B><I>boolean</I>?</A><DD>
Converts an integer time value, typically returned by
<B>clock seconds</B>, <B>clock scan</B>, or the <B>atime</B>, <B>mtime</B>,
or <B>ctime</B> options of the <B><A HREF="../TkCmd/file.htm">file</A></B> command, to human-readable
form. If the <B>-format</B> argument is present the next argument is a
string that describes how the date and time are to be formatted.
Field descriptors consist of a <B>%</B> followed by a field
descriptor character. All other characters are copied into the result.
Valid field descriptors are:
<P>
<DL>
<P><DT><A NAME="M7"><B>%%</B></A><DD>
Insert a %.
<P><DT><A NAME="M8"><B>%a</B></A><DD>
Abbreviated weekday name (Mon, Tue, etc.).
<P><DT><A NAME="M9"><B>%A</B></A><DD>
Full weekday name (Monday, Tuesday, etc.).
<P><DT><A NAME="M10"><B>%b</B></A><DD>
Abbreviated month name (Jan, Feb, etc.).
<P><DT><A NAME="M11"><B>%B</B></A><DD>
Full month name.
<P><DT><A NAME="M12"><B>%c</B></A><DD>
Locale specific date and time.
<P><DT><A NAME="M13"><B>%d</B></A><DD>
Day of month (01 - 31).
<P><DT><A NAME="M14"><B>%H</B></A><DD>
Hour in 24-hour format (00 - 23).
<P><DT><A NAME="M15"><B>%I</B></A><DD>
Hour in 12-hour format (00 - 12).
<P><DT><A NAME="M16"><B>%j</B></A><DD>
Day of year (001 - 366).
<P><DT><A NAME="M17"><B>%m</B></A><DD>
Month number (01 - 12).
<P><DT><A NAME="M18"><B>%M</B></A><DD>
Minute (00 - 59).
<P><DT><A NAME="M19"><B>%p</B></A><DD>
AM/PM indicator.
<P><DT><A NAME="M20"><B>%S</B></A><DD>
Seconds (00 - 59).
<P><DT><A NAME="M21"><B>%U</B></A><DD>
Week of year (00 - 52), Sunday is the first day of the week.
<P><DT><A NAME="M22"><B>%w</B></A><DD>
Weekday number (Sunday = 0).
<P><DT><A NAME="M23"><B>%W</B></A><DD>
Week of year (00 - 52), Monday is the first day of the week.
<P><DT><A NAME="M24"><B>%x</B></A><DD>
Locale specific date format.
<P><DT><A NAME="M25"><B>%X</B></A><DD>
Locale specific time format.
<P><DT><A NAME="M26"><B>%y</B></A><DD>
Year without century (00 - 99).
<P><DT><A NAME="M27"><B>%Y</B></A><DD>
Year with century (e.g. 1990)
<P><DT><A NAME="M28"><B>%Z</B></A><DD>
Time zone name.
<P></DL>
<P>
<DL><P><DD>
In addition, the following field descriptors may be supported on some
systems (e.g. Unix but not Windows):
<P>
<DL>
<P><DT><A NAME="M29"><B>%D</B></A><DD>
Date as %m/%d/%y.
<P><DT><A NAME="M30"><B>%e</B></A><DD>
Day of month (1 - 31), no leading zeros.
<P><DT><A NAME="M31"><B>%h</B></A><DD>
Abbreviated month name.
<P><DT><A NAME="M32"><B>%n</B></A><DD>
Insert a newline.
<P><DT><A NAME="M33"><B>%r</B></A><DD>
Time as %I:%M:%S %p.
<P><DT><A NAME="M34"><B>%R</B></A><DD>
Time as %H:%M.
<P><DT><A NAME="M35"><B>%t</B></A><DD>
Insert a tab.
<P><DT><A NAME="M36"><B>%T</B></A><DD>
Time as %H:%M:%S.
<P></DL>
</DL>
<P>
<DL><P><DD>
If the <B>-format</B> argument is not specified, the format string
&quot;<B>%a %b %d %H:%M:%S %Z %Y</B>&quot; is used. If the <B>-gmt</B> argument
is present the next argument must be a boolean which if true specifies
that the time will be formatted as Greenwich Mean Time. If false
then the local timezone will be used as defined by the operating
environment.
</DL>
<P><DT><A NAME="M37"><B>clock scan </B><I>dateString</I> ?<B>-base </B><I>clockVal</I>? ?<B>-gmt </B><I>boolean</I>?</A><DD>
Convert <I>dateString</I> to an integer clock value (see <B>clock seconds</B>).
This command can parse and convert virtually any standard date and/or time
string, which can include standard time zone mnemonics. If only a time is
specified, the current date is assumed. If the string does not contain a
time zone mnemonic, the local time zone is assumed, unless the <B>-gmt</B>
argument is true, in which case the clock value is calculated assuming
that the specified time is relative to Greenwich Mean Time.
<B>-gmt</B>, if specified, affects only the computed time value; it does not
impact the interpretation of <B>-base</B>.
<P>
If the <B>-base</B> flag is specified, the next argument should contain
an integer clock value. Only the date in this value is used, not the
time. This is useful for determining the time on a specific day or
doing other date-relative conversions.
<P>
The <I>dateString</I> consists of zero or more specifications of the
following form:
<P>
<DL>
<P><DT><A NAME="M38"><I>time</I></A><DD>
A time of day, which is of the form: <I>hh</I>?<I>:mm</I>?<I>:ss</I>??
?<I>meridian</I>? ?<I>zone</I>? or <I>hhmm </I>?<I>meridian</I>?
?<I>zone</I>?. If no meridian is specified, <I>hh</I> is interpreted on
a 24-hour clock.
<P><DT><A NAME="M39"><I>date</I></A><DD>
A specific month and day with optional year. The
acceptable formats are <I>mm/dd</I>?<I>/yy</I>?, <I>monthname dd</I>
?, <I>yy</I>?, <I>dd monthname </I>?<I>yy</I>?, <I>day, dd monthname
yy</I>, <I>?CC?yymmdd</I>, <I>?CC?yy-mm-dd</I>, <I>dd-monthname-?CC?yy</I>.
The default year is the current year. If the year is less
than 100, we treat the years 00-68 as 2000-2068 and the years 69-99
as 1969-1999. Not all platforms can represent the years 38-70, so
an error may result if these years are used.
<P><DT><A NAME="M40"><I>ISO 8601 point-in-time</I></A><DD>
An ISO 8601 point-in-time specification, such as <I>CCyymmddThhmmss</I>, where
T is the literal T, <I>CCyymmdd hhmmss</I>, or
<I>CCyymmddThh:mm:ss</I>.
<P><DT><A NAME="M41"><I>relative time</I></A><DD>
A specification relative to the current time. The format is <I>number
unit</I> acceptable units are <B>year</B>, <B>fortnight</B>, <B>month</B>, <B>week</B>, <B>day</B>,
<B>hour</B>, <B>minute</B> (or <B>min</B>), and <B>second</B> (or <B>sec</B>). The
unit can be specified as a singular or plural, as in <B>3 weeks</B>.
These modifiers may also be specified:
<B>tomorrow</B>, <B>yesterday</B>, <B>today</B>, <B>now</B>,
<B>last</B>, <B>this</B>, <B>next</B>, <B>ago</B>.
<P></DL>
<P>
<DL><P><DD>
The actual date is calculated according to the following steps.
First, any absolute date and/or time is processed and converted.
Using that time as the base, day-of-week specifications are added.
Next, relative specifications are used. If a date or day is
specified, and no absolute or relative time is given, midnight is
used. Finally, a correction is applied so that the correct hour of
the day is produced after allowing for daylight savings time
differences and the correct date is given when going from the end
of a long month to a short month.
<P>
Daylight savings time correction is applied only when the relative time
is specified in units of days or more, ie, days, weeks, fortnights, months or
years. This means that when crossing the daylight savings time boundary,
different results will be given for <B>clock scan &quot;1 day&quot;</B> and
<B>clock scan &quot;24 hours&quot;</B>:
<PRE><B>% clock scan &quot;1 day&quot; -base [clock scan 1999-10-31]
941443200
% clock scan &quot;24 hours&quot; -base [clock scan 1999-10-31]
941439600</B></PRE>
</DL>
<P><DT><A NAME="M42"><B>clock seconds</B></A><DD>
Return the current date and time as a system-dependent integer value. The
unit of the value is seconds, allowing it to be used for relative time
calculations. The value is usually defined as total elapsed time from
an ``epoch''. You shouldn't assume the value of the epoch.
<P></DL>
<H3><A NAME="M43">KEYWORDS</A></H3>
<A href="../Keywords/C.htm#clock">clock</A>, <A href="../Keywords/D.htm#date">date</A>, <A href="../Keywords/T.htm#time">time</A>
<HR><PRE>
<A HREF="../copyright.htm">Copyright</A> &#169; 1992-1995 Karl Lehenbauer and Mark Diekhans.
<A HREF="../copyright.htm">Copyright</A> &#169; 1995-1997 Sun Microsystems, Inc.
<A HREF="../copyright.htm">Copyright</A> &#169; 1998-1999 Scriptics Corporation
<A HREF="../copyright.htm">Copyright</A> &#169; 1995-1997 Roger E. Critchlow Jr.</PRE>
</BODY></HTML>

47
hlp/en/tcl/close.htm Normal file
View File

@ -0,0 +1,47 @@
<HTML><HEAD><TITLE>Tcl Built-In Commands - close manual page</TITLE></HEAD><BODY>
<H3><A NAME="M2">NAME</A></H3>
close - Close an open channel.
<H3><A NAME="M3">SYNOPSIS</A></H3>
<B>close </B><I>channelId</I><BR>
<H3><A NAME="M4">DESCRIPTION</A></H3>
Closes the channel given by <I>channelId</I>. <I>ChannelId</I> must be a
channel identifier such as the return value from a previous <B><A HREF="../TkCmd/open.htm">open</A></B>
or <B><A HREF="../TkCmd/socket.htm">socket</A></B> command.
All buffered output is flushed to the channel's output device,
any buffered input is discarded, the underlying file or device is closed,
and <I>channelId</I> becomes unavailable for use.
<P>
If the channel is blocking, the command does not return until all output
is flushed.
If the channel is nonblocking and there is unflushed output, the
channel remains open and the command
returns immediately; output will be flushed in the background and the
channel will be closed when all the flushing is complete.
<P>
If <I>channelId</I> is a blocking channel for a command pipeline then
<B>close</B> waits for the child processes to complete.
<P>
If the channel is shared between interpreters, then <B>close</B>
makes <I>channelId</I> unavailable in the invoking interpreter but has no
other effect until all of the sharing interpreters have closed the
channel.
When the last interpreter in which the channel is registered invokes
<B>close</B>, the cleanup actions described above occur. See the
<B><A HREF="../TkCmd/interp.htm">interp</A></B> command for a description of channel sharing.
<P>
Channels are automatically closed when an interpreter is destroyed and
when the process exits. Channels are switched to blocking mode, to ensure
that all output is correctly flushed before the process exits.
<P>
The command returns an empty string, and may generate an error if
an error occurs while flushing output.
<H3><A NAME="M5">SEE ALSO</A></H3>
<B><A HREF="../TkCmd/file.htm">file</A></B>, <B><A HREF="../TkCmd/open.htm">open</A></B>, <B><A HREF="../TkCmd/socket.htm">socket</A></B>, <B><A HREF="../TkCmd/eof.htm">eof</A></B>
<H3><A NAME="M6">KEYWORDS</A></H3>
<A href="../Keywords/B.htm#blocking">blocking</A>, <A href="../Keywords/C.htm#channel">channel</A>, <A href="../Keywords/C.htm#close">close</A>, <A href="../Keywords/N.htm#nonblocking">nonblocking</A>
<HR><PRE>
<A HREF="../copyright.htm">Copyright</A> &#169; 1993 The Regents of the University of California.
<A HREF="../copyright.htm">Copyright</A> &#169; 1994-1996 Sun Microsystems, Inc.
<A HREF="../copyright.htm">Copyright</A> &#169; 1995-1997 Roger E. Critchlow Jr.</PRE>
</BODY></HTML>

28
hlp/en/tcl/concat.htm Normal file
View File

@ -0,0 +1,28 @@
<HTML><HEAD><TITLE>Built-In Commands - concat manual page</TITLE></HEAD><BODY>
<H3><A NAME="M2">NAME</A></H3>
concat - Join lists together
<H3><A NAME="M3">SYNOPSIS</A></H3>
<B>concat</B><I> </I>?<I>arg arg ...</I>?<BR>
<H3><A NAME="M4">DESCRIPTION</A></H3>
This command treats each argument as a list and concatenates them
into a single list.
It also eliminates leading and trailing spaces in the <I>arg</I>'s
and adds a single separator space between <I>arg</I>'s.
It permits any number of arguments. For example,
the command
<PRE><B>concat a b {c d e} {f {g h}}</B></PRE>
will return
<PRE><B>a b c d e f {g h}</B></PRE>
as its result.
<P>
If no <I>arg</I>s are supplied, the result is an empty string.
<H3><A NAME="M5">SEE ALSO</A></H3>
<B><A HREF="../TkCmd/append.htm">append</A></B>, <B><A HREF="../TkCmd/eval.htm">eval</A></B>
<H3><A NAME="M6">KEYWORDS</A></H3>
<A href="../Keywords/C.htm#concatenate">concatenate</A>, <A href="../Keywords/J.htm#join">join</A>, <A href="../Keywords/L.htm#lists">lists</A>
<HR><PRE>
<A HREF="../copyright.htm">Copyright</A> &#169; 1993 The Regents of the University of California.
<A HREF="../copyright.htm">Copyright</A> &#169; 1994-1996 Sun Microsystems, Inc.
<A HREF="../copyright.htm">Copyright</A> &#169; 1995-1997 Roger E. Critchlow Jr.</PRE>
</BODY></HTML>

26
hlp/en/tcl/continue.htm Normal file
View File

@ -0,0 +1,26 @@
<HTML><HEAD><TITLE>Built-In Commands - continue manual page</TITLE></HEAD><BODY>
<H3><A NAME="M2">NAME</A></H3>
continue - Skip to the next iteration of a loop
<H3><A NAME="M3">SYNOPSIS</A></H3>
<B>continue</B><BR>
<H3><A NAME="M4">DESCRIPTION</A></H3>
This command is typically invoked inside the body of a looping command
such as <B><A HREF="../TkCmd/for.htm">for</A></B> or <B><A HREF="../TkCmd/foreach.htm">foreach</A></B> or <B><A HREF="../TkCmd/while.htm">while</A></B>.
It returns a TCL_CONTINUE code, which causes a continue exception
to occur.
The exception causes the current script to be aborted
out to the innermost containing loop command, which then
continues with the next iteration of the loop.
Catch exceptions are also handled in a few other situations, such
as the <B><A HREF="../TkCmd/catch.htm">catch</A></B> command and the outermost scripts of procedure
bodies.
<H3><A NAME="M5">SEE ALSO</A></H3>
<B><A HREF="../TkCmd/break.htm">break</A></B>, <B><A HREF="../TkCmd/for.htm">for</A></B>, <B><A HREF="../TkCmd/foreach.htm">foreach</A></B>, <B><A HREF="../TkCmd/while.htm">while</A></B>
<H3><A NAME="M6">KEYWORDS</A></H3>
<A href="../Keywords/C.htm#continue">continue</A>, <A href="../Keywords/I.htm#iteration">iteration</A>, <A href="../Keywords/L.htm#loop">loop</A>
<HR><PRE>
<A HREF="../copyright.htm">Copyright</A> &#169; 1993-1994 The Regents of the University of California.
<A HREF="../copyright.htm">Copyright</A> &#169; 1994-1996 Sun Microsystems, Inc.
<A HREF="../copyright.htm">Copyright</A> &#169; 1995-1997 Roger E. Critchlow Jr.</PRE>
</BODY></HTML>

146
hlp/en/tcl/dde.htm Normal file
View File

@ -0,0 +1,146 @@
<HTML><HEAD><TITLE>Tcl Built-In Commands - dde manual page</TITLE></HEAD><BODY>
<DL>
<DD><A HREF="dde.htm#M2" NAME="L166">NAME</A>
<DL><DD>dde - Execute a Dynamic Data Exchange command</DL>
<DD><A HREF="dde.htm#M3" NAME="L167">SYNOPSIS</A>
<DL>
<DD><B>package require dde 1.1</B>
<DD><B>dde </B><I>servername </I>?<I>topic</I>?
<DD><B>dde ?-async?</B> <I>command service topic </I>?<I>data</I>?
</DL>
<DD><A HREF="dde.htm#M4" NAME="L168">DESCRIPTION</A>
<DL>
<DD><A HREF="dde.htm#M5" NAME="L169"><B>-async</B></A>
</DL>
<DD><A HREF="dde.htm#M6" NAME="L170">DDE COMMANDS</A>
<DL>
<DD><A HREF="dde.htm#M7" NAME="L171"><B>dde servername </B>?<I>topic</I>?</A>
<DD><A HREF="dde.htm#M8" NAME="L172"><B>dde execute </B><I>service topic data</I></A>
<DD><A HREF="dde.htm#M9" NAME="L173"><B>dde poke </B><I>service topic item data</I></A>
<DD><A HREF="dde.htm#M10" NAME="L174"><B>dde request </B><I>service topic item</I></A>
<DD><A HREF="dde.htm#M11" NAME="L175"><B>dde services </B><I>service topic</I></A>
<DD><A HREF="dde.htm#M12" NAME="L176"><B>dde eval </B><I>topic cmd </I>?<I>arg arg ...</I>?</A>
</DL>
<DD><A HREF="dde.htm#M13" NAME="L177">DDE AND TCL</A>
<DD><A HREF="dde.htm#M14" NAME="L178">SEE ALSO</A>
<DD><A HREF="dde.htm#M15" NAME="L179">KEYWORDS</A>
</DL><HR>
<H3><A NAME="M2">NAME</A></H3>
dde - Execute a Dynamic Data Exchange command
<H3><A NAME="M3">SYNOPSIS</A></H3>
<B>package require dde 1.1</B><BR>
<B>dde </B><I>servername </I>?<I>topic</I>?<BR>
<B>dde ?-async?</B> <I>command service topic </I>?<I>data</I>?<BR>
<H3><A NAME="M4">DESCRIPTION</A></H3>
This command allows an application to send Dynamic Data Exchange (DDE)
command when running under Microsoft Windows. Dynamic Data Exchange is
a mechanism where applications can exchange raw data. Each DDE
transaction needs a <I>service name</I> and a <I>topic</I>. Both the
<I>service name</I> and <I>topic</I> are application defined; Tcl uses
the service name <B>TclEval</B>, while the topic name is the name of the
interpreter given by <B>dde servername</B>. Other applications have their
own <I>service names</I> and <I>topics</I>. For instance, Microsoft Excel
has the service name <B>Excel</B>.
<P>
The only option to the <B>dde</B> command is:
<P>
<DL>
<P><DT><A NAME="M5"><B>-async</B></A><DD>
Requests asynchronous invocation. This is valid only for the
<B>execute</B> subcommand. Normally, the <B>dde execute</B> subcommand
waits until the command completes, returning appropriate error
messages. When the <B>-async</B> option is used, the command returns
immediately, and no error information is available.
<P></DL>
<H3><A NAME="M6">DDE COMMANDS</A></H3>
The following commands are a subset of the full Dynamic Data Exchange
set of commands.
<P>
<DL>
<P><DT><A NAME="M7"><B>dde servername </B>?<I>topic</I>?</A><DD>
<B>dde servername</B> registers the interpreter as a DDE server with
the service name <B>TclEval</B> and the topic name specified by <I>topic</I>.
If no <I>topic</I> is given, <B>dde servername</B> returns the name
of the current topic or the empty string if it is not registered as a service.
<P><DT><A NAME="M8"><B>dde execute </B><I>service topic data</I></A><DD>
<B>dde execute</B> takes the <I>data</I> and sends it to the server
indicated by <I>service</I> with the topic indicated by
<I>topic</I>. Typically, <I>service</I> is the name of an application,
and <I>topic</I> is a file to work on. The <I>data</I> field is given
to the remote application. Typically, the application treats the
<I>data</I> field as a script, and the script is run in the
application. The command returns an error if the script did not
run. If the <B>-async</B> flag was used, the command
returns immediately with no error.
<P><DT><A NAME="M9"><B>dde poke </B><I>service topic item data</I></A><DD>
<B>dde poke</B> passes the <I>data</I> to the server indicated by
<I>service</I> using the <I>topic</I> and <I>item</I> specified. Typically,
<I>service</I> is the name of an application. <I>topic</I> is application
specific but can be a command to the server or the name of a file to work
on. The <I>item</I> is also application specific and is often not used, but
it must always be non-null. The <I>data</I> field is given to the remote
application.
<P><DT><A NAME="M10"><B>dde request </B><I>service topic item</I></A><DD>
<B>dde request</B> is typically used to get the value of something; the
value of a cell in Microsoft Excel or the text of a selection in
Microsoft Word. <I>service</I> is typically the name of an application,
<I>topic</I> is typically the name of the file, and <I>item</I> is
application-specific. The command returns the value of <I>item</I> as
defined in the application.
<P><DT><A NAME="M11"><B>dde services </B><I>service topic</I></A><DD>
<B>dde services</B> returns a list of service-topic pairs that
currently exist on the machine. If <I>service</I> and <I>topic</I> are
both null strings ({}), then all service-topic pairs currently
available on the system are returned. If <I>service</I> is null and
<I>topic</I> is not, then all services with the specified topic are
returned. If <I>service</I> is not null and <I>topic</I> is, all topics
for a given service are returned. If both are not null, if that
service-topic pair currently exists, it is returned; otherwise, null
is returned.
<P><DT><A NAME="M12"><B>dde eval </B><I>topic cmd </I>?<I>arg arg ...</I>?</A><DD>
<B>dde eval</B> evaluates a command and its arguments using the
interpreter specified by <I>topic</I>. The DDE service must be the
<B>TclEval</B> service. This command can be used to replace send on
Windows.
<P></DL>
<H3><A NAME="M13">DDE AND TCL</A></H3>
A Tcl interpreter always has a service name of <B>TclEval</B>. Each
different interpreter of all running Tcl applications must be
given a unique
name specified by <B>dde servername</B>. Each interp is available as a
DDE topic only if the <B>dde servername</B> command was used to set the
name of the topic for each interp. So a <B>dde services TclEval {}</B>
command will return a list of service-topic pairs, where each of the
currently running interps will be a topic.
<P>
When Tcl processes a <B>dde execute</B> command, the data for the
execute is run as a script in the interp named by the topic of the
<B>dde execute</B> command.
<P>
When Tcl processes a <B>dde request</B> command, it returns the value of the
variable given in the dde command in the context of the interp named by the
dde topic. Tcl reserves the variable <B>$TCLEVAL$EXECUTE$RESULT</B> for
internal use, and <B>dde request</B> commands for that variable will give
unpredictable results.
<P>
An external application which wishes to run a script in Tcl should have
that script store its result in a variable, run the <B>dde execute</B>
command, and the run <B>dde request</B> to get the value of the
variable.
<P>
When using DDE, be careful to ensure that the event queue is flushed
using either <B><A HREF="../TkCmd/update.htm">update</A></B> or <B><A HREF="../TkCmd/vwait.htm">vwait</A></B>. This happens by default
when using <B><A HREF="../UserCmd/wish.htm">wish</A></B> unless a blocking command is called (such as <B><A HREF="../TkCmd/exec.htm">exec</A></B>
without adding the <B>&amp;</B> to place the process in the background).
If for any reason the event queue is not flushed, DDE commands may
hang until the event queue is flushed. This can create a deadlock
situation.
<H3><A NAME="M14">SEE ALSO</A></H3>
<B><A HREF="../TclCmd/tk.htm">tk</A></B>, <B><A HREF="../TclCmd/winfo.htm">winfo</A></B>, <B><A HREF="../TclCmd/send.htm">send</A></B>
<H3><A NAME="M15">KEYWORDS</A></H3>
<A href="../Keywords/A.htm#application">application</A>, <A href="../Keywords/D.htm#dde">dde</A>, <A href="../Keywords/N.htm#name">name</A>, <A href="../Keywords/R.htm#remote execution">remote execution</A>
<HR><PRE>
<A HREF="../copyright.htm">Copyright</A> &#169; 1997 Sun Microsystems, Inc.
<A HREF="../copyright.htm">Copyright</A> &#169; 1995-1997 Roger E. Critchlow Jr.</PRE>
</BODY></HTML>

83
hlp/en/tcl/encoding.htm Normal file
View File

@ -0,0 +1,83 @@
<HTML><HEAD><TITLE>Tcl Built-In Commands - encoding manual page</TITLE></HEAD><BODY>
<DL>
<DD><A HREF="encoding.htm#M2" NAME="L180">NAME</A>
<DL><DD>encoding - Manipulate encodings</DL>
<DD><A HREF="encoding.htm#M3" NAME="L181">SYNOPSIS</A>
<DL>
<DD><B>encoding </B><I>option</I> ?<I>arg arg ...</I>?
</DL>
<DD><A HREF="encoding.htm#M4" NAME="L182">INTRODUCTION</A>
<DD><A HREF="encoding.htm#M5" NAME="L183">DESCRIPTION</A>
<DL>
<DD><A HREF="encoding.htm#M6" NAME="L184"><B>encoding convertfrom ?</B><I>encoding</I>? <I>data</I></A>
<DD><A HREF="encoding.htm#M7" NAME="L185"><B>encoding convertto ?</B><I>encoding</I>? <I>string</I></A>
<DD><A HREF="encoding.htm#M8" NAME="L186"><B>encoding names</B></A>
<DD><A HREF="encoding.htm#M9" NAME="L187"><B>encoding system</B> ?<I>encoding</I>?</A>
</DL>
<DD><A HREF="encoding.htm#M10" NAME="L188">EXAMPLE</A>
<DD><A HREF="encoding.htm#M11" NAME="L189">SEE ALSO</A>
<DD><A HREF="encoding.htm#M12" NAME="L190">KEYWORDS</A>
</DL><HR>
<H3><A NAME="M2">NAME</A></H3>
encoding - Manipulate encodings
<H3><A NAME="M3">SYNOPSIS</A></H3>
<B>encoding </B><I>option</I> ?<I>arg arg ...</I>?<BR>
<H3><A NAME="M4">INTRODUCTION</A></H3>
Strings in Tcl are encoded using 16-bit Unicode characters. Different
operating system interfaces or applications may generate strings in
other encodings such as Shift-JIS. The <B>encoding</B> command helps
to bridge the gap between Unicode and these other formats.
<H3><A NAME="M5">DESCRIPTION</A></H3>
Performs one of several encoding related operations, depending on
<I>option</I>. The legal <I>option</I>s are:
<P>
<DL>
<P><DT><A NAME="M6"><B>encoding convertfrom ?</B><I>encoding</I>? <I>data</I></A><DD>
Convert <I>data</I> to Unicode from the specified <I>encoding</I>. The
characters in <I>data</I> are treated as binary data where the lower
8-bits of each character is taken as a single byte. The resulting
sequence of bytes is treated as a string in the specified
<I>encoding</I>. If <I>encoding</I> is not specified, the current
system encoding is used.
<P><DT><A NAME="M7"><B>encoding convertto ?</B><I>encoding</I>? <I>string</I></A><DD>
Convert <I>string</I> from Unicode to the specified <I>encoding</I>.
The result is a sequence of bytes that represents the converted
string. Each byte is stored in the lower 8-bits of a Unicode
character. If <I>encoding</I> is not specified, the current
system encoding is used.
<P><DT><A NAME="M8"><B>encoding names</B></A><DD>
Returns a list containing the names of all of the encodings that are
currently available.
<P><DT><A NAME="M9"><B>encoding system</B> ?<I>encoding</I>?</A><DD>
Set the system encoding to <I>encoding</I>. If <I>encoding</I> is
omitted then the command returns the current system encoding. The
system encoding is used whenever Tcl passes strings to system calls.
<P></DL>
<H3><A NAME="M10">EXAMPLE</A></H3>
It is common practice to write script files using a text editor that
produces output in the euc-jp encoding, which represents the ASCII
characters as singe bytes and Japanese characters as two bytes. This
makes it easy to embed literal strings that correspond to non-ASCII
characters by simply typing the strings in place in the script.
However, because the <B><A HREF="../TkCmd/source.htm">source</A></B> command always reads files using the
ISO8859-1 encoding, Tcl will treat each byte in the file as a separate
character that maps to the 00 page in Unicode. The
resulting Tcl strings will not contain the expected Japanese
characters. Instead, they will contain a sequence of Latin-1
characters that correspond to the bytes of the original string. The
<B>encoding</B> command can be used to convert this string to the
expected Japanese Unicode characters. For example,
<PRE>set s [encoding convertfrom euc-jp &quot;&#92;xA4&#92;xCF&quot;]</PRE>
would return the Unicode string &quot;&#92;u306F&quot;, which is the Hiragana
letter HA.
<H3><A NAME="M11">SEE ALSO</A></H3>
<B><A HREF="../TkLib/Encoding.htm">Tcl_GetEncoding</A></B>
<H3><A NAME="M12">KEYWORDS</A></H3>
<A href="../Keywords/E.htm#encoding">encoding</A>
<HR><PRE>
<A HREF="../copyright.htm">Copyright</A> &#169; 1998 by Scriptics Corporation.
<A HREF="../copyright.htm">Copyright</A> &#169; 1995-1997 Roger E. Critchlow Jr.</PRE>
</BODY></HTML>

19
hlp/en/tcl/eof.htm Normal file
View File

@ -0,0 +1,19 @@
<HTML><HEAD><TITLE>Tcl Built-In Commands - eof manual page</TITLE></HEAD><BODY>
<H3><A NAME="M2">NAME</A></H3>
eof - Check for end of file condition on channel
<H3><A NAME="M3">SYNOPSIS</A></H3>
<B>eof </B><I>channelId</I><BR>
<H3><A NAME="M4">DESCRIPTION</A></H3>
Returns 1 if an end of file condition occurred during the most
recent input operation on <I>channelId</I> (such as <B><A HREF="../TkCmd/gets.htm">gets</A></B>),
0 otherwise.
<H3><A NAME="M5">SEE ALSO</A></H3>
<B><A HREF="../TkCmd/file.htm">file</A></B>, <B><A HREF="../TkCmd/open.htm">open</A></B>, <B><A HREF="../TkCmd/close.htm">close</A></B>, <B><A HREF="../TkCmd/fblocked.htm">fblocked</A></B>
<H3><A NAME="M6">KEYWORDS</A></H3>
<A href="../Keywords/C.htm#channel">channel</A>, <A href="../Keywords/E.htm#end of file">end of file</A>
<HR><PRE>
<A HREF="../copyright.htm">Copyright</A> &#169; 1993 The Regents of the University of California.
<A HREF="../copyright.htm">Copyright</A> &#169; 1994-1996 Sun Microsystems, Inc.
<A HREF="../copyright.htm">Copyright</A> &#169; 1995-1997 Roger E. Critchlow Jr.</PRE>
</BODY></HTML>

48
hlp/en/tcl/error.htm Normal file
View File

@ -0,0 +1,48 @@
<HTML><HEAD><TITLE>Built-In Commands - error manual page</TITLE></HEAD><BODY>
<H3><A NAME="M2">NAME</A></H3>
error - Generate an error
<H3><A NAME="M3">SYNOPSIS</A></H3>
<B>error </B><I>message</I> ?<I>info</I>? ?<I>code</I>?<BR>
<H3><A NAME="M4">DESCRIPTION</A></H3>
Returns a TCL_ERROR code, which causes command interpretation to be
unwound. <I>Message</I> is a string that is returned to the application
to indicate what went wrong.
<P>
If the <I>info</I> argument is provided and is non-empty,
it is used to initialize the global variable <B>errorInfo</B>.
<B>errorInfo</B> is used to accumulate a stack trace of what
was in progress when an error occurred; as nested commands unwind,
the Tcl interpreter adds information to <B>errorInfo</B>. If the
<I>info</I> argument is present, it is used to initialize
<B>errorInfo</B> and the first increment of unwind information
will not be added by the Tcl interpreter. In other
words, the command containing the <B>error</B> command will not appear
in <B>errorInfo</B>; in its place will be <I>info</I>.
This feature is most useful in conjunction with the <B><A HREF="../TkCmd/catch.htm">catch</A></B> command:
if a caught error cannot be handled successfully, <I>info</I> can be used
to return a stack trace reflecting the original point of occurrence
of the error:
<PRE><B>catch {...} errMsg
set savedInfo $errorInfo
...
error $errMsg $savedInfo</B></PRE>
<P>
If the <I>code</I> argument is present, then its value is stored
in the <B>errorCode</B> global variable. This variable is intended
to hold a machine-readable description of the error in cases where
such information is available; see the <B><A HREF="../TkCmd/tclvars.htm">tclvars</A></B> manual
page for information on the proper format for the variable.
If the <I>code</I> argument is not
present, then <B>errorCode</B> is automatically reset to
``NONE'' by the Tcl interpreter as part of processing the
error generated by the command.
<H3><A NAME="M5">SEE ALSO</A></H3>
<B><A HREF="../TkCmd/catch.htm">catch</A></B>, <B><A HREF="../TkCmd/tclvars.htm">tclvars</A></B>
<H3><A NAME="M6">KEYWORDS</A></H3>
<A href="../Keywords/E.htm#error">error</A>, <A href="../Keywords/E.htm#errorCode">errorCode</A>, <A href="../Keywords/E.htm#errorInfo">errorInfo</A>
<HR><PRE>
<A HREF="../copyright.htm">Copyright</A> &#169; 1993 The Regents of the University of California.
<A HREF="../copyright.htm">Copyright</A> &#169; 1994-1996 Sun Microsystems, Inc.
<A HREF="../copyright.htm">Copyright</A> &#169; 1995-1997 Roger E. Critchlow Jr.</PRE>
</BODY></HTML>

22
hlp/en/tcl/eval.htm Normal file
View File

@ -0,0 +1,22 @@
<HTML><HEAD><TITLE>Built-In Commands - eval manual page</TITLE></HEAD><BODY>
<H3><A NAME="M2">NAME</A></H3>
eval - Evaluate a Tcl script
<H3><A NAME="M3">SYNOPSIS</A></H3>
<B>eval </B><I>arg </I>?<I>arg ...</I>?<BR>
<H3><A NAME="M4">DESCRIPTION</A></H3>
<B>Eval</B> takes one or more arguments, which together comprise a Tcl
script containing one or more commands.
<B>Eval</B> concatenates all its arguments in the same
fashion as the <B><A HREF="../TkCmd/concat.htm">concat</A></B> command, passes the concatenated string to the
Tcl interpreter recursively, and returns the result of that
evaluation (or any error generated by it).
<H3><A NAME="M5">KEYWORDS</A></H3>
<A href="../Keywords/C.htm#concatenate">concatenate</A>, <A href="../Keywords/E.htm#evaluate">evaluate</A>, <A href="../Keywords/S.htm#script">script</A>
<H3><A NAME="M6">SEE ALSO</A></H3>
<B><A HREF="../TkCmd/catch.htm">catch</A></B>, <B><A HREF="../TkCmd/concat.htm">concat</A></B>, <B><A HREF="../TkCmd/error.htm">error</A></B>, <B>subs</B>, <B><A HREF="../TkCmd/tclvars.htm">tclvars</A></B>
<HR><PRE>
<A HREF="../copyright.htm">Copyright</A> &#169; 1993 The Regents of the University of California.
<A HREF="../copyright.htm">Copyright</A> &#169; 1994-1996 Sun Microsystems, Inc.
<A HREF="../copyright.htm">Copyright</A> &#169; 1995-1997 Roger E. Critchlow Jr.</PRE>
</BODY></HTML>

314
hlp/en/tcl/exec.htm Normal file
View File

@ -0,0 +1,314 @@
<HTML><HEAD><TITLE>Tcl Built-In Commands - exec manual page</TITLE></HEAD><BODY>
<DL>
<DD><A HREF="exec.htm#M2" NAME="L206">NAME</A>
<DL><DD>exec - Invoke subprocess(es)</DL>
<DD><A HREF="exec.htm#M3" NAME="L207">SYNOPSIS</A>
<DL>
<DD><B>exec </B>?<I>switches</I>? <I>arg </I>?<I>arg ...</I>?
</DL>
<DD><A HREF="exec.htm#M4" NAME="L208">DESCRIPTION</A>
<DL>
<DD><A HREF="exec.htm#M5" NAME="L209"><B>-keepnewline</B></A>
<DD><A HREF="exec.htm#M6" NAME="L210"><B>-&nbsp;-</B></A>
</DL>
<DL>
<DD><A HREF="exec.htm#M7" NAME="L211">|</A>
<DD><A HREF="exec.htm#M8" NAME="L212">|&amp;</A>
<DD><A HREF="exec.htm#M9" NAME="L213">&lt; <I>fileName</I></A>
<DD><A HREF="exec.htm#M10" NAME="L214">&lt;@ <I>fileId</I></A>
<DD><A HREF="exec.htm#M11" NAME="L215">&lt;&lt; <I>value</I></A>
<DD><A HREF="exec.htm#M12" NAME="L216">&gt; <I>fileName</I></A>
<DD><A HREF="exec.htm#M13" NAME="L217">2&gt; <I>fileName</I></A>
<DD><A HREF="exec.htm#M14" NAME="L218">&gt;&amp; <I>fileName</I></A>
<DD><A HREF="exec.htm#M15" NAME="L219">&gt;&gt; <I>fileName</I></A>
<DD><A HREF="exec.htm#M16" NAME="L220">2&gt;&gt; <I>fileName</I></A>
<DD><A HREF="exec.htm#M17" NAME="L221">&gt;&gt;&amp; <I>fileName</I></A>
<DD><A HREF="exec.htm#M18" NAME="L222">&gt;@ <I>fileId</I></A>
<DD><A HREF="exec.htm#M19" NAME="L223">2&gt;@ <I>fileId</I></A>
<DD><A HREF="exec.htm#M20" NAME="L224">&gt;&amp;@ <I>fileId</I></A>
</DL>
<DD><A HREF="exec.htm#M21" NAME="L225">PORTABILITY ISSUES</A>
<DL>
<DD><A HREF="exec.htm#M22" NAME="L226"><B>Windows</B> (all versions)</A>
<DD><A HREF="exec.htm#M23" NAME="L227"><B>Windows NT</B></A>
<DD><A HREF="exec.htm#M24" NAME="L228"><B>Windows 95</B></A>
<DD><A HREF="exec.htm#M25" NAME="L229"><B>Macintosh</B></A>
<DD><A HREF="exec.htm#M26" NAME="L230"><B>Unix</B></A>
</DL>
<DD><A HREF="exec.htm#M27" NAME="L231">SEE ALSO</A>
<DD><A HREF="exec.htm#M28" NAME="L232">KEYWORDS</A>
</DL><HR>
<H3><A NAME="M2">NAME</A></H3>
exec - Invoke subprocess(es)
<H3><A NAME="M3">SYNOPSIS</A></H3>
<B>exec </B>?<I>switches</I>? <I>arg </I>?<I>arg ...</I>?<BR>
<H3><A NAME="M4">DESCRIPTION</A></H3>
This command treats its arguments as the specification
of one or more subprocesses to execute.
The arguments take the form of a standard shell pipeline
where each <I>arg</I> becomes one word of a command, and
each distinct command becomes a subprocess.
<P>
If the initial arguments to <B>exec</B> start with <B>-</B> then
they are treated as command-line switches and are not part
of the pipeline specification. The following switches are
currently supported:
<P>
<DL>
<P><DT><A NAME="M5"><B>-keepnewline</B></A><DD>
Retains a trailing newline in the pipeline's output.
Normally a trailing newline will be deleted.
<P><DT><A NAME="M6"><B>-&nbsp;-</B></A><DD>
Marks the end of switches. The argument following this one will
be treated as the first <I>arg</I> even if it starts with a <B>-</B>.
<P></DL>
<P>
If an <I>arg</I> (or pair of <I>arg</I>'s) has one of the forms
described below then it is used by <B>exec</B> to control the
flow of input and output among the subprocess(es).
Such arguments will not be passed to the subprocess(es). In forms
such as ``&lt; <I>fileName</I>'' <I>fileName</I> may either be in a
separate argument from ``&lt;'' or in the same argument with no
intervening space (i.e. ``&lt;<I>fileName</I>'').
<P>
<DL>
<P><DT><A NAME="M7">|</A><DD>
Separates distinct commands in the pipeline. The standard output
of the preceding command will be piped into the standard input
of the next command.
<P><DT><A NAME="M8">|&amp;</A><DD>
Separates distinct commands in the pipeline. Both standard output
and standard error of the preceding command will be piped into
the standard input of the next command.
This form of redirection overrides forms such as 2&gt; and &gt;&amp;.
<P><DT><A NAME="M9">&lt; <I>fileName</I></A><DD>
The file named by <I>fileName</I> is opened and used as the standard
input for the first command in the pipeline.
<P><DT><A NAME="M10">&lt;@ <I>fileId</I></A><DD>
<I>FileId</I> must be the identifier for an open file, such as the return
value from a previous call to <B><A HREF="../TkCmd/open.htm">open</A></B>.
It is used as the standard input for the first command in the pipeline.
<I>FileId</I> must have been opened for reading.
<P><DT><A NAME="M11">&lt;&lt; <I>value</I></A><DD>
<I>Value</I> is passed to the first command as its standard input.
<P><DT><A NAME="M12">&gt; <I>fileName</I></A><DD>
Standard output from the last command is redirected to the file named
<I>fileName</I>, overwriting its previous contents.
<P><DT><A NAME="M13">2&gt; <I>fileName</I></A><DD>
Standard error from all commands in the pipeline is redirected to the
file named <I>fileName</I>, overwriting its previous contents.
<P><DT><A NAME="M14">&gt;&amp; <I>fileName</I></A><DD>
Both standard output from the last command and standard error from all
commands are redirected to the file named <I>fileName</I>, overwriting
its previous contents.
<P><DT><A NAME="M15">&gt;&gt; <I>fileName</I></A><DD>
Standard output from the last command is
redirected to the file named <I>fileName</I>, appending to it rather
than overwriting it.
<P><DT><A NAME="M16">2&gt;&gt; <I>fileName</I></A><DD>
Standard error from all commands in the pipeline is
redirected to the file named <I>fileName</I>, appending to it rather
than overwriting it.
<P><DT><A NAME="M17">&gt;&gt;&amp; <I>fileName</I></A><DD>
Both standard output from the last command and standard error from
all commands are redirected to the file named <I>fileName</I>,
appending to it rather than overwriting it.
<P><DT><A NAME="M18">&gt;@ <I>fileId</I></A><DD>
<I>FileId</I> must be the identifier for an open file, such as the return
value from a previous call to <B><A HREF="../TkCmd/open.htm">open</A></B>.
Standard output from the last command is redirected to <I>fileId</I>'s
file, which must have been opened for writing.
<P><DT><A NAME="M19">2&gt;@ <I>fileId</I></A><DD>
<I>FileId</I> must be the identifier for an open file, such as the return
value from a previous call to <B><A HREF="../TkCmd/open.htm">open</A></B>.
Standard error from all commands in the pipeline is
redirected to <I>fileId</I>'s file.
The file must have been opened for writing.
<P><DT><A NAME="M20">&gt;&amp;@ <I>fileId</I></A><DD>
<I>FileId</I> must be the identifier for an open file, such as the return
value from a previous call to <B><A HREF="../TkCmd/open.htm">open</A></B>.
Both standard output from the last command and standard error from
all commands are redirected to <I>fileId</I>'s file.
The file must have been opened for writing.
<P></DL>
<P>
If standard output has not been redirected then the <B>exec</B>
command returns the standard output from the last command
in the pipeline.
If any of the commands in the pipeline exit abnormally or
are killed or suspended, then <B>exec</B> will return an error
and the error message will include the pipeline's output followed by
error messages describing the abnormal terminations; the
<B>errorCode</B> variable will contain additional information
about the last abnormal termination encountered.
If any of the commands writes to its standard error file and that
standard error isn't redirected,
then <B>exec</B> will return an error; the error message
will include the pipeline's standard output, followed by messages
about abnormal terminations (if any), followed by the standard error
output.
<P>
If the last character of the result or error message
is a newline then that character is normally deleted
from the result or error message.
This is consistent with other Tcl return values, which don't
normally end with newlines.
However, if <B>-keepnewline</B> is specified then the trailing
newline is retained.
<P>
If standard input isn't redirected with ``&lt;'' or ``&lt;&lt;''
or ``&lt;@'' then the standard input for the first command in the
pipeline is taken from the application's current standard input.
<P>
If the last <I>arg</I> is ``&amp;'' then the pipeline will be
executed in background.
In this case the <B>exec</B> command will return a list whose
elements are the process identifiers for all of the subprocesses
in the pipeline.
The standard output from the last command in the pipeline will
go to the application's standard output if it hasn't been
redirected, and error output from all of
the commands in the pipeline will go to the application's
standard error file unless redirected.
<P>
The first word in each command is taken as the command name;
tilde-substitution is performed on it, and if the result contains
no slashes then the directories
in the PATH environment variable are searched for
an executable by the given name.
If the name contains a slash then it must refer to an executable
reachable from the current directory.
No ``<A HREF="../TkCmd/glob.htm">glob</A>'' expansion or other shell-like substitutions
are performed on the arguments to commands.
<H3><A NAME="M21">PORTABILITY ISSUES</A></H3>
<DL>
<P><DT><A NAME="M22"><B>Windows</B> (all versions)</A><DD>
Reading from or writing to a socket, using the ``<B>@ </B><I>fileId</I>''
notation, does not work. When reading from a socket, a 16-bit DOS
application will hang and a 32-bit application will return immediately with
end-of-file. When either type of application writes to a socket, the
information is instead sent to the console, if one is present, or is
discarded.
<P>
The Tk console text widget does not provide real standard IO capabilities.
Under Tk, when redirecting from standard input, all applications will see an
immediate end-of-file; information redirected to standard output or standard
error will be discarded.
<P>
Either forward or backward slashes are accepted as path separators for
arguments to Tcl commands. When executing an application, the path name
specified for the application may also contain forward or backward slashes
as path separators. Bear in mind, however, that most Windows applications
accept arguments with forward slashes only as option delimiters and
backslashes only in paths. Any arguments to an application that specify a
path name with forward slashes will not automatically be converted to use
the backslash character. If an argument contains forward slashes as the
path separator, it may or may not be recognized as a path name, depending on
the program.
<P>
Additionally, when calling a 16-bit DOS or Windows 3.X application, all path
names must use the short, cryptic, path format (e.g., using ``applba~1.def''
instead of ``applbakery.default'').
<P>
Two or more forward or backward slashes in a row in a path refer to a
network path. For example, a simple concatenation of the root directory
<B>c:/</B> with a subdirectory <B>/windows/system</B> will yield
<B>c://windows/system</B> (two slashes together), which refers to the mount
point called <B>system</B> on the machine called <B>windows</B> (and the
<B>c:/</B> is ignored), and is not equivalent to <B>c:/windows/system</B>,
which describes a directory on the current computer. The <B><A HREF="../TkCmd/file.htm">file join</A></B>
command should be used to concatenate path components.
<P><DT><A NAME="M23"><B>Windows NT</B></A><DD>
When attempting to execute an application, <B>exec</B> first searches for the
name as it was specified. Then, in order, <B>.com</B>, <B>.exe</B>, and <B>.bat</B>
are appended to the end of the specified name and it searches for
the longer name. If a directory name was not specified as part of the
application name, the following directories are automatically searched in
order when attempting to locate the application:
<P>
<DL><P><DD>
The directory from which the Tcl executable was loaded.
<BR>
The current directory.
<BR>
The Windows NT 32-bit system directory.
<BR>
The Windows NT 16-bit system directory.
<BR>
The Windows NT home directory.
<BR>
The directories listed in the path.
</DL>
<P>
In order to execute the shell builtin commands like <B>dir</B> and <B>copy</B>,
the caller must prepend ``<B>cmd.exe /c </B>'' to the desired command.
<P>
<P><DT><A NAME="M24"><B>Windows 95</B></A><DD>
When attempting to execute an application, <B>exec</B> first searches for the
name as it was specified. Then, in order, <B>.com</B>, <B>.exe</B>, and <B>.bat</B>
are appended to the end of the specified name and it searches for
the longer name. If a directory name was not specified as part of the
application name, the following directories are automatically searched in
order when attempting to locate the application:
<P>
<DL><P><DD>
The directory from which the Tcl executable was loaded.
<BR>
The current directory.
<BR>
The Windows 95 system directory.
<BR>
The Windows 95 home directory.
<BR>
The directories listed in the path.
</DL>
<P>
In order to execute the shell builtin commands like <B>dir</B> and <B>copy</B>,
the caller must prepend ``<B>command.com /c </B>'' to the desired command.
<P>
Once a 16-bit DOS application has read standard input from a console and
then quit, all subsequently run 16-bit DOS applications will see the
standard input as already closed. 32-bit applications do not have this
problem and will run correctly, even after a 16-bit DOS application thinks
that standard input is closed. There is no known workaround for this bug
at this time.
<P>
Redirection between the <B>NUL:</B> device and a 16-bit application does not
always work. When redirecting from <B>NUL:</B>, some applications may hang,
others will get an infinite stream of ``0x01'' bytes, and some will actually
correctly get an immediate end-of-file; the behavior seems to depend upon
something compiled into the application itself. When redirecting greater than
4K or so to <B>NUL:</B>, some applications will hang. The above problems do not
happen with 32-bit applications.
<P>
All DOS 16-bit applications are run synchronously. All standard input from
a pipe to a 16-bit DOS application is collected into a temporary file; the
other end of the pipe must be closed before the 16-bit DOS application
begins executing. All standard output or error from a 16-bit DOS
application to a pipe is collected into temporary files; the application
must terminate before the temporary files are redirected to the next stage
of the pipeline. This is due to a workaround for a Windows 95 bug in the
implementation of pipes, and is how the standard Windows 95 DOS shell
handles pipes itself.
<P>
Certain applications, such as <B>command.com</B>, should not be executed
interactively. Applications which directly access the console window,
rather than reading from their standard input and writing to their standard
output may fail, hang Tcl, or even hang the system if their own private
console window is not available to them.
<P><DT><A NAME="M25"><B>Macintosh</B></A><DD>
The <B>exec</B> command is not implemented and does not exist under Macintosh.
<P><DT><A NAME="M26"><B>Unix</B></A><DD>
The <B>exec</B> command is fully functional and works as described.
<P></DL>
<H3><A NAME="M27">SEE ALSO</A></H3>
<B><A HREF="../TkCmd/error.htm">error</A></B>, <B><A HREF="../TkCmd/open.htm">open</A></B>
<H3><A NAME="M28">KEYWORDS</A></H3>
<A href="../Keywords/E.htm#execute">execute</A>, <A href="../Keywords/P.htm#pipeline">pipeline</A>, <A href="../Keywords/R.htm#redirection">redirection</A>, <A href="../Keywords/S.htm#subprocess">subprocess</A>
<HR><PRE>
<A HREF="../copyright.htm">Copyright</A> &#169; 1993 The Regents of the University of California.
<A HREF="../copyright.htm">Copyright</A> &#169; 1994-1996 Sun Microsystems, Inc.
<A HREF="../copyright.htm">Copyright</A> &#169; 1995-1997 Roger E. Critchlow Jr.</PRE>
</BODY></HTML>

20
hlp/en/tcl/exit.htm Normal file
View File

@ -0,0 +1,20 @@
<HTML><HEAD><TITLE>Built-In Commands - exit manual page</TITLE></HEAD><BODY>
<H3><A NAME="M2">NAME</A></H3>
exit - End the application
<H3><A NAME="M3">SYNOPSIS</A></H3>
<B>exit </B>?<I>returnCode</I>?<BR>
<H3><A NAME="M4">DESCRIPTION</A></H3>
Terminate the process, returning <I>returnCode</I> to the
system as the exit status.
If <I>returnCode</I> isn't specified then it defaults
to 0.
<H3><A NAME="M5">SEE ALSO</A></H3>
<B><A HREF="../TkCmd/exec.htm">exec</A></B>, <B><A HREF="../TkCmd/tclvars.htm">tclvars</A></B>
<H3><A NAME="M6">KEYWORDS</A></H3>
<A href="../Keywords/E.htm#exit">exit</A>, <A href="../Keywords/P.htm#process">process</A>
<HR><PRE>
<A HREF="../copyright.htm">Copyright</A> &#169; 1993 The Regents of the University of California.
<A HREF="../copyright.htm">Copyright</A> &#169; 1994-1996 Sun Microsystems, Inc.
<A HREF="../copyright.htm">Copyright</A> &#169; 1995-1997 Roger E. Critchlow Jr.</PRE>
</BODY></HTML>

380
hlp/en/tcl/expr.htm Normal file
View File

@ -0,0 +1,380 @@
<HTML><HEAD><TITLE>Tcl Built-In Commands - expr manual page</TITLE></HEAD><BODY>
<DL>
<DD><A HREF="expr.htm#M2" NAME="L238">NAME</A>
<DL><DD>expr - Evaluate an expression</DL>
<DD><A HREF="expr.htm#M3" NAME="L239">SYNOPSIS</A>
<DL>
<DD><B>expr </B><I>arg </I>?<I>arg arg ...</I>?
</DL>
<DD><A HREF="expr.htm#M4" NAME="L240">DESCRIPTION</A>
<DD><A HREF="expr.htm#M5" NAME="L241">OPERANDS</A>
<DL>
</DL>
<DD><A HREF="expr.htm#M6" NAME="L242">OPERATORS</A>
<DL>
<DD><A HREF="expr.htm#M7" NAME="L243"><B>- + ~ !</B></A>
<DD><A HREF="expr.htm#M8" NAME="L244"><B>* / %</B></A>
<DD><A HREF="expr.htm#M9" NAME="L245"><B>+ -</B></A>
<DD><A HREF="expr.htm#M10" NAME="L246"><B>&lt;&lt; &gt;&gt;</B></A>
<DD><A HREF="expr.htm#M11" NAME="L247"><B>&lt; &gt; &lt;= &gt;=</B></A>
<DD><A HREF="expr.htm#M12" NAME="L248"><B>== !=</B></A>
<DD><A HREF="expr.htm#M13" NAME="L249"><B>&amp;</B></A>
<DD><A HREF="expr.htm#M14" NAME="L250"><B>^</B></A>
<DD><A HREF="expr.htm#M15" NAME="L251"><B>|</B></A>
<DD><A HREF="expr.htm#M16" NAME="L252"><B>&amp;&amp;</B></A>
<DD><A HREF="expr.htm#M17" NAME="L253"><B>||</B></A>
<DD><A HREF="expr.htm#M18" NAME="L254"><I>x</I><B>?</B><I>y</I><B>:</B><I>z</I></A>
</DL>
<DD><A HREF="expr.htm#M19" NAME="L255">MATH FUNCTIONS</A>
<DL>
<DD><A HREF="expr.htm#M20" NAME="L256"><B>abs(</B><I>arg</I><B>)</B></A>
<DD><A HREF="expr.htm#M21" NAME="L257"><B>acos(</B><I>arg</I><B>)</B></A>
<DD><A HREF="expr.htm#M22" NAME="L258"><B>asin(</B><I>arg</I><B>)</B></A>
<DD><A HREF="expr.htm#M23" NAME="L259"><B>atan(</B><I>arg</I><B>)</B></A>
<DD><A HREF="expr.htm#M24" NAME="L260"><B>atan2(</B><I>x, y</I><B>)</B></A>
<DD><A HREF="expr.htm#M25" NAME="L261"><B>ceil(</B><I>arg</I><B>)</B></A>
<DD><A HREF="expr.htm#M26" NAME="L262"><B>cos(</B><I>arg</I><B>)</B></A>
<DD><A HREF="expr.htm#M27" NAME="L263"><B>cosh(</B><I>arg</I><B>)</B></A>
<DD><A HREF="expr.htm#M28" NAME="L264"><B>double(</B><I>arg</I><B>)</B></A>
<DD><A HREF="expr.htm#M29" NAME="L265"><B>exp(</B><I>arg</I><B>)</B></A>
<DD><A HREF="expr.htm#M30" NAME="L266"><B>floor(</B><I>arg</I><B>)</B></A>
<DD><A HREF="expr.htm#M31" NAME="L267"><B>fmod(</B><I>x, y</I><B>)</B></A>
<DD><A HREF="expr.htm#M32" NAME="L268"><B>hypot(</B><I>x, y</I><B>)</B></A>
<DD><A HREF="expr.htm#M33" NAME="L269"><B>int(</B><I>arg</I><B>)</B></A>
<DD><A HREF="expr.htm#M34" NAME="L270"><B>log(</B><I>arg</I><B>)</B></A>
<DD><A HREF="expr.htm#M35" NAME="L271"><B>log10(</B><I>arg</I><B>)</B></A>
<DD><A HREF="expr.htm#M36" NAME="L272"><B>pow(</B><I>x, y</I><B>)</B></A>
<DD><A HREF="expr.htm#M37" NAME="L273"><B>rand()</B></A>
<DD><A HREF="expr.htm#M38" NAME="L274"><B>round(</B><I>arg</I><B>)</B></A>
<DD><A HREF="expr.htm#M39" NAME="L275"><B>sin(</B><I>arg</I><B>)</B></A>
<DD><A HREF="expr.htm#M40" NAME="L276"><B>sinh(</B><I>arg</I><B>)</B></A>
<DD><A HREF="expr.htm#M41" NAME="L277"><B>sqrt(</B><I>arg</I><B>)</B></A>
<DD><A HREF="expr.htm#M42" NAME="L278"><B>srand(</B><I>arg</I><B>)</B></A>
<DD><A HREF="expr.htm#M43" NAME="L279"><B>tan(</B><I>arg</I><B>)</B></A>
<DD><A HREF="expr.htm#M44" NAME="L280"><B>tanh(</B><I>arg</I><B>)</B></A>
</DL>
<DD><A HREF="expr.htm#M45" NAME="L281">TYPES, OVERFLOW, AND PRECISION</A>
<DD><A HREF="expr.htm#M46" NAME="L282">STRING OPERATIONS</A>
<DD><A HREF="expr.htm#M47" NAME="L283">PERFORMANCE CONSIDERATIONS</A>
<DD><A HREF="expr.htm#M48" NAME="L284">KEYWORDS</A>
</DL><HR>
<H3><A NAME="M2">NAME</A></H3>
expr - Evaluate an expression
<H3><A NAME="M3">SYNOPSIS</A></H3>
<B>expr </B><I>arg </I>?<I>arg arg ...</I>?<BR>
<H3><A NAME="M4">DESCRIPTION</A></H3>
Concatenates <I>arg</I>'s (adding separator spaces between them),
evaluates the result as a Tcl expression, and returns the value.
The operators permitted in Tcl expressions are a subset of
the operators permitted in C expressions, and they have the
same meaning and precedence as the corresponding C operators.
Expressions almost always yield numeric results
(integer or floating-point values).
For example, the expression
<PRE><B>expr 8.2 + 6</B></PRE>
evaluates to 14.2.
Tcl expressions differ from C expressions in the way that
operands are specified. Also, Tcl expressions support
non-numeric operands and string comparisons.
<H3><A NAME="M5">OPERANDS</A></H3>
A Tcl expression consists of a combination of operands, operators,
and parentheses.
White space may be used between the operands and operators and
parentheses; it is ignored by the expression's instructions.
Where possible, operands are interpreted as integer values.
Integer values may be specified in decimal (the normal case), in octal (if the
first character of the operand is <B>0</B>), or in hexadecimal (if the first
two characters of the operand are <B>0x</B>).
If an operand does not have one of the integer formats given
above, then it is treated as a floating-point number if that is
possible. Floating-point numbers may be specified in any of the
ways accepted by an ANSI-compliant C compiler (except that the
<B>f</B>, <B>F</B>, <B>l</B>, and <B>L</B> suffixes will not be permitted in
most installations). For example, all of the
following are valid floating-point numbers: 2.1, 3., 6e4, 7.91e+16.
If no numeric interpretation is possible, then an operand is left
as a string (and only a limited set of operators may be applied to
it).
<P>
Operands may be specified in any of the following ways:
<P>
<DL>
<P><DT>[1]<DD>
As an numeric value, either integer or floating-point.
<P><DT>[2]<DD>
As a Tcl variable, using standard <B>$</B> notation.
The variable's value will be used as the operand.
<P><DT>[3]<DD>
As a string enclosed in double-quotes.
The expression parser will perform backslash, variable, and
command substitutions on the information between the quotes,
and use the resulting value as the operand
<P><DT>[4]<DD>
As a string enclosed in braces.
The characters between the open brace and matching close brace
will be used as the operand without any substitutions.
<P><DT>[5]<DD>
As a Tcl command enclosed in brackets.
The command will be executed and its result will be used as
the operand.
<P><DT>[6]<DD>
As a mathematical function whose arguments have any of the above
forms for operands, such as <B>sin($x)</B>. See below for a list of defined
functions.
<P></DL>
<P>
Where substitutions occur above (e.g. inside quoted strings), they
are performed by the expression's instructions.
However, an additional layer of substitution may already have
been performed by the command parser before the expression
processor was called.
As discussed below, it is usually best to enclose expressions
in braces to prevent the command parser from performing substitutions
on the contents.
<P>
For some examples of simple expressions, suppose the variable
<B>a</B> has the value 3 and
the variable <B>b</B> has the value 6.
Then the command on the left side of each of the lines below
will produce the value on the right side of the line:
<PRE><B>expr 3.1 + $a 6.1
expr 2 + &quot;$a.$b&quot; 5.6
expr 4*[llength &quot;6 2&quot;] 8
expr {{word one} &lt; &quot;word $a&quot;} 0</B></PRE>
<H3><A NAME="M6">OPERATORS</A></H3>
The valid operators are listed below, grouped in decreasing order
of precedence:
<P>
<DL>
<P><DT><A NAME="M7"><B>- + ~ !</B></A><DD>
Unary minus, unary plus, bit-wise NOT, logical NOT. None of these operands
may be applied to string operands, and bit-wise NOT may be
applied only to integers.
<P><DT><A NAME="M8"><B>* / %</B></A><DD>
Multiply, divide, remainder. None of these operands may be
applied to string operands, and remainder may be applied only
to integers.
The remainder will always have the same sign as the divisor and
an absolute value smaller than the divisor.
<P><DT><A NAME="M9"><B>+ -</B></A><DD>
Add and subtract. Valid for any numeric operands.
<P><DT><A NAME="M10"><B>&lt;&lt; &gt;&gt;</B></A><DD>
Left and right shift. Valid for integer operands only.
A right shift always propagates the sign bit.
<P><DT><A NAME="M11"><B>&lt; &gt; &lt;= &gt;=</B></A><DD>
Boolean less, greater, less than or equal, and greater than or equal.
Each operator produces 1 if the condition is true, 0 otherwise.
These operators may be applied to strings as well as numeric operands,
in which case string comparison is used.
<P><DT><A NAME="M12"><B>== !=</B></A><DD>
Boolean equal and not equal. Each operator produces a zero/one result.
Valid for all operand types.
<P><DT><A NAME="M13"><B>&amp;</B></A><DD>
Bit-wise AND. Valid for integer operands only.
<P><DT><A NAME="M14"><B>^</B></A><DD>
Bit-wise exclusive OR. Valid for integer operands only.
<P><DT><A NAME="M15"><B>|</B></A><DD>
Bit-wise OR. Valid for integer operands only.
<P><DT><A NAME="M16"><B>&amp;&amp;</B></A><DD>
Logical AND. Produces a 1 result if both operands are non-zero,
0 otherwise.
Valid for boolean and numeric (integers or floating-point) operands only.
<P><DT><A NAME="M17"><B>||</B></A><DD>
Logical OR. Produces a 0 result if both operands are zero, 1 otherwise.
Valid for boolean and numeric (integers or floating-point) operands only.
<P><DT><A NAME="M18"><I>x</I><B>?</B><I>y</I><B>:</B><I>z</I></A><DD>
If-then-else, as in C. If <I>x</I>
evaluates to non-zero, then the result is the value of <I>y</I>.
Otherwise the result is the value of <I>z</I>.
The <I>x</I> operand must have a numeric value.
<P></DL>
<P>
See the C manual for more details on the results
produced by each operator.
All of the binary operators group left-to-right within the same
precedence level. For example, the command
<PRE><B>expr 4*2 &lt; 7</B></PRE>
returns 0.
<P>
The <B>&amp;&amp;</B>, <B>||</B>, and <B>?:</B> operators have ``lazy
evaluation'', just as in C,
which means that operands are not evaluated if they are
not needed to determine the outcome. For example, in the command
<PRE><B>expr {$v ? [a] : [b]}</B></PRE>
only one of <B>[a]</B> or <B>[b]</B> will actually be evaluated,
depending on the value of <B>$v</B>. Note, however, that this is
only true if the entire expression is enclosed in braces; otherwise
the Tcl parser will evaluate both <B>[a]</B> and <B>[b]</B> before
invoking the <B>expr</B> command.
<H3><A NAME="M19">MATH FUNCTIONS</A></H3>
Tcl supports the following mathematical functions in expressions:
<PRE><B>abs</B> <B>cosh</B> <B>log</B> <B>sqrt</B>
<B>acos</B> <B>double</B> <B>log10</B> <B>srand</B>
<B>asin</B> <B>exp</B> <B>pow</B> <B>tan</B>
<B>atan</B> <B>floor</B> <B>rand</B> <B>tanh</B>
<B>atan2</B> <B>fmod</B> <B>round</B>
<B>ceil</B> <B>hypot</B> <B>sin</B>
<B>cos</B> <B>int</B> <B>sinh</B></PRE>
<P>
<P>
<DL>
<P><DT><A NAME="M20"><B>abs(</B><I>arg</I><B>)</B></A><DD>
Returns the absolute value of <I>arg</I>. <I>Arg</I> may be either
integer or floating-point, and the result is returned in the same form.
<P><DT><A NAME="M21"><B>acos(</B><I>arg</I><B>)</B></A><DD>
Returns the arc cosine of <I>arg</I>, in the range [0,pi]
radians. <I>Arg</I> should be in the range [-1,1].
<P><DT><A NAME="M22"><B>asin(</B><I>arg</I><B>)</B></A><DD>
Returns the arc sine of <I>arg</I>, in the range [-pi/2,pi/2] radians.
<I>Arg</I> should be in the range [-1,1].
<P><DT><A NAME="M23"><B>atan(</B><I>arg</I><B>)</B></A><DD>
Returns the arc tangent of <I>arg</I>, in the range [-pi/2,pi/2] radians.
<P><DT><A NAME="M24"><B>atan2(</B><I>x, y</I><B>)</B></A><DD>
Returns the arc tangent of <I>y</I>/<I>x</I>, in the range [-pi,pi]
radians. <I>x</I> and <I>y</I> cannot both be 0.
<P><DT><A NAME="M25"><B>ceil(</B><I>arg</I><B>)</B></A><DD>
Returns the smallest integer value not less than <I>arg</I>.
<P><DT><A NAME="M26"><B>cos(</B><I>arg</I><B>)</B></A><DD>
Returns the cosine of <I>arg</I>, measured in radians.
<P><DT><A NAME="M27"><B>cosh(</B><I>arg</I><B>)</B></A><DD>
Returns the hyperbolic cosine of <I>arg</I>. If the result would cause
an overflow, an error is returned.
<P><DT><A NAME="M28"><B>double(</B><I>arg</I><B>)</B></A><DD>
If <I>arg</I> is a floating value, returns <I>arg</I>, otherwise converts
<I>arg</I> to floating and returns the converted value.
<P><DT><A NAME="M29"><B>exp(</B><I>arg</I><B>)</B></A><DD>
Returns the exponential of <I>arg</I>, defined as e**<I>arg</I>. If the
result would cause an overflow, an error is returned.
<P><DT><A NAME="M30"><B>floor(</B><I>arg</I><B>)</B></A><DD>
Returns the largest integral value not greater than <I>arg</I>.
<P><DT><A NAME="M31"><B>fmod(</B><I>x, y</I><B>)</B></A><DD>
Returns the floating-point remainder of the division of <I>x</I> by
<I>y</I>. If <I>y</I> is 0, an error is returned.
<P><DT><A NAME="M32"><B>hypot(</B><I>x, y</I><B>)</B></A><DD>
Computes the length of the hypotenuse of a right-angled triangle
(<I>x</I>*<I>x</I>+<I>y</I>*<I>y</I>).
<P><DT><A NAME="M33"><B>int(</B><I>arg</I><B>)</B></A><DD>
If <I>arg</I> is an integer value, returns <I>arg</I>, otherwise converts
<I>arg</I> to integer by truncation and returns the converted value.
<P><DT><A NAME="M34"><B>log(</B><I>arg</I><B>)</B></A><DD>
Returns the natural logarithm of <I>arg</I>. <I>Arg</I> must be a
positive value.
<P><DT><A NAME="M35"><B>log10(</B><I>arg</I><B>)</B></A><DD>
Returns the base 10 logarithm of <I>arg</I>. <I>Arg</I> must be a
positive value.
<P><DT><A NAME="M36"><B>pow(</B><I>x, y</I><B>)</B></A><DD>
Computes the value of <I>x</I> raised to the power <I>y</I>. If <I>x</I>
is negative, <I>y</I> must be an integer value.
<P><DT><A NAME="M37"><B>rand()</B></A><DD>
Returns a floating point number from zero to just less than one or,
in mathematical terms, the range [0,1). The seed comes from the
internal clock of the machine or may be set manual with the srand
function.
<P><DT><A NAME="M38"><B>round(</B><I>arg</I><B>)</B></A><DD>
If <I>arg</I> is an integer value, returns <I>arg</I>, otherwise converts
<I>arg</I> to integer by rounding and returns the converted value.
<P><DT><A NAME="M39"><B>sin(</B><I>arg</I><B>)</B></A><DD>
Returns the sine of <I>arg</I>, measured in radians.
<P><DT><A NAME="M40"><B>sinh(</B><I>arg</I><B>)</B></A><DD>
Returns the hyperbolic sine of <I>arg</I>. If the result would cause
an overflow, an error is returned.
<P><DT><A NAME="M41"><B>sqrt(</B><I>arg</I><B>)</B></A><DD>
Returns the square root of <I>arg</I>. <I>Arg</I> must be non-negative.
<P><DT><A NAME="M42"><B>srand(</B><I>arg</I><B>)</B></A><DD>
The <I>arg</I>, which must be an integer, is used to reset the seed for
the random number generator. Returns the first random number from
that seed. Each interpreter has it's own seed.
<P><DT><A NAME="M43"><B>tan(</B><I>arg</I><B>)</B></A><DD>
Returns the tangent of <I>arg</I>, measured in radians.
<P><DT><A NAME="M44"><B>tanh(</B><I>arg</I><B>)</B></A><DD>
Returns the hyperbolic tangent of <I>arg</I>.
<P></DL>
<P>
In addition to these predefined functions, applications may
define additional functions using <B><A HREF="../TkLib/CrtMathFnc.htm">Tcl_CreateMathFunc</A></B>().
<H3><A NAME="M45">TYPES, OVERFLOW, AND PRECISION</A></H3>
All internal computations involving integers are done with the C type
<I>long</I>, and all internal computations involving floating-point are
done with the C type <I>double</I>.
When converting a string to floating-point, exponent overflow is
detected and results in a Tcl error.
For conversion to integer from string, detection of overflow depends
on the behavior of some routines in the local C library, so it should
be regarded as unreliable.
In any case, integer overflow and underflow are generally not detected
reliably for intermediate results. Floating-point overflow and underflow
are detected to the degree supported by the hardware, which is generally
pretty reliable.
<P>
Conversion among internal representations for integer, floating-point,
and string operands is done automatically as needed.
For arithmetic computations, integers are used until some
floating-point number is introduced, after which floating-point is used.
For example,
<PRE><B>expr 5 / 4</B></PRE>
returns 1, while
<PRE><B>expr 5 / 4.0</B>
<B>expr 5 / ( [string length &quot;abcd&quot;] + 0.0 )</B></PRE>
both return 1.25.
Floating-point values are always returned with a ``<B>.</B>''
or an <B>e</B> so that they will not look like integer values. For
example,
<PRE><B>expr 20.0/5.0</B></PRE>
returns <B>4.0</B>, not <B>4</B>.
<H3><A NAME="M46">STRING OPERATIONS</A></H3>
String values may be used as operands of the comparison operators,
although the expression evaluator tries to do comparisons as integer
or floating-point when it can.
If one of the operands of a comparison is a string and the other
has a numeric value, the numeric operand is converted back to
a string using the C <I>sprintf</I> format specifier
<B>%d</B> for integers and <B>%g</B> for floating-point values.
For example, the commands
<PRE><B>expr {&quot;0x03&quot; &gt; &quot;2&quot;}</B>
<B>expr {&quot;0y&quot; &lt; &quot;0x12&quot;}</B></PRE>
both return 1. The first comparison is done using integer
comparison, and the second is done using string comparison after
the second operand is converted to the string <B>18</B>.
Because of Tcl's tendency to treat values as numbers whenever
possible, it isn't generally a good idea to use operators like <B>==</B>
when you really want string comparison and the values of the
operands could be arbitrary; it's better in these cases to use
the <B><A HREF="../TkCmd/string.htm">string</A></B> command instead.
<H3><A NAME="M47">PERFORMANCE CONSIDERATIONS</A></H3>
Enclose expressions in braces for the best speed and the smallest
storage requirements.
This allows the Tcl bytecode compiler to generate the best code.
<P>
As mentioned above, expressions are substituted twice:
once by the Tcl parser and once by the <B>expr</B> command.
For example, the commands
<PRE><B>set a 3</B>
<B>set b {$a + 2}</B>
<B>expr $b*4</B></PRE>
return 11, not a multiple of 4.
This is because the Tcl parser will first substitute <B>$a + 2</B> for
the variable <B>b</B>,
then the <B>expr</B> command will evaluate the expression <B>$a + 2*4</B>.
<P>
Most expressions do not require a second round of substitutions.
Either they are enclosed in braces or, if not,
their variable and command substitutions yield numbers or strings
that don't themselves require substitutions.
However, because a few unbraced expressions
need two rounds of substitutions,
the bytecode compiler must emit
additional instructions to handle this situation.
The most expensive code is required for
unbraced expressions that contain command substitutions.
These expressions must be implemented by generating new code
each time the expression is executed.
<H3><A NAME="M48">KEYWORDS</A></H3>
<A href="../Keywords/A.htm#arithmetic">arithmetic</A>, <A href="../Keywords/B.htm#boolean">boolean</A>, <A href="../Keywords/C.htm#compare">compare</A>, <A href="../Keywords/E.htm#expression">expression</A>, <A href="../Keywords/F.htm#fuzzy comparison">fuzzy comparison</A>
<HR><PRE>
<A HREF="../copyright.htm">Copyright</A> &#169; 1993 The Regents of the University of California.
<A HREF="../copyright.htm">Copyright</A> &#169; 1994-2000 Sun Microsystems, Inc.
<A HREF="../copyright.htm">Copyright</A> &#169; 1995-1997 Roger E. Critchlow Jr.</PRE>
</BODY></HTML>

22
hlp/en/tcl/fblocked.htm Normal file
View File

@ -0,0 +1,22 @@
<HTML><HEAD><TITLE>Tcl Built-In Commands - fblocked manual page</TITLE></HEAD><BODY>
<H3><A NAME="M2">NAME</A></H3>
fblocked - Test whether the last input operation exhausted all available input
<H3><A NAME="M3">SYNOPSIS</A></H3>
<B>fblocked </B><I>channelId</I><BR>
<H3><A NAME="M4">DESCRIPTION</A></H3>
The <B>fblocked</B> command returns 1 if the most recent input operation
on <I>channelId</I> returned less information than requested because all
available input was exhausted.
For example, if <B><A HREF="../TkCmd/gets.htm">gets</A></B> is invoked when there are only three
characters available for input and no end-of-line sequence, <B><A HREF="../TkCmd/gets.htm">gets</A></B>
returns an empty string and a subsequent call to <B>fblocked</B> will
return 1.
<P>
<H3><A NAME="M5">SEE ALSO</A></H3>
<B><A HREF="../TkCmd/gets.htm">gets</A></B>, <B><A HREF="../TkCmd/open.htm">open</A></B>, <B><A HREF="../TkCmd/read.htm">read</A></B>
<H3><A NAME="M6">KEYWORDS</A></H3>
<A href="../Keywords/B.htm#blocking">blocking</A>, <A href="../Keywords/N.htm#nonblocking">nonblocking</A>
<HR><PRE>
<A HREF="../copyright.htm">Copyright</A> &#169; 1996 Sun Microsystems, Inc.
<A HREF="../copyright.htm">Copyright</A> &#169; 1995-1997 Roger E. Critchlow Jr.</PRE>
</BODY></HTML>

189
hlp/en/tcl/fconfigure.htm Normal file
View File

@ -0,0 +1,189 @@
<HTML><HEAD><TITLE>Tcl Built-In Commands - fconfigure manual page</TITLE></HEAD><BODY>
<DL>
<DD><A HREF="fconfigure.htm#M2" NAME="L290">NAME</A>
<DL><DD>fconfigure - Set and get options on a channel</DL>
<DD><A HREF="fconfigure.htm#M3" NAME="L291">SYNOPSIS</A>
<DL>
<DD><B>fconfigure </B><I>channelId</I>
<DD><B>fconfigure </B><I>channelId</I> <I>name</I>
<DD><B>fconfigure </B><I>channelId</I> <I>name value </I>?<I>name value ...</I>?
</DL>
<DD><A HREF="fconfigure.htm#M4" NAME="L292">DESCRIPTION</A>
<DL>
<DD><A HREF="fconfigure.htm#M5" NAME="L293"><B>-blocking</B> <I>boolean</I></A>
<DD><A HREF="fconfigure.htm#M6" NAME="L294"><B>-buffering</B> <I>newValue</I></A>
<DD><A HREF="fconfigure.htm#M7" NAME="L295"><B>-buffersize</B> <I>newSize</I></A>
<DD><A HREF="fconfigure.htm#M8" NAME="L296"><B>-encoding</B> <I>name</I></A>
<DD><A HREF="fconfigure.htm#M9" NAME="L297"><B>-eofchar</B> <I>char</I></A>
<DD><A HREF="fconfigure.htm#M10" NAME="L298"><B>-eofchar</B> <B>{</B><I>inChar outChar</I><B>}</B></A>
<DD><A HREF="fconfigure.htm#M11" NAME="L299"><B>-translation</B> <I>mode</I></A>
<DD><A HREF="fconfigure.htm#M12" NAME="L300"><B>-translation</B> <B>{</B><I>inMode outMode</I><B>}</B></A>
<DL>
<DD><A HREF="fconfigure.htm#M13" NAME="L301"><B>auto</B></A>
<DD><A HREF="fconfigure.htm#M14" NAME="L302"><B>binary</B></A>
<DD><A HREF="fconfigure.htm#M15" NAME="L303"><B>cr</B></A>
<DD><A HREF="fconfigure.htm#M16" NAME="L304"><B>crlf</B></A>
<DD><A HREF="fconfigure.htm#M17" NAME="L305"><B>lf</B></A>
</DL>
</DL>
<DD><A HREF="fconfigure.htm#M18" NAME="L306">SEE ALSO</A>
<DD><A HREF="fconfigure.htm#M19" NAME="L307">KEYWORDS</A>
</DL><HR>
<H3><A NAME="M2">NAME</A></H3>
fconfigure - Set and get options on a channel
<H3><A NAME="M3">SYNOPSIS</A></H3>
<B>fconfigure </B><I>channelId</I><BR>
<B>fconfigure </B><I>channelId</I> <I>name</I><BR>
<B>fconfigure </B><I>channelId</I> <I>name value </I>?<I>name value ...</I>?<BR>
<H3><A NAME="M4">DESCRIPTION</A></H3>
The <B>fconfigure</B> command sets and retrieves options for channels.
<I>ChannelId</I> identifies the channel for which to set or query an option.
If no <I>name</I> or <I>value</I> arguments are supplied, the command
returns a list containing alternating option names and values for the channel.
If <I>name</I> is supplied but no <I>value</I> then the command returns
the current value of the given option.
If one or more pairs of <I>name</I> and <I>value</I> are supplied, the
command sets each of the named options to the corresponding <I>value</I>;
in this case the return value is an empty string.
<P>
The options described below are supported for all channels. In addition,
each channel type may add options that only it supports. See the manual
entry for the command that creates each type of channels for the options
that that specific type of channel supports. For example, see the manual
entry for the <B><A HREF="../TkCmd/socket.htm">socket</A></B> command for its additional options.
<P>
<DL>
<P><DT><A NAME="M5"><B>-blocking</B> <I>boolean</I></A><DD>
The <B>-blocking</B> option determines whether I/O operations on the
channel can cause the process to block indefinitely.
The value of the option must be a proper boolean value.
Channels are normally in blocking mode; if a channel is placed into
nonblocking mode it will affect the operation of the <B><A HREF="../TkCmd/gets.htm">gets</A></B>,
<B><A HREF="../TkCmd/read.htm">read</A></B>, <B><A HREF="../TkCmd/puts.htm">puts</A></B>, <B><A HREF="../TkCmd/flush.htm">flush</A></B>, and <B><A HREF="../TkCmd/close.htm">close</A></B> commands;
see the documentation for those commands for details.
For nonblocking mode to work correctly, the application must be
using the Tcl event loop (e.g. by calling <B><A HREF="../TkLib/DoOneEvent.htm">Tcl_DoOneEvent</A></B> or
invoking the <B><A HREF="../TkCmd/vwait.htm">vwait</A></B> command).
<P><DT><A NAME="M6"><B>-buffering</B> <I>newValue</I></A><DD>
If <I>newValue</I> is <B>full</B> then the I/O system will buffer output
until its internal buffer is full or until the <B><A HREF="../TkCmd/flush.htm">flush</A></B> command is
invoked. If <I>newValue</I> is <B>line</B>, then the I/O system will
automatically flush output for the channel whenever a newline character
is output. If <I>newValue</I> is <B>none</B>, the I/O system will flush
automatically after every output operation. The default is for
<B>-buffering</B> to be set to <B>full</B> except for channels that
connect to terminal-like devices; for these channels the initial setting
is <B>line</B>. Additionally, <B>stdin</B> and <B>stdout</B> are
intially set to <B>line</B>, and <B>stderr</B> is set to <B>none</B>.
<P><DT><A NAME="M7"><B>-buffersize</B> <I>newSize</I></A><DD>
<I>Newvalue</I> must be an integer; its value is used to set the size of
buffers, in bytes, subsequently allocated for this channel to store input
or output. <I>Newvalue</I> must be between ten and one million, allowing
buffers of ten to one million bytes in size.
<P><DT><A NAME="M8"><B>-encoding</B> <I>name</I></A><DD>
This option is used to specify the encoding of the channel, so that the data
can be converted to and from Unicode for use in Tcl. For instance, in
order for Tcl to read characters from a Japanese file in <B>shiftjis</B>
and properly process and display the contents, the encoding would be set
to <B>shiftjis</B>. Thereafter, when reading from the channel, the bytes in
the Japanese file would be converted to Unicode as they are read.
Writing is also supported - as Tcl strings are written to the channel they
will automatically be converted to the specified encoding on output.
<P>
If a file contains pure binary data (for instance, a JPEG image), the
encoding for the channel should be configured to be <B><A HREF="../TkCmd/binary.htm">binary</A></B>. Tcl
will then assign no interpretation to the data in the file and simply read or
write raw bytes. The Tcl <B><A HREF="../TkCmd/binary.htm">binary</A></B> command can be used to manipulate this
byte-oriented data.
<P>The default encoding for newly opened channels is the same platform- and
locale-dependent system encoding used for interfacing with the operating
system.
<P><DT><A NAME="M9"><B>-eofchar</B> <I>char</I></A><DD>
<P><DT><A NAME="M10"><B>-eofchar</B> <B>{</B><I>inChar outChar</I><B>}</B></A><DD>
This option supports DOS file systems that use Control-z (&#92;x1a) as an
end of file marker. If <I>char</I> is not an empty string, then this
character signals end-of-file when it is encountered during input. For
output, the end-of-file character is output when the channel is closed.
If <I>char</I> is the empty string, then there is no special end of file
character marker. For read-write channels, a two-element list specifies
the end of file marker for input and output, respectively. As a
convenience, when setting the end-of-file character for a read-write
channel you can specify a single value that will apply to both reading
and writing. When querying the end-of-file character of a read-write
channel, a two-element list will always be returned. The default value
for <B>-eofchar</B> is the empty string in all cases except for files
under Windows. In that case the <B>-eofchar</B> is Control-z (&#92;x1a) for
reading and the empty string for writing.
<P><DT><A NAME="M11"><B>-translation</B> <I>mode</I></A><DD>
<P><DT><A NAME="M12"><B>-translation</B> <B>{</B><I>inMode outMode</I><B>}</B></A><DD>
In Tcl scripts the end of a line is always represented using a single
newline character (&#92;n). However, in actual files and devices the end of
a line may be represented differently on different platforms, or even for
different devices on the same platform. For example, under UNIX newlines
are used in files, whereas carriage-return-linefeed sequences are
normally used in network connections. On input (i.e., with <B><A HREF="../TkCmd/gets.htm">gets</A></B>
and <B><A HREF="../TkCmd/read.htm">read</A></B>) the Tcl I/O system automatically translates the external
end-of-line representation into newline characters. Upon output (i.e.,
with <B><A HREF="../TkCmd/puts.htm">puts</A></B>), the I/O system translates newlines to the external
end-of-line representation. The default translation mode, <B>auto</B>,
handles all the common cases automatically, but the <B>-translation</B>
option provides explicit control over the end of line translations.
<P>
The value associated with <B>-translation</B> is a single item for
read-only and write-only channels. The value is a two-element list for
read-write channels; the read translation mode is the first element of
the list, and the write translation mode is the second element. As a
convenience, when setting the translation mode for a read-write channel
you can specify a single value that will apply to both reading and
writing. When querying the translation mode of a read-write channel, a
two-element list will always be returned. The following values are
currently supported:
<P>
<DL>
<P><DT><A NAME="M13"><B>auto</B></A><DD>
As the input translation mode, <B>auto</B> treats any of newline
(<B>lf</B>), carriage return (<B>cr</B>), or carriage return followed by a
newline (<B>crlf</B>) as the end of line representation. The end of line
representation can even change from line-to-line, and all cases are
translated to a newline. As the output translation mode, <B>auto</B>
chooses a platform specific representation; for sockets on all platforms
Tcl chooses <B>crlf</B>, for all Unix flavors, it chooses <B>lf</B>, for the
Macintosh platform it chooses <B>cr</B> and for the various flavors of
Windows it chooses <B>crlf</B>. The default setting for
<B>-translation</B> is <B>auto</B> for both input and output.
<P><DT><A NAME="M14"><B>binary</B></A><DD>
No end-of-line translations are performed. This is nearly identical to
<B>lf</B> mode, except that in addition <B><A HREF="../TkCmd/binary.htm">binary</A></B> mode also sets the
end-of-file character to the empty string (which disables it) and sets the
encoding to <B><A HREF="../TkCmd/binary.htm">binary</A></B> (which disables encoding filtering). See the
description of <B>-eofchar</B> and <B>-encoding</B> for more information.
<P><DT><A NAME="M15"><B>cr</B></A><DD>
The end of a line in the underlying file or device is represented by a
single carriage return character. As the input translation mode,
<B>cr</B> mode converts carriage returns to newline characters. As the
output translation mode, <B>cr</B> mode translates newline characters to
carriage returns. This mode is typically used on Macintosh platforms.
<P><DT><A NAME="M16"><B>crlf</B></A><DD>
The end of a line in the underlying file or device is represented by a
carriage return character followed by a linefeed character. As the input
translation mode, <B>crlf</B> mode converts carriage-return-linefeed
sequences to newline characters. As the output translation mode,
<B>crlf</B> mode translates newline characters to carriage-return-linefeed
sequences. This mode is typically used on Windows platforms and for
network connections.
<P><DT><A NAME="M17"><B>lf</B></A><DD>
The end of a line in the underlying file or device is represented by a
single newline (linefeed) character. In this mode no translations occur
during either input or output. This mode is typically used on UNIX
platforms.
<P></DL>
<P></DL>
<P>
<H3><A NAME="M18">SEE ALSO</A></H3>
<B><A HREF="../TkCmd/close.htm">close</A></B>, <B><A HREF="../TkCmd/flush.htm">flush</A></B>, <B><A HREF="../TkCmd/gets.htm">gets</A></B>, <B><A HREF="../TkCmd/puts.htm">puts</A></B>, <B><A HREF="../TkCmd/read.htm">read</A></B>, <B><A HREF="../TkCmd/socket.htm">socket</A></B>
<H3><A NAME="M19">KEYWORDS</A></H3>
<A href="../Keywords/B.htm#blocking">blocking</A>, <A href="../Keywords/B.htm#buffering">buffering</A>, <A href="../Keywords/C.htm#carriage return">carriage return</A>, <A href="../Keywords/E.htm#end of line">end of line</A>, <A href="../Keywords/F.htm#flushing">flushing</A>, <A href="../Keywords/L.htm#linemode">linemode</A>, <A href="../Keywords/N.htm#newline">newline</A>, <A href="../Keywords/N.htm#nonblocking">nonblocking</A>, <A href="../Keywords/P.htm#platform">platform</A>, <A href="../Keywords/T.htm#translation">translation</A>, <A href="../Keywords/E.htm#encoding">encoding</A>, <A href="../Keywords/F.htm#filter">filter</A>, <A href="../Keywords/B.htm#byte array">byte array</A>, <A href="../Keywords/B.htm#binary">binary</A>
<HR><PRE>
<A HREF="../copyright.htm">Copyright</A> &#169; 1995-1996 Sun Microsystems, Inc.
<A HREF="../copyright.htm">Copyright</A> &#169; 1995-1997 Roger E. Critchlow Jr.</PRE>
</BODY></HTML>

108
hlp/en/tcl/fcopy.htm Normal file
View File

@ -0,0 +1,108 @@
<HTML><HEAD><TITLE>Tcl Built-In Commands - fcopy manual page</TITLE></HEAD><BODY>
<H3><A NAME="M2">NAME</A></H3>
fcopy - Copy data from one channel to another.
<H3><A NAME="M3">SYNOPSIS</A></H3>
<B>fcopy </B><I>inchan</I> <I>outchan</I> ?<B>-size </B><I>size</I>? ?<B>-command </B><I>callback</I>?<BR>
<H3><A NAME="M4">DESCRIPTION</A></H3>
The <B>fcopy</B> command copies data from one I/O channel, <I>inchan</I> to another I/O channel, <I>outchan</I>.
The <B>fcopy</B> command leverages the buffering in the Tcl I/O system to
avoid extra copies and to avoid buffering too much data in
main memory when copying large files to slow destinations like
network sockets.
<P>
The <B>fcopy</B>
command transfers data from <I>inchan</I> until end of file
or <I>size</I> bytes have been
transferred. If no <B>-size</B> argument is given,
then the copy goes until end of file.
All the data read from <I>inchan</I> is copied to <I>outchan</I>.
Without the <B>-command</B> option, <B>fcopy</B> blocks until the copy is complete
and returns the number of bytes written to <I>outchan</I>.
<P>
The <B>-command</B> argument makes <B>fcopy</B> work in the background.
In this case it returns immediately and the <I>callback</I> is invoked
later when the copy completes.
The <I>callback</I> is called with
one or two additional
arguments that indicates how many bytes were written to <I>outchan</I>.
If an error occurred during the background copy, the second argument is the
error string associated with the error.
With a background copy,
it is not necessary to put <I>inchan</I> or <I>outchan</I> into
non-blocking mode; the <B>fcopy</B> command takes care of that automatically.
However, it is necessary to enter the event loop by using
the <B><A HREF="../TkCmd/vwait.htm">vwait</A></B> command or by using Tk.
<P>
You are not allowed to do other I/O operations with
<I>inchan</I> or <I>outchan</I> during a background fcopy.
If either <I>inchan</I> or <I>outchan</I> get closed
while the copy is in progress, the current copy is stopped
and the command callback is <I>not</I> made.
If <I>inchan</I> is closed,
then all data already queued for <I>outchan</I> is written out.
<P>
Note that <I>inchan</I> can become readable during a background copy.
You should turn off any <B><A HREF="../TkCmd/fileevent.htm">fileevent</A></B> handlers during a background
copy so those handlers do not interfere with the copy.
Any I/O attempted by a <B><A HREF="../TkCmd/fileevent.htm">fileevent</A></B> handler will get a &quot;channel busy&quot; error.
<P>
<B>Fcopy</B> translates end-of-line sequences in <I>inchan</I> and <I>outchan</I>
according to the <B>-translation</B> option
for these channels.
See the manual entry for <B><A HREF="../TkCmd/fconfigure.htm">fconfigure</A></B> for details on the
<B>-translation</B> option.
The translations mean that the number of bytes read from <I>inchan</I>
can be different than the number of bytes written to <I>outchan</I>.
Only the number of bytes written to <I>outchan</I> is reported,
either as the return value of a synchronous <B>fcopy</B> or
as the argument to the callback for an asynchronous <B>fcopy</B>.
<H3><A NAME="M5">EXAMPLE</A></H3>
This first example shows how the callback gets
passed the number of bytes transferred.
It also uses vwait to put the application into the event loop.
Of course, this simplified example could be done without the command
callback.
<PRE>proc Cleanup {in out bytes {error {}}} {
global total
set total $bytes
close $in
close $out
if {[string length $error] != 0} {
# error occurred during the copy
}
}
set in [open $file1]
set out [socket $server $port]
fcopy $in $out -command [list Cleanup $in $out]
vwait total</PRE>
<P>
The second example copies in chunks and tests for end of file
in the command callback
<PRE>proc CopyMore {in out chunk bytes {error {}}} {
global total done
incr total $bytes
if {([string length $error] != 0) || [eof $in] {
set done $total
close $in
close $out
} else {
fcopy $in $out -command [list CopyMore $in $out $chunk] &#92;
-size $chunk
}
}
set in [open $file1]
set out [socket $server $port]
set chunk 1024
set total 0
fcopy $in $out -command [list CopyMore $in $out $chunk] -size $chunk
vwait done</PRE>
<H3><A NAME="M6">SEE ALSO</A></H3>
<B><A HREF="../TkCmd/eof.htm">eof</A></B>, <B><A HREF="../TkCmd/fblocked.htm">fblocked</A></B>, <B><A HREF="../TkCmd/fconfigure.htm">fconfigure</A></B>
<H3><A NAME="M7">KEYWORDS</A></H3>
<A href="../Keywords/B.htm#blocking">blocking</A>, <A href="../Keywords/C.htm#channel">channel</A>, <A href="../Keywords/E.htm#end of line">end of line</A>, <A href="../Keywords/E.htm#end of file">end of file</A>, <A href="../Keywords/N.htm#nonblocking">nonblocking</A>, <A href="../Keywords/R.htm#read">read</A>, <A href="../Keywords/T.htm#translation">translation</A>
<HR><PRE>
<A HREF="../copyright.htm">Copyright</A> &#169; 1993 The Regents of the University of California.
<A HREF="../copyright.htm">Copyright</A> &#169; 1994-1997 Sun Microsystems, Inc.
<A HREF="../copyright.htm">Copyright</A> &#169; 1995-1997 Roger E. Critchlow Jr.</PRE>
</BODY></HTML>

307
hlp/en/tcl/file.htm Normal file
View File

@ -0,0 +1,307 @@
<HTML><HEAD><TITLE>Tcl Built-In Commands - file manual page</TITLE></HEAD><BODY>
<DL>
<DD><A HREF="file.htm#M2" NAME="L314">NAME</A>
<DL><DD>file - Manipulate file names and attributes</DL>
<DD><A HREF="file.htm#M3" NAME="L315">SYNOPSIS</A>
<DL>
<DD><B>file </B><I>option</I> <I>name</I> ?<I>arg arg ...</I>?
</DL>
<DD><A HREF="file.htm#M4" NAME="L316">DESCRIPTION</A>
<DL>
<DD><A HREF="file.htm#M5" NAME="L317"><B>file atime </B><I>name</I> ?<B>time</B>?</A>
<DD><A HREF="file.htm#M6" NAME="L318"><B>file attributes </B><I>name</I></A>
<DD><A HREF="file.htm#M7" NAME="L319"><B>file channels ?</B><I>pattern</I>?</A>
<DD><A HREF="file.htm#M8" NAME="L320"><B>file copy </B>?<B>-force</B>? ?<B>-&nbsp;-</B>? <I>source</I> <I>target</I></A>
<DD><A HREF="file.htm#M9" NAME="L321"><B>file delete </B>?<B>-force</B>? ?<B>-&nbsp;-</B>? <I>pathname</I> ?<I>pathname</I> ... ?</A>
<DD><A HREF="file.htm#M10" NAME="L322"><B>file dirname </B><I>name</I></A>
<DD><A HREF="file.htm#M11" NAME="L323"><B>file executable </B><I>name</I></A>
<DD><A HREF="file.htm#M12" NAME="L324"><B>file exists </B><I>name</I></A>
<DD><A HREF="file.htm#M13" NAME="L325"><B>file extension </B><I>name</I></A>
<DD><A HREF="file.htm#M14" NAME="L326"><B>file isdirectory </B><I>name</I></A>
<DD><A HREF="file.htm#M15" NAME="L327"><B>file isfile </B><I>name</I></A>
<DD><A HREF="file.htm#M16" NAME="L328"><B>file join </B><I>name</I> ?<I>name ...</I>?</A>
<DD><A HREF="file.htm#M17" NAME="L329"><B>file lstat </B><I>name varName</I></A>
<DD><A HREF="file.htm#M18" NAME="L330"><B>file mkdir </B><I>dir</I> ?<I>dir</I> ...?</A>
<DD><A HREF="file.htm#M19" NAME="L331"><B>file mtime </B><I>name</I> ?<I>time</I>?</A>
<DD><A HREF="file.htm#M20" NAME="L332"><B>file nativename </B><I>name</I></A>
<DD><A HREF="file.htm#M21" NAME="L333"><B>file owned </B><I>name</I></A>
<DD><A HREF="file.htm#M22" NAME="L334"><B>file pathtype </B><I>name</I></A>
<DD><A HREF="file.htm#M23" NAME="L335"><B>file readable </B><I>name</I></A>
<DD><A HREF="file.htm#M24" NAME="L336"><B>file readlink </B><I>name</I></A>
<DD><A HREF="file.htm#M25" NAME="L337"><B>file rename </B>?<B>-force</B>? ?<B>-&nbsp;-</B>? <I>source</I> <I>target</I></A>
<DD><A HREF="file.htm#M26" NAME="L338"><B>file rename </B>?<B>-force</B>? ?<B>-&nbsp;-</B>? <I>source</I> ?<I>source</I> ...? <I>targetDir</I></A>
<DD><A HREF="file.htm#M27" NAME="L339"><B>file rootname </B><I>name</I></A>
<DD><A HREF="file.htm#M28" NAME="L340"><B>file size </B><I>name</I></A>
<DD><A HREF="file.htm#M29" NAME="L341"><B>file split </B><I>name</I></A>
<DD><A HREF="file.htm#M30" NAME="L342"><B>file stat </B><I>name varName</I></A>
<DD><A HREF="file.htm#M31" NAME="L343"><B>file tail </B><I>name</I></A>
<DD><A HREF="file.htm#M32" NAME="L344"><B>file type </B><I>name</I></A>
<DD><A HREF="file.htm#M33" NAME="L345"><B>file volume</B></A>
<DD><A HREF="file.htm#M34" NAME="L346"><B>file writable </B><I>name</I></A>
</DL>
<DD><A HREF="file.htm#M35" NAME="L347">PORTABILITY ISSUES</A>
<DL>
<DD><A HREF="file.htm#M36" NAME="L348"><B>Unix</B></A>
</DL>
<DD><A HREF="file.htm#M37" NAME="L349">SEE ALSO</A>
<DD><A HREF="file.htm#M38" NAME="L350">KEYWORDS</A>
</DL><HR>
<H3><A NAME="M2">NAME</A></H3>
file - Manipulate file names and attributes
<H3><A NAME="M3">SYNOPSIS</A></H3>
<B>file </B><I>option</I> <I>name</I> ?<I>arg arg ...</I>?<BR>
<H3><A NAME="M4">DESCRIPTION</A></H3>
This command provides several operations on a file's name or attributes.
<I>Name</I> is the name of a file; if it starts with a tilde, then tilde
substitution is done before executing the command (see the manual entry for
<B><A HREF="../TkCmd/filename.htm">filename</A></B> for details). <I>Option</I> indicates what to do with the
file name. Any unique abbreviation for <I>option</I> is acceptable. The
valid options are:
<P>
<DL>
<P><DT><A NAME="M5"><B>file atime </B><I>name</I> ?<B>time</B>?</A><DD>
Returns a decimal string giving the time at which file <I>name</I> was last
accessed. If <I>time</I> is specified, it is an access time to set
for the file. The time is measured in the standard POSIX fashion as
seconds from a fixed starting time (often January 1, 1970). If the file
doesn't exist or its access time cannot be queried or set then an error is
generated. On Windows, FAT file systems do not support access time.
<P><DT><A NAME="M6"><B>file attributes </B><I>name</I></A><DD>
<BR>
<B>file attributes </B><I>name</I> ?<B><A HREF="../TclCmd/option.htm">option</A></B>?
<BR>
<B>file attributes </B><I>name</I> ?<B>option value option value...</B>?
<DL><P><DD>
This subcommand returns or sets platform specific values associated
with a file. The first form returns a list of the platform specific
flags and their values. The second form returns the value for the
specific option. The third form sets one or more of the values. The
values are as follows:
<P>
On Unix, <B>-group</B> gets or sets the group name for the file. A group id
can be given to the command, but it returns a group name. <B>-owner</B> gets
or sets the user name of the owner of the file. The command returns the
owner name, but the numerical id can be passed when setting the
owner. <B>-permissions</B> sets or retrieves the octal code that chmod(1)
uses. This command does also has limited support for setting using the
symbolic attributes for chmod(1), of the form [ugo]?[[+-=][rwxst],[...]],
where multiple symbolic attributes can be separated by commas (example:
<B>u+s,go-rw</B> add sticky bit for user, remove read and write
permissions for group and other). A simplified <B>ls</B> style string,
of the form rwxrwxrwx (must be 9 characters), is also supported
(example: <B>rwxr-xr-t</B> is equivalent to 01755).
<P>
On Windows, <B>-archive</B> gives the value or sets or clears the
archive attribute of the file. <B>-hidden</B> gives the value or sets
or clears the hidden attribute of the file. <B>-longname</B> will
expand each path element to its long version. This attribute cannot be
set. <B>-readonly</B> gives the value or sets or clears the readonly
attribute of the file. <B>-shortname</B> gives a string where every
path element is replaced with its short (8.3) version of the
name. This attribute cannot be set. <B>-system</B> gives or sets or
clears the value of the system attribute of the file.
<P>
On Macintosh, <B>-creator</B> gives or sets the Finder creator type of
the file. <B>-hidden</B> gives or sets or clears the hidden attribute
of the file. <B>-readonly</B> gives or sets or clears the readonly
attribute of the file. Note that directories can only be locked if
File Sharing is turned on. <B>-type</B> gives or sets the Finder file
type for the file.
</DL>
<P><DT><A NAME="M7"><B>file channels ?</B><I>pattern</I>?</A><DD>
If <I>pattern</I> isn't specified, returns a list of names of all
registered open channels in this interpreter. If <I>pattern</I> is
specified, only those names matching <I>pattern</I> are returned. Matching
is determined using the same rules as for <B><A HREF="../TkCmd/string.htm">string match</A></B>.
<P><DT><A NAME="M8"><B>file copy </B>?<B>-force</B>? ?<B>-&nbsp;-</B>? <I>source</I> <I>target</I></A><DD>
<BR>
<B>file copy </B>?<B>-force</B>? ?<B>-&nbsp;-</B>? <I>source</I> ?<I>source</I> ...? <I>targetDir</I>
<DL><P><DD>
The first form makes a copy of the file or directory <I>source</I> under
the pathname <I>target</I>. If <I>target</I> is an existing directory,
then the second form is used. The second form makes a copy inside
<I>targetDir</I> of each <I>source</I> file listed. If a directory is
specified as a <I>source</I>, then the contents of the directory will be
recursively copied into <I>targetDir</I>. Existing files will not be
overwritten unless the <B>-force</B> option is specified. Trying to
overwrite a non-empty directory, overwrite a directory with a file, or a
file with a directory will all result in errors even if <I>-force</I> was
specified. Arguments are processed in the order specified, halting at the
first error, if any. A <B>-&nbsp;-</B> marks the end of switches; the argument
following the <B>-&nbsp;-</B> will be treated as a <I>source</I> even if it
starts with a <B>-</B>.
</DL>
<P><DT><A NAME="M9"><B>file delete </B>?<B>-force</B>? ?<B>-&nbsp;-</B>? <I>pathname</I> ?<I>pathname</I> ... ?</A><DD>
Removes the file or directory specified by each <I>pathname</I> argument.
Non-empty directories will be removed only if the <B>-force</B> option is
specified. Trying to delete a non-existant file is not considered an
error. Trying to delete a read-only file will cause the file to be deleted,
even if the <B>-force</B> flags is not specified. Arguments are processed
in the order specified, halting at the first error, if any. A <B>-&nbsp;-</B>
marks the end of switches; the argument following the <B>-&nbsp;-</B> will be
treated as a <I>pathname</I> even if it starts with a <B>-</B>.
<P><DT><A NAME="M10"><B>file dirname </B><I>name</I></A><DD>
Returns a name comprised of all of the path components in <I>name</I>
excluding the last element. If <I>name</I> is a relative file name and
only contains one path element, then returns ``<B>.</B>'' (or ``<B>:</B>''
on the Macintosh). If <I>name</I> refers to a root directory, then the
root directory is returned. For example,
<PRE><B>file dirname c:/</B></PRE>
returns <B>c:/</B>.
<P>
Note that tilde substitution will only be
performed if it is necessary to complete the command. For example,
<PRE><B>file dirname ~/src/foo.c</B></PRE>
returns <B>~/src</B>, whereas
<PRE><B>file dirname ~</B></PRE>
returns <B>/home</B> (or something similar).
<P><DT><A NAME="M11"><B>file executable </B><I>name</I></A><DD>
Returns <B>1</B> if file <I>name</I> is executable by the current user,
<B>0</B> otherwise.
<P><DT><A NAME="M12"><B>file exists </B><I>name</I></A><DD>
Returns <B>1</B> if file <I>name</I> exists and the current user has
search privileges for the directories leading to it, <B>0</B> otherwise.
<P><DT><A NAME="M13"><B>file extension </B><I>name</I></A><DD>
Returns all of the characters in <I>name</I> after and including the last
dot in the last element of <I>name</I>. If there is no dot in the last
element of <I>name</I> then returns the empty string.
<P><DT><A NAME="M14"><B>file isdirectory </B><I>name</I></A><DD>
Returns <B>1</B> if file <I>name</I> is a directory, <B>0</B> otherwise.
<P><DT><A NAME="M15"><B>file isfile </B><I>name</I></A><DD>
Returns <B>1</B> if file <I>name</I> is a regular file, <B>0</B> otherwise.
<P><DT><A NAME="M16"><B>file join </B><I>name</I> ?<I>name ...</I>?</A><DD>
Takes one or more file names and combines them, using the correct path
separator for the current platform. If a particular <I>name</I> is
relative, then it will be joined to the previous file name argument.
Otherwise, any earlier arguments will be discarded, and joining will
proceed from the current argument. For example,
<PRE><B>file join a b /foo bar</B></PRE>
returns <B>/foo/bar</B>.
<P>Note that any of the names can contain separators, and that the result
is always canonical for the current platform: <B>/</B> for Unix and
Windows, and <B>:</B> for Macintosh.
<P><DT><A NAME="M17"><B>file lstat </B><I>name varName</I></A><DD>
Same as <B>stat</B> option (see below) except uses the <I>lstat</I>
kernel call instead of <I>stat</I>. This means that if <I>name</I>
refers to a symbolic link the information returned in <I>varName</I>
is for the link rather than the file it refers to. On systems that
don't support symbolic links this option behaves exactly the same
as the <B>stat</B> option.
<P><DT><A NAME="M18"><B>file mkdir </B><I>dir</I> ?<I>dir</I> ...?</A><DD>
Creates each directory specified. For each pathname <I>dir</I> specified,
this command will create all non-existing parent directories as
well as <I>dir</I> itself. If an existing directory is specified, then
no action is taken and no error is returned. Trying to overwrite an existing
file with a directory will result in an error. Arguments are processed in
the order specified, halting at the first error, if any.
<P><DT><A NAME="M19"><B>file mtime </B><I>name</I> ?<I>time</I>?</A><DD>
Returns a decimal string giving the time at which file <I>name</I> was last
modified. If <I>time</I> is specified, it is a modification time to set for
the file (equivalent to Unix <B>touch</B>). The time is measured in the
standard POSIX fashion as seconds from a fixed starting time (often January
1, 1970). If the file doesn't exist or its modified time cannot be queried
or set then an error is generated.
<P><DT><A NAME="M20"><B>file nativename </B><I>name</I></A><DD>
Returns the platform-specific name of the file. This is useful if the
filename is needed to pass to a platform-specific call, such as exec
under Windows or AppleScript on the Macintosh.
<P><DT><A NAME="M21"><B>file owned </B><I>name</I></A><DD>
Returns <B>1</B> if file <I>name</I> is owned by the current user, <B>0</B>
otherwise.
<P><DT><A NAME="M22"><B>file pathtype </B><I>name</I></A><DD>
Returns one of <B>absolute</B>, <B>relative</B>, <B>volumerelative</B>. If
<I>name</I> refers to a specific file on a specific volume, the path type
will be <B>absolute</B>. If <I>name</I> refers to a file relative to the
current working directory, then the path type will be <B>relative</B>. If
<I>name</I> refers to a file relative to the current working directory on
a specified volume, or to a specific file on the current working volume, then
the file type is <B>volumerelative</B>.
<P><DT><A NAME="M23"><B>file readable </B><I>name</I></A><DD>
Returns <B>1</B> if file <I>name</I> is readable by the current user,
<B>0</B> otherwise.
<P><DT><A NAME="M24"><B>file readlink </B><I>name</I></A><DD>
Returns the value of the symbolic link given by <I>name</I> (i.e. the name
of the file it points to). If <I>name</I> isn't a symbolic link or its
value cannot be read, then an error is returned. On systems that don't
support symbolic links this option is undefined.
<P><DT><A NAME="M25"><B>file rename </B>?<B>-force</B>? ?<B>-&nbsp;-</B>? <I>source</I> <I>target</I></A>
<DT><A NAME="M26"><B>file rename </B>?<B>-force</B>? ?<B>-&nbsp;-</B>? <I>source</I> ?<I>source</I> ...? <I>targetDir</I></A><DD>
The first form takes the file or directory specified by pathname
<I>source</I> and renames it to <I>target</I>, moving the file if the
pathname <I>target</I> specifies a name in a different directory. If
<I>target</I> is an existing directory, then the second form is used. The
second form moves each <I>source</I> file or directory into the directory
<I>targetDir</I>. Existing files will not be overwritten unless the
<B>-force</B> option is specified. Trying to overwrite a non-empty
directory, overwrite a directory with a file, or a file with a directory
will all result in errors. Arguments are processed in the order specified,
halting at the first error, if any. A <B>-&nbsp;-</B> marks the end of
switches; the argument following the <B>-&nbsp;-</B> will be treated as a
<I>source</I> even if it starts with a <B>-</B>.
<P><DT><A NAME="M27"><B>file rootname </B><I>name</I></A><DD>
Returns all of the characters in <I>name</I> up to but not including the
last ``.'' character in the last component of name. If the last
component of <I>name</I> doesn't contain a dot, then returns <I>name</I>.
<P><DT><A NAME="M28"><B>file size </B><I>name</I></A><DD>
Returns a decimal string giving the size of file <I>name</I> in bytes. If
the file doesn't exist or its size cannot be queried then an error is
generated.
<P><DT><A NAME="M29"><B>file split </B><I>name</I></A><DD>
Returns a list whose elements are the path components in <I>name</I>. The
first element of the list will have the same path type as <I>name</I>.
All other elements will be relative. Path separators will be discarded
unless they are needed ensure that an element is unambiguously relative.
For example, under Unix
<PRE><B>file split /foo/~bar/baz</B></PRE>
returns <B>/ foo ./~bar baz</B> to ensure that later commands
that use the third component do not attempt to perform tilde
substitution.
<P><DT><A NAME="M30"><B>file stat </B><I>name varName</I></A><DD>
Invokes the <B>stat</B> kernel call on <I>name</I>, and uses the variable
given by <I>varName</I> to hold information returned from the kernel call.
<I>VarName</I> is treated as an array variable, and the following elements
of that variable are set: <B>atime</B>, <B>ctime</B>, <B>dev</B>, <B>gid</B>,
<B>ino</B>, <B>mode</B>, <B>mtime</B>, <B>nlink</B>, <B>size</B>, <B>type</B>,
<B>uid</B>. Each element except <B>type</B> is a decimal string with the
value of the corresponding field from the <B>stat</B> return structure;
see the manual entry for <B>stat</B> for details on the meanings of the
values. The <B>type</B> element gives the type of the file in the same
form returned by the command <B>file type</B>. This command returns an
empty string.
<P><DT><A NAME="M31"><B>file tail </B><I>name</I></A><DD>
Returns all of the characters in <I>name</I> after the last directory
separator. If <I>name</I> contains no separators then returns
<I>name</I>.
<P><DT><A NAME="M32"><B>file type </B><I>name</I></A><DD>
Returns a string giving the type of file <I>name</I>, which will be one of
<B>file</B>, <B>directory</B>, <B>characterSpecial</B>, <B>blockSpecial</B>,
<B>fifo</B>, <B>link</B>, or <B><A HREF="../TkCmd/socket.htm">socket</A></B>.
<P><DT><A NAME="M33"><B>file volume</B></A><DD>
Returns the absolute paths to the volumes mounted on the system, as a
proper Tcl list. On the Macintosh, this will be a list of the mounted
drives, both local and network. N.B. if two drives have the same name,
they will both appear on the volume list, but there is currently no way,
from Tcl, to access any but the first of these drives. On UNIX, the
command will always return &quot;/&quot;, since all filesystems are locally mounted.
On Windows, it will return a list of the available local drives
(e.g. {a:/ c:/}).
<P><DT><A NAME="M34"><B>file writable </B><I>name</I></A><DD>
Returns <B>1</B> if file <I>name</I> is writable by the current user,
<B>0</B> otherwise.
<P></DL>
<H3><A NAME="M35">PORTABILITY ISSUES</A></H3>
<DL>
<P><DT><A NAME="M36"><B>Unix</B></A><DD>
These commands always operate using the real user and group identifiers,
not the effective ones.
<P></DL>
<H3><A NAME="M37">SEE ALSO</A></H3>
<B><A HREF="../TkCmd/filename.htm">filename</A></B>
<H3><A NAME="M38">KEYWORDS</A></H3>
<A href="../Keywords/A.htm#attributes">attributes</A>, <A href="../Keywords/C.htm#copy files">copy files</A>, <A href="../Keywords/D.htm#delete files">delete files</A>, <A href="../Keywords/D.htm#directory">directory</A>, <A href="../Keywords/F.htm#file">file</A>, <A href="../Keywords/M.htm#move files">move files</A>, <A href="../Keywords/N.htm#name">name</A>, <A href="../Keywords/R.htm#rename files">rename files</A>, <A href="../Keywords/S.htm#stat">stat</A>
<HR><PRE>
<A HREF="../copyright.htm">Copyright</A> &#169; 1993 The Regents of the University of California.
<A HREF="../copyright.htm">Copyright</A> &#169; 1994-1996 Sun Microsystems, Inc.
<A HREF="../copyright.htm">Copyright</A> &#169; 1995-1997 Roger E. Critchlow Jr.</PRE>
</BODY></HTML>

95
hlp/en/tcl/fileevent.htm Normal file
View File

@ -0,0 +1,95 @@
<HTML><HEAD><TITLE>Tcl Built-In Commands - fileevent manual page</TITLE></HEAD><BODY>
<H3><A NAME="M2">NAME</A></H3>
fileevent - Execute a script when a channel becomes readable or writable
<H3><A NAME="M3">SYNOPSIS</A></H3>
<B>fileevent </B><I>channelId </I><B>readable </B>?<I>script</I>?<BR>
<B>fileevent </B><I>channelId </I><B>writable </B>?<I>script</I>?<BR>
<H3><A NAME="M4">DESCRIPTION</A></H3>
This command is used to create <I>file event handlers</I>. A file event
handler is a binding between a channel and a script, such that the script
is evaluated whenever the channel becomes readable or writable. File event
handlers are most commonly used to allow data to be received from another
process on an event-driven basis, so that the receiver can continue to
interact with the user while waiting for the data to arrive. If an
application invokes <B><A HREF="../TkCmd/gets.htm">gets</A></B> or <B><A HREF="../TkCmd/read.htm">read</A></B> on a blocking channel when
there is no input data available, the process will block; until the input
data arrives, it will not be able to service other events, so it will
appear to the user to ``freeze up''. With <B>fileevent</B>, the process can
tell when data is present and only invoke <B><A HREF="../TkCmd/gets.htm">gets</A></B> or <B><A HREF="../TkCmd/read.htm">read</A></B> when
they won't block.
<P>
The <I>channelId</I> argument to <B>fileevent</B> refers to an open channel,
such as the return value from a previous <B><A HREF="../TkCmd/open.htm">open</A></B> or <B><A HREF="../TkCmd/socket.htm">socket</A></B>
command.
If the <I>script</I> argument is specified, then <B>fileevent</B>
creates a new event handler: <I>script</I> will be evaluated
whenever the channel becomes readable or writable (depending on the
second argument to <B>fileevent</B>).
In this case <B>fileevent</B> returns an empty string.
The <B>readable</B> and <B>writable</B> event handlers for a file
are independent, and may be created and deleted separately.
However, there may be at most one <B>readable</B> and one <B>writable</B>
handler for a file at a given time in a given interpreter.
If <B>fileevent</B> is called when the specified handler already
exists in the invoking interpreter, the new script replaces the old one.
<P>
If the <I>script</I> argument is not specified, <B>fileevent</B>
returns the current script for <I>channelId</I>, or an empty string
if there is none.
If the <I>script</I> argument is specified as an empty string
then the event handler is deleted, so that no script will be invoked.
A file event handler is also deleted automatically whenever
its channel is closed or its interpreter is deleted.
<P>
A channel is considered to be readable if there is unread data
available on the underlying device.
A channel is also considered to be readable if there is unread
data in an input buffer, except in the special case where the
most recent attempt to read from the channel was a <B><A HREF="../TkCmd/gets.htm">gets</A></B>
call that could not find a complete line in the input buffer.
This feature allows a file to be read a line at a time in nonblocking mode
using events.
A channel is also considered to be readable if an end of file or
error condition is present on the underlying file or device.
It is important for <I>script</I> to check for these conditions
and handle them appropriately; for example, if there is no special
check for end of file, an infinite loop may occur where <I>script</I>
reads no data, returns, and is immediately invoked again.
<P>
A channel is considered to be writable if at least one byte of data
can be written to the underlying file or device without blocking,
or if an error condition is present on the underlying file or device.
<P>
Event-driven I/O works best for channels that have been
placed into nonblocking mode with the <B><A HREF="../TkCmd/fconfigure.htm">fconfigure</A></B> command.
In blocking mode, a <B><A HREF="../TkCmd/puts.htm">puts</A></B> command may block if you give it
more data than the underlying file or device can accept, and a
<B><A HREF="../TkCmd/gets.htm">gets</A></B> or <B><A HREF="../TkCmd/read.htm">read</A></B> command will block if you attempt to read
more data than is ready; no events will be processed while the
commands block.
In nonblocking mode <B><A HREF="../TkCmd/puts.htm">puts</A></B>, <B><A HREF="../TkCmd/read.htm">read</A></B>, and <B><A HREF="../TkCmd/gets.htm">gets</A></B> never block.
See the documentation for the individual commands for information
on how they handle blocking and nonblocking channels.
<P>
The script for a file event is executed at global level (outside the
context of any Tcl procedure) in the interpreter in which the
<B>fileevent</B> command was invoked.
If an error occurs while executing the script then the
<B><A HREF="../TkCmd/bgerror.htm">bgerror</A></B> mechanism is used to report the error.
In addition, the file event handler is deleted if it ever returns
an error; this is done in order to prevent infinite loops due to
buggy handlers.
<H3><A NAME="M5">CREDITS</A></H3>
<B>fileevent</B> is based on the <B>addinput</B> command created
by Mark Diekhans.
<H3><A NAME="M6">SEE ALSO</A></H3>
<B><A HREF="../TkCmd/bgerror.htm">bgerror</A></B>, <B><A HREF="../TkCmd/fconfigure.htm">fconfigure</A></B>, <B><A HREF="../TkCmd/gets.htm">gets</A></B>, <B><A HREF="../TkCmd/puts.htm">puts</A></B>, <B><A HREF="../TkCmd/read.htm">read</A></B>
<H3><A NAME="M7">KEYWORDS</A></H3>
<A href="../Keywords/A.htm#asynchronous I/O">asynchronous I/O</A>, <A href="../Keywords/B.htm#blocking">blocking</A>, <A href="../Keywords/C.htm#channel">channel</A>, <A href="../Keywords/E.htm#event handler">event handler</A>, <A href="../Keywords/N.htm#nonblocking">nonblocking</A>, <A href="../Keywords/R.htm#readable">readable</A>, <A href="../Keywords/S.htm#script">script</A>, <A href="../Keywords/W.htm#writable.">writable.</A>
<HR><PRE>
<A HREF="../copyright.htm">Copyright</A> &#169; 1994 The Regents of the University of California.
<A HREF="../copyright.htm">Copyright</A> &#169; 1994-1996 Sun Microsystems, Inc.
<A HREF="../copyright.htm">Copyright</A> &#169; 1995-1997 Roger E. Critchlow Jr.</PRE>
</BODY></HTML>

209
hlp/en/tcl/filename.htm Normal file
View File

@ -0,0 +1,209 @@
<HTML><HEAD><TITLE>Tcl Built-In Commands - filename manual page</TITLE></HEAD><BODY>
<DL>
<DD><A HREF="filename.htm#M2" NAME="L357">NAME</A>
<DL><DD>filename - File name conventions supported by Tcl commands</DL>
<DD><A HREF="filename.htm#M3" NAME="L358">INTRODUCTION</A>
<DD><A HREF="filename.htm#M4" NAME="L359">PATH TYPES</A>
<DD><A HREF="filename.htm#M5" NAME="L360">PATH SYNTAX</A>
<DL>
<DD><A HREF="filename.htm#M6" NAME="L361"><B>mac</B></A>
<DL>
<DD><A HREF="filename.htm#M7" NAME="L362"><B>:</B></A>
<DD><A HREF="filename.htm#M8" NAME="L363"><B>MyFile</B></A>
<DD><A HREF="filename.htm#M9" NAME="L364"><B>MyDisk:MyFile</B></A>
<DD><A HREF="filename.htm#M10" NAME="L365"><B>:MyDir:MyFile</B></A>
<DD><A HREF="filename.htm#M11" NAME="L366"><B>::MyFile</B></A>
<DD><A HREF="filename.htm#M12" NAME="L367"><B>:::MyFile</B></A>
<DD><A HREF="filename.htm#M13" NAME="L368"><B>/MyDisk/MyFile</B></A>
<DD><A HREF="filename.htm#M14" NAME="L369"><B> ../MyFile</B></A>
</DL>
<DD><A HREF="filename.htm#M15" NAME="L370"><B>unix</B></A>
<DL>
<DD><A HREF="filename.htm#M16" NAME="L371"><B>/</B></A>
<DD><A HREF="filename.htm#M17" NAME="L372"><B>/etc/passwd</B></A>
<DD><A HREF="filename.htm#M18" NAME="L373"><B> .</B></A>
<DD><A HREF="filename.htm#M19" NAME="L374"><B>foo</B></A>
<DD><A HREF="filename.htm#M20" NAME="L375"><B>foo/bar</B></A>
<DD><A HREF="filename.htm#M21" NAME="L376"><B> ../foo</B></A>
</DL>
<DD><A HREF="filename.htm#M22" NAME="L377"><B>windows</B></A>
<DL>
<DD><A HREF="filename.htm#M23" NAME="L378"><B> &#92;&#92;Host&#92;share/file</B></A>
<DD><A HREF="filename.htm#M24" NAME="L379"><B>c:foo</B></A>
<DD><A HREF="filename.htm#M25" NAME="L380"><B>c:/foo</B></A>
<DD><A HREF="filename.htm#M26" NAME="L381"><B>foo&#92;bar</B></A>
<DD><A HREF="filename.htm#M27" NAME="L382"><B> &#92;foo</B></A>
</DL>
</DL>
<DD><A HREF="filename.htm#M28" NAME="L383">TILDE SUBSTITUTION</A>
<DD><A HREF="filename.htm#M29" NAME="L384">PORTABILITY ISSUES</A>
<DD><A HREF="filename.htm#M30" NAME="L385">KEYWORDS</A>
<DD><A HREF="filename.htm#M31" NAME="L386">SEE ALSO</A>
</DL><HR>
<H3><A NAME="M2">NAME</A></H3>
filename - File name conventions supported by Tcl commands
<H3><A NAME="M3">INTRODUCTION</A></H3>
All Tcl commands and C procedures that take file names as arguments
expect the file names to be in one of three forms, depending on the
current platform. On each platform, Tcl supports file names in the
standard forms(s) for that platform. In addition, on all platforms,
Tcl supports a Unix-like syntax intended to provide a convenient way
of constructing simple file names. However, scripts that are intended
to be portable should not assume a particular form for file names.
Instead, portable scripts must use the <B><A HREF="../TkCmd/file.htm">file split</A></B> and <B>file
join</B> commands to manipulate file names (see the <B><A HREF="../TkCmd/file.htm">file</A></B> manual
entry for more details).
<H3><A NAME="M4">PATH TYPES</A></H3>
File names are grouped into three general types based on the starting point
for the path used to specify the file: absolute, relative, and
volume-relative. Absolute names are completely qualified, giving a path to
the file relative to a particular volume and the root directory on that
volume. Relative names are unqualified, giving a path to the file relative
to the current working directory. Volume-relative names are partially
qualified, either giving the path relative to the root directory on the
current volume, or relative to the current directory of the specified
volume. The <B><A HREF="../TkCmd/file.htm">file pathtype</A></B> command can be used to determine the
type of a given path.
<H3><A NAME="M5">PATH SYNTAX</A></H3>
The rules for native names depend on the value reported in the Tcl
array element <B>tcl_platform(platform)</B>:
<P>
<DL>
<P><DT><A NAME="M6"><B>mac</B></A><DD>
On Apple Macintosh systems, Tcl supports two forms of path names. The
normal Mac style names use colons as path separators. Paths may be
relative or absolute, and file names may contain any character other
than colon. A leading colon causes the rest of the path to be
interpreted relative to the current directory. If a path contains a
colon that is not at the beginning, then the path is interpreted as an
absolute path. Sequences of two or more colons anywhere in the path
are used to construct relative paths where <B>::</B> refers to the
parent of the current directory, <B>:::</B> refers to the parent of the
parent, and so forth.
<P>
In addition to Macintosh style names, Tcl also supports a subset of
Unix-like names. If a path contains no colons, then it is interpreted
like a Unix path. Slash is used as the path separator. The file name
<B> .</B> refers to the current directory, and <B> ..</B> refers to the
parent of the current directory. However, some names like <B>/</B> or
<B>/..</B> have no mapping, and are interpreted as Macintosh names. In
general, commands that generate file names will return Macintosh style
names, but commands that accept file names will take both Macintosh
and Unix-style names.
<P>
The following examples illustrate various forms of path names:
<P>
<DL>
<P><DT><A NAME="M7"><B>:</B></A><DD>
Relative path to the current folder.
<P><DT><A NAME="M8"><B>MyFile</B></A><DD>
Relative path to a file named <B>MyFile</B> in the current folder.
<P><DT><A NAME="M9"><B>MyDisk:MyFile</B></A><DD>
Absolute path to a file named <B>MyFile</B> on the device named <B>MyDisk</B>.
<P><DT><A NAME="M10"><B>:MyDir:MyFile</B></A><DD>
Relative path to a file name <B>MyFile</B> in a folder named
<B>MyDir</B> in the current folder.
<P><DT><A NAME="M11"><B>::MyFile</B></A><DD>
Relative path to a file named <B>MyFile</B> in the folder above the
current folder.
<P><DT><A NAME="M12"><B>:::MyFile</B></A><DD>
Relative path to a file named <B>MyFile</B> in the folder two levels above the
current folder.
<P><DT><A NAME="M13"><B>/MyDisk/MyFile</B></A><DD>
Absolute path to a file named <B>MyFile</B> on the device named
<B>MyDisk</B>.
<P><DT><A NAME="M14"><B> ../MyFile</B></A><DD>
Relative path to a file named <B>MyFile</B> in the folder above the
current folder.
<P></DL>
<P><DT><A NAME="M15"><B>unix</B></A><DD>
On Unix platforms, Tcl uses path names where the components are
separated by slashes. Path names may be relative or absolute, and
file names may contain any character other than slash. The file names
<B> .</B> and <B> ..</B> are special and refer to the current directory
and the parent of the current directory respectively. Multiple
adjacent slash characters are interpreted as a single separator.
The following examples illustrate various forms of path names:
<P>
<DL>
<P><DT><A NAME="M16"><B>/</B></A><DD>
Absolute path to the root directory.
<P><DT><A NAME="M17"><B>/etc/passwd</B></A><DD>
Absolute path to the file named <B>passwd</B> in the directory
<B>etc</B> in the root directory.
<P><DT><A NAME="M18"><B> .</B></A><DD>
Relative path to the current directory.
<P><DT><A NAME="M19"><B>foo</B></A><DD>
Relative path to the file <B>foo</B> in the current directory.
<P><DT><A NAME="M20"><B>foo/bar</B></A><DD>
Relative path to the file <B>bar</B> in the directory <B>foo</B> in the
current directory.
<P><DT><A NAME="M21"><B> ../foo</B></A><DD>
Relative path to the file <B>foo</B> in the directory above the current
directory.
<P></DL>
<P><DT><A NAME="M22"><B>windows</B></A><DD>
On Microsoft Windows platforms, Tcl supports both drive-relative and UNC
style names. Both <B>/</B> and <B>&#92;</B> may be used as directory separators
in either type of name. Drive-relative names consist of an optional drive
specifier followed by an absolute or relative path. UNC paths follow the
general form <B>&#92;&#92;servername&#92;sharename&#92;path&#92;file</B>. In both forms,
the file names <B>.</B> and <B>..</B> are special and refer to the current
directory and the parent of the current directory respectively. The
following examples illustrate various forms of path names:
<P>
<DL>
<P><DT><A NAME="M23"><B> &#92;&#92;Host&#92;share/file</B></A><DD>
Absolute UNC path to a file called <B><A HREF="../TkCmd/file.htm">file</A></B> in the root directory of
the export point <B>share</B> on the host <B>Host</B>.
<P><DT><A NAME="M24"><B>c:foo</B></A><DD>
Volume-relative path to a file <B>foo</B> in the current directory on drive
<B>c</B>.
<P><DT><A NAME="M25"><B>c:/foo</B></A><DD>
Absolute path to a file <B>foo</B> in the root directory of drive
<B>c</B>.
<P><DT><A NAME="M26"><B>foo&#92;bar</B></A><DD>
Relative path to a file <B>bar</B> in the <B>foo</B> directory in the current
directory on the current volume.
<P><DT><A NAME="M27"><B> &#92;foo</B></A><DD>
Volume-relative path to a file <B>foo</B> in the root directory of the current
volume.
<P></DL>
<P></DL>
<H3><A NAME="M28">TILDE SUBSTITUTION</A></H3>
In addition to the file name rules described above, Tcl also supports
<I>csh</I>-style tilde substitution. If a file name starts with a
tilde, then the file name will be interpreted as if the first element
is replaced with the location of the home directory for the given
user. If the tilde is followed immediately by a separator, then the
<B>$HOME</B> environment variable is substituted. Otherwise the
characters between the tilde and the next separator are taken as a
user name, which is used to retrieve the user's home directory for
substitution.
<P>
The Macintosh and Windows platforms do not support tilde substitution
when a user name follows the tilde. On these platforms, attempts to
use a tilde followed by a user name will generate an error. File
names that have a tilde without a user name will be substituted using
the <B>$HOME</B> environment variable, just like for Unix.
<H3><A NAME="M29">PORTABILITY ISSUES</A></H3>
Not all file systems are case sensitive, so scripts should avoid code
that depends on the case of characters in a file name. In addition,
the character sets allowed on different devices may differ, so scripts
should choose file names that do not contain special characters like:
<B>&lt;&gt;:&quot;/&#92;|</B>. The safest approach is to use names consisting of
alphanumeric characters only. Also Windows 3.1 only supports file
names with a root of no more than 8 characters and an extension of no
more than 3 characters.
<H3><A NAME="M30">KEYWORDS</A></H3>
<A href="../Keywords/C.htm#current directory">current directory</A>, <A href="../Keywords/A.htm#absolute file name">absolute file name</A>, <A href="../Keywords/R.htm#relative file name">relative file name</A>, <A href="../Keywords/V.htm#volume-relative file name">volume-relative file name</A>, <A href="../Keywords/P.htm#portability">portability</A>
<H3><A NAME="M31">SEE ALSO</A></H3>
<B><A HREF="../TkCmd/file.htm">file</A></B>, <B><A HREF="../TkCmd/glob.htm">glob</A></B>
<HR><PRE>
<A HREF="../copyright.htm">Copyright</A> &#169; 1995-1996 Sun Microsystems, Inc.
<A HREF="../copyright.htm">Copyright</A> &#169; 1995-1997 Roger E. Critchlow Jr.</PRE>
</BODY></HTML>

24
hlp/en/tcl/flush.htm Normal file
View File

@ -0,0 +1,24 @@
<HTML><HEAD><TITLE>Tcl Built-In Commands - flush manual page</TITLE></HEAD><BODY>
<H3><A NAME="M2">NAME</A></H3>
flush - Flush buffered output for a channel
<H3><A NAME="M3">SYNOPSIS</A></H3>
<B>flush </B><I>channelId</I><BR>
<H3><A NAME="M4">DESCRIPTION</A></H3>
Flushes any output that has been buffered for <I>channelId</I>.
<I>ChannelId</I> must be a channel identifier such as returned by a previous
<B><A HREF="../TkCmd/open.htm">open</A></B> or <B><A HREF="../TkCmd/socket.htm">socket</A></B> command, and it must have been opened for writing.
If the channel is in blocking mode the command does not return until all the
buffered output has been flushed to the channel. If the channel is in
nonblocking mode, the command may return before all buffered output has been
flushed; the remainder will be flushed in the background as fast as the
underlying file or device is able to absorb it.
<H3><A NAME="M5">SEE ALSO</A></H3>
<B><A HREF="../TkCmd/file.htm">file</A></B>, <B><A HREF="../TkCmd/open.htm">open</A></B>, <B><A HREF="../TkCmd/socket.htm">socket</A></B>
<H3><A NAME="M6">KEYWORDS</A></H3>
<A href="../Keywords/B.htm#blocking">blocking</A>, <A href="../Keywords/B.htm#buffer">buffer</A>, <A href="../Keywords/C.htm#channel">channel</A>, <A href="../Keywords/F.htm#flush">flush</A>, <A href="../Keywords/N.htm#nonblocking">nonblocking</A>, <A href="../Keywords/O.htm#output">output</A>
<HR><PRE>
<A HREF="../copyright.htm">Copyright</A> &#169; 1993 The Regents of the University of California.
<A HREF="../copyright.htm">Copyright</A> &#169; 1994-1996 Sun Microsystems, Inc.
<A HREF="../copyright.htm">Copyright</A> &#169; 1995-1997 Roger E. Critchlow Jr.</PRE>
</BODY></HTML>

49
hlp/en/tcl/for.htm Normal file
View File

@ -0,0 +1,49 @@
<HTML><HEAD><TITLE>Built-In Commands - for manual page</TITLE></HEAD><BODY>
<H3><A NAME="M2">NAME</A></H3>
for - ``For'' loop
<H3><A NAME="M3">SYNOPSIS</A></H3>
<B>for </B><I>start test next body</I><BR>
<H3><A NAME="M4">DESCRIPTION</A></H3>
<B>For</B> is a looping command, similar in structure to the C
<B>for</B> statement. The <I>start</I>, <I>next</I>, and
<I>body</I> arguments must be Tcl command strings, and <I>test</I>
is an expression string.
The <B>for</B> command first invokes the Tcl interpreter to
execute <I>start</I>. Then it repeatedly evaluates <I>test</I> as
an expression; if the result is non-zero it invokes the Tcl
interpreter on <I>body</I>, then invokes the Tcl interpreter on <I>next</I>,
then repeats the loop. The command terminates when <I>test</I> evaluates
to 0. If a <B><A HREF="../TkCmd/continue.htm">continue</A></B> command is invoked within <I>body</I> then
any remaining commands in the current execution of <I>body</I> are skipped;
processing continues by invoking the Tcl interpreter on <I>next</I>, then
evaluating <I>test</I>, and so on. If a <B><A HREF="../TkCmd/break.htm">break</A></B> command is invoked
within <I>body</I>
or <I>next</I>,
then the <B>for</B> command will
return immediately.
The operation of <B><A HREF="../TkCmd/break.htm">break</A></B> and <B><A HREF="../TkCmd/continue.htm">continue</A></B> are similar to the
corresponding statements in C.
<B>For</B> returns an empty string.
<P>
Note: <I>test</I> should almost always be enclosed in braces. If not,
variable substitutions will be made before the <B>for</B>
command starts executing, which means that variable changes
made by the loop body will not be considered in the expression.
This is likely to result in an infinite loop. If <I>test</I> is
enclosed in braces, variable substitutions are delayed until the
expression is evaluated (before
each loop iteration), so changes in the variables will be visible.
For an example, try the following script with and without the braces
around <B>$x&lt;10</B>:
<PRE>for {set x 0} {$x&lt;10} {incr x} {
puts &quot;x is $x&quot;
}</PRE>
<H3><A NAME="M5">SEE ALSO</A></H3>
<B><A HREF="../TkCmd/break.htm">break</A></B>, <B><A HREF="../TkCmd/continue.htm">continue</A></B>, <B><A HREF="../TkCmd/foreach.htm">foreach</A></B>, <B><A HREF="../TkCmd/while.htm">while</A></B>
<H3><A NAME="M6">KEYWORDS</A></H3>
<A href="../Keywords/F.htm#for">for</A>, <A href="../Keywords/I.htm#iteration">iteration</A>, <A href="../Keywords/L.htm#looping">looping</A>
<HR><PRE>
<A HREF="../copyright.htm">Copyright</A> &#169; 1993 The Regents of the University of California.
<A HREF="../copyright.htm">Copyright</A> &#169; 1994-1997 Sun Microsystems, Inc.
<A HREF="../copyright.htm">Copyright</A> &#169; 1995-1997 Roger E. Critchlow Jr.</PRE>
</BODY></HTML>

70
hlp/en/tcl/foreach.htm Normal file
View File

@ -0,0 +1,70 @@
<HTML><HEAD><TITLE>Built-In Commands - foreach manual page</TITLE></HEAD><BODY>
<H3><A NAME="M2">NAME</A></H3>
foreach - Iterate over all elements in one or more lists
<H3><A NAME="M3">SYNOPSIS</A></H3>
<B>foreach </B><I>varname list body</I><BR>
<B>foreach </B><I>varlist1 list1</I> ?<I>varlist2 list2 ...</I>? <I>body</I><BR>
<H3><A NAME="M4">DESCRIPTION</A></H3>
The <B>foreach</B> command implements a loop where the loop
variable(s) take on values from one or more lists.
In the simplest case there is one loop variable, <I>varname</I>,
and one list, <I>list</I>, that is a list of values to assign to <I>varname</I>.
The <I>body</I> argument is a Tcl script.
For each element of <I>list</I> (in order
from first to last), <B>foreach</B> assigns the contents of the
element to <I>varname</I> as if the <B><A HREF="../TkCmd/lindex.htm">lindex</A></B> command had been used
to extract the element, then calls the Tcl interpreter to execute
<I>body</I>.
<P>
In the general case there can be more than one value list
(e.g., <I>list1</I> and <I>list2</I>),
and each value list can be associated with a list of loop variables
(e.g., <I>varlist1</I> and <I>varlist2</I>).
During each iteration of the loop
the variables of each <I>varlist</I> are assigned
consecutive values from the corresponding <I>list</I>.
Values in each <I>list</I> are used in order from first to last,
and each value is used exactly once.
The total number of loop iterations is large enough to use
up all the values from all the value lists.
If a value list does not contain enough
elements for each of its loop variables in each iteration,
empty values are used for the missing elements.
<P>
The <B><A HREF="../TkCmd/break.htm">break</A></B> and <B><A HREF="../TkCmd/continue.htm">continue</A></B> statements may be
invoked inside <I>body</I>, with the same effect as in the <B><A HREF="../TkCmd/for.htm">for</A></B>
command. <B>Foreach</B> returns an empty string.
<H3><A NAME="M5">EXAMPLES</A></H3>
The following loop uses i and j as loop variables to iterate over
pairs of elements of a single list.
<PRE>set x {}
foreach {i j} {a b c d e f} {
lappend x $j $i
}
# The value of x is &quot;b a d c f e&quot;
# There are 3 iterations of the loop.</PRE>
<P>
The next loop uses i and j to iterate over two lists in parallel.
<PRE>set x {}
foreach i {a b c} j {d e f g} {
lappend x $i $j
}
# The value of x is &quot;a d b e c f {} g&quot;
# There are 4 iterations of the loop.</PRE>
<P>
The two forms are combined in the following example.
<PRE>set x {}
foreach i {a b c} {j k} {d e f g} {
lappend x $i $j $k
}
# The value of x is &quot;a d e b f g c {} {}&quot;
# There are 3 iterations of the loop.</PRE>
<H3><A NAME="M6">SEE ALSO</A></H3>
<B><A HREF="../TkCmd/for.htm">for</A></B>, <B><A HREF="../TkCmd/while.htm">while</A></B>, <B><A HREF="../TkCmd/break.htm">break</A></B>, <B><A HREF="../TkCmd/continue.htm">continue</A></B>
<H3><A NAME="M7">KEYWORDS</A></H3>
<A href="../Keywords/F.htm#foreach">foreach</A>, <A href="../Keywords/I.htm#iteration">iteration</A>, <A href="../Keywords/L.htm#list">list</A>, <A href="../Keywords/L.htm#looping">looping</A>
<HR><PRE>
<A HREF="../copyright.htm">Copyright</A> &#169; 1993 The Regents of the University of California.
<A HREF="../copyright.htm">Copyright</A> &#169; 1994-1996 Sun Microsystems, Inc.
<A HREF="../copyright.htm">Copyright</A> &#169; 1995-1997 Roger E. Critchlow Jr.</PRE>
</BODY></HTML>

230
hlp/en/tcl/format.htm Normal file
View File

@ -0,0 +1,230 @@
<HTML><HEAD><TITLE>Tcl Built-In Commands - format manual page</TITLE></HEAD><BODY>
<DL>
<DD><A HREF="format.htm#M2" NAME="L403">NAME</A>
<DL><DD>format - Format a string in the style of sprintf</DL>
<DD><A HREF="format.htm#M3" NAME="L404">SYNOPSIS</A>
<DL>
<DD><B>format </B><I>formatString </I>?<I>arg arg ...</I>?
</DL>
<DD><A HREF="format.htm#M4" NAME="L405">INTRODUCTION</A>
<DD><A HREF="format.htm#M5" NAME="L406">DETAILS ON FORMATTING</A>
<DL>
<DD><A HREF="format.htm#M6" NAME="L407"><B>-</B></A>
<DD><A HREF="format.htm#M7" NAME="L408"><B>+</B></A>
<DD><A HREF="format.htm#M8" NAME="L409"><I>space</I></A>
<DD><A HREF="format.htm#M9" NAME="L410"><B>0</B></A>
<DD><A HREF="format.htm#M10" NAME="L411"><B>#</B></A>
</DL>
<DL>
<DD><A HREF="format.htm#M11" NAME="L412"><B>d</B></A>
<DD><A HREF="format.htm#M12" NAME="L413"><B>u</B></A>
<DD><A HREF="format.htm#M13" NAME="L414"><B>i</B></A>
<DD><A HREF="format.htm#M14" NAME="L415"><B>o</B></A>
<DD><A HREF="format.htm#M15" NAME="L416"><B>x</B> or <B>X</B></A>
<DD><A HREF="format.htm#M16" NAME="L417"><B>c</B></A>
<DD><A HREF="format.htm#M17" NAME="L418"><B>s</B></A>
<DD><A HREF="format.htm#M18" NAME="L419"><B>f</B></A>
<DD><A HREF="format.htm#M19" NAME="L420"><B>e</B> or <B>e</B></A>
<DD><A HREF="format.htm#M20" NAME="L421"><B>g</B> or <B>G</B></A>
<DD><A HREF="format.htm#M21" NAME="L422"><B>%</B></A>
</DL>
<DD><A HREF="format.htm#M22" NAME="L423">DIFFERENCES FROM ANSI SPRINTF</A>
<DL>
</DL>
<DD><A HREF="format.htm#M23" NAME="L424">SEE ALSO</A>
<DD><A HREF="format.htm#M24" NAME="L425">KEYWORDS</A>
</DL><HR>
<H3><A NAME="M2">NAME</A></H3>
format - Format a string in the style of sprintf
<H3><A NAME="M3">SYNOPSIS</A></H3>
<B>format </B><I>formatString </I>?<I>arg arg ...</I>?<BR>
<H3><A NAME="M4">INTRODUCTION</A></H3>
This command generates a formatted string in the same way as the
ANSI C <B>sprintf</B> procedure (it uses <B>sprintf</B> in its
implementation).
<I>FormatString</I> indicates how to format the result, using
<B>%</B> conversion specifiers as in <B>sprintf</B>, and the additional
arguments, if any, provide values to be substituted into the result.
The return value from <B>format</B> is the formatted string.
<H3><A NAME="M5">DETAILS ON FORMATTING</A></H3>
The command operates by scanning <I>formatString</I> from left to right.
Each character from the format string is appended to the result
string unless it is a percent sign.
If the character is a <B>%</B> then it is not copied to the result string.
Instead, the characters following the <B>%</B> character are treated as
a conversion specifier.
The conversion specifier controls the conversion of the next successive
<I>arg</I> to a particular format and the result is appended to
the result string in place of the conversion specifier.
If there are multiple conversion specifiers in the format string,
then each one controls the conversion of one additional <I>arg</I>.
The <B>format</B> command must be given enough <I>arg</I>s to meet the needs
of all of the conversion specifiers in <I>formatString</I>.
<P>
Each conversion specifier may contain up to six different parts:
an XPG3 position specifier,
a set of flags, a minimum field width, a precision, a length modifier,
and a conversion character.
Any of these fields may be omitted except for the conversion character.
The fields that are present must appear in the order given above.
The paragraphs below discuss each of these fields in turn.
<P>
If the <B>%</B> is followed by a decimal number and a <B>$</B>, as in
``<B>%2$d</B>'', then the value to convert is not taken from the
next sequential argument.
Instead, it is taken from the argument indicated by the number,
where 1 corresponds to the first <I>arg</I>.
If the conversion specifier requires multiple arguments because
of <B>*</B> characters in the specifier then
successive arguments are used, starting with the argument
given by the number.
This follows the XPG3 conventions for positional specifiers.
If there are any positional specifiers in <I>formatString</I>
then all of the specifiers must be positional.
<P>
The second portion of a conversion specifier may contain any of the
following flag characters, in any order:
<P>
<DL>
<P><DT><A NAME="M6"><B>-</B></A><DD>
Specifies that the converted argument should be left-justified
in its field (numbers are normally right-justified with leading
spaces if needed).
<P><DT><A NAME="M7"><B>+</B></A><DD>
Specifies that a number should always be printed with a sign,
even if positive.
<P><DT><A NAME="M8"><I>space</I></A><DD>
Specifies that a space should be added to the beginning of the
number if the first character isn't a sign.
<P><DT><A NAME="M9"><B>0</B></A><DD>
Specifies that the number should be padded on the left with
zeroes instead of spaces.
<P><DT><A NAME="M10"><B>#</B></A><DD>
Requests an alternate output form. For <B>o</B> and <B>O</B>
conversions it guarantees that the first digit is always <B>0</B>.
For <B>x</B> or <B>X</B> conversions, <B>0x</B> or <B>0X</B> (respectively)
will be added to the beginning of the result unless it is zero.
For all floating-point conversions (<B>e</B>, <B>E</B>, <B>f</B>,
<B>g</B>, and <B>G</B>) it guarantees that the result always
has a decimal point.
For <B>g</B> and <B>G</B> conversions it specifies that
trailing zeroes should not be removed.
<P></DL>
<P>
The third portion of a conversion specifier is a number giving a
minimum field width for this conversion.
It is typically used to make columns line up in tabular printouts.
If the converted argument contains fewer characters than the
minimum field width then it will be padded so that it is as wide
as the minimum field width.
Padding normally occurs by adding extra spaces on the left of the
converted argument, but the <B>0</B> and <B>-</B> flags
may be used to specify padding with zeroes on the left or with
spaces on the right, respectively.
If the minimum field width is specified as <B>*</B> rather than
a number, then the next argument to the <B>format</B> command
determines the minimum field width; it must be a numeric string.
<P>
The fourth portion of a conversion specifier is a precision,
which consists of a period followed by a number.
The number is used in different ways for different conversions.
For <B>e</B>, <B>E</B>, and <B>f</B> conversions it specifies the number
of digits to appear to the right of the decimal point.
For <B>g</B> and <B>G</B> conversions it specifies the total number
of digits to appear, including those on both sides of the decimal
point (however, trailing zeroes after the decimal point will still
be omitted unless the <B>#</B> flag has been specified).
For integer conversions, it specifies a minimum number of digits
to print (leading zeroes will be added if necessary).
For <B>s</B> conversions it specifies the maximum number of characters to be
printed; if the string is longer than this then the trailing characters will be dropped.
If the precision is specified with <B>*</B> rather than a number
then the next argument to the <B>format</B> command determines the precision;
it must be a numeric string.
<P>
The fifth part of a conversion specifier is a length modifier,
which must be <B>h</B> or <B>l</B>.
If it is <B>h</B> it specifies that the numeric value should be
truncated to a 16-bit value before converting.
This option is rarely useful.
The <B>l</B> modifier is ignored.
<P>
The last thing in a conversion specifier is an alphabetic character
that determines what kind of conversion to perform.
The following conversion characters are currently supported:
<P>
<DL>
<P><DT><A NAME="M11"><B>d</B></A><DD>
Convert integer to signed decimal string.
<P><DT><A NAME="M12"><B>u</B></A><DD>
Convert integer to unsigned decimal string.
<P><DT><A NAME="M13"><B>i</B></A><DD>
Convert integer to signed decimal string; the integer may either be
in decimal, in octal (with a leading <B>0</B>) or in hexadecimal
(with a leading <B>0x</B>).
<P><DT><A NAME="M14"><B>o</B></A><DD>
Convert integer to unsigned octal string.
<P><DT><A NAME="M15"><B>x</B> or <B>X</B></A><DD>
Convert integer to unsigned hexadecimal string, using digits
``0123456789abcdef'' for <B>x</B> and ``0123456789ABCDEF'' for <B>X</B>).
<P><DT><A NAME="M16"><B>c</B></A><DD>
Convert integer to the Unicode character it represents.
<P><DT><A NAME="M17"><B>s</B></A><DD>
No conversion; just insert string.
<P><DT><A NAME="M18"><B>f</B></A><DD>
Convert floating-point number to signed decimal string of
the form <I>xx.yyy</I>, where the number of <I>y</I>'s is determined by
the precision (default: 6).
If the precision is 0 then no decimal point is output.
<P><DT><A NAME="M19"><B>e</B> or <B>e</B></A><DD>
Convert floating-point number to scientific notation in the
form <I>x.yyy</I><B>e&#177;</B><I>zz</I>, where the number of <I>y</I>'s is determined
by the precision (default: 6).
If the precision is 0 then no decimal point is output.
If the <B>E</B> form is used then <B>E</B> is
printed instead of <B>e</B>.
<P><DT><A NAME="M20"><B>g</B> or <B>G</B></A><DD>
If the exponent is less than -4 or greater than or equal to the
precision, then convert floating-point number as for <B>%e</B> or
<B>%E</B>.
Otherwise convert as for <B>%f</B>.
Trailing zeroes and a trailing decimal point are omitted.
<P><DT><A NAME="M21"><B>%</B></A><DD>
No conversion: just insert <B>%</B>.
<P></DL>
<P>
For the numerical conversions the argument being converted must
be an integer or floating-point string; format converts the argument
to binary and then converts it back to a string according to
the conversion specifier.
<H3><A NAME="M22">DIFFERENCES FROM ANSI SPRINTF</A></H3>
The behavior of the format command is the same as the
ANSI C <B>sprintf</B> procedure except for the following
differences:
<P>
<DL>
<P><DT>[1]<DD>
<B>%p</B> and <B>%n</B> specifiers are not currently supported.
<P><DT>[2]<DD>
For <B>%c</B> conversions the argument must be a decimal string,
which will then be converted to the corresponding character value.
<P><DT>[3]<DD>
The <B>l</B> modifier is ignored; integer values are always converted
as if there were no modifier present and real values are always
converted as if the <B>l</B> modifier were present (i.e. type
<B>double</B> is used for the internal representation).
If the <B>h</B> modifier is specified then integer values are truncated
to <B>short</B> before conversion.
<P></DL>
<H3><A NAME="M23">SEE ALSO</A></H3>
<B>sprintf</B>, <B><A HREF="../TkCmd/string.htm">string</A></B>
<H3><A NAME="M24">KEYWORDS</A></H3>
<A href="../Keywords/C.htm#conversion specifier">conversion specifier</A>, <A href="../Keywords/F.htm#format">format</A>, <A href="../Keywords/S.htm#sprintf">sprintf</A>, <A href="../Keywords/S.htm#string">string</A>, <A href="../Keywords/S.htm#substitution">substitution</A>
<HR><PRE>
<A HREF="../copyright.htm">Copyright</A> &#169; 1993 The Regents of the University of California.
<A HREF="../copyright.htm">Copyright</A> &#169; 1994-1996 Sun Microsystems, Inc.
<A HREF="../copyright.htm">Copyright</A> &#169; 1995-1997 Roger E. Critchlow Jr.</PRE>
</BODY></HTML>

39
hlp/en/tcl/gets.htm Normal file
View File

@ -0,0 +1,39 @@
<HTML><HEAD><TITLE>Tcl Built-In Commands - gets manual page</TITLE></HEAD><BODY>
<H3><A NAME="M2">NAME</A></H3>
gets - Read a line from a channel
<H3><A NAME="M3">SYNOPSIS</A></H3>
<B>gets </B><I>channelId</I> ?<I>varName</I>?<BR>
<H3><A NAME="M4">DESCRIPTION</A></H3>
This command reads the next line from <I>channelId</I>, returns everything
in the line up to (but not including) the end-of-line character(s), and
discards the end-of-line character(s).
If <I>varName</I> is omitted the line is returned as the result of the
command.
If <I>varName</I> is specified then the line is placed in the variable by
that name and the return value is a count of the number of characters
returned.
<P>
If end of file occurs while scanning for an end of
line, the command returns whatever input is available up to the end of file.
If <I>channelId</I> is in nonblocking mode and there is not a full
line of input available, the command returns an empty string and
does not consume any input.
If <I>varName</I> is specified and an empty string is returned in
<I>varName</I> because of end-of-file or because of insufficient
data in nonblocking mode, then the return count is -1.
Note that if <I>varName</I> is not specified then the end-of-file
and no-full-line-available cases can
produce the same results as if there were an input line consisting
only of the end-of-line character(s).
The <B><A HREF="../TkCmd/eof.htm">eof</A></B> and <B><A HREF="../TkCmd/fblocked.htm">fblocked</A></B> commands can be used to distinguish
these three cases.
<H3><A NAME="M5">SEE ALSO</A></H3>
<B><A HREF="../TkCmd/file.htm">file</A></B>, <B><A HREF="../TkCmd/eof.htm">eof</A></B>, <B><A HREF="../TkCmd/fblocked.htm">fblocked</A></B>
<H3><A NAME="M6">KEYWORDS</A></H3>
<A href="../Keywords/B.htm#blocking">blocking</A>, <A href="../Keywords/C.htm#channel">channel</A>, <A href="../Keywords/E.htm#end of file">end of file</A>, <A href="../Keywords/E.htm#end of line">end of line</A>, <A href="../Keywords/L.htm#line">line</A>, <A href="../Keywords/N.htm#nonblocking">nonblocking</A>, <A href="../Keywords/R.htm#read">read</A>
<HR><PRE>
<A HREF="../copyright.htm">Copyright</A> &#169; 1993 The Regents of the University of California.
<A HREF="../copyright.htm">Copyright</A> &#169; 1994-1996 Sun Microsystems, Inc.
<A HREF="../copyright.htm">Copyright</A> &#169; 1995-1997 Roger E. Critchlow Jr.</PRE>
</BODY></HTML>

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