diff --git a/ChangeLog b/ChangeLog index 74669d01..ea36f19b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,320 @@ +2013-10-30 Andreas Kupries (AS Senior Dev) + + * examples/canvas/crosshairs_for_axes.tcl: [Ticket [19721eff15]]. + * examples/canvas/crosshairs_for_multixyplot.tcl: Updated canvas + * examples/canvas/crosshairs_scaled.tcl: examples for runnability + against an installed tklib. Patch by stu. + +2013-10-30 Andreas Kupries + + * README: [Ticket [678c8ac255]]. Updated file references. Reported + by Arjen Markus. + +2013-04-03 Andreas Kupries + + * apps/diagram-viewer: Renamed 'dia' to avoid clashes with the + * apps/diagram-viewer.man: Gnome 'dia' application. + * support/installation/modules.tcl: + +2013-03-25 Andreas Kupries + + * + * Released and tagged Tklib 0.6 ======================== + * + +2012-08-27 Andreas Kupries + + * support/installation/modules.tcl: Added the new widgetl module. + * support/installation/modules.tcl: Added the new widgetv module. + +2012-06-21 Andreas Kupries + + * Makefile.in (install, install-libraries, install-doc): + [Bug 3536133]: Added missing -app-path and -no-apps + options. Thanks to Georgios Petasis . + +2010-12-14 Rüdiger Härtel + + * support/devel/sak/doc/kwic.txt: added widget_dateentry.man + * support/devel/sak/doc/manpages.txt: so that it is build and + * support/devel/sak/doc/toc.txt: installed + +2010-12-07 Csaba Nemethi + + * examples/mentry: Added the modules mentry and wcb, + * examples/wcb: with examples. + * modules/mentry: + * modules/wcb: + * support/installation/modules.tcl: + +2010-08-23 Andreas Kupries + + * apps/bitmap-editor: Additional functionality by Keith (mouse + stroking, cursor, rename, and undo), plus teapot meta data. + +2010-08-20 Andreas Kupries + + * apps/bitmap-editor: New application, by Keith Vetter, added + * apps/bitmap-editor.man: with permission. + * support/installation/modules.tcl: + +2010-08-10 Arjen Markus + + * support/installation/modules.tcl: Added the new controlwidget module + +2010-07-07 Andreas Kupries + + * README.developer: New files to help the referenced people with + * README.releasemgr: their work on Tklib. Copied from Tcllib, and + modified to suit. + +2009-11-25 Andreas Kupries + + * Makefile.in (test): [Bug 2903927]: Modified test target to + behave like tcllib's test target. + +2009-02-06 Andreas Kupries + + * modules/swaplist/swaplist.man: General cleanup of all the documentation + * modules/ntext/ntextBindings.man: warnings reported for the packages. + * modules/ntext/ntext.man: + * modules/ntext/ntextIndent.man: + * modules/ntext/ntextWordBreak.man: + * modules/widget/widget_toolbar.man: + * modules/widget/widget_calendar.man: + * modules/ico/ico.man: + * modules/khim/khim.man: + * modules/tkpiechart/canvaslabel.man: + * modules/tkpiechart/pieperipherallabeler.man: + * modules/tkpiechart/pieboxlabeler.man: + * modules/tkpiechart/pie.man: + * modules/ipentry/ipentry.man: + * modules/plotchart/plotchart.man: + * modules/ctext/ctext.man: + * modules/diagrams/draw_diagram.man: + * modules/tooltip/tooltip.man: + * modules/canvas/canvas_sqmap.man: + * modules/canvas/canvas_zoom.man: + + * installer.tcl: Updated to use the installer and sak of tcllib + * sak.tcl: head. + + * PACKAGES: Moved to new directory support/releases/ + * tklib_version.tcl: Ditto. + * README-0.4.txt: Moved to new directory support/releases/history/ + * README-0.5.txt: Ditto. + * all.tcl: Moved to new directory support/devel + * install_action.tcl: Moved to new directory support/installation + * installed_modules.tcl: Ditto. + * main.tcl: Ditto. + * man.macros: Ditto. + + * support/: New directory, mostly sak from Tcllib, and the renamed + forms of the moved files, see above. + +2009-02-05 Andreas Kupries + + * examples/ntext/ntextExample.tcl: Modified examples to assume + * examples/tkpiechart/demo.tcl: that they are run by a tclsh + * installed_modules.tcl: found on the PATH, and that this shell + * modules/plotchart/plotpriv.tcl: has access to the packages of + Tklib required by the example. The patches were provided by + Stuart Cassoff as part of his work + on making a Tklib OpenBSD port. Added the examples for a number + of modules to the installer. Patch by Stuart, see above. + +2009-01-21 Andreas Kupries + + * + * Released and tagged Tklib 0.5 ======================== + * + +2008-11-22 Andreas Kupries + + * installed_modules.tcl: New module 'canvas' added, providing + * modules/canvas: extended canvas widgets. + +2008-11-04 Andreas Kupries + + * installed_modules.tcl: New module 'crosshair' added, providing + * modules/crosshair: cross-hairs in canvas widgets. + +2008-05-01 Andreas Kupries + + * sak.tcl (gd-gen-tap): Added hacks to get proper tap definitions + for Tablelist and its related packages. + +2008-02-21 Jeff Hobbs + + * installed_modules.tcl: + * examples/widget/screenruler.tcl: Added widget::screenruler example + +2007-10-19 Pat Thoyts + + * modules/chatwidget: Added a new widget: 'chatwidget' + * installed_modules.tcl: + +2007-09-26 Andreas Kupries + + * installed_modules.tcl: Added 'diagrams' to the list of installed + modules. + +2007-06-25 Jeff Hobbs + + * examples/ntext/*.tcl (new): examples for ntext module + +2007-06-21 Jeff Hobbs + + * installed_modules.tcl: added ntext module + +2006-08-28 Andreas Kupries + + * PACKAGES: Reverted changes to the files describing + * README-0.4.txt: the last release. At least PACKAGES is + needed unchanged to enable the comparison + of the last release to the current state. + +2006-08-27 Kevin B. Kenny + + * PACKAGES: Added KHIM (Kevin's Hacky Input Method) + * README-0.4.txt: to the module list for installation and + * installed_modules.tcl: documentation. Added rules to + * install_actions.tcl: 'install_actions' to install message + catalogs. + * configure: Regenerated. + +2006-04-26 Andreas Kupries + + * sak.tcl (gd-gen-tap): modified to strip non-version characters + out of version numbers. + +2006-01-16 Csaba Nemethi + + * install_action.tcl: Removed the invocation of xcopy for the + images directory from the _tab proc, because the contents of that + Tablelist directory has been replaced with a new script file. + +2005-12-02 Andreas Kupries + + * sak.tcl (validate_versions_cmp): Fixed typo causing the use of a + wrong variable [SF Tcllib Bug 1371186]. Thanks to Wart. + +2005-11-10 Andreas Kupries + + * + * Released and tagged Tklib 0.4.1 ======================== + * + +2005-11-02 Andreas Kupries + + * + * Released and tagged Tklib 0.4 ======================== + * + +2005-11-02 Andreas Kupries + + * sak.tcl (ppackages): Copied the impl. we have in Tcllib over for + better detection. Does not help table list however. + +2005-10-24 Andreas Kupries + + * sak.tcl: Added methods for release engineering: rstatus, + release, desc, desc/2, better tap generation. + * PACKAGES: New file, empty, will be filled when the release is + committed. + * README-0.4.txt: New file, summary changes for 0.4 release. + + * sak.tcl (ipackages): Strip code opening with brace after version + number as well when extracting version numbers from package + indices. + + * tklib_version.tcl: Bumped to 0.4. + +2005-10-17 Andreas Kupries + + * install_action.tcl (_tab): Bugfix. Have to install the file + 'tclIndex' as well to make the package fully-functional. + +2005-10-03 Andreas Kupries + + * install_action.tcl (_tab): New command for tablelist installation. + * installed_modules.tcl: New module: tablelist. Originator/Author: + Csaba Nemethi + +2005-08-24 Andreas Kupries + + * installer.tcl (write_out): Cross-ported the fix for [Tcllib SF + Bug 899209] to tklib. Delete an existing file before trying to + overwrite it. See Tcllib ChangeLog entry 2004-03-01. + +2005-08-22 Jeff Hobbs + + * tklib_version.tcl: updated to 0.3 + * installed_modules.tcl: Added module 'widget' to the list of + installed modules. + +2005-07-27 Andreas Kupries + + * installed_modules.tcl: Added module 'tooltip' to the list of + installed modules. + +2005-04-01 Andreas Kupries + + * installed_modules.tcl: Added new module 'swap_list' to the list + of installed modules. + +2005-03-31 Andreas Kupries + + * installed_modules.tcl: Added 'get'string' and 'history' to the + list of installed modules. These are new modules added a few + days ago, by Aaron Faupell. + +2004-07-22 Jeff Hobbs + + * installed_modules.tcl: added ico to list of installed modules. + * modules/ico/*: new 'ico' module for extracting icos from exe/ico + files - works x-platform. + +2004-06-29 Andreas Kupries + + * install_action.tcl: Added ctext and style to list of + * installed_modules.tcl: installed modules. + +2004-05-18 Andreas Kupries + + * New module 'tkpiechart'. This has been donated by Jean-Luc + Fontaine. Thanks. It is based on his stoop OO package, found in + our sibling 'Tcllib'. + + * installed_modules.tcl: Added tkpiechart to the list of installed + modules. + +2004-04-15 Andreas Kupries + + * New module 'plotchart', by Arjen Markus. Thanks for this + donation. + +2004-04-04 David N. Welton + + * New module 'style'. Various Tk styles/themes. + +2004-04-15 Andreas Kupries + + * New module 'ctext', by George Peter Staplin. Thanks for this + donation. + +2003-11-28 Andreas Kupries + + * Reworked the entire build system to use the same framework as + tcllib does. IOW tklib now uses a swiss army knife tool + (sak.tcl, with all attendant files), and configure/Makefile are + based on that. Generation of distributions, and installer now + also work in the same way as for tcllib. + + * Replaced existing nroff documentation with doctools manpages, + and wrote doctools manpages for the modules which had none. All + (four) modules now have documentation. + 2003-07-21 Aaron Faupell * imported ipentry into tklib diff --git a/DESCRIPTION.txt b/DESCRIPTION.txt new file mode 100644 index 00000000..4a256dcd --- /dev/null +++ b/DESCRIPTION.txt @@ -0,0 +1,27 @@ +Identifier: tklib +Title: Tk Standard Library +Description: This package is intended to be a collection of + Tcl packages that provide utility functions useful to a + large collection of Tk programmers. +Rights: BSD +Version: 0.6 +URL: http://core.tcl.tk/tklib/ +Architecture: tcl +Contributor: Aaron Faupell +Contributor: Andreas Kupries +Contributor: Arjen Markus +Contributor: Csaba Nemethi +Contributor: David N. Welton +Contributor: George Peter Staplin +Contributor: Jean-Luc Fontaine +Contributor: Jeff Hobbs +Contributor: Keith Nash +Contributor: Keith Vetter +Contributor: Kevin B. Kenny +Contributor: Kevin Kenny +Contributor: Marty Backe +Contributor: Nemethi +Contributor: Pat Thoyts +Contributor: Ruediger Haertel +Contributor: Rüdiger Härtel +Contributor: Torsten Berg diff --git a/INSTALL.txt b/INSTALL.txt new file mode 100644 index 00000000..64788fea --- /dev/null +++ b/INSTALL.txt @@ -0,0 +1,77 @@ +How to install Tklib +===================== + +Introduction +------------ + +The tklib distribution, whether a snapshot directly from CVS, or +officially released, offers a single method for installing tklib, +based on Tcl itself. + +This is based on the assumption that for tklib to be of use Tcl has +to be present, and therefore can be used. + +This single method however can be used in a variety of ways. + +0 For an unwrapped (= directory) distribution or CVS snapshot + + a. either call the application 'installer.tcl' directly, + b or use + + % configure ; make install + + The latter is provided for people which are used to + this method and more comfortable with it. In end this + boils down into a call of 'installer.tcl' too. + +1. A starpack distribution (window-only) is a self-extracting + installer which internally uses the aforementioned installer. + +2. A starkit distribution is very much like a starpack, but + required an external interpreyter to run. This can be any tcl + interpreter which has all the packages to support starkits + (tclvfs, memchan, trf). + +3. A distribution in a tarball has to be unpacked first, then any + of the methods described in (0) can be used. + + +Usage of the installer +---------------------- + +The installer selects automatically either a gui based mode, or a +command line based mode. If the package Tk is present and can be +loaded, then the GUI mode is entered, else the system falls back to +the command line. + +Note that it is possible to specify options on the command line even +if the installer ultimatively selects a gui mode. In that case the +hardwired defaults and the options determine the data presented to the +user for editing. + +Command line help can be asked for by using the option -help when +running the installer (3) or the distribution itself in the case of +(1) or (2). + +The installer will select a number of defaults for the locations of +packages, examples, and documentation, and also the format of the +documentation. The user can overide these defaults in the GUI, or by +specifying additional options. + +The defaults depend on the platform detected (unix/windows) and the +executable used to run the installer. In the case of a starpack +distribution (1) this means that _no defaults_ are possible for the +various locations as the executable is part of the distribution and +has no knowledge of its environment. + +In all other cases the intepreter executable is outside of the +distribution, which means that its location can be used to determine +sensible defaults. + +Notes +----- + +The installer will overwrite an existing installation of tklib 0.2 +without asking back after the initial confirmation is given. And if +the user chooses the same directory as for tklib 0.1, or 0.0, etc. +then the installer will overwrite that too. diff --git a/Makefile.in b/Makefile.in index c1a322ff..4c0f82f5 100644 --- a/Makefile.in +++ b/Makefile.in @@ -1,36 +1,18 @@ # Makefile.in -- # -# This file is a Makefile for the tklib standard Tk library. If this +# This file is a Makefile for the tklib standard tcl library. If this # is "Makefile.in" then it is a template for a Makefile; to generate # the actual Makefile, run "./configure", which is a configuration script # generated by the "autoconf" program (constructs like "@foo@" will get # replaced in the actual Makefile. # +# Copyright (c) 1999-2000 Ajuba Solutions +# Copyright (c) 2001 ActiveState Tool Corp. +# # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: Makefile.in,v 1.5 2003/07/28 05:02:53 afaupell Exp $ - -# ModuleName: specify short description of module here -#MODULENAME=moduleDirName - -# ModuleName: specify short description of module here -CURSOR=cursor - -# An enhanced text entry widget for entering dates -DATEFIELD=datefield - -# An entry for ip addresses -IPENTRY=ipentry - -# Automatic scrollbars -AUTOSCROLL=autoscroll - -MODULES= \ - $(CURSOR) \ - $(DATEFIELD) \ - $(IPENTRY) \ - $(AUTOSCROLL) \ +# RCS: @(#) $Id: Makefile.in,v 1.8 2012/06/21 18:15:24 andreas_kupries Exp $ #======================================================================== # Nothing of the variables below this line need to be changed. Please @@ -40,199 +22,105 @@ MODULES= \ SHELL = @SHELL@ -INSTALL_ROOT = - srcdir = @srcdir@ top_srcdir = @top_srcdir@ prefix = @prefix@ exec_prefix = @exec_prefix@ - +bindir = @bindir@ libdir = @libdir@ mandir = @mandir@ DESTDIR = - pkglibdir = $(libdir)/@PACKAGE@@VERSION@ - top_builddir = . -INSTALL = @INSTALL@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_FLAG = -transform = @program_transform_name@ - -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : - PACKAGE = @PACKAGE@ VERSION = @VERSION@ CYGPATH = @CYGPATH@ -TCLSH_PROG = @TCLSH_PROG@ -AUTOCONF = autoconf +TCLSH_PROG = @TCLSH_PROG@ -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -CONFIGDIR = @CONFIGDIR@ -mkinstalldirs = $(SHELL) $(CONFIGDIR)/mkinstalldirs CONFIG_CLEAN_FILES = #======================================================================== # Start of user-definable TARGETS section #======================================================================== -#======================================================================== -# TEA TARGETS. Please note that the "libraries:" target refers to platform -# independent files, and the "binaries:" target inclues executable programs and -# platform-dependent libraries. Modify these targets so that they install -# the various pieces of your package. The make and install rules -# for the BINARIES that you specified above have already been done. -#======================================================================== +all: +doc: html-doc nroff-doc -all: libraries doc - -#======================================================================== -# The binaries target builds executable programs, Windows .dll's, unix -# shared/static libraries, and any other platform-dependent files. -# The list of targets to build for "binaries:" is specified at the top -# of the Makefile, in the "BINARIES" variable. -#======================================================================== +install: + $(TCLSH_PROG) `$(CYGPATH) $(srcdir)/installer.tcl` \ + -no-examples -no-html \ + -pkg-path $(DESTDIR)$(pkglibdir) \ + -app-path $(DESTDIR)$(bindir) \ + -nroff-path $(DESTDIR)$(mandir)/mann \ + -no-wait -no-gui -binaries: +install-libraries: + $(TCLSH_PROG) `$(CYGPATH) $(srcdir)/installer.tcl` \ + -pkg-path $(DESTDIR)$(pkglibdir) \ + -no-apps -no-examples -no-html -no-nroff \ + -no-wait -no-gui -libraries: - -doc: - -install: all install-libraries install-doc - -install-binaries: - -#======================================================================== -# This rule installs platform-independent files, such as header files. -#======================================================================== +install-doc: + $(TCLSH_PROG) `$(CYGPATH) $(srcdir)/installer.tcl` \ + -nroff-path $(DESTDIR)$(mandir)/mann \ + -no-apps -no-examples -no-pkgs -no-html \ + -no-wait -no-gui -install-libraries: libraries - $(mkinstalldirs) $(DESTDIR)$(pkglibdir) - @echo "Installing modules in $(DESTDIR)$(pkglibdir)" - @for i in $(MODULES) ; do \ - if test -d $(srcdir)/modules/$$i; then \ - echo "Installing $$i in $(DESTDIR)$(pkglibdir)/$$i" ; \ - $(mkinstalldirs) $(DESTDIR)$(pkglibdir)/$$i ; \ - for j in $(srcdir)/modules/$$i/*.tcl ; do \ - $(INSTALL_DATA) $$j $(DESTDIR)$(pkglibdir)/$$i ; \ - done; \ - fi; \ - done; - $(TCLSH_PROG) `$(CYGPATH) $(srcdir)/mkIndex.tcl` `$(CYGPATH) $(DESTDIR)$(pkglibdir)` tklib $(VERSION) $(MODULES) - -# AK: Mar 26, 2001: Added 'smtp' explicitly to the list of modules (is part of 'mime'). +test: + if test -t 1 ; \ + then $(MAKE) test_interactive ; \ + else $(MAKE) test_batch ; \ + fi -#======================================================================== -# Install documentation. Unix manpages should go in the $(mandir) -# directory. -#======================================================================== +test_batch: + $(TCLSH_PROG) `$(CYGPATH) $(srcdir)/sak.tcl` test run -v -s "$(TCLSH_PROG)" -install-doc: doc - $(mkinstalldirs) $(DESTDIR)$(mandir)/mann - -for j in $(MODULES) ; do \ - echo "Installing documentation for $$j" ; \ - for i in $(srcdir)/modules/$$j/*.n ; do \ - $(INSTALL_DATA) $$i $(DESTDIR)$(mandir)/mann ; \ - done; \ - done - -chmod 444 $(DESTDIR)$(mandir)/mann/* - $(INSTALL_DATA) $(srcdir)/man.macros $(DESTDIR)$(mandir) - -test: - $(TCLSH_PROG) `$(CYGPATH) $(srcdir)/all.tcl` -modules "$(MODULES)" +test_interactive: + $(TCLSH_PROG) `$(CYGPATH) $(srcdir)/sak.tcl` test run -s "$(TCLSH_PROG)" depend: - -# Make a distribution. This includes: -# Code, doc's, and tests for all modules -# Generated installer for Windows (INSTALL.BAT) and UNIX (install.sh) -# This all gets archived together (tklib$(VERSION).zip or -# tklib$(VERSION).tar.gz). dist: - rm -rf $(srcdir)/tklib$(VERSION) tklib$(VERSION).tar.gz tklib$(VERSION).zip - @mkdir $(srcdir)/tklib$(VERSION) - -for j in $(MODULES) ; do \ - mkdir $(srcdir)/tklib$(VERSION)/$$j ; \ - cp $(srcdir)/modules/$$j/*.n $(srcdir)/tklib$(VERSION)/$$j ; \ - cp $(srcdir)/modules/$$j/*.txt $(srcdir)/tklib$(VERSION)/$$j ; \ - cp $(srcdir)/modules/$$j/*.xml $(srcdir)/tklib$(VERSION)/$$j ; \ - cp $(srcdir)/modules/$$j/*.html $(srcdir)/tklib$(VERSION)/$$j ; \ - cp $(srcdir)/modules/$$j/*.tcl $(srcdir)/tklib$(VERSION)/$$j ; \ - cp $(srcdir)/modules/$$j/*.test $(srcdir)/tklib$(VERSION)/$$j ; \ - done - $(TCLSH_PROG) $(srcdir)/mkIndex.tcl $(srcdir)/tklib$(VERSION) tklib $(VERSION) $(MODULES) - $(TCLSH_PROG) $(srcdir)/mkInstallScripts.tcl $(srcdir)/tklib$(VERSION) tklib $(VERSION) $(MODULES) - for j in license.terms README ; do \ - cp $(srcdir)/$$j $(srcdir)/tklib$(VERSION)/$$j ; \ - done - cd $(srcdir) - tar cf tklib$(VERSION).tar tklib$(VERSION) - gzip tklib$(VERSION).tar - zip -r tklib$(VERSION).zip tklib$(VERSION) - rm -rf $(srcdir)/tklib$(VERSION) + $(TCLSH_PROG) `$(CYGPATH) $(srcdir)/sak.tcl` gendist -#======================================================================== -# End of user-definable section -#======================================================================== - -#======================================================================== -# Don't modify the file to clean here. Instead, set the "CLEANFILES" -# variable in configure.in -#======================================================================== - -clean: +clean: + rm -rf doc *-doc distclean: clean -rm -f Makefile $(CONFIG_CLEAN_FILES) -rm -f config.cache config.log stamp-h stamp-h[0-9]* -rm -f config.status -#======================================================================== -# Install binary object libraries. On Windows this includes both .dll and -# .lib files. Because the .lib files are not explicitly listed anywhere, -# we need to deduce their existence from the .dll file of the same name. -# Additionally, the .dll files go into the bin directory, but the .lib -# files go into the lib directory. On Unix platforms, all library files -# go into the lib directory. In addition, this will generate the pkgIndex.tcl -# file in the install location (assuming it can find a usable tclsh8.2 shell) -# -# You should not have to modify this target. -#======================================================================== - -install-lib-binaries: installdirs +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + cd $(top_builddir) \ + && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status -#======================================================================== -# Install binary executables (e.g. .exe files) -# -# You should not have to modify this target. -#======================================================================== +uninstall-binaries: -install-bin-binaries: installdirs -.SUFFIXES: .c .o .obj +html-doc: + $(TCLSH_PROG) `$(CYGPATH) $(srcdir)/sak.tcl` doc html +nroff-doc: + $(TCLSH_PROG) `$(CYGPATH) $(srcdir)/sak.tcl` doc nroff +tmml-doc: + $(TCLSH_PROG) `$(CYGPATH) $(srcdir)/sak.tcl` doc tmml +wiki-doc: + $(TCLSH_PROG) `$(CYGPATH) $(srcdir)/sak.tcl` doc wiki +latex-doc: + $(TCLSH_PROG) `$(CYGPATH) $(srcdir)/sak.tcl` doc ps +list-doc: + $(TCLSH_PROG) `$(CYGPATH) $(srcdir)/sak.tcl` doc list -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - cd $(top_builddir) \ - && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status +check: + $(TCLSH_PROG) `$(CYGPATH) $(srcdir)/sak.tcl` validate -uninstall-binaries: +sak-help: + $(TCLSH_PROG) `$(CYGPATH) $(srcdir)/sak.tcl` help -installdirs: - $(mkinstalldirs) $(DESTDIR)$(pkglibdir) -.PHONY: all binaries clean depend distclean doc install installdirs \ -libraries test +.PHONY: all binaries clean depend distclean doc install installdirs libraries test # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. diff --git a/README b/README index d06f62c3..8f20f429 100644 --- a/README +++ b/README @@ -1,10 +1,22 @@ -RCS: @(#) $Id: README,v 1.2 2001/11/08 19:14:22 hobbs Exp $ +RCS: @(#) $Id: README,v 1.3 2003/11/28 22:42:03 andreas_kupries Exp $ Welcome to the tklib, the Tk Standard Library. This package is intended to be a collection of Tcl packages that provide utility functions useful to a large collection of Tcl programmers. -The structure of the tklib source heirarchy is: +The home web site for this code is + + http://core.tcl.tk/tklib/ + +At this web site, you will find mailing lists, web forums, databases +for bug reports and feature requests, the CVS repository (browsable on +the web, or read-only accessible via CVS ), and more. + +Please note that tklib depends on tcllib, the Tcl Standard Library. +This is true for both installation and runtime. + + +The structure of the tklib source hierarchy is: tklib +- modules @@ -13,9 +25,9 @@ tklib +- ... -The install heirarchy is: +The install hierarchy is: -.../lib/tklib +.../lib/tklib +- +- +- ... @@ -25,31 +37,59 @@ will be added to tklib: * the module must be a proper Tcl package * the module must use a namespace for its commands and variables -* the name of the package must be the same as the name of the namespace +* the name of the package must be the same as the name of the + namespace * the module must reside in a subdirectory of the modules directory in - the source heirarchy, and that subdirectory must have the same name - as the package and namespace. A module may opt to have multiple - similar packages (ie: clock), in which case the module name must not - match the packages therein. + the source hierarchy, and that subdirectory must have the same name + as the package and namespace * the module must be released under the BSD License, the terms of which can be found in the toplevel tklib source directory in the file license.terms -* the module should have both documentation (in XML, man, or HTML - form) and a test suite (in the form of a group of *.test files in - the module directory). It is very hard for users to make use of - modules when neither are present. Even a stub doc that states the - available commands is useful. +* the module should have both documentation ([*]) and a test suite + (in the form of a group of *.test files in the module directory). + + [*] Possible forms: doctools, TMML/XML, nroff (man), or HTML. + The first format is the most prefered as it can be processed with + tools provided by tcllib (See module doctools there). The first + two are prefered in general as they are semantic markup and thus + easier to convert into other formats. + +* the module must have either documentation or a test suite. It can + not have neither. * the module should adhere to Tcl coding standards -When adding a module to tklib, be sure to add it to the Makefile.in -so it will be installed. Add a line like: +When adding a module to tklib, be sure to add it to the files listed below. -MYNEWMODULE=mynewmodule +* support/installation/modules.tcl -to the list of modules at the top of the Makefile.in, and then add -$(MYNEWMODULE) to the definition of the MODULES variable. This will -allow users to choose which modules to install by commenting or -uncommenting lines in the Makefile. + contains a table listing all modules to be installed, modules + excluded, and names the actions to be taken during installation + of each module. Add a line to this table naming your module and + its actions. + + Three actions have to be specified, for the package itself, its + documentation, and the examples demonstrating it. + + The _null action can be used everywhere and signals that there is + nothing to do. Although it is possible to use it for the package + action it does make no sense there, as that means that no package + code is installed. + + Other package actions are _tcl, _tci, and _text. The first causes + the installer to copy all .tcl files from the source directory for + the module into the appropriate module directory. _tci does all that + and also expects a tclIndex file to copy. _tex is like _tcl, however + it also copies all .tex files found in the source directory for the + module. + + There is currently only one true documentation action. This action + is _doc. It converts all documentation in doctools format into the + format chosen by the user for installation and copies the result + into the appropriate directory. + + There is currently one true action for examples, _exa. It copies all + files in the source directory for examples into the directory chosen + by the user as destination for examples. Each module source directory should have no subdirectories (other than the CVS directory), and should contain the following files: @@ -57,8 +97,7 @@ the CVS directory), and should contain the following files: * source code *.tcl * package index pkgIndex.tcl * tests *.test -* documentation *.n, *.xml +* documentation *.man (doctools, prefered), *.n, *.xml If you do not follow this directory structure, the tklib Makefile will fail to locate the files from the new module. - diff --git a/README.developer b/README.developer new file mode 100644 index 00000000..ca3d1be4 --- /dev/null +++ b/README.developer @@ -0,0 +1,396 @@ +RCS: @(#) $Id: README.developer,v 1.1 2010/07/07 15:15:17 andreas_kupries Exp $ + +Welcome to the tklib, the Tk Standard Library. +================================================ + +Introduction +------------ + +This README is intended to be a guide to the tools available to a + + Developer + +working on Tklib to help him with his tasks, i.e. making the tasks easier +to perform. It is our hope that this will improve the quality of even +non-released revisions of Tklib, and make the work of the release +manager easier as well. + +Audience +-------- + +The intended audience are, first and foremost, developers beginning to +work on Tklib. To an experienced developer this document will be less +of a guide and more of a reference. Anybody else interested in working +on Tklib is invited as well. + + +Directory hierarchy and file basics +------------------------------------ + +The main directories under the tklib top directory are + + modules/ + examples/ +and apps/ + +Each directory FOO under modules/ represents one package, sometimes +more. In the case of the latter the packages are usually related in +some way. Examples are the base64, math, and struct modules, with +loose (base64) to strong (math) relations between the packages. + +Examples associated with a module FOO, if there are any, are placed +into the directory + + examples/FOO + +Any type of distributable application can be found under apps/, +together with their documentation, if any. Note that the apps/ +directory is currently not split into sub-directories. + +Regarding the files in Tklib, the most common types found are + + .tcl Tcl code for a package. + + .man Documentation for a package, in doctools format. + + .test Test suite for a package, or part of. Based on tcltest. + + .bench Performance benchmarks for a package, or part of. + Based on modules/bench + + .pcx Syntax rules for TclDevKit's tclchecker. Using these + rules allows tclchecker to check the use of commands + of a Tklib package X without having to scan the + implementation of X, i.e. its .tcl files. + + +Adding a new module +------------------- + +Assuming that FOO is the name of the new module, and T is the toplevel +directory of the Tklib sources + +(1) Create the directory T/modules/FOO and put all the files of + the module into it. Note: + + * The file 'pkgIndex.tcl' is required. + + * Implementation files should have the extension '.tcl', + naturally. + + * If available, documentation should be in doctools format, + and the files should have the extension '.man' for SAK to + recognize them. + + * If available the testsuite(s) should use 'tcltest' and the + general format as used by the other modules in Tklib + (declaration of minimally needed Tcl, tcltest, supporting + packages, etc.). The file(s) should have the extension + '.test' for SAK to recognize them. + + Note that an empty testsuite, or a testsuite which does not + perform any tests is less than useful and will not be + accepted. + + * If available the benchmark(s) should use 'bench' and the + general format as used by the other modules in Tklib. The + file(s) should have the extension '.bench' for SAK to + recognize them. + + * Other files can be named and placed as the module sees fit. + +(2) If the new module has an example application A which is + polished enough for general use, put this application into the + file "T/apps/A.tcl", and its documentation into the file + "T/apps/A.man". While documentation for the application is + optional, it is preferred. + + For examples which are not full-fledged applications, a + skeleton, or not really polished for use, etc., create the + directory T/examples/FOO/ and put them there. + + A key difference is what happens to them on installation, and + what the target audience is. + + The examples are for developers using packages in Tklib, + whereas the applications are also for users of Tklib which do + not have an interest in developing for and with it. As such, + they are installed as regular commands, accessible through the + PATH, and example files are not installed. + +(3) To make Tklib's installer aware of FOO, edit the file + + T/support/installation/modules.tcl + + Add a line 'Module FOO $impaction $docaction $exaction'. The + various actions describe to the installer how to install the + implementation files, the documentation, and the examples. + + Add a line 'Application A' for any application A which was + added to T/apps for FOO. + + The following actions are available: + + Implementation + + _tcl - Copy all .tcl files in T/modules/FOO into the installation. + _tcr - See above, does it for .tcl files in subdirectories as well. + _tci - _tcl + Copying of a tclIndex - special to modules 'math', 'control'. + _msg - _tcl + Copying of subdir 'msgs' - special to modules 'dns', 'log'. + _doc - _tcl + Copying of subdir 'mpformats' - special to module 'doctools'. + _tex - _tcl + Copying of .tex files - special to module 'textutil'. + + The _null action, see below, is available in principle + too, but a module without implementation does not make + sense. + + Documentation + + _null - Module has no documentation, do nothing. + _man - Process the .man files in T/modules/FOO and + install the results (nroff and/or HTML) in the + proper location, as given to the installer. + + Examples + + _null - Module has no examples, do nothing + _exa - Copy the directory T/examples/FOO + (recursively) to the install location for + examples. + + +Testing modules +--------------- + +To run the testsuite of a module FOO in tklib use the 'test run' +argument of sak.tcl, like so: + + % pwd + /the/tklib/toplevel/directory + + % ./sak.tcl test run FOO +or % ./sak.tcl test run modules/FOO + +To run the testsuites of all modules either invoke 'test run' without a +module name, or use 'make test'. The latter assumes that configure was +run for Tklib before, i.e.: + + % ./sak.tcl test run +or % ./sak.tcl test run + % make test + +In all of the above cases the result will be a combination of progress +display and testsuite log, showing for each module the tests that pass +or failed and how many of each in a summary at the end. + +To get a detailed log, it is necessary to invoke 'test run' with +additional options. + +First example: + % ./sak.tcl test run -l LOG FOO + +This shows the same short log on the terminal, and writes a detailed +log to the file LOG.log, and excerpts to other files (LOG.summary, +LOG.failures, etc.). + +Second example: + % ./sak.tcl test run -v FOO + % make test > LOG + +This writes the detailed log to stdout, or to the file LOG, instead of +the short log. In all cases, the detailed log contains a list of all +test cases executed, which failed, and how they failed (expected +versus actual results). + +Note: +The commands + % make test +and % make test > LOG + +are able to generate different output (short vs long log) because the +Makefile target contains code which detects that stdout has been +redirected to a file and acts accordingly. + +Non-developers should reports problems in Tklib's bug tracker. +Information about its location and the relevant category can be found +in the section 'BUGS, IDEAS, FEEDBACK' of the manpage of the module +and/or package. + +Module documentation +-------------------- + +The main format used for the documentation of packages in Tklib is +'doctools', the support packages of which are part of Tklib, see the +module 'doctools'. + +To convert this documentation to HTML or nroff manpages, or some other +format use the 'doc' argument of sak.tcl, like so: + + % pwd + /the/tklib/toplevel/directory + + % ./sak.tcl doc html FOO +or % ./sak.tcl doc html modules/FOO + +The result of the conversion can be found in the newly-created 'doc' +directory in the current working directory. + +The set of formats the documentation can be converted into can be +queried via + + % ./sak.tcl help doc + + +To convert the documentation of all modules either invoke 'test run' +without a module name, or use 'make html-doc', etc.. The latter +assumes that configure was run for Tklib before, i.e.: + + % ./sak.tcl doc html + % make html-doc + +Note the special format 'validate'. Using this format does not convert +the documentation to anything (and the sub-directory 'doc' will not be +created), it just checks that the documentation is syntactically +correct. I.e. + + % ./sak.tcldoc validate modules/FOO + % ./sak.tcldoc validate + + +Validating modules +------------------ + +Running the testsuite of a module, or checking the syntax of its +documentation (see the previous sections) are two forms of validation. + +The 'validate' command of sak.tcl provides a few more. The online +documentation of this command is available via + + % ./sak.tcl help validate + +The validated parts are man pages, testsuites, version information, +and syntax. The latter only if various static syntax checkers are +available on the PATH, like TclDevKit's tclchecker. + +Note that testsuite validation is not the execution of the testsuites, +only if a package has a testsuite or not. + +It is strongly recommended to validate a module before committing any +type of change made to it. + +It is recommended to validate all modules before committing any type +of change made to one of them. We have package inter-dependencies +between packages in Tklib, thus changing one package may break +others, and just validating the changed package will not catch such +problems. + + +Writing Tests +------------- + +While a previous section talked about running the testsuite for a +module and the packages therein this has no meaning if the module in +question has no testsuites at all. + +This section gives a very basic overview on methodologies for writing +tests and testsuites. + +First there are "drudgery" tests. Written to check absolutely basic +assumptions which should never fail. + +Example: + + For a command FOO taking two arguments, three tests calling it + with zero, one, and three arguments. The basic checks that the + command fails if it has not enough arguments, or too many. + +After that come the tests checking things based on our knowledge of +the command, about its properties and assumptions. Some examples based +on the graph operations added during Google's Summer of Code 2009. + +** The BellmanFord command in struct::graph::ops takes a + _startnode_ as argument, and this node should be a node of the + graph. equals one test case checking the behavior when the + specified node is not a node a graph. + + This often gives rise to code in the implementation which + explicitly checks the assumption and throws a nice error. + Instead of letting the algorithm fails later in some weird + non-deterministic way. + + Such checks cannot be done always. The graph argument for + example is just a command in itself, and while we expect it to + exhibit a certain interface, i.e. set of sub-commands aka + methods, we cannot check that it has them, except by actually + trying to use them. That is done by the algorithm anyway, so + an explicit check is just overhead we can get by without. + +** IIRC one of the distinguishing characteristic of either + BellmanFord and/or Johnson is that they are able to handle + negative weights. Whereas Dijkstra requires positive weights. + + This induces (at least) three testcases ... Graph with all + positive weights, all negative, and a mix of positive and + negative weights. + + Thinking further does the algorithm handle the weight '0' as + well ? Another test case, or several, if we mix zero with + positive and negative weights. + +** The two algorithms we are currently thinking about are about + distances between nodes, and distance can be 'Inf'inity, + i.e. nodes may not be connected. This means that good test + cases are + + (1) Strongly connected graph + (2) Connected graph + (3) Disconnected graph. + + At the extremes of (1) and (3) we have the fully connected + graphs and graphs without edges, only nodes, i.e. completely + disconnected. + +** IIRC both of the algorithms take weighted arcs, and fill in a + default if arcs are left unweighted in the input graph. + + This also induces three test cases: + + (1) Graph will all arcs with explicit weights. + (2) Graph without weights at all. + (3) Graph with mixture of weighted and unweighted graphs. + + +What was described above via examples is called 'black-box' testing. +Test cases are designed and written based on our knowledge of the +properties of the algorithm and its inputs, without referencing a +particular implementation. + +Going further, a complement to 'black-box' testing is 'white-box'. For +this we know the implementation of the algorithm, we look at it and +design our tests cases so that they force the code through all +possible paths in the implementation. Wherever a decision is made we +have a test cases forcing a specific direction of the decision, for +all possible directions. + +In practice I often hope that the black-box tests I have made are +enough to cover all the paths, obviating the need for white-box tests. + +So, if you, dear reader, now believe that writing tests for an +algorithm takes at least as much time as coding the algorithm, and +often more time, then you are completely right. It does. Much more +time. See for example also http://sqlite.org/testing.html, a writeup +on how the Sqlite database engine is tested. + + + +An interesting connection is to documentation. In one direction, the +properties you are checking with black-box testing are properties +which should be documented in the algorithm man page. And conversely, +if you have documentation of properties of an algorithm then this is a +good reference to base black-box tests on. + +In practice test cases and documentation often get written together, +cross-influencing each other. And the actual writing of test cases is +a mix of black and white box, possibly influencing the implementation +while writing the tests. Like writing test for 'startnode not in input +graph' serving as reminder to put in a check for this into the code. diff --git a/README.releasemgr b/README.releasemgr new file mode 100644 index 00000000..7c3c4775 --- /dev/null +++ b/README.releasemgr @@ -0,0 +1,42 @@ +RCS: @(#) $Id: README.releasemgr,v 1.1 2010/07/07 15:15:17 andreas_kupries Exp $ + +Welcome to the tklib, the Tk Standard Library. +================================================ + +Introduction +------------ + +This README is intended to be a guide to the tools available to a + + Release manager + +working on the creation of a release of Tklib. + +Audience +-------- + +The intended audience is the release manager of Tklib, his deputies, +and anybody else interested in the task. + +Basics +------ + +< Flesh this out > + + sak.tcl + +< Tasks, and how to perform them > + + +Uploading and releasing files to SourceForge +-------------------------------------------- + +The main form to upload files is + + https://frs.sourceforge.net/webupload + +This is WebDAV. + +The place to manage the releases the files are for is + + https://sourceforge.net/project/admin/editpackages.php?group_id=12883 diff --git a/all.tcl b/all.tcl deleted file mode 100644 index 0c7f0f2c..00000000 --- a/all.tcl +++ /dev/null @@ -1,152 +0,0 @@ -# all.tcl -- -# -# This file contains a top-level script to run all of the Tcl -# tests. Execute it by invoking "source all.test" when running tcltest -# in this directory. -# -# Copyright (c) 1998-2000 by Ajuba Solutions. -# All rights reserved. -# -# RCS: @(#) $Id: all.tcl,v 1.1.1.1 2001/11/07 20:51:21 hobbs Exp $ - -set old_auto_path $auto_path - -if {[lsearch [namespace children] ::tcltest] == -1} { - namespace eval ::tcltest {} - proc ::tcltest::processCmdLineArgsFlagsHook {} { - return [list -modules] - } - proc ::tcltest::processCmdLineArgsHook {argv} { - array set foo $argv - set ::modules $foo(-modules) - } - proc ::tcltest::cleanupTestsHook {{c {}}} { - if { [string equal $c ""] } { - return - } - # Get total/pass/skip/fail counts - array set foo [$c eval {array get ::tcltest::numTests}] - foreach index [list "Total" "Passed" "Skipped" "Failed"] { - incr ::tcltest::numTests($index) $foo($index) - } - incr ::tcltest::numTestFiles - - # Append the list of failFiles if necessary - set f [$c eval { - set ff $::tcltest::failFiles - if {($::tcltest::currentFailure) && \ - ([lsearch -exact $ff $testFileName] == -1)} { - set res [file join $::tcllibModule $testFileName] - } else { - set res "" - } - set res - }] - if { ![string equal $f ""] } { - lappend ::tcltest::failFiles $f - } - - # Get the "skipped because" information - unset foo - array set foo [$c eval {array get ::tcltest::skippedBecause}] - foreach constraint [array names foo] { - if { ![info exists ::tcltest::skippedBecause($constraint)] } { - set ::tcltest::skippedBecause($constraint) $foo($constraint) - } else { - incr ::tcltest::skippedBecause($constraint) $foo($constraint) - } - } - - # Clean out the state in the slave - $c eval { - foreach index [list "Total" "Passed" "Skipped" "Failed"] { - set ::tcltest::numTests($index) 0 - } - set ::tcltest::failFiles {} - foreach constraint [array names ::tcltest::skippedBecause] { - unset ::tcltest::skippedBecause($constraint) - } - } - } - - package require tcltest - namespace import ::tcltest::* -} - -set ::tcltest::testSingleFile false -set ::tcltest::testsDirectory [file dir [info script]] -set root $::tcltest::testsDirectory - -# We need to ensure that the testsDirectory is absolute -::tcltest::normalizePath ::tcltest::testsDirectory - -puts stdout "tcllib tests" -puts stdout "Tests running in working dir: $::tcltest::testsDirectory" -if {[llength $::tcltest::skip] > 0} { - puts stdout "Skipping tests that match: $::tcltest::skip" -} -if {[llength $::tcltest::match] > 0} { - puts stdout "Only running tests that match: $::tcltest::match" -} - -if {[llength $::tcltest::skipFiles] > 0} { - puts stdout "Skipping test files that match: $::tcltest::skipFiles" -} -if {[llength $::tcltest::matchFiles] > 0} { - puts stdout "Only sourcing test files that match: $::tcltest::matchFiles" -} - -set timeCmd {clock format [clock seconds]} -puts stdout "Tests began at [eval $timeCmd]" - - -set auto_path $old_auto_path -set auto_path [linsert $auto_path 0 [file join $root modules]] -set old_apath $auto_path - -foreach module $modules { - set ::tcltest::testsDirectory [file join $root modules $module] - - if { ![file isdirectory $::tcltest::testsDirectory] } { - puts stdout "unknown module $module" - } - - set auto_path $old_apath - set auto_path [linsert $auto_path 0 $::tcltest::testsDirectory] - - # foreach module, make a slave interp and source that module's tests into - # the slave. This isolates the test suites from one another. - puts stdout "Module:\t[file tail $module]" - set c [interp create] - interp alias $c pSet {} set - # import the auto_path from the parent interp, so "package require" works - $c eval { - set ::tcllibModule [pSet module] - set auto_path [pSet auto_path] - package require tcltest - namespace import ::tcltest::* - set ::tcltest::testSingleFile false - set ::tcltest::testsDirectory [pSet ::tcltest::testsDirectory] - #set ::tcltest::verbose ps - } - interp alias $c ::tcltest::cleanupTestsHook {} \ - ::tcltest::cleanupTestsHook $c - # source each of the specified tests - foreach file [lsort [::tcltest::getMatchingFiles]] { - set tail [file tail $file] - puts stdout [string map [list "$root/" ""] $file] - $c eval { - if {[catch {source [pSet file]} msg]} { - puts stdout $msg - } - } - } - interp delete $c - puts stdout "" -} - -# cleanup -puts stdout "\nTests ended at [eval $timeCmd]" -::tcltest::cleanupTests 1 -return - diff --git a/apps/bitmap-editor b/apps/bitmap-editor new file mode 100755 index 00000000..d6973276 --- /dev/null +++ b/apps/bitmap-editor @@ -0,0 +1,748 @@ +#!/usr/bin/env wish +## -*- tcl -*- + +package require Tcl 8.4 + +# @@ Meta Begin +# Application bitmap-editor 1.0 +# Meta platform tcl +# Meta summary Bitmap Editor +# Meta description This application is an editor for bitmaps, read from and +# Meta description written to files in XBM format (X Bitmap). +# Meta category Editing bitmaps +# Meta subject bitmap xbm editor +# Meta require {Tcl 8.4} +# Meta require Tk +# Meta author Keith Vetter +# Meta license BSD +# @@ Meta End + +##+########################################################################## +# +# bitmap.tcl -- simple bitmap editor +# by Keith Vetter (http://wiki.tcl.tk/606) +# +# Revisions: +# KPV Jan 15, 2003 - initial revision +# KPV Mar 06, 2003 - added functions like shift, clear, invert and resize +# KPV Aug 20, 2010 - added mouse stroking, cursor, rename and undo + + +# Syntax: bitmap-editor ?xbm-file? + +package require Tk + +# Data Structures :: 3 global arrays. +# +# S - Application state and configuration +# +# * cell - Size of a pixel cel drawn in the UI +# * prog - Application name. +# * fname - xbm file currently edited, after loaded/saved + +# BM - Bitmap currently being edited. +# +# * b,, - UI cell storage - pixel is set if exists and 1. +# * bits - XBM Parse Result: hexadecimal bit string of pixels. +# * height - XBM Parse Result: bitmap height +# * name - XBM Parse Result: bitmap name +# * raw - xbm data of the bitmap, suitable for use with option +# -data of a Tk bitmap image. Generated from the b,*,* +# keys. See UnparseBMP. +# * width - XBM Parse Result: bitmap width +# * xhot - XBM Parse Result: column of the hot point +# * yhot - XBM Parse Result: row of the hot point + +# UNDO - Undo information +# +# * last - last action done +# * all - all previous actions + +set S(cell) 10 +set S(prog) "Bitmap Editor" +set S(fname) "" +set UNDO(last) {} +set UNDO(all) {} + +# Table for conversion from hexadecimal nibbles to binary bit +# strings. Used to convert BM(bits) to b,*,* keys in ShowBits. +array set bits { + 0 0000 1 1000 2 0100 3 1100 4 0010 5 1010 6 0110 7 1110 + 8 0001 9 1001 a 0101 b 1101 c 0011 d 1011 e 0111 f 1111 +} + +# Initial bitmap to show upon starting. + +set bitmap { + #define bullet_width 11 + #define bullet_height 9 + static char bullet_bits[] = { + 0x00,0x00, 0x00,0x00, 0x70,0x00, 0xf8,0x00, 0xf8,0x00, + 0xf8,0x00, 0x70,0x00, 0x00,0x00, 0x00,0x00 + } +} + +##+########################################################################## +# +# DoDisplay -- sets up our display +# + +proc DoDisplay {} { + wm title . $::S(prog) + canvas .c -width 500 -height 500 -bd 2 -relief ridge -highlightthickness 0 + .c xview moveto 0 ; .c yview moveto 0 + + bind .c <2> [bind Text <2>] ;# Enable button 2 paning + bind .c [bind Text ] + + bind .c <1> [list Click down 1 %x %y] + bind .c [list Click move 1 %x %y] + bind .c [list Click up 1 %x %y] + bind .c <3> [list Click down 0 %x %y] + bind .c [list Click move 0 %x %y] + bind .c [list Click up 0 %x %y] + bind all Undo + + frame .fctrl -bd 2 -relief ridge + label .info -text "Left button to set Right button to clear" -anchor c \ + -bd 2 -relief ridge + + grid .c .fctrl -sticky news -row 0 + grid .info ^ -sticky ew + grid rowconfigure . 0 -weight 1 + grid columnconfigure . 0 -weight 1 + DoControl + DoMenus + update +} + +##+########################################################################## +# +# DoMenus -- sets up our menus +# + +proc DoMenus {} { + . configure -menu [menu .m -tearoff 0] + .m add cascade -menu [menu .m.file -tearoff 0] -label "File" -underline 0 + .m add cascade -menu [menu .m.image -tearoff 0] -label "Image" -underline 0 + .m add cascade -menu [menu .m.help -tearoff 0] -label "Help" -underline 0 + + .m.file add command -label "New" -under 0 -command NewBMP + .m.file add command -label "Open" -under 0 -command OpenBMP + .m.file add command -label "Save" -under 0 -command SaveBMP + .m.file add separator + .m.file add command -label "Copy" -under 0 -command CopyBMP + .m.file add separator + .m.file add command -label Exit -under 1 -command exit + + .m.image add command -label "Clear" -under 0 -command {BitFunc clear} + .m.image add command -label "Invert" -under 0 -command {BitFunc invert} + .m.image add command -label "Shift left" -under 6 -command {BitFunc sleft} + .m.image add command -label "Shift right" -under 6 -command {BitFunc sright} + .m.image add command -label "Shift up" -under 6 -command {BitFunc sup} + .m.image add command -label "Shift down" -under 6 -command {BitFunc sdown} + .m.image add separator + .m.image add command -label "Undo" -under 0 -command Undo + .m.image add command -label "Resize" -under 0 -command ResizeBMP + + .m.help add command -label About -under 0 -command About +} + +##+########################################################################## +# +# DoControl -- draws the control panel +# + +proc DoControl {} { + grid rowconfigure .fctrl 0 -minsize 10 + grid rowconfigure .fctrl 100 -weight 1 + + frame .fctop + grid .fctop - - -in .fctrl -row 1 + set row 0 + foreach a {Name Width Height} { + set a2 [string map {" " ""} [string tolower $a]] + label .l$a2 -text "$a:" + entry .e$a2 -textvariable BM($a2) -width 8 -state disabled + grid .l$a2 .e$a2 -in .fctop -row [incr row] + } + + image create bitmap ::img::current + frame .fimg -bd 2 -relief sunken -padx 10 -pady 10 + label .limg -image ::img::current -bg white + grid rowconfigure .fctrl 40 -minsize 50 + grid .fimg - - -in .fctrl -row 41 + pack .limg -in .fimg -expand 1 +} + +##+########################################################################## +# +# ShowBMP -- computes grid size then draws in the current bitmap +# + +proc ShowBMP {} { + global S BM + + if {! [info exists BM(raw)]} return + + set w [winfo width .c] ; set h [winfo height .c] + set cw [expr {int((($w - 20) / $BM(width)))}] + set ch [expr {int((($h - 20) / $BM(height)))}] + set S(cell) [expr {$cw < $ch ? $cw : $ch}] + if {$S(cell) > 40} { set S(cell) 40} + if {$S(cell) < 5} { set S(cell) 5} + + DrawGrid + ShowBits + unset BM(bits) + ::img::current config -data $BM(raw) ;# Update current bitmap display +} + +##+########################################################################## +# +# ClearBMP -- clears everything for a new bitmap +# + +proc ClearBMP {} { + global BM + .c delete all + ::img::current config -data {} + array unset BM + foreach arr [array names BM] { set BM($arr) ""} + set UNDO(last) {} + set UNDO(all) {} +} + +##+########################################################################## +# +# DrawGrid -- draws the grid of rectangles--each one with proper bindings +# + +proc DrawGrid {} { + global BM + + .c delete all + foreach {l t} [CellXY 0 0] break + foreach {b r} [CellXY $BM(height) $BM(width)] break + .c create rect $l $t $b $r -tag outline -width 2 + + set bg [.c cget -bg] + for {set r 0} {$r < $BM(height)} {incr r} { + for {set c 0} {$c < $BM(width)} {incr c} { + .c create rect [CellXY $r $c] -tag [list grid c($r,$c)] -fill $bg + } + } + .c config -scrollregion [.c bbox all] +} + +##+########################################################################## +# +# Click -- handles left and right mouse click in a grid cell +# + +proc Click {action onoff x y} { + global BM UNDO + + if {$action eq "up"} { + .c config -cursor [lindex [.c config -cursor] 3] + return + } + if {$action eq "down"} { + .c config -cursor pencil + if {$UNDO(last) ne ""} { + lappend UNDO(all) $UNDO(last) + } + set UNDO(last) [list $onoff ":"] + } + foreach {row col} [XY2Cell [.c canvasx $x] [.c canvasy $y]] break + if {$row < 0 || $row >= $BM(height) || $col < 0 || $col >= $BM(width)} return + + if {$onoff == 1} { ;# Set the pixel + if {$BM(b,$row,$col)} return ;# Already set + set BM(b,$row,$col) 1 + ShowBitCell $row $col + } else { ;# Clear the pixel + if {! $BM(b,$row,$col)} return ;# Already cleared + set BM(b,$row,$col) 0 + .c delete o($row,$col) + } + lappend UNDO(last) $row $col + set BM(raw) [UnparseBMP] + ::img::current config -data $BM(raw) +} + +##+########################################################################## +# +# Undo -- Implements undo +# + +proc Undo {} { + global UNDO BM + + set what $UNDO(last) + set UNDO(last) "" + if {$what eq ""} { + set what [lindex $UNDO(all) end] + set UNDO(all) [lrange $UNDO(all) 0 end-1] + } + if {$what eq ""} return + set onoff [lindex $what 0] + set what [lrange $what 2 end] + set onoff [expr {! $onoff}] + + foreach {row col} $what { + if {$onoff == 1} { ;# Set the pixel + if {$BM(b,$row,$col)} continue ;# Already set + set BM(b,$row,$col) 1 + ShowBitCell $row $col + } else { ;# Clear the pixel + if {! $BM(b,$row,$col)} continue ;# Already cleared + set BM(b,$row,$col) 0 + .c delete o($row,$col) + } + } + set BM(raw) [UnparseBMP] + ::img::current config -data $BM(raw) +} + +##+########################################################################## +# +# ShowBits -- draws dots in all "on" cells in the current bitmap, +# only valid after ParseBMP fills in the BM(bits) variable. +# + +proc ShowBits {} { + global BM bits + + set row 0 + set col 0 + foreach byte $BM(bits) { + foreach {n1 n2} [split $byte ""] break ;# Get each nibble + foreach bit [split "$bits($n2)$bits($n1)" ""] { ;# Note the endian + set BM(b,$row,$col) $bit + if {$bit} { + ShowBitCell $row $col + } + if {[incr col] >= $BM(width)} { ;# Do we past the last column? + incr row + set col 0 + break + } + } + } +} + +##+########################################################################## +# +# ShowBitCell -- draws the "on" bit in a specified cell +# + +proc ShowBitCell {row col} { + .c create oval [CellXY $row $col] -fill black -tag [list bit o($row,$col)] +} + +##+########################################################################## +# +# CellXY -- returns the coordinates of a grid cell +# + +proc CellXY {r c} { + global S + set x1 [expr {10 + $c * $S(cell)}] + set y1 [expr {10 + $r * $S(cell)}] + set x2 [expr {$x1 + $S(cell)}] + set y2 [expr {$y1 + $S(cell)}] + + return [list $x1 $y1 $x2 $y2] +} + +##+########################################################################## +# +# XY2Cell -- returns cell based on canvas position +# + +proc XY2Cell {x y} { + set c [expr {(int($x) - 10) / $::S(cell)}] + set r [expr {(int($y) - 10) / $::S(cell)}] + return [list $r $c] +} + + +##+########################################################################## +# +# ParseBMP -- reads the raw bitmap data into our BM data structure +# NB. face.bmp in demo directory had defines for x_hot and y_hot +# + +proc ParseBMP {raw} { + global S BM + + ClearBMP + set BM(raw) $raw + + while {1} { + if {! [regexp {\#define\s+(.*)_width} $raw => BM(name)]} break + if {! [regexp {\#define\s+.*_width\s*(\d*)} $raw => BM(width)]} break + if {! [regexp {\#define\s+.*_height\s*(\d*)} $raw => BM(height)]} break + regexp {\#define\s+.*_x_hot\s*(\d*)} $raw => BM(xhot) + regexp {\#define\s+.*_y_hot\s*(\d*)} $raw => BM(yhot) + + if {! [regexp {(0x.*)\}} $raw => BM(bits)]} break + if {! [regsub -all {0x|,} $BM(bits) { } BM(bits)]} break + if {! [regsub -all {\s+} $BM(bits) { } BM(bits)]} break + set BM(bits) [string tolower $BM(bits)] + return ;# Everything ok, get out + } + ERROR "$S(fname) is not a proper bmp file" + ClearBMP +} + +##+########################################################################## +# +# OpenBMP -- opens and reads a BMP file +# + +proc OpenBMP {} { + global S + set types { {{BMP Files} {.bmp}} {{All Files} * }} + set fname [tk_getOpenFile -defaultextension ".bmp" -initialfile $S(fname) \ + -filetypes $types] + if {$fname == ""} return + DisplayBMPFile $fname +} + +proc DisplayBMPFile {fname} { + global S + + if {[catch {set FIN [open $fname r]} emsg]} { + ERROR "Cannot open $fname\n$emsg" + return + } + set raw [read $FIN] + close $FIN + set S(fname) $fname + DisplayBMP $raw +} + +proc DisplayBMP {data} { + ParseBMP $data + ShowBMP +} + + +##+########################################################################## +# +# SaveBMP -- saves the current bitmap to a file +# + +proc SaveBMP {} { + global S BM + + if {! [info exists BM(raw)]} return + set types {{{BMP Files} {.bmp}} {{All Files} *}} + set fname [tk_getSaveFile -defaultextension ".bmp" -initialfile $S(fname) \ + -filetypes $types] + if {$fname == ""} return + if {[catch {set FOUT [open $fname w]} emsg]} { + ERROR "Cannot open $fname\n$emsg" + return + } + puts $FOUT $BM(raw) + close $FOUT + set S(fname) $fname +} + +##+########################################################################## +# +# UnparseBMP -- converts our internal BM into a proper bitmap data string +# + +proc UnparseBMP {} { + global BM + set name $BM(name) + + set bmp "\#define ${name}_width $BM(width)\n" + append bmp "\#define ${name}_height $BM(height)\n" + if {[info exists BM(xhot)]} { + append bmp "\#define ${name}_x_hot $BM(xhot)\n" + append bmp "\#define ${name}_y_hot $BM(yhot)\n" + } + append bmp "static char ${name}_bits[] = \{\n" + + set bytes {} + for {set r 0} {$r < $BM(height)} {incr r} { + for {set c 0} {$c < $BM(width)} {incr c 8} { + set byte 0 + for {set cc [expr {$c + 7}]} {$cc >= $c} {incr cc -1} { + set byte [expr {2 * $byte}] + if {[info exists BM(b,$r,$cc)] && $BM(b,$r,$cc)} { + incr byte + } + } + lappend bytes [format 0x%02x $byte] + } + } + append bmp " " [join $bytes ", "] + append bmp "\n\}" + + return $bmp +} + +##+########################################################################## +# +# CopyBMP -- copies current bitmap to the clipboard +# + +proc CopyBMP {} { + global BM S + + if {! [info exists BM(raw)]} return + clipboard clear + clipboard append $BM(raw) + tk_messageBox -icon info -title "$S(prog) Info" \ + -message "Bitmap copied to the clipboard" + +} + +##+########################################################################## +# +# NewBMP -- creates a blank, new bitmap with sizes specified by the user +# + +proc NewBMP {} { + global BM + + set n [NewDlg] + if {$n == {}} return + foreach {name width height} $n break + + ClearBMP + set BM(name) $name + set BM(width) $width + set BM(height) $height + + for {set r 0} {$r < $BM(height)} {incr r} { + for {set c 0} {$c < $BM(width)} {incr c} { + set BM(b,$r,$c) 0 + } + } + ParseBMP [UnparseBMP] + ShowBMP +} + +proc ResizeBMP {} { + global BMP + set n [NewDlg 1] + if {$n == {}} return + + foreach {nName nwidth nheight} $n break + if {$nName ne ""} { set ::BM(name) $nName } + WidenBMP $nwidth + HeightenBMP $nheight + + ParseBMP [UnparseBMP] + ShowBMP +} + +proc WidenBMP {nwidth} { + global BM + if {$BM(width) == $nwidth} return + if {$nwidth > $BM(width)} { + foreach {low high delete} [list $BM(width) $nwidth 0] break + } else { + foreach {low high delete} [list $nwidth $BM(width) 1] break + } + for {set row 0} {$row < $BM(height)} {incr row} { + for {set col $low} {$col < $high} {incr col} { + set BM(b,$row,$col) 0 + if {$delete} { + unset BM(b,$row,$col) + } + } + } + set BM(width) $nwidth +} + +proc HeightenBMP {nheight} { + global BM + if {$BM(height) == $nheight} return + if {$nheight > $BM(height)} { + foreach {low high delete} [list $BM(height) $nheight 0] break + } else { + foreach {low high delete} [list $nheight $BM(height) 1] break + } + for {set col 0} {$col < $BM(width)} {incr col} { + for {set row $low} {$row < $high} {incr row} { + set BM(b,$row,$col) 0 + if {$delete} { + unset BM(b,$row,$col) + } + } + } + set BM(height) $nheight +} + +##+########################################################################## +# +# NewDlg -- asks the user for bitmap parameters +# + +proc NewDlg {{resize 0}} { + global S NEW BM + + destroy .new + toplevel .new -padx 10 -pady 5 + wm title .new "New Bitmap" + if {$resize} {wm title .new "Resize Bitmap"} + wm geom .new "+[expr {[winfo x .] + 150}]+[expr {[winfo y .] + 100}]" + + set NEW(ok) 0 + set NEW(name) $BM(name) + set NEW(width) $BM(width) + set NEW(height) $BM(height) + + frame .new.top -bd 2 -relief raised -padx 10 -pady 10 + grid columnconfigure .new.top 1 -weight 1 + set widgets {name width height} + foreach a $widgets { + set a1 [string totitle $a] + label .new.l$a -text "$a1:" + entry .new.e$a -textvariable NEW($a) + grid .new.l$a .new.e$a -in .new.top -sticky ew + } + + frame .new.buttons + button .new.ok -text Ok -width 10 -command ValidForm + button .new.cancel -text Cancel -width 10 -command {destroy .new} + + pack .new.buttons -side bottom -pady 10 + pack .new.top -side top -fill x + pack .new.cancel .new.ok -in .new.buttons -side right -padx 10 -expand 1 + + raise .new + set w ".new.e[lindex $widgets 0]" + focus $w + $w icursor end + $w selection range 0 end + tkwait window .new + if {$NEW(ok)} { + return [list $NEW(name) $NEW(width) $NEW(height)] + } + return {} +} + +##+########################################################################## +# +# ValidForm -- validates the NewDlg and then destroys it if it is ok +# + +proc ValidForm {} { + global NEW + + foreach n {name width height} { + set NEW($n) [string trim $NEW($n)] + if {$NEW($n) == ""} return + } + if {![string is integer $NEW(width)]} return + if {![string is integer $NEW(height)]} return + + set NEW(ok) 1 + destroy .new +} + +proc ERROR {msg} { + tk_messageBox -icon error -title "$::S(prog) Error" -message $msg +} + +proc About {} { + set msg "$::S(prog)\n\nby Keith Vetter\nJanuary 2003" + tk_messageBox -title "About $::S(prog)" -message $msg -icon info +} + +proc BitFunc {what} { + global BM + + if {$what == "clear"} { + foreach arr [array names BM b,*] { + set BM($arr) 0 + } + } elseif {$what == "invert"} { + foreach arr [array names BM b,*] { + set BM($arr) [expr {! $BM($arr)}] + } + } elseif {$what == "sleft"} { ;# Shift left + for {set col 0} {$col < $BM(width)} {incr col} { + set col2 [expr {$col + 1}] + for {set row 0} {$row < $BM(height)} {incr row} { + if {[info exists BM(b,$row,$col2)]} { + set BM(b,$row,$col) $BM(b,$row,$col2) + } else { + set BM(b,$row,$col) 0 + } + } + } + } elseif {$what == "sright"} { ;# Shift right + for {set col [expr {$BM(width) - 1}]} {$col >= 0} {incr col -1} { + set col2 [expr {$col - 1}] + for {set row 0} {$row < $BM(height)} {incr row} { + if {[info exists BM(b,$row,$col2)]} { + set BM(b,$row,$col) $BM(b,$row,$col2) + } else { + set BM(b,$row,$col) 0 + } + } + } + } elseif {$what == "sup"} { ;# Shift up + for {set row 0} {$row < $BM(height)} {incr row} { + set row2 [expr {$row + 1}] + for {set col 0} {$col < $BM(width)} {incr col} { + if {[info exists BM(b,$row2,$col)]} { + set BM(b,$row,$col) $BM(b,$row2,$col) + } else { + set BM(b,$row,$col) 0 + } + } + } + } elseif {$what == "sdown"} { ;# Shift down + for {set row [expr {$BM(height) - 1}]} {$row >= 0} {incr row -1} { + set row2 [expr {$row - 1}] + for {set col 0} {$col < $BM(width)} {incr col} { + if {[info exists BM(b,$row2,$col)]} { + set BM(b,$row,$col) $BM(b,$row2,$col) + } else { + set BM(b,$row,$col) 0 + } + } + } + } + set BM(raw) [UnparseBMP] + RedrawBits + ::img::current config -data $BM(raw) + +} + +proc RedrawBits {} { + global BM + + .c delete bit + for {set row 0} {$row < $BM(height)} {incr row} { + for {set col 0} {$col < $BM(width)} {incr col} { + if {$BM(b,$row,$col)} {ShowBitCell $row $col} + } + } +} + +################################################################ +################################################################ +################################################################ + +DoDisplay + +if {[llength $argv] > 1} { + DisplayBMP $bitmap + ERROR "Too many files specified, expected only one" +} elseif {[llength $argv] == 1} { + DisplayBMPFile [lindex $argv 0] +} else { + DisplayBMP $bitmap +} diff --git a/apps/bitmap-editor.man b/apps/bitmap-editor.man new file mode 100644 index 00000000..dcabcf5f --- /dev/null +++ b/apps/bitmap-editor.man @@ -0,0 +1,56 @@ +[comment {-*- tcl -*- doctools manpage}] +[manpage_begin bitmap-editor n 1.0] +[keywords bitmap] +[keywords editor] +[keywords image] +[keywords pixel] +[keywords xbm] +[copyright {}] +[titledesc {Editor for XBM images}] +[moddesc {Bitmap handling}] +[category {Image processing}] +[description] +[para] + +The application described by this document, [syscmd bitmap-editor], is +a simple editor for XBM based bitmap images. + +Written by Keith Vetter the original code can be found at +[uri http://wiki.tcl.tk/6298]. + +[subsection {COMMAND LINE}] + +[list_begin definitions] + +[call [cmd bitmap-editor] [opt [arg xbmfile]]] + +Invoked without argument the editor GUI will be opened and show a +standard bitmap to edit. Invoked with an argument it is expected to be +the path to a bitmap file in XBM format, and the contained bitmap is +shown. + +[list_begin arguments] + +[arg_def path xbmfile in/out] + +This argument specifies the path to a bitmap file in XBM format, whose +contents is to shown and edited by the application. + +[list_end] +[para] + +[list_end] + +[section {BUGS, IDEAS, FEEDBACK}] + +This document, and the application it describes, will undoubtedly +contain bugs and other problems. + +Please report such in the category [emph bitmap] of the +[uri {http://sourceforge.net/tracker/?group_id=12883} {Tcllib SF Trackers}]. + +Please also report any ideas for enhancements you may have for either +application and/or documentation. +[vset CATEGORY bitmap-editor] +[include ../support/devel/doc/feedback.inc] +[manpage_end] diff --git a/apps/diagram-viewer b/apps/diagram-viewer new file mode 100755 index 00000000..ddd7967e --- /dev/null +++ b/apps/diagram-viewer @@ -0,0 +1,32 @@ +#!/usr/bin/env tclsh +## -*- tcl -*- + +# @@ Meta Begin +# Application diagram-viewer 1.0 +# Meta platform tcl +# Meta summary Lightweight Diagram Processor +# Meta description This application is a processor for documents +# Meta description written in the tklib diagram language. It +# Meta description should cover the most common use cases, +# Meta description rendering to canvas for display, and batch +# Meta description conversion to raster images. +# Meta category Processing tklib diagrams +# Meta subject diagram drawing point line spline arrow ellipse box circle +# Meta subject intersection interpolation picture drum arc diamond text +# Meta subject ellipse plotting vector {plane geometry} {2D geometry} move +# Meta subject canvas image {raster image} +# Meta require diagram::application +# Meta author Andreas Kupries +# Meta license BSD +# @@ Meta End + +# # ## ### ##### ######## ############# ##################### +package require diagram::application +if {[catch { + diagram::application $argv +} msg]} { + #puts $::errorInfo + diagram::application::showerror $msg +} +# # ## ### ##### ######## ############# ##################### +exit diff --git a/apps/diagram-viewer.man b/apps/diagram-viewer.man new file mode 100644 index 00000000..e753b91d --- /dev/null +++ b/apps/diagram-viewer.man @@ -0,0 +1,104 @@ +[comment {-*- tcl -*- doctools manpage}] +[manpage_begin diagram-viewer n 1.0] +[keywords canvas] +[keywords conversion] +[keywords diagram] +[keywords vector] +[copyright {2010 Andreas Kupries }] +[titledesc {Lightweight Diagram Processor}] +[moddesc {Documentation toolbox}] +[category {Documentation tools}] +[description] +[para] + +The application described by this document, [syscmd diagram-viewer], is a +lightweight processor for tklib diagram files + +[para] + +[syscmd diagram-viewer] is based upon the package [package diagram]. +See it for examples and language reference. + +[subsection {USE CASES}] + +[syscmd diagram-viewer] was written with the following two use cases in +mind. + +[para] +[list_begin enumerated] +[enum] +Processing and display of one or more diagram files. + +[enum] +Batch conversion of one or more diagram files into raster image files. + +[list_end] + +[para] + +[subsection {COMMAND LINE}] + +[list_begin definitions] + +[call [cmd diagram-viewer] [method show] [arg inputfile]...] + +This is the form for use case [lb]1[rb]. The application opens a gui +showing the list of input files to the left, allowing the user to +choose which of them to render to the canvas on the right. + +[call [cmd diagram-viewer] [method convert] [option -o] [arg output] [arg format] [arg inputfile]...] + +This is the form for use case [lb]2[rb]. The application converts +the input files into raster image of the specified [arg format]. + +[list_begin arguments] + +[arg_def path output in] + +This argument specifies where to write the generated image. It can +be the path to a file or directory. + +[para] + +If the [arg output] does not exist then [lb]file dirname $output[rb] +has to exist and must be a writable directory. + +[para] +In case of multiple input files the generated image will be written to +a file in the directory, and the name of that file will be derived +from the [arg inputfile], and [arg format]. + +[para] +In case of a single input file the generated image will be written to +the file. + +[arg_def (handle) format in] + +This argument specifies the image format to convert the diagrams into +when processing the input. The application recognizes all formats +supported by the [package Img] package, i.e. for which it can load a +package [package img::[var format]] + +[arg_def path inputfile in] + +This argument specifies the path to the diagram file to process. It +has to exist, must be readable, and written in [term diagram] format. + +[list_end] +[para] + +[list_end] + +[section {BUGS, IDEAS, FEEDBACK}] + +This document, and the application it describes, will undoubtedly +contain bugs and other problems. + +Please report such in the category [emph diagram] of the +[uri {http://sourceforge.net/tracker/?group_id=12883} {Tcllib SF Trackers}]. + +Please also report any ideas for enhancements you may have for either +application and/or documentation. +[vset CATEGORY diagram] +[include ../support/devel/doc/feedback.inc] +[manpage_end] diff --git a/config/config.guess b/config/config.guess index 62186fd1..11271623 100644 --- a/config/config.guess +++ b/config/config.guess @@ -1,7 +1,10 @@ -#!/bin/sh +#! /bin/sh # Attempt to guess a canonical system name. -# Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc. -# +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, +# 2000, 2001, 2002, 2003 Free Software Foundation, Inc. + +timestamp='2003-10-07' + # This file 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 @@ -14,67 +17,329 @@ # # 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. +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. -# Written by Per Bothner . -# The master version of this file is at the FSF in /home/gd/gnu/lib. +# Originally written by Per Bothner . +# Please send patches to . Submit a context +# diff and a properly formatted ChangeLog entry. # # This script attempts to guess a canonical system name similar to # config.sub. If it succeeds, it prints the system name on stdout, and # exits with 0. Otherwise, it exits with 1. # # The plan is that this can be called by configure scripts if you -# don't specify an explicit system type (host/target name). -# -# Only a few systems have been added to this list; please add others -# (but try to keep the structure clean). -# +# don't specify an explicit build system type. + +me=`echo "$0" | sed -e 's,.*/,,'` + +usage="\ +Usage: $0 [OPTION] + +Output the configuration name of the system \`$me' is run on. + +Operation modes: + -h, --help print this help, then exit + -t, --time-stamp print date of last modification, then exit + -v, --version print version number, then exit + +Report bugs and patches to ." + +version="\ +GNU config.guess ($timestamp) + +Originally written by Per Bothner. +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 +Free Software Foundation, Inc. + +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." + +help=" +Try \`$me --help' for more information." + +# Parse command line +while test $# -gt 0 ; do + case $1 in + --time-stamp | --time* | -t ) + echo "$timestamp" ; exit 0 ;; + --version | -v ) + echo "$version" ; exit 0 ;; + --help | --h* | -h ) + echo "$usage"; exit 0 ;; + -- ) # Stop option processing + shift; break ;; + - ) # Use stdin as input. + break ;; + -* ) + echo "$me: invalid option $1$help" >&2 + exit 1 ;; + * ) + break ;; + esac +done + +if test $# != 0; then + echo "$me: too many arguments$help" >&2 + exit 1 +fi + +trap 'exit 1' 1 2 15 + +# CC_FOR_BUILD -- compiler used by this script. Note that the use of a +# compiler to aid in system detection is discouraged as it requires +# temporary files to be created and, as you can see below, it is a +# headache to deal with in a portable fashion. + +# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still +# use `HOST_CC' if defined, but it is deprecated. + +# Portable tmp directory creation inspired by the Autoconf team. + +set_cc_for_build=' +trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; +trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; +: ${TMPDIR=/tmp} ; + { tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || + { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || + { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || + { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; +dummy=$tmp/dummy ; +tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; +case $CC_FOR_BUILD,$HOST_CC,$CC in + ,,) echo "int x;" > $dummy.c ; + for c in cc gcc c89 c99 ; do + if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then + CC_FOR_BUILD="$c"; break ; + fi ; + done ; + if test x"$CC_FOR_BUILD" = x ; then + CC_FOR_BUILD=no_compiler_found ; + fi + ;; + ,,*) CC_FOR_BUILD=$CC ;; + ,*,*) CC_FOR_BUILD=$HOST_CC ;; +esac ;' # This is needed to find uname on a Pyramid OSx when run in the BSD universe. -# (ghazi@noc.rutgers.edu 8/24/94.) +# (ghazi@noc.rutgers.edu 1994-08-24) if (test -f /.attbin/uname) >/dev/null 2>&1 ; then PATH=$PATH:/.attbin ; export PATH fi UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown -UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown +UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown -trap 'rm -f dummy.c dummy.o dummy; exit 1' 1 2 15 - # Note: order is significant - the case branches are not exclusive. case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in - alpha:OSF1:V*:*) - # After 1.2, OSF1 uses "V1.3" for uname -r. - echo alpha-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^V//'` + *:NetBSD:*:*) + # NetBSD (nbsd) targets should (where applicable) match one or + # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, + # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently + # switched to ELF, *-*-netbsd* would select the old + # object file format. This provides both forward + # compatibility and a consistent mechanism for selecting the + # object file format. + # + # Note: NetBSD doesn't particularly care about the vendor + # portion of the name. We always set it to "unknown". + sysctl="sysctl -n hw.machine_arch" + UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ + /usr/sbin/$sysctl 2>/dev/null || echo unknown)` + case "${UNAME_MACHINE_ARCH}" in + armeb) machine=armeb-unknown ;; + arm*) machine=arm-unknown ;; + sh3el) machine=shl-unknown ;; + sh3eb) machine=sh-unknown ;; + *) machine=${UNAME_MACHINE_ARCH}-unknown ;; + esac + # The Operating System including object format, if it has switched + # to ELF recently, or will in the future. + case "${UNAME_MACHINE_ARCH}" in + arm*|i386|m68k|ns32k|sh3*|sparc|vax) + eval $set_cc_for_build + if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep __ELF__ >/dev/null + then + # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). + # Return netbsd for either. FIX? + os=netbsd + else + os=netbsdelf + fi + ;; + *) + os=netbsd + ;; + esac + # The OS release + # Debian GNU/NetBSD machines have a different userland, and + # thus, need a distinct triplet. However, they do not need + # kernel version information, so it can be replaced with a + # suitable tag, in the style of linux-gnu. + case "${UNAME_VERSION}" in + Debian*) + release='-gnu' + ;; + *) + release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` + ;; + esac + # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: + # contains redundant information, the shorter form: + # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. + echo "${machine}-${os}${release}" + exit 0 ;; + amiga:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + arc:OpenBSD:*:*) + echo mipsel-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + hp300:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + mac68k:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + macppc:OpenBSD:*:*) + echo powerpc-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + mvme68k:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + mvme88k:OpenBSD:*:*) + echo m88k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + mvmeppc:OpenBSD:*:*) + echo powerpc-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + pmax:OpenBSD:*:*) + echo mipsel-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + sgi:OpenBSD:*:*) + echo mipseb-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + sun3:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + wgrisc:OpenBSD:*:*) + echo mipsel-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + *:OpenBSD:*:*) + echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE} exit 0 ;; alpha:OSF1:*:*) + if test $UNAME_RELEASE = "V4.0"; then + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` + fi + # According to Compaq, /usr/sbin/psrinfo has been available on + # OSF/1 and Tru64 systems produced since 1995. I hope that + # covers most systems running today. This code pipes the CPU + # types through head -n 1, so we only detect the type of CPU 0. + ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` + case "$ALPHA_CPU_TYPE" in + "EV4 (21064)") + UNAME_MACHINE="alpha" ;; + "EV4.5 (21064)") + UNAME_MACHINE="alpha" ;; + "LCA4 (21066/21068)") + UNAME_MACHINE="alpha" ;; + "EV5 (21164)") + UNAME_MACHINE="alphaev5" ;; + "EV5.6 (21164A)") + UNAME_MACHINE="alphaev56" ;; + "EV5.6 (21164PC)") + UNAME_MACHINE="alphapca56" ;; + "EV5.7 (21164PC)") + UNAME_MACHINE="alphapca57" ;; + "EV6 (21264)") + UNAME_MACHINE="alphaev6" ;; + "EV6.7 (21264A)") + UNAME_MACHINE="alphaev67" ;; + "EV6.8CB (21264C)") + UNAME_MACHINE="alphaev68" ;; + "EV6.8AL (21264B)") + UNAME_MACHINE="alphaev68" ;; + "EV6.8CX (21264D)") + UNAME_MACHINE="alphaev68" ;; + "EV6.9A (21264/EV69A)") + UNAME_MACHINE="alphaev69" ;; + "EV7 (21364)") + UNAME_MACHINE="alphaev7" ;; + "EV7.9 (21364A)") + UNAME_MACHINE="alphaev79" ;; + esac + # A Vn.n version is a released version. + # A Tn.n version is a released field test version. + # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. - echo alpha-dec-osf${UNAME_RELEASE} - exit 0 ;; + echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` + exit 0 ;; + Alpha*:OpenVMS:*:*) + echo alpha-hp-vms + exit 0 ;; + Alpha\ *:Windows_NT*:*) + # How do we know it's Interix rather than the generic POSIX subsystem? + # Should we change UNAME_MACHINE based on the output of uname instead + # of the specific Alpha model? + echo alpha-pc-interix + exit 0 ;; + 21064:Windows_NT:50:3) + echo alpha-dec-winnt3.5 + exit 0 ;; + Amiga*:UNIX_System_V:4.0:*) + echo m68k-unknown-sysv4 + exit 0;; + *:[Aa]miga[Oo][Ss]:*:*) + echo ${UNAME_MACHINE}-unknown-amigaos + exit 0 ;; + *:[Mm]orph[Oo][Ss]:*:*) + echo ${UNAME_MACHINE}-unknown-morphos + exit 0 ;; + *:OS/390:*:*) + echo i370-ibm-openedition + exit 0 ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} exit 0;; - Pyramid*:OSx*:*:*) + SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) + echo hppa1.1-hitachi-hiuxmpp + exit 0;; + Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) + # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. if test "`(/bin/universe) 2>/dev/null`" = att ; then echo pyramid-pyramid-sysv3 else echo pyramid-pyramid-bsd fi exit 0 ;; - i86pc:SunOS:5.*:*) - echo i486-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + NILE*:*:*:dcosx) + echo pyramid-pyramid-svr4 + exit 0 ;; + DRS?6000:unix:4.0:6*) + echo sparc-icl-nx6 + exit 0 ;; + DRS?6000:UNIX_SV:4.2*:7*) + case `/usr/bin/uname -p` in + sparc) echo sparc-icl-nx7 && exit 0 ;; + esac ;; + sun4H:SunOS:5.*:*) + echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit 0 ;; - sun4*:SunOS:5.*:*) + sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit 0 ;; + i86pc:SunOS:5.*:*) + echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit 0 ;; sun4*:SunOS:6*:*) # According to config.sub, this is the proper way to canonicalize # SunOS6. Hard to guess exactly what SunOS6 will be like, but @@ -82,15 +347,63 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit 0 ;; sun4*:SunOS:*:*) + case "`/usr/bin/arch -k`" in + Series*|S4*) + UNAME_RELEASE=`uname -v` + ;; + esac # Japanese Language versions have a version number like `4.1.3-JL'. echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` exit 0 ;; sun3*:SunOS:*:*) echo m68k-sun-sunos${UNAME_RELEASE} exit 0 ;; - tp_s2*:SunOS:*:*) - # Tadpole Sparcbook 2 running a modified 4.1.3 - echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` + sun*:*:4.2BSD:*) + UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` + test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 + case "`/bin/arch`" in + sun3) + echo m68k-sun-sunos${UNAME_RELEASE} + ;; + sun4) + echo sparc-sun-sunos${UNAME_RELEASE} + ;; + esac + exit 0 ;; + aushp:SunOS:*:*) + echo sparc-auspex-sunos${UNAME_RELEASE} + exit 0 ;; + # The situation for MiNT is a little confusing. The machine name + # can be virtually everything (everything which is not + # "atarist" or "atariste" at least should have a processor + # > m68000). The system name ranges from "MiNT" over "FreeMiNT" + # to the lowercase version "mint" (or "freemint"). Finally + # the system name "TOS" denotes a system which is actually not + # MiNT. But MiNT is downward compatible to TOS, so this should + # be no problem. + atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} + exit 0 ;; + atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} + exit 0 ;; + *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} + exit 0 ;; + milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) + echo m68k-milan-mint${UNAME_RELEASE} + exit 0 ;; + hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) + echo m68k-hades-mint${UNAME_RELEASE} + exit 0 ;; + *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) + echo m68k-unknown-mint${UNAME_RELEASE} + exit 0 ;; + powerpc:machten:*:*) + echo powerpc-apple-machten${UNAME_RELEASE} + exit 0 ;; + RISC*:Mach:*:*) + echo mips-dec-mach_bsd4.3 exit 0 ;; RISC*:ULTRIX:*:*) echo mips-dec-ultrix${UNAME_RELEASE} @@ -98,9 +411,49 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in VAX*:ULTRIX*:*:*) echo vax-dec-ultrix${UNAME_RELEASE} exit 0 ;; - mips:*:5*:RISCos) + 2020:CLIX:*:* | 2430:CLIX:*:*) + echo clipper-intergraph-clix${UNAME_RELEASE} + exit 0 ;; + mips:*:*:UMIPS | mips:*:*:RISCos) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c +#ifdef __cplusplus +#include /* for printf() prototype */ + int main (int argc, char *argv[]) { +#else + int main (argc, argv) int argc; char *argv[]; { +#endif + #if defined (host_mips) && defined (MIPSEB) + #if defined (SYSTYPE_SYSV) + printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); + #endif + #if defined (SYSTYPE_SVR4) + printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); + #endif + #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) + printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); + #endif + #endif + exit (-1); + } +EOF + $CC_FOR_BUILD -o $dummy $dummy.c \ + && $dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \ + && exit 0 echo mips-mips-riscos${UNAME_RELEASE} exit 0 ;; + Motorola:PowerMAX_OS:*:*) + echo powerpc-motorola-powermax + exit 0 ;; + Motorola:*:4.3:PL8-*) + echo powerpc-harris-powermax + exit 0 ;; + Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) + echo powerpc-harris-powermax + exit 0 ;; + Night_Hawk:Power_UNIX:*:*) + echo powerpc-harris-powerunix + exit 0 ;; m88k:CX/UX:7*:*) echo m88k-harris-cxux7 exit 0 ;; @@ -111,11 +464,19 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in echo m88k-motorola-sysv3 exit 0 ;; AViiON:dgux:*:*) - if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx \ - -o ${TARGET_BINARY_INTERFACE}x = x ] ; then + # DG/UX returns AViiON for all architectures + UNAME_PROCESSOR=`/usr/bin/uname -p` + if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] + then + if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ + [ ${TARGET_BINARY_INTERFACE}x = x ] + then echo m88k-dg-dgux${UNAME_RELEASE} - else + else echo m88k-dg-dguxbcs${UNAME_RELEASE} + fi + else + echo i586-dg-dgux${UNAME_RELEASE} fi exit 0 ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) @@ -131,15 +492,27 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) echo m68k-tektronix-bsd exit 0 ;; - *:IRIX:*:*) - echo mips-sgi-irix${UNAME_RELEASE} + *:IRIX*:*:*) + echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` exit 0 ;; - i[34]86:AIX:*:*) + ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. + echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id + exit 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX ' + i*86:AIX:*:*) echo i386-ibm-aix exit 0 ;; + ia64:AIX:*:*) + if [ -x /usr/bin/oslevel ] ; then + IBM_REV=`/usr/bin/oslevel` + else + IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} + fi + echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} + exit 0 ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then - sed 's/^ //' << EOF >dummy.c + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c #include main() @@ -150,8 +523,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in exit(0); } EOF - ${CC-cc} dummy.c -o dummy && ./dummy && rm dummy.c dummy && exit 0 - rm -f dummy.c dummy + $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0 echo rs6000-ibm-aix3.2.5 elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then echo rs6000-ibm-aix3.2.4 @@ -159,24 +531,29 @@ EOF echo rs6000-ibm-aix3.2 fi exit 0 ;; - *:AIX:*:4) - if /usr/sbin/lsattr -EHl proc0 | grep POWER >/dev/null 2>&1; then + *:AIX:*:[45]) + IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` + if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then IBM_ARCH=rs6000 else IBM_ARCH=powerpc fi - if grep bos410 /usr/include/stdio.h >/dev/null 2>&1; then - IBM_REV=4.1 - elif grep bos411 /usr/include/stdio.h >/dev/null 2>&1; then - IBM_REV=4.1.1 + if [ -x /usr/bin/oslevel ] ; then + IBM_REV=`/usr/bin/oslevel` else - IBM_REV=4.${UNAME_RELEASE} + IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${IBM_ARCH}-ibm-aix${IBM_REV} exit 0 ;; *:AIX:*:*) echo rs6000-ibm-aix exit 0 ;; + ibmrt:4.4BSD:*|romp-ibm:BSD:*) + echo romp-ibm-bsd4.4 + exit 0 ;; + ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and + echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to + exit 0 ;; # report: romp-ibm BSD 4.3 *:BOSX:*:*) echo rs6000-bull-bosx exit 0 ;; @@ -189,18 +566,85 @@ EOF hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) echo m68k-hp-bsd4.4 exit 0 ;; - 9000/[3478]??:HP-UX:*:*) + 9000/[34678]??:HP-UX:*:*) + HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` case "${UNAME_MACHINE}" in 9000/31? ) HP_ARCH=m68000 ;; 9000/[34]?? ) HP_ARCH=m68k ;; - 9000/7?? | 9000/8?7 ) HP_ARCH=hppa1.1 ;; - 9000/8?? ) HP_ARCH=hppa1.0 ;; + 9000/[678][0-9][0-9]) + if [ -x /usr/bin/getconf ]; then + sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` + sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` + case "${sc_cpu_version}" in + 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 + 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 + 532) # CPU_PA_RISC2_0 + case "${sc_kernel_bits}" in + 32) HP_ARCH="hppa2.0n" ;; + 64) HP_ARCH="hppa2.0w" ;; + '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 + esac ;; + esac + fi + if [ "${HP_ARCH}" = "" ]; then + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + + #define _HPUX_SOURCE + #include + #include + + int main () + { + #if defined(_SC_KERNEL_BITS) + long bits = sysconf(_SC_KERNEL_BITS); + #endif + long cpu = sysconf (_SC_CPU_VERSION); + + switch (cpu) + { + case CPU_PA_RISC1_0: puts ("hppa1.0"); break; + case CPU_PA_RISC1_1: puts ("hppa1.1"); break; + case CPU_PA_RISC2_0: + #if defined(_SC_KERNEL_BITS) + switch (bits) + { + case 64: puts ("hppa2.0w"); break; + case 32: puts ("hppa2.0n"); break; + default: puts ("hppa2.0"); break; + } break; + #else /* !defined(_SC_KERNEL_BITS) */ + puts ("hppa2.0"); break; + #endif + default: puts ("hppa1.0"); break; + } + exit (0); + } +EOF + (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` + test -z "$HP_ARCH" && HP_ARCH=hppa + fi ;; esac - HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` + if [ ${HP_ARCH} = "hppa2.0w" ] + then + # avoid double evaluation of $set_cc_for_build + test -n "$CC_FOR_BUILD" || eval $set_cc_for_build + if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E -) | grep __LP64__ >/dev/null + then + HP_ARCH="hppa2.0w" + else + HP_ARCH="hppa64" + fi + fi echo ${HP_ARCH}-hp-hpux${HPUX_REV} exit 0 ;; + ia64:HP-UX:*:*) + HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` + echo ia64-hp-hpux${HPUX_REV} + exit 0 ;; 3050*:HI-UX:*:*) - sed 's/^ //' << EOF >dummy.c + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c #include int main () @@ -225,22 +669,34 @@ EOF exit (0); } EOF - ${CC-cc} dummy.c -o dummy && ./dummy && rm dummy.c dummy && exit 0 - rm -f dummy.c dummy + $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0 echo unknown-hitachi-hiuxwe2 exit 0 ;; - 9000/7??:4.3bsd:*:* | 9000/8?7:4.3bsd:*:* ) + 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) echo hppa1.1-hp-bsd exit 0 ;; 9000/8??:4.3bsd:*:*) echo hppa1.0-hp-bsd exit 0 ;; - hp7??:OSF1:*:* | hp8?7:OSF1:*:* ) + *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) + echo hppa1.0-hp-mpeix + exit 0 ;; + hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) echo hppa1.1-hp-osf exit 0 ;; hp8??:OSF1:*:*) echo hppa1.0-hp-osf exit 0 ;; + i*86:OSF1:*:*) + if [ -x /usr/sbin/sysversion ] ; then + echo ${UNAME_MACHINE}-unknown-osf1mk + else + echo ${UNAME_MACHINE}-unknown-osf1 + fi + exit 0 ;; + parisc*:Lites*:*:*) + echo hppa1.1-hp-lites + exit 0 ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) echo c1-convex-bsd exit 0 ;; @@ -259,62 +715,328 @@ EOF C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) echo c4-convex-bsd exit 0 ;; - CRAY*X-MP:UNICOS:*:*) - echo xmp-cray-unicos - exit 0 ;; - CRAY*Y-MP:UNICOS:*:*) - echo ymp-cray-unicos - exit 0 ;; - CRAY-2:UNICOS:*:*) - echo cray2-cray-unicos + CRAY*Y-MP:*:*:*) + echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit 0 ;; + CRAY*[A-Z]90:*:*:*) + echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ + | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ + -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ + -e 's/\.[^.]*$/.X/' + exit 0 ;; + CRAY*TS:*:*:*) + echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit 0 ;; + CRAY*T3E:*:*:*) + echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit 0 ;; + CRAY*SV1:*:*:*) + echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit 0 ;; + *:UNICOS/mp:*:*) + echo nv1-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit 0 ;; + F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) + FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` + FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` + FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` + echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit 0 ;; - hp3[0-9][05]:NetBSD:*:*) - echo m68k-hp-netbsd${UNAME_RELEASE} + i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) + echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} exit 0 ;; - i[34]86:BSD/386:*:*) - echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} + sparc*:BSD/OS:*:*) + echo sparc-unknown-bsdi${UNAME_RELEASE} exit 0 ;; - i[34]86:BSD/OS:*:*) + *:BSD/OS:*:*) echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} exit 0 ;; *:FreeBSD:*:*) - echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` + # Determine whether the default compiler uses glibc. + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #include + #if __GLIBC__ >= 2 + LIBC=gnu + #else + LIBC= + #endif +EOF + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` + # GNU/KFreeBSD systems have a "k" prefix to indicate we are using + # FreeBSD's kernel, but not the complete OS. + case ${LIBC} in gnu) kernel_only='k' ;; esac + echo ${UNAME_MACHINE}-unknown-${kernel_only}freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`${LIBC:+-$LIBC} exit 0 ;; - *:NetBSD:*:*) - echo ${UNAME_MACHINE}-unknown-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` + i*:CYGWIN*:*) + echo ${UNAME_MACHINE}-pc-cygwin + exit 0 ;; + i*:MINGW*:*) + echo ${UNAME_MACHINE}-pc-mingw32 + exit 0 ;; + i*:PW*:*) + echo ${UNAME_MACHINE}-pc-pw32 + exit 0 ;; + x86:Interix*:[34]*) + echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//' + exit 0 ;; + [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) + echo i${UNAME_MACHINE}-pc-mks + exit 0 ;; + i*:Windows_NT*:* | Pentium*:Windows_NT*:*) + # How do we know it's Interix rather than the generic POSIX subsystem? + # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we + # UNAME_MACHINE based on the output of uname instead of i386? + echo i586-pc-interix + exit 0 ;; + i*:UWIN*:*) + echo ${UNAME_MACHINE}-pc-uwin + exit 0 ;; + p*:CYGWIN*:*) + echo powerpcle-unknown-cygwin + exit 0 ;; + prep*:SunOS:5.*:*) + echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit 0 ;; *:GNU:*:*) - echo `echo ${UNAME_MACHINE}|sed -e 's,/.*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` + # the GNU system + echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` + exit 0 ;; + *:GNU/*:*:*) + # other systems with GNU libc and userland + echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu + exit 0 ;; + i*86:Minix:*:*) + echo ${UNAME_MACHINE}-pc-minix + exit 0 ;; + arm*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit 0 ;; + cris:Linux:*:*) + echo cris-axis-linux-gnu + exit 0 ;; + ia64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit 0 ;; + m68*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit 0 ;; + mips:Linux:*:*) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #undef CPU + #undef mips + #undef mipsel + #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) + CPU=mipsel + #else + #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) + CPU=mips + #else + CPU= + #endif + #endif +EOF + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` + test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0 + ;; + mips64:Linux:*:*) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #undef CPU + #undef mips64 + #undef mips64el + #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) + CPU=mips64el + #else + #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) + CPU=mips64 + #else + CPU= + #endif + #endif +EOF + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` + test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0 + ;; + ppc:Linux:*:*) + echo powerpc-unknown-linux-gnu + exit 0 ;; + ppc64:Linux:*:*) + echo powerpc64-unknown-linux-gnu + exit 0 ;; + alpha:Linux:*:*) + case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in + EV5) UNAME_MACHINE=alphaev5 ;; + EV56) UNAME_MACHINE=alphaev56 ;; + PCA56) UNAME_MACHINE=alphapca56 ;; + PCA57) UNAME_MACHINE=alphapca56 ;; + EV6) UNAME_MACHINE=alphaev6 ;; + EV67) UNAME_MACHINE=alphaev67 ;; + EV68*) UNAME_MACHINE=alphaev68 ;; + esac + objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null + if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi + echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} + exit 0 ;; + parisc:Linux:*:* | hppa:Linux:*:*) + # Look for CPU level + case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in + PA7*) echo hppa1.1-unknown-linux-gnu ;; + PA8*) echo hppa2.0-unknown-linux-gnu ;; + *) echo hppa-unknown-linux-gnu ;; + esac + exit 0 ;; + parisc64:Linux:*:* | hppa64:Linux:*:*) + echo hppa64-unknown-linux-gnu + exit 0 ;; + s390:Linux:*:* | s390x:Linux:*:*) + echo ${UNAME_MACHINE}-ibm-linux + exit 0 ;; + sh64*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu exit 0 ;; - *:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux + sh*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu exit 0 ;; -# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. earlier versions -# are messed up and put the nodename in both sysname and nodename. - i[34]86:DYNIX/ptx:4*:*) + sparc:Linux:*:* | sparc64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit 0 ;; + x86_64:Linux:*:*) + echo x86_64-unknown-linux-gnu + exit 0 ;; + i*86:Linux:*:*) + # The BFD linker knows what the default object file format is, so + # first see if it will tell us. cd to the root directory to prevent + # problems with other programs or directories called `ld' in the path. + # Set LC_ALL=C to ensure ld outputs messages in English. + ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \ + | sed -ne '/supported targets:/!d + s/[ ][ ]*/ /g + s/.*supported targets: *// + s/ .*// + p'` + case "$ld_supported_targets" in + elf32-i386) + TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" + ;; + a.out-i386-linux) + echo "${UNAME_MACHINE}-pc-linux-gnuaout" + exit 0 ;; + coff-i386) + echo "${UNAME_MACHINE}-pc-linux-gnucoff" + exit 0 ;; + "") + # Either a pre-BFD a.out linker (linux-gnuoldld) or + # one that does not give us useful --help. + echo "${UNAME_MACHINE}-pc-linux-gnuoldld" + exit 0 ;; + esac + # Determine whether the default compiler is a.out or elf + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #include + #ifdef __ELF__ + # ifdef __GLIBC__ + # if __GLIBC__ >= 2 + LIBC=gnu + # else + LIBC=gnulibc1 + # endif + # else + LIBC=gnulibc1 + # endif + #else + #ifdef __INTEL_COMPILER + LIBC=gnu + #else + LIBC=gnuaout + #endif + #endif + #ifdef __dietlibc__ + LIBC=dietlibc + #endif +EOF + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` + test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" && exit 0 + test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0 + ;; + i*86:DYNIX/ptx:4*:*) + # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. + # earlier versions are messed up and put the nodename in both + # sysname and nodename. echo i386-sequent-sysv4 exit 0 ;; - i[34]86:*:4.*:* | i[34]86:SYSTEM_V:4.*:*) + i*86:UNIX_SV:4.2MP:2.*) + # Unixware is an offshoot of SVR4, but it has its own version + # number series starting with 2... + # I am not positive that other SVR4 systems won't match this, + # I just have to hope. -- rms. + # Use sysv4.2uw... so that sysv4* matches it. + echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} + exit 0 ;; + i*86:OS/2:*:*) + # If we were able to find `uname', then EMX Unix compatibility + # is probably installed. + echo ${UNAME_MACHINE}-pc-os2-emx + exit 0 ;; + i*86:XTS-300:*:STOP) + echo ${UNAME_MACHINE}-unknown-stop + exit 0 ;; + i*86:atheos:*:*) + echo ${UNAME_MACHINE}-unknown-atheos + exit 0 ;; + i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) + echo i386-unknown-lynxos${UNAME_RELEASE} + exit 0 ;; + i*86:*DOS:*:*) + echo ${UNAME_MACHINE}-pc-msdosdjgpp + exit 0 ;; + i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) + UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then - echo ${UNAME_MACHINE}-univel-sysv${UNAME_RELEASE} + echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} else - echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE} + echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} fi exit 0 ;; - i[34]86:*:3.2:*) - if /bin/uname -X 2>/dev/null >/dev/null ; then - UNAME_REL=`(/bin/uname -X|egrep Release|sed -e 's/.*= //')` - (/bin/uname -X|egrep i80486 >/dev/null) && UNAME_MACHINE=i486 - echo ${UNAME_MACHINE}-unknown-sco$UNAME_REL - elif test -f /usr/options/cb.name; then + i*86:*:5:[78]*) + case `/bin/uname -X | grep "^Machine"` in + *486*) UNAME_MACHINE=i486 ;; + *Pentium) UNAME_MACHINE=i586 ;; + *Pent*|*Celeron) UNAME_MACHINE=i686 ;; + esac + echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} + exit 0 ;; + i*86:*:3.2:*) + if test -f /usr/options/cb.name; then UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then + UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` + (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 + (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ + && UNAME_MACHINE=i586 + (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ + && UNAME_MACHINE=i686 + (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ + && UNAME_MACHINE=i686 + echo ${UNAME_MACHINE}-pc-sco$UNAME_REL else - echo ${UNAME_MACHINE}-unknown-sysv32 + echo ${UNAME_MACHINE}-pc-sysv32 fi exit 0 ;; + pc:*:*:*) + # Left here for compatibility: + # uname -m prints for DJGPP always 'pc', but it prints nothing about + # the processor, so we play safe by assuming i386. + echo i386-pc-msdosdjgpp + exit 0 ;; Intel:Mach:3*:*) - echo i386-unknown-mach3 + echo i386-pc-mach3 + exit 0 ;; + paragon:*:*:*) + echo i860-intel-osf1 exit 0 ;; i860:*:4.*:*) # i860-SVR4 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then @@ -327,31 +1049,45 @@ EOF # "miniframe" echo m68010-convergent-sysv exit 0 ;; - M680[234]0:*:R3V[567]*:*) + mc68k:UNIX:SYSTEM5:3.51m) + echo m68k-convergent-sysv + exit 0 ;; + M680?0:D-NIX:5.3:*) + echo m68k-diab-dnix + exit 0 ;; + M68*:*:R3V[567]*:*) test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;; - 3[34]??:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0) - uname -p 2>/dev/null | grep 86 >/dev/null \ - && echo i486-ncr-sysv4.3 && exit 0 ;; + 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0) + OS_REL='' + test -r /etc/.relid \ + && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && echo i486-ncr-sysv4.3${OS_REL} && exit 0 + /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ + && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;; 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) - uname -p 2>/dev/null | grep 86 >/dev/null \ + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && echo i486-ncr-sysv4 && exit 0 ;; - m680[234]0:LynxOS:2.2*:*) - echo m68k-lynx-lynxos${UNAME_RELEASE} - exit 0 ;; - PowerPC:LynxOS:2.2*:*) - echo powerpc-lynx-lynxos${UNAME_RELEASE} + m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) + echo m68k-unknown-lynxos${UNAME_RELEASE} exit 0 ;; mc68030:UNIX_System_V:4.*:*) echo m68k-atari-sysv4 exit 0 ;; - i[34]86:LynxOS:2.2*:*) - echo i386-lynx-lynxos${UNAME_RELEASE} + TSUNAMI:LynxOS:2.*:*) + echo sparc-unknown-lynxos${UNAME_RELEASE} + exit 0 ;; + rs6000:LynxOS:2.*:*) + echo rs6000-unknown-lynxos${UNAME_RELEASE} + exit 0 ;; + PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) + echo powerpc-unknown-lynxos${UNAME_RELEASE} exit 0 ;; - TSUNAMI:LynxOS:2.2*:*) - echo sparc-lynx-lynxos${UNAME_RELEASE} + SM[BE]S:UNIX_SV:*:*) + echo mips-dde-sysv${UNAME_RELEASE} exit 0 ;; - rs6000:LynxOS:2.2*:*) - echo rs6000-lynx-lynxos${UNAME_RELEASE} + RM*:ReliantUNIX-*:*:*) + echo mips-sni-sysv4 exit 0 ;; RM*:SINIX-*:*:*) echo mips-sni-sysv4 @@ -364,12 +1100,133 @@ EOF echo ns32k-sni-sysv fi exit 0 ;; + PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort + # says + echo i586-unisys-sysv4 + exit 0 ;; + *:UNIX_System_V:4*:FTX*) + # From Gerald Hewes . + # How about differentiating between stratus architectures? -djm + echo hppa1.1-stratus-sysv4 + exit 0 ;; + *:*:*:FTX*) + # From seanf@swdc.stratus.com. + echo i860-stratus-sysv4 + exit 0 ;; + *:VOS:*:*) + # From Paul.Green@stratus.com. + echo hppa1.1-stratus-vos + exit 0 ;; + mc68*:A/UX:*:*) + echo m68k-apple-aux${UNAME_RELEASE} + exit 0 ;; + news*:NEWS-OS:6*:*) + echo mips-sony-newsos6 + exit 0 ;; + R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) + if [ -d /usr/nec ]; then + echo mips-nec-sysv${UNAME_RELEASE} + else + echo mips-unknown-sysv${UNAME_RELEASE} + fi + exit 0 ;; + BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. + echo powerpc-be-beos + exit 0 ;; + BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. + echo powerpc-apple-beos + exit 0 ;; + BePC:BeOS:*:*) # BeOS running on Intel PC compatible. + echo i586-pc-beos + exit 0 ;; + SX-4:SUPER-UX:*:*) + echo sx4-nec-superux${UNAME_RELEASE} + exit 0 ;; + SX-5:SUPER-UX:*:*) + echo sx5-nec-superux${UNAME_RELEASE} + exit 0 ;; + SX-6:SUPER-UX:*:*) + echo sx6-nec-superux${UNAME_RELEASE} + exit 0 ;; + Power*:Rhapsody:*:*) + echo powerpc-apple-rhapsody${UNAME_RELEASE} + exit 0 ;; + *:Rhapsody:*:*) + echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} + exit 0 ;; + *:Darwin:*:*) + case `uname -p` in + *86) UNAME_PROCESSOR=i686 ;; + powerpc) UNAME_PROCESSOR=powerpc ;; + esac + echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} + exit 0 ;; + *:procnto*:*:* | *:QNX:[0123456789]*:*) + UNAME_PROCESSOR=`uname -p` + if test "$UNAME_PROCESSOR" = "x86"; then + UNAME_PROCESSOR=i386 + UNAME_MACHINE=pc + fi + echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} + exit 0 ;; + *:QNX:*:4*) + echo i386-pc-qnx + exit 0 ;; + NSR-[DGKLNPTVWY]:NONSTOP_KERNEL:*:*) + echo nsr-tandem-nsk${UNAME_RELEASE} + exit 0 ;; + *:NonStop-UX:*:*) + echo mips-compaq-nonstopux + exit 0 ;; + BS2000:POSIX*:*:*) + echo bs2000-siemens-sysv + exit 0 ;; + DS/*:UNIX_System_V:*:*) + echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} + exit 0 ;; + *:Plan9:*:*) + # "uname -m" is not consistent, so use $cputype instead. 386 + # is converted to i386 for consistency with other x86 + # operating systems. + if test "$cputype" = "386"; then + UNAME_MACHINE=i386 + else + UNAME_MACHINE="$cputype" + fi + echo ${UNAME_MACHINE}-unknown-plan9 + exit 0 ;; + *:TOPS-10:*:*) + echo pdp10-unknown-tops10 + exit 0 ;; + *:TENEX:*:*) + echo pdp10-unknown-tenex + exit 0 ;; + KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) + echo pdp10-dec-tops20 + exit 0 ;; + XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) + echo pdp10-xkl-tops20 + exit 0 ;; + *:TOPS-20:*:*) + echo pdp10-unknown-tops20 + exit 0 ;; + *:ITS:*:*) + echo pdp10-unknown-its + exit 0 ;; + SEI:*:*:SEIUX) + echo mips-sei-seiux${UNAME_RELEASE} + exit 0 ;; esac #echo '(No uname command or uname output not recognized.)' 1>&2 #echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 -cat >dummy.c <$dummy.c < +# include +#endif main () { #if defined (sony) @@ -378,7 +1235,14 @@ main () I don't know.... */ printf ("mips-sony-bsd\n"); exit (0); #else - printf ("m68k-sony-newsos\n"); exit (0); +#include + printf ("m68k-sony-newsos%s\n", +#ifdef NEWSOS4 + "4" +#else + "" +#endif + ); exit (0); #endif #endif @@ -396,7 +1260,10 @@ main () #endif int version; version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; - printf ("%s-next-nextstep%s\n", __ARCHITECTURE__, version==2 ? "2" : "3"); + if (version < 4) + printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); + else + printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); exit (0); #endif @@ -413,7 +1280,7 @@ main () #endif #if defined (__386BSD__) - printf ("i386-unknown-bsd\n"); exit (0); + printf ("i386-pc-bsd\n"); exit (0); #endif #if defined (sequent) @@ -426,15 +1293,39 @@ main () #endif #if defined (_SEQUENT_) - printf ("i386-sequent-ptx\n"); exit (0); + struct utsname un; + + uname(&un); + + if (strncmp(un.version, "V2", 2) == 0) { + printf ("i386-sequent-ptx2\n"); exit (0); + } + if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ + printf ("i386-sequent-ptx1\n"); exit (0); + } + printf ("i386-sequent-ptx\n"); exit (0); + #endif #if defined (vax) -#if !defined (ultrix) - printf ("vax-dec-bsd\n"); exit (0); -#else - printf ("vax-dec-ultrix\n"); exit (0); -#endif +# if !defined (ultrix) +# include +# if defined (BSD) +# if BSD == 43 + printf ("vax-dec-bsd4.3\n"); exit (0); +# else +# if BSD == 199006 + printf ("vax-dec-bsd4.3reno\n"); exit (0); +# else + printf ("vax-dec-bsd\n"); exit (0); +# endif +# endif +# else + printf ("vax-dec-bsd\n"); exit (0); +# endif +# else + printf ("vax-dec-ultrix\n"); exit (0); +# endif #endif #if defined (alliant) && defined (i860) @@ -445,8 +1336,7 @@ main () } EOF -${CC-cc} dummy.c -o dummy 2>/dev/null && ./dummy && rm dummy.c dummy && exit 0 -rm -f dummy.c dummy +$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && $dummy && exit 0 # Apollos put the system type in the environment. @@ -478,6 +1368,48 @@ then esac fi -#echo '(Unable to guess system type)' 1>&2 +cat >&2 < in order to provide the needed +information to handle your system. + +config.guess timestamp = $timestamp + +uname -m = `(uname -m) 2>/dev/null || echo unknown` +uname -r = `(uname -r) 2>/dev/null || echo unknown` +uname -s = `(uname -s) 2>/dev/null || echo unknown` +uname -v = `(uname -v) 2>/dev/null || echo unknown` + +/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` +/bin/uname -X = `(/bin/uname -X) 2>/dev/null` + +hostinfo = `(hostinfo) 2>/dev/null` +/bin/universe = `(/bin/universe) 2>/dev/null` +/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` +/bin/arch = `(/bin/arch) 2>/dev/null` +/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` +/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` + +UNAME_MACHINE = ${UNAME_MACHINE} +UNAME_RELEASE = ${UNAME_RELEASE} +UNAME_SYSTEM = ${UNAME_SYSTEM} +UNAME_VERSION = ${UNAME_VERSION} +EOF exit 1 + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "timestamp='" +# time-stamp-format: "%:y-%02m-%02d" +# time-stamp-end: "'" +# End: diff --git a/config/config.sub b/config/config.sub index bf932cb9..79657cd1 100644 --- a/config/config.sub +++ b/config/config.sub @@ -1,9 +1,13 @@ -#!/bin/sh -# Configuration validation subroutine script, version 1.1. -# Copyright (C) 1991, 1992, 1993, 1994 Free Software Foundation, Inc. +#! /bin/sh +# Configuration validation subroutine script. +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, +# 2000, 2001, 2002, 2003 Free Software Foundation, Inc. + +timestamp='2003-10-07' + # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software -# can handle that machine. It does not imply ALL GNU software can. +# can handle that machine. It does not imply ALL GNU software can. # # This file is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -17,13 +21,17 @@ # # 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. +# Foundation, Inc., 59 Temple Place - Suite 330, +# Boston, MA 02111-1307, USA. # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. +# Please send patches to . Submit a context +# diff and a properly formatted ChangeLog entry. +# # Configuration subroutine to validate and canonicalize a configuration type. # Supply the specified configuration type as an argument. # If it is invalid, we print an error message on stderr and exit with code 1. @@ -40,23 +48,87 @@ # The goal of this file is to map all the various variations of a given # machine specification into a single specification in the form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM +# or in some cases, the newer four-part form: +# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM # It is wrong to echo any other type of specification. -# First pass through any local machine types. -case $1 in - *local*) - echo $1 - exit 0 - ;; - *) - ;; +me=`echo "$0" | sed -e 's,.*/,,'` + +usage="\ +Usage: $0 [OPTION] CPU-MFR-OPSYS + $0 [OPTION] ALIAS + +Canonicalize a configuration name. + +Operation modes: + -h, --help print this help, then exit + -t, --time-stamp print date of last modification, then exit + -v, --version print version number, then exit + +Report bugs and patches to ." + +version="\ +GNU config.sub ($timestamp) + +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 +Free Software Foundation, Inc. + +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." + +help=" +Try \`$me --help' for more information." + +# Parse command line +while test $# -gt 0 ; do + case $1 in + --time-stamp | --time* | -t ) + echo "$timestamp" ; exit 0 ;; + --version | -v ) + echo "$version" ; exit 0 ;; + --help | --h* | -h ) + echo "$usage"; exit 0 ;; + -- ) # Stop option processing + shift; break ;; + - ) # Use stdin as input. + break ;; + -* ) + echo "$me: invalid option $1$help" + exit 1 ;; + + *local*) + # First pass through any local machine types. + echo $1 + exit 0;; + + * ) + break ;; + esac +done + +case $# in + 0) echo "$me: missing argument$help" >&2 + exit 1;; + 1) ;; + *) echo "$me: too many arguments$help" >&2 + exit 1;; esac -# Separate what the user gave into CPU-COMPANY and OS (if any). -basic_machine=`echo $1 | sed 's/-[^-]*$//'` -if [ $basic_machine != $1 ] -then os=`echo $1 | sed 's/.*-/-/'` -else os=; fi +# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). +# Here we must recognize all the valid KERNEL-OS combinations. +maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` +case $maybe_os in + nto-qnx* | linux-gnu* | linux-dietlibc | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*) + os=-$maybe_os + basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` + ;; + *) + basic_machine=`echo $1 | sed 's/-[^-]*$//'` + if [ $basic_machine != $1 ] + then os=`echo $1 | sed 's/.*-/-/'` + else os=; fi + ;; +esac ### Let's recognize common machines as not being operating systems so ### that things like config.sub decstation-3100 work. We also @@ -71,40 +143,66 @@ case $os in -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ - -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp ) + -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ + -apple | -axis) + os= + basic_machine=$1 + ;; + -sim | -cisco | -oki | -wec | -winbond) os= basic_machine=$1 ;; + -scout) + ;; + -wrs) + os=-vxworks + basic_machine=$1 + ;; + -chorusos*) + os=-chorusos + basic_machine=$1 + ;; + -chorusrdb) + os=-chorusrdb + basic_machine=$1 + ;; -hiux*) os=-hiuxwe2 ;; + -sco5) + os=-sco3.2v5 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; -sco4) os=-sco3.2v4 - basic_machine=`echo $1 | sed -e 's/86-.*/86-unknown/'` + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2.[4-9]*) os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` - basic_machine=`echo $1 | sed -e 's/86-.*/86-unknown/'` + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2v[4-9]*) # Don't forget version if it is 3.2v4 or newer. - basic_machine=`echo $1 | sed -e 's/86-.*/86-unknown/'` + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco*) os=-sco3.2v2 - basic_machine=`echo $1 | sed -e 's/86-.*/86-unknown/'` + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -udk*) + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -isc) os=-isc2.2 - basic_machine=`echo $1 | sed -e 's/86-.*/86-unknown/'` + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -clix*) basic_machine=clipper-intergraph ;; -isc*) - basic_machine=`echo $1 | sed -e 's/86-.*/86-unknown/'` + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; - -lynx) + -lynx*) os=-lynxos ;; -ptx*) @@ -113,42 +211,161 @@ case $os in -windowsnt*) os=`echo $os | sed -e 's/windowsnt/winnt/'` ;; + -psos*) + os=-psos + ;; + -mint | -mint[0-9]*) + basic_machine=m68k-atari + os=-mint + ;; esac # Decode aliases for certain CPU-COMPANY combinations. case $basic_machine in # Recognize the basic CPU types without company name. # Some are omitted here because they have special meanings below. - tahoe | i[345]86 | i860 | m68k | m68000 | m88k | ns32k | arm | pyramid \ - | tron | a29k | 580 | i960 | h8300 | hppa1.0 | hppa1.1 \ - | alpha | we32k | ns16k | clipper | sparclite | i370 | sh \ - | powerpc | sparc64 | 1750a | dsp16xx | mips64 | mipsel \ - | pdp11 | mips64el | mips64orion | mips64orionel ) + 1750a | 580 \ + | a29k \ + | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ + | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ + | am33_2.0 \ + | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \ + | c4x | clipper \ + | d10v | d30v | dlx | dsp16xx \ + | fr30 | frv \ + | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ + | i370 | i860 | i960 | ia64 \ + | ip2k | iq2000 \ + | m32r | m68000 | m68k | m88k | mcore \ + | mips | mipsbe | mipseb | mipsel | mipsle \ + | mips16 \ + | mips64 | mips64el \ + | mips64vr | mips64vrel \ + | mips64orion | mips64orionel \ + | mips64vr4100 | mips64vr4100el \ + | mips64vr4300 | mips64vr4300el \ + | mips64vr5000 | mips64vr5000el \ + | mipsisa32 | mipsisa32el \ + | mipsisa32r2 | mipsisa32r2el \ + | mipsisa64 | mipsisa64el \ + | mipsisa64r2 | mipsisa64r2el \ + | mipsisa64sb1 | mipsisa64sb1el \ + | mipsisa64sr71k | mipsisa64sr71kel \ + | mipstx39 | mipstx39el \ + | mn10200 | mn10300 \ + | msp430 \ + | ns16k | ns32k \ + | openrisc | or32 \ + | pdp10 | pdp11 | pj | pjl \ + | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ + | pyramid \ + | sh | sh[1234] | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \ + | sh64 | sh64le \ + | sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv9 | sparcv9b \ + | strongarm \ + | tahoe | thumb | tic4x | tic80 | tron \ + | v850 | v850e \ + | we32k \ + | x86 | xscale | xstormy16 | xtensa \ + | z8k) + basic_machine=$basic_machine-unknown + ;; + m6811 | m68hc11 | m6812 | m68hc12) + # Motorola 68HC11/12. basic_machine=$basic_machine-unknown + os=-none + ;; + m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) ;; + + # We use `pc' rather than `unknown' + # because (1) that's what they normally are, and + # (2) the word "unknown" tends to confuse beginning users. + i*86 | x86_64) + basic_machine=$basic_machine-pc + ;; # Object if more than one company name word. *-*-*) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; # Recognize the basic CPU types with company name. - vax-* | tahoe-* | i[345]86-* | i860-* | m68k-* | m68000-* | m88k-* \ - | sparc-* | ns32k-* | fx80-* | arm-* | c[123]* \ - | mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* \ - | none-* | 580-* | cray2-* | h8300-* | i960-* | xmp-* | ymp-* \ - | hppa1.0-* | hppa1.1-* | alpha-* | we32k-* | cydra-* | ns16k-* \ - | pn-* | np1-* | xps100-* | clipper-* | orion-* | sparclite-* \ - | pdp11-* | sh-* | powerpc-* | sparc64-* | mips64-* | mipsel-* \ - | mips64el-* | mips64orion-* | mips64orionel-* ) + 580-* \ + | a29k-* \ + | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ + | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ + | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ + | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ + | avr-* \ + | bs2000-* \ + | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ + | clipper-* | cydra-* \ + | d10v-* | d30v-* | dlx-* \ + | elxsi-* \ + | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \ + | h8300-* | h8500-* \ + | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ + | i*86-* | i860-* | i960-* | ia64-* \ + | ip2k-* | iq2000-* \ + | m32r-* \ + | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ + | m88110-* | m88k-* | mcore-* \ + | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ + | mips16-* \ + | mips64-* | mips64el-* \ + | mips64vr-* | mips64vrel-* \ + | mips64orion-* | mips64orionel-* \ + | mips64vr4100-* | mips64vr4100el-* \ + | mips64vr4300-* | mips64vr4300el-* \ + | mips64vr5000-* | mips64vr5000el-* \ + | mipsisa32-* | mipsisa32el-* \ + | mipsisa32r2-* | mipsisa32r2el-* \ + | mipsisa64-* | mipsisa64el-* \ + | mipsisa64r2-* | mipsisa64r2el-* \ + | mipsisa64sb1-* | mipsisa64sb1el-* \ + | mipsisa64sr71k-* | mipsisa64sr71kel-* \ + | mipstx39-* | mipstx39el-* \ + | msp430-* \ + | none-* | np1-* | nv1-* | ns16k-* | ns32k-* \ + | orion-* \ + | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ + | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ + | pyramid-* \ + | romp-* | rs6000-* \ + | sh-* | sh[1234]-* | sh[23]e-* | sh[34]eb-* | shbe-* \ + | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ + | sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \ + | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \ + | tahoe-* | thumb-* \ + | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ + | tron-* \ + | v850-* | v850e-* | vax-* \ + | we32k-* \ + | x86-* | x86_64-* | xps100-* | xscale-* | xstormy16-* \ + | xtensa-* \ + | ymp-* \ + | z8k-*) ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. + 386bsd) + basic_machine=i386-unknown + os=-bsd + ;; 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) basic_machine=m68000-att ;; 3b*) basic_machine=we32k-att ;; + a29khif) + basic_machine=a29k-amd + os=-udi + ;; + adobe68k) + basic_machine=m68010-adobe + os=-scout + ;; alliant | fx80) basic_machine=fx80-alliant ;; @@ -159,29 +376,44 @@ case $basic_machine in basic_machine=a29k-none os=-bsd ;; + amd64) + basic_machine=x86_64-pc + ;; amdahl) basic_machine=580-amdahl os=-sysv ;; amiga | amiga-*) - basic_machine=m68k-cbm + basic_machine=m68k-unknown ;; - amigados) - basic_machine=m68k-cbm - os=-amigados + amigaos | amigados) + basic_machine=m68k-unknown + os=-amigaos ;; amigaunix | amix) - basic_machine=m68k-cbm + basic_machine=m68k-unknown os=-sysv4 ;; apollo68) basic_machine=m68k-apollo os=-sysv ;; + apollo68bsd) + basic_machine=m68k-apollo + os=-bsd + ;; + aux) + basic_machine=m68k-apple + os=-aux + ;; balance) basic_machine=ns32k-sequent os=-dynix ;; + c90) + basic_machine=c90-cray + os=-unicos + ;; convex-c1) basic_machine=c1-convex os=-bsd @@ -202,23 +434,30 @@ case $basic_machine in basic_machine=c38-convex os=-bsd ;; - cray | ymp) - basic_machine=ymp-cray - os=-unicos - ;; - cray2) - basic_machine=cray2-cray + cray | j90) + basic_machine=j90-cray os=-unicos ;; crds | unos) basic_machine=m68k-crds ;; + cris | cris-* | etrax*) + basic_machine=cris-axis + ;; da30 | da30-*) basic_machine=m68k-da30 ;; decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) basic_machine=mips-dec ;; + decsystem10* | dec10*) + basic_machine=pdp10-dec + os=-tops10 + ;; + decsystem20* | dec20*) + basic_machine=pdp10-dec + os=-tops20 + ;; delta | 3300 | motorola-3300 | motorola-delta \ | 3300-motorola | delta-motorola) basic_machine=m68k-motorola @@ -246,6 +485,10 @@ case $basic_machine in encore | umax | mmax) basic_machine=ns32k-encore ;; + es1800 | OSE68k | ose68k | ose | OSE) + basic_machine=m68k-ericsson + os=-ose + ;; fx2800) basic_machine=i860-alliant ;; @@ -256,6 +499,10 @@ case $basic_machine in basic_machine=tron-gmicro os=-sysv ;; + go32) + basic_machine=i386-pc + os=-go32 + ;; h3050r* | hiux*) basic_machine=hppa1.1-hitachi os=-hiuxwe2 @@ -264,6 +511,14 @@ case $basic_machine in basic_machine=h8300-hitachi os=-hms ;; + h8300xray) + basic_machine=h8300-hitachi + os=-xray + ;; + h8500hms) + basic_machine=h8500-hitachi + os=-hms + ;; harris) basic_machine=m88k-harris os=-sysv3 @@ -279,39 +534,74 @@ case $basic_machine in basic_machine=m68k-hp os=-hpux ;; + hp3k9[0-9][0-9] | hp9[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; hp9k2[0-9][0-9] | hp9k31[0-9]) basic_machine=m68000-hp ;; hp9k3[2-9][0-9]) basic_machine=m68k-hp ;; - hp9k7[0-9][0-9] | hp7[0-9][0-9] | hp9k8[0-9]7 | hp8[0-9]7) + hp9k6[0-9][0-9] | hp6[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + hp9k7[0-79][0-9] | hp7[0-79][0-9]) + basic_machine=hppa1.1-hp + ;; + hp9k78[0-9] | hp78[0-9]) + # FIXME: really hppa2.0-hp + basic_machine=hppa1.1-hp + ;; + hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) + # FIXME: really hppa2.0-hp + basic_machine=hppa1.1-hp + ;; + hp9k8[0-9][13679] | hp8[0-9][13679]) basic_machine=hppa1.1-hp ;; hp9k8[0-9][0-9] | hp8[0-9][0-9]) basic_machine=hppa1.0-hp ;; + hppa-next) + os=-nextstep3 + ;; + hppaosf) + basic_machine=hppa1.1-hp + os=-osf + ;; + hppro) + basic_machine=hppa1.1-hp + os=-proelf + ;; i370-ibm* | ibm*) basic_machine=i370-ibm - os=-mvs ;; # I'm not sure what "Sysv32" means. Should this be sysv3.2? - i[345]86v32) - basic_machine=`echo $1 | sed -e 's/86.*/86-unknown/'` + i*86v32) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv32 ;; - i[345]86v4*) - basic_machine=`echo $1 | sed -e 's/86.*/86-unknown/'` + i*86v4*) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv4 ;; - i[345]86v) - basic_machine=`echo $1 | sed -e 's/86.*/86-unknown/'` + i*86v) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv ;; - i[345]86sol2) - basic_machine=`echo $1 | sed -e 's/86.*/86-unknown/'` + i*86sol2) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-solaris2 ;; + i386mach) + basic_machine=i386-mach + os=-mach + ;; + i386-vsta | vsta) + basic_machine=i386-unknown + os=-vsta + ;; iris | iris4d) basic_machine=mips-sgi case $os in @@ -337,19 +627,55 @@ case $basic_machine in basic_machine=ns32k-utek os=-sysv ;; + mingw32) + basic_machine=i386-pc + os=-mingw32 + ;; miniframe) basic_machine=m68000-convergent ;; + *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) + basic_machine=m68k-atari + os=-mint + ;; mips3*-*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` ;; mips3*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown ;; + mmix*) + basic_machine=mmix-knuth + os=-mmixware + ;; + monitor) + basic_machine=m68k-rom68k + os=-coff + ;; + morphos) + basic_machine=powerpc-unknown + os=-morphos + ;; + msdos) + basic_machine=i386-pc + os=-msdos + ;; + mvs) + basic_machine=i370-ibm + os=-mvs + ;; ncr3000) basic_machine=i486-ncr os=-sysv4 ;; + netbsd386) + basic_machine=i386-unknown + os=-netbsd + ;; + netwinder) + basic_machine=armv4l-rebel + os=-linux + ;; news | news700 | news800 | news900) basic_machine=m68k-sony os=-newsos @@ -362,6 +688,10 @@ case $basic_machine in basic_machine=mips-sony os=-newsos ;; + necv70) + basic_machine=v70-nec + os=-sysv + ;; next | m*-next ) basic_machine=m68k-next case $os in @@ -387,9 +717,40 @@ case $basic_machine in basic_machine=i960-intel os=-nindy ;; + mon960) + basic_machine=i960-intel + os=-mon960 + ;; + nonstopux) + basic_machine=mips-compaq + os=-nonstopux + ;; np1) basic_machine=np1-gould ;; + nv1) + basic_machine=nv1-cray + os=-unicosmp + ;; + nsr-tandem) + basic_machine=nsr-tandem + ;; + op50n-* | op60c-*) + basic_machine=hppa1.1-oki + os=-proelf + ;; + or32 | or32-*) + basic_machine=or32-unknown + os=-coff + ;; + OSE68000 | ose68000) + basic_machine=m68000-ericsson + os=-ose + ;; + os68k) + basic_machine=m68k-none + os=-os68k + ;; pa-hitachi) basic_machine=hppa1.1-hitachi os=-hiuxwe2 @@ -404,23 +765,95 @@ case $basic_machine in pbb) basic_machine=m68k-tti ;; - pc532 | pc532-*) + pc532 | pc532-*) basic_machine=ns32k-pc532 ;; - pentium-*) - # We will change tis to say i586 once there has been - # time for various packages to start to recognize that. - basic_machine=i486-`echo $basic_machine | sed 's/^[^-]*-//'` + pentium | p5 | k5 | k6 | nexgen | viac3) + basic_machine=i586-pc + ;; + pentiumpro | p6 | 6x86 | athlon | athlon_*) + basic_machine=i686-pc + ;; + pentiumii | pentium2 | pentiumiii | pentium3) + basic_machine=i686-pc + ;; + pentium4) + basic_machine=i786-pc + ;; + pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) + basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentiumpro-* | p6-* | 6x86-* | athlon-*) + basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) + basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentium4-*) + basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pn) basic_machine=pn-gould ;; + power) basic_machine=power-ibm + ;; + ppc) basic_machine=powerpc-unknown + ;; + ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ppcle | powerpclittle | ppc-le | powerpc-little) + basic_machine=powerpcle-unknown + ;; + ppcle-* | powerpclittle-*) + basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ppc64) basic_machine=powerpc64-unknown + ;; + ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ppc64le | powerpc64little | ppc64-le | powerpc64-little) + basic_machine=powerpc64le-unknown + ;; + ppc64le-* | powerpc64little-*) + basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; ps2) basic_machine=i386-ibm ;; + pw32) + basic_machine=i586-unknown + os=-pw32 + ;; + rom68k) + basic_machine=m68k-rom68k + os=-coff + ;; + rm[46]00) + basic_machine=mips-siemens + ;; rtpc | rtpc-*) basic_machine=romp-ibm ;; + s390 | s390-*) + basic_machine=s390-ibm + ;; + s390x | s390x-*) + basic_machine=s390x-ibm + ;; + sa29200) + basic_machine=a29k-amd + os=-udi + ;; + sb1) + basic_machine=mipsisa64sb1-unknown + ;; + sb1el) + basic_machine=mipsisa64sb1el-unknown + ;; + sei) + basic_machine=mips-sei + os=-seiux + ;; sequent) basic_machine=i386-sequent ;; @@ -428,6 +861,13 @@ case $basic_machine in basic_machine=sh-hitachi os=-hms ;; + sh64) + basic_machine=sh64-unknown + ;; + sparclite-wrs | simso-wrs) + basic_machine=sparclite-wrs + os=-vxworks + ;; sps7) basic_machine=m68k-bull os=-sysv2 @@ -435,6 +875,13 @@ case $basic_machine in spur) basic_machine=spur-unknown ;; + st2000) + basic_machine=m68k-tandem + ;; + stratus) + basic_machine=i860-stratus + os=-sysv4 + ;; sun2) basic_machine=m68000-sun ;; @@ -462,6 +909,10 @@ case $basic_machine in basic_machine=sparc-sun os=-sunos4 ;; + sun4sol2) + basic_machine=sparc-sun + os=-solaris2 + ;; sun3 | sun3-*) basic_machine=m68k-sun ;; @@ -471,17 +922,59 @@ case $basic_machine in sun386 | sun386i | roadrunner) basic_machine=i386-sun ;; + sv1) + basic_machine=sv1-cray + os=-unicos + ;; symmetry) basic_machine=i386-sequent os=-dynix ;; + t3e) + basic_machine=alphaev5-cray + os=-unicos + ;; + t90) + basic_machine=t90-cray + os=-unicos + ;; + tic54x | c54x*) + basic_machine=tic54x-unknown + os=-coff + ;; + tic55x | c55x*) + basic_machine=tic55x-unknown + os=-coff + ;; + tic6x | c6x*) + basic_machine=tic6x-unknown + os=-coff + ;; + tx39) + basic_machine=mipstx39-unknown + ;; + tx39el) + basic_machine=mipstx39el-unknown + ;; + toad1) + basic_machine=pdp10-xkl + os=-tops20 + ;; tower | tower-32) basic_machine=m68k-ncr ;; + udi29k) + basic_machine=a29k-amd + os=-udi + ;; ultra3) basic_machine=a29k-nyu os=-sym1 ;; + v810 | necv810) + basic_machine=v810-nec + os=-none + ;; vaxv) basic_machine=vax-dec os=-sysv @@ -490,6 +983,9 @@ case $basic_machine in basic_machine=vax-dec os=-vms ;; + vpp*|vx|vx-*) + basic_machine=f301-fujitsu + ;; vxworks960) basic_machine=i960-wrs os=-vxworks @@ -498,13 +994,29 @@ case $basic_machine in basic_machine=m68k-wrs os=-vxworks ;; - xmp) - basic_machine=xmp-cray - os=-unicos + vxworks29k) + basic_machine=a29k-wrs + os=-vxworks + ;; + w65*) + basic_machine=w65-wdc + os=-none + ;; + w89k-*) + basic_machine=hppa1.1-winbond + os=-proelf ;; - xps | xps100) + xps | xps100) basic_machine=xps100-honeywell ;; + ymp) + basic_machine=ymp-cray + os=-unicos + ;; + z8k-*-coff) + basic_machine=z8k-unknown + os=-sim + ;; none) basic_machine=none-none os=-none @@ -512,8 +1024,14 @@ case $basic_machine in # Here we handle the default manufacturer of certain CPU types. It is in # some cases the only manufacturer, in others, it is the most popular. - mips) - basic_machine=mips-mips + w89k) + basic_machine=hppa1.1-winbond + ;; + op50n) + basic_machine=hppa1.1-oki + ;; + op60c) + basic_machine=hppa1.1-oki ;; romp) basic_machine=romp-ibm @@ -524,16 +1042,26 @@ case $basic_machine in vax) basic_machine=vax-dec ;; + pdp10) + # there are many clones, so DEC is not a safe bet + basic_machine=pdp10-unknown + ;; pdp11) basic_machine=pdp11-dec ;; we32k) basic_machine=we32k-att ;; - sparc) + sh3 | sh4 | sh[34]eb | sh[1234]le | sh[23]ele) + basic_machine=sh-unknown + ;; + sh64) + basic_machine=sh64-unknown + ;; + sparc | sparcv9 | sparcv9b) basic_machine=sparc-sun ;; - cydra) + cydra) basic_machine=cydra-cydrome ;; orion) @@ -542,6 +1070,15 @@ case $basic_machine in orion105) basic_machine=clipper-highlevel ;; + mac | mpw | mac-mpw) + basic_machine=m68k-apple + ;; + pmac | pmac-mpw) + basic_machine=powerpc-apple + ;; + *-unknown) + # Make sure to match an already-canonicalized machine name. + ;; *) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 @@ -565,6 +1102,8 @@ esac if [ x"$os" != x"" ] then case $os in + # First match some system type aliases + # that might get confused with valid system types. # -solaris* is a basic system type, with this one exception. -solaris1 | -solaris1.*) os=`echo $os | sed -e 's|solaris1|sunos4|'` @@ -572,22 +1111,67 @@ case $os in -solaris) os=-solaris2 ;; + -svr4*) + os=-sysv4 + ;; + -unixware*) + os=-sysv4.2uw + ;; -gnu/linux*) - os=`echo $os | sed -e 's|gnu/linux|linux|'` + os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` ;; # First accept the basic system types. # The portable systems comes first. - # Each alternative must end in a *, to match a version number. + # Each alternative MUST END IN A *, to match a version number. # -sysv* is not here because it comes later, after sysvr4. -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ - | -vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[345]* \ + | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ - | -amigados* | -msdos* | -newsos* | -unicos* | -aos* \ - | -nindy* | -vxworks* | -ebmon* | -hms* | -mvs* | -clix* \ - | -riscos* | -linux* | -uniplus* | -iris* | -rtu* | -xenix* \ - | -hiux* | -386bsd* | -netbsd* | -freebsd* | -riscix* \ - | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* \ - | -ptx* | -coff* | -winnt*) + | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ + | -aos* \ + | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ + | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ + | -hiux* | -386bsd* | -knetbsd* | -netbsd* | -openbsd* | -kfreebsd* | -freebsd* | -riscix* \ + | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ + | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ + | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ + | -chorusos* | -chorusrdb* \ + | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ + | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \ + | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ + | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ + | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ + | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ + | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ + | -powermax* | -dnix* | -nx6 | -nx7 | -sei*) + # Remember, each alternative MUST END IN *, to match a version number. + ;; + -qnx*) + case $basic_machine in + x86-* | i*86-*) + ;; + *) + os=-nto$os + ;; + esac + ;; + -nto-qnx*) + ;; + -nto*) + os=`echo $os | sed -e 's|nto|nto-qnx|'` + ;; + -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ + | -windows* | -osx | -abug | -netware* | -os9* | -beos* \ + | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) + ;; + -mac*) + os=`echo $os | sed -e 's|mac|macos|'` + ;; + -linux-dietlibc) + os=-linux-dietlibc + ;; + -linux*) + os=`echo $os | sed -e 's|linux|linux-gnu|'` ;; -sunos5*) os=`echo $os | sed -e 's|sunos5|solaris2|'` @@ -595,6 +1179,12 @@ case $os in -sunos6*) os=`echo $os | sed -e 's|sunos6|solaris3|'` ;; + -opened*) + os=-openedition + ;; + -wince*) + os=-wince + ;; -osfrose*) os=-osfrose ;; @@ -610,9 +1200,31 @@ case $os in -acis*) os=-aos ;; + -atheos*) + os=-atheos + ;; + -386bsd) + os=-bsd + ;; -ctix* | -uts*) os=-sysv ;; + -nova*) + os=-rtmk-nova + ;; + -ns2 ) + os=-nextstep2 + ;; + -nsk*) + os=-nsk + ;; + # Preserve the version number of sinix5. + -sinix5.*) + os=`echo $os | sed -e 's|sinix|sysv|'` + ;; + -sinix*) + os=-sysv4 + ;; -triton*) os=-sysv3 ;; @@ -631,9 +1243,24 @@ case $os in # This must come after -sysvr4. -sysv*) ;; + -ose*) + os=-ose + ;; + -es1800*) + os=-ose + ;; -xenix) os=-xenix ;; + -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) + os=-mint + ;; + -aros*) + os=-aros + ;; + -kaos*) + os=-kaos + ;; -none) ;; *) @@ -659,12 +1286,28 @@ case $basic_machine in *-acorn) os=-riscix1.2 ;; - pdp11-*) + arm*-rebel) + os=-linux + ;; + arm*-semi) + os=-aout + ;; + c4x-* | tic4x-*) + os=-coff + ;; + # This must come before the *-dec entry. + pdp10-*) + os=-tops20 + ;; + pdp11-*) os=-none ;; *-dec | vax-*) os=-ultrix4.2 ;; + m68*-apollo) + os=-domain + ;; i386-sun) os=-sunos4.0.2 ;; @@ -674,15 +1317,39 @@ case $basic_machine in # default. # os=-sunos4 ;; + m68*-cisco) + os=-aout + ;; + mips*-cisco) + os=-elf + ;; + mips*-*) + os=-elf + ;; + or32-*) + os=-coff + ;; *-tti) # must be before sparc entry or we get the wrong os. os=-sysv3 ;; sparc-* | *-sun) os=-sunos4.1.1 ;; + *-be) + os=-beos + ;; *-ibm) os=-aix ;; + *-wec) + os=-proelf + ;; + *-winbond) + os=-proelf + ;; + *-oki) + os=-proelf + ;; *-hp) os=-hpux ;; @@ -693,7 +1360,7 @@ case $basic_machine in os=-sysv ;; *-cbm) - os=-amigados + os=-amigaos ;; *-dg) os=-dgux @@ -707,6 +1374,9 @@ case $basic_machine in m88k-omron*) os=-luna ;; + *-next ) + os=-nextstep + ;; *-sequent) os=-ptx ;; @@ -722,21 +1392,39 @@ case $basic_machine in *-next) os=-nextstep3 ;; - *-gould) + *-gould) os=-sysv ;; - *-highlevel) + *-highlevel) os=-bsd ;; *-encore) os=-bsd ;; - *-sgi) + *-sgi) os=-irix ;; + *-siemens) + os=-sysv4 + ;; *-masscomp) os=-rtu ;; + f30[01]-fujitsu | f700-fujitsu) + os=-uxpv + ;; + *-rom68k) + os=-coff + ;; + *-*bug) + os=-coff + ;; + *-apple) + os=-macos + ;; + *-atari*) + os=-mint + ;; *) os=-none ;; @@ -755,15 +1443,18 @@ case $basic_machine in -sunos*) vendor=sun ;; - -lynxos*) - vendor=lynx - ;; -aix*) vendor=ibm ;; + -beos*) + vendor=be + ;; -hpux*) vendor=hp ;; + -mpeix*) + vendor=hp + ;; -hiux*) vendor=hitachi ;; @@ -779,15 +1470,41 @@ case $basic_machine in -genix*) vendor=ns ;; - -mvs*) + -mvs* | -opened*) vendor=ibm ;; -ptx*) vendor=sequent ;; + -vxsim* | -vxworks* | -windiss*) + vendor=wrs + ;; + -aux*) + vendor=apple + ;; + -hms*) + vendor=hitachi + ;; + -mpw* | -macos*) + vendor=apple + ;; + -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) + vendor=atari + ;; + -vos*) + vendor=stratus + ;; esac basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` ;; esac echo $basic_machine$os +exit 0 + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "timestamp='" +# time-stamp-format: "%:y-%02m-%02d" +# time-stamp-end: "'" +# End: diff --git a/config/tcl.m4 b/config/tcl.m4 index 873335d3..f6df490e 100644 --- a/config/tcl.m4 +++ b/config/tcl.m4 @@ -1928,13 +1928,13 @@ AC_DEFUN(SC_MAKE_LIB, [ case "`uname -s`" in *win32* | *WIN32* | *CYGWIN_NT* |*CYGWIN_98*|*CYGWIN_95*) if test "${CC-cc}" = "cl"; then - MAKE_STATIC_LIB="\${STLIB_LD} -out:\[$]@ \$(\[$]@_OBJECTS) " - MAKE_SHARED_LIB="\${SHLIB_LD} \${SHLIB_LDFLAGS} \${SHLIB_LD_LIBS} \$(LDFLAGS) -out:\[$]@ \$(\[$]@_OBJECTS) " + MAKE_STATIC_LIB="\${STLIB_LD} -out:\[$]@ \$(${PACKAGE}_LIB_OBJECTS) " + MAKE_SHARED_LIB="\${SHLIB_LD} \${SHLIB_LDFLAGS} \${SHLIB_LD_LIBS} \$(LDFLAGS) -out:\[$]@ \$(${PACKAGE}_LIB_OBJECTS) " fi ;; *) - MAKE_STATIC_LIB="\${STLIB_LD} \[$]@ \$(\[$]@_OBJECTS)" - MAKE_SHARED_LIB="\${SHLIB_LD} -o \[$]@ \$(\[$]@_OBJECTS) \${SHLIB_LDFLAGS} \${SHLIB_LD_LIBS}" + MAKE_STATIC_LIB="\${STLIB_LD} \[$]@ \$(${PACKAGE}_LIB_OBJECTS)" + MAKE_SHARED_LIB="\${SHLIB_LD} -o \[$]@ \$(${PACKAGE}_LIB_OBJECTS) \${SHLIB_LDFLAGS} \${SHLIB_LD_LIBS}" ;; esac diff --git a/configure b/configure index 28bbab23..0561f7c1 100755 --- a/configure +++ b/configure @@ -1,26 +1,632 @@ #! /bin/sh - # Guess values for system-dependent variables and create Makefiles. -# Generated automatically using autoconf version 2.13 -# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. +# Generated by GNU Autoconf 2.68. +# +# +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, +# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software +# Foundation, Inc. +# # # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. +## -------------------- ## +## M4sh Initialization. ## +## -------------------- ## + +# Be more Bourne compatible +DUALCASE=1; export DUALCASE # for MKS sh +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; +esac +fi + + +as_nl=' +' +export as_nl +# Printing a long string crashes Solaris 7 /usr/bin/printf. +as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo +# Prefer a ksh shell builtin over an external printf program on Solaris, +# but without wasting forks for bash or zsh. +if test -z "$BASH_VERSION$ZSH_VERSION" \ + && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='print -r --' + as_echo_n='print -rn --' +elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='printf %s\n' + as_echo_n='printf %s' +else + if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then + as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' + as_echo_n='/usr/ucb/echo -n' + else + as_echo_body='eval expr "X$1" : "X\\(.*\\)"' + as_echo_n_body='eval + arg=$1; + case $arg in #( + *"$as_nl"*) + expr "X$arg" : "X\\(.*\\)$as_nl"; + arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; + esac; + expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" + ' + export as_echo_n_body + as_echo_n='sh -c $as_echo_n_body as_echo' + fi + export as_echo_body + as_echo='sh -c $as_echo_body as_echo' +fi + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + PATH_SEPARATOR=: + (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { + (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || + PATH_SEPARATOR=';' + } +fi + + +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +IFS=" "" $as_nl" + +# Find who we are. Look in the path if we contain no directory separator. +as_myself= +case $0 in #(( + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break + done +IFS=$as_save_IFS + + ;; +esac +# We did not find ourselves, most probably we were run as `sh COMMAND' +# in which case we are not to be found in the path. +if test "x$as_myself" = x; then + as_myself=$0 +fi +if test ! -f "$as_myself"; then + $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + exit 1 +fi + +# Unset variables that we do not need and which cause bugs (e.g. in +# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" +# suppresses any "Segmentation fault" message there. '((' could +# trigger a bug in pdksh 5.2.14. +for as_var in BASH_ENV ENV MAIL MAILPATH +do eval test x\${$as_var+set} = xset \ + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : +done +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE + +# CDPATH. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + +if test "x$CONFIG_SHELL" = x; then + as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which + # is contrary to our usage. Disable this feature. + alias -g '\${1+\"\$@\"}'='\"\$@\"' + setopt NO_GLOB_SUBST +else + case \`(set -o) 2>/dev/null\` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; +esac +fi +" + as_required="as_fn_return () { (exit \$1); } +as_fn_success () { as_fn_return 0; } +as_fn_failure () { as_fn_return 1; } +as_fn_ret_success () { return 0; } +as_fn_ret_failure () { return 1; } + +exitcode=0 +as_fn_success || { exitcode=1; echo as_fn_success failed.; } +as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } +as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } +as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } +if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : + +else + exitcode=1; echo positional parameters were not saved. +fi +test x\$exitcode = x0 || exit 1" + as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO + as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO + eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && + test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1" + if (eval "$as_required") 2>/dev/null; then : + as_have_required=yes +else + as_have_required=no +fi + if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : + +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +as_found=false +for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + as_found=: + case $as_dir in #( + /*) + for as_base in sh bash ksh sh5; do + # Try only shells that exist, to save several forks. + as_shell=$as_dir/$as_base + if { test -f "$as_shell" || test -f "$as_shell.exe"; } && + { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : + CONFIG_SHELL=$as_shell as_have_required=yes + if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : + break 2 +fi +fi + done;; + esac + as_found=false +done +$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && + { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : + CONFIG_SHELL=$SHELL as_have_required=yes +fi; } +IFS=$as_save_IFS + + + if test "x$CONFIG_SHELL" != x; then : + # We cannot yet assume a decent shell, so we have to provide a + # neutralization value for shells without unset; and this also + # works around shells that cannot unset nonexistent variables. + # Preserve -v and -x to the replacement shell. + BASH_ENV=/dev/null + ENV=/dev/null + (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV + export CONFIG_SHELL + case $- in # (((( + *v*x* | *x*v* ) as_opts=-vx ;; + *v* ) as_opts=-v ;; + *x* ) as_opts=-x ;; + * ) as_opts= ;; + esac + exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"} +fi + + if test x$as_have_required = xno; then : + $as_echo "$0: This script requires a shell more modern than all" + $as_echo "$0: the shells that I found on your system." + if test x${ZSH_VERSION+set} = xset ; then + $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" + $as_echo "$0: be upgraded to zsh 4.3.4 or later." + else + $as_echo "$0: Please tell bug-autoconf@gnu.org about your system, +$0: including any error possibly output before this +$0: message. Then install a modern shell, or manually run +$0: the script under such a shell if you do have one." + fi + exit 1 +fi +fi +fi +SHELL=${CONFIG_SHELL-/bin/sh} +export SHELL +# Unset more variables known to interfere with behavior of common tools. +CLICOLOR_FORCE= GREP_OPTIONS= +unset CLICOLOR_FORCE GREP_OPTIONS + +## --------------------- ## +## M4sh Shell Functions. ## +## --------------------- ## +# as_fn_unset VAR +# --------------- +# Portably unset VAR. +as_fn_unset () +{ + { eval $1=; unset $1;} +} +as_unset=as_fn_unset + +# as_fn_set_status STATUS +# ----------------------- +# Set $? to STATUS, without forking. +as_fn_set_status () +{ + return $1 +} # as_fn_set_status + +# as_fn_exit STATUS +# ----------------- +# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. +as_fn_exit () +{ + set +e + as_fn_set_status $1 + exit $1 +} # as_fn_exit + +# as_fn_mkdir_p +# ------------- +# Create "$as_dir" as a directory, including parents if necessary. +as_fn_mkdir_p () +{ + + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || eval $as_mkdir_p || { + as_dirs= + while :; do + case $as_dir in #( + *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break + done + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" + + +} # as_fn_mkdir_p +# as_fn_append VAR VALUE +# ---------------------- +# Append the text in VALUE to the end of the definition contained in VAR. Take +# advantage of any shell optimizations that allow amortized linear growth over +# repeated appends, instead of the typical quadratic growth present in naive +# implementations. +if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : + eval 'as_fn_append () + { + eval $1+=\$2 + }' +else + as_fn_append () + { + eval $1=\$$1\$2 + } +fi # as_fn_append + +# as_fn_arith ARG... +# ------------------ +# Perform arithmetic evaluation on the ARGs, and store the result in the +# global $as_val. Take advantage of shells that can avoid forks. The arguments +# must be portable across $(()) and expr. +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : + eval 'as_fn_arith () + { + as_val=$(( $* )) + }' +else + as_fn_arith () + { + as_val=`expr "$@" || test $? -eq 1` + } +fi # as_fn_arith + + +# as_fn_error STATUS ERROR [LINENO LOG_FD] +# ---------------------------------------- +# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are +# provided, also output the error to LOG_FD, referencing LINENO. Then exit the +# script with STATUS, using 1 if that was 0. +as_fn_error () +{ + as_status=$1; test $as_status -eq 0 && as_status=1 + if test "$4"; then + as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 + fi + $as_echo "$as_me: error: $2" >&2 + as_fn_exit $as_status +} # as_fn_error + +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi + +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then + as_basename=basename +else + as_basename=false +fi + +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi + +as_me=`$as_basename -- "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + + + as_lineno_1=$LINENO as_lineno_1a=$LINENO + as_lineno_2=$LINENO as_lineno_2a=$LINENO + eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && + test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { + # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) + sed -n ' + p + /[$]LINENO/= + ' <$as_myself | + sed ' + s/[$]LINENO.*/&-/ + t lineno + b + :lineno + N + :loop + s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ + t loop + s/-\n.*// + ' >$as_me.lineno && + chmod +x "$as_me.lineno" || + { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } + + # Don't try to exec as it changes $[0], causing all sort of problems + # (the dirname of $[0] is not the place where we might find the + # original and so on. Autoconf is especially sensitive to this). + . "./$as_me.lineno" + # Exit status is that of the last command. + exit +} + +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in #((((( +-n*) + case `echo 'xy\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + xy) ECHO_C='\c';; + *) echo `echo ksh88 bug on AIX 6.1` > /dev/null + ECHO_T=' ';; + esac;; +*) + ECHO_N='-n';; +esac + +rm -f conf$$ conf$$.exe conf$$.file +if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file +else + rm -f conf$$.dir + mkdir conf$$.dir 2>/dev/null +fi +if (echo >conf$$.file) 2>/dev/null; then + if ln -s conf$$.file conf$$ 2>/dev/null; then + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -p'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + as_ln_s='cp -p' + elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln + else + as_ln_s='cp -p' + fi +else + as_ln_s='cp -p' +fi +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null + +if mkdir -p . 2>/dev/null; then + as_mkdir_p='mkdir -p "$as_dir"' +else + test -d ./-p && rmdir ./-p + as_mkdir_p=false +fi + +if test -x / >/dev/null 2>&1; then + as_test_x='test -x' +else + if ls -dL / >/dev/null 2>&1; then + as_ls_L_option=L + else + as_ls_L_option= + fi + as_test_x=' + eval sh -c '\'' + if test -d "$1"; then + test -d "$1/."; + else + case $1 in #( + -*)set "./$1";; + esac; + case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( + ???[sx]*):;;*)false;;esac;fi + '\'' sh + ' +fi +as_executable_p=$as_test_x + +# Sed expression to map a string onto a valid CPP name. +as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" + +# Sed expression to map a string onto a valid variable name. +as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" + + +test -n "$DJDIR" || exec 7<&0 &1 -# Defaults: -ac_help= +# Name of the host. +# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, +# so uname gets run too. +ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` + +# +# Initializations. +# ac_default_prefix=/usr/local -# Any additions from configure.in: +ac_clean_files= +ac_config_libobj_dir=. +LIBOBJS= +cross_compiling=no +subdirs= +MFLAGS= +MAKEFLAGS= + +# Identity of this package. +PACKAGE_NAME= +PACKAGE_TARNAME= +PACKAGE_VERSION= +PACKAGE_STRING= +PACKAGE_BUGREPORT= +PACKAGE_URL= + +ac_unique_file="ChangeLog" +ac_subst_vars='LTLIBOBJS +LIBOBJS +VERSION +PACKAGE +TCLSH_PROG +EXEEXT +CYGPATH +target_alias +host_alias +build_alias +LIBS +ECHO_T +ECHO_N +ECHO_C +DEFS +mandir +localedir +libdir +psdir +pdfdir +dvidir +htmldir +infodir +docdir +oldincludedir +includedir +localstatedir +sharedstatedir +sysconfdir +datadir +datarootdir +libexecdir +sbindir +bindir +program_transform_name +prefix +exec_prefix +PACKAGE_URL +PACKAGE_BUGREPORT +PACKAGE_STRING +PACKAGE_VERSION +PACKAGE_TARNAME +PACKAGE_NAME +PATH_SEPARATOR +SHELL' +ac_subst_files='' +ac_user_opts=' +enable_option_checking +with_tclsh +' + ac_precious_vars='build_alias +host_alias +target_alias' + # Initialize some variables set by options. +ac_init_help= +ac_init_version=false +ac_unrecognized_opts= +ac_unrecognized_sep= # The variables have the same names as the options, with # dashes changed to underlines. -build=NONE -cache_file=./config.cache +cache_file=/dev/null exec_prefix=NONE -host=NONE no_create= -nonopt=NONE no_recursion= prefix=NONE program_prefix=NONE @@ -29,94 +635,132 @@ program_transform_name=s,x,x, silent= site= srcdir= -target=NONE verbose= x_includes=NONE x_libraries=NONE + +# Installation directory options. +# These are left unexpanded so users can "make install exec_prefix=/foo" +# and all the variables that are supposed to be based on exec_prefix +# by default will actually change. +# Use braces instead of parens because sh, perl, etc. also accept them. +# (The list follows the same order as the GNU Coding Standards.) bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' -datadir='${prefix}/share' +datarootdir='${prefix}/share' +datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' -libdir='${exec_prefix}/lib' includedir='${prefix}/include' oldincludedir='/usr/include' -infodir='${prefix}/info' -mandir='${prefix}/man' - -# Initialize some other variables. -subdirs= -MFLAGS= MAKEFLAGS= -SHELL=${CONFIG_SHELL-/bin/sh} -# Maximum number of lines to put in a shell here document. -ac_max_here_lines=12 +docdir='${datarootdir}/doc/${PACKAGE}' +infodir='${datarootdir}/info' +htmldir='${docdir}' +dvidir='${docdir}' +pdfdir='${docdir}' +psdir='${docdir}' +libdir='${exec_prefix}/lib' +localedir='${datarootdir}/locale' +mandir='${datarootdir}/man' ac_prev= +ac_dashdash= for ac_option do - # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then - eval "$ac_prev=\$ac_option" + eval $ac_prev=\$ac_option ac_prev= continue fi - case "$ac_option" in - -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;; - *) ac_optarg= ;; + case $ac_option in + *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; + *=) ac_optarg= ;; + *) ac_optarg=yes ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. - case "$ac_option" in + case $ac_dashdash$ac_option in + --) + ac_dashdash=yes ;; -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) - bindir="$ac_optarg" ;; + bindir=$ac_optarg ;; -build | --build | --buil | --bui | --bu) - ac_prev=build ;; + ac_prev=build_alias ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) - build="$ac_optarg" ;; + build_alias=$ac_optarg ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) - cache_file="$ac_optarg" ;; + cache_file=$ac_optarg ;; + + --config-cache | -C) + cache_file=config.cache ;; - -datadir | --datadir | --datadi | --datad | --data | --dat | --da) + -datadir | --datadir | --datadi | --datad) ac_prev=datadir ;; - -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ - | --da=*) - datadir="$ac_optarg" ;; + -datadir=* | --datadir=* | --datadi=* | --datad=*) + datadir=$ac_optarg ;; + + -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ + | --dataroo | --dataro | --datar) + ac_prev=datarootdir ;; + -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ + | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) + datarootdir=$ac_optarg ;; -disable-* | --disable-*) - ac_feature=`echo $ac_option|sed -e 's/-*disable-//'` + ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. - if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then - { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } - fi - ac_feature=`echo $ac_feature| sed 's/-/_/g'` - eval "enable_${ac_feature}=no" ;; + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error $? "invalid feature name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"enable_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval enable_$ac_useropt=no ;; + + -docdir | --docdir | --docdi | --doc | --do) + ac_prev=docdir ;; + -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) + docdir=$ac_optarg ;; + + -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) + ac_prev=dvidir ;; + -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) + dvidir=$ac_optarg ;; -enable-* | --enable-*) - ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'` + ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. - if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then - { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } - fi - ac_feature=`echo $ac_feature| sed 's/-/_/g'` - case "$ac_option" in - *=*) ;; - *) ac_optarg=yes ;; + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error $? "invalid feature name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"enable_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" + ac_unrecognized_sep=', ';; esac - eval "enable_${ac_feature}='$ac_optarg'" ;; + eval enable_$ac_useropt=\$ac_optarg ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ @@ -125,116 +769,77 @@ do -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) - exec_prefix="$ac_optarg" ;; + exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; - -help | --help | --hel | --he) - # Omit some internal or obsolete options to make the list less imposing. - # This message is too long to be a string in the A/UX 3.1 sh. - cat << EOF -Usage: configure [options] [host] -Options: [defaults in brackets after descriptions] -Configuration: - --cache-file=FILE cache test results in FILE - --help print this message - --no-create do not create output files - --quiet, --silent do not print \`checking...' messages - --version print the version of autoconf that created configure -Directory and file names: - --prefix=PREFIX install architecture-independent files in PREFIX - [$ac_default_prefix] - --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX - [same as prefix] - --bindir=DIR user executables in DIR [EPREFIX/bin] - --sbindir=DIR system admin executables in DIR [EPREFIX/sbin] - --libexecdir=DIR program executables in DIR [EPREFIX/libexec] - --datadir=DIR read-only architecture-independent data in DIR - [PREFIX/share] - --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc] - --sharedstatedir=DIR modifiable architecture-independent data in DIR - [PREFIX/com] - --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var] - --libdir=DIR object code libraries in DIR [EPREFIX/lib] - --includedir=DIR C header files in DIR [PREFIX/include] - --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include] - --infodir=DIR info documentation in DIR [PREFIX/info] - --mandir=DIR man documentation in DIR [PREFIX/man] - --srcdir=DIR find the sources in DIR [configure dir or ..] - --program-prefix=PREFIX prepend PREFIX to installed program names - --program-suffix=SUFFIX append SUFFIX to installed program names - --program-transform-name=PROGRAM - run sed PROGRAM on installed program names -EOF - cat << EOF -Host type: - --build=BUILD configure for building on BUILD [BUILD=HOST] - --host=HOST configure for HOST [guessed] - --target=TARGET configure for TARGET [TARGET=HOST] -Features and packages: - --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) - --enable-FEATURE[=ARG] include FEATURE [ARG=yes] - --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] - --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) - --x-includes=DIR X include files are in DIR - --x-libraries=DIR X library files are in DIR -EOF - if test -n "$ac_help"; then - echo "--enable and --with options recognized:$ac_help" - fi - exit 0 ;; + -help | --help | --hel | --he | -h) + ac_init_help=long ;; + -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) + ac_init_help=recursive ;; + -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) + ac_init_help=short ;; -host | --host | --hos | --ho) - ac_prev=host ;; + ac_prev=host_alias ;; -host=* | --host=* | --hos=* | --ho=*) - host="$ac_optarg" ;; + host_alias=$ac_optarg ;; + + -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) + ac_prev=htmldir ;; + -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ + | --ht=*) + htmldir=$ac_optarg ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) - includedir="$ac_optarg" ;; + includedir=$ac_optarg ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) - infodir="$ac_optarg" ;; + infodir=$ac_optarg ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) - libdir="$ac_optarg" ;; + libdir=$ac_optarg ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) - libexecdir="$ac_optarg" ;; + libexecdir=$ac_optarg ;; + + -localedir | --localedir | --localedi | --localed | --locale) + ac_prev=localedir ;; + -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) + localedir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ - | --localstate | --localstat | --localsta | --localst \ - | --locals | --local | --loca | --loc | --lo) + | --localstate | --localstat | --localsta | --localst | --locals) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ - | --localstate=* | --localstat=* | --localsta=* | --localst=* \ - | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) - localstatedir="$ac_optarg" ;; + | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) + localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) - mandir="$ac_optarg" ;; + mandir=$ac_optarg ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ - | --no-cr | --no-c) + | --no-cr | --no-c | -n) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ @@ -248,26 +853,26 @@ EOF -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) - oldincludedir="$ac_optarg" ;; + oldincludedir=$ac_optarg ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) - prefix="$ac_optarg" ;; + prefix=$ac_optarg ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) - program_prefix="$ac_optarg" ;; + program_prefix=$ac_optarg ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) - program_suffix="$ac_optarg" ;; + program_suffix=$ac_optarg ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ @@ -284,7 +889,17 @@ EOF | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) - program_transform_name="$ac_optarg" ;; + program_transform_name=$ac_optarg ;; + + -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) + ac_prev=pdfdir ;; + -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) + pdfdir=$ac_optarg ;; + + -psdir | --psdir | --psdi | --psd | --ps) + ac_prev=psdir ;; + -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) + psdir=$ac_optarg ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) @@ -294,7 +909,7 @@ EOF ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) - sbindir="$ac_optarg" ;; + sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ @@ -305,58 +920,67 @@ EOF | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) - sharedstatedir="$ac_optarg" ;; + sharedstatedir=$ac_optarg ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) - site="$ac_optarg" ;; + site=$ac_optarg ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) - srcdir="$ac_optarg" ;; + srcdir=$ac_optarg ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) - sysconfdir="$ac_optarg" ;; + sysconfdir=$ac_optarg ;; -target | --target | --targe | --targ | --tar | --ta | --t) - ac_prev=target ;; + ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) - target="$ac_optarg" ;; + target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; - -version | --version | --versio | --versi | --vers) - echo "configure generated by autoconf version 2.13" - exit 0 ;; + -version | --version | --versio | --versi | --vers | -V) + ac_init_version=: ;; -with-* | --with-*) - ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'` + ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. - if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then - { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } - fi - ac_package=`echo $ac_package| sed 's/-/_/g'` - case "$ac_option" in - *=*) ;; - *) ac_optarg=yes ;; + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error $? "invalid package name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"with_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" + ac_unrecognized_sep=', ';; esac - eval "with_${ac_package}='$ac_optarg'" ;; + eval with_$ac_useropt=\$ac_optarg ;; -without-* | --without-*) - ac_package=`echo $ac_option|sed -e 's/-*without-//'` + ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. - if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then - { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } - fi - ac_package=`echo $ac_package| sed 's/-/_/g'` - eval "with_${ac_package}=no" ;; + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error $? "invalid package name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"with_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval with_$ac_useropt=no ;; --x) # Obsolete; use --with-x. @@ -367,272 +991,682 @@ EOF ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) - x_includes="$ac_optarg" ;; + x_includes=$ac_optarg ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) - x_libraries="$ac_optarg" ;; + x_libraries=$ac_optarg ;; - -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; } + -*) as_fn_error $? "unrecognized option: \`$ac_option' +Try \`$0 --help' for more information" ;; + *=*) + ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` + # Reject names that are not valid shell variable names. + case $ac_envvar in #( + '' | [0-9]* | *[!_$as_cr_alnum]* ) + as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; + esac + eval $ac_envvar=\$ac_optarg + export $ac_envvar ;; + *) - if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then - echo "configure: warning: $ac_option: invalid host type" 1>&2 - fi - if test "x$nonopt" != xNONE; then - { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } - fi - nonopt="$ac_option" + # FIXME: should be removed in autoconf 3.0. + $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 + expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && + $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 + : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" ;; esac done if test -n "$ac_prev"; then - { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; } + ac_option=--`echo $ac_prev | sed 's/_/-/g'` + as_fn_error $? "missing argument to $ac_option" fi -trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 - -# File descriptor usage: -# 0 standard input -# 1 file creation -# 2 errors and warnings -# 3 some systems may open it to /dev/tty -# 4 used on the Kubota Titan -# 6 checking for... messages and results -# 5 compiler messages saved in config.log -if test "$silent" = yes; then - exec 6>/dev/null -else - exec 6>&1 +if test -n "$ac_unrecognized_opts"; then + case $enable_option_checking in + no) ;; + fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; + *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; + esac fi -exec 5>./config.log -echo "\ -This file contains any messages produced by compilers while -running configure, to aid debugging if configure makes a mistake. -" 1>&5 - -# Strip out --no-create and --no-recursion so they do not pile up. -# Also quote any args containing shell metacharacters. -ac_configure_args= -for ac_arg +# Check all directory arguments for consistency. +for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ + datadir sysconfdir sharedstatedir localstatedir includedir \ + oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ + libdir localedir mandir do - case "$ac_arg" in - -no-create | --no-create | --no-creat | --no-crea | --no-cre \ - | --no-cr | --no-c) ;; - -no-recursion | --no-recursion | --no-recursio | --no-recursi \ - | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;; - *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*) - ac_configure_args="$ac_configure_args '$ac_arg'" ;; - *) ac_configure_args="$ac_configure_args $ac_arg" ;; + eval ac_val=\$$ac_var + # Remove trailing slashes. + case $ac_val in + */ ) + ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` + eval $ac_var=\$ac_val;; esac + # Be sure to have absolute directory names. + case $ac_val in + [\\/$]* | ?:[\\/]* ) continue;; + NONE | '' ) case $ac_var in *prefix ) continue;; esac;; + esac + as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" done -# NLS nuisances. -# Only set these to C if already set. These must not be set unconditionally -# because not all systems understand e.g. LANG=C (notably SCO). -# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'! -# Non-C LC_CTYPE values break the ctype check. -if test "${LANG+set}" = set; then LANG=C; export LANG; fi -if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi -if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi -if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi +# There might be people who depend on the old broken behavior: `$host' +# used to hold the argument of --host etc. +# FIXME: To remove some day. +build=$build_alias +host=$host_alias +target=$target_alias + +# FIXME: To remove some day. +if test "x$host_alias" != x; then + if test "x$build_alias" = x; then + cross_compiling=maybe + $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host. + If a cross compiler is detected then cross compile mode will be used" >&2 + elif test "x$build_alias" != "x$host_alias"; then + cross_compiling=yes + fi +fi + +ac_tool_prefix= +test -n "$host_alias" && ac_tool_prefix=$host_alias- + +test "$silent" = yes && exec 6>/dev/null -# confdefs.h avoids OS command line length limits that DEFS can exceed. -rm -rf conftest* confdefs.h -# AIX cpp loses on an empty file, so make sure it contains at least a newline. -echo > confdefs.h -# A filename unique to this package, relative to the directory that -# configure is in, which we can look for to find out if srcdir is correct. -ac_unique_file=ChangeLog +ac_pwd=`pwd` && test -n "$ac_pwd" && +ac_ls_di=`ls -di .` && +ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || + as_fn_error $? "working directory cannot be determined" +test "X$ac_ls_di" = "X$ac_pwd_ls_di" || + as_fn_error $? "pwd does not report name of working directory" + # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes - # Try the directory containing this script, then its parent. - ac_prog=$0 - ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'` - test "x$ac_confdir" = "x$ac_prog" && ac_confdir=. + # Try the directory containing this script, then the parent directory. + ac_confdir=`$as_dirname -- "$as_myself" || +$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_myself" : 'X\(//\)[^/]' \| \ + X"$as_myself" : 'X\(//\)$' \| \ + X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_myself" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` srcdir=$ac_confdir - if test ! -r $srcdir/$ac_unique_file; then + if test ! -r "$srcdir/$ac_unique_file"; then srcdir=.. fi else ac_srcdir_defaulted=no fi -if test ! -r $srcdir/$ac_unique_file; then - if test "$ac_srcdir_defaulted" = yes; then - { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; } - else - { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; } - fi +if test ! -r "$srcdir/$ac_unique_file"; then + test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." + as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" fi -srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'` - -# Prefer explicitly selected file to automatically selected ones. -if test -z "$CONFIG_SITE"; then - if test "x$prefix" != xNONE; then - CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" - else - CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" - fi +ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" +ac_abs_confdir=`( + cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" + pwd)` +# When building in place, set srcdir=. +if test "$ac_abs_confdir" = "$ac_pwd"; then + srcdir=. fi -for ac_site_file in $CONFIG_SITE; do - if test -r "$ac_site_file"; then - echo "loading site script $ac_site_file" - . "$ac_site_file" - fi +# Remove unnecessary trailing slashes from srcdir. +# Double slashes in file names in object file debugging info +# mess up M-x gdb in Emacs. +case $srcdir in +*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; +esac +for ac_var in $ac_precious_vars; do + eval ac_env_${ac_var}_set=\${${ac_var}+set} + eval ac_env_${ac_var}_value=\$${ac_var} + eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} + eval ac_cv_env_${ac_var}_value=\$${ac_var} done -if test -r "$cache_file"; then - echo "loading cache $cache_file" - . $cache_file -else - echo "creating cache $cache_file" - > $cache_file -fi +# +# Report the --help message. +# +if test "$ac_init_help" = "long"; then + # Omit some internal or obsolete options to make the list less imposing. + # This message is too long to be a string in the A/UX 3.1 sh. + cat <<_ACEOF +\`configure' configures this package to adapt to many kinds of systems. -ac_ext=c -# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. -ac_cpp='$CPP $CPPFLAGS' -ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$ac_cv_prog_cc_cross - -ac_exeext= -ac_objext=o -if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then - # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. - if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then - ac_n= ac_c=' -' ac_t=' ' - else - ac_n=-n ac_c= ac_t= - fi -else - ac_n= ac_c='\c' ac_t= +Usage: $0 [OPTION]... [VAR=VALUE]... + +To assign environment variables (e.g., CC, CFLAGS...), specify them as +VAR=VALUE. See below for descriptions of some of the useful variables. + +Defaults for the options are specified in brackets. + +Configuration: + -h, --help display this help and exit + --help=short display options specific to this package + --help=recursive display the short help of all the included packages + -V, --version display version information and exit + -q, --quiet, --silent do not print \`checking ...' messages + --cache-file=FILE cache test results in FILE [disabled] + -C, --config-cache alias for \`--cache-file=config.cache' + -n, --no-create do not create output files + --srcdir=DIR find the sources in DIR [configure dir or \`..'] + +Installation directories: + --prefix=PREFIX install architecture-independent files in PREFIX + [$ac_default_prefix] + --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX + [PREFIX] + +By default, \`make install' will install all the files in +\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify +an installation prefix other than \`$ac_default_prefix' using \`--prefix', +for instance \`--prefix=\$HOME'. + +For better control, use the options below. + +Fine tuning of the installation directories: + --bindir=DIR user executables [EPREFIX/bin] + --sbindir=DIR system admin executables [EPREFIX/sbin] + --libexecdir=DIR program executables [EPREFIX/libexec] + --sysconfdir=DIR read-only single-machine data [PREFIX/etc] + --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] + --localstatedir=DIR modifiable single-machine data [PREFIX/var] + --libdir=DIR object code libraries [EPREFIX/lib] + --includedir=DIR C header files [PREFIX/include] + --oldincludedir=DIR C header files for non-gcc [/usr/include] + --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] + --datadir=DIR read-only architecture-independent data [DATAROOTDIR] + --infodir=DIR info documentation [DATAROOTDIR/info] + --localedir=DIR locale-dependent data [DATAROOTDIR/locale] + --mandir=DIR man documentation [DATAROOTDIR/man] + --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE] + --htmldir=DIR html documentation [DOCDIR] + --dvidir=DIR dvi documentation [DOCDIR] + --pdfdir=DIR pdf documentation [DOCDIR] + --psdir=DIR ps documentation [DOCDIR] +_ACEOF + + cat <<\_ACEOF +_ACEOF fi +if test -n "$ac_init_help"; then + cat <<\_ACEOF -ac_aux_dir= -for ac_dir in config $srcdir/config; do - if test -f $ac_dir/install-sh; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/install-sh -c" - break - elif test -f $ac_dir/install.sh; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/install.sh -c" - break - fi -done -if test -z "$ac_aux_dir"; then - { echo "configure: error: can not find install-sh or install.sh in config $srcdir/config" 1>&2; exit 1; } +Optional Packages: + --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] + --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) + --with-tclsh=FILE location of a working tclsh executable + +Report bugs to the package provider. +_ACEOF +ac_status=$? fi -ac_config_guess=$ac_aux_dir/config.guess -ac_config_sub=$ac_aux_dir/config.sub -ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. -CONFIGDIR=${srcdir}/config +if test "$ac_init_help" = "recursive"; then + # If there are subdirs, report their specific --help. + for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue + test -d "$ac_dir" || + { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || + continue + ac_builddir=. + +case "$ac_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) + ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` + case $ac_top_builddir_sub in + "") ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; + esac ;; +esac +ac_abs_top_builddir=$ac_pwd +ac_abs_builddir=$ac_pwd$ac_dir_suffix +# for backward compatibility: +ac_top_builddir=$ac_top_build_prefix + +case $srcdir in + .) # We are building in place. + ac_srcdir=. + ac_top_srcdir=$ac_top_builddir_sub + ac_abs_top_srcdir=$ac_pwd ;; + [\\/]* | ?:[\\/]* ) # Absolute name. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir + ac_abs_top_srcdir=$srcdir ;; + *) # Relative name. + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_build_prefix$srcdir + ac_abs_top_srcdir=$ac_pwd/$srcdir ;; +esac +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix + + cd "$ac_dir" || { ac_status=$?; continue; } + # Check for guested configure. + if test -f "$ac_srcdir/configure.gnu"; then + echo && + $SHELL "$ac_srcdir/configure.gnu" --help=recursive + elif test -f "$ac_srcdir/configure"; then + echo && + $SHELL "$ac_srcdir/configure" --help=recursive + else + $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 + fi || ac_status=$? + cd "$ac_pwd" || { ac_status=$?; break; } + done +fi +test -n "$ac_init_help" && exit $ac_status +if $ac_init_version; then + cat <<\_ACEOF +configure +generated by GNU Autoconf 2.68 + +Copyright (C) 2010 Free Software Foundation, Inc. +This configure script is free software; the Free Software Foundation +gives unlimited permission to copy, distribute and modify it. +_ACEOF + exit +fi -PACKAGE=tklib +## ------------------------ ## +## Autoconf initialization. ## +## ------------------------ ## +cat >config.log <<_ACEOF +This file contains any messages produced by compilers while +running configure, to aid debugging if configure makes a mistake. -MAJOR_VERSION=0 -MINOR_VERSION=1 -PATCHLEVEL="" +It was created by $as_me, which was +generated by GNU Autoconf 2.68. Invocation command line was -VERSION=${MAJOR_VERSION}.${MINOR_VERSION}${PATCHLEVEL} -NODOT_VERSION=${MAJOR_VERSION}${MINOR_VERSION} + $ $0 $@ +_ACEOF +exec 5>>config.log +{ +cat <<_ASUNAME +## --------- ## +## Platform. ## +## --------- ## +hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` +uname -m = `(uname -m) 2>/dev/null || echo unknown` +uname -r = `(uname -r) 2>/dev/null || echo unknown` +uname -s = `(uname -s) 2>/dev/null || echo unknown` +uname -v = `(uname -v) 2>/dev/null || echo unknown` +/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` +/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` -case "`uname -s`" in - *win32* | *WIN32* | *CYGWIN_NT* | *CYGWIN_98* | *CYGWIN_95*) - CYGPATH="cygpath -w" - ;; - *) - CYGPATH=echo - ;; -esac +/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` +/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` +/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` +/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` +/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` +/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` +/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` +_ASUNAME -# Find a good install program. We prefer a C program (faster), -# so one script is as good as another. But avoid the broken or -# incompatible versions: -# SysV /etc/install, /usr/sbin/install -# SunOS /usr/etc/install -# IRIX /sbin/install -# AIX /bin/install -# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag -# AFS /usr/afsws/bin/install, which mishandles nonexistent args -# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" -# ./install, which can be erroneously created by make from ./install.sh. -echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 -echo "configure:582: checking for a BSD compatible install" >&5 -if test -z "$INSTALL"; then -if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":" - for ac_dir in $PATH; do - # Account for people who put trailing slashes in PATH elements. - case "$ac_dir/" in - /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;; - *) - # OSF1 and SCO ODT 3.0 have their own names for install. - # Don't use installbsd from OSF since it installs stuff as root - # by default. - for ac_prog in ginstall scoinst install; do - if test -f $ac_dir/$ac_prog; then - if test $ac_prog = install && - grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then - # AIX install. It has an incompatible calling convention. - : - else - ac_cv_path_install="$ac_dir/$ac_prog -c" - break 2 - fi - fi - done +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + $as_echo "PATH: $as_dir" + done +IFS=$as_save_IFS + +} >&5 + +cat >&5 <<_ACEOF + + +## ----------- ## +## Core tests. ## +## ----------- ## + +_ACEOF + + +# Keep a trace of the command line. +# Strip out --no-create and --no-recursion so they do not pile up. +# Strip out --silent because we don't want to record it for future runs. +# Also quote any args containing shell meta-characters. +# Make two passes to allow for proper duplicate-argument suppression. +ac_configure_args= +ac_configure_args0= +ac_configure_args1= +ac_must_keep_next=false +for ac_pass in 1 2 +do + for ac_arg + do + case $ac_arg in + -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil) + continue ;; + *\'*) + ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + case $ac_pass in + 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; + 2) + as_fn_append ac_configure_args1 " '$ac_arg'" + if test $ac_must_keep_next = true; then + ac_must_keep_next=false # Got value, back to normal. + else + case $ac_arg in + *=* | --config-cache | -C | -disable-* | --disable-* \ + | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ + | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ + | -with-* | --with-* | -without-* | --without-* | --x) + case "$ac_configure_args0 " in + "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; + esac + ;; + -* ) ac_must_keep_next=true ;; + esac + fi + as_fn_append ac_configure_args " '$ac_arg'" ;; esac done - IFS="$ac_save_IFS" +done +{ ac_configure_args0=; unset ac_configure_args0;} +{ ac_configure_args1=; unset ac_configure_args1;} + +# When interrupted or exit'd, cleanup temporary files, and complete +# config.log. We remove comments because anyway the quotes in there +# would cause problems or look ugly. +# WARNING: Use '\'' to represent an apostrophe within the trap. +# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. +trap 'exit_status=$? + # Save into config.log some information that might help in debugging. + { + echo + + $as_echo "## ---------------- ## +## Cache variables. ## +## ---------------- ##" + echo + # The following way of writing the cache mishandles newlines in values, +( + for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do + eval ac_val=\$$ac_var + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( + *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 +$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( + *) { eval $ac_var=; unset $ac_var;} ;; + esac ;; + esac + done + (set) 2>&1 | + case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( + *${as_nl}ac_space=\ *) + sed -n \ + "s/'\''/'\''\\\\'\'''\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" + ;; #( + *) + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" + ;; + esac | + sort +) + echo + + $as_echo "## ----------------- ## +## Output variables. ## +## ----------------- ##" + echo + for ac_var in $ac_subst_vars + do + eval ac_val=\$$ac_var + case $ac_val in + *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + esac + $as_echo "$ac_var='\''$ac_val'\''" + done | sort + echo + + if test -n "$ac_subst_files"; then + $as_echo "## ------------------- ## +## File substitutions. ## +## ------------------- ##" + echo + for ac_var in $ac_subst_files + do + eval ac_val=\$$ac_var + case $ac_val in + *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + esac + $as_echo "$ac_var='\''$ac_val'\''" + done | sort + echo + fi + + if test -s confdefs.h; then + $as_echo "## ----------- ## +## confdefs.h. ## +## ----------- ##" + echo + cat confdefs.h + echo + fi + test "$ac_signal" != 0 && + $as_echo "$as_me: caught signal $ac_signal" + $as_echo "$as_me: exit $exit_status" + } >&5 + rm -f core *.core core.conftest.* && + rm -f -r conftest* confdefs* conf$$* $ac_clean_files && + exit $exit_status +' 0 +for ac_signal in 1 2 13 15; do + trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal +done +ac_signal=0 + +# confdefs.h avoids OS command line length limits that DEFS can exceed. +rm -f -r conftest* confdefs.h + +$as_echo "/* confdefs.h */" > confdefs.h + +# Predefined preprocessor variables. + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_NAME "$PACKAGE_NAME" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_TARNAME "$PACKAGE_TARNAME" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_VERSION "$PACKAGE_VERSION" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_STRING "$PACKAGE_STRING" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" +_ACEOF +cat >>confdefs.h <<_ACEOF +#define PACKAGE_URL "$PACKAGE_URL" +_ACEOF + + +# Let the site file select an alternate cache file if it wants to. +# Prefer an explicitly selected file to automatically selected ones. +ac_site_file1=NONE +ac_site_file2=NONE +if test -n "$CONFIG_SITE"; then + # We do not want a PATH search for config.site. + case $CONFIG_SITE in #(( + -*) ac_site_file1=./$CONFIG_SITE;; + */*) ac_site_file1=$CONFIG_SITE;; + *) ac_site_file1=./$CONFIG_SITE;; + esac +elif test "x$prefix" != xNONE; then + ac_site_file1=$prefix/share/config.site + ac_site_file2=$prefix/etc/config.site +else + ac_site_file1=$ac_default_prefix/share/config.site + ac_site_file2=$ac_default_prefix/etc/config.site fi - if test "${ac_cv_path_install+set}" = set; then - INSTALL="$ac_cv_path_install" - else - # As a last resort, use the slow shell script. We don't cache a - # path for INSTALL within a source directory, because that will - # break other packages using the cache if that directory is - # removed, or if the path is relative. - INSTALL="$ac_install_sh" +for ac_site_file in "$ac_site_file1" "$ac_site_file2" +do + test "x$ac_site_file" = xNONE && continue + if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 +$as_echo "$as_me: loading site script $ac_site_file" >&6;} + sed 's/^/| /' "$ac_site_file" >&5 + . "$ac_site_file" \ + || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "failed to load site script $ac_site_file +See \`config.log' for more details" "$LINENO" 5; } + fi +done + +if test -r "$cache_file"; then + # Some versions of bash will fail to source /dev/null (special files + # actually), so we avoid doing that. DJGPP emulates it as a regular file. + if test /dev/null != "$cache_file" && test -f "$cache_file"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 +$as_echo "$as_me: loading cache $cache_file" >&6;} + case $cache_file in + [\\/]* | ?:[\\/]* ) . "$cache_file";; + *) . "./$cache_file";; + esac + fi +else + { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 +$as_echo "$as_me: creating cache $cache_file" >&6;} + >$cache_file +fi + +# Check that the precious variables saved in the cache have kept the same +# value. +ac_cache_corrupted=false +for ac_var in $ac_precious_vars; do + eval ac_old_set=\$ac_cv_env_${ac_var}_set + eval ac_new_set=\$ac_env_${ac_var}_set + eval ac_old_val=\$ac_cv_env_${ac_var}_value + eval ac_new_val=\$ac_env_${ac_var}_value + case $ac_old_set,$ac_new_set in + set,) + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 +$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,set) + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 +$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,);; + *) + if test "x$ac_old_val" != "x$ac_new_val"; then + # differences in whitespace do not lead to failure. + ac_old_val_w=`echo x $ac_old_val` + ac_new_val_w=`echo x $ac_new_val` + if test "$ac_old_val_w" != "$ac_new_val_w"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 +$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} + ac_cache_corrupted=: + else + { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 +$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} + eval $ac_var=\$ac_old_val + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 +$as_echo "$as_me: former value: \`$ac_old_val'" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 +$as_echo "$as_me: current value: \`$ac_new_val'" >&2;} + fi;; + esac + # Pass precious variables to config.status. + if test "$ac_new_set" = set; then + case $ac_new_val in + *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; + *) ac_arg=$ac_var=$ac_new_val ;; + esac + case " $ac_configure_args " in + *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. + *) as_fn_append ac_configure_args " '$ac_arg'" ;; + esac fi +done +if $ac_cache_corrupted; then + { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 +$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} + as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 fi -echo "$ac_t""$INSTALL" 1>&6 +## -------------------- ## +## Main body of script. ## +## -------------------- ## + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + -# Use test -z because SunOS4 sh mishandles braces in ${var-val}. -# It thinks the first close brace ends the variable substitution. -test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' -test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' +case "`uname -s`" in + *win32* | *WIN32* | *CYGWIN_NT* | *CYGWIN_98* | *CYGWIN_95*) + CYGPATH="cygpath -w" + ;; + *) + CYGPATH=echo + ;; +esac -test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' - echo $ac_n "checking executable extension based on host type""... $ac_c" 1>&6 -echo "configure:636: checking executable extension based on host type" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking executable extension based on host type" >&5 +$as_echo_n "checking executable extension based on host type... " >&6; } case "`uname -s`" in *win32* | *WIN32* | *CYGWIN_NT* |*CYGWIN_98*|*CYGWIN_95*) @@ -643,17 +1677,40 @@ echo "configure:636: checking executable extension based on host type" >&5 ;; esac - echo "$ac_t""${EXEEXT}" 1>&6 - + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${EXEEXT}" >&5 +$as_echo "${EXEEXT}" >&6; } + + + + +# Check whether --with-tclsh was given. +if test "${with_tclsh+set}" = set; then : + withval=$with_tclsh; with_tclsh=${withval} +fi + + +# allow user to override the tclsh we think we found +if test x"${with_tclsh}" != x ; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tclsh" >&5 +$as_echo_n "checking for tclsh... " >&6; } + if "${with_tclsh}" < /dev/null > /dev/null 2> /dev/null + then + TCLSH_PROG=${with_tclsh} + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TCLSH_PROG, via --with-tclsh" >&5 +$as_echo "$TCLSH_PROG, via --with-tclsh" >&6; } + else + as_fn_error $? "Bad --with-tclsh ${with_tclsh}, not found or not executable" "$LINENO" 5 + fi +else - echo $ac_n "checking for tclsh""... $ac_c" 1>&6 -echo "configure:652: checking for tclsh" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tclsh" >&5 +$as_echo_n "checking for tclsh... " >&6; } - if eval "test \"`echo '$''{'ac_cv_path_tclsh'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 + if ${ac_cv_path_tclsh+:} false; then : + $as_echo_n "(cached) " >&6 else - + search_path=`echo ${exec_prefix}/bin:${prefix}/bin:${TCL_BIN_DIR}:${TCL_BIN_DIR}/../bin:${PATH} | sed -e 's/:/ /g'` for dir in $search_path ; do for j in `ls -r $dir/tclsh[8-9]*${EXEEXT} 2> /dev/null` \ @@ -666,315 +1723,1202 @@ else fi done done - + fi if test -f "$ac_cv_path_tclsh" ; then TCLSH_PROG=$ac_cv_path_tclsh - echo "$ac_t""$TCLSH_PROG" 1>&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TCLSH_PROG" >&5 +$as_echo "$TCLSH_PROG" >&6; } else - { echo "configure: error: No tclsh found in PATH: $search_path" 1>&2; exit 1; } + as_fn_error $? "No tclsh found in PATH: $search_path" "$LINENO" 5 fi - - - echo $ac_n "checking for wish""... $ac_c" 1>&6 -echo "configure:684: checking for wish" >&5 - if eval "test \"`echo '$''{'ac_cv_path_wish'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - - search_path=`echo ${exec_prefix}/bin:${prefix}/bin:${TCL_BIN_DIR}:${TCL_BIN_DIR}/../bin:${PATH} | sed -e 's/:/ /g'` - for dir in $search_path ; do - for j in `ls -r $dir/wish[8-9]*${EXEEXT} 2> /dev/null` \ - `ls -r $dir/wish*${EXEEXT} 2> /dev/null` ; do - if test x"$ac_cv_path_wish" = x ; then - if test -f "$j" ; then - ac_cv_path_wish=$j - break - fi - fi - done - done - fi +# ### ######### ########################### + +PACKAGE=`$TCLSH_PROG ${srcdir}/sak.tcl name` +MAJOR_VERSION=`$TCLSH_PROG ${srcdir}/sak.tcl major` +MINOR_VERSION=`$TCLSH_PROG ${srcdir}/sak.tcl minor` +PATCHLEVEL="" + +VERSION=${MAJOR_VERSION}.${MINOR_VERSION}${PATCHLEVEL} +NODOT_VERSION=${MAJOR_VERSION}${MINOR_VERSION} + - if test -f "$ac_cv_path_wish" ; then - WISH_PROG=$ac_cv_path_wish - echo "$ac_t""$WISH_PROG" 1>&6 - else - { echo "configure: error: No wish found in PATH: $search_path" 1>&2; exit 1; } - fi - -trap '' 1 2 15 -cat > confcache <<\EOF +# ### ######### ########################### + +ac_config_files="$ac_config_files Makefile" + +cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure -# scripts and configure runs. It is not useful on other systems. -# If it contains results you don't want to keep, you may remove or edit it. +# scripts and configure runs, see configure's option --config-cache. +# It is not useful on other systems. If it contains results you don't +# want to keep, you may remove or edit it. # -# By default, configure uses ./config.cache as the cache file, -# creating it if it does not exist already. You can give configure -# the --cache-file=FILE option to use a different cache file; that is -# what configure does when it calls configure scripts in -# subdirectories, so they share the cache. -# Giving --cache-file=/dev/null disables caching, for debugging configure. -# config.status only pays attention to the cache file if you give it the -# --recheck option to rerun configure. +# config.status only pays attention to the cache file if you give it +# the --recheck option to rerun configure. # -EOF +# `ac_cv_env_foo' variables (set or unset) will be overridden when +# loading this file, other *unset* `ac_cv_foo' will be assigned the +# following values. + +_ACEOF + # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. -# So, don't put newlines in cache variables' values. +# So, we kill variables containing newlines. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. -(set) 2>&1 | - case `(ac_space=' '; set | grep ac_space) 2>&1` in - *ac_space=\ *) - # `set' does not quote correctly, so add quotes (double-quote substitution - # turns \\\\ into \\, and sed turns \\ into \). - sed -n \ - -e "s/'/'\\\\''/g" \ - -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p" - ;; - *) - # `set' quotes correctly as required by POSIX, so do not add quotes. - sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p' - ;; - esac >> confcache -if cmp -s $cache_file confcache; then - : -else - if test -w $cache_file; then - echo "updating cache $cache_file" - cat confcache > $cache_file +( + for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do + eval ac_val=\$$ac_var + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( + *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 +$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( + *) { eval $ac_var=; unset $ac_var;} ;; + esac ;; + esac + done + + (set) 2>&1 | + case $as_nl`(ac_space=' '; set) 2>&1` in #( + *${as_nl}ac_space=\ *) + # `set' does not quote correctly, so add quotes: double-quote + # substitution turns \\\\ into \\, and sed turns \\ into \. + sed -n \ + "s/'/'\\\\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" + ;; #( + *) + # `set' quotes correctly as required by POSIX, so do not add quotes. + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" + ;; + esac | + sort +) | + sed ' + /^ac_cv_env_/b end + t clear + :clear + s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ + t end + s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ + :end' >>confcache +if diff "$cache_file" confcache >/dev/null 2>&1; then :; else + if test -w "$cache_file"; then + if test "x$cache_file" != "x/dev/null"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 +$as_echo "$as_me: updating cache $cache_file" >&6;} + if test ! -f "$cache_file" || test -h "$cache_file"; then + cat confcache >"$cache_file" + else + case $cache_file in #( + */* | ?:*) + mv -f confcache "$cache_file"$$ && + mv -f "$cache_file"$$ "$cache_file" ;; #( + *) + mv -f confcache "$cache_file" ;; + esac + fi + fi else - echo "not updating unwritable cache $cache_file" + { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 +$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache -trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 - test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' -# Any assignment to VPATH causes Sun make to only execute -# the first set of double-colon rules, so remove it if not needed. -# If there is a colon in the path, we need to keep it. -if test "x$srcdir" = x.; then - ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d' -fi - -trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15 - # Transform confdefs.h into DEFS. # Protect against shell expansion while executing Makefile rules. # Protect against Makefile macro expansion. -cat > conftest.defs <<\EOF -s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g -s%[ `~#$^&*(){}\\|;'"<>?]%\\&%g -s%\[%\\&%g -s%\]%\\&%g -s%\$%$$%g -EOF -DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '` -rm -f conftest.defs - - -# Without the "./", some shells look in PATH for config.status. -: ${CONFIG_STATUS=./config.status} - -echo creating $CONFIG_STATUS -rm -f $CONFIG_STATUS -cat > $CONFIG_STATUS </dev/null | sed 1q`: -# -# $0 $ac_configure_args # +# If the first sed substitution is executed (which looks for macros that +# take arguments), then branch to the quote section. Otherwise, +# look for a macro that doesn't take arguments. +ac_script=' +:mline +/\\$/{ + N + s,\\\n,, + b mline +} +t clear +:clear +s/^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\)/-D\1=\2/g +t quote +s/^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)/-D\1=\2/g +t quote +b any +:quote +s/[ `~#$^&*(){}\\|;'\''"<>?]/\\&/g +s/\[/\\&/g +s/\]/\\&/g +s/\$/$$/g +H +:any +${ + g + s/^\n// + s/\n/ /g + p +} +' +DEFS=`sed -n "$ac_script" confdefs.h` + + +ac_libobjs= +ac_ltlibobjs= +U= +for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue + # 1. Remove the extension, and $U if already installed. + ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' + ac_i=`$as_echo "$ac_i" | sed "$ac_script"` + # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR + # will be set to the directory where LIBOBJS objects are built. + as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" + as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' +done +LIBOBJS=$ac_libobjs + +LTLIBOBJS=$ac_ltlibobjs + + + +: "${CONFIG_STATUS=./config.status}" +ac_write_fail=0 +ac_clean_files_save=$ac_clean_files +ac_clean_files="$ac_clean_files $CONFIG_STATUS" +{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 +$as_echo "$as_me: creating $CONFIG_STATUS" >&6;} +as_write_fail=0 +cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 +#! $SHELL +# Generated by $as_me. +# Run this file to recreate the current configuration. # Compiler output produced by configure, useful for debugging -# configure, is in ./config.log if it exists. +# configure, is in config.log if it exists. + +debug=false +ac_cs_recheck=false +ac_cs_silent=false + +SHELL=\${CONFIG_SHELL-$SHELL} +export SHELL +_ASEOF +cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 +## -------------------- ## +## M4sh Initialization. ## +## -------------------- ## + +# Be more Bourne compatible +DUALCASE=1; export DUALCASE # for MKS sh +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; +esac +fi -ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]" -for ac_option + +as_nl=' +' +export as_nl +# Printing a long string crashes Solaris 7 /usr/bin/printf. +as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo +# Prefer a ksh shell builtin over an external printf program on Solaris, +# but without wasting forks for bash or zsh. +if test -z "$BASH_VERSION$ZSH_VERSION" \ + && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='print -r --' + as_echo_n='print -rn --' +elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='printf %s\n' + as_echo_n='printf %s' +else + if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then + as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' + as_echo_n='/usr/ucb/echo -n' + else + as_echo_body='eval expr "X$1" : "X\\(.*\\)"' + as_echo_n_body='eval + arg=$1; + case $arg in #( + *"$as_nl"*) + expr "X$arg" : "X\\(.*\\)$as_nl"; + arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; + esac; + expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" + ' + export as_echo_n_body + as_echo_n='sh -c $as_echo_n_body as_echo' + fi + export as_echo_body + as_echo='sh -c $as_echo_body as_echo' +fi + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + PATH_SEPARATOR=: + (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { + (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || + PATH_SEPARATOR=';' + } +fi + + +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +IFS=" "" $as_nl" + +# Find who we are. Look in the path if we contain no directory separator. +as_myself= +case $0 in #(( + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH do - case "\$ac_option" in - -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) - echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" - exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; - -version | --version | --versio | --versi | --vers | --ver | --ve | --v) - echo "$CONFIG_STATUS generated by autoconf version 2.13" - exit 0 ;; - -help | --help | --hel | --he | --h) - echo "\$ac_cs_usage"; exit 0 ;; - *) echo "\$ac_cs_usage"; exit 1 ;; - esac + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break + done +IFS=$as_save_IFS + + ;; +esac +# We did not find ourselves, most probably we were run as `sh COMMAND' +# in which case we are not to be found in the path. +if test "x$as_myself" = x; then + as_myself=$0 +fi +if test ! -f "$as_myself"; then + $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + exit 1 +fi + +# Unset variables that we do not need and which cause bugs (e.g. in +# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" +# suppresses any "Segmentation fault" message there. '((' could +# trigger a bug in pdksh 5.2.14. +for as_var in BASH_ENV ENV MAIL MAILPATH +do eval test x\${$as_var+set} = xset \ + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done +PS1='$ ' +PS2='> ' +PS4='+ ' -ac_given_srcdir=$srcdir -ac_given_INSTALL="$INSTALL" +# NLS nuisances. +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE + +# CDPATH. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + + +# as_fn_error STATUS ERROR [LINENO LOG_FD] +# ---------------------------------------- +# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are +# provided, also output the error to LOG_FD, referencing LINENO. Then exit the +# script with STATUS, using 1 if that was 0. +as_fn_error () +{ + as_status=$1; test $as_status -eq 0 && as_status=1 + if test "$4"; then + as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 + fi + $as_echo "$as_me: error: $2" >&2 + as_fn_exit $as_status +} # as_fn_error + + +# as_fn_set_status STATUS +# ----------------------- +# Set $? to STATUS, without forking. +as_fn_set_status () +{ + return $1 +} # as_fn_set_status + +# as_fn_exit STATUS +# ----------------- +# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. +as_fn_exit () +{ + set +e + as_fn_set_status $1 + exit $1 +} # as_fn_exit + +# as_fn_unset VAR +# --------------- +# Portably unset VAR. +as_fn_unset () +{ + { eval $1=; unset $1;} +} +as_unset=as_fn_unset +# as_fn_append VAR VALUE +# ---------------------- +# Append the text in VALUE to the end of the definition contained in VAR. Take +# advantage of any shell optimizations that allow amortized linear growth over +# repeated appends, instead of the typical quadratic growth present in naive +# implementations. +if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : + eval 'as_fn_append () + { + eval $1+=\$2 + }' +else + as_fn_append () + { + eval $1=\$$1\$2 + } +fi # as_fn_append + +# as_fn_arith ARG... +# ------------------ +# Perform arithmetic evaluation on the ARGs, and store the result in the +# global $as_val. Take advantage of shells that can avoid forks. The arguments +# must be portable across $(()) and expr. +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : + eval 'as_fn_arith () + { + as_val=$(( $* )) + }' +else + as_fn_arith () + { + as_val=`expr "$@" || test $? -eq 1` + } +fi # as_fn_arith -trap 'rm -fr `echo "Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 -EOF -cat >> $CONFIG_STATUS < conftest.subs <<\\CEOF -$ac_vpsub -$extrasub -s%@SHELL@%$SHELL%g -s%@CFLAGS@%$CFLAGS%g -s%@CPPFLAGS@%$CPPFLAGS%g -s%@CXXFLAGS@%$CXXFLAGS%g -s%@FFLAGS@%$FFLAGS%g -s%@DEFS@%$DEFS%g -s%@LDFLAGS@%$LDFLAGS%g -s%@LIBS@%$LIBS%g -s%@exec_prefix@%$exec_prefix%g -s%@prefix@%$prefix%g -s%@program_transform_name@%$program_transform_name%g -s%@bindir@%$bindir%g -s%@sbindir@%$sbindir%g -s%@libexecdir@%$libexecdir%g -s%@datadir@%$datadir%g -s%@sysconfdir@%$sysconfdir%g -s%@sharedstatedir@%$sharedstatedir%g -s%@localstatedir@%$localstatedir%g -s%@libdir@%$libdir%g -s%@includedir@%$includedir%g -s%@oldincludedir@%$oldincludedir%g -s%@infodir@%$infodir%g -s%@mandir@%$mandir%g -s%@CONFIGDIR@%$CONFIGDIR%g -s%@PACKAGE@%$PACKAGE%g -s%@VERSION@%$VERSION%g -s%@CYGPATH@%$CYGPATH%g -s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g -s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g -s%@INSTALL_DATA@%$INSTALL_DATA%g -s%@EXEEXT@%$EXEEXT%g -s%@TCLSH_PROG@%$TCLSH_PROG%g -s%@WISH_PROG@%$WISH_PROG%g - -CEOF -EOF - -cat >> $CONFIG_STATUS <<\EOF - -# Split the substitutions into bite-sized pieces for seds with -# small command number limits, like on Digital OSF/1 and HP-UX. -ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script. -ac_file=1 # Number of current file. -ac_beg=1 # First line for current file. -ac_end=$ac_max_sed_cmds # Line after last line for current file. -ac_more_lines=: -ac_sed_cmds="" -while $ac_more_lines; do - if test $ac_beg -gt 1; then - sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi + +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then + as_basename=basename +else + as_basename=false +fi + +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi + +as_me=`$as_basename -- "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in #((((( +-n*) + case `echo 'xy\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + xy) ECHO_C='\c';; + *) echo `echo ksh88 bug on AIX 6.1` > /dev/null + ECHO_T=' ';; + esac;; +*) + ECHO_N='-n';; +esac + +rm -f conf$$ conf$$.exe conf$$.file +if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file +else + rm -f conf$$.dir + mkdir conf$$.dir 2>/dev/null +fi +if (echo >conf$$.file) 2>/dev/null; then + if ln -s conf$$.file conf$$ 2>/dev/null; then + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -p'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + as_ln_s='cp -p' + elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln else - sed "${ac_end}q" conftest.subs > conftest.s$ac_file + as_ln_s='cp -p' fi - if test ! -s conftest.s$ac_file; then - ac_more_lines=false - rm -f conftest.s$ac_file +else + as_ln_s='cp -p' +fi +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null + + +# as_fn_mkdir_p +# ------------- +# Create "$as_dir" as a directory, including parents if necessary. +as_fn_mkdir_p () +{ + + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || eval $as_mkdir_p || { + as_dirs= + while :; do + case $as_dir in #( + *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break + done + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" + + +} # as_fn_mkdir_p +if mkdir -p . 2>/dev/null; then + as_mkdir_p='mkdir -p "$as_dir"' +else + test -d ./-p && rmdir ./-p + as_mkdir_p=false +fi + +if test -x / >/dev/null 2>&1; then + as_test_x='test -x' +else + if ls -dL / >/dev/null 2>&1; then + as_ls_L_option=L else - if test -z "$ac_sed_cmds"; then - ac_sed_cmds="sed -f conftest.s$ac_file" - else - ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file" - fi - ac_file=`expr $ac_file + 1` - ac_beg=$ac_end - ac_end=`expr $ac_end + $ac_max_sed_cmds` + as_ls_L_option= fi + as_test_x=' + eval sh -c '\'' + if test -d "$1"; then + test -d "$1/."; + else + case $1 in #( + -*)set "./$1";; + esac; + case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( + ???[sx]*):;;*)false;;esac;fi + '\'' sh + ' +fi +as_executable_p=$as_test_x + +# Sed expression to map a string onto a valid CPP name. +as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" + +# Sed expression to map a string onto a valid variable name. +as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" + + +exec 6>&1 +## ----------------------------------- ## +## Main body of $CONFIG_STATUS script. ## +## ----------------------------------- ## +_ASEOF +test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +# Save the log message, to keep $0 and so on meaningful, and to +# report actual input values of CONFIG_FILES etc. instead of their +# values after options handling. +ac_log=" +This file was extended by $as_me, which was +generated by GNU Autoconf 2.68. Invocation command line was + + CONFIG_FILES = $CONFIG_FILES + CONFIG_HEADERS = $CONFIG_HEADERS + CONFIG_LINKS = $CONFIG_LINKS + CONFIG_COMMANDS = $CONFIG_COMMANDS + $ $0 $@ + +on `(hostname || uname -n) 2>/dev/null | sed 1q` +" + +_ACEOF + +case $ac_config_files in *" +"*) set x $ac_config_files; shift; ac_config_files=$*;; +esac + + + +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +# Files that config.status was made for. +config_files="$ac_config_files" + +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +ac_cs_usage="\ +\`$as_me' instantiates files and other configuration actions +from templates according to the current configuration. Unless the files +and actions are specified as TAGs, all are instantiated by default. + +Usage: $0 [OPTION]... [TAG]... + + -h, --help print this help, then exit + -V, --version print version number and configuration settings, then exit + --config print configuration, then exit + -q, --quiet, --silent + do not print progress messages + -d, --debug don't remove temporary files + --recheck update $as_me by reconfiguring in the same conditions + --file=FILE[:TEMPLATE] + instantiate the configuration file FILE + +Configuration files: +$config_files + +Report bugs to the package provider." + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" +ac_cs_version="\\ +config.status +configured by $0, generated by GNU Autoconf 2.68, + with options \\"\$ac_cs_config\\" + +Copyright (C) 2010 Free Software Foundation, Inc. +This config.status script is free software; the Free Software Foundation +gives unlimited permission to copy, distribute and modify it." + +ac_pwd='$ac_pwd' +srcdir='$srcdir' +test -n "\$AWK" || AWK=awk +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +# The default lists apply if the user does not specify any file. +ac_need_defaults=: +while test $# != 0 +do + case $1 in + --*=?*) + ac_option=`expr "X$1" : 'X\([^=]*\)='` + ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` + ac_shift=: + ;; + --*=) + ac_option=`expr "X$1" : 'X\([^=]*\)='` + ac_optarg= + ac_shift=: + ;; + *) + ac_option=$1 + ac_optarg=$2 + ac_shift=shift + ;; + esac + + case $ac_option in + # Handling of the options. + -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) + ac_cs_recheck=: ;; + --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) + $as_echo "$ac_cs_version"; exit ;; + --config | --confi | --conf | --con | --co | --c ) + $as_echo "$ac_cs_config"; exit ;; + --debug | --debu | --deb | --de | --d | -d ) + debug=: ;; + --file | --fil | --fi | --f ) + $ac_shift + case $ac_optarg in + *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + '') as_fn_error $? "missing file argument" ;; + esac + as_fn_append CONFIG_FILES " '$ac_optarg'" + ac_need_defaults=false;; + --he | --h | --help | --hel | -h ) + $as_echo "$ac_cs_usage"; exit ;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil | --si | --s) + ac_cs_silent=: ;; + + # This is an error. + -*) as_fn_error $? "unrecognized option: \`$1' +Try \`$0 --help' for more information." ;; + + *) as_fn_append ac_config_targets " $1" + ac_need_defaults=false ;; + + esac + shift done -if test -z "$ac_sed_cmds"; then - ac_sed_cmds=cat -fi -EOF - -cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF -for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then - # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". - case "$ac_file" in - *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` - ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; - *) ac_file_in="${ac_file}.in" ;; + +ac_configure_extra_args= + +if $ac_cs_silent; then + exec 6>/dev/null + ac_configure_extra_args="$ac_configure_extra_args --silent" +fi + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +if \$ac_cs_recheck; then + set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion + shift + \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 + CONFIG_SHELL='$SHELL' + export CONFIG_SHELL + exec "\$@" +fi + +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +exec 5>>config.log +{ + echo + sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX +## Running $as_me. ## +_ASBOX + $as_echo "$ac_log" +} >&5 + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 + +# Handling of arguments. +for ac_config_target in $ac_config_targets +do + case $ac_config_target in + "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; + + *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac +done - # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories. - # Remove last slash and all that follows it. Not all systems have dirname. - ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` - if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then - # The file is in a subdirectory. - test ! -d "$ac_dir" && mkdir "$ac_dir" - ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`" - # A "../" for each directory in $ac_dir_suffix. - ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'` +# If the user did not use the arguments to specify the items to instantiate, +# then the envvar interface is used. Set only those that are not. +# We use the long form for the default assignment because of an extremely +# bizarre bug on SunOS 4.1.3. +if $ac_need_defaults; then + test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files +fi + +# Have a temporary directory for convenience. Make it in the build tree +# simply because there is no reason against having it here, and in addition, +# creating and moving files from /tmp can sometimes cause problems. +# Hook for its removal unless debugging. +# Note that there is a small window in which the directory will not be cleaned: +# after its creation but before its name has been assigned to `$tmp'. +$debug || +{ + tmp= ac_tmp= + trap 'exit_status=$? + : "${ac_tmp:=$tmp}" + { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status +' 0 + trap 'as_fn_exit 1' 1 2 13 15 +} +# Create a (secure) tmp directory for tmp files. + +{ + tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && + test -d "$tmp" +} || +{ + tmp=./conf$$-$RANDOM + (umask 077 && mkdir "$tmp") +} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 +ac_tmp=$tmp + +# Set up the scripts for CONFIG_FILES section. +# No need to generate them if there are no CONFIG_FILES. +# This happens for instance with `./config.status config.h'. +if test -n "$CONFIG_FILES"; then + + +ac_cr=`echo X | tr X '\015'` +# On cygwin, bash can eat \r inside `` if the user requested igncr. +# But we know of no other shell where ac_cr would be empty at this +# point, so we can use a bashism as a fallback. +if test "x$ac_cr" = x; then + eval ac_cr=\$\'\\r\' +fi +ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` +if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then + ac_cs_awk_cr='\\r' +else + ac_cs_awk_cr=$ac_cr +fi + +echo 'BEGIN {' >"$ac_tmp/subs1.awk" && +_ACEOF + + +{ + echo "cat >conf$$subs.awk <<_ACEOF" && + echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && + echo "_ACEOF" +} >conf$$subs.sh || + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 +ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` +ac_delim='%!_!# ' +for ac_last_try in false false false false false :; do + . ./conf$$subs.sh || + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 + + ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` + if test $ac_delim_n = $ac_delim_num; then + break + elif $ac_last_try; then + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 else - ac_dir_suffix= ac_dots= + ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi +done +rm -f conf$$subs.sh + +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && +_ACEOF +sed -n ' +h +s/^/S["/; s/!.*/"]=/ +p +g +s/^[^!]*!// +:repl +t repl +s/'"$ac_delim"'$// +t delim +:nl +h +s/\(.\{148\}\)..*/\1/ +t more1 +s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ +p +n +b repl +:more1 +s/["\\]/\\&/g; s/^/"/; s/$/"\\/ +p +g +s/.\{148\}// +t nl +:delim +h +s/\(.\{148\}\)..*/\1/ +t more2 +s/["\\]/\\&/g; s/^/"/; s/$/"/ +p +b +:more2 +s/["\\]/\\&/g; s/^/"/; s/$/"\\/ +p +g +s/.\{148\}// +t delim +' >$CONFIG_STATUS || ac_write_fail=1 +rm -f conf$$subs.awk +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +_ACAWK +cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && + for (key in S) S_is_set[key] = 1 + FS = "" + +} +{ + line = $ 0 + nfields = split(line, field, "@") + substed = 0 + len = length(field[1]) + for (i = 2; i < nfields; i++) { + key = field[i] + keylen = length(key) + if (S_is_set[key]) { + value = S[key] + line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) + len += length(value) + length(field[++i]) + substed = 1 + } else + len += 1 + keylen + } + + print line +} + +_ACAWK +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then + sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" +else + cat +fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ + || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 +_ACEOF + +# VPATH may cause trouble with some makes, so we remove sole $(srcdir), +# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and +# trailing colons and then remove the whole line if VPATH becomes empty +# (actually we leave an empty line to preserve line numbers). +if test "x$srcdir" = x.; then + ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ +h +s/// +s/^/:/ +s/[ ]*$/:/ +s/:\$(srcdir):/:/g +s/:\${srcdir}:/:/g +s/:@srcdir@:/:/g +s/^:*// +s/:*$// +x +s/\(=[ ]*\).*/\1/ +G +s/\n// +s/^[^=]*=[ ]*$// +}' +fi + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +fi # test -n "$CONFIG_FILES" + - case "$ac_given_srcdir" in - .) srcdir=. - if test -z "$ac_dots"; then top_srcdir=. - else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;; - /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;; - *) # Relative path. - srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix" - top_srcdir="$ac_dots$ac_given_srcdir" ;; +eval set X " :F $CONFIG_FILES " +shift +for ac_tag +do + case $ac_tag in + :[FHLC]) ac_mode=$ac_tag; continue;; + esac + case $ac_mode$ac_tag in + :[FHL]*:*);; + :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; + :[FH]-) ac_tag=-:-;; + :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac + ac_save_IFS=$IFS + IFS=: + set x $ac_tag + IFS=$ac_save_IFS + shift + ac_file=$1 + shift + + case $ac_mode in + :L) ac_source=$1;; + :[FH]) + ac_file_inputs= + for ac_f + do + case $ac_f in + -) ac_f="$ac_tmp/stdin";; + *) # Look for the file first in the build tree, then in the source tree + # (if the path is not absolute). The absolute path cannot be DOS-style, + # because $ac_f cannot contain `:'. + test -f "$ac_f" || + case $ac_f in + [\\/$]*) false;; + *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; + esac || + as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; + esac + case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac + as_fn_append ac_file_inputs " '$ac_f'" + done + + # Let's still pretend it is `configure' which instantiates (i.e., don't + # use $as_me), people would be surprised to read: + # /* config.h. Generated by config.status. */ + configure_input='Generated from '` + $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' + `' by configure.' + if test x"$ac_file" != x-; then + configure_input="$ac_file. $configure_input" + { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 +$as_echo "$as_me: creating $ac_file" >&6;} + fi + # Neutralize special characters interpreted by sed in replacement strings. + case $configure_input in #( + *\&* | *\|* | *\\* ) + ac_sed_conf_input=`$as_echo "$configure_input" | + sed 's/[\\\\&|]/\\\\&/g'`;; #( + *) ac_sed_conf_input=$configure_input;; + esac - case "$ac_given_INSTALL" in - [/$]*) INSTALL="$ac_given_INSTALL" ;; - *) INSTALL="$ac_dots$ac_given_INSTALL" ;; + case $ac_tag in + *:-:* | *:-) cat >"$ac_tmp/stdin" \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; + esac + ;; esac - echo creating "$ac_file" - rm -f "$ac_file" - configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure." - case "$ac_file" in - *Makefile*) ac_comsub="1i\\ -# $configure_input" ;; - *) ac_comsub= ;; + ac_dir=`$as_dirname -- "$ac_file" || +$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$ac_file" : 'X\(//\)[^/]' \| \ + X"$ac_file" : 'X\(//\)$' \| \ + X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$ac_file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + as_dir="$ac_dir"; as_fn_mkdir_p + ac_builddir=. + +case "$ac_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) + ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` + case $ac_top_builddir_sub in + "") ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; + esac ;; +esac +ac_abs_top_builddir=$ac_pwd +ac_abs_builddir=$ac_pwd$ac_dir_suffix +# for backward compatibility: +ac_top_builddir=$ac_top_build_prefix + +case $srcdir in + .) # We are building in place. + ac_srcdir=. + ac_top_srcdir=$ac_top_builddir_sub + ac_abs_top_srcdir=$ac_pwd ;; + [\\/]* | ?:[\\/]* ) # Absolute name. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir + ac_abs_top_srcdir=$srcdir ;; + *) # Relative name. + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_build_prefix$srcdir + ac_abs_top_srcdir=$ac_pwd/$srcdir ;; +esac +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix + + + case $ac_mode in + :F) + # + # CONFIG_FILE + # + +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +# If the template does not know about datarootdir, expand it. +# FIXME: This hack should be removed a few years after 2.60. +ac_datarootdir_hack=; ac_datarootdir_seen= +ac_sed_dataroot=' +/datarootdir/ { + p + q +} +/@datadir@/p +/@docdir@/p +/@infodir@/p +/@localedir@/p +/@mandir@/p' +case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in +*datarootdir*) ac_datarootdir_seen=yes;; +*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 +$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 + ac_datarootdir_hack=' + s&@datadir@&$datadir&g + s&@docdir@&$docdir&g + s&@infodir@&$infodir&g + s&@localedir@&$localedir&g + s&@mandir@&$mandir&g + s&\\\${datarootdir}&$datarootdir&g' ;; +esac +_ACEOF + +# Neutralize VPATH when `$srcdir' = `.'. +# Shell code in configure.ac might set extrasub. +# FIXME: do we really want to maintain this feature? +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +ac_sed_extra="$ac_vpsub +$extrasub +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +:t +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b +s|@configure_input@|$ac_sed_conf_input|;t t +s&@top_builddir@&$ac_top_builddir_sub&;t t +s&@top_build_prefix@&$ac_top_build_prefix&;t t +s&@srcdir@&$ac_srcdir&;t t +s&@abs_srcdir@&$ac_abs_srcdir&;t t +s&@top_srcdir@&$ac_top_srcdir&;t t +s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t +s&@builddir@&$ac_builddir&;t t +s&@abs_builddir@&$ac_abs_builddir&;t t +s&@abs_top_builddir@&$ac_abs_top_builddir&;t t +$ac_datarootdir_hack +" +eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ + >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 + +test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && + { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && + { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ + "$ac_tmp/out"`; test -z "$ac_out"; } && + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined" >&5 +$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined" >&2;} + + rm -f "$ac_tmp/stdin" + case $ac_file in + -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; + *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; + esac \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 + ;; + + + esac - ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` - sed -e "$ac_comsub -s%@configure_input@%$configure_input%g -s%@srcdir@%$srcdir%g -s%@top_srcdir@%$top_srcdir%g -s%@INSTALL@%$INSTALL%g -" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file -fi; done -rm -f conftest.s* - -EOF -cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF - -exit 0 -EOF -chmod +x $CONFIG_STATUS -rm -fr confdefs* $ac_clean_files -test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 +done # for ac_tag + + +as_fn_exit 0 +_ACEOF +ac_clean_files=$ac_clean_files_save + +test $ac_write_fail = 0 || + as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 + + +# configure is writing to config.log, and then calls config.status. +# config.status does its own redirection, appending to config.log. +# Unfortunately, on DOS this fails, as config.log is still kept open +# by configure, so config.status won't be able to write to it; its +# output is simply discarded. So we exec the FD to /dev/null, +# effectively closing config.log, so it can be properly (re)opened and +# appended to by config.status. When coming back to configure, we +# need to make the FD available again. +if test "$no_create" != yes; then + ac_cs_success=: + ac_config_status_args= + test "$silent" = yes && + ac_config_status_args="$ac_config_status_args --quiet" + exec 5>/dev/null + $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false + exec 5>>config.log + # Use ||, not &&, to avoid exiting from the if with $? = 1, which + # would make configure fail if this is the last instruction. + $ac_cs_success || as_fn_exit 1 +fi +if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 +$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} +fi diff --git a/configure.in b/configure.in index 9ac0b6d9..dcd15230 100644 --- a/configure.in +++ b/configure.in @@ -1,21 +1,5 @@ AC_INIT(ChangeLog) -AC_CONFIG_AUX_DIR(config) -CONFIGDIR=${srcdir}/config -AC_SUBST(CONFIGDIR) - -PACKAGE=tklib - -MAJOR_VERSION=0 -MINOR_VERSION=1 -PATCHLEVEL="" - -VERSION=${MAJOR_VERSION}.${MINOR_VERSION}${PATCHLEVEL} -NODOT_VERSION=${MAJOR_VERSION}${MINOR_VERSION} - -AC_SUBST(PACKAGE) -AC_SUBST(VERSION) - case "`uname -s`" in *win32* | *WIN32* | *CYGWIN_NT* | *CYGWIN_98* | *CYGWIN_95*) CYGPATH="cygpath -w" @@ -26,9 +10,38 @@ case "`uname -s`" in esac AC_SUBST(CYGPATH) -AC_PROG_INSTALL SC_SIMPLE_EXEEXT -SC_PROG_TCLSH -SC_PROG_WISH + +AC_ARG_WITH(tclsh, [ --with-tclsh=FILE location of a working tclsh executable], with_tclsh=${withval}) + +# allow user to override the tclsh we think we found +if test x"${with_tclsh}" != x ; then + AC_MSG_CHECKING([for tclsh]) + if "${with_tclsh}" < /dev/null > /dev/null 2> /dev/null + then + TCLSH_PROG=${with_tclsh} + AC_MSG_RESULT([$TCLSH_PROG, via --with-tclsh]) + else + AC_MSG_ERROR([Bad --with-tclsh ${with_tclsh}, not found or not executable]) + fi + AC_SUBST(TCLSH_PROG) +else + SC_PROG_TCLSH +fi + +# ### ######### ########################### + +PACKAGE=`$TCLSH_PROG ${srcdir}/sak.tcl name` +MAJOR_VERSION=`$TCLSH_PROG ${srcdir}/sak.tcl major` +MINOR_VERSION=`$TCLSH_PROG ${srcdir}/sak.tcl minor` +PATCHLEVEL="" + +VERSION=${MAJOR_VERSION}.${MINOR_VERSION}${PATCHLEVEL} +NODOT_VERSION=${MAJOR_VERSION}${MINOR_VERSION} + +AC_SUBST(PACKAGE) +AC_SUBST(VERSION) + +# ### ######### ########################### AC_OUTPUT([Makefile]) diff --git a/embedded/man/files/apps/bitmap-editor.n b/embedded/man/files/apps/bitmap-editor.n new file mode 100644 index 00000000..62c76d21 --- /dev/null +++ b/embedded/man/files/apps/bitmap-editor.n @@ -0,0 +1,323 @@ +'\" +'\" Generated from file 'bitmap-editor\&.man' by tcllib/doctools with format 'nroff' +'\" Copyright (c) +'\" +.TH "bitmap-editor" n 1\&.0 tklib "Bitmap handling" +.\" The -*- nroff -*- definitions below are for supplemental macros used +.\" in Tcl/Tk manual entries. +.\" +.\" .AP type name in/out ?indent? +.\" Start paragraph describing an argument to a library procedure. +.\" type is type of argument (int, etc.), in/out is either "in", "out", +.\" or "in/out" to describe whether procedure reads or modifies arg, +.\" and indent is equivalent to second arg of .IP (shouldn't ever be +.\" needed; use .AS below instead) +.\" +.\" .AS ?type? ?name? +.\" Give maximum sizes of arguments for setting tab stops. Type and +.\" name are examples of largest possible arguments that will be passed +.\" to .AP later. If args are omitted, default tab stops are used. +.\" +.\" .BS +.\" Start box enclosure. From here until next .BE, everything will be +.\" enclosed in one large box. +.\" +.\" .BE +.\" End of box enclosure. +.\" +.\" .CS +.\" Begin code excerpt. +.\" +.\" .CE +.\" End code excerpt. +.\" +.\" .VS ?version? ?br? +.\" Begin vertical sidebar, for use in marking newly-changed parts +.\" of man pages. The first argument is ignored and used for recording +.\" the version when the .VS was added, so that the sidebars can be +.\" found and removed when they reach a certain age. If another argument +.\" is present, then a line break is forced before starting the sidebar. +.\" +.\" .VE +.\" End of vertical sidebar. +.\" +.\" .DS +.\" Begin an indented unfilled display. +.\" +.\" .DE +.\" End of indented unfilled display. +.\" +.\" .SO ?manpage? +.\" Start of list of standard options for a Tk widget. The manpage +.\" argument defines where to look up the standard options; if +.\" omitted, defaults to "options". The options follow on successive +.\" lines, in three columns separated by tabs. +.\" +.\" .SE +.\" End of list of standard options for a Tk widget. +.\" +.\" .OP cmdName dbName dbClass +.\" Start of description of a specific option. cmdName gives the +.\" option's name as specified in the class command, dbName gives +.\" the option's name in the option database, and dbClass gives +.\" the option's class in the option database. +.\" +.\" .UL arg1 arg2 +.\" Print arg1 underlined, then print arg2 normally. +.\" +.\" .QW arg1 ?arg2? +.\" Print arg1 in quotes, then arg2 normally (for trailing punctuation). +.\" +.\" .PQ arg1 ?arg2? +.\" Print an open parenthesis, arg1 in quotes, then arg2 normally +.\" (for trailing punctuation) and then a closing parenthesis. +.\" +.\" # Set up traps and other miscellaneous stuff for Tcl/Tk man pages. +.if t .wh -1.3i ^B +.nr ^l \n(.l +.ad b +.\" # Start an argument description +.de AP +.ie !"\\$4"" .TP \\$4 +.el \{\ +. ie !"\\$2"" .TP \\n()Cu +. el .TP 15 +.\} +.ta \\n()Au \\n()Bu +.ie !"\\$3"" \{\ +\&\\$1 \\fI\\$2\\fP (\\$3) +.\".b +.\} +.el \{\ +.br +.ie !"\\$2"" \{\ +\&\\$1 \\fI\\$2\\fP +.\} +.el \{\ +\&\\fI\\$1\\fP +.\} +.\} +.. +.\" # define tabbing values for .AP +.de AS +.nr )A 10n +.if !"\\$1"" .nr )A \\w'\\$1'u+3n +.nr )B \\n()Au+15n +.\" +.if !"\\$2"" .nr )B \\w'\\$2'u+\\n()Au+3n +.nr )C \\n()Bu+\\w'(in/out)'u+2n +.. +.AS Tcl_Interp Tcl_CreateInterp in/out +.\" # BS - start boxed text +.\" # ^y = starting y location +.\" # ^b = 1 +.de BS +.br +.mk ^y +.nr ^b 1u +.if n .nf +.if n .ti 0 +.if n \l'\\n(.lu\(ul' +.if n .fi +.. +.\" # BE - end boxed text (draw box now) +.de BE +.nf +.ti 0 +.mk ^t +.ie n \l'\\n(^lu\(ul' +.el \{\ +.\" Draw four-sided box normally, but don't draw top of +.\" box if the box started on an earlier page. +.ie !\\n(^b-1 \{\ +\h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul' +.\} +.el \}\ +\h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul' +.\} +.\} +.fi +.br +.nr ^b 0 +.. +.\" # VS - start vertical sidebar +.\" # ^Y = starting y location +.\" # ^v = 1 (for troff; for nroff this doesn't matter) +.de VS +.if !"\\$2"" .br +.mk ^Y +.ie n 'mc \s12\(br\s0 +.el .nr ^v 1u +.. +.\" # VE - end of vertical sidebar +.de VE +.ie n 'mc +.el \{\ +.ev 2 +.nf +.ti 0 +.mk ^t +\h'|\\n(^lu+3n'\L'|\\n(^Yu-1v\(bv'\v'\\n(^tu+1v-\\n(^Yu'\h'-|\\n(^lu+3n' +.sp -1 +.fi +.ev +.\} +.nr ^v 0 +.. +.\" # Special macro to handle page bottom: finish off current +.\" # box/sidebar if in box/sidebar mode, then invoked standard +.\" # page bottom macro. +.de ^B +.ev 2 +'ti 0 +'nf +.mk ^t +.if \\n(^b \{\ +.\" Draw three-sided box if this is the box's first page, +.\" draw two sides but no top otherwise. +.ie !\\n(^b-1 \h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c +.el \h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c +.\} +.if \\n(^v \{\ +.nr ^x \\n(^tu+1v-\\n(^Yu +\kx\h'-\\nxu'\h'|\\n(^lu+3n'\ky\L'-\\n(^xu'\v'\\n(^xu'\h'|0u'\c +.\} +.bp +'fi +.ev +.if \\n(^b \{\ +.mk ^y +.nr ^b 2 +.\} +.if \\n(^v \{\ +.mk ^Y +.\} +.. +.\" # DS - begin display +.de DS +.RS +.nf +.sp +.. +.\" # DE - end display +.de DE +.fi +.RE +.sp +.. +.\" # SO - start of list of standard options +.de SO +'ie '\\$1'' .ds So \\fBoptions\\fR +'el .ds So \\fB\\$1\\fR +.SH "STANDARD OPTIONS" +.LP +.nf +.ta 5.5c 11c +.ft B +.. +.\" # SE - end of list of standard options +.de SE +.fi +.ft R +.LP +See the \\*(So manual entry for details on the standard options. +.. +.\" # OP - start of full description for a single option +.de OP +.LP +.nf +.ta 4c +Command-Line Name: \\fB\\$1\\fR +Database Name: \\fB\\$2\\fR +Database Class: \\fB\\$3\\fR +.fi +.IP +.. +.\" # CS - begin code excerpt +.de CS +.RS +.nf +.ta .25i .5i .75i 1i +.. +.\" # CE - end code excerpt +.de CE +.fi +.RE +.. +.\" # UL - underline word +.de UL +\\$1\l'|0\(ul'\\$2 +.. +.\" # QW - apply quotation marks to word +.de QW +.ie '\\*(lq'"' ``\\$1''\\$2 +.\"" fix emacs highlighting +.el \\*(lq\\$1\\*(rq\\$2 +.. +.\" # PQ - apply parens and quotation marks to word +.de PQ +.ie '\\*(lq'"' (``\\$1''\\$2)\\$3 +.\"" fix emacs highlighting +.el (\\*(lq\\$1\\*(rq\\$2)\\$3 +.. +.\" # QR - quoted range +.de QR +.ie '\\*(lq'"' ``\\$1''\\-``\\$2''\\$3 +.\"" fix emacs highlighting +.el \\*(lq\\$1\\*(rq\\-\\*(lq\\$2\\*(rq\\$3 +.. +.\" # MT - "empty" string +.de MT +.QW "" +.. +.BS +.SH NAME +bitmap-editor \- Editor for XBM images +.SH SYNOPSIS +\fBbitmap-editor\fR ?\fIxbmfile\fR? +.sp +.BE +.SH DESCRIPTION +.PP +The application described by this document, \fBbitmap-editor\fR, is +a simple editor for XBM based bitmap images\&. +Written by Keith Vetter the original code can be found at +\fIhttp://wiki\&.tcl\&.tk/6298\fR\&. +.SS "COMMAND LINE" +.TP +\fBbitmap-editor\fR ?\fIxbmfile\fR? +Invoked without argument the editor GUI will be opened and show a +standard bitmap to edit\&. Invoked with an argument it is expected to be +the path to a bitmap file in XBM format, and the contained bitmap is +shown\&. +.RS +.TP +path \fIxbmfile\fR (in/out) +This argument specifies the path to a bitmap file in XBM format, whose +contents is to shown and edited by the application\&. +.RE +.sp +.PP +.SH "BUGS, IDEAS, FEEDBACK" +This document, and the application it describes, will undoubtedly +contain bugs and other problems\&. +Please report such in the category \fIbitmap\fR of the +\fITcllib SF Trackers\fR [http://sourceforge\&.net/tracker/?group_id=12883]\&. +Please also report any ideas for enhancements you may have for either +application and/or documentation\&. +.SH "BUGS, IDEAS, FEEDBACK" +This document, and the package it describes, will undoubtedly contain +bugs and other problems\&. +Please report such in the category \fIbitmap-editor\fR of the +\fITklib Trackers\fR [http://core\&.tcl\&.tk/tklib/reportlist]\&. +Please also report any ideas for enhancements you may have for either +package and/or documentation\&. +.SH KEYWORDS +bitmap, editor, image, pixel, xbm +.SH CATEGORY +Image processing +.SH COPYRIGHT +.nf +Copyright (c) + +.fi \ No newline at end of file diff --git a/embedded/man/files/apps/diagram-viewer.n b/embedded/man/files/apps/diagram-viewer.n new file mode 100644 index 00000000..0e45f86c --- /dev/null +++ b/embedded/man/files/apps/diagram-viewer.n @@ -0,0 +1,359 @@ +'\" +'\" Generated from file 'diagram-viewer\&.man' by tcllib/doctools with format 'nroff' +'\" Copyright (c) 2010 Andreas Kupries +'\" +.TH "diagram-viewer" n 1\&.0 tklib "Documentation toolbox" +.\" The -*- nroff -*- definitions below are for supplemental macros used +.\" in Tcl/Tk manual entries. +.\" +.\" .AP type name in/out ?indent? +.\" Start paragraph describing an argument to a library procedure. +.\" type is type of argument (int, etc.), in/out is either "in", "out", +.\" or "in/out" to describe whether procedure reads or modifies arg, +.\" and indent is equivalent to second arg of .IP (shouldn't ever be +.\" needed; use .AS below instead) +.\" +.\" .AS ?type? ?name? +.\" Give maximum sizes of arguments for setting tab stops. Type and +.\" name are examples of largest possible arguments that will be passed +.\" to .AP later. If args are omitted, default tab stops are used. +.\" +.\" .BS +.\" Start box enclosure. From here until next .BE, everything will be +.\" enclosed in one large box. +.\" +.\" .BE +.\" End of box enclosure. +.\" +.\" .CS +.\" Begin code excerpt. +.\" +.\" .CE +.\" End code excerpt. +.\" +.\" .VS ?version? ?br? +.\" Begin vertical sidebar, for use in marking newly-changed parts +.\" of man pages. The first argument is ignored and used for recording +.\" the version when the .VS was added, so that the sidebars can be +.\" found and removed when they reach a certain age. If another argument +.\" is present, then a line break is forced before starting the sidebar. +.\" +.\" .VE +.\" End of vertical sidebar. +.\" +.\" .DS +.\" Begin an indented unfilled display. +.\" +.\" .DE +.\" End of indented unfilled display. +.\" +.\" .SO ?manpage? +.\" Start of list of standard options for a Tk widget. The manpage +.\" argument defines where to look up the standard options; if +.\" omitted, defaults to "options". The options follow on successive +.\" lines, in three columns separated by tabs. +.\" +.\" .SE +.\" End of list of standard options for a Tk widget. +.\" +.\" .OP cmdName dbName dbClass +.\" Start of description of a specific option. cmdName gives the +.\" option's name as specified in the class command, dbName gives +.\" the option's name in the option database, and dbClass gives +.\" the option's class in the option database. +.\" +.\" .UL arg1 arg2 +.\" Print arg1 underlined, then print arg2 normally. +.\" +.\" .QW arg1 ?arg2? +.\" Print arg1 in quotes, then arg2 normally (for trailing punctuation). +.\" +.\" .PQ arg1 ?arg2? +.\" Print an open parenthesis, arg1 in quotes, then arg2 normally +.\" (for trailing punctuation) and then a closing parenthesis. +.\" +.\" # Set up traps and other miscellaneous stuff for Tcl/Tk man pages. +.if t .wh -1.3i ^B +.nr ^l \n(.l +.ad b +.\" # Start an argument description +.de AP +.ie !"\\$4"" .TP \\$4 +.el \{\ +. ie !"\\$2"" .TP \\n()Cu +. el .TP 15 +.\} +.ta \\n()Au \\n()Bu +.ie !"\\$3"" \{\ +\&\\$1 \\fI\\$2\\fP (\\$3) +.\".b +.\} +.el \{\ +.br +.ie !"\\$2"" \{\ +\&\\$1 \\fI\\$2\\fP +.\} +.el \{\ +\&\\fI\\$1\\fP +.\} +.\} +.. +.\" # define tabbing values for .AP +.de AS +.nr )A 10n +.if !"\\$1"" .nr )A \\w'\\$1'u+3n +.nr )B \\n()Au+15n +.\" +.if !"\\$2"" .nr )B \\w'\\$2'u+\\n()Au+3n +.nr )C \\n()Bu+\\w'(in/out)'u+2n +.. +.AS Tcl_Interp Tcl_CreateInterp in/out +.\" # BS - start boxed text +.\" # ^y = starting y location +.\" # ^b = 1 +.de BS +.br +.mk ^y +.nr ^b 1u +.if n .nf +.if n .ti 0 +.if n \l'\\n(.lu\(ul' +.if n .fi +.. +.\" # BE - end boxed text (draw box now) +.de BE +.nf +.ti 0 +.mk ^t +.ie n \l'\\n(^lu\(ul' +.el \{\ +.\" Draw four-sided box normally, but don't draw top of +.\" box if the box started on an earlier page. +.ie !\\n(^b-1 \{\ +\h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul' +.\} +.el \}\ +\h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul' +.\} +.\} +.fi +.br +.nr ^b 0 +.. +.\" # VS - start vertical sidebar +.\" # ^Y = starting y location +.\" # ^v = 1 (for troff; for nroff this doesn't matter) +.de VS +.if !"\\$2"" .br +.mk ^Y +.ie n 'mc \s12\(br\s0 +.el .nr ^v 1u +.. +.\" # VE - end of vertical sidebar +.de VE +.ie n 'mc +.el \{\ +.ev 2 +.nf +.ti 0 +.mk ^t +\h'|\\n(^lu+3n'\L'|\\n(^Yu-1v\(bv'\v'\\n(^tu+1v-\\n(^Yu'\h'-|\\n(^lu+3n' +.sp -1 +.fi +.ev +.\} +.nr ^v 0 +.. +.\" # Special macro to handle page bottom: finish off current +.\" # box/sidebar if in box/sidebar mode, then invoked standard +.\" # page bottom macro. +.de ^B +.ev 2 +'ti 0 +'nf +.mk ^t +.if \\n(^b \{\ +.\" Draw three-sided box if this is the box's first page, +.\" draw two sides but no top otherwise. +.ie !\\n(^b-1 \h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c +.el \h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c +.\} +.if \\n(^v \{\ +.nr ^x \\n(^tu+1v-\\n(^Yu +\kx\h'-\\nxu'\h'|\\n(^lu+3n'\ky\L'-\\n(^xu'\v'\\n(^xu'\h'|0u'\c +.\} +.bp +'fi +.ev +.if \\n(^b \{\ +.mk ^y +.nr ^b 2 +.\} +.if \\n(^v \{\ +.mk ^Y +.\} +.. +.\" # DS - begin display +.de DS +.RS +.nf +.sp +.. +.\" # DE - end display +.de DE +.fi +.RE +.sp +.. +.\" # SO - start of list of standard options +.de SO +'ie '\\$1'' .ds So \\fBoptions\\fR +'el .ds So \\fB\\$1\\fR +.SH "STANDARD OPTIONS" +.LP +.nf +.ta 5.5c 11c +.ft B +.. +.\" # SE - end of list of standard options +.de SE +.fi +.ft R +.LP +See the \\*(So manual entry for details on the standard options. +.. +.\" # OP - start of full description for a single option +.de OP +.LP +.nf +.ta 4c +Command-Line Name: \\fB\\$1\\fR +Database Name: \\fB\\$2\\fR +Database Class: \\fB\\$3\\fR +.fi +.IP +.. +.\" # CS - begin code excerpt +.de CS +.RS +.nf +.ta .25i .5i .75i 1i +.. +.\" # CE - end code excerpt +.de CE +.fi +.RE +.. +.\" # UL - underline word +.de UL +\\$1\l'|0\(ul'\\$2 +.. +.\" # QW - apply quotation marks to word +.de QW +.ie '\\*(lq'"' ``\\$1''\\$2 +.\"" fix emacs highlighting +.el \\*(lq\\$1\\*(rq\\$2 +.. +.\" # PQ - apply parens and quotation marks to word +.de PQ +.ie '\\*(lq'"' (``\\$1''\\$2)\\$3 +.\"" fix emacs highlighting +.el (\\*(lq\\$1\\*(rq\\$2)\\$3 +.. +.\" # QR - quoted range +.de QR +.ie '\\*(lq'"' ``\\$1''\\-``\\$2''\\$3 +.\"" fix emacs highlighting +.el \\*(lq\\$1\\*(rq\\-\\*(lq\\$2\\*(rq\\$3 +.. +.\" # MT - "empty" string +.de MT +.QW "" +.. +.BS +.SH NAME +diagram-viewer \- Lightweight Diagram Processor +.SH SYNOPSIS +\fBdiagram-viewer\fR \fBshow\fR \fIinputfile\fR\&.\&.\&. +.sp +\fBdiagram-viewer\fR \fBconvert\fR \fB-o\fR \fIoutput\fR \fIformat\fR \fIinputfile\fR\&.\&.\&. +.sp +.BE +.SH DESCRIPTION +.PP +The application described by this document, \fBdiagram-viewer\fR, is a +lightweight processor for tklib diagram files +.PP +\fBdiagram-viewer\fR is based upon the package \fBdiagram\fR\&. +See it for examples and language reference\&. +.SS "USE CASES" +\fBdiagram-viewer\fR was written with the following two use cases in +mind\&. +.PP +.IP [1] +Processing and display of one or more diagram files\&. +.IP [2] +Batch conversion of one or more diagram files into raster image files\&. +.PP +.PP +.SS "COMMAND LINE" +.TP +\fBdiagram-viewer\fR \fBshow\fR \fIinputfile\fR\&.\&.\&. +This is the form for use case [1]\&. The application opens a gui +showing the list of input files to the left, allowing the user to +choose which of them to render to the canvas on the right\&. +.TP +\fBdiagram-viewer\fR \fBconvert\fR \fB-o\fR \fIoutput\fR \fIformat\fR \fIinputfile\fR\&.\&.\&. +This is the form for use case [2]\&. The application converts +the input files into raster image of the specified \fIformat\fR\&. +.RS +.TP +path \fIoutput\fR (in) +This argument specifies where to write the generated image\&. It can +be the path to a file or directory\&. +.sp +If the \fIoutput\fR does not exist then [file dirname $output] +has to exist and must be a writable directory\&. +.sp +In case of multiple input files the generated image will be written to +a file in the directory, and the name of that file will be derived +from the \fIinputfile\fR, and \fIformat\fR\&. +.sp +In case of a single input file the generated image will be written to +the file\&. +.TP +(handle) \fIformat\fR (in) +This argument specifies the image format to convert the diagrams into +when processing the input\&. The application recognizes all formats +supported by the \fBImg\fR package, i\&.e\&. for which it can load a +package \fBimg::\fBformat\fR\fR +.TP +path \fIinputfile\fR (in) +This argument specifies the path to the diagram file to process\&. It +has to exist, must be readable, and written in \fIdiagram\fR format\&. +.RE +.sp +.PP +.SH "BUGS, IDEAS, FEEDBACK" +This document, and the application it describes, will undoubtedly +contain bugs and other problems\&. +Please report such in the category \fIdiagram\fR of the +\fITcllib SF Trackers\fR [http://sourceforge\&.net/tracker/?group_id=12883]\&. +Please also report any ideas for enhancements you may have for either +application and/or documentation\&. +.SH "BUGS, IDEAS, FEEDBACK" +This document, and the package it describes, will undoubtedly contain +bugs and other problems\&. +Please report such in the category \fIdiagram\fR of the +\fITklib Trackers\fR [http://core\&.tcl\&.tk/tklib/reportlist]\&. +Please also report any ideas for enhancements you may have for either +package and/or documentation\&. +.SH KEYWORDS +canvas, conversion, diagram, vector +.SH CATEGORY +Documentation tools +.SH COPYRIGHT +.nf +Copyright (c) 2010 Andreas Kupries + +.fi \ No newline at end of file diff --git a/embedded/man/files/modules/autoscroll/autoscroll.n b/embedded/man/files/modules/autoscroll/autoscroll.n new file mode 100644 index 00000000..6a4abe53 --- /dev/null +++ b/embedded/man/files/modules/autoscroll/autoscroll.n @@ -0,0 +1,343 @@ +'\" +'\" Generated from file 'autoscroll\&.man' by tcllib/doctools with format 'nroff' +'\" +.TH "autoscroll" n 1\&.1 tklib "Automatic mapping of scrollbars" +.\" The -*- nroff -*- definitions below are for supplemental macros used +.\" in Tcl/Tk manual entries. +.\" +.\" .AP type name in/out ?indent? +.\" Start paragraph describing an argument to a library procedure. +.\" type is type of argument (int, etc.), in/out is either "in", "out", +.\" or "in/out" to describe whether procedure reads or modifies arg, +.\" and indent is equivalent to second arg of .IP (shouldn't ever be +.\" needed; use .AS below instead) +.\" +.\" .AS ?type? ?name? +.\" Give maximum sizes of arguments for setting tab stops. Type and +.\" name are examples of largest possible arguments that will be passed +.\" to .AP later. If args are omitted, default tab stops are used. +.\" +.\" .BS +.\" Start box enclosure. From here until next .BE, everything will be +.\" enclosed in one large box. +.\" +.\" .BE +.\" End of box enclosure. +.\" +.\" .CS +.\" Begin code excerpt. +.\" +.\" .CE +.\" End code excerpt. +.\" +.\" .VS ?version? ?br? +.\" Begin vertical sidebar, for use in marking newly-changed parts +.\" of man pages. The first argument is ignored and used for recording +.\" the version when the .VS was added, so that the sidebars can be +.\" found and removed when they reach a certain age. If another argument +.\" is present, then a line break is forced before starting the sidebar. +.\" +.\" .VE +.\" End of vertical sidebar. +.\" +.\" .DS +.\" Begin an indented unfilled display. +.\" +.\" .DE +.\" End of indented unfilled display. +.\" +.\" .SO ?manpage? +.\" Start of list of standard options for a Tk widget. The manpage +.\" argument defines where to look up the standard options; if +.\" omitted, defaults to "options". The options follow on successive +.\" lines, in three columns separated by tabs. +.\" +.\" .SE +.\" End of list of standard options for a Tk widget. +.\" +.\" .OP cmdName dbName dbClass +.\" Start of description of a specific option. cmdName gives the +.\" option's name as specified in the class command, dbName gives +.\" the option's name in the option database, and dbClass gives +.\" the option's class in the option database. +.\" +.\" .UL arg1 arg2 +.\" Print arg1 underlined, then print arg2 normally. +.\" +.\" .QW arg1 ?arg2? +.\" Print arg1 in quotes, then arg2 normally (for trailing punctuation). +.\" +.\" .PQ arg1 ?arg2? +.\" Print an open parenthesis, arg1 in quotes, then arg2 normally +.\" (for trailing punctuation) and then a closing parenthesis. +.\" +.\" # Set up traps and other miscellaneous stuff for Tcl/Tk man pages. +.if t .wh -1.3i ^B +.nr ^l \n(.l +.ad b +.\" # Start an argument description +.de AP +.ie !"\\$4"" .TP \\$4 +.el \{\ +. ie !"\\$2"" .TP \\n()Cu +. el .TP 15 +.\} +.ta \\n()Au \\n()Bu +.ie !"\\$3"" \{\ +\&\\$1 \\fI\\$2\\fP (\\$3) +.\".b +.\} +.el \{\ +.br +.ie !"\\$2"" \{\ +\&\\$1 \\fI\\$2\\fP +.\} +.el \{\ +\&\\fI\\$1\\fP +.\} +.\} +.. +.\" # define tabbing values for .AP +.de AS +.nr )A 10n +.if !"\\$1"" .nr )A \\w'\\$1'u+3n +.nr )B \\n()Au+15n +.\" +.if !"\\$2"" .nr )B \\w'\\$2'u+\\n()Au+3n +.nr )C \\n()Bu+\\w'(in/out)'u+2n +.. +.AS Tcl_Interp Tcl_CreateInterp in/out +.\" # BS - start boxed text +.\" # ^y = starting y location +.\" # ^b = 1 +.de BS +.br +.mk ^y +.nr ^b 1u +.if n .nf +.if n .ti 0 +.if n \l'\\n(.lu\(ul' +.if n .fi +.. +.\" # BE - end boxed text (draw box now) +.de BE +.nf +.ti 0 +.mk ^t +.ie n \l'\\n(^lu\(ul' +.el \{\ +.\" Draw four-sided box normally, but don't draw top of +.\" box if the box started on an earlier page. +.ie !\\n(^b-1 \{\ +\h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul' +.\} +.el \}\ +\h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul' +.\} +.\} +.fi +.br +.nr ^b 0 +.. +.\" # VS - start vertical sidebar +.\" # ^Y = starting y location +.\" # ^v = 1 (for troff; for nroff this doesn't matter) +.de VS +.if !"\\$2"" .br +.mk ^Y +.ie n 'mc \s12\(br\s0 +.el .nr ^v 1u +.. +.\" # VE - end of vertical sidebar +.de VE +.ie n 'mc +.el \{\ +.ev 2 +.nf +.ti 0 +.mk ^t +\h'|\\n(^lu+3n'\L'|\\n(^Yu-1v\(bv'\v'\\n(^tu+1v-\\n(^Yu'\h'-|\\n(^lu+3n' +.sp -1 +.fi +.ev +.\} +.nr ^v 0 +.. +.\" # Special macro to handle page bottom: finish off current +.\" # box/sidebar if in box/sidebar mode, then invoked standard +.\" # page bottom macro. +.de ^B +.ev 2 +'ti 0 +'nf +.mk ^t +.if \\n(^b \{\ +.\" Draw three-sided box if this is the box's first page, +.\" draw two sides but no top otherwise. +.ie !\\n(^b-1 \h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c +.el \h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c +.\} +.if \\n(^v \{\ +.nr ^x \\n(^tu+1v-\\n(^Yu +\kx\h'-\\nxu'\h'|\\n(^lu+3n'\ky\L'-\\n(^xu'\v'\\n(^xu'\h'|0u'\c +.\} +.bp +'fi +.ev +.if \\n(^b \{\ +.mk ^y +.nr ^b 2 +.\} +.if \\n(^v \{\ +.mk ^Y +.\} +.. +.\" # DS - begin display +.de DS +.RS +.nf +.sp +.. +.\" # DE - end display +.de DE +.fi +.RE +.sp +.. +.\" # SO - start of list of standard options +.de SO +'ie '\\$1'' .ds So \\fBoptions\\fR +'el .ds So \\fB\\$1\\fR +.SH "STANDARD OPTIONS" +.LP +.nf +.ta 5.5c 11c +.ft B +.. +.\" # SE - end of list of standard options +.de SE +.fi +.ft R +.LP +See the \\*(So manual entry for details on the standard options. +.. +.\" # OP - start of full description for a single option +.de OP +.LP +.nf +.ta 4c +Command-Line Name: \\fB\\$1\\fR +Database Name: \\fB\\$2\\fR +Database Class: \\fB\\$3\\fR +.fi +.IP +.. +.\" # CS - begin code excerpt +.de CS +.RS +.nf +.ta .25i .5i .75i 1i +.. +.\" # CE - end code excerpt +.de CE +.fi +.RE +.. +.\" # UL - underline word +.de UL +\\$1\l'|0\(ul'\\$2 +.. +.\" # QW - apply quotation marks to word +.de QW +.ie '\\*(lq'"' ``\\$1''\\$2 +.\"" fix emacs highlighting +.el \\*(lq\\$1\\*(rq\\$2 +.. +.\" # PQ - apply parens and quotation marks to word +.de PQ +.ie '\\*(lq'"' (``\\$1''\\$2)\\$3 +.\"" fix emacs highlighting +.el (\\*(lq\\$1\\*(rq\\$2)\\$3 +.. +.\" # QR - quoted range +.de QR +.ie '\\*(lq'"' ``\\$1''\\-``\\$2''\\$3 +.\"" fix emacs highlighting +.el \\*(lq\\$1\\*(rq\\-\\*(lq\\$2\\*(rq\\$3 +.. +.\" # MT - "empty" string +.de MT +.QW "" +.. +.BS +.SH NAME +autoscroll \- Provides for a scrollbar to automatically mapped and unmapped as needed +.SH SYNOPSIS +package require \fBTcl \fR +.sp +package require \fBautoscroll ?1\&.1?\fR +.sp +\fB::autoscroll::autoscroll\fR \fIscrollbar\fR +.sp +\fB::autoscroll::unautoscroll\fR \fIscrollbar\fR +.sp +\fB::autoscroll::wrap\fR +.sp +\fB::autoscroll::unwrap\fR +.sp +.BE +.SH DESCRIPTION +This package allows scrollbars to be mapped and +unmapped as needed depending on the size and +content of the scrollbars scrolled widget\&. The +scrollbar must be managed by either pack or grid, +other geometry managers are not supported\&. +.PP +When managed by pack, any geometry changes made in the +scrollbars parent between the time a scrollbar is +unmapped, and when it is mapped will be lost\&. It is +an error to destroy any of the scrollbars siblings while the +scrollbar is unmapped\&. When managed by grid, if anything +becomes gridded in the same row and column the scrollbar +occupied it will be replaced by the scrollbar when remapped\&. +.PP +This package may be used on any scrollbar-like widget +as long as it supports the \fBset\fR subcommand in the same +style as scrollbar\&. If the \fBset\fR subcommand is not used +then this package will have no effect\&. +.PP +.TP +\fB::autoscroll::autoscroll\fR \fIscrollbar\fR +Arranges for the already existing scrollbar \fBscrollbar\fR +to be mapped and unmapped as needed\&. +.TP +\fB::autoscroll::unautoscroll\fR \fIscrollbar\fR +Returns the named scrollbar to its original static state\&. +.TP +\fB::autoscroll::wrap\fR +Arranges for all scrollbars created after this command is run +to be automatically mapped and unmapped as needed\&. +.TP +\fB::autoscroll::unwrap\fR +Turns off the automatic autoscrolling of all new scrollbars\&. +Does not effect existing scrollbars +.PP +.CS + + +text \&.t -yscrollcommand "\&.scrolly set" +scrollbar \&.scrolly -orient v -command "\&.t yview" +pack \&.scrolly -side right -fill y +pack \&.t -side left -fill both -expand 1 +::autoscroll::autoscroll \&.scrolly + +.CE +.SH "BUGS, IDEAS, FEEDBACK" +This document, and the package it describes, will undoubtedly contain +bugs and other problems\&. +Please report such in the category \fIautoscroll\fR of the +\fITklib Trackers\fR [http://core\&.tcl\&.tk/tklib/reportlist]\&. +Please also report any ideas for enhancements you may have for either +package and/or documentation\&. +.SH KEYWORDS +scroll, scrollbar \ No newline at end of file diff --git a/embedded/man/files/modules/canvas/canvas_drag.n b/embedded/man/files/modules/canvas/canvas_drag.n new file mode 100644 index 00000000..e5b547f3 --- /dev/null +++ b/embedded/man/files/modules/canvas/canvas_drag.n @@ -0,0 +1,417 @@ +'\" +'\" Generated from file 'canvas_drag\&.man' by tcllib/doctools with format 'nroff' +'\" +.TH "canvas::drag" n 0\&.1 tklib "Variations on a canvas" +.\" The -*- nroff -*- definitions below are for supplemental macros used +.\" in Tcl/Tk manual entries. +.\" +.\" .AP type name in/out ?indent? +.\" Start paragraph describing an argument to a library procedure. +.\" type is type of argument (int, etc.), in/out is either "in", "out", +.\" or "in/out" to describe whether procedure reads or modifies arg, +.\" and indent is equivalent to second arg of .IP (shouldn't ever be +.\" needed; use .AS below instead) +.\" +.\" .AS ?type? ?name? +.\" Give maximum sizes of arguments for setting tab stops. Type and +.\" name are examples of largest possible arguments that will be passed +.\" to .AP later. If args are omitted, default tab stops are used. +.\" +.\" .BS +.\" Start box enclosure. From here until next .BE, everything will be +.\" enclosed in one large box. +.\" +.\" .BE +.\" End of box enclosure. +.\" +.\" .CS +.\" Begin code excerpt. +.\" +.\" .CE +.\" End code excerpt. +.\" +.\" .VS ?version? ?br? +.\" Begin vertical sidebar, for use in marking newly-changed parts +.\" of man pages. The first argument is ignored and used for recording +.\" the version when the .VS was added, so that the sidebars can be +.\" found and removed when they reach a certain age. If another argument +.\" is present, then a line break is forced before starting the sidebar. +.\" +.\" .VE +.\" End of vertical sidebar. +.\" +.\" .DS +.\" Begin an indented unfilled display. +.\" +.\" .DE +.\" End of indented unfilled display. +.\" +.\" .SO ?manpage? +.\" Start of list of standard options for a Tk widget. The manpage +.\" argument defines where to look up the standard options; if +.\" omitted, defaults to "options". The options follow on successive +.\" lines, in three columns separated by tabs. +.\" +.\" .SE +.\" End of list of standard options for a Tk widget. +.\" +.\" .OP cmdName dbName dbClass +.\" Start of description of a specific option. cmdName gives the +.\" option's name as specified in the class command, dbName gives +.\" the option's name in the option database, and dbClass gives +.\" the option's class in the option database. +.\" +.\" .UL arg1 arg2 +.\" Print arg1 underlined, then print arg2 normally. +.\" +.\" .QW arg1 ?arg2? +.\" Print arg1 in quotes, then arg2 normally (for trailing punctuation). +.\" +.\" .PQ arg1 ?arg2? +.\" Print an open parenthesis, arg1 in quotes, then arg2 normally +.\" (for trailing punctuation) and then a closing parenthesis. +.\" +.\" # Set up traps and other miscellaneous stuff for Tcl/Tk man pages. +.if t .wh -1.3i ^B +.nr ^l \n(.l +.ad b +.\" # Start an argument description +.de AP +.ie !"\\$4"" .TP \\$4 +.el \{\ +. ie !"\\$2"" .TP \\n()Cu +. el .TP 15 +.\} +.ta \\n()Au \\n()Bu +.ie !"\\$3"" \{\ +\&\\$1 \\fI\\$2\\fP (\\$3) +.\".b +.\} +.el \{\ +.br +.ie !"\\$2"" \{\ +\&\\$1 \\fI\\$2\\fP +.\} +.el \{\ +\&\\fI\\$1\\fP +.\} +.\} +.. +.\" # define tabbing values for .AP +.de AS +.nr )A 10n +.if !"\\$1"" .nr )A \\w'\\$1'u+3n +.nr )B \\n()Au+15n +.\" +.if !"\\$2"" .nr )B \\w'\\$2'u+\\n()Au+3n +.nr )C \\n()Bu+\\w'(in/out)'u+2n +.. +.AS Tcl_Interp Tcl_CreateInterp in/out +.\" # BS - start boxed text +.\" # ^y = starting y location +.\" # ^b = 1 +.de BS +.br +.mk ^y +.nr ^b 1u +.if n .nf +.if n .ti 0 +.if n \l'\\n(.lu\(ul' +.if n .fi +.. +.\" # BE - end boxed text (draw box now) +.de BE +.nf +.ti 0 +.mk ^t +.ie n \l'\\n(^lu\(ul' +.el \{\ +.\" Draw four-sided box normally, but don't draw top of +.\" box if the box started on an earlier page. +.ie !\\n(^b-1 \{\ +\h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul' +.\} +.el \}\ +\h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul' +.\} +.\} +.fi +.br +.nr ^b 0 +.. +.\" # VS - start vertical sidebar +.\" # ^Y = starting y location +.\" # ^v = 1 (for troff; for nroff this doesn't matter) +.de VS +.if !"\\$2"" .br +.mk ^Y +.ie n 'mc \s12\(br\s0 +.el .nr ^v 1u +.. +.\" # VE - end of vertical sidebar +.de VE +.ie n 'mc +.el \{\ +.ev 2 +.nf +.ti 0 +.mk ^t +\h'|\\n(^lu+3n'\L'|\\n(^Yu-1v\(bv'\v'\\n(^tu+1v-\\n(^Yu'\h'-|\\n(^lu+3n' +.sp -1 +.fi +.ev +.\} +.nr ^v 0 +.. +.\" # Special macro to handle page bottom: finish off current +.\" # box/sidebar if in box/sidebar mode, then invoked standard +.\" # page bottom macro. +.de ^B +.ev 2 +'ti 0 +'nf +.mk ^t +.if \\n(^b \{\ +.\" Draw three-sided box if this is the box's first page, +.\" draw two sides but no top otherwise. +.ie !\\n(^b-1 \h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c +.el \h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c +.\} +.if \\n(^v \{\ +.nr ^x \\n(^tu+1v-\\n(^Yu +\kx\h'-\\nxu'\h'|\\n(^lu+3n'\ky\L'-\\n(^xu'\v'\\n(^xu'\h'|0u'\c +.\} +.bp +'fi +.ev +.if \\n(^b \{\ +.mk ^y +.nr ^b 2 +.\} +.if \\n(^v \{\ +.mk ^Y +.\} +.. +.\" # DS - begin display +.de DS +.RS +.nf +.sp +.. +.\" # DE - end display +.de DE +.fi +.RE +.sp +.. +.\" # SO - start of list of standard options +.de SO +'ie '\\$1'' .ds So \\fBoptions\\fR +'el .ds So \\fB\\$1\\fR +.SH "STANDARD OPTIONS" +.LP +.nf +.ta 5.5c 11c +.ft B +.. +.\" # SE - end of list of standard options +.de SE +.fi +.ft R +.LP +See the \\*(So manual entry for details on the standard options. +.. +.\" # OP - start of full description for a single option +.de OP +.LP +.nf +.ta 4c +Command-Line Name: \\fB\\$1\\fR +Database Name: \\fB\\$2\\fR +Database Class: \\fB\\$3\\fR +.fi +.IP +.. +.\" # CS - begin code excerpt +.de CS +.RS +.nf +.ta .25i .5i .75i 1i +.. +.\" # CE - end code excerpt +.de CE +.fi +.RE +.. +.\" # UL - underline word +.de UL +\\$1\l'|0\(ul'\\$2 +.. +.\" # QW - apply quotation marks to word +.de QW +.ie '\\*(lq'"' ``\\$1''\\$2 +.\"" fix emacs highlighting +.el \\*(lq\\$1\\*(rq\\$2 +.. +.\" # PQ - apply parens and quotation marks to word +.de PQ +.ie '\\*(lq'"' (``\\$1''\\$2)\\$3 +.\"" fix emacs highlighting +.el (\\*(lq\\$1\\*(rq\\$2)\\$3 +.. +.\" # QR - quoted range +.de QR +.ie '\\*(lq'"' ``\\$1''\\-``\\$2''\\$3 +.\"" fix emacs highlighting +.el \\*(lq\\$1\\*(rq\\-\\*(lq\\$2\\*(rq\\$3 +.. +.\" # MT - "empty" string +.de MT +.QW "" +.. +.BS +.SH NAME +canvas::drag \- Manage the dragging of canvas items or item groups +.SH SYNOPSIS +package require \fBTcl 8\&.5\fR +.sp +package require \fBTk 8\&.5\fR +.sp +package require \fBcanvas::drag ?0\&.1?\fR +.sp +\fB::canvas::drag\fR \fBon\fR \fIcanvas\fR \fItagOrId\fR \fIcmd\fR \fIoption\fR\&.\&.\&. +.sp +\fB::canvas::drag\fR \fBoff\fR \fIcanvas\fR \fItagOrId\fR +.sp +\fB::canvas::drag\fR \fBitem\fR \fIcanvas\fR \fItagOrId\fR \fIoption\fR\&.\&.\&. +.sp +\fB::canvas::drag\fR \fBgroup\fR \fIcanvas\fR \fItagOrId\fR \fIcmd\fR \fIoption\fR\&.\&.\&. +.sp +\fB{*}cmd\fR \fBstart\fR \fIcanvas\fR \fIitem\fR +.sp +\fB{*}cmd\fR \fBmove\fR \fIcanvas\fR \fIclientdata\fR \fIdx\fR \fIdy\fR +.sp +\fB{*}cmd\fR \fBdone\fR \fIcanvas\fR \fIclientdata\fR +.sp +.BE +.SH DESCRIPTION +This package provides utility commands to setup and rmeove dragging of +items or item groups on a canvas, hiding all complexity regarding +bindings from the user\&. +.SH API +.TP +\fB::canvas::drag\fR \fBon\fR \fIcanvas\fR \fItagOrId\fR \fIcmd\fR \fIoption\fR\&.\&.\&. +This command initializes item dragging on the \fIcanvas\fR widget, +with the items used as drag handles identified by \fItagOrId\fR\&. +The command prefix \fIcmd\fR, invoked for drag start and movement, is +responsible for the initialization and actual execution of the drag +operation\&. +.sp +The signature of the command prefix is described later, in +section \fBDrag callback\fR\&. +.sp +Similarly, the accepted options and their values are described +in section \fBOptions\fR +.sp +The result of the command is the empty string\&. +.TP +\fB::canvas::drag\fR \fBoff\fR \fIcanvas\fR \fItagOrId\fR +This command removes any drag operation set on the items of canvas +\fIcanvas\fR identified by \fItagOrId\fR\&. +.sp +The result of the command is the empty string\&. +.TP +\fB::canvas::drag\fR \fBitem\fR \fIcanvas\fR \fItagOrId\fR \fIoption\fR\&.\&.\&. +This is a convenience command wrapped around method \fBon\fR (see above) +to drag single items of the \fIcanvas\fR widget, identified by \fItagOrId\fR\&. +.sp +It uses an internal standard callback for this\&. +.sp +The result of the command is the empty string\&. +.TP +\fB::canvas::drag\fR \fBgroup\fR \fIcanvas\fR \fItagOrId\fR \fIcmd\fR \fIoption\fR\&.\&.\&. +This is a convenience command wrapped around method \fBon\fR (see above) +to drag single items of the \fIcanvas\fR widget, identified by \fItagOrId\fR\&. +.sp +It uses an internal standard callback for this\&. The callback +\fIcmd\fR specified has the same signature as the \fBDrag callback\fR, +except that +.RS +.IP [1] +The \fBmove\fR method is not invoked\&. +.IP [2] +The result of the \fBstart\fR method \fIhas to be\fR a +canvas tag refering to the whole group of items to move\&. In other words, +it must convert from drag handle (item id) to dragged groupt (tag)\&. +.RE +.sp +The result of the command is the empty string\&. +.PP +.SS "DRAG CALLBACK" +The drag callback is a command prefix invoked in the following two +ways: +.TP +\fB{*}cmd\fR \fBstart\fR \fIcanvas\fR \fIitem\fR +This form is invoked when has initiated dragging using drag handle +identified by the canvas \fIitem\fR id\&. +The callback now has to perform anything necessary for its type of +drag operation\&. +.sp +The result of the command can be anything\&. It is stored by the +system as client information and passed unchanged to the movement +callback for its use\&. In this manner the drag callback is able to +maintain custom state from start to movement\&. +.TP +\fB{*}cmd\fR \fBmove\fR \fIcanvas\fR \fIclientdata\fR \fIdx\fR \fIdy\fR +This form is invoked when the mouse moved during a drag operation\&. +It is invoked with the client data from the start callback (or the +previous move callback) and the distances the mouse has traveled in +horizontal and vertical directions\&. +.sp +The result of the command can be anything\&. It is stored by the +system as client information and passed unchanged to the next movement +callback for its use\&. In this manner the drag callback is able to +maintain custom state from movement to movement\&. +.TP +\fB{*}cmd\fR \fBdone\fR \fIcanvas\fR \fIclientdata\fR +This form is invoked when the drag operation ends\&. +It is invoked with the client data from the last movement callback (or +start callback if there had been no motion)\&. +.sp +The result of the command is ignored\&. +.PP +.SS OPTIONS +The commands to create drag operations (\fBon\fR, \fBitem\fR, +and \fBgroup\fR) all accept the following options to configure the +new drag\&. +.TP +\fB-event\fR \fIspec\fR +The value of this option specifies the mouse button used to initiate +the drag operation, and the keyboard modifier, if any\&. Examples of +specifications: +.sp +To initiate a drag operation by pressing mouse button 3 on a +drag handle, use: +.CS + + -event 3 +.CE +.IP +This is the default as well, if the option is not specified\&. +.sp +To initiate a drag operation by pressing mouse button 2 on a +drag handle while holding down the Control key, use: +.CS + + -event Control-2 +.CE +.PP +.SH "BUGS, IDEAS, FEEDBACK" +This document, and the package it describes, will undoubtedly contain +bugs and other problems\&. +Please report such in the category \fIcanvas\fR of the +\fITklib Trackers\fR [http://core\&.tcl\&.tk/tklib/reportlist]\&. +Please also report any ideas for enhancements you may have for either +package and/or documentation\&. +.SH KEYWORDS +canvas, dragging \ No newline at end of file diff --git a/embedded/man/files/modules/canvas/canvas_epoints.n b/embedded/man/files/modules/canvas/canvas_epoints.n new file mode 100644 index 00000000..74b42f70 --- /dev/null +++ b/embedded/man/files/modules/canvas/canvas_epoints.n @@ -0,0 +1,541 @@ +'\" +'\" Generated from file 'canvas_epoints\&.man' by tcllib/doctools with format 'nroff' +'\" +.TH "canvas::edit::points" n 0\&.1 tklib "Variations on a canvas" +.\" The -*- nroff -*- definitions below are for supplemental macros used +.\" in Tcl/Tk manual entries. +.\" +.\" .AP type name in/out ?indent? +.\" Start paragraph describing an argument to a library procedure. +.\" type is type of argument (int, etc.), in/out is either "in", "out", +.\" or "in/out" to describe whether procedure reads or modifies arg, +.\" and indent is equivalent to second arg of .IP (shouldn't ever be +.\" needed; use .AS below instead) +.\" +.\" .AS ?type? ?name? +.\" Give maximum sizes of arguments for setting tab stops. Type and +.\" name are examples of largest possible arguments that will be passed +.\" to .AP later. If args are omitted, default tab stops are used. +.\" +.\" .BS +.\" Start box enclosure. From here until next .BE, everything will be +.\" enclosed in one large box. +.\" +.\" .BE +.\" End of box enclosure. +.\" +.\" .CS +.\" Begin code excerpt. +.\" +.\" .CE +.\" End code excerpt. +.\" +.\" .VS ?version? ?br? +.\" Begin vertical sidebar, for use in marking newly-changed parts +.\" of man pages. The first argument is ignored and used for recording +.\" the version when the .VS was added, so that the sidebars can be +.\" found and removed when they reach a certain age. If another argument +.\" is present, then a line break is forced before starting the sidebar. +.\" +.\" .VE +.\" End of vertical sidebar. +.\" +.\" .DS +.\" Begin an indented unfilled display. +.\" +.\" .DE +.\" End of indented unfilled display. +.\" +.\" .SO ?manpage? +.\" Start of list of standard options for a Tk widget. The manpage +.\" argument defines where to look up the standard options; if +.\" omitted, defaults to "options". The options follow on successive +.\" lines, in three columns separated by tabs. +.\" +.\" .SE +.\" End of list of standard options for a Tk widget. +.\" +.\" .OP cmdName dbName dbClass +.\" Start of description of a specific option. cmdName gives the +.\" option's name as specified in the class command, dbName gives +.\" the option's name in the option database, and dbClass gives +.\" the option's class in the option database. +.\" +.\" .UL arg1 arg2 +.\" Print arg1 underlined, then print arg2 normally. +.\" +.\" .QW arg1 ?arg2? +.\" Print arg1 in quotes, then arg2 normally (for trailing punctuation). +.\" +.\" .PQ arg1 ?arg2? +.\" Print an open parenthesis, arg1 in quotes, then arg2 normally +.\" (for trailing punctuation) and then a closing parenthesis. +.\" +.\" # Set up traps and other miscellaneous stuff for Tcl/Tk man pages. +.if t .wh -1.3i ^B +.nr ^l \n(.l +.ad b +.\" # Start an argument description +.de AP +.ie !"\\$4"" .TP \\$4 +.el \{\ +. ie !"\\$2"" .TP \\n()Cu +. el .TP 15 +.\} +.ta \\n()Au \\n()Bu +.ie !"\\$3"" \{\ +\&\\$1 \\fI\\$2\\fP (\\$3) +.\".b +.\} +.el \{\ +.br +.ie !"\\$2"" \{\ +\&\\$1 \\fI\\$2\\fP +.\} +.el \{\ +\&\\fI\\$1\\fP +.\} +.\} +.. +.\" # define tabbing values for .AP +.de AS +.nr )A 10n +.if !"\\$1"" .nr )A \\w'\\$1'u+3n +.nr )B \\n()Au+15n +.\" +.if !"\\$2"" .nr )B \\w'\\$2'u+\\n()Au+3n +.nr )C \\n()Bu+\\w'(in/out)'u+2n +.. +.AS Tcl_Interp Tcl_CreateInterp in/out +.\" # BS - start boxed text +.\" # ^y = starting y location +.\" # ^b = 1 +.de BS +.br +.mk ^y +.nr ^b 1u +.if n .nf +.if n .ti 0 +.if n \l'\\n(.lu\(ul' +.if n .fi +.. +.\" # BE - end boxed text (draw box now) +.de BE +.nf +.ti 0 +.mk ^t +.ie n \l'\\n(^lu\(ul' +.el \{\ +.\" Draw four-sided box normally, but don't draw top of +.\" box if the box started on an earlier page. +.ie !\\n(^b-1 \{\ +\h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul' +.\} +.el \}\ +\h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul' +.\} +.\} +.fi +.br +.nr ^b 0 +.. +.\" # VS - start vertical sidebar +.\" # ^Y = starting y location +.\" # ^v = 1 (for troff; for nroff this doesn't matter) +.de VS +.if !"\\$2"" .br +.mk ^Y +.ie n 'mc \s12\(br\s0 +.el .nr ^v 1u +.. +.\" # VE - end of vertical sidebar +.de VE +.ie n 'mc +.el \{\ +.ev 2 +.nf +.ti 0 +.mk ^t +\h'|\\n(^lu+3n'\L'|\\n(^Yu-1v\(bv'\v'\\n(^tu+1v-\\n(^Yu'\h'-|\\n(^lu+3n' +.sp -1 +.fi +.ev +.\} +.nr ^v 0 +.. +.\" # Special macro to handle page bottom: finish off current +.\" # box/sidebar if in box/sidebar mode, then invoked standard +.\" # page bottom macro. +.de ^B +.ev 2 +'ti 0 +'nf +.mk ^t +.if \\n(^b \{\ +.\" Draw three-sided box if this is the box's first page, +.\" draw two sides but no top otherwise. +.ie !\\n(^b-1 \h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c +.el \h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c +.\} +.if \\n(^v \{\ +.nr ^x \\n(^tu+1v-\\n(^Yu +\kx\h'-\\nxu'\h'|\\n(^lu+3n'\ky\L'-\\n(^xu'\v'\\n(^xu'\h'|0u'\c +.\} +.bp +'fi +.ev +.if \\n(^b \{\ +.mk ^y +.nr ^b 2 +.\} +.if \\n(^v \{\ +.mk ^Y +.\} +.. +.\" # DS - begin display +.de DS +.RS +.nf +.sp +.. +.\" # DE - end display +.de DE +.fi +.RE +.sp +.. +.\" # SO - start of list of standard options +.de SO +'ie '\\$1'' .ds So \\fBoptions\\fR +'el .ds So \\fB\\$1\\fR +.SH "STANDARD OPTIONS" +.LP +.nf +.ta 5.5c 11c +.ft B +.. +.\" # SE - end of list of standard options +.de SE +.fi +.ft R +.LP +See the \\*(So manual entry for details on the standard options. +.. +.\" # OP - start of full description for a single option +.de OP +.LP +.nf +.ta 4c +Command-Line Name: \\fB\\$1\\fR +Database Name: \\fB\\$2\\fR +Database Class: \\fB\\$3\\fR +.fi +.IP +.. +.\" # CS - begin code excerpt +.de CS +.RS +.nf +.ta .25i .5i .75i 1i +.. +.\" # CE - end code excerpt +.de CE +.fi +.RE +.. +.\" # UL - underline word +.de UL +\\$1\l'|0\(ul'\\$2 +.. +.\" # QW - apply quotation marks to word +.de QW +.ie '\\*(lq'"' ``\\$1''\\$2 +.\"" fix emacs highlighting +.el \\*(lq\\$1\\*(rq\\$2 +.. +.\" # PQ - apply parens and quotation marks to word +.de PQ +.ie '\\*(lq'"' (``\\$1''\\$2)\\$3 +.\"" fix emacs highlighting +.el (\\*(lq\\$1\\*(rq\\$2)\\$3 +.. +.\" # QR - quoted range +.de QR +.ie '\\*(lq'"' ``\\$1''\\-``\\$2''\\$3 +.\"" fix emacs highlighting +.el \\*(lq\\$1\\*(rq\\-\\*(lq\\$2\\*(rq\\$3 +.. +.\" # MT - "empty" string +.de MT +.QW "" +.. +.BS +.SH NAME +canvas::edit::points \- Editing a cloud of points on a canvas +.SH SYNOPSIS +package require \fBTcl 8\&.5\fR +.sp +package require \fBTk 8\&.5\fR +.sp +package require \fBcanvas::edit::points ?0\&.1?\fR +.sp +\fB::canvas::edit\fR \fBpoints\fR \fIobjectName\fR \fIcanvas\fR \fIoptions\fR\&.\&.\&. +.sp +\fBobjectName\fR \fBdestroy\fR +.sp +\fBobjectName\fR \fBenable\fR +.sp +\fBobjectName\fR \fBdisable\fR +.sp +\fBobjectName\fR \fBactive\fR +.sp +\fBobjectName\fR \fBadd\fR \fIx\fR \fIy\fR +.sp +\fBobjectName\fR \fBclear\fR +.sp +\fBcreateCmd\fR \fIcanvas\fR \fIx\fR \fIy\fR +.sp +\fBhighlightCmd\fR \fBon\fR \fIcanvas\fR \fIitem\fR +.sp +\fBhighlightCmd\fR \fBoff\fR \fIcanvas\fR \fIstate\fR +.sp +\fBdataCmd\fR \fBadd\fR \fIeditorObj\fR \fIid\fR \fIx\fR \fIy\fR +.sp +\fBdataCmd\fR \fBremove\fR \fIeditorObj\fR \fIid\fR +.sp +\fBdataCmd\fR \fBmove start\fR \fIeditorObj\fR \fIid\fR +.sp +\fBdataCmd\fR \fBmove delta\fR \fIeditorObj\fR \fIid\fR \fIx\fR \fIy\fR \fIdx\fR \fIdy\fR +.sp +\fBdataCmd\fR \fBmove done\fR \fIeditorObj\fR \fIid\fR +.sp +.BE +.SH DESCRIPTION +This package provides a class whose instances handle editing a cloud +of point markers on a canvas\&. Instances can be configured with regard +to the visual appearance of markers (regular, and highlighted)\&. Note +that instances do not store the edited points themselves, but delegate +this to a configurable object\&. +.SH "CLASS API" +.TP +\fB::canvas::edit\fR \fBpoints\fR \fIobjectName\fR \fIcanvas\fR \fIoptions\fR\&.\&.\&. +This, the class command, creates and configures a new instance of a +point cloud editor, named \fIobjectName\fR\&. The instance will be +connected to the specified \fIcanvas\fR widget\&. +.sp +The result of the command is the fully qualified name of the +instance command\&. +.sp +The options accepted here, and their values, are explained in +the section \fBOptions\fR\&. +.PP +.SH "INSTANCE API" +Instances of the point cloud editors provide the following API: +.TP +\fBobjectName\fR \fBdestroy\fR +This method destroys the point cloud editor and releases all its +internal resources\&. +.sp +Note that this operation does not destroy the items of the +point markers the editor managed on the attached canvas, nor the +canvas itself\&. +.sp +The result of the method is an empty string\&. +.TP +\fBobjectName\fR \fBenable\fR +This method activates editing of the point cloud on the canvas\&. This +is the default after instance creation\&. A call is ignored if the +editor is already active\&. +.sp +The result of the method is an empty string\&. +.sp +The complementary method is \fBdisable\fR\&. The interogatory +method for the current state is \fBactive\fR\&. +.TP +\fBobjectName\fR \fBdisable\fR +This method disables editing of the point cloud on the canvas\&. A call +is ignored if the editor is already disabled\&. +.sp +The result of the method is an empty string\&. +.sp +The complementary method is \fBenable\fR\&. The interogatory +method for the current state is \fBactive\fR\&. +.TP +\fBobjectName\fR \fBactive\fR +This method queries the editor state\&. +.sp +The result of the method is a boolean value, \fBtrue\fR if +the editor is active, and \fBfalse\fR otherwise, i\&.e\&. disabled\&. +.sp +The methods to change the state are \fBenable\fR and +\fBdisable\fR\&. +.TP +\fBobjectName\fR \fBadd\fR \fIx\fR \fIy\fR +This method programmatically creates a point at the specified location\&. +.sp +The result of the method is an empty string\&. +.sp +Note that this method goes through the whole set of callbacks +invoked when the user interactively creates a point, i\&.e\&. +\fB-create-cmd\fR, and, more importantly, \fB-data-cmd\fR\&. +.sp +This is the method through which to load pre-existing points +into an editor instance\&. +.TP +\fBobjectName\fR \fBclear\fR +This method programmatically removes all points from the editor\&. +.sp +The result of the method is an empty string\&. +.sp +Note that this method goes through the same callback invoked +when the user interactively removes a point, i\&.e\&. \fB-data-cmd\fR\&. +.PP +.SH OPTIONS +The class command accepts the following options +.TP +\fB-tag\fR \fIstring\fR +The value of this option is the name of the canvas tag with which to +identify all items of all points managed by the editor\&. +.sp +This option can only be set at construction time\&. +.sp +If not specified it defaults to \fBPOINT\fR +.TP +\fB-create-cmd\fR \fIcommand-prefix\fR +The value of this option is a command prefix the editor will invoke +when it has to create a new point\&. +.sp +This option can only be set at construction time\&. +.sp +If not specified it defaults to a command which will create a +black-bordered blue circle of radius 3 centered on the location of the +new point\&. +.sp +The signature of this command prefix is +.RS +.TP +\fBcreateCmd\fR \fIcanvas\fR \fIx\fR \fIy\fR +The result of the command prefix \fImust\fR be a list of the canvas +items it created to represent the marker\&. Note here that the visual +representation of a "point" may consist of multiple canvas items in an +arbitrary shape\&. +.sp +The returned list of items is allowed to be empty, and such is +taken as signal that the callback vetoed the creation of the point\&. +.RE +.TP +\fB-highlight-cmd\fR \fIcommand-prefix\fR +The value of this option is a command prefix the editor will invoke +when it has to (un)highlight a point\&. +.sp +This option can only be set at construction time\&. +.sp +If not specified it defaults to a command which will re-color +the item to highlight in red (and restores the color for +unhighlighting)\&. +.sp +The two signatures of this command prefix are +.RS +.TP +\fBhighlightCmd\fR \fBon\fR \fIcanvas\fR \fIitem\fR +.sp +This method of the command prefix has to perform whatever is +needed to highlight the point the \fIitem\fR is a part of (remember +the note above about points allowed to be constructed from multiple +canvas items)\&. +.sp +The result of the command can be anything and will be passed as +is as argument \fIstate\fR to the \fBoff\fR method\&. +.TP +\fBhighlightCmd\fR \fBoff\fR \fIcanvas\fR \fIstate\fR +.sp +This method is invoked to unhighlight a point described by the +\fIstate\fR, which is the unchanged result of the \fBon\fR method +of the command prefix\&. The result of this method is ignored\&. +.sp +Note any interaction between dragging and highlighting of +points is handled within the editor, and that the callback bears no +responsibility for doing such\&. +.RE +.TP +\fB-data-cmd\fR \fIcommand-prefix\fR +The value of this option is a command prefix the editor will invoke +when a point was edited in some way\&. This is how the editor delegates +the actual storage of point information to an outside object\&. +.sp +This option can only be set at construction time\&. +.sp +If not specified it defaults to an empty string and is ignored +by the editor, i\&.e\&. not invoked\&. +.sp +The signatures of this command prefix are +.RS +.TP +\fBdataCmd\fR \fBadd\fR \fIeditorObj\fR \fIid\fR \fIx\fR \fIy\fR +This callback is invoked when a new point was added to the instance, +either interactively, or programmatically\&. +See instance method \fBadd\fR for the latter\&. +.sp +The \fIid\fR identifies the point within the editor and will be +used by the two other callbacks to specify which point to modify\&. +.sp +The last two arguments \fIx\fR and \fIy\fR specify the location +of the new point in canvas coordinates\&. +.sp +The result of this method is ignored\&. +.TP +\fBdataCmd\fR \fBremove\fR \fIeditorObj\fR \fIid\fR +This callback is invoked when a point removed from the editor +instance\&. +.sp +The \fIid\fR identifies the removed point within the editor\&. +.sp +The result of this method is ignored\&. +.TP +\fBdataCmd\fR \fBmove start\fR \fIeditorObj\fR \fIid\fR +This callback is invoked when the movement of a point in the editor +instance has started\&. +.sp +The \fIid\fR identifies the point within the editor about to be +moved\&. +.sp +The result of this method is ignored\&. +.TP +\fBdataCmd\fR \fBmove delta\fR \fIeditorObj\fR \fIid\fR \fIx\fR \fIy\fR \fIdx\fR \fIdy\fR +This callback is invoked when the point moved in the editor instance\&. +.sp +The \fIid\fR identifies the moved point within the editor, and +the remaining arguments \fIx\fR, \fIy\fR, \fIdx\fR, and \fIdy\fR +provide the new absolute location of the point, and full delta to the +original location\&. +.sp +At the time of the calls the system is \fInot\fR committed to +the move yet\&. Only after method \fBmove done\fR was invoked and +has accepted or rejected the last position will the editor update its +internal data structures, either committing to the new location, or +rolling the move back to the original one\&. +.sp +Given this the location data provided here should be saved only +in temporary storage until then\&. +.sp +The result of this method is ignored\&. +.TP +\fBdataCmd\fR \fBmove done\fR \fIeditorObj\fR \fIid\fR +This callback is invoked when the movement of a point in the editor +instance is complete\&. +.sp +The \fIid\fR identifies the moved point within the editor\&. +.sp +The result of this method must be a boolean value\&. If the +method returns \fBfalse\fR the move is vetoed and rollbed back\&. +.RE +.PP +.SH "BUGS, IDEAS, FEEDBACK" +This document, and the package it describes, will undoubtedly contain +bugs and other problems\&. +Please report such in the category \fIcanvas\fR of the +\fITklib Trackers\fR [http://core\&.tcl\&.tk/tklib/reportlist]\&. +Please also report any ideas for enhancements you may have for either +package and/or documentation\&. +.SH KEYWORDS +canvas, editing, point cloud, points \ No newline at end of file diff --git a/embedded/man/files/modules/canvas/canvas_epolyline.n b/embedded/man/files/modules/canvas/canvas_epolyline.n new file mode 100644 index 00000000..df24f724 --- /dev/null +++ b/embedded/man/files/modules/canvas/canvas_epolyline.n @@ -0,0 +1,493 @@ +'\" +'\" Generated from file 'canvas_epolyline\&.man' by tcllib/doctools with format 'nroff' +'\" +.TH "canvas::edit::polyline" n 0\&.1 tklib "Variations on a canvas" +.\" The -*- nroff -*- definitions below are for supplemental macros used +.\" in Tcl/Tk manual entries. +.\" +.\" .AP type name in/out ?indent? +.\" Start paragraph describing an argument to a library procedure. +.\" type is type of argument (int, etc.), in/out is either "in", "out", +.\" or "in/out" to describe whether procedure reads or modifies arg, +.\" and indent is equivalent to second arg of .IP (shouldn't ever be +.\" needed; use .AS below instead) +.\" +.\" .AS ?type? ?name? +.\" Give maximum sizes of arguments for setting tab stops. Type and +.\" name are examples of largest possible arguments that will be passed +.\" to .AP later. If args are omitted, default tab stops are used. +.\" +.\" .BS +.\" Start box enclosure. From here until next .BE, everything will be +.\" enclosed in one large box. +.\" +.\" .BE +.\" End of box enclosure. +.\" +.\" .CS +.\" Begin code excerpt. +.\" +.\" .CE +.\" End code excerpt. +.\" +.\" .VS ?version? ?br? +.\" Begin vertical sidebar, for use in marking newly-changed parts +.\" of man pages. The first argument is ignored and used for recording +.\" the version when the .VS was added, so that the sidebars can be +.\" found and removed when they reach a certain age. If another argument +.\" is present, then a line break is forced before starting the sidebar. +.\" +.\" .VE +.\" End of vertical sidebar. +.\" +.\" .DS +.\" Begin an indented unfilled display. +.\" +.\" .DE +.\" End of indented unfilled display. +.\" +.\" .SO ?manpage? +.\" Start of list of standard options for a Tk widget. The manpage +.\" argument defines where to look up the standard options; if +.\" omitted, defaults to "options". The options follow on successive +.\" lines, in three columns separated by tabs. +.\" +.\" .SE +.\" End of list of standard options for a Tk widget. +.\" +.\" .OP cmdName dbName dbClass +.\" Start of description of a specific option. cmdName gives the +.\" option's name as specified in the class command, dbName gives +.\" the option's name in the option database, and dbClass gives +.\" the option's class in the option database. +.\" +.\" .UL arg1 arg2 +.\" Print arg1 underlined, then print arg2 normally. +.\" +.\" .QW arg1 ?arg2? +.\" Print arg1 in quotes, then arg2 normally (for trailing punctuation). +.\" +.\" .PQ arg1 ?arg2? +.\" Print an open parenthesis, arg1 in quotes, then arg2 normally +.\" (for trailing punctuation) and then a closing parenthesis. +.\" +.\" # Set up traps and other miscellaneous stuff for Tcl/Tk man pages. +.if t .wh -1.3i ^B +.nr ^l \n(.l +.ad b +.\" # Start an argument description +.de AP +.ie !"\\$4"" .TP \\$4 +.el \{\ +. ie !"\\$2"" .TP \\n()Cu +. el .TP 15 +.\} +.ta \\n()Au \\n()Bu +.ie !"\\$3"" \{\ +\&\\$1 \\fI\\$2\\fP (\\$3) +.\".b +.\} +.el \{\ +.br +.ie !"\\$2"" \{\ +\&\\$1 \\fI\\$2\\fP +.\} +.el \{\ +\&\\fI\\$1\\fP +.\} +.\} +.. +.\" # define tabbing values for .AP +.de AS +.nr )A 10n +.if !"\\$1"" .nr )A \\w'\\$1'u+3n +.nr )B \\n()Au+15n +.\" +.if !"\\$2"" .nr )B \\w'\\$2'u+\\n()Au+3n +.nr )C \\n()Bu+\\w'(in/out)'u+2n +.. +.AS Tcl_Interp Tcl_CreateInterp in/out +.\" # BS - start boxed text +.\" # ^y = starting y location +.\" # ^b = 1 +.de BS +.br +.mk ^y +.nr ^b 1u +.if n .nf +.if n .ti 0 +.if n \l'\\n(.lu\(ul' +.if n .fi +.. +.\" # BE - end boxed text (draw box now) +.de BE +.nf +.ti 0 +.mk ^t +.ie n \l'\\n(^lu\(ul' +.el \{\ +.\" Draw four-sided box normally, but don't draw top of +.\" box if the box started on an earlier page. +.ie !\\n(^b-1 \{\ +\h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul' +.\} +.el \}\ +\h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul' +.\} +.\} +.fi +.br +.nr ^b 0 +.. +.\" # VS - start vertical sidebar +.\" # ^Y = starting y location +.\" # ^v = 1 (for troff; for nroff this doesn't matter) +.de VS +.if !"\\$2"" .br +.mk ^Y +.ie n 'mc \s12\(br\s0 +.el .nr ^v 1u +.. +.\" # VE - end of vertical sidebar +.de VE +.ie n 'mc +.el \{\ +.ev 2 +.nf +.ti 0 +.mk ^t +\h'|\\n(^lu+3n'\L'|\\n(^Yu-1v\(bv'\v'\\n(^tu+1v-\\n(^Yu'\h'-|\\n(^lu+3n' +.sp -1 +.fi +.ev +.\} +.nr ^v 0 +.. +.\" # Special macro to handle page bottom: finish off current +.\" # box/sidebar if in box/sidebar mode, then invoked standard +.\" # page bottom macro. +.de ^B +.ev 2 +'ti 0 +'nf +.mk ^t +.if \\n(^b \{\ +.\" Draw three-sided box if this is the box's first page, +.\" draw two sides but no top otherwise. +.ie !\\n(^b-1 \h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c +.el \h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c +.\} +.if \\n(^v \{\ +.nr ^x \\n(^tu+1v-\\n(^Yu +\kx\h'-\\nxu'\h'|\\n(^lu+3n'\ky\L'-\\n(^xu'\v'\\n(^xu'\h'|0u'\c +.\} +.bp +'fi +.ev +.if \\n(^b \{\ +.mk ^y +.nr ^b 2 +.\} +.if \\n(^v \{\ +.mk ^Y +.\} +.. +.\" # DS - begin display +.de DS +.RS +.nf +.sp +.. +.\" # DE - end display +.de DE +.fi +.RE +.sp +.. +.\" # SO - start of list of standard options +.de SO +'ie '\\$1'' .ds So \\fBoptions\\fR +'el .ds So \\fB\\$1\\fR +.SH "STANDARD OPTIONS" +.LP +.nf +.ta 5.5c 11c +.ft B +.. +.\" # SE - end of list of standard options +.de SE +.fi +.ft R +.LP +See the \\*(So manual entry for details on the standard options. +.. +.\" # OP - start of full description for a single option +.de OP +.LP +.nf +.ta 4c +Command-Line Name: \\fB\\$1\\fR +Database Name: \\fB\\$2\\fR +Database Class: \\fB\\$3\\fR +.fi +.IP +.. +.\" # CS - begin code excerpt +.de CS +.RS +.nf +.ta .25i .5i .75i 1i +.. +.\" # CE - end code excerpt +.de CE +.fi +.RE +.. +.\" # UL - underline word +.de UL +\\$1\l'|0\(ul'\\$2 +.. +.\" # QW - apply quotation marks to word +.de QW +.ie '\\*(lq'"' ``\\$1''\\$2 +.\"" fix emacs highlighting +.el \\*(lq\\$1\\*(rq\\$2 +.. +.\" # PQ - apply parens and quotation marks to word +.de PQ +.ie '\\*(lq'"' (``\\$1''\\$2)\\$3 +.\"" fix emacs highlighting +.el (\\*(lq\\$1\\*(rq\\$2)\\$3 +.. +.\" # QR - quoted range +.de QR +.ie '\\*(lq'"' ``\\$1''\\-``\\$2''\\$3 +.\"" fix emacs highlighting +.el \\*(lq\\$1\\*(rq\\-\\*(lq\\$2\\*(rq\\$3 +.. +.\" # MT - "empty" string +.de MT +.QW "" +.. +.BS +.SH NAME +canvas::edit::polyline \- Editing a polyline on a canvas +.SH SYNOPSIS +package require \fBTcl 8\&.5\fR +.sp +package require \fBTk 8\&.5\fR +.sp +package require \fBcanvas::edit::points ?0\&.1?\fR +.sp +package require \fBcanvas::edit::polyline ?0\&.1?\fR +.sp +\fB::canvas::edit\fR \fBpolyline\fR \fIobjectName\fR \fIcanvas\fR \fIoptions\fR\&.\&.\&. +.sp +\fBobjectName\fR \fBdestroy\fR +.sp +\fBobjectName\fR \fBenable\fR +.sp +\fBobjectName\fR \fBdisable\fR +.sp +\fBobjectName\fR \fBactive\fR +.sp +\fBobjectName\fR \fBadd\fR \fIx\fR \fIy\fR +.sp +\fBobjectName\fR \fBclear\fR +.sp +\fBcreateCmd\fR \fIcanvas\fR \fIx\fR \fIy\fR +.sp +\fBhighlightCmd\fR \fBon\fR \fIcanvas\fR \fIitem\fR +.sp +\fBhighlightCmd\fR \fBoff\fR \fIcanvas\fR \fIstate\fR +.sp +\fBdataCmd\fR \fIeditorObj\fR \fIcoordinates\fR +.sp +.BE +.SH DESCRIPTION +This package provides a class whose instances handle editing a single +poly-line on a canvas\&. Instances can be configured with regard to the +visual appearance (regular, and highlighted) of the markers denoting +the line's vertices\&. Note that instances do not store the edited +polyline themselves, but delegate this to a configurable object\&. +.SH "CLASS API" +.TP +\fB::canvas::edit\fR \fBpolyline\fR \fIobjectName\fR \fIcanvas\fR \fIoptions\fR\&.\&.\&. +This, the class command, creates and configures a new instance of a +polyline editor, named \fIobjectName\fR\&. The instance will be +connected to the specified \fIcanvas\fR widget\&. +.sp +The result of the command is the fully qualified name of the +instance command\&. +.sp +The options accepted here, and their values, are explained in +the section \fBOptions\fR\&. +.PP +.SH "INSTANCE API" +Instances of the polyline editors provide the following API: +.TP +\fBobjectName\fR \fBdestroy\fR +This method destroys the polyline editor and releases all its +internal resources\&. +.sp +Note that this operation does not destroy the items the editor +managed on the attached canvas, nor the canvas itself\&. +.sp +The result of the method is an empty string\&. +.TP +\fBobjectName\fR \fBenable\fR +This method activates editing of the polyline on the canvas\&. This +is the default after instance creation\&. A call is ignored if the +editor is already active\&. +.sp +The result of the method is an empty string\&. +.sp +The complementary method is \fBdisable\fR\&. The interogatory +method for the current state is \fBactive\fR\&. +.TP +\fBobjectName\fR \fBdisable\fR +This method disables editing of the polyline on the canvas\&. A call +is ignored if the editor is already disabled\&. +.sp +The result of the method is an empty string\&. +.sp +The complementary method is \fBenable\fR\&. The interogatory +method for the current state is \fBactive\fR\&. +.TP +\fBobjectName\fR \fBactive\fR +This method queries the editor state\&. +.sp +The result of the method is a boolean value, \fBtrue\fR if +the editor is active, and \fBfalse\fR otherwise, i\&.e\&. disabled\&. +.sp +The methods to change the state are \fBenable\fR and +\fBdisable\fR\&. +.TP +\fBobjectName\fR \fBadd\fR \fIx\fR \fIy\fR +This method programmatically adds a vertex at the specified location to the line\&. +.sp +The result of the method is an empty string\&. +.sp +Note that this method goes through the whole set of callbacks +invoked when the user interactively creates a vertex, i\&.e\&. +\fB-create-cmd\fR, and, more importantly, \fB-data-cmd\fR\&. +.sp +One important difference however\&. The new vertex is always added +at the end of the line, whereas interactive creation uses heuristics +to splice it into the line at a suitable location\&. +.sp +This is the method through which to load the vertices of a +pre-existing line into an editor instance\&. +.TP +\fBobjectName\fR \fBclear\fR +This method programmatically removes all vertices from the editor, +essentially removing the whole line\&. +.sp +The result of the method is an empty string\&. +.sp +Note that this method goes through the same callbacks invoked +when the user interactively removes a vertex, i\&.e\&. \fB-data-cmd\fR\&. +.PP +.SH OPTIONS +The class command accepts the following options +.TP +\fB-tag\fR \fIstring\fR +The value of this option is the name of the canvas tag with which to +identify all items of all vertices managed by the editor\&. +.sp +This option can only be set at construction time\&. +.sp +If not specified it defaults to \fBPOLYLINE\fR +.TP +\fB-create-cmd\fR \fIcommand-prefix\fR +The value of this option is a command prefix the editor will invoke +when it has to create a new vertex\&. +.sp +This option can only be set at construction time\&. +.sp +If not specified it defaults to a command which will create a +black-bordered blue circle of radius 3 centered on the location of the +new point\&. +.sp +The signature of this command prefix is +.RS +.TP +\fBcreateCmd\fR \fIcanvas\fR \fIx\fR \fIy\fR +The result of the command prefix \fImust\fR be a list of the canvas +items it created to represent the marker\&. Note here that the visual +representation of a "vertex" may consist of multiple canvas items in +an arbitrary shape\&. +.sp +The returned list of items is allowed to be empty, and such is +taken as signal that the callback vetoed the creation of the vertex\&. +.RE +.TP +\fB-highlight-cmd\fR \fIcommand-prefix\fR +The value of this option is a command prefix the editor will invoke +when it has to (un)highlight a vertex\&. +.sp +This option can only be set at construction time\&. +.sp +If not specified it defaults to a command which will re-color +the item to highlight in red (and restores the color for +unhighlighting)\&. +.sp +The two signatures of this command prefix are +.RS +.TP +\fBhighlightCmd\fR \fBon\fR \fIcanvas\fR \fIitem\fR +.sp +This method of the command prefix has to perform whatever is +needed to highlight the vertex the \fIitem\fR is a part of (remember +the note above about points allowed to be constructed from multiple +canvas items)\&. +.sp +The result of the command can be anything and will be passed as +is as argument \fIstate\fR to the \fBoff\fR method\&. +.TP +\fBhighlightCmd\fR \fBoff\fR \fIcanvas\fR \fIstate\fR +.sp +This method is invoked to unhighlight a vertex described by the +\fIstate\fR, which is the unchanged result of the \fBon\fR method +of the command prefix\&. The result of this method is ignored\&. +.sp +Note any interaction between dragging and highlighting of +vertices is handled within the editor, and that the callback bears no +responsibility for doing such\&. +.RE +.TP +\fB-data-cmd\fR \fIcommand-prefix\fR +The value of this option is a command prefix the editor will invoke +when the line was edited in some way (vertex added, removed, +moved)\&. This is how the editor delegates the actual storage of the +line information to an outside object\&. +.sp +This option can only be set at construction time\&. +.sp +If not specified it defaults to an empty string and is ignored +by the editor, i\&.e\&. not invoked\&. +.sp +The signature of this command prefix is +.RS +.TP +\fBdataCmd\fR \fIeditorObj\fR \fIcoordinates\fR +This callback is invoked when the line was changed either interactively, +or programmatically\&. +See instance method \fBadd\fR for the latter\&. +.sp +The \fIeditorObj\fR identifies the instance invoking the +callback, whereas \fIcoordinates\fR is a list of vertex locations, +with each location a pair of x- and y-coordinates\&. +.sp +The result of this method is ignored\&. +.RE +.PP +.SH "BUGS, IDEAS, FEEDBACK" +This document, and the package it describes, will undoubtedly contain +bugs and other problems\&. +Please report such in the category \fIcanvas\fR of the +\fITklib Trackers\fR [http://core\&.tcl\&.tk/tklib/reportlist]\&. +Please also report any ideas for enhancements you may have for either +package and/or documentation\&. +.SH KEYWORDS +canvas, editing, polyline \ No newline at end of file diff --git a/embedded/man/files/modules/canvas/canvas_equad.n b/embedded/man/files/modules/canvas/canvas_equad.n new file mode 100644 index 00000000..d144b72b --- /dev/null +++ b/embedded/man/files/modules/canvas/canvas_equad.n @@ -0,0 +1,499 @@ +'\" +'\" Generated from file 'canvas_equad\&.man' by tcllib/doctools with format 'nroff' +'\" +.TH "canvas::edit::quadrilateral" n 0\&.1 tklib "Variations on a canvas" +.\" The -*- nroff -*- definitions below are for supplemental macros used +.\" in Tcl/Tk manual entries. +.\" +.\" .AP type name in/out ?indent? +.\" Start paragraph describing an argument to a library procedure. +.\" type is type of argument (int, etc.), in/out is either "in", "out", +.\" or "in/out" to describe whether procedure reads or modifies arg, +.\" and indent is equivalent to second arg of .IP (shouldn't ever be +.\" needed; use .AS below instead) +.\" +.\" .AS ?type? ?name? +.\" Give maximum sizes of arguments for setting tab stops. Type and +.\" name are examples of largest possible arguments that will be passed +.\" to .AP later. If args are omitted, default tab stops are used. +.\" +.\" .BS +.\" Start box enclosure. From here until next .BE, everything will be +.\" enclosed in one large box. +.\" +.\" .BE +.\" End of box enclosure. +.\" +.\" .CS +.\" Begin code excerpt. +.\" +.\" .CE +.\" End code excerpt. +.\" +.\" .VS ?version? ?br? +.\" Begin vertical sidebar, for use in marking newly-changed parts +.\" of man pages. The first argument is ignored and used for recording +.\" the version when the .VS was added, so that the sidebars can be +.\" found and removed when they reach a certain age. If another argument +.\" is present, then a line break is forced before starting the sidebar. +.\" +.\" .VE +.\" End of vertical sidebar. +.\" +.\" .DS +.\" Begin an indented unfilled display. +.\" +.\" .DE +.\" End of indented unfilled display. +.\" +.\" .SO ?manpage? +.\" Start of list of standard options for a Tk widget. The manpage +.\" argument defines where to look up the standard options; if +.\" omitted, defaults to "options". The options follow on successive +.\" lines, in three columns separated by tabs. +.\" +.\" .SE +.\" End of list of standard options for a Tk widget. +.\" +.\" .OP cmdName dbName dbClass +.\" Start of description of a specific option. cmdName gives the +.\" option's name as specified in the class command, dbName gives +.\" the option's name in the option database, and dbClass gives +.\" the option's class in the option database. +.\" +.\" .UL arg1 arg2 +.\" Print arg1 underlined, then print arg2 normally. +.\" +.\" .QW arg1 ?arg2? +.\" Print arg1 in quotes, then arg2 normally (for trailing punctuation). +.\" +.\" .PQ arg1 ?arg2? +.\" Print an open parenthesis, arg1 in quotes, then arg2 normally +.\" (for trailing punctuation) and then a closing parenthesis. +.\" +.\" # Set up traps and other miscellaneous stuff for Tcl/Tk man pages. +.if t .wh -1.3i ^B +.nr ^l \n(.l +.ad b +.\" # Start an argument description +.de AP +.ie !"\\$4"" .TP \\$4 +.el \{\ +. ie !"\\$2"" .TP \\n()Cu +. el .TP 15 +.\} +.ta \\n()Au \\n()Bu +.ie !"\\$3"" \{\ +\&\\$1 \\fI\\$2\\fP (\\$3) +.\".b +.\} +.el \{\ +.br +.ie !"\\$2"" \{\ +\&\\$1 \\fI\\$2\\fP +.\} +.el \{\ +\&\\fI\\$1\\fP +.\} +.\} +.. +.\" # define tabbing values for .AP +.de AS +.nr )A 10n +.if !"\\$1"" .nr )A \\w'\\$1'u+3n +.nr )B \\n()Au+15n +.\" +.if !"\\$2"" .nr )B \\w'\\$2'u+\\n()Au+3n +.nr )C \\n()Bu+\\w'(in/out)'u+2n +.. +.AS Tcl_Interp Tcl_CreateInterp in/out +.\" # BS - start boxed text +.\" # ^y = starting y location +.\" # ^b = 1 +.de BS +.br +.mk ^y +.nr ^b 1u +.if n .nf +.if n .ti 0 +.if n \l'\\n(.lu\(ul' +.if n .fi +.. +.\" # BE - end boxed text (draw box now) +.de BE +.nf +.ti 0 +.mk ^t +.ie n \l'\\n(^lu\(ul' +.el \{\ +.\" Draw four-sided box normally, but don't draw top of +.\" box if the box started on an earlier page. +.ie !\\n(^b-1 \{\ +\h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul' +.\} +.el \}\ +\h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul' +.\} +.\} +.fi +.br +.nr ^b 0 +.. +.\" # VS - start vertical sidebar +.\" # ^Y = starting y location +.\" # ^v = 1 (for troff; for nroff this doesn't matter) +.de VS +.if !"\\$2"" .br +.mk ^Y +.ie n 'mc \s12\(br\s0 +.el .nr ^v 1u +.. +.\" # VE - end of vertical sidebar +.de VE +.ie n 'mc +.el \{\ +.ev 2 +.nf +.ti 0 +.mk ^t +\h'|\\n(^lu+3n'\L'|\\n(^Yu-1v\(bv'\v'\\n(^tu+1v-\\n(^Yu'\h'-|\\n(^lu+3n' +.sp -1 +.fi +.ev +.\} +.nr ^v 0 +.. +.\" # Special macro to handle page bottom: finish off current +.\" # box/sidebar if in box/sidebar mode, then invoked standard +.\" # page bottom macro. +.de ^B +.ev 2 +'ti 0 +'nf +.mk ^t +.if \\n(^b \{\ +.\" Draw three-sided box if this is the box's first page, +.\" draw two sides but no top otherwise. +.ie !\\n(^b-1 \h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c +.el \h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c +.\} +.if \\n(^v \{\ +.nr ^x \\n(^tu+1v-\\n(^Yu +\kx\h'-\\nxu'\h'|\\n(^lu+3n'\ky\L'-\\n(^xu'\v'\\n(^xu'\h'|0u'\c +.\} +.bp +'fi +.ev +.if \\n(^b \{\ +.mk ^y +.nr ^b 2 +.\} +.if \\n(^v \{\ +.mk ^Y +.\} +.. +.\" # DS - begin display +.de DS +.RS +.nf +.sp +.. +.\" # DE - end display +.de DE +.fi +.RE +.sp +.. +.\" # SO - start of list of standard options +.de SO +'ie '\\$1'' .ds So \\fBoptions\\fR +'el .ds So \\fB\\$1\\fR +.SH "STANDARD OPTIONS" +.LP +.nf +.ta 5.5c 11c +.ft B +.. +.\" # SE - end of list of standard options +.de SE +.fi +.ft R +.LP +See the \\*(So manual entry for details on the standard options. +.. +.\" # OP - start of full description for a single option +.de OP +.LP +.nf +.ta 4c +Command-Line Name: \\fB\\$1\\fR +Database Name: \\fB\\$2\\fR +Database Class: \\fB\\$3\\fR +.fi +.IP +.. +.\" # CS - begin code excerpt +.de CS +.RS +.nf +.ta .25i .5i .75i 1i +.. +.\" # CE - end code excerpt +.de CE +.fi +.RE +.. +.\" # UL - underline word +.de UL +\\$1\l'|0\(ul'\\$2 +.. +.\" # QW - apply quotation marks to word +.de QW +.ie '\\*(lq'"' ``\\$1''\\$2 +.\"" fix emacs highlighting +.el \\*(lq\\$1\\*(rq\\$2 +.. +.\" # PQ - apply parens and quotation marks to word +.de PQ +.ie '\\*(lq'"' (``\\$1''\\$2)\\$3 +.\"" fix emacs highlighting +.el (\\*(lq\\$1\\*(rq\\$2)\\$3 +.. +.\" # QR - quoted range +.de QR +.ie '\\*(lq'"' ``\\$1''\\-``\\$2''\\$3 +.\"" fix emacs highlighting +.el \\*(lq\\$1\\*(rq\\-\\*(lq\\$2\\*(rq\\$3 +.. +.\" # MT - "empty" string +.de MT +.QW "" +.. +.BS +.SH NAME +canvas::edit::quadrilateral \- Editing a quadrilateral on a canvas +.SH SYNOPSIS +package require \fBTcl 8\&.5\fR +.sp +package require \fBTk 8\&.5\fR +.sp +package require \fBcanvas::edit::points ?0\&.1?\fR +.sp +package require \fBcanvas::edit::quadrilateral ?0\&.1?\fR +.sp +\fB::canvas::edit\fR \fBquadrilateral\fR \fIobjectName\fR \fIcanvas\fR \fIoptions\fR\&.\&.\&. +.sp +\fBobjectName\fR \fBdestroy\fR +.sp +\fBobjectName\fR \fBenable\fR +.sp +\fBobjectName\fR \fBdisable\fR +.sp +\fBobjectName\fR \fBactive\fR +.sp +\fBobjectName\fR \fBadd\fR \fIx\fR \fIy\fR +.sp +\fBobjectName\fR \fBclear\fR +.sp +\fBcreateCmd\fR \fIcanvas\fR \fIx\fR \fIy\fR +.sp +\fBhighlightCmd\fR \fBon\fR \fIcanvas\fR \fIitem\fR +.sp +\fBhighlightCmd\fR \fBoff\fR \fIcanvas\fR \fIstate\fR +.sp +\fBdataCmd\fR \fIeditorObj\fR \fIcoordinates\fR +.sp +.BE +.SH DESCRIPTION +This package provides a class whose instances handle the editing of a +quadrilateral on a canvas\&. Instances can be configured with regard to +the visual appearance (regular, and highlighted) of vertex +markers\&. Note that instances do not store the edited quadrilateral +themselves, but delegate this to a configurable object\&. +.SH "CLASS API" +.TP +\fB::canvas::edit\fR \fBquadrilateral\fR \fIobjectName\fR \fIcanvas\fR \fIoptions\fR\&.\&.\&. +This, the class command, creates and configures a new instance of a +quadrilateral editor, named \fIobjectName\fR\&. The instance will be +connected to the specified \fIcanvas\fR widget\&. +.sp +The result of the command is the fully qualified name of the +instance command\&. +.sp +The options accepted here, and their values, are explained in +the section \fBOptions\fR\&. +.PP +.SH "INSTANCE API" +Instances of the quadrilateral editors provide the following API: +.TP +\fBobjectName\fR \fBdestroy\fR +This method destroys the quadrilateral editor and releases all its +internal resources\&. +.sp +Note that this operation does not destroy the items the editor +managed on the attached canvas, nor the canvas itself\&. +.sp +The result of the method is an empty string\&. +.TP +\fBobjectName\fR \fBenable\fR +This method activates editing of the quadrilateral on the canvas\&. This +is the default after instance creation\&. A call is ignored if the +editor is already active\&. +.sp +The result of the method is an empty string\&. +.sp +The complementary method is \fBdisable\fR\&. The interogatory +method for the current state is \fBactive\fR\&. +.TP +\fBobjectName\fR \fBdisable\fR +This method disables editing of the quadrilateral on the canvas\&. A call +is ignored if the editor is already disabled\&. +.sp +The result of the method is an empty string\&. +.sp +The complementary method is \fBenable\fR\&. The interogatory +method for the current state is \fBactive\fR\&. +.TP +\fBobjectName\fR \fBactive\fR +This method queries the editor state\&. +.sp +The result of the method is a boolean value, \fBtrue\fR if +the editor is active, and \fBfalse\fR otherwise, i\&.e\&. disabled\&. +.sp +The methods to change the state are \fBenable\fR and +\fBdisable\fR\&. +.TP +\fBobjectName\fR \fBadd\fR \fIx\fR \fIy\fR +This method programmatically adds a vertex at the specified location +to the quadrilateral\&. +.sp +The result of the method is an empty string\&. +.sp +Note that this method goes through the whole set of callbacks +invoked when the user interactively creates a vertex, i\&.e\&. +\fB-create-cmd\fR, and, more importantly, \fB-data-cmd\fR\&. +.sp +This is the method through which to load the vertices of a +pre-existing quadrilateral into an editor instance\&. +.sp +Note that at most 4 vertices can be specified, and at least 4 +must be specified for the quadrilateral to be complete\&. +.TP +\fBobjectName\fR \fBclear\fR +This method programmatically unset the quadrilateral in the editor\&. +.sp +The result of the method is an empty string\&. +.sp +Note that this method goes through the same callback invoked +when the user interactively removes a vertex, i\&.e\&. \fB-data-cmd\fR\&. +.PP +.SH OPTIONS +The class command accepts the following options +.TP +\fB-convex\fR \fIboolean\fR +The value of this option is a boolean flag\&. When the flag is set the +editor will accept only convex quadrilaterals and reject all +operations which would result in a violation of convexity\&. +.sp +This option can only be set at construction time\&. +.sp +If not specified it defaults to \fBfalse\fR, i\&.e\&. acceptance +of any quadrilateral\&. +.TP +\fB-tag\fR \fIstring\fR +The value of this option is the name of the canvas tag with which to +identify all items of all quadrilateral managed by the editor\&. +.sp +This option can only be set at construction time\&. +.sp +If not specified it defaults to \fBQUADRILATERAL\fR +.TP +\fB-create-cmd\fR \fIcommand-prefix\fR +The value of this option is a command prefix the editor will invoke +when it has to create a new vertex\&. +.sp +This option can only be set at construction time\&. +.sp +If not specified it defaults to a command which will create a +black-bordered blue circle of radius 3 centered on the location of the +new point\&. +.sp +The signature of this command prefix is +.RS +.TP +\fBcreateCmd\fR \fIcanvas\fR \fIx\fR \fIy\fR +The result of the command prefix \fImust\fR be a list of the canvas +items it created to represent the marker\&. Note here that the visual +representation of a "vertex" may consist of multiple canvas items in an +arbitrary shape\&. +.RE +.TP +\fB-highlight-cmd\fR \fIcommand-prefix\fR +The value of this option is a command prefix the editor will invoke +when it has to (un)highlight a vertex\&. +.sp +This option can only be set at construction time\&. +.sp +If not specified it defaults to a command which will re-color +the item to highlight in red (and restores the color for +unhighlighting)\&. +.sp +The two signatures of this command prefix are +.RS +.TP +\fBhighlightCmd\fR \fBon\fR \fIcanvas\fR \fIitem\fR +.sp +This method of the command prefix has to perform whatever is +needed to highlight the vertex the \fIitem\fR is a part of (remember +the note above about quadrilateral allowed to be constructed from multiple +canvas items)\&. +.sp +The result of the command can be anything and will be passed as +is as argument \fIstate\fR to the \fBoff\fR method\&. +.TP +\fBhighlightCmd\fR \fBoff\fR \fIcanvas\fR \fIstate\fR +.sp +This method is invoked to unhighlight a vertex described by the +\fIstate\fR, which is the unchanged result of the \fBon\fR method +of the command prefix\&. The result of this method is ignored\&. +.sp +Note any interaction between dragging and highlighting of +quadrilateral is handled within the editor, and that the callback bears no +responsibility for doing such\&. +.RE +.TP +\fB-data-cmd\fR \fIcommand-prefix\fR +The value of this option is a command prefix the editor will invoke +when the quadrilateral was edited in some way\&. This is how the editor +delegates the actual storage of quadrilateral information to an +outside object\&. +.sp +This option can only be set at construction time\&. +.sp +If not specified it defaults to an empty string and is ignored +by the editor, i\&.e\&. not invoked\&. +.sp +The signatures of this command prefix are +.RS +.TP +\fBdataCmd\fR \fIeditorObj\fR \fIcoordinates\fR +This callback is invoked when the quarilateral was changed either +interactively, or programmatically\&. +See instance method \fBadd\fR for the latter\&. +.sp +The \fIeditorObj\fR identifies the instance invoking the +callback, whereas \fIcoordinates\fR is a list of vertex locations, +with each location a pair of x- and y-coordinates\&. +.sp +The result of this method is ignored\&. +.RE +.PP +.SH "BUGS, IDEAS, FEEDBACK" +This document, and the package it describes, will undoubtedly contain +bugs and other problems\&. +Please report such in the category \fIcanvas\fR of the +\fITklib Trackers\fR [http://core\&.tcl\&.tk/tklib/reportlist]\&. +Please also report any ideas for enhancements you may have for either +package and/or documentation\&. +.SH KEYWORDS +canvas, concave, convex, editing, non-convex, quadrilateral \ No newline at end of file diff --git a/embedded/man/files/modules/canvas/canvas_gradient.n b/embedded/man/files/modules/canvas/canvas_gradient.n new file mode 100644 index 00000000..ec86e4b5 --- /dev/null +++ b/embedded/man/files/modules/canvas/canvas_gradient.n @@ -0,0 +1,381 @@ +'\" +'\" Generated from file 'canvas_gradient\&.man' by tcllib/doctools with format 'nroff' +'\" Copyright (c) 2013 Jarek Lewandowski, MaxJarek +'\" Copyright (c) Origin http://wiki\&.tcl\&.tk/6100 +'\" Copyright (c) Origin http://wiki\&.tcl\&.tk/37242 +'\" Copyright (c) Origin http://wiki\&.tcl\&.tk/9079 +'\" +.TH "canvas::gradient" n 0\&.2 tklib "Variations on a canvas" +.\" The -*- nroff -*- definitions below are for supplemental macros used +.\" in Tcl/Tk manual entries. +.\" +.\" .AP type name in/out ?indent? +.\" Start paragraph describing an argument to a library procedure. +.\" type is type of argument (int, etc.), in/out is either "in", "out", +.\" or "in/out" to describe whether procedure reads or modifies arg, +.\" and indent is equivalent to second arg of .IP (shouldn't ever be +.\" needed; use .AS below instead) +.\" +.\" .AS ?type? ?name? +.\" Give maximum sizes of arguments for setting tab stops. Type and +.\" name are examples of largest possible arguments that will be passed +.\" to .AP later. If args are omitted, default tab stops are used. +.\" +.\" .BS +.\" Start box enclosure. From here until next .BE, everything will be +.\" enclosed in one large box. +.\" +.\" .BE +.\" End of box enclosure. +.\" +.\" .CS +.\" Begin code excerpt. +.\" +.\" .CE +.\" End code excerpt. +.\" +.\" .VS ?version? ?br? +.\" Begin vertical sidebar, for use in marking newly-changed parts +.\" of man pages. The first argument is ignored and used for recording +.\" the version when the .VS was added, so that the sidebars can be +.\" found and removed when they reach a certain age. If another argument +.\" is present, then a line break is forced before starting the sidebar. +.\" +.\" .VE +.\" End of vertical sidebar. +.\" +.\" .DS +.\" Begin an indented unfilled display. +.\" +.\" .DE +.\" End of indented unfilled display. +.\" +.\" .SO ?manpage? +.\" Start of list of standard options for a Tk widget. The manpage +.\" argument defines where to look up the standard options; if +.\" omitted, defaults to "options". The options follow on successive +.\" lines, in three columns separated by tabs. +.\" +.\" .SE +.\" End of list of standard options for a Tk widget. +.\" +.\" .OP cmdName dbName dbClass +.\" Start of description of a specific option. cmdName gives the +.\" option's name as specified in the class command, dbName gives +.\" the option's name in the option database, and dbClass gives +.\" the option's class in the option database. +.\" +.\" .UL arg1 arg2 +.\" Print arg1 underlined, then print arg2 normally. +.\" +.\" .QW arg1 ?arg2? +.\" Print arg1 in quotes, then arg2 normally (for trailing punctuation). +.\" +.\" .PQ arg1 ?arg2? +.\" Print an open parenthesis, arg1 in quotes, then arg2 normally +.\" (for trailing punctuation) and then a closing parenthesis. +.\" +.\" # Set up traps and other miscellaneous stuff for Tcl/Tk man pages. +.if t .wh -1.3i ^B +.nr ^l \n(.l +.ad b +.\" # Start an argument description +.de AP +.ie !"\\$4"" .TP \\$4 +.el \{\ +. ie !"\\$2"" .TP \\n()Cu +. el .TP 15 +.\} +.ta \\n()Au \\n()Bu +.ie !"\\$3"" \{\ +\&\\$1 \\fI\\$2\\fP (\\$3) +.\".b +.\} +.el \{\ +.br +.ie !"\\$2"" \{\ +\&\\$1 \\fI\\$2\\fP +.\} +.el \{\ +\&\\fI\\$1\\fP +.\} +.\} +.. +.\" # define tabbing values for .AP +.de AS +.nr )A 10n +.if !"\\$1"" .nr )A \\w'\\$1'u+3n +.nr )B \\n()Au+15n +.\" +.if !"\\$2"" .nr )B \\w'\\$2'u+\\n()Au+3n +.nr )C \\n()Bu+\\w'(in/out)'u+2n +.. +.AS Tcl_Interp Tcl_CreateInterp in/out +.\" # BS - start boxed text +.\" # ^y = starting y location +.\" # ^b = 1 +.de BS +.br +.mk ^y +.nr ^b 1u +.if n .nf +.if n .ti 0 +.if n \l'\\n(.lu\(ul' +.if n .fi +.. +.\" # BE - end boxed text (draw box now) +.de BE +.nf +.ti 0 +.mk ^t +.ie n \l'\\n(^lu\(ul' +.el \{\ +.\" Draw four-sided box normally, but don't draw top of +.\" box if the box started on an earlier page. +.ie !\\n(^b-1 \{\ +\h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul' +.\} +.el \}\ +\h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul' +.\} +.\} +.fi +.br +.nr ^b 0 +.. +.\" # VS - start vertical sidebar +.\" # ^Y = starting y location +.\" # ^v = 1 (for troff; for nroff this doesn't matter) +.de VS +.if !"\\$2"" .br +.mk ^Y +.ie n 'mc \s12\(br\s0 +.el .nr ^v 1u +.. +.\" # VE - end of vertical sidebar +.de VE +.ie n 'mc +.el \{\ +.ev 2 +.nf +.ti 0 +.mk ^t +\h'|\\n(^lu+3n'\L'|\\n(^Yu-1v\(bv'\v'\\n(^tu+1v-\\n(^Yu'\h'-|\\n(^lu+3n' +.sp -1 +.fi +.ev +.\} +.nr ^v 0 +.. +.\" # Special macro to handle page bottom: finish off current +.\" # box/sidebar if in box/sidebar mode, then invoked standard +.\" # page bottom macro. +.de ^B +.ev 2 +'ti 0 +'nf +.mk ^t +.if \\n(^b \{\ +.\" Draw three-sided box if this is the box's first page, +.\" draw two sides but no top otherwise. +.ie !\\n(^b-1 \h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c +.el \h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c +.\} +.if \\n(^v \{\ +.nr ^x \\n(^tu+1v-\\n(^Yu +\kx\h'-\\nxu'\h'|\\n(^lu+3n'\ky\L'-\\n(^xu'\v'\\n(^xu'\h'|0u'\c +.\} +.bp +'fi +.ev +.if \\n(^b \{\ +.mk ^y +.nr ^b 2 +.\} +.if \\n(^v \{\ +.mk ^Y +.\} +.. +.\" # DS - begin display +.de DS +.RS +.nf +.sp +.. +.\" # DE - end display +.de DE +.fi +.RE +.sp +.. +.\" # SO - start of list of standard options +.de SO +'ie '\\$1'' .ds So \\fBoptions\\fR +'el .ds So \\fB\\$1\\fR +.SH "STANDARD OPTIONS" +.LP +.nf +.ta 5.5c 11c +.ft B +.. +.\" # SE - end of list of standard options +.de SE +.fi +.ft R +.LP +See the \\*(So manual entry for details on the standard options. +.. +.\" # OP - start of full description for a single option +.de OP +.LP +.nf +.ta 4c +Command-Line Name: \\fB\\$1\\fR +Database Name: \\fB\\$2\\fR +Database Class: \\fB\\$3\\fR +.fi +.IP +.. +.\" # CS - begin code excerpt +.de CS +.RS +.nf +.ta .25i .5i .75i 1i +.. +.\" # CE - end code excerpt +.de CE +.fi +.RE +.. +.\" # UL - underline word +.de UL +\\$1\l'|0\(ul'\\$2 +.. +.\" # QW - apply quotation marks to word +.de QW +.ie '\\*(lq'"' ``\\$1''\\$2 +.\"" fix emacs highlighting +.el \\*(lq\\$1\\*(rq\\$2 +.. +.\" # PQ - apply parens and quotation marks to word +.de PQ +.ie '\\*(lq'"' (``\\$1''\\$2)\\$3 +.\"" fix emacs highlighting +.el (\\*(lq\\$1\\*(rq\\$2)\\$3 +.. +.\" # QR - quoted range +.de QR +.ie '\\*(lq'"' ``\\$1''\\-``\\$2''\\$3 +.\"" fix emacs highlighting +.el \\*(lq\\$1\\*(rq\\-\\*(lq\\$2\\*(rq\\$3 +.. +.\" # MT - "empty" string +.de MT +.QW "" +.. +.BS +.SH NAME +canvas::gradient \- Canvas with a gradient background +.SH SYNOPSIS +package require \fBTcl 8\&.5\fR +.sp +package require \fBTk 8\&.5\fR +.sp +package require \fBcanvas::gradient ?0\&.2?\fR +.sp +\fB::canvas::gradient\fR \fIpathName\fR ?options?\&.\&.\&. +.sp +.BE +.SH DESCRIPTION +This package provides a command to set background gradients on canvases\&. +.PP +\fINOTE!\fR This package reserves the canvas tag +\fBcanvas::gradient\fR for its use\&. +.SH API +.TP +\fB::canvas::gradient\fR \fIpathName\fR ?options?\&.\&.\&. +Creates a background gradient on the canvas \fIpathName\fR\&. +An existing gradient is replaced by the new definition\&. +.sp +The set of available options is decribed below, in +section \fBOptions\fR\&. +.PP +.SS OPTIONS +.TP +\fB-direction\fR \fIdirection\fR +The value for this option specifies the \fIdirection\fR of the gradient\&. +If not specified the system defaults to \fBx\fR, a horizontal gradient\&. +The package supports five directions: +.RS +.TP +\fBx\fR +for a horizontal gradient (default)\&. +Color changes along the x-axis, +with the start color at the left\&. +.TP +\fBy\fR +for a vertical gradient\&. +Color changes along the y-axis, +with the start color at the top\&. +.TP +\fBd1\fR +for a diagonal gradient from left+top to bottom+right\&. +Color changes along the diagonal\&. +with the start color at left+top\&. +.TP +\fBd2\fR +for a diagonal gradient from left+bottom to top+right\&. +Color changes along the diagonal\&. +with the start color at left+bottom\&. +.TP +\fBr\fR +for a radial gradient around the center of the viewport +Color changes from the center outward, +with the start color at the center\&. +.RE +.TP +\fB-color1\fR \fIcolor\fR +The value for this option specifies the starting color of the gradient\&. +If not specified it defaults to \fBred\fR\&. +.TP +\fB-color2\fR \fIcolor\fR +The value for this option specifies the ending color of the gradient\&. +If not specified it defaults to \fBgreen\fR\&. +.TP +\fB-type\fR \fItype\fR +The value for this option specifies how the gradient is calculated\&. +The package currently supports on ly one method, which is the +default, naturally: +.RS +.TP +\fBlinear\fR +for linear interpolation between the start and end colors (default)\&. +.RE +.PP +.SH EXAMPLE +.CS + + + package require canvas::gradient + canvas \&.c + canvas::gradient \&.c -direction x -color1 yellow -color2 blue + pack \&.c -fill both -expand 1 + +.CE +.SH "BUGS, IDEAS, FEEDBACK" +This document, and the package it describes, will undoubtedly contain +bugs and other problems\&. +Please report such in the category \fIcanvas\fR of the +\fITklib Trackers\fR [http://core\&.tcl\&.tk/tklib/reportlist]\&. +Please also report any ideas for enhancements you may have for either +package and/or documentation\&. +.SH KEYWORDS +background, canvas, color gradient, gradients, image, widget background +.SH COPYRIGHT +.nf +Copyright (c) 2013 Jarek Lewandowski, MaxJarek +Copyright (c) Origin http://wiki\&.tcl\&.tk/6100 +Copyright (c) Origin http://wiki\&.tcl\&.tk/37242 +Copyright (c) Origin http://wiki\&.tcl\&.tk/9079 + +.fi \ No newline at end of file diff --git a/embedded/man/files/modules/canvas/canvas_highlight.n b/embedded/man/files/modules/canvas/canvas_highlight.n new file mode 100644 index 00000000..2ce7d6a6 --- /dev/null +++ b/embedded/man/files/modules/canvas/canvas_highlight.n @@ -0,0 +1,359 @@ +'\" +'\" Generated from file 'canvas_highlight\&.man' by tcllib/doctools with format 'nroff' +'\" +.TH "canvas::highlight" n 0\&.1 tklib "Variations on a canvas" +.\" The -*- nroff -*- definitions below are for supplemental macros used +.\" in Tcl/Tk manual entries. +.\" +.\" .AP type name in/out ?indent? +.\" Start paragraph describing an argument to a library procedure. +.\" type is type of argument (int, etc.), in/out is either "in", "out", +.\" or "in/out" to describe whether procedure reads or modifies arg, +.\" and indent is equivalent to second arg of .IP (shouldn't ever be +.\" needed; use .AS below instead) +.\" +.\" .AS ?type? ?name? +.\" Give maximum sizes of arguments for setting tab stops. Type and +.\" name are examples of largest possible arguments that will be passed +.\" to .AP later. If args are omitted, default tab stops are used. +.\" +.\" .BS +.\" Start box enclosure. From here until next .BE, everything will be +.\" enclosed in one large box. +.\" +.\" .BE +.\" End of box enclosure. +.\" +.\" .CS +.\" Begin code excerpt. +.\" +.\" .CE +.\" End code excerpt. +.\" +.\" .VS ?version? ?br? +.\" Begin vertical sidebar, for use in marking newly-changed parts +.\" of man pages. The first argument is ignored and used for recording +.\" the version when the .VS was added, so that the sidebars can be +.\" found and removed when they reach a certain age. If another argument +.\" is present, then a line break is forced before starting the sidebar. +.\" +.\" .VE +.\" End of vertical sidebar. +.\" +.\" .DS +.\" Begin an indented unfilled display. +.\" +.\" .DE +.\" End of indented unfilled display. +.\" +.\" .SO ?manpage? +.\" Start of list of standard options for a Tk widget. The manpage +.\" argument defines where to look up the standard options; if +.\" omitted, defaults to "options". The options follow on successive +.\" lines, in three columns separated by tabs. +.\" +.\" .SE +.\" End of list of standard options for a Tk widget. +.\" +.\" .OP cmdName dbName dbClass +.\" Start of description of a specific option. cmdName gives the +.\" option's name as specified in the class command, dbName gives +.\" the option's name in the option database, and dbClass gives +.\" the option's class in the option database. +.\" +.\" .UL arg1 arg2 +.\" Print arg1 underlined, then print arg2 normally. +.\" +.\" .QW arg1 ?arg2? +.\" Print arg1 in quotes, then arg2 normally (for trailing punctuation). +.\" +.\" .PQ arg1 ?arg2? +.\" Print an open parenthesis, arg1 in quotes, then arg2 normally +.\" (for trailing punctuation) and then a closing parenthesis. +.\" +.\" # Set up traps and other miscellaneous stuff for Tcl/Tk man pages. +.if t .wh -1.3i ^B +.nr ^l \n(.l +.ad b +.\" # Start an argument description +.de AP +.ie !"\\$4"" .TP \\$4 +.el \{\ +. ie !"\\$2"" .TP \\n()Cu +. el .TP 15 +.\} +.ta \\n()Au \\n()Bu +.ie !"\\$3"" \{\ +\&\\$1 \\fI\\$2\\fP (\\$3) +.\".b +.\} +.el \{\ +.br +.ie !"\\$2"" \{\ +\&\\$1 \\fI\\$2\\fP +.\} +.el \{\ +\&\\fI\\$1\\fP +.\} +.\} +.. +.\" # define tabbing values for .AP +.de AS +.nr )A 10n +.if !"\\$1"" .nr )A \\w'\\$1'u+3n +.nr )B \\n()Au+15n +.\" +.if !"\\$2"" .nr )B \\w'\\$2'u+\\n()Au+3n +.nr )C \\n()Bu+\\w'(in/out)'u+2n +.. +.AS Tcl_Interp Tcl_CreateInterp in/out +.\" # BS - start boxed text +.\" # ^y = starting y location +.\" # ^b = 1 +.de BS +.br +.mk ^y +.nr ^b 1u +.if n .nf +.if n .ti 0 +.if n \l'\\n(.lu\(ul' +.if n .fi +.. +.\" # BE - end boxed text (draw box now) +.de BE +.nf +.ti 0 +.mk ^t +.ie n \l'\\n(^lu\(ul' +.el \{\ +.\" Draw four-sided box normally, but don't draw top of +.\" box if the box started on an earlier page. +.ie !\\n(^b-1 \{\ +\h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul' +.\} +.el \}\ +\h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul' +.\} +.\} +.fi +.br +.nr ^b 0 +.. +.\" # VS - start vertical sidebar +.\" # ^Y = starting y location +.\" # ^v = 1 (for troff; for nroff this doesn't matter) +.de VS +.if !"\\$2"" .br +.mk ^Y +.ie n 'mc \s12\(br\s0 +.el .nr ^v 1u +.. +.\" # VE - end of vertical sidebar +.de VE +.ie n 'mc +.el \{\ +.ev 2 +.nf +.ti 0 +.mk ^t +\h'|\\n(^lu+3n'\L'|\\n(^Yu-1v\(bv'\v'\\n(^tu+1v-\\n(^Yu'\h'-|\\n(^lu+3n' +.sp -1 +.fi +.ev +.\} +.nr ^v 0 +.. +.\" # Special macro to handle page bottom: finish off current +.\" # box/sidebar if in box/sidebar mode, then invoked standard +.\" # page bottom macro. +.de ^B +.ev 2 +'ti 0 +'nf +.mk ^t +.if \\n(^b \{\ +.\" Draw three-sided box if this is the box's first page, +.\" draw two sides but no top otherwise. +.ie !\\n(^b-1 \h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c +.el \h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c +.\} +.if \\n(^v \{\ +.nr ^x \\n(^tu+1v-\\n(^Yu +\kx\h'-\\nxu'\h'|\\n(^lu+3n'\ky\L'-\\n(^xu'\v'\\n(^xu'\h'|0u'\c +.\} +.bp +'fi +.ev +.if \\n(^b \{\ +.mk ^y +.nr ^b 2 +.\} +.if \\n(^v \{\ +.mk ^Y +.\} +.. +.\" # DS - begin display +.de DS +.RS +.nf +.sp +.. +.\" # DE - end display +.de DE +.fi +.RE +.sp +.. +.\" # SO - start of list of standard options +.de SO +'ie '\\$1'' .ds So \\fBoptions\\fR +'el .ds So \\fB\\$1\\fR +.SH "STANDARD OPTIONS" +.LP +.nf +.ta 5.5c 11c +.ft B +.. +.\" # SE - end of list of standard options +.de SE +.fi +.ft R +.LP +See the \\*(So manual entry for details on the standard options. +.. +.\" # OP - start of full description for a single option +.de OP +.LP +.nf +.ta 4c +Command-Line Name: \\fB\\$1\\fR +Database Name: \\fB\\$2\\fR +Database Class: \\fB\\$3\\fR +.fi +.IP +.. +.\" # CS - begin code excerpt +.de CS +.RS +.nf +.ta .25i .5i .75i 1i +.. +.\" # CE - end code excerpt +.de CE +.fi +.RE +.. +.\" # UL - underline word +.de UL +\\$1\l'|0\(ul'\\$2 +.. +.\" # QW - apply quotation marks to word +.de QW +.ie '\\*(lq'"' ``\\$1''\\$2 +.\"" fix emacs highlighting +.el \\*(lq\\$1\\*(rq\\$2 +.. +.\" # PQ - apply parens and quotation marks to word +.de PQ +.ie '\\*(lq'"' (``\\$1''\\$2)\\$3 +.\"" fix emacs highlighting +.el (\\*(lq\\$1\\*(rq\\$2)\\$3 +.. +.\" # QR - quoted range +.de QR +.ie '\\*(lq'"' ``\\$1''\\-``\\$2''\\$3 +.\"" fix emacs highlighting +.el \\*(lq\\$1\\*(rq\\-\\*(lq\\$2\\*(rq\\$3 +.. +.\" # MT - "empty" string +.de MT +.QW "" +.. +.BS +.SH NAME +canvas::highlight \- Manage the highlighting of canvas items or item groups +.SH SYNOPSIS +package require \fBTcl 8\&.5\fR +.sp +package require \fBTk 8\&.5\fR +.sp +package require \fBcanvas::highlight ?0\&.1?\fR +.sp +\fB::canvas::highlight\fR \fBon\fR \fIcanvas\fR \fItagOrId\fR \fIcmd\fR +.sp +\fB::canvas::highlight\fR \fBoff\fR \fIcanvas\fR \fItagOrId\fR +.sp +\fB{*}cmd\fR \fBon\fR \fIcanvas\fR \fIitem\fR +.sp +\fB{*}cmd\fR \fBoff\fR \fIcanvas\fR \fIclientdata\fR +.sp +.BE +.SH DESCRIPTION +This package provides utility commands for setting up and tearing down +of highlights for canvas items or item groups, the latter identified +by a tag\&. +.SH API +.TP +\fB::canvas::highlight\fR \fBon\fR \fIcanvas\fR \fItagOrId\fR \fIcmd\fR +This command sets up a general highlight, with the items of canvas +\fIcanvas\fR to highlight in this manner identified by \fItagOrId\fR +and the \fIcmd\fR prefix providing the implementation, i\&.e\&. the how to +perform the highlight\&. +.sp +The signature of the command prefix is described later, in +section \fBHighlight callback\fR\&. +.sp +The result of the command is the empty string\&. +.sp +Limitations: +.RS +.IP [1] +When a highlight is active no other highlight can be activated\&. +This means that nested highlights are not possible\&. +.IP [2] +The system may break if a highlight is removed from within its +highlight callback\&. +.RE +.TP +\fB::canvas::highlight\fR \fBoff\fR \fIcanvas\fR \fItagOrId\fR +This command removes any highlight set on the items of canvas +\fIcanvas\fR identified by \fItagOrId\fR\&. +.sp +The result of the command is the empty string\&. +.PP +.SS "HIGHLIGHT CALLBACK" +The highlight callback is a command prefix invoked in the following +two ways: +.TP +\fB{*}cmd\fR \fBon\fR \fIcanvas\fR \fIitem\fR +This form is invoked when the mouse has entered (one of) the item(s) +the highlight was set up for\&. The callback now has to perform any +reconfiguration necessary to highlight the item (group)\&. +.sp +The result of the command can be anything\&. It is stored by the +system as client information and passed unchanged to the un-highlight +callback for its use\&. In this manner the highlight callback is able to +maintain custom state from highlighting to un-highlighting\&. +.sp +Note that the callback does not have to maintain state, nor +does it have to actually reconfigure the item (group)\&. In the latter +case the callback simply serves as easy enter/leave notification\&. +.TP +\fB{*}cmd\fR \fBoff\fR \fIcanvas\fR \fIclientdata\fR +This form is invoked when the mouse has left (one of) the item(s) of +the currently active the highlight\&. The callback now has to perform +any reconfiguration necessary to un-highlight the item (group)\&. +.sp +The result of the command must be a boolean value with the +usual value to be \fBtrue\fR\&. By returning \fBfalse\fR instead the +callback can veto the removal of the highlight\&. +.PP +.SH "BUGS, IDEAS, FEEDBACK" +This document, and the package it describes, will undoubtedly contain +bugs and other problems\&. +Please report such in the category \fIcanvas\fR of the +\fITklib Trackers\fR [http://core\&.tcl\&.tk/tklib/reportlist]\&. +Please also report any ideas for enhancements you may have for either +package and/or documentation\&. +.SH KEYWORDS +canvas, enter callback, highlighting, leave callback \ No newline at end of file diff --git a/embedded/man/files/modules/canvas/canvas_mvg.n b/embedded/man/files/modules/canvas/canvas_mvg.n new file mode 100644 index 00000000..0ad04501 --- /dev/null +++ b/embedded/man/files/modules/canvas/canvas_mvg.n @@ -0,0 +1,310 @@ +'\" +'\" Generated from file 'canvas_mvg\&.man' by tcllib/doctools with format 'nroff' +'\" Copyright (c) 2010 Wolf-Dieter Busch (http://wiki\&.tcl\&.tk/15505) +'\" Copyright (c) 2010 Documentation, Andreas Kupries +'\" +.TH "canvas::mvg" n 1\&.0\&.1 tklib "Variations on a canvas" +.\" The -*- nroff -*- definitions below are for supplemental macros used +.\" in Tcl/Tk manual entries. +.\" +.\" .AP type name in/out ?indent? +.\" Start paragraph describing an argument to a library procedure. +.\" type is type of argument (int, etc.), in/out is either "in", "out", +.\" or "in/out" to describe whether procedure reads or modifies arg, +.\" and indent is equivalent to second arg of .IP (shouldn't ever be +.\" needed; use .AS below instead) +.\" +.\" .AS ?type? ?name? +.\" Give maximum sizes of arguments for setting tab stops. Type and +.\" name are examples of largest possible arguments that will be passed +.\" to .AP later. If args are omitted, default tab stops are used. +.\" +.\" .BS +.\" Start box enclosure. From here until next .BE, everything will be +.\" enclosed in one large box. +.\" +.\" .BE +.\" End of box enclosure. +.\" +.\" .CS +.\" Begin code excerpt. +.\" +.\" .CE +.\" End code excerpt. +.\" +.\" .VS ?version? ?br? +.\" Begin vertical sidebar, for use in marking newly-changed parts +.\" of man pages. The first argument is ignored and used for recording +.\" the version when the .VS was added, so that the sidebars can be +.\" found and removed when they reach a certain age. If another argument +.\" is present, then a line break is forced before starting the sidebar. +.\" +.\" .VE +.\" End of vertical sidebar. +.\" +.\" .DS +.\" Begin an indented unfilled display. +.\" +.\" .DE +.\" End of indented unfilled display. +.\" +.\" .SO ?manpage? +.\" Start of list of standard options for a Tk widget. The manpage +.\" argument defines where to look up the standard options; if +.\" omitted, defaults to "options". The options follow on successive +.\" lines, in three columns separated by tabs. +.\" +.\" .SE +.\" End of list of standard options for a Tk widget. +.\" +.\" .OP cmdName dbName dbClass +.\" Start of description of a specific option. cmdName gives the +.\" option's name as specified in the class command, dbName gives +.\" the option's name in the option database, and dbClass gives +.\" the option's class in the option database. +.\" +.\" .UL arg1 arg2 +.\" Print arg1 underlined, then print arg2 normally. +.\" +.\" .QW arg1 ?arg2? +.\" Print arg1 in quotes, then arg2 normally (for trailing punctuation). +.\" +.\" .PQ arg1 ?arg2? +.\" Print an open parenthesis, arg1 in quotes, then arg2 normally +.\" (for trailing punctuation) and then a closing parenthesis. +.\" +.\" # Set up traps and other miscellaneous stuff for Tcl/Tk man pages. +.if t .wh -1.3i ^B +.nr ^l \n(.l +.ad b +.\" # Start an argument description +.de AP +.ie !"\\$4"" .TP \\$4 +.el \{\ +. ie !"\\$2"" .TP \\n()Cu +. el .TP 15 +.\} +.ta \\n()Au \\n()Bu +.ie !"\\$3"" \{\ +\&\\$1 \\fI\\$2\\fP (\\$3) +.\".b +.\} +.el \{\ +.br +.ie !"\\$2"" \{\ +\&\\$1 \\fI\\$2\\fP +.\} +.el \{\ +\&\\fI\\$1\\fP +.\} +.\} +.. +.\" # define tabbing values for .AP +.de AS +.nr )A 10n +.if !"\\$1"" .nr )A \\w'\\$1'u+3n +.nr )B \\n()Au+15n +.\" +.if !"\\$2"" .nr )B \\w'\\$2'u+\\n()Au+3n +.nr )C \\n()Bu+\\w'(in/out)'u+2n +.. +.AS Tcl_Interp Tcl_CreateInterp in/out +.\" # BS - start boxed text +.\" # ^y = starting y location +.\" # ^b = 1 +.de BS +.br +.mk ^y +.nr ^b 1u +.if n .nf +.if n .ti 0 +.if n \l'\\n(.lu\(ul' +.if n .fi +.. +.\" # BE - end boxed text (draw box now) +.de BE +.nf +.ti 0 +.mk ^t +.ie n \l'\\n(^lu\(ul' +.el \{\ +.\" Draw four-sided box normally, but don't draw top of +.\" box if the box started on an earlier page. +.ie !\\n(^b-1 \{\ +\h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul' +.\} +.el \}\ +\h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul' +.\} +.\} +.fi +.br +.nr ^b 0 +.. +.\" # VS - start vertical sidebar +.\" # ^Y = starting y location +.\" # ^v = 1 (for troff; for nroff this doesn't matter) +.de VS +.if !"\\$2"" .br +.mk ^Y +.ie n 'mc \s12\(br\s0 +.el .nr ^v 1u +.. +.\" # VE - end of vertical sidebar +.de VE +.ie n 'mc +.el \{\ +.ev 2 +.nf +.ti 0 +.mk ^t +\h'|\\n(^lu+3n'\L'|\\n(^Yu-1v\(bv'\v'\\n(^tu+1v-\\n(^Yu'\h'-|\\n(^lu+3n' +.sp -1 +.fi +.ev +.\} +.nr ^v 0 +.. +.\" # Special macro to handle page bottom: finish off current +.\" # box/sidebar if in box/sidebar mode, then invoked standard +.\" # page bottom macro. +.de ^B +.ev 2 +'ti 0 +'nf +.mk ^t +.if \\n(^b \{\ +.\" Draw three-sided box if this is the box's first page, +.\" draw two sides but no top otherwise. +.ie !\\n(^b-1 \h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c +.el \h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c +.\} +.if \\n(^v \{\ +.nr ^x \\n(^tu+1v-\\n(^Yu +\kx\h'-\\nxu'\h'|\\n(^lu+3n'\ky\L'-\\n(^xu'\v'\\n(^xu'\h'|0u'\c +.\} +.bp +'fi +.ev +.if \\n(^b \{\ +.mk ^y +.nr ^b 2 +.\} +.if \\n(^v \{\ +.mk ^Y +.\} +.. +.\" # DS - begin display +.de DS +.RS +.nf +.sp +.. +.\" # DE - end display +.de DE +.fi +.RE +.sp +.. +.\" # SO - start of list of standard options +.de SO +'ie '\\$1'' .ds So \\fBoptions\\fR +'el .ds So \\fB\\$1\\fR +.SH "STANDARD OPTIONS" +.LP +.nf +.ta 5.5c 11c +.ft B +.. +.\" # SE - end of list of standard options +.de SE +.fi +.ft R +.LP +See the \\*(So manual entry for details on the standard options. +.. +.\" # OP - start of full description for a single option +.de OP +.LP +.nf +.ta 4c +Command-Line Name: \\fB\\$1\\fR +Database Name: \\fB\\$2\\fR +Database Class: \\fB\\$3\\fR +.fi +.IP +.. +.\" # CS - begin code excerpt +.de CS +.RS +.nf +.ta .25i .5i .75i 1i +.. +.\" # CE - end code excerpt +.de CE +.fi +.RE +.. +.\" # UL - underline word +.de UL +\\$1\l'|0\(ul'\\$2 +.. +.\" # QW - apply quotation marks to word +.de QW +.ie '\\*(lq'"' ``\\$1''\\$2 +.\"" fix emacs highlighting +.el \\*(lq\\$1\\*(rq\\$2 +.. +.\" # PQ - apply parens and quotation marks to word +.de PQ +.ie '\\*(lq'"' (``\\$1''\\$2)\\$3 +.\"" fix emacs highlighting +.el (\\*(lq\\$1\\*(rq\\$2)\\$3 +.. +.\" # QR - quoted range +.de QR +.ie '\\*(lq'"' ``\\$1''\\-``\\$2''\\$3 +.\"" fix emacs highlighting +.el \\*(lq\\$1\\*(rq\\-\\*(lq\\$2\\*(rq\\$3 +.. +.\" # MT - "empty" string +.de MT +.QW "" +.. +.BS +.SH NAME +canvas::mvg \- Canvas to ImageMagick MVG vector format +.SH SYNOPSIS +package require \fBTcl 8\&.5\fR +.sp +package require \fBTk 8\&.5\fR +.sp +package require \fBcanvas::mvg ?1?\fR +.sp +\fB::canvas::mvg\fR \fIpathName\fR +.sp +.BE +.SH DESCRIPTION +This package provides a command to convert a canvas' contents to +ImageMagick's MVG vector format\&. +.SH API +.TP +\fB::canvas::mvg\fR \fIpathName\fR +Dump the contents of the canvas \fIpathName\fR\&. The result is a string +in ImageMagick's MVG vector format\&. +.PP +.SH "BUGS, IDEAS, FEEDBACK" +This document, and the package it describes, will undoubtedly contain +bugs and other problems\&. +Please report such in the category \fIcanvas\fR of the +\fITklib Trackers\fR [http://core\&.tcl\&.tk/tklib/reportlist]\&. +Please also report any ideas for enhancements you may have for either +package and/or documentation\&. +.SH KEYWORDS +canvas, graphics, imagemagick, magick vector graphics, mvg, print screen, serialization, vector graphics +.SH COPYRIGHT +.nf +Copyright (c) 2010 Wolf-Dieter Busch (http://wiki\&.tcl\&.tk/15505) +Copyright (c) 2010 Documentation, Andreas Kupries + +.fi \ No newline at end of file diff --git a/embedded/man/files/modules/canvas/canvas_snap.n b/embedded/man/files/modules/canvas/canvas_snap.n new file mode 100644 index 00000000..8d051f83 --- /dev/null +++ b/embedded/man/files/modules/canvas/canvas_snap.n @@ -0,0 +1,317 @@ +'\" +'\" Generated from file 'canvas_snap\&.man' by tcllib/doctools with format 'nroff' +'\" Copyright (c) 2004 George Petasis (http://wiki\&.tcl\&.tk/1404) +'\" Copyright (c) 2010 Documentation, Andreas Kupries +'\" +.TH "canvas::snap" n 1\&.0\&.1 tklib "Variations on a canvas" +.\" The -*- nroff -*- definitions below are for supplemental macros used +.\" in Tcl/Tk manual entries. +.\" +.\" .AP type name in/out ?indent? +.\" Start paragraph describing an argument to a library procedure. +.\" type is type of argument (int, etc.), in/out is either "in", "out", +.\" or "in/out" to describe whether procedure reads or modifies arg, +.\" and indent is equivalent to second arg of .IP (shouldn't ever be +.\" needed; use .AS below instead) +.\" +.\" .AS ?type? ?name? +.\" Give maximum sizes of arguments for setting tab stops. Type and +.\" name are examples of largest possible arguments that will be passed +.\" to .AP later. If args are omitted, default tab stops are used. +.\" +.\" .BS +.\" Start box enclosure. From here until next .BE, everything will be +.\" enclosed in one large box. +.\" +.\" .BE +.\" End of box enclosure. +.\" +.\" .CS +.\" Begin code excerpt. +.\" +.\" .CE +.\" End code excerpt. +.\" +.\" .VS ?version? ?br? +.\" Begin vertical sidebar, for use in marking newly-changed parts +.\" of man pages. The first argument is ignored and used for recording +.\" the version when the .VS was added, so that the sidebars can be +.\" found and removed when they reach a certain age. If another argument +.\" is present, then a line break is forced before starting the sidebar. +.\" +.\" .VE +.\" End of vertical sidebar. +.\" +.\" .DS +.\" Begin an indented unfilled display. +.\" +.\" .DE +.\" End of indented unfilled display. +.\" +.\" .SO ?manpage? +.\" Start of list of standard options for a Tk widget. The manpage +.\" argument defines where to look up the standard options; if +.\" omitted, defaults to "options". The options follow on successive +.\" lines, in three columns separated by tabs. +.\" +.\" .SE +.\" End of list of standard options for a Tk widget. +.\" +.\" .OP cmdName dbName dbClass +.\" Start of description of a specific option. cmdName gives the +.\" option's name as specified in the class command, dbName gives +.\" the option's name in the option database, and dbClass gives +.\" the option's class in the option database. +.\" +.\" .UL arg1 arg2 +.\" Print arg1 underlined, then print arg2 normally. +.\" +.\" .QW arg1 ?arg2? +.\" Print arg1 in quotes, then arg2 normally (for trailing punctuation). +.\" +.\" .PQ arg1 ?arg2? +.\" Print an open parenthesis, arg1 in quotes, then arg2 normally +.\" (for trailing punctuation) and then a closing parenthesis. +.\" +.\" # Set up traps and other miscellaneous stuff for Tcl/Tk man pages. +.if t .wh -1.3i ^B +.nr ^l \n(.l +.ad b +.\" # Start an argument description +.de AP +.ie !"\\$4"" .TP \\$4 +.el \{\ +. ie !"\\$2"" .TP \\n()Cu +. el .TP 15 +.\} +.ta \\n()Au \\n()Bu +.ie !"\\$3"" \{\ +\&\\$1 \\fI\\$2\\fP (\\$3) +.\".b +.\} +.el \{\ +.br +.ie !"\\$2"" \{\ +\&\\$1 \\fI\\$2\\fP +.\} +.el \{\ +\&\\fI\\$1\\fP +.\} +.\} +.. +.\" # define tabbing values for .AP +.de AS +.nr )A 10n +.if !"\\$1"" .nr )A \\w'\\$1'u+3n +.nr )B \\n()Au+15n +.\" +.if !"\\$2"" .nr )B \\w'\\$2'u+\\n()Au+3n +.nr )C \\n()Bu+\\w'(in/out)'u+2n +.. +.AS Tcl_Interp Tcl_CreateInterp in/out +.\" # BS - start boxed text +.\" # ^y = starting y location +.\" # ^b = 1 +.de BS +.br +.mk ^y +.nr ^b 1u +.if n .nf +.if n .ti 0 +.if n \l'\\n(.lu\(ul' +.if n .fi +.. +.\" # BE - end boxed text (draw box now) +.de BE +.nf +.ti 0 +.mk ^t +.ie n \l'\\n(^lu\(ul' +.el \{\ +.\" Draw four-sided box normally, but don't draw top of +.\" box if the box started on an earlier page. +.ie !\\n(^b-1 \{\ +\h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul' +.\} +.el \}\ +\h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul' +.\} +.\} +.fi +.br +.nr ^b 0 +.. +.\" # VS - start vertical sidebar +.\" # ^Y = starting y location +.\" # ^v = 1 (for troff; for nroff this doesn't matter) +.de VS +.if !"\\$2"" .br +.mk ^Y +.ie n 'mc \s12\(br\s0 +.el .nr ^v 1u +.. +.\" # VE - end of vertical sidebar +.de VE +.ie n 'mc +.el \{\ +.ev 2 +.nf +.ti 0 +.mk ^t +\h'|\\n(^lu+3n'\L'|\\n(^Yu-1v\(bv'\v'\\n(^tu+1v-\\n(^Yu'\h'-|\\n(^lu+3n' +.sp -1 +.fi +.ev +.\} +.nr ^v 0 +.. +.\" # Special macro to handle page bottom: finish off current +.\" # box/sidebar if in box/sidebar mode, then invoked standard +.\" # page bottom macro. +.de ^B +.ev 2 +'ti 0 +'nf +.mk ^t +.if \\n(^b \{\ +.\" Draw three-sided box if this is the box's first page, +.\" draw two sides but no top otherwise. +.ie !\\n(^b-1 \h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c +.el \h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c +.\} +.if \\n(^v \{\ +.nr ^x \\n(^tu+1v-\\n(^Yu +\kx\h'-\\nxu'\h'|\\n(^lu+3n'\ky\L'-\\n(^xu'\v'\\n(^xu'\h'|0u'\c +.\} +.bp +'fi +.ev +.if \\n(^b \{\ +.mk ^y +.nr ^b 2 +.\} +.if \\n(^v \{\ +.mk ^Y +.\} +.. +.\" # DS - begin display +.de DS +.RS +.nf +.sp +.. +.\" # DE - end display +.de DE +.fi +.RE +.sp +.. +.\" # SO - start of list of standard options +.de SO +'ie '\\$1'' .ds So \\fBoptions\\fR +'el .ds So \\fB\\$1\\fR +.SH "STANDARD OPTIONS" +.LP +.nf +.ta 5.5c 11c +.ft B +.. +.\" # SE - end of list of standard options +.de SE +.fi +.ft R +.LP +See the \\*(So manual entry for details on the standard options. +.. +.\" # OP - start of full description for a single option +.de OP +.LP +.nf +.ta 4c +Command-Line Name: \\fB\\$1\\fR +Database Name: \\fB\\$2\\fR +Database Class: \\fB\\$3\\fR +.fi +.IP +.. +.\" # CS - begin code excerpt +.de CS +.RS +.nf +.ta .25i .5i .75i 1i +.. +.\" # CE - end code excerpt +.de CE +.fi +.RE +.. +.\" # UL - underline word +.de UL +\\$1\l'|0\(ul'\\$2 +.. +.\" # QW - apply quotation marks to word +.de QW +.ie '\\*(lq'"' ``\\$1''\\$2 +.\"" fix emacs highlighting +.el \\*(lq\\$1\\*(rq\\$2 +.. +.\" # PQ - apply parens and quotation marks to word +.de PQ +.ie '\\*(lq'"' (``\\$1''\\$2)\\$3 +.\"" fix emacs highlighting +.el (\\*(lq\\$1\\*(rq\\$2)\\$3 +.. +.\" # QR - quoted range +.de QR +.ie '\\*(lq'"' ``\\$1''\\-``\\$2''\\$3 +.\"" fix emacs highlighting +.el \\*(lq\\$1\\*(rq\\-\\*(lq\\$2\\*(rq\\$3 +.. +.\" # MT - "empty" string +.de MT +.QW "" +.. +.BS +.SH NAME +canvas::snap \- Canvas snapshot to Tk photo image +.SH SYNOPSIS +package require \fBTcl 8\&.5\fR +.sp +package require \fBTk 8\&.5\fR +.sp +package require \fBcanvas::snap ?1\&.0\&.1?\fR +.sp +package require \fBimg::window \fR +.sp +\fB::canvas::snap\fR \fIpathName\fR +.sp +.BE +.SH DESCRIPTION +This package provides a command to take snapshots of arbitrary +canvases\&. +.SH API +.TP +\fB::canvas::snap\fR \fIpathName\fR +Takes a snapshot of the canvas \fIpathName\fR\&. The result is the name +of a new Tk photo image containing the snapshot\&. +.sp +\fINote\fR that this command has a side-effect\&. To avoid having white +rectangles where other windows may overlap the canvas this command +forces the toplevel window the canvas is in to the top of the stacking +order\&. +.PP +.SH "BUGS, IDEAS, FEEDBACK" +This document, and the package it describes, will undoubtedly contain +bugs and other problems\&. +Please report such in the category \fIcanvas\fR of the +\fITklib Trackers\fR [http://core\&.tcl\&.tk/tklib/reportlist]\&. +Please also report any ideas for enhancements you may have for either +package and/or documentation\&. +.SH KEYWORDS +canvas, image, photo, print screen, snapshot +.SH COPYRIGHT +.nf +Copyright (c) 2004 George Petasis (http://wiki\&.tcl\&.tk/1404) +Copyright (c) 2010 Documentation, Andreas Kupries + +.fi \ No newline at end of file diff --git a/embedded/man/files/modules/canvas/canvas_sqmap.n b/embedded/man/files/modules/canvas/canvas_sqmap.n new file mode 100644 index 00000000..44e658f5 --- /dev/null +++ b/embedded/man/files/modules/canvas/canvas_sqmap.n @@ -0,0 +1,399 @@ +'\" +'\" Generated from file 'canvas_sqmap\&.man' by tcllib/doctools with format 'nroff' +'\" +.TH "canvas::sqmap" n 0\&.3\&.1 tklib "Variations on a canvas" +.\" The -*- nroff -*- definitions below are for supplemental macros used +.\" in Tcl/Tk manual entries. +.\" +.\" .AP type name in/out ?indent? +.\" Start paragraph describing an argument to a library procedure. +.\" type is type of argument (int, etc.), in/out is either "in", "out", +.\" or "in/out" to describe whether procedure reads or modifies arg, +.\" and indent is equivalent to second arg of .IP (shouldn't ever be +.\" needed; use .AS below instead) +.\" +.\" .AS ?type? ?name? +.\" Give maximum sizes of arguments for setting tab stops. Type and +.\" name are examples of largest possible arguments that will be passed +.\" to .AP later. If args are omitted, default tab stops are used. +.\" +.\" .BS +.\" Start box enclosure. From here until next .BE, everything will be +.\" enclosed in one large box. +.\" +.\" .BE +.\" End of box enclosure. +.\" +.\" .CS +.\" Begin code excerpt. +.\" +.\" .CE +.\" End code excerpt. +.\" +.\" .VS ?version? ?br? +.\" Begin vertical sidebar, for use in marking newly-changed parts +.\" of man pages. The first argument is ignored and used for recording +.\" the version when the .VS was added, so that the sidebars can be +.\" found and removed when they reach a certain age. If another argument +.\" is present, then a line break is forced before starting the sidebar. +.\" +.\" .VE +.\" End of vertical sidebar. +.\" +.\" .DS +.\" Begin an indented unfilled display. +.\" +.\" .DE +.\" End of indented unfilled display. +.\" +.\" .SO ?manpage? +.\" Start of list of standard options for a Tk widget. The manpage +.\" argument defines where to look up the standard options; if +.\" omitted, defaults to "options". The options follow on successive +.\" lines, in three columns separated by tabs. +.\" +.\" .SE +.\" End of list of standard options for a Tk widget. +.\" +.\" .OP cmdName dbName dbClass +.\" Start of description of a specific option. cmdName gives the +.\" option's name as specified in the class command, dbName gives +.\" the option's name in the option database, and dbClass gives +.\" the option's class in the option database. +.\" +.\" .UL arg1 arg2 +.\" Print arg1 underlined, then print arg2 normally. +.\" +.\" .QW arg1 ?arg2? +.\" Print arg1 in quotes, then arg2 normally (for trailing punctuation). +.\" +.\" .PQ arg1 ?arg2? +.\" Print an open parenthesis, arg1 in quotes, then arg2 normally +.\" (for trailing punctuation) and then a closing parenthesis. +.\" +.\" # Set up traps and other miscellaneous stuff for Tcl/Tk man pages. +.if t .wh -1.3i ^B +.nr ^l \n(.l +.ad b +.\" # Start an argument description +.de AP +.ie !"\\$4"" .TP \\$4 +.el \{\ +. ie !"\\$2"" .TP \\n()Cu +. el .TP 15 +.\} +.ta \\n()Au \\n()Bu +.ie !"\\$3"" \{\ +\&\\$1 \\fI\\$2\\fP (\\$3) +.\".b +.\} +.el \{\ +.br +.ie !"\\$2"" \{\ +\&\\$1 \\fI\\$2\\fP +.\} +.el \{\ +\&\\fI\\$1\\fP +.\} +.\} +.. +.\" # define tabbing values for .AP +.de AS +.nr )A 10n +.if !"\\$1"" .nr )A \\w'\\$1'u+3n +.nr )B \\n()Au+15n +.\" +.if !"\\$2"" .nr )B \\w'\\$2'u+\\n()Au+3n +.nr )C \\n()Bu+\\w'(in/out)'u+2n +.. +.AS Tcl_Interp Tcl_CreateInterp in/out +.\" # BS - start boxed text +.\" # ^y = starting y location +.\" # ^b = 1 +.de BS +.br +.mk ^y +.nr ^b 1u +.if n .nf +.if n .ti 0 +.if n \l'\\n(.lu\(ul' +.if n .fi +.. +.\" # BE - end boxed text (draw box now) +.de BE +.nf +.ti 0 +.mk ^t +.ie n \l'\\n(^lu\(ul' +.el \{\ +.\" Draw four-sided box normally, but don't draw top of +.\" box if the box started on an earlier page. +.ie !\\n(^b-1 \{\ +\h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul' +.\} +.el \}\ +\h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul' +.\} +.\} +.fi +.br +.nr ^b 0 +.. +.\" # VS - start vertical sidebar +.\" # ^Y = starting y location +.\" # ^v = 1 (for troff; for nroff this doesn't matter) +.de VS +.if !"\\$2"" .br +.mk ^Y +.ie n 'mc \s12\(br\s0 +.el .nr ^v 1u +.. +.\" # VE - end of vertical sidebar +.de VE +.ie n 'mc +.el \{\ +.ev 2 +.nf +.ti 0 +.mk ^t +\h'|\\n(^lu+3n'\L'|\\n(^Yu-1v\(bv'\v'\\n(^tu+1v-\\n(^Yu'\h'-|\\n(^lu+3n' +.sp -1 +.fi +.ev +.\} +.nr ^v 0 +.. +.\" # Special macro to handle page bottom: finish off current +.\" # box/sidebar if in box/sidebar mode, then invoked standard +.\" # page bottom macro. +.de ^B +.ev 2 +'ti 0 +'nf +.mk ^t +.if \\n(^b \{\ +.\" Draw three-sided box if this is the box's first page, +.\" draw two sides but no top otherwise. +.ie !\\n(^b-1 \h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c +.el \h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c +.\} +.if \\n(^v \{\ +.nr ^x \\n(^tu+1v-\\n(^Yu +\kx\h'-\\nxu'\h'|\\n(^lu+3n'\ky\L'-\\n(^xu'\v'\\n(^xu'\h'|0u'\c +.\} +.bp +'fi +.ev +.if \\n(^b \{\ +.mk ^y +.nr ^b 2 +.\} +.if \\n(^v \{\ +.mk ^Y +.\} +.. +.\" # DS - begin display +.de DS +.RS +.nf +.sp +.. +.\" # DE - end display +.de DE +.fi +.RE +.sp +.. +.\" # SO - start of list of standard options +.de SO +'ie '\\$1'' .ds So \\fBoptions\\fR +'el .ds So \\fB\\$1\\fR +.SH "STANDARD OPTIONS" +.LP +.nf +.ta 5.5c 11c +.ft B +.. +.\" # SE - end of list of standard options +.de SE +.fi +.ft R +.LP +See the \\*(So manual entry for details on the standard options. +.. +.\" # OP - start of full description for a single option +.de OP +.LP +.nf +.ta 4c +Command-Line Name: \\fB\\$1\\fR +Database Name: \\fB\\$2\\fR +Database Class: \\fB\\$3\\fR +.fi +.IP +.. +.\" # CS - begin code excerpt +.de CS +.RS +.nf +.ta .25i .5i .75i 1i +.. +.\" # CE - end code excerpt +.de CE +.fi +.RE +.. +.\" # UL - underline word +.de UL +\\$1\l'|0\(ul'\\$2 +.. +.\" # QW - apply quotation marks to word +.de QW +.ie '\\*(lq'"' ``\\$1''\\$2 +.\"" fix emacs highlighting +.el \\*(lq\\$1\\*(rq\\$2 +.. +.\" # PQ - apply parens and quotation marks to word +.de PQ +.ie '\\*(lq'"' (``\\$1''\\$2)\\$3 +.\"" fix emacs highlighting +.el (\\*(lq\\$1\\*(rq\\$2)\\$3 +.. +.\" # QR - quoted range +.de QR +.ie '\\*(lq'"' ``\\$1''\\-``\\$2''\\$3 +.\"" fix emacs highlighting +.el \\*(lq\\$1\\*(rq\\-\\*(lq\\$2\\*(rq\\$3 +.. +.\" # MT - "empty" string +.de MT +.QW "" +.. +.BS +.SH NAME +canvas::sqmap \- Canvas with map background based on square tiles +.SH SYNOPSIS +package require \fBTcl 8\&.4\fR +.sp +package require \fBTk 8\&.4\fR +.sp +package require \fBsnit \fR +.sp +package require \fBuevent::onidle \fR +.sp +package require \fBcache::async \fR +.sp +package require \fBcanvas::sqmap ?0\&.3\&.1?\fR +.sp +\fB::canvas::sqmap\fR \fIpathName\fR ?options? +.sp +\fIcanvasName\fR \fBimage set\fR \fIcell\fR \fIimage\fR +.sp +\fIcanvasName\fR \fBimage unset\fR \fIcell\fR +.sp +\fIcanvasName\fR \fBflush\fR +.sp +.BE +.SH DESCRIPTION +This package provides an extended canvas widget for the display of +maps based on a set of square image tiles\&. The tiles are the +background of the canvas, with all other canvas items added always +shown in front of them\&. The number of tiles shown, tile size, and +where to get the images to show are all configurable\&. +.SH API +.TP +\fB::canvas::sqmap\fR \fIpathName\fR ?options? +Creates the canvas \fIpathName\fR and configures it\&. The new widget +supports all of the options and methods of a regular canvas, plus the +options and methods described below\&. +.sp +The result of the command is \fIpathName\fR\&. +.PP +.SS OPTIONS +.TP +\fB-grid-cell-width\fR +The value for this option is a non-negative integer\&. It specifies the +width of the cells the background is made up of\&. +.TP +\fB-grid-cell-height\fR +The value for this option is a non-negative integer\&. It specifies the +height of the cells the background is made up of\&. +.TP +\fB-grid-cell-command\fR +The value for this option is a command prefix\&. It is invoked whenever +the canvas needs the image for a specific cell of the background, with +two additional arguments, the id of the cell, and a command prefix to +invoke when the image is ready, or known to not exist\&. +.sp +The id of the cell is a 2-element list containing the row and column +number of the cell, in this order\&. The result command prefix (named +"$result" in the example below) has to be invoked with either two or +three arguments, i\&.e\&. +.CS + + + $result set $cellid $image ; # image is known and ready + $result unset $cellid ; # image does not exist + +.CE +.IP +This option may be left undefined, i\&.e\&. the canvas can operate without +it\&. In that case the only images shown in grid cells are those +explicitly set with the method \fBimage set\fR, see the next +section\&. All other grid cells will simply be empty\&. +.TP +\fB-viewport-command\fR +This option specifies a command prefix to invoke when the viewport of +the canvas is changed, to allow users keep track of where in the +scroll-region we are at all times\&. This can be used, for example, to +drive derivate displays, or to keep items in view by moving them as +the viewport moves\&. +.TP +\fB-image-on-load\fR +The value for this option is an image\&. If specified the image is shown +in a cell while the actual image for that cell is getting loaded +through the callback specified by the \fB-grid-cell-command\fR\&. +.TP +\fB-image-on-unset\fR +The value for this option is an image\&. If specified the image is shown +in a cell for which the callback specified by the \fB-grid-cell-command\fR +reported that there is no actual image to be shown\&. +.PP +.SS METHODS +.TP +\fIcanvasName\fR \fBimage set\fR \fIcell\fR \fIimage\fR +Invoking this method places the \fIimage\fR into the specified +\fIcell\fR of the background\&. The cell is given as a 2-element list +containing row and column number, in this order\&. +.sp +Note that an image is allowed to be associated with and displayed in +multiple cells of the canvas\&. +.TP +\fIcanvasName\fR \fBimage unset\fR \fIcell\fR +Invoking this method declares the specified \fIcell\fR of the +background as empty, an existing image shown by this cell will be +forgotten\&. The cell is given as a 2-element list containing row and +column number, in this order\&. +.TP +\fIcanvasName\fR \fBflush\fR +Invoking this method forces the canvas to completely reload the images +for all cells\&. Do not use this method if the canvas is operated +without a \fB-grid-cell-command\fR, as in that case the canvas will +simply forget all images without being able to reload them\&. +.PP +.SH "IMAGE OWNERSHIP" +Note that the canvas \fIdoes not\fR take ownership of the images it +shows in the background\&. In other words, when we say that the canvas +forgets an image this means only that the association between a grid +cell and shown image is broken\&. The image is \fInot\fR +deleted\&. Managing the lifecycle of the images shown by the canvas is +responsibility of the user of the canvas\&. +.SH "BUGS, IDEAS, FEEDBACK" +This document, and the package it describes, will undoubtedly contain +bugs and other problems\&. +Please report such in the category \fIcanvas\fR of the +\fITklib Trackers\fR [http://core\&.tcl\&.tk/tklib/reportlist]\&. +Please also report any ideas for enhancements you may have for either +package and/or documentation\&. +.SH KEYWORDS +canvas, cell, grid, image, map, square map, tile \ No newline at end of file diff --git a/embedded/man/files/modules/canvas/canvas_tags.n b/embedded/man/files/modules/canvas/canvas_tags.n new file mode 100644 index 00000000..8cb874e5 --- /dev/null +++ b/embedded/man/files/modules/canvas/canvas_tags.n @@ -0,0 +1,353 @@ +'\" +'\" Generated from file 'canvas_tags\&.man' by tcllib/doctools with format 'nroff' +'\" +.TH "canvas::tag" n 0\&.1 tklib "Variations on a canvas" +.\" The -*- nroff -*- definitions below are for supplemental macros used +.\" in Tcl/Tk manual entries. +.\" +.\" .AP type name in/out ?indent? +.\" Start paragraph describing an argument to a library procedure. +.\" type is type of argument (int, etc.), in/out is either "in", "out", +.\" or "in/out" to describe whether procedure reads or modifies arg, +.\" and indent is equivalent to second arg of .IP (shouldn't ever be +.\" needed; use .AS below instead) +.\" +.\" .AS ?type? ?name? +.\" Give maximum sizes of arguments for setting tab stops. Type and +.\" name are examples of largest possible arguments that will be passed +.\" to .AP later. If args are omitted, default tab stops are used. +.\" +.\" .BS +.\" Start box enclosure. From here until next .BE, everything will be +.\" enclosed in one large box. +.\" +.\" .BE +.\" End of box enclosure. +.\" +.\" .CS +.\" Begin code excerpt. +.\" +.\" .CE +.\" End code excerpt. +.\" +.\" .VS ?version? ?br? +.\" Begin vertical sidebar, for use in marking newly-changed parts +.\" of man pages. The first argument is ignored and used for recording +.\" the version when the .VS was added, so that the sidebars can be +.\" found and removed when they reach a certain age. If another argument +.\" is present, then a line break is forced before starting the sidebar. +.\" +.\" .VE +.\" End of vertical sidebar. +.\" +.\" .DS +.\" Begin an indented unfilled display. +.\" +.\" .DE +.\" End of indented unfilled display. +.\" +.\" .SO ?manpage? +.\" Start of list of standard options for a Tk widget. The manpage +.\" argument defines where to look up the standard options; if +.\" omitted, defaults to "options". The options follow on successive +.\" lines, in three columns separated by tabs. +.\" +.\" .SE +.\" End of list of standard options for a Tk widget. +.\" +.\" .OP cmdName dbName dbClass +.\" Start of description of a specific option. cmdName gives the +.\" option's name as specified in the class command, dbName gives +.\" the option's name in the option database, and dbClass gives +.\" the option's class in the option database. +.\" +.\" .UL arg1 arg2 +.\" Print arg1 underlined, then print arg2 normally. +.\" +.\" .QW arg1 ?arg2? +.\" Print arg1 in quotes, then arg2 normally (for trailing punctuation). +.\" +.\" .PQ arg1 ?arg2? +.\" Print an open parenthesis, arg1 in quotes, then arg2 normally +.\" (for trailing punctuation) and then a closing parenthesis. +.\" +.\" # Set up traps and other miscellaneous stuff for Tcl/Tk man pages. +.if t .wh -1.3i ^B +.nr ^l \n(.l +.ad b +.\" # Start an argument description +.de AP +.ie !"\\$4"" .TP \\$4 +.el \{\ +. ie !"\\$2"" .TP \\n()Cu +. el .TP 15 +.\} +.ta \\n()Au \\n()Bu +.ie !"\\$3"" \{\ +\&\\$1 \\fI\\$2\\fP (\\$3) +.\".b +.\} +.el \{\ +.br +.ie !"\\$2"" \{\ +\&\\$1 \\fI\\$2\\fP +.\} +.el \{\ +\&\\fI\\$1\\fP +.\} +.\} +.. +.\" # define tabbing values for .AP +.de AS +.nr )A 10n +.if !"\\$1"" .nr )A \\w'\\$1'u+3n +.nr )B \\n()Au+15n +.\" +.if !"\\$2"" .nr )B \\w'\\$2'u+\\n()Au+3n +.nr )C \\n()Bu+\\w'(in/out)'u+2n +.. +.AS Tcl_Interp Tcl_CreateInterp in/out +.\" # BS - start boxed text +.\" # ^y = starting y location +.\" # ^b = 1 +.de BS +.br +.mk ^y +.nr ^b 1u +.if n .nf +.if n .ti 0 +.if n \l'\\n(.lu\(ul' +.if n .fi +.. +.\" # BE - end boxed text (draw box now) +.de BE +.nf +.ti 0 +.mk ^t +.ie n \l'\\n(^lu\(ul' +.el \{\ +.\" Draw four-sided box normally, but don't draw top of +.\" box if the box started on an earlier page. +.ie !\\n(^b-1 \{\ +\h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul' +.\} +.el \}\ +\h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul' +.\} +.\} +.fi +.br +.nr ^b 0 +.. +.\" # VS - start vertical sidebar +.\" # ^Y = starting y location +.\" # ^v = 1 (for troff; for nroff this doesn't matter) +.de VS +.if !"\\$2"" .br +.mk ^Y +.ie n 'mc \s12\(br\s0 +.el .nr ^v 1u +.. +.\" # VE - end of vertical sidebar +.de VE +.ie n 'mc +.el \{\ +.ev 2 +.nf +.ti 0 +.mk ^t +\h'|\\n(^lu+3n'\L'|\\n(^Yu-1v\(bv'\v'\\n(^tu+1v-\\n(^Yu'\h'-|\\n(^lu+3n' +.sp -1 +.fi +.ev +.\} +.nr ^v 0 +.. +.\" # Special macro to handle page bottom: finish off current +.\" # box/sidebar if in box/sidebar mode, then invoked standard +.\" # page bottom macro. +.de ^B +.ev 2 +'ti 0 +'nf +.mk ^t +.if \\n(^b \{\ +.\" Draw three-sided box if this is the box's first page, +.\" draw two sides but no top otherwise. +.ie !\\n(^b-1 \h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c +.el \h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c +.\} +.if \\n(^v \{\ +.nr ^x \\n(^tu+1v-\\n(^Yu +\kx\h'-\\nxu'\h'|\\n(^lu+3n'\ky\L'-\\n(^xu'\v'\\n(^xu'\h'|0u'\c +.\} +.bp +'fi +.ev +.if \\n(^b \{\ +.mk ^y +.nr ^b 2 +.\} +.if \\n(^v \{\ +.mk ^Y +.\} +.. +.\" # DS - begin display +.de DS +.RS +.nf +.sp +.. +.\" # DE - end display +.de DE +.fi +.RE +.sp +.. +.\" # SO - start of list of standard options +.de SO +'ie '\\$1'' .ds So \\fBoptions\\fR +'el .ds So \\fB\\$1\\fR +.SH "STANDARD OPTIONS" +.LP +.nf +.ta 5.5c 11c +.ft B +.. +.\" # SE - end of list of standard options +.de SE +.fi +.ft R +.LP +See the \\*(So manual entry for details on the standard options. +.. +.\" # OP - start of full description for a single option +.de OP +.LP +.nf +.ta 4c +Command-Line Name: \\fB\\$1\\fR +Database Name: \\fB\\$2\\fR +Database Class: \\fB\\$3\\fR +.fi +.IP +.. +.\" # CS - begin code excerpt +.de CS +.RS +.nf +.ta .25i .5i .75i 1i +.. +.\" # CE - end code excerpt +.de CE +.fi +.RE +.. +.\" # UL - underline word +.de UL +\\$1\l'|0\(ul'\\$2 +.. +.\" # QW - apply quotation marks to word +.de QW +.ie '\\*(lq'"' ``\\$1''\\$2 +.\"" fix emacs highlighting +.el \\*(lq\\$1\\*(rq\\$2 +.. +.\" # PQ - apply parens and quotation marks to word +.de PQ +.ie '\\*(lq'"' (``\\$1''\\$2)\\$3 +.\"" fix emacs highlighting +.el (\\*(lq\\$1\\*(rq\\$2)\\$3 +.. +.\" # QR - quoted range +.de QR +.ie '\\*(lq'"' ``\\$1''\\-``\\$2''\\$3 +.\"" fix emacs highlighting +.el \\*(lq\\$1\\*(rq\\-\\*(lq\\$2\\*(rq\\$3 +.. +.\" # MT - "empty" string +.de MT +.QW "" +.. +.BS +.SH NAME +canvas::tag \- Easier management of the tags on canvas items or item groups +.SH SYNOPSIS +package require \fBTcl 8\&.5\fR +.sp +package require \fBTk 8\&.5\fR +.sp +package require \fBcanvas::tag ?0\&.1?\fR +.sp +\fB::canvas::tag\fR \fBappend\fR \fIcanvas\fR \fItagOrId\fR \fItag\fR\&.\&.\&. +.sp +\fB::canvas::tag\fR \fBprepend\fR \fIcanvas\fR \fItagOrId\fR \fItag\fR\&.\&.\&. +.sp +\fB::canvas::tag\fR \fBappend\fR \fIcanvas\fR \fItagOrId\fR \fIindex\fR \fItag\fR\&.\&.\&. +.sp +\fB::canvas::tag\fR \fBremove\fR \fIcanvas\fR \fItagOrId\fR \fItag\fR\&.\&.\&. +.sp +\fB::canvas::tag\fR \fBmatch\fR \fIcanvas\fR \fItagOrId\fR \fIpattern\fR +.sp +.BE +.SH DESCRIPTION +This package provides utility commands for easier management of the +tag lists associated with canvas items or item groups\&. +.PP +The problem with the existing canvas API is that a tag list can +only be set as a whole, making adding and removing of tags from such +lists relatively complex operations reading the current tag list, +modifying it, and then writing the changed list back\&. +.PP +The commands provided by this package hide all this complexity +from the user\&. +.SH API +.TP +\fB::canvas::tag\fR \fBappend\fR \fIcanvas\fR \fItagOrId\fR \fItag\fR\&.\&.\&. +This command adds the tags \fItag\fR\&.\&.\&. to the tag list for the items +identified by the \fItagOrId\fR in the \fIcanvas\fR widget\&. The new +tags are added at the end of the list\&. +.sp +The result of the command is the empty string\&. +.TP +\fB::canvas::tag\fR \fBprepend\fR \fIcanvas\fR \fItagOrId\fR \fItag\fR\&.\&.\&. +This command adds the tags \fItag\fR\&.\&.\&. to the tag list for the items +identified by the \fItagOrId\fR in the \fIcanvas\fR widget\&. The new +tags are added at the beginning of the list\&. +.sp +The result of the command is the empty string\&. +.TP +\fB::canvas::tag\fR \fBappend\fR \fIcanvas\fR \fItagOrId\fR \fIindex\fR \fItag\fR\&.\&.\&. +This command adds the tags \fItag\fR\&.\&.\&. to the tag list for the items +identified by the \fItagOrId\fR in the \fIcanvas\fR widget\&. The new +tags are inserted before the element at \fIindex\fR\&. +.sp +\fIindex\fR \fB0\fR refers to the beginning of the list\&. +.sp +\fIindex\fR \fBend\fR refers to after the end of the list\&. +.sp +The result of the command is the empty string\&. +.TP +\fB::canvas::tag\fR \fBremove\fR \fIcanvas\fR \fItagOrId\fR \fItag\fR\&.\&.\&. +This command removes the named tags \fItag\fR\&.\&.\&. from the tag list for the items +identified by the \fItagOrId\fR in the \fIcanvas\fR widget\&. +.sp +The result of the command is the empty string\&. +.TP +\fB::canvas::tag\fR \fBmatch\fR \fIcanvas\fR \fItagOrId\fR \fIpattern\fR +This command finds all tags for the items identified by the +\fItagOrId\fR in the \fIcanvas\fR widget which match the glob +\fIpattern\fR\&. +.sp +The result of the command is a list of the matching tags\&. Which +may be empty\&. +.PP +.SH "BUGS, IDEAS, FEEDBACK" +This document, and the package it describes, will undoubtedly contain +bugs and other problems\&. +Please report such in the category \fIcanvas\fR of the +\fITklib Trackers\fR [http://core\&.tcl\&.tk/tklib/reportlist]\&. +Please also report any ideas for enhancements you may have for either +package and/or documentation\&. +.SH KEYWORDS +append tag, canvas, insert tag, remove tag, tags \ No newline at end of file diff --git a/embedded/man/files/modules/canvas/canvas_trlines.n b/embedded/man/files/modules/canvas/canvas_trlines.n new file mode 100644 index 00000000..5cbb2657 --- /dev/null +++ b/embedded/man/files/modules/canvas/canvas_trlines.n @@ -0,0 +1,350 @@ +'\" +'\" Generated from file 'canvas_trlines\&.man' by tcllib/doctools with format 'nroff' +'\" +.TH "canvas::track::lines" n 0\&.1 tklib "Variations on a canvas" +.\" The -*- nroff -*- definitions below are for supplemental macros used +.\" in Tcl/Tk manual entries. +.\" +.\" .AP type name in/out ?indent? +.\" Start paragraph describing an argument to a library procedure. +.\" type is type of argument (int, etc.), in/out is either "in", "out", +.\" or "in/out" to describe whether procedure reads or modifies arg, +.\" and indent is equivalent to second arg of .IP (shouldn't ever be +.\" needed; use .AS below instead) +.\" +.\" .AS ?type? ?name? +.\" Give maximum sizes of arguments for setting tab stops. Type and +.\" name are examples of largest possible arguments that will be passed +.\" to .AP later. If args are omitted, default tab stops are used. +.\" +.\" .BS +.\" Start box enclosure. From here until next .BE, everything will be +.\" enclosed in one large box. +.\" +.\" .BE +.\" End of box enclosure. +.\" +.\" .CS +.\" Begin code excerpt. +.\" +.\" .CE +.\" End code excerpt. +.\" +.\" .VS ?version? ?br? +.\" Begin vertical sidebar, for use in marking newly-changed parts +.\" of man pages. The first argument is ignored and used for recording +.\" the version when the .VS was added, so that the sidebars can be +.\" found and removed when they reach a certain age. If another argument +.\" is present, then a line break is forced before starting the sidebar. +.\" +.\" .VE +.\" End of vertical sidebar. +.\" +.\" .DS +.\" Begin an indented unfilled display. +.\" +.\" .DE +.\" End of indented unfilled display. +.\" +.\" .SO ?manpage? +.\" Start of list of standard options for a Tk widget. The manpage +.\" argument defines where to look up the standard options; if +.\" omitted, defaults to "options". The options follow on successive +.\" lines, in three columns separated by tabs. +.\" +.\" .SE +.\" End of list of standard options for a Tk widget. +.\" +.\" .OP cmdName dbName dbClass +.\" Start of description of a specific option. cmdName gives the +.\" option's name as specified in the class command, dbName gives +.\" the option's name in the option database, and dbClass gives +.\" the option's class in the option database. +.\" +.\" .UL arg1 arg2 +.\" Print arg1 underlined, then print arg2 normally. +.\" +.\" .QW arg1 ?arg2? +.\" Print arg1 in quotes, then arg2 normally (for trailing punctuation). +.\" +.\" .PQ arg1 ?arg2? +.\" Print an open parenthesis, arg1 in quotes, then arg2 normally +.\" (for trailing punctuation) and then a closing parenthesis. +.\" +.\" # Set up traps and other miscellaneous stuff for Tcl/Tk man pages. +.if t .wh -1.3i ^B +.nr ^l \n(.l +.ad b +.\" # Start an argument description +.de AP +.ie !"\\$4"" .TP \\$4 +.el \{\ +. ie !"\\$2"" .TP \\n()Cu +. el .TP 15 +.\} +.ta \\n()Au \\n()Bu +.ie !"\\$3"" \{\ +\&\\$1 \\fI\\$2\\fP (\\$3) +.\".b +.\} +.el \{\ +.br +.ie !"\\$2"" \{\ +\&\\$1 \\fI\\$2\\fP +.\} +.el \{\ +\&\\fI\\$1\\fP +.\} +.\} +.. +.\" # define tabbing values for .AP +.de AS +.nr )A 10n +.if !"\\$1"" .nr )A \\w'\\$1'u+3n +.nr )B \\n()Au+15n +.\" +.if !"\\$2"" .nr )B \\w'\\$2'u+\\n()Au+3n +.nr )C \\n()Bu+\\w'(in/out)'u+2n +.. +.AS Tcl_Interp Tcl_CreateInterp in/out +.\" # BS - start boxed text +.\" # ^y = starting y location +.\" # ^b = 1 +.de BS +.br +.mk ^y +.nr ^b 1u +.if n .nf +.if n .ti 0 +.if n \l'\\n(.lu\(ul' +.if n .fi +.. +.\" # BE - end boxed text (draw box now) +.de BE +.nf +.ti 0 +.mk ^t +.ie n \l'\\n(^lu\(ul' +.el \{\ +.\" Draw four-sided box normally, but don't draw top of +.\" box if the box started on an earlier page. +.ie !\\n(^b-1 \{\ +\h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul' +.\} +.el \}\ +\h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul' +.\} +.\} +.fi +.br +.nr ^b 0 +.. +.\" # VS - start vertical sidebar +.\" # ^Y = starting y location +.\" # ^v = 1 (for troff; for nroff this doesn't matter) +.de VS +.if !"\\$2"" .br +.mk ^Y +.ie n 'mc \s12\(br\s0 +.el .nr ^v 1u +.. +.\" # VE - end of vertical sidebar +.de VE +.ie n 'mc +.el \{\ +.ev 2 +.nf +.ti 0 +.mk ^t +\h'|\\n(^lu+3n'\L'|\\n(^Yu-1v\(bv'\v'\\n(^tu+1v-\\n(^Yu'\h'-|\\n(^lu+3n' +.sp -1 +.fi +.ev +.\} +.nr ^v 0 +.. +.\" # Special macro to handle page bottom: finish off current +.\" # box/sidebar if in box/sidebar mode, then invoked standard +.\" # page bottom macro. +.de ^B +.ev 2 +'ti 0 +'nf +.mk ^t +.if \\n(^b \{\ +.\" Draw three-sided box if this is the box's first page, +.\" draw two sides but no top otherwise. +.ie !\\n(^b-1 \h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c +.el \h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c +.\} +.if \\n(^v \{\ +.nr ^x \\n(^tu+1v-\\n(^Yu +\kx\h'-\\nxu'\h'|\\n(^lu+3n'\ky\L'-\\n(^xu'\v'\\n(^xu'\h'|0u'\c +.\} +.bp +'fi +.ev +.if \\n(^b \{\ +.mk ^y +.nr ^b 2 +.\} +.if \\n(^v \{\ +.mk ^Y +.\} +.. +.\" # DS - begin display +.de DS +.RS +.nf +.sp +.. +.\" # DE - end display +.de DE +.fi +.RE +.sp +.. +.\" # SO - start of list of standard options +.de SO +'ie '\\$1'' .ds So \\fBoptions\\fR +'el .ds So \\fB\\$1\\fR +.SH "STANDARD OPTIONS" +.LP +.nf +.ta 5.5c 11c +.ft B +.. +.\" # SE - end of list of standard options +.de SE +.fi +.ft R +.LP +See the \\*(So manual entry for details on the standard options. +.. +.\" # OP - start of full description for a single option +.de OP +.LP +.nf +.ta 4c +Command-Line Name: \\fB\\$1\\fR +Database Name: \\fB\\$2\\fR +Database Class: \\fB\\$3\\fR +.fi +.IP +.. +.\" # CS - begin code excerpt +.de CS +.RS +.nf +.ta .25i .5i .75i 1i +.. +.\" # CE - end code excerpt +.de CE +.fi +.RE +.. +.\" # UL - underline word +.de UL +\\$1\l'|0\(ul'\\$2 +.. +.\" # QW - apply quotation marks to word +.de QW +.ie '\\*(lq'"' ``\\$1''\\$2 +.\"" fix emacs highlighting +.el \\*(lq\\$1\\*(rq\\$2 +.. +.\" # PQ - apply parens and quotation marks to word +.de PQ +.ie '\\*(lq'"' (``\\$1''\\$2)\\$3 +.\"" fix emacs highlighting +.el (\\*(lq\\$1\\*(rq\\$2)\\$3 +.. +.\" # QR - quoted range +.de QR +.ie '\\*(lq'"' ``\\$1''\\-``\\$2''\\$3 +.\"" fix emacs highlighting +.el \\*(lq\\$1\\*(rq\\-\\*(lq\\$2\\*(rq\\$3 +.. +.\" # MT - "empty" string +.de MT +.QW "" +.. +.BS +.SH NAME +canvas::track::lines \- Manage a group of rubber band lines +.SH SYNOPSIS +package require \fBTcl 8\&.5\fR +.sp +package require \fBTk 8\&.5\fR +.sp +package require \fBcanvas::tag ?0\&.1?\fR +.sp +\fB::canvas::track\fR \fBlines\fR \fIobjectName\fR \fIcanvas\fR +.sp +\fBobjectName\fR \fBdestroy\fR +.sp +\fBobjectName\fR \fBstart\fR \fIcurrent\fR \fIp\fR\&.\&.\&. +.sp +\fBobjectName\fR \fBmove\fR \fIcurrent\fR +.sp +\fBobjectName\fR \fBdone\fR +.sp +.BE +.SH DESCRIPTION +This package provides a utility class managing the drawing of set of semi-crosshair (rubberband) lines\&. +.SH "CLASS API" +.TP +\fB::canvas::track\fR \fBlines\fR \fIobjectName\fR \fIcanvas\fR +This, the class command, creates and configures a new instance of the +tracker, named \fIobjectName\fR\&. The instance will be +connected to the specified \fIcanvas\fR widget\&. +.sp +The result of the command is the fully qualified name of the +instance command\&. +.PP +.SH "INSTANCE API" +Instances of this class provide the following API: +.TP +\fBobjectName\fR \fBdestroy\fR +This method destroys the instance and releases all its +internal resources\&. +.sp +This operation does destroy the items representing the +tracked lines\&. It does not destroy the attached canvas\&. +.sp +The result of the method is an empty string\&. +.TP +\fBobjectName\fR \fBstart\fR \fIcurrent\fR \fIp\fR\&.\&.\&. +This method starts the tracking of a set of lines, one line per +point \fIp\fR, which specifies the destination end-point of each +line\&. All lines will have \fIcurrent\fR as a common end-point\&. +.sp +Note that a previously tracked set of lines is removed\&. +.sp +The result of the method is an empty string\&. +.sp +Each point is specified through a 2-element list containing its +x- and y-coordinates, in this order\&. +.TP +\fBobjectName\fR \fBmove\fR \fIcurrent\fR +This method updates the shared end-point of all rubberbands and redraws +them\&. +.sp +The result of the method is an empty string\&. +.sp +The point is specified through a 2-element list containing its +x- and y-coordinates, in this order\&. +.TP +\fBobjectName\fR \fBdone\fR +This method ends the tracking of the current set of lines and removes +them from the canvas\&. +.PP +.SH "BUGS, IDEAS, FEEDBACK" +This document, and the package it describes, will undoubtedly contain +bugs and other problems\&. +Please report such in the category \fIcanvas\fR of the +\fITklib Trackers\fR [http://core\&.tcl\&.tk/tklib/reportlist]\&. +Please also report any ideas for enhancements you may have for either +package and/or documentation\&. +.SH KEYWORDS +canvas, crosshair, rubberband, tracking \ No newline at end of file diff --git a/embedded/man/files/modules/canvas/canvas_zoom.n b/embedded/man/files/modules/canvas/canvas_zoom.n new file mode 100644 index 00000000..2e4c3998 --- /dev/null +++ b/embedded/man/files/modules/canvas/canvas_zoom.n @@ -0,0 +1,335 @@ +'\" +'\" Generated from file 'canvas_zoom\&.man' by tcllib/doctools with format 'nroff' +'\" +.TH "canvas::zoom" n 0\&.2\&.1 tklib "Variations on a canvas" +.\" The -*- nroff -*- definitions below are for supplemental macros used +.\" in Tcl/Tk manual entries. +.\" +.\" .AP type name in/out ?indent? +.\" Start paragraph describing an argument to a library procedure. +.\" type is type of argument (int, etc.), in/out is either "in", "out", +.\" or "in/out" to describe whether procedure reads or modifies arg, +.\" and indent is equivalent to second arg of .IP (shouldn't ever be +.\" needed; use .AS below instead) +.\" +.\" .AS ?type? ?name? +.\" Give maximum sizes of arguments for setting tab stops. Type and +.\" name are examples of largest possible arguments that will be passed +.\" to .AP later. If args are omitted, default tab stops are used. +.\" +.\" .BS +.\" Start box enclosure. From here until next .BE, everything will be +.\" enclosed in one large box. +.\" +.\" .BE +.\" End of box enclosure. +.\" +.\" .CS +.\" Begin code excerpt. +.\" +.\" .CE +.\" End code excerpt. +.\" +.\" .VS ?version? ?br? +.\" Begin vertical sidebar, for use in marking newly-changed parts +.\" of man pages. The first argument is ignored and used for recording +.\" the version when the .VS was added, so that the sidebars can be +.\" found and removed when they reach a certain age. If another argument +.\" is present, then a line break is forced before starting the sidebar. +.\" +.\" .VE +.\" End of vertical sidebar. +.\" +.\" .DS +.\" Begin an indented unfilled display. +.\" +.\" .DE +.\" End of indented unfilled display. +.\" +.\" .SO ?manpage? +.\" Start of list of standard options for a Tk widget. The manpage +.\" argument defines where to look up the standard options; if +.\" omitted, defaults to "options". The options follow on successive +.\" lines, in three columns separated by tabs. +.\" +.\" .SE +.\" End of list of standard options for a Tk widget. +.\" +.\" .OP cmdName dbName dbClass +.\" Start of description of a specific option. cmdName gives the +.\" option's name as specified in the class command, dbName gives +.\" the option's name in the option database, and dbClass gives +.\" the option's class in the option database. +.\" +.\" .UL arg1 arg2 +.\" Print arg1 underlined, then print arg2 normally. +.\" +.\" .QW arg1 ?arg2? +.\" Print arg1 in quotes, then arg2 normally (for trailing punctuation). +.\" +.\" .PQ arg1 ?arg2? +.\" Print an open parenthesis, arg1 in quotes, then arg2 normally +.\" (for trailing punctuation) and then a closing parenthesis. +.\" +.\" # Set up traps and other miscellaneous stuff for Tcl/Tk man pages. +.if t .wh -1.3i ^B +.nr ^l \n(.l +.ad b +.\" # Start an argument description +.de AP +.ie !"\\$4"" .TP \\$4 +.el \{\ +. ie !"\\$2"" .TP \\n()Cu +. el .TP 15 +.\} +.ta \\n()Au \\n()Bu +.ie !"\\$3"" \{\ +\&\\$1 \\fI\\$2\\fP (\\$3) +.\".b +.\} +.el \{\ +.br +.ie !"\\$2"" \{\ +\&\\$1 \\fI\\$2\\fP +.\} +.el \{\ +\&\\fI\\$1\\fP +.\} +.\} +.. +.\" # define tabbing values for .AP +.de AS +.nr )A 10n +.if !"\\$1"" .nr )A \\w'\\$1'u+3n +.nr )B \\n()Au+15n +.\" +.if !"\\$2"" .nr )B \\w'\\$2'u+\\n()Au+3n +.nr )C \\n()Bu+\\w'(in/out)'u+2n +.. +.AS Tcl_Interp Tcl_CreateInterp in/out +.\" # BS - start boxed text +.\" # ^y = starting y location +.\" # ^b = 1 +.de BS +.br +.mk ^y +.nr ^b 1u +.if n .nf +.if n .ti 0 +.if n \l'\\n(.lu\(ul' +.if n .fi +.. +.\" # BE - end boxed text (draw box now) +.de BE +.nf +.ti 0 +.mk ^t +.ie n \l'\\n(^lu\(ul' +.el \{\ +.\" Draw four-sided box normally, but don't draw top of +.\" box if the box started on an earlier page. +.ie !\\n(^b-1 \{\ +\h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul' +.\} +.el \}\ +\h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul' +.\} +.\} +.fi +.br +.nr ^b 0 +.. +.\" # VS - start vertical sidebar +.\" # ^Y = starting y location +.\" # ^v = 1 (for troff; for nroff this doesn't matter) +.de VS +.if !"\\$2"" .br +.mk ^Y +.ie n 'mc \s12\(br\s0 +.el .nr ^v 1u +.. +.\" # VE - end of vertical sidebar +.de VE +.ie n 'mc +.el \{\ +.ev 2 +.nf +.ti 0 +.mk ^t +\h'|\\n(^lu+3n'\L'|\\n(^Yu-1v\(bv'\v'\\n(^tu+1v-\\n(^Yu'\h'-|\\n(^lu+3n' +.sp -1 +.fi +.ev +.\} +.nr ^v 0 +.. +.\" # Special macro to handle page bottom: finish off current +.\" # box/sidebar if in box/sidebar mode, then invoked standard +.\" # page bottom macro. +.de ^B +.ev 2 +'ti 0 +'nf +.mk ^t +.if \\n(^b \{\ +.\" Draw three-sided box if this is the box's first page, +.\" draw two sides but no top otherwise. +.ie !\\n(^b-1 \h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c +.el \h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c +.\} +.if \\n(^v \{\ +.nr ^x \\n(^tu+1v-\\n(^Yu +\kx\h'-\\nxu'\h'|\\n(^lu+3n'\ky\L'-\\n(^xu'\v'\\n(^xu'\h'|0u'\c +.\} +.bp +'fi +.ev +.if \\n(^b \{\ +.mk ^y +.nr ^b 2 +.\} +.if \\n(^v \{\ +.mk ^Y +.\} +.. +.\" # DS - begin display +.de DS +.RS +.nf +.sp +.. +.\" # DE - end display +.de DE +.fi +.RE +.sp +.. +.\" # SO - start of list of standard options +.de SO +'ie '\\$1'' .ds So \\fBoptions\\fR +'el .ds So \\fB\\$1\\fR +.SH "STANDARD OPTIONS" +.LP +.nf +.ta 5.5c 11c +.ft B +.. +.\" # SE - end of list of standard options +.de SE +.fi +.ft R +.LP +See the \\*(So manual entry for details on the standard options. +.. +.\" # OP - start of full description for a single option +.de OP +.LP +.nf +.ta 4c +Command-Line Name: \\fB\\$1\\fR +Database Name: \\fB\\$2\\fR +Database Class: \\fB\\$3\\fR +.fi +.IP +.. +.\" # CS - begin code excerpt +.de CS +.RS +.nf +.ta .25i .5i .75i 1i +.. +.\" # CE - end code excerpt +.de CE +.fi +.RE +.. +.\" # UL - underline word +.de UL +\\$1\l'|0\(ul'\\$2 +.. +.\" # QW - apply quotation marks to word +.de QW +.ie '\\*(lq'"' ``\\$1''\\$2 +.\"" fix emacs highlighting +.el \\*(lq\\$1\\*(rq\\$2 +.. +.\" # PQ - apply parens and quotation marks to word +.de PQ +.ie '\\*(lq'"' (``\\$1''\\$2)\\$3 +.\"" fix emacs highlighting +.el (\\*(lq\\$1\\*(rq\\$2)\\$3 +.. +.\" # QR - quoted range +.de QR +.ie '\\*(lq'"' ``\\$1''\\-``\\$2''\\$3 +.\"" fix emacs highlighting +.el \\*(lq\\$1\\*(rq\\-\\*(lq\\$2\\*(rq\\$3 +.. +.\" # MT - "empty" string +.de MT +.QW "" +.. +.BS +.SH NAME +canvas::zoom \- Zoom control for canvas::sqmap +.SH SYNOPSIS +package require \fBTcl 8\&.4\fR +.sp +package require \fBTk 8\&.4\fR +.sp +package require \fBsnit \fR +.sp +package require \fBuevent::onidle \fR +.sp +package require \fBcanvas::zoom ?0\&.2\&.1?\fR +.sp +\fB::canvas::zoom\fR \fIpathName\fR ?options? +.sp +.BE +.SH DESCRIPTION +This package provides a widget to enable the user of a map display to +control the zoom level\&. +.SH API +.TP +\fB::canvas::zoom\fR \fIpathName\fR ?options? +Creates the zoom control widget \fIpathName\fR and configures it\&. The +methods and options supported by the new widget are described in the +following sections\&. +.sp +The result of the command is \fIpathName\fR\&. +.PP +.SS OPTIONS +.TP +\fB-orient\fR +The value for this option is either \fBvertical\fR, or +\fBhorizontal\fR, specifying the orientation of the major axis of +the widget\&. The default is \fBvertical\fR\&. +.TP +\fB-levels\fR +The value for this option is a non-negative integer\&. It specifies the +number of zoom levels to support\&. +.TP +\fB-variable\fR +The value for this option is the name of a global or namespaced +variable which is connected with the widget\&. changes to the zoom level +made the widget are propagated to this variable, and in turn changes +to the variable are imported into the widget\&. +.TP +\fB-command\fR +This option specifies a command prefix\&. This callback will be invoked +whenever the zoom level is changed\&. It is called with two additional +arguments, the zoom control widget, and the new zoom level, in this +order\&. +.PP +.SS METHODS +The widget supports no methods beyond the standard (\fBconfigure\fR, +\fBcget\fR, etc\&.)\&. +.SH "BUGS, IDEAS, FEEDBACK" +This document, and the package it describes, will undoubtedly contain +bugs and other problems\&. +Please report such in the category \fIcanvas\fR of the +\fITklib Trackers\fR [http://core\&.tcl\&.tk/tklib/reportlist]\&. +Please also report any ideas for enhancements you may have for either +package and/or documentation\&. +.SH KEYWORDS +zoom \ No newline at end of file diff --git a/embedded/man/files/modules/chatwidget/chatwidget.n b/embedded/man/files/modules/chatwidget/chatwidget.n new file mode 100644 index 00000000..289e63ee --- /dev/null +++ b/embedded/man/files/modules/chatwidget/chatwidget.n @@ -0,0 +1,402 @@ +'\" +'\" Generated from file 'chatwidget\&.man' by tcllib/doctools with format 'nroff' +'\" +.TH "chatwidget" n 1\&.0\&.0 tklib "Composite widget for chat applications" +.\" The -*- nroff -*- definitions below are for supplemental macros used +.\" in Tcl/Tk manual entries. +.\" +.\" .AP type name in/out ?indent? +.\" Start paragraph describing an argument to a library procedure. +.\" type is type of argument (int, etc.), in/out is either "in", "out", +.\" or "in/out" to describe whether procedure reads or modifies arg, +.\" and indent is equivalent to second arg of .IP (shouldn't ever be +.\" needed; use .AS below instead) +.\" +.\" .AS ?type? ?name? +.\" Give maximum sizes of arguments for setting tab stops. Type and +.\" name are examples of largest possible arguments that will be passed +.\" to .AP later. If args are omitted, default tab stops are used. +.\" +.\" .BS +.\" Start box enclosure. From here until next .BE, everything will be +.\" enclosed in one large box. +.\" +.\" .BE +.\" End of box enclosure. +.\" +.\" .CS +.\" Begin code excerpt. +.\" +.\" .CE +.\" End code excerpt. +.\" +.\" .VS ?version? ?br? +.\" Begin vertical sidebar, for use in marking newly-changed parts +.\" of man pages. The first argument is ignored and used for recording +.\" the version when the .VS was added, so that the sidebars can be +.\" found and removed when they reach a certain age. If another argument +.\" is present, then a line break is forced before starting the sidebar. +.\" +.\" .VE +.\" End of vertical sidebar. +.\" +.\" .DS +.\" Begin an indented unfilled display. +.\" +.\" .DE +.\" End of indented unfilled display. +.\" +.\" .SO ?manpage? +.\" Start of list of standard options for a Tk widget. The manpage +.\" argument defines where to look up the standard options; if +.\" omitted, defaults to "options". The options follow on successive +.\" lines, in three columns separated by tabs. +.\" +.\" .SE +.\" End of list of standard options for a Tk widget. +.\" +.\" .OP cmdName dbName dbClass +.\" Start of description of a specific option. cmdName gives the +.\" option's name as specified in the class command, dbName gives +.\" the option's name in the option database, and dbClass gives +.\" the option's class in the option database. +.\" +.\" .UL arg1 arg2 +.\" Print arg1 underlined, then print arg2 normally. +.\" +.\" .QW arg1 ?arg2? +.\" Print arg1 in quotes, then arg2 normally (for trailing punctuation). +.\" +.\" .PQ arg1 ?arg2? +.\" Print an open parenthesis, arg1 in quotes, then arg2 normally +.\" (for trailing punctuation) and then a closing parenthesis. +.\" +.\" # Set up traps and other miscellaneous stuff for Tcl/Tk man pages. +.if t .wh -1.3i ^B +.nr ^l \n(.l +.ad b +.\" # Start an argument description +.de AP +.ie !"\\$4"" .TP \\$4 +.el \{\ +. ie !"\\$2"" .TP \\n()Cu +. el .TP 15 +.\} +.ta \\n()Au \\n()Bu +.ie !"\\$3"" \{\ +\&\\$1 \\fI\\$2\\fP (\\$3) +.\".b +.\} +.el \{\ +.br +.ie !"\\$2"" \{\ +\&\\$1 \\fI\\$2\\fP +.\} +.el \{\ +\&\\fI\\$1\\fP +.\} +.\} +.. +.\" # define tabbing values for .AP +.de AS +.nr )A 10n +.if !"\\$1"" .nr )A \\w'\\$1'u+3n +.nr )B \\n()Au+15n +.\" +.if !"\\$2"" .nr )B \\w'\\$2'u+\\n()Au+3n +.nr )C \\n()Bu+\\w'(in/out)'u+2n +.. +.AS Tcl_Interp Tcl_CreateInterp in/out +.\" # BS - start boxed text +.\" # ^y = starting y location +.\" # ^b = 1 +.de BS +.br +.mk ^y +.nr ^b 1u +.if n .nf +.if n .ti 0 +.if n \l'\\n(.lu\(ul' +.if n .fi +.. +.\" # BE - end boxed text (draw box now) +.de BE +.nf +.ti 0 +.mk ^t +.ie n \l'\\n(^lu\(ul' +.el \{\ +.\" Draw four-sided box normally, but don't draw top of +.\" box if the box started on an earlier page. +.ie !\\n(^b-1 \{\ +\h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul' +.\} +.el \}\ +\h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul' +.\} +.\} +.fi +.br +.nr ^b 0 +.. +.\" # VS - start vertical sidebar +.\" # ^Y = starting y location +.\" # ^v = 1 (for troff; for nroff this doesn't matter) +.de VS +.if !"\\$2"" .br +.mk ^Y +.ie n 'mc \s12\(br\s0 +.el .nr ^v 1u +.. +.\" # VE - end of vertical sidebar +.de VE +.ie n 'mc +.el \{\ +.ev 2 +.nf +.ti 0 +.mk ^t +\h'|\\n(^lu+3n'\L'|\\n(^Yu-1v\(bv'\v'\\n(^tu+1v-\\n(^Yu'\h'-|\\n(^lu+3n' +.sp -1 +.fi +.ev +.\} +.nr ^v 0 +.. +.\" # Special macro to handle page bottom: finish off current +.\" # box/sidebar if in box/sidebar mode, then invoked standard +.\" # page bottom macro. +.de ^B +.ev 2 +'ti 0 +'nf +.mk ^t +.if \\n(^b \{\ +.\" Draw three-sided box if this is the box's first page, +.\" draw two sides but no top otherwise. +.ie !\\n(^b-1 \h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c +.el \h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c +.\} +.if \\n(^v \{\ +.nr ^x \\n(^tu+1v-\\n(^Yu +\kx\h'-\\nxu'\h'|\\n(^lu+3n'\ky\L'-\\n(^xu'\v'\\n(^xu'\h'|0u'\c +.\} +.bp +'fi +.ev +.if \\n(^b \{\ +.mk ^y +.nr ^b 2 +.\} +.if \\n(^v \{\ +.mk ^Y +.\} +.. +.\" # DS - begin display +.de DS +.RS +.nf +.sp +.. +.\" # DE - end display +.de DE +.fi +.RE +.sp +.. +.\" # SO - start of list of standard options +.de SO +'ie '\\$1'' .ds So \\fBoptions\\fR +'el .ds So \\fB\\$1\\fR +.SH "STANDARD OPTIONS" +.LP +.nf +.ta 5.5c 11c +.ft B +.. +.\" # SE - end of list of standard options +.de SE +.fi +.ft R +.LP +See the \\*(So manual entry for details on the standard options. +.. +.\" # OP - start of full description for a single option +.de OP +.LP +.nf +.ta 4c +Command-Line Name: \\fB\\$1\\fR +Database Name: \\fB\\$2\\fR +Database Class: \\fB\\$3\\fR +.fi +.IP +.. +.\" # CS - begin code excerpt +.de CS +.RS +.nf +.ta .25i .5i .75i 1i +.. +.\" # CE - end code excerpt +.de CE +.fi +.RE +.. +.\" # UL - underline word +.de UL +\\$1\l'|0\(ul'\\$2 +.. +.\" # QW - apply quotation marks to word +.de QW +.ie '\\*(lq'"' ``\\$1''\\$2 +.\"" fix emacs highlighting +.el \\*(lq\\$1\\*(rq\\$2 +.. +.\" # PQ - apply parens and quotation marks to word +.de PQ +.ie '\\*(lq'"' (``\\$1''\\$2)\\$3 +.\"" fix emacs highlighting +.el (\\*(lq\\$1\\*(rq\\$2)\\$3 +.. +.\" # QR - quoted range +.de QR +.ie '\\*(lq'"' ``\\$1''\\-``\\$2''\\$3 +.\"" fix emacs highlighting +.el \\*(lq\\$1\\*(rq\\-\\*(lq\\$2\\*(rq\\$3 +.. +.\" # MT - "empty" string +.de MT +.QW "" +.. +.BS +.SH NAME +chatwidget \- Provides a multi-paned view suitable for display of chat room or irc channel information +.SH SYNOPSIS +package require \fBTk 8\&.5\fR +.sp +package require \fBchatwidget ?1\&.0\&.0?\fR +.sp +\fB::chatwidget::chatwidget\fR \fIpath\fR ?\fIoptions\fR? +.sp +\fB$widget\fR topic \fIcommand\fR \fIargs\fR +.sp +\fB$widget\fR name \fInick\fR \fIargs\fR +.sp +\fB$widget\fR message \fItext\fR \fIargs\fR +.sp +\fB$widget\fR hook \fIcommand\fR \fIargs\fR +.sp +\fB$widget\fR names \fIargs\fR +.sp +\fB$widget\fR entry \fIargs\fR +.sp +\fB$widget\fR chat \fIargs\fR +.sp +.BE +.SH DESCRIPTION +This is a composite widget designed to simplify the construction of +chat applications\&. The widget contains display areas for chat +messages, user names and topic and an entry area\&. It automatically +handles colourization of messages per nick and manages nick +completion\&. A system of hooks permit the application author to adjust +display features\&. The main chat display area may be split for use +displaying history or for searching\&. +.PP +The widget is made up of a number of text widget and panedwindow +widgets so that the size of each part of the display may be adjusted +by the user\&. All the text widgets may be accessed via widget +passthrough commands if fine adjustment is required\&. The topic and +names sections can also be hidden if desired\&. +.SH COMMANDS +.TP +\fB::chatwidget::chatwidget\fR \fIpath\fR ?\fIoptions\fR? +Create a new chatwidget using the Tk window id \fIpath\fR\&. Any options +provided are currently passed directly to the main chat text widget\&. +.PP +.SH "WIDGET COMMANDS" +.TP +\fB$widget\fR topic \fIcommand\fR \fIargs\fR +The chat widget can display a topic string, for instance the topic or +name given to a multi-user chatroom or irc channel\&. +.RS +.TP +\fBshow\fR +Enable display of the topic\&. +.TP +\fBhide\fR +Disable display of the topic +.TP +\fBset \fItopic\fR\fR +Set the topic text to \fItopic\fR\&. +.RE +.TP +\fB$widget\fR name \fInick\fR \fIargs\fR +Control the names and tags associated with names\&. +.RS +.TP +\fBlist ?\fI-full\fR?\fR +Returns a list of all the user names from the names view\&. If ?-full? is given then the list returned is a list of lists where each +sublist is made up of the nick followed by any options that have been +set on this nick entry\&. This may be used to examine any application +specific options that may be applied to a nick when using the +\fBadd\fR command\&. +.TP +\fBadd \fInick\fR ?\fIoptions\fR?\fR +.TP +\fBdelete \fInick\fR\fR +.RE +.TP +\fB$widget\fR message \fItext\fR \fIargs\fR +Add messages to the display\&. options are -nick, -time, -type, -mark +-tags +.TP +\fB$widget\fR hook \fIcommand\fR \fIargs\fR +Manage hooks\&. add (message, post names_group, names_nick, chatstate), remove, run +.TP +\fB$widget\fR names \fIargs\fR +Passthrough to the name display text widget\&. See the \fBtext\fR widget manual +for all available commands\&. The chatwidget provides two additional +commands \fBshow\fR and \fBhide\fR which are used to control the +display of this element in the widget\&. +.TP +\fB$widget\fR entry \fIargs\fR +Passthrough to the entry text widget\&. See the \fBtext\fR widget manual +for all available commands\&. +.TP +\fB$widget\fR chat \fIargs\fR +Passthrough to the chat text widget\&. See the \fBtext\fR widget manual for +all available commands\&. +.PP +.SH EXAMPLE +.CS + + +chatwidget::chatwidget \&.chat +proc speak {w msg} {$w message $msg -nick user} +\&.chat hook add post [list speak \&.chat] +pack \&.chat -side top -fill both -expand 1 +\&.chat topic show +\&.chat topic set "Chat widget demo" +\&.chat name add "admin" -group admin +\&.chat name add "user" -group users -color tomato +\&.chat message "Chatwidget ready" -type system +\&.chat message "Hello, user" -nick admin +\&.chat message "Hello, admin" -nick user + +.CE +.PP +A more extensive example is available by examining the code for the picoirc +program in the tclapps repository which ties the tcllib \fBpicoirc\fR package to this +\fBchatwidget\fR package to create a simple irc client\&. +.SH "BUGS, IDEAS, FEEDBACK" +This document, and the package it describes, will undoubtedly contain +bugs and other problems\&. +Please report such in the category \fIchatwidget\fR of the +\fITklib Trackers\fR [http://core\&.tcl\&.tk/tklib/reportlist]\&. +Please also report any ideas for enhancements you may have for either +package and/or documentation\&. +.SH "SEE ALSO" +text(n) +.SH KEYWORDS +chat, chatwidget, composite widget, irc, mega-widget, widget \ No newline at end of file diff --git a/embedded/man/files/modules/controlwidget/controlwidget.n b/embedded/man/files/modules/controlwidget/controlwidget.n new file mode 100644 index 00000000..bf25051d --- /dev/null +++ b/embedded/man/files/modules/controlwidget/controlwidget.n @@ -0,0 +1,821 @@ +'\" +'\" Generated from file 'controlwidget\&.man' by tcllib/doctools with format 'nroff' +'\" Copyright (c) 2010 Ron Fox +'\" Copyright (c) 2010 Gerhard Reithofer <\&.\&.\&.@\&.\&.\&.> +'\" Copyright (c) 2010 Marco Maggi <\&.\&.\&.@\&.\&.\&.> +'\" Copyright (c) 2010 Arjen Markus +'\" +.TH "controlwidget" n 0\&.1 tklib "controlwidget" +.\" The -*- nroff -*- definitions below are for supplemental macros used +.\" in Tcl/Tk manual entries. +.\" +.\" .AP type name in/out ?indent? +.\" Start paragraph describing an argument to a library procedure. +.\" type is type of argument (int, etc.), in/out is either "in", "out", +.\" or "in/out" to describe whether procedure reads or modifies arg, +.\" and indent is equivalent to second arg of .IP (shouldn't ever be +.\" needed; use .AS below instead) +.\" +.\" .AS ?type? ?name? +.\" Give maximum sizes of arguments for setting tab stops. Type and +.\" name are examples of largest possible arguments that will be passed +.\" to .AP later. If args are omitted, default tab stops are used. +.\" +.\" .BS +.\" Start box enclosure. From here until next .BE, everything will be +.\" enclosed in one large box. +.\" +.\" .BE +.\" End of box enclosure. +.\" +.\" .CS +.\" Begin code excerpt. +.\" +.\" .CE +.\" End code excerpt. +.\" +.\" .VS ?version? ?br? +.\" Begin vertical sidebar, for use in marking newly-changed parts +.\" of man pages. The first argument is ignored and used for recording +.\" the version when the .VS was added, so that the sidebars can be +.\" found and removed when they reach a certain age. If another argument +.\" is present, then a line break is forced before starting the sidebar. +.\" +.\" .VE +.\" End of vertical sidebar. +.\" +.\" .DS +.\" Begin an indented unfilled display. +.\" +.\" .DE +.\" End of indented unfilled display. +.\" +.\" .SO ?manpage? +.\" Start of list of standard options for a Tk widget. The manpage +.\" argument defines where to look up the standard options; if +.\" omitted, defaults to "options". The options follow on successive +.\" lines, in three columns separated by tabs. +.\" +.\" .SE +.\" End of list of standard options for a Tk widget. +.\" +.\" .OP cmdName dbName dbClass +.\" Start of description of a specific option. cmdName gives the +.\" option's name as specified in the class command, dbName gives +.\" the option's name in the option database, and dbClass gives +.\" the option's class in the option database. +.\" +.\" .UL arg1 arg2 +.\" Print arg1 underlined, then print arg2 normally. +.\" +.\" .QW arg1 ?arg2? +.\" Print arg1 in quotes, then arg2 normally (for trailing punctuation). +.\" +.\" .PQ arg1 ?arg2? +.\" Print an open parenthesis, arg1 in quotes, then arg2 normally +.\" (for trailing punctuation) and then a closing parenthesis. +.\" +.\" # Set up traps and other miscellaneous stuff for Tcl/Tk man pages. +.if t .wh -1.3i ^B +.nr ^l \n(.l +.ad b +.\" # Start an argument description +.de AP +.ie !"\\$4"" .TP \\$4 +.el \{\ +. ie !"\\$2"" .TP \\n()Cu +. el .TP 15 +.\} +.ta \\n()Au \\n()Bu +.ie !"\\$3"" \{\ +\&\\$1 \\fI\\$2\\fP (\\$3) +.\".b +.\} +.el \{\ +.br +.ie !"\\$2"" \{\ +\&\\$1 \\fI\\$2\\fP +.\} +.el \{\ +\&\\fI\\$1\\fP +.\} +.\} +.. +.\" # define tabbing values for .AP +.de AS +.nr )A 10n +.if !"\\$1"" .nr )A \\w'\\$1'u+3n +.nr )B \\n()Au+15n +.\" +.if !"\\$2"" .nr )B \\w'\\$2'u+\\n()Au+3n +.nr )C \\n()Bu+\\w'(in/out)'u+2n +.. +.AS Tcl_Interp Tcl_CreateInterp in/out +.\" # BS - start boxed text +.\" # ^y = starting y location +.\" # ^b = 1 +.de BS +.br +.mk ^y +.nr ^b 1u +.if n .nf +.if n .ti 0 +.if n \l'\\n(.lu\(ul' +.if n .fi +.. +.\" # BE - end boxed text (draw box now) +.de BE +.nf +.ti 0 +.mk ^t +.ie n \l'\\n(^lu\(ul' +.el \{\ +.\" Draw four-sided box normally, but don't draw top of +.\" box if the box started on an earlier page. +.ie !\\n(^b-1 \{\ +\h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul' +.\} +.el \}\ +\h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul' +.\} +.\} +.fi +.br +.nr ^b 0 +.. +.\" # VS - start vertical sidebar +.\" # ^Y = starting y location +.\" # ^v = 1 (for troff; for nroff this doesn't matter) +.de VS +.if !"\\$2"" .br +.mk ^Y +.ie n 'mc \s12\(br\s0 +.el .nr ^v 1u +.. +.\" # VE - end of vertical sidebar +.de VE +.ie n 'mc +.el \{\ +.ev 2 +.nf +.ti 0 +.mk ^t +\h'|\\n(^lu+3n'\L'|\\n(^Yu-1v\(bv'\v'\\n(^tu+1v-\\n(^Yu'\h'-|\\n(^lu+3n' +.sp -1 +.fi +.ev +.\} +.nr ^v 0 +.. +.\" # Special macro to handle page bottom: finish off current +.\" # box/sidebar if in box/sidebar mode, then invoked standard +.\" # page bottom macro. +.de ^B +.ev 2 +'ti 0 +'nf +.mk ^t +.if \\n(^b \{\ +.\" Draw three-sided box if this is the box's first page, +.\" draw two sides but no top otherwise. +.ie !\\n(^b-1 \h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c +.el \h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c +.\} +.if \\n(^v \{\ +.nr ^x \\n(^tu+1v-\\n(^Yu +\kx\h'-\\nxu'\h'|\\n(^lu+3n'\ky\L'-\\n(^xu'\v'\\n(^xu'\h'|0u'\c +.\} +.bp +'fi +.ev +.if \\n(^b \{\ +.mk ^y +.nr ^b 2 +.\} +.if \\n(^v \{\ +.mk ^Y +.\} +.. +.\" # DS - begin display +.de DS +.RS +.nf +.sp +.. +.\" # DE - end display +.de DE +.fi +.RE +.sp +.. +.\" # SO - start of list of standard options +.de SO +'ie '\\$1'' .ds So \\fBoptions\\fR +'el .ds So \\fB\\$1\\fR +.SH "STANDARD OPTIONS" +.LP +.nf +.ta 5.5c 11c +.ft B +.. +.\" # SE - end of list of standard options +.de SE +.fi +.ft R +.LP +See the \\*(So manual entry for details on the standard options. +.. +.\" # OP - start of full description for a single option +.de OP +.LP +.nf +.ta 4c +Command-Line Name: \\fB\\$1\\fR +Database Name: \\fB\\$2\\fR +Database Class: \\fB\\$3\\fR +.fi +.IP +.. +.\" # CS - begin code excerpt +.de CS +.RS +.nf +.ta .25i .5i .75i 1i +.. +.\" # CE - end code excerpt +.de CE +.fi +.RE +.. +.\" # UL - underline word +.de UL +\\$1\l'|0\(ul'\\$2 +.. +.\" # QW - apply quotation marks to word +.de QW +.ie '\\*(lq'"' ``\\$1''\\$2 +.\"" fix emacs highlighting +.el \\*(lq\\$1\\*(rq\\$2 +.. +.\" # PQ - apply parens and quotation marks to word +.de PQ +.ie '\\*(lq'"' (``\\$1''\\$2)\\$3 +.\"" fix emacs highlighting +.el (\\*(lq\\$1\\*(rq\\$2)\\$3 +.. +.\" # QR - quoted range +.de QR +.ie '\\*(lq'"' ``\\$1''\\-``\\$2''\\$3 +.\"" fix emacs highlighting +.el \\*(lq\\$1\\*(rq\\-\\*(lq\\$2\\*(rq\\$3 +.. +.\" # MT - "empty" string +.de MT +.QW "" +.. +.BS +.SH NAME +controlwidget \- Collection of widgets for displaying and controlling numerical values +.SH SYNOPSIS +package require \fBTcl ?8\&.5?\fR +.sp +package require \fBTk ?8\&.5?\fR +.sp +package require \fBsnit ?2\&.0?\fR +.sp +package require \fBcontrolwidget ?0\&.1?\fR +.sp +\fB::controlwidget::meter\fR \fIw\fR \fIargs\fR +.sp +\fB::controlwidget::slider\fR \fIw\fR \fIargs\fR +.sp +\fB::controlwidget::equalizerBar\fR \fIw\fR \fIargs\fR +.sp +\fB::controlwidget::thermometer\fR \fIw\fR \fIargs\fR +.sp +\fB::controlwidget::voltmeter\fR \fIw\fR \fIargs\fR +.sp +\fB::controlwidget::tachometer\fR \fIw\fR \fIargs\fR +.sp +\fB::controlwidget::rdial\fR \fIw\fR \fIargs\fR +.sp +\fB$widget\fR get +.sp +\fB$widget\fR set \fIvalue\fR +.sp +\fB::controlwidget::led\fR \fIw\fR \fIargs\fR +.sp +\fB::controlwidget::radioMatrix\fR \fIw\fR \fIargs\fR +.sp +\fB$led\fR on +.sp +\fB$led\fR off +.sp +\fB$led\fR setstate \fIstate\fR +.sp +\fB$matrix\fR get +.sp +\fB$matrix\fR set \fIindex\fR +.sp +.BE +.SH DESCRIPTION +.PP +The controlwidget package focuses on the display and interactive control of numerical values\&. +It mimicks several of the meters and controls found in laboratory settings but also +daily life: volt meters, equalizers and tachometers to name a few\&. They can be seen as alternatives +for the \fIscale widget\fR\&. +.PP +\fINote:\fR The package has not sofar been tested extensively, and that may result in +an unexpected appearance if you use sizes that are different than the defaults\&. Also +not all options for the coloring of the various parts and fonts and so on have been tested, so that +may be another source of bugs\&. +.PP +A last note: some parts have not been included in any option, most notably the colors of +parts that require lighter and darker shades to cooperate\&. +.SH "TYPES OF WIDGETS" +The package distinguishes several typed of widgets: +.IP \(bu +Vertical meters: the value of the variable is translated into a vertical position, like with +the coloured bars you find on your stereo installation\&. +.IP \(bu +Angle displays: the value of the variable is related to the angle of a needle, like with tachometers\&. +.IP \(bu +Interactive widgets: most widgets allow you to change the value of the variable by pressing the mouse button +on the needle and shifting it up and down or left and right\&. +.IP \(bu +Non-interactive widgets: some widgets, like the thermometer widget, do not allow such interaction\&. +.IP \(bu +Logical or choice widgets: some widgets display the values as either on/off (or true/false) or as +one of a set of discrete choices\&. +.PP +All widgets have in common, however, that you can connect them to a variable and that changing the variable +changes the display\&. Forthermore, all widgets have the set and get methods to interact with the value that +the widget displays (whether that is stored in a global variable or not)\&. +.PP +They also have in common that their appearance and behaviour is determined by one or more options that +you can set at creation time and often later on as well\&. The widgets are all based on the \fIsnit\fR +package, so that the methods \fBconfigure\fR and \fBcget\fR are available to set and get these options\&. +.SH COMMANDS +Currently the package contains these widgets of the \fIvertical meter\fR type: +.TP +\fB::controlwidget::meter\fR \fIw\fR \fIargs\fR +Create a vertical meter consisting of an axis and a moveable arrow\&. +.RS +.TP +widget \fIw\fR (in) +Name of the widget to be created\&. +.TP +arguments \fIargs\fR (in) +List of key-value pairs, controlling the appearance and behaviour of the widget: +.RS +.TP +\fBvariable\fR name +Name of the variable to be associated with the meter +.TP +\fBbackground\fR color +Background color for the widget +.TP +\fBheight\fR pixels +Height of the widget +.TP +\fBwidth\fR pixels +Width of the widget +.TP +\fBarrowthickness\fR pixels +Thickness of the displayed arrow in pixels +.TP +\fBarrowcolor\fR color +Color of the displayed arrow +.TP +\fBreadonly\fR boolean +Whether the arrow can be moved interactively or not +.RE +.RE +.TP +\fB::controlwidget::slider\fR \fIw\fR \fIargs\fR +Create a widget containing one or more vertical sliders and an axis\&. You can shift the slider handles +interactively via the mouse\&. +.RS +.TP +widget \fIw\fR (in) +Name of the widget to be created\&. +.TP +arguments \fIargs\fR (in) +List of key-value pairs, controlling the appearance and behaviour of the widget: +.RS +.TP +\fBvariable\fR name +Name of the (list) variable to be associated with the widget +.TP +\fBnumber\fR integer +Number of sliders in the widget +.TP +\fBbackground\fR color +Background color for the widget +.TP +\fBheight\fR pixels +Height of the widget +.TP +\fBwidth\fR pixels +Width of the widget +.TP +\fBsliderthickness\fR pixels +Thickness of the slider handles +.TP +\fBsliderwidth\fR color +Width of the slider handles +.TP +\fBtroughwidth\fR color +Width of the troughs holding the sliders +.RE +.RE +.TP +\fB::controlwidget::equalizerBar\fR \fIw\fR \fIargs\fR +Create a widget containing one or more vertical bars resembling those found on hifi graphical equalizers\&. +Note that it is a read-only widget\&. +.RS +.TP +widget \fIw\fR (in) +Name of the widget to be created\&. +.TP +arguments \fIargs\fR (in) +List of key-value pairs, controlling the appearance and behaviour of the widget: +.RS +.TP +\fBvariable\fR name +Name of the (list) variable to be associated with the widget +.TP +\fBnumber\fR integer +Number of bars in the widget +.TP +\fBbackground\fR color +Background color for the widget +.TP +\fBheight\fR pixels +Height of the widget +.TP +\fBwidth\fR pixels +Width of the widget +.TP +\fBbarwidth\fR pixels +Width of the bars +.TP +\fBsegments\fR integer +Number of segments the bars are divided in +.TP +\fBsafecolor\fR color +Color for values lower than the warning level +.TP +\fBwarningcolor\fR color +Color for values greater than the warning level +.TP +\fBwarninglevel\fR double +Threshold value, determines at what level the color changes +.RE +.RE +.TP +\fB::controlwidget::thermometer\fR \fIw\fR \fIargs\fR +Create a thermometer widget (read-only) +.RS +.TP +widget \fIw\fR (in) +Name of the widget to be created\&. +.TP +arguments \fIargs\fR (in) +List of key-value pairs, controlling the appearance and behaviour of the widget: +.RS +.TP +\fBvariable\fR name +Name of the (list) variable to be associated with the widget +.TP +\fBbackground\fR color +Background color for the widget +.TP +\fBheight\fR pixels +Height of the widget +.TP +\fBwidth\fR pixels +Width of the widget +.TP +\fBlinethickness\fR pixels +Thickness of the line representing the "temperature" +.TP +\fBlinecolor\fR color +Color of the line +.RE +.RE +.PP +These widgets all use a vertical axis and have the following options in common for configuring the +axis: +.TP +\fBaxisformat\fR string +Format string for formatting the numbers along the axis +.TP +\fBaxisfont\fR string +Name of the font to be used for the numbers +.TP +\fBaxiscolor\fR color +Color of the axis (including the numbers) +.TP +\fBfrom\fR color +Lower value for the axis +.TP +\fBto\fR color +Upper value for the axis +.TP +\fBmajorticks\fR integer +Number of major tickmarks to draw (each is labelled) +.TP +\fBminorticks\fR integer +Number of minor tickmarks to draw between two major tickmarks +.TP +\fBlog\fR boolean +Use a logarithmic axis (true) or a linear axis (false) +.PP +The package contains the following widget based on angle displays: +.TP +\fB::controlwidget::voltmeter\fR \fIw\fR \fIargs\fR +Create a voltmeter-like widget\&. +.RS +.TP +widget \fIw\fR (in) +Name of the widget to be created\&. +.TP +arguments \fIargs\fR (in) +List of key-value pairs, controlling the appearance and behaviour of the widget: +.RS +.TP +\fBvariable\fR name +Name of the variable to be associated with the meter +.TP +\fBvalue\fR value +Value for the meter (if not associated with a variable) +.TP +\fBmin\fR value +The minimum value for data in the display +.TP +\fBmax\fR value +The maximum value for data in the display +.TP +\fBlabels\fR list +The labels to be shown along the scale\&. (These are simply considered texts, so no +relation with the minimum and maximum perse) +.TP +\fBtitle\fR string +String to be shown below the dial +.TP +\fBwidth\fR pixels +The width of the widget +.TP +\fBheight\fR pixels +The height of the widget +.TP +\fBborderwidth\fR pixels +The width of the border surrounding the entire widget +.TP +\fBrelief\fR string +The relief of the border surrounding the entire widget +.TP +\fBhighlightthickness\fR pixels +The width of the border to indicate the widget has keyboard focus +.TP +\fBlabelfont\fR fontname +Font of the labels to the scale +.TP +\fBtitlefont\fR fontname +Font of the title below the dial +.TP +\fBdialcolor\fR color +Color of the dial holding the needle +.TP +\fBneedlecolor\fR color +Color of the needle +.TP +\fBscalecolor\fR color +Color of the scale (arc and tickmarks) +.TP +\fBlabelcolor\fR color +Color of the labels to the scale +.TP +\fBtitlecolor\fR color +Color of the title below the dial +.RE +.RE +.TP +\fB::controlwidget::tachometer\fR \fIw\fR \fIargs\fR +Create a tachometer-like widget\&. +.RS +.TP +widget \fIw\fR (in) +Name of the widget to be created\&. +.TP +arguments \fIargs\fR (in) +List of key-value pairs, controlling the appearance and behaviour of the widget\&. In addition +to the ones given for the voltmeter widget: +.RS +.TP +\fBvariable\fR name +Name of the variable to be associated with the meter +.TP +\fBvalue\fR value +Value for the meter (if not associated with a variable) +.TP +\fBdangerlevel\fR value +Level above which values are indicated with a different color +.TP +\fBdangercolor\fR color +Color for the values above the "danger level" +.TP +\fBdangerwidth\fR pixels +Width for the colored band indicating the "danger level" +.TP +\fBpincolor\fR color +Color for the needle and the pin +.RE +.RE +.TP +\fB::controlwidget::rdial\fR \fIw\fR \fIargs\fR +Create a rotating dial\&. You can drag the dial to change the value\&. With the shift button +depressed the value changes slowly, with the control button depressed it changes fast\&. +Similarly, you can control the dial via the mouse wheel, with the shift and control button +working in the same way as with the mouse pointer\&. +\fINote:\fR The shift and control buttons currently have no effect on Windows\&. +.RS +.TP +widget \fIw\fR (in) +Name of the widget to be created\&. +.TP +arguments \fIargs\fR (in) +List of key-value pairs, controlling the appearance and behaviour of the widget: +.RS +.TP +\fBvariable\fR name +Name of the variable to be associated with the dial +.TP +\fBvalue\fR value +Value for the dial (if not associated with a variable) +.TP +\fBorient\fR string +Whether a horizontal disk/dial is required ("horizontal") or a vertical one ("vertical") +.TP +\fBstep\fR value +Initial step for incrementing or decrementing the value +.TP +\fBbindwheel\fR value +Step size for controlling the dial's value via the mouse wheel +.TP +\fBslow\fR value +Factor on the step size for incrementing or decrementing the value slowly +.TP +\fBfast\fR value +Factor on the step size for incrementing or decrementing the value fast +.TP +\fBscale\fR value +Scale value to be applied to the actual value +.TP +\fBcallback\fR command +Command to be called when the value changes +.TP +\fBwidth\fR pixels +The width of the widget +.TP +\fBheight\fR pixels +The height of the widget +.TP +\fBbackground\fR color +The background color of the widget (coloring of the disk/dial) +.TP +\fBforeground\fR color +The foreground color of the widget (the marker lines) +.RE +.RE +.PP +All these widgets have the following methods: +.TP +\fB$widget\fR get +Return the current value or values shown in the widget +.TP +\fB$widget\fR set \fIvalue\fR +Reset the value or values shown in the widget\&. If the widget is associated with +a variable, that variable is set as well\&. +.RS +.TP +value \fIdouble/list\fR +New value or values for the widget +.RE +.PP +Two further widgets are available, meant to display logical values: +.TP +\fB::controlwidget::led\fR \fIw\fR \fIargs\fR +Create a LED-like widget\&. +.RS +.TP +widget \fIw\fR (in) +Name of the widget to be created\&. +.TP +arguments \fIargs\fR (in) +List of key-value pairs, controlling the appearance and behaviour of the widget\&. In addition +to the ones given for the voltmeter widget: +.RS +.TP +\fBvariable\fR name +Name of the variable to be associated with the LED +.TP +\fBsize\fR pixels +Diameter of the LED widget +.TP +\fBon\fR color +Color to use for the "on" state +.TP +\fBoff\fR color +Color to use for the "off" state +.RE +.RE +.TP +\fB::controlwidget::radioMatrix\fR \fIw\fR \fIargs\fR +Create a matrix of radio buttons that behaves as a single widget\&. +.RS +.TP +widget \fIw\fR (in) +Name of the widget to be created\&. +.TP +arguments \fIargs\fR (in) +List of key-value pairs, controlling the appearance and behaviour of the widget\&. In addition +to the ones given for the voltmeter widget: +.RS +.TP +\fBvariable\fR name +Name of the variable to be associated with the matrix +.TP +\fBorient\fR string +The way the radio buttons are to be arranged (horizontal or vertical first) +.TP +\fBrows\fR integer +Number of rows in the matrix +.TP +\fBcolumns\fR integer +Number of columns in the matrix +.TP +\fBcommand\fR list +Command associated with the radio buttons\&. Invoked when the active radio button changes\&. +.RE +.RE +.PP +The LED widget has the following public methods: +.TP +\fB$led\fR on +Set the state to "on" +.TP +\fB$led\fR off +Set the state to "off" +.TP +\fB$led\fR setstate \fIstate\fR +Set the state according to the value of "state" +.RS +.TP +state \fIboolean\fR (in) +New state for the LED widget +.RE +.PP +The radioMatrix widget has two public methods: +.TP +\fB$matrix\fR get +Return the index of the currently selected radio button +.TP +\fB$matrix\fR set \fIindex\fR +Select the radio button with index "index" +.RS +.TP +index \fIinteger\fR +Index of the radio button to be set +.RE +.PP +.SH ACKNOWLEDGMENTS +The code for most of these widgets first appeared on the Wiki\&. In many cases, Arjen Markus merely +refactored the code a bit and "snitified" some of them\&. The original code was developed by the following people: +.IP \(bu +Vertical meter, LED display, radio matrix: Ron Fox +.IP \(bu +Rotating dials: Gerhard Reithofer +.IP \(bu +Voltmeter and tachometer: Marco Maggi +.IP \(bu +Code for moving the needle: ? +.PP +.SH "BUGS, IDEAS, FEEDBACK" +This document, and the package it describes, will undoubtedly contain +bugs and other problems\&. +Please report such in the category \fIcontrolwidget\fR of the +\fITklib Trackers\fR [http://core\&.tcl\&.tk/tklib/reportlist]\&. +Please also report any ideas for enhancements you may have for either +package and/or documentation\&. +.SH KEYWORDS +controlling, displaying, numerical values, scale widget +.SH COPYRIGHT +.nf +Copyright (c) 2010 Ron Fox +Copyright (c) 2010 Gerhard Reithofer <\&.\&.\&.@\&.\&.\&.> +Copyright (c) 2010 Marco Maggi <\&.\&.\&.@\&.\&.\&.> +Copyright (c) 2010 Arjen Markus + +.fi \ No newline at end of file diff --git a/embedded/man/files/modules/crosshair/crosshair.n b/embedded/man/files/modules/crosshair/crosshair.n new file mode 100644 index 00000000..e40e3938 --- /dev/null +++ b/embedded/man/files/modules/crosshair/crosshair.n @@ -0,0 +1,413 @@ +'\" +'\" Generated from file 'crosshair\&.man' by tcllib/doctools with format 'nroff' +'\" Copyright (c) 2003 Kevin Kenny +'\" Copyright (c) 2008 (docs) Andreas Kupries +'\" Copyright (c) 2013 Frank Gover, Andreas Kupries +'\" +.TH "crosshair" n 1\&.1 tklib "Crosshairs" +.\" The -*- nroff -*- definitions below are for supplemental macros used +.\" in Tcl/Tk manual entries. +.\" +.\" .AP type name in/out ?indent? +.\" Start paragraph describing an argument to a library procedure. +.\" type is type of argument (int, etc.), in/out is either "in", "out", +.\" or "in/out" to describe whether procedure reads or modifies arg, +.\" and indent is equivalent to second arg of .IP (shouldn't ever be +.\" needed; use .AS below instead) +.\" +.\" .AS ?type? ?name? +.\" Give maximum sizes of arguments for setting tab stops. Type and +.\" name are examples of largest possible arguments that will be passed +.\" to .AP later. If args are omitted, default tab stops are used. +.\" +.\" .BS +.\" Start box enclosure. From here until next .BE, everything will be +.\" enclosed in one large box. +.\" +.\" .BE +.\" End of box enclosure. +.\" +.\" .CS +.\" Begin code excerpt. +.\" +.\" .CE +.\" End code excerpt. +.\" +.\" .VS ?version? ?br? +.\" Begin vertical sidebar, for use in marking newly-changed parts +.\" of man pages. The first argument is ignored and used for recording +.\" the version when the .VS was added, so that the sidebars can be +.\" found and removed when they reach a certain age. If another argument +.\" is present, then a line break is forced before starting the sidebar. +.\" +.\" .VE +.\" End of vertical sidebar. +.\" +.\" .DS +.\" Begin an indented unfilled display. +.\" +.\" .DE +.\" End of indented unfilled display. +.\" +.\" .SO ?manpage? +.\" Start of list of standard options for a Tk widget. The manpage +.\" argument defines where to look up the standard options; if +.\" omitted, defaults to "options". The options follow on successive +.\" lines, in three columns separated by tabs. +.\" +.\" .SE +.\" End of list of standard options for a Tk widget. +.\" +.\" .OP cmdName dbName dbClass +.\" Start of description of a specific option. cmdName gives the +.\" option's name as specified in the class command, dbName gives +.\" the option's name in the option database, and dbClass gives +.\" the option's class in the option database. +.\" +.\" .UL arg1 arg2 +.\" Print arg1 underlined, then print arg2 normally. +.\" +.\" .QW arg1 ?arg2? +.\" Print arg1 in quotes, then arg2 normally (for trailing punctuation). +.\" +.\" .PQ arg1 ?arg2? +.\" Print an open parenthesis, arg1 in quotes, then arg2 normally +.\" (for trailing punctuation) and then a closing parenthesis. +.\" +.\" # Set up traps and other miscellaneous stuff for Tcl/Tk man pages. +.if t .wh -1.3i ^B +.nr ^l \n(.l +.ad b +.\" # Start an argument description +.de AP +.ie !"\\$4"" .TP \\$4 +.el \{\ +. ie !"\\$2"" .TP \\n()Cu +. el .TP 15 +.\} +.ta \\n()Au \\n()Bu +.ie !"\\$3"" \{\ +\&\\$1 \\fI\\$2\\fP (\\$3) +.\".b +.\} +.el \{\ +.br +.ie !"\\$2"" \{\ +\&\\$1 \\fI\\$2\\fP +.\} +.el \{\ +\&\\fI\\$1\\fP +.\} +.\} +.. +.\" # define tabbing values for .AP +.de AS +.nr )A 10n +.if !"\\$1"" .nr )A \\w'\\$1'u+3n +.nr )B \\n()Au+15n +.\" +.if !"\\$2"" .nr )B \\w'\\$2'u+\\n()Au+3n +.nr )C \\n()Bu+\\w'(in/out)'u+2n +.. +.AS Tcl_Interp Tcl_CreateInterp in/out +.\" # BS - start boxed text +.\" # ^y = starting y location +.\" # ^b = 1 +.de BS +.br +.mk ^y +.nr ^b 1u +.if n .nf +.if n .ti 0 +.if n \l'\\n(.lu\(ul' +.if n .fi +.. +.\" # BE - end boxed text (draw box now) +.de BE +.nf +.ti 0 +.mk ^t +.ie n \l'\\n(^lu\(ul' +.el \{\ +.\" Draw four-sided box normally, but don't draw top of +.\" box if the box started on an earlier page. +.ie !\\n(^b-1 \{\ +\h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul' +.\} +.el \}\ +\h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul' +.\} +.\} +.fi +.br +.nr ^b 0 +.. +.\" # VS - start vertical sidebar +.\" # ^Y = starting y location +.\" # ^v = 1 (for troff; for nroff this doesn't matter) +.de VS +.if !"\\$2"" .br +.mk ^Y +.ie n 'mc \s12\(br\s0 +.el .nr ^v 1u +.. +.\" # VE - end of vertical sidebar +.de VE +.ie n 'mc +.el \{\ +.ev 2 +.nf +.ti 0 +.mk ^t +\h'|\\n(^lu+3n'\L'|\\n(^Yu-1v\(bv'\v'\\n(^tu+1v-\\n(^Yu'\h'-|\\n(^lu+3n' +.sp -1 +.fi +.ev +.\} +.nr ^v 0 +.. +.\" # Special macro to handle page bottom: finish off current +.\" # box/sidebar if in box/sidebar mode, then invoked standard +.\" # page bottom macro. +.de ^B +.ev 2 +'ti 0 +'nf +.mk ^t +.if \\n(^b \{\ +.\" Draw three-sided box if this is the box's first page, +.\" draw two sides but no top otherwise. +.ie !\\n(^b-1 \h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c +.el \h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c +.\} +.if \\n(^v \{\ +.nr ^x \\n(^tu+1v-\\n(^Yu +\kx\h'-\\nxu'\h'|\\n(^lu+3n'\ky\L'-\\n(^xu'\v'\\n(^xu'\h'|0u'\c +.\} +.bp +'fi +.ev +.if \\n(^b \{\ +.mk ^y +.nr ^b 2 +.\} +.if \\n(^v \{\ +.mk ^Y +.\} +.. +.\" # DS - begin display +.de DS +.RS +.nf +.sp +.. +.\" # DE - end display +.de DE +.fi +.RE +.sp +.. +.\" # SO - start of list of standard options +.de SO +'ie '\\$1'' .ds So \\fBoptions\\fR +'el .ds So \\fB\\$1\\fR +.SH "STANDARD OPTIONS" +.LP +.nf +.ta 5.5c 11c +.ft B +.. +.\" # SE - end of list of standard options +.de SE +.fi +.ft R +.LP +See the \\*(So manual entry for details on the standard options. +.. +.\" # OP - start of full description for a single option +.de OP +.LP +.nf +.ta 4c +Command-Line Name: \\fB\\$1\\fR +Database Name: \\fB\\$2\\fR +Database Class: \\fB\\$3\\fR +.fi +.IP +.. +.\" # CS - begin code excerpt +.de CS +.RS +.nf +.ta .25i .5i .75i 1i +.. +.\" # CE - end code excerpt +.de CE +.fi +.RE +.. +.\" # UL - underline word +.de UL +\\$1\l'|0\(ul'\\$2 +.. +.\" # QW - apply quotation marks to word +.de QW +.ie '\\*(lq'"' ``\\$1''\\$2 +.\"" fix emacs highlighting +.el \\*(lq\\$1\\*(rq\\$2 +.. +.\" # PQ - apply parens and quotation marks to word +.de PQ +.ie '\\*(lq'"' (``\\$1''\\$2)\\$3 +.\"" fix emacs highlighting +.el (\\*(lq\\$1\\*(rq\\$2)\\$3 +.. +.\" # QR - quoted range +.de QR +.ie '\\*(lq'"' ``\\$1''\\-``\\$2''\\$3 +.\"" fix emacs highlighting +.el \\*(lq\\$1\\*(rq\\-\\*(lq\\$2\\*(rq\\$3 +.. +.\" # MT - "empty" string +.de MT +.QW "" +.. +.BS +.SH NAME +crosshair \- Crosshairs for Tk canvas +.SH SYNOPSIS +package require \fBTcl ?8\&.4?\fR +.sp +package require \fBTk ?8\&.4?\fR +.sp +package require \fBcrosshair ?1\&.1?\fR +.sp +\fBcrosshair::crosshair\fR \fIw\fR ?\fIarg\fR\&.\&.\&.? +.sp +\fBcrosshair::off\fR \fIw\fR +.sp +\fBcrosshair::configure\fR \fIw\fR ?\fIarg\fR\&.\&.\&.? +.sp +\fBcrosshair::track\fR \fBon\fR \fIw\fR \fIcmdprefix\fR +.sp +\fBcrosshair::track\fR \fBoff\fR \fIw\fR +.sp +\fBcrosshair::bbox_add\fR \fIw\fR \fIbbox\fR +.sp +\fBcrosshair::bbox_remove\fR \fItoken\fR +.sp +.BE +.SH DESCRIPTION +The \fBcrosshair\fR package provides commands to (de)activate and +track crosshairs on canvas widgets\&. +.SH API +The following commands are exported to the public: +.TP +\fBcrosshair::crosshair\fR \fIw\fR ?\fIarg\fR\&.\&.\&.? +This command activates the display of a pair of cross-hairs for the +canvas widget \fIw\fR\&. The cross-hairs track the pointing device\&. The +result of the command is the empty string\&. +.sp +All arguments after the widget \fIw\fR are treated as options as for a +canvas line item in \fIw\fR\&. Of particular interest are \fB-fill\fR +and \fB-dash\fR\&. +.TP +\fBcrosshair::off\fR \fIw\fR +This command removes the cross-hairs from the canvas widget \fIw\fR\&. +Nothing is done if the widget had no cross-hairs\&. The result of the +command is the empty string\&. +.TP +\fBcrosshair::configure\fR \fIw\fR ?\fIarg\fR\&.\&.\&.? +This command changes the appearance of the cross-hairs in the canvas +widget \fIw\fR\&. It is an error to call it for a canvas which has no +cross-hairs\&. +.sp +All arguments after the widget \fIw\fR are treated as options as for a +canvas line item in \fIw\fR\&. Of particular interest are \fB-fill\fR +and \fB-dash\fR\&. +.sp +The result of the command are the current configuration settings\&. +.TP +\fBcrosshair::track\fR \fBon\fR \fIw\fR \fIcmdprefix\fR +This command activates reporting of the location of the cross-hairs in +the canvas widget \fIw\fR\&. It is an error to use this command for a +canvas which has no cross-hairs\&. The result of the command is the +empty string\&. +.sp +After the invokation of this command the specified command prefix +\fIcmdprefix\fR will be called whenever the mouse moves within the +canvas, with 7 arguments\&. These are, in order: +.RS +.IP [1] +The widget \fIw\fR +.IP [2] +The x-location of the cross-hairs, in pixels\&. +.IP [3] +The y-location of the cross-hairs, in pixels\&. +.IP [4] +The x-location of the top-left corner of the viewport, in pixels\&. +.IP [5] +The y-location of the top-left corner of the viewport, in pixels\&. +.IP [6] +The x-location of the bottom-right corner of the viewport, in pixels\&. +.IP [7] +The y-location of the bottom-right corner of the viewport, in pixels\&. +.RE +.IP +A previously existing callback for \fIw\fR will be disabled\&. I\&.e\&. per +canvas widget with cross-hairs only one callback reporting their +location is possible\&. +.TP +\fBcrosshair::track\fR \fBoff\fR \fIw\fR +This command disables the reporting of the location of the cross-hairs +in the canvas widget \fIw\fR\&. It is an error to use this command for a +canvas which has no cross-hairs\&. The result of the command is the +empty string\&. +.TP +\fBcrosshair::bbox_add\fR \fIw\fR \fIbbox\fR +This command adds a bounding box to the crosshairs for canvas \fIw\fR\&. +The crosshairs will only be active within that area\&. +.sp +The result of the command is a token with which the bounding +box can be removed again, see \fBcrosshair::bbox_remove\fR below\&. +.sp +The bounding box \fIbbox\fR is specified thorugh a list of 4 +values, the lower left and upper right corners of the box\&. The order +of values in the list is: +.CS + +llx lly urx ury +.CE +.sp +Note that this command can be used multiple times, each call +adding one more bounding box\&. In such a case the visible area is the +\fIunion\fR of all the specified bounding boxes\&. +.TP +\fBcrosshair::bbox_remove\fR \fItoken\fR +This command removes the bounding box specified by the \fItoken\fR (a +result of \fBcrosshair::bbox_add\fR) from the crosshairs for its +canvas widget\&. +.PP +.SH "BUGS, IDEAS, FEEDBACK" +This document, and the package it describes, will undoubtedly contain +bugs and other problems\&. +Please report such in the category \fItklib :: crosshair\fR of the +\fITcllib SF Trackers\fR [http://sourceforge\&.net/tracker/?group_id=12883]\&. +Please also report any ideas for enhancements you may have for either +package and/or documentation\&. +.SH "BUGS, IDEAS, FEEDBACK" +This document, and the package it describes, will undoubtedly contain +bugs and other problems\&. +Please report such in the category \fIcrosshair\fR of the +\fITklib Trackers\fR [http://core\&.tcl\&.tk/tklib/reportlist]\&. +Please also report any ideas for enhancements you may have for either +package and/or documentation\&. +.SH KEYWORDS +canvas, cross-hairs, location, tracking, viewport +.SH COPYRIGHT +.nf +Copyright (c) 2003 Kevin Kenny +Copyright (c) 2008 (docs) Andreas Kupries +Copyright (c) 2013 Frank Gover, Andreas Kupries + +.fi \ No newline at end of file diff --git a/embedded/man/files/modules/ctext/ctext.n b/embedded/man/files/modules/ctext/ctext.n new file mode 100644 index 00000000..0491b2f6 --- /dev/null +++ b/embedded/man/files/modules/ctext/ctext.n @@ -0,0 +1,586 @@ +'\" +'\" Generated from file 'ctext\&.man' by tcllib/doctools with format 'nroff' +'\" Copyright (c) George Peter Staplin +'\" +.TH "ctext" n 3\&.3 tklib "Ctext a text widget with highlighting support" +.\" The -*- nroff -*- definitions below are for supplemental macros used +.\" in Tcl/Tk manual entries. +.\" +.\" .AP type name in/out ?indent? +.\" Start paragraph describing an argument to a library procedure. +.\" type is type of argument (int, etc.), in/out is either "in", "out", +.\" or "in/out" to describe whether procedure reads or modifies arg, +.\" and indent is equivalent to second arg of .IP (shouldn't ever be +.\" needed; use .AS below instead) +.\" +.\" .AS ?type? ?name? +.\" Give maximum sizes of arguments for setting tab stops. Type and +.\" name are examples of largest possible arguments that will be passed +.\" to .AP later. If args are omitted, default tab stops are used. +.\" +.\" .BS +.\" Start box enclosure. From here until next .BE, everything will be +.\" enclosed in one large box. +.\" +.\" .BE +.\" End of box enclosure. +.\" +.\" .CS +.\" Begin code excerpt. +.\" +.\" .CE +.\" End code excerpt. +.\" +.\" .VS ?version? ?br? +.\" Begin vertical sidebar, for use in marking newly-changed parts +.\" of man pages. The first argument is ignored and used for recording +.\" the version when the .VS was added, so that the sidebars can be +.\" found and removed when they reach a certain age. If another argument +.\" is present, then a line break is forced before starting the sidebar. +.\" +.\" .VE +.\" End of vertical sidebar. +.\" +.\" .DS +.\" Begin an indented unfilled display. +.\" +.\" .DE +.\" End of indented unfilled display. +.\" +.\" .SO ?manpage? +.\" Start of list of standard options for a Tk widget. The manpage +.\" argument defines where to look up the standard options; if +.\" omitted, defaults to "options". The options follow on successive +.\" lines, in three columns separated by tabs. +.\" +.\" .SE +.\" End of list of standard options for a Tk widget. +.\" +.\" .OP cmdName dbName dbClass +.\" Start of description of a specific option. cmdName gives the +.\" option's name as specified in the class command, dbName gives +.\" the option's name in the option database, and dbClass gives +.\" the option's class in the option database. +.\" +.\" .UL arg1 arg2 +.\" Print arg1 underlined, then print arg2 normally. +.\" +.\" .QW arg1 ?arg2? +.\" Print arg1 in quotes, then arg2 normally (for trailing punctuation). +.\" +.\" .PQ arg1 ?arg2? +.\" Print an open parenthesis, arg1 in quotes, then arg2 normally +.\" (for trailing punctuation) and then a closing parenthesis. +.\" +.\" # Set up traps and other miscellaneous stuff for Tcl/Tk man pages. +.if t .wh -1.3i ^B +.nr ^l \n(.l +.ad b +.\" # Start an argument description +.de AP +.ie !"\\$4"" .TP \\$4 +.el \{\ +. ie !"\\$2"" .TP \\n()Cu +. el .TP 15 +.\} +.ta \\n()Au \\n()Bu +.ie !"\\$3"" \{\ +\&\\$1 \\fI\\$2\\fP (\\$3) +.\".b +.\} +.el \{\ +.br +.ie !"\\$2"" \{\ +\&\\$1 \\fI\\$2\\fP +.\} +.el \{\ +\&\\fI\\$1\\fP +.\} +.\} +.. +.\" # define tabbing values for .AP +.de AS +.nr )A 10n +.if !"\\$1"" .nr )A \\w'\\$1'u+3n +.nr )B \\n()Au+15n +.\" +.if !"\\$2"" .nr )B \\w'\\$2'u+\\n()Au+3n +.nr )C \\n()Bu+\\w'(in/out)'u+2n +.. +.AS Tcl_Interp Tcl_CreateInterp in/out +.\" # BS - start boxed text +.\" # ^y = starting y location +.\" # ^b = 1 +.de BS +.br +.mk ^y +.nr ^b 1u +.if n .nf +.if n .ti 0 +.if n \l'\\n(.lu\(ul' +.if n .fi +.. +.\" # BE - end boxed text (draw box now) +.de BE +.nf +.ti 0 +.mk ^t +.ie n \l'\\n(^lu\(ul' +.el \{\ +.\" Draw four-sided box normally, but don't draw top of +.\" box if the box started on an earlier page. +.ie !\\n(^b-1 \{\ +\h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul' +.\} +.el \}\ +\h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul' +.\} +.\} +.fi +.br +.nr ^b 0 +.. +.\" # VS - start vertical sidebar +.\" # ^Y = starting y location +.\" # ^v = 1 (for troff; for nroff this doesn't matter) +.de VS +.if !"\\$2"" .br +.mk ^Y +.ie n 'mc \s12\(br\s0 +.el .nr ^v 1u +.. +.\" # VE - end of vertical sidebar +.de VE +.ie n 'mc +.el \{\ +.ev 2 +.nf +.ti 0 +.mk ^t +\h'|\\n(^lu+3n'\L'|\\n(^Yu-1v\(bv'\v'\\n(^tu+1v-\\n(^Yu'\h'-|\\n(^lu+3n' +.sp -1 +.fi +.ev +.\} +.nr ^v 0 +.. +.\" # Special macro to handle page bottom: finish off current +.\" # box/sidebar if in box/sidebar mode, then invoked standard +.\" # page bottom macro. +.de ^B +.ev 2 +'ti 0 +'nf +.mk ^t +.if \\n(^b \{\ +.\" Draw three-sided box if this is the box's first page, +.\" draw two sides but no top otherwise. +.ie !\\n(^b-1 \h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c +.el \h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c +.\} +.if \\n(^v \{\ +.nr ^x \\n(^tu+1v-\\n(^Yu +\kx\h'-\\nxu'\h'|\\n(^lu+3n'\ky\L'-\\n(^xu'\v'\\n(^xu'\h'|0u'\c +.\} +.bp +'fi +.ev +.if \\n(^b \{\ +.mk ^y +.nr ^b 2 +.\} +.if \\n(^v \{\ +.mk ^Y +.\} +.. +.\" # DS - begin display +.de DS +.RS +.nf +.sp +.. +.\" # DE - end display +.de DE +.fi +.RE +.sp +.. +.\" # SO - start of list of standard options +.de SO +'ie '\\$1'' .ds So \\fBoptions\\fR +'el .ds So \\fB\\$1\\fR +.SH "STANDARD OPTIONS" +.LP +.nf +.ta 5.5c 11c +.ft B +.. +.\" # SE - end of list of standard options +.de SE +.fi +.ft R +.LP +See the \\*(So manual entry for details on the standard options. +.. +.\" # OP - start of full description for a single option +.de OP +.LP +.nf +.ta 4c +Command-Line Name: \\fB\\$1\\fR +Database Name: \\fB\\$2\\fR +Database Class: \\fB\\$3\\fR +.fi +.IP +.. +.\" # CS - begin code excerpt +.de CS +.RS +.nf +.ta .25i .5i .75i 1i +.. +.\" # CE - end code excerpt +.de CE +.fi +.RE +.. +.\" # UL - underline word +.de UL +\\$1\l'|0\(ul'\\$2 +.. +.\" # QW - apply quotation marks to word +.de QW +.ie '\\*(lq'"' ``\\$1''\\$2 +.\"" fix emacs highlighting +.el \\*(lq\\$1\\*(rq\\$2 +.. +.\" # PQ - apply parens and quotation marks to word +.de PQ +.ie '\\*(lq'"' (``\\$1''\\$2)\\$3 +.\"" fix emacs highlighting +.el (\\*(lq\\$1\\*(rq\\$2)\\$3 +.. +.\" # QR - quoted range +.de QR +.ie '\\*(lq'"' ``\\$1''\\-``\\$2''\\$3 +.\"" fix emacs highlighting +.el \\*(lq\\$1\\*(rq\\-\\*(lq\\$2\\*(rq\\$3 +.. +.\" # MT - "empty" string +.de MT +.QW "" +.. +.BS +.SH NAME +ctext \- Ctext a text widget with highlighting support +.SH SYNOPSIS +package require \fBTk \fR +.sp +package require \fBctext ?3\&.3?\fR +.sp +\fBctext\fR \fIpathName\fR ?\fIoptions\fR? +.sp +\fB::ctext::addHighlightClass\fR \fIpathName\fR \fIclass\fR \fIcolor\fR \fIkeywordlist\fR +.sp +\fB::ctext::addHighlightClassWithOnlyCharStart\fR \fIpathName\fR \fIclass\fR \fIcolor\fR \fIchar\fR +.sp +\fB::ctext::addHighlightClassForSpecialChars\fR \fIpathName\fR \fIclass\fR \fIcolor\fR \fIcharstring\fR +.sp +\fB::ctext::addHighlightClassForRegexp\fR \fIpathName\fR \fIclass\fR \fIcolor\fR \fIpattern\fR +.sp +\fB::ctext::clearHighlightClasses\fR \fIpathName\fR +.sp +\fB::ctext::getHighlightClasses\fR \fIpathName\fR +.sp +\fB::ctext::deleteHighlightClass\fR \fIpathName\fR \fIclass\fR +.sp +\fB::ctext::enableComments\fR \fIenable\fR +.sp +\fB::ctext::disableComments\fR \fIenable\fR +.sp +\fIpathName\fR \fBhighlight\fR \fIstartIndex\fR \fIendIndex\fR +.sp +\fIpathName\fR \fBfastdelete\fR \fIindex1\fR ?\fIindex2\fR? +.sp +\fIpathName\fR \fBfastinsert\fR +.sp +\fIpathName\fR \fBcopy\fR +.sp +\fIpathName\fR \fBcut\fR +.sp +\fIpathName\fR \fBpaste\fR +.sp +\fIpathName\fR \fBappend\fR +.sp +\fIpathName\fR \fBconfigure\fR \fIoption\fR \fIvalue\fR ?\&.\&.\&.? +.sp +.BE +.SH DESCRIPTION +The \fBctext\fR package provides the ctext widget which +is an enhanced text widget with support for configurable syntax +highlighting and some extra commands\&. +.PP +Ctext overloads the text widget and provides +new commands, named \fBhighlight\fR, \fBcopy\fR, \fBpaste\fR,\fBcut\fR, +\fBappend\fR, and \fBedit\fR\&. It also provides several +commands that allow you to define classes\&. +Each class corresponds to a tag in the widget\&. +.SH COMMANDS +.TP +\fBctext\fR \fIpathName\fR ?\fIoptions\fR? +Creates and configures a ctext widget\&. +.PP +.SH HIGHLIGHTING +Highlighting is controlled with text widget tags, that are called highlight classes\&. +The \fIclass\fR is a tag name and can be configured like any text widget tag\&. +Four types of highlight classes are supported\&. All highlight classes are automatically used +by the \fBhighlight\fR method of the widget\&. +.TP +\fB::ctext::addHighlightClass\fR \fIpathName\fR \fIclass\fR \fIcolor\fR \fIkeywordlist\fR +Add a highlighting class \fIclass\fR to the ctext widget \fIpathName\fR\&. +The highlighting will be done with the color \fIcolor\fR\&. All words in the \fIkeywordlist\fR will be +highlighted\&. +.CS + + + # highlight some tcl keywords + ::ctext::addHighlightClass \&.t tclkeywords red [list set info interp uplevel upvar] + +.CE +.TP +\fB::ctext::addHighlightClassWithOnlyCharStart\fR \fIpathName\fR \fIclass\fR \fIcolor\fR \fIchar\fR +Add a highlighting class \fIclass\fR to the ctext widget \fIpathName\fR\&. +The highlighting will be done with the color \fIcolor\fR\&. All words starting with \fIchar\fR will be +highlighted\&. +.CS + + + ::ctext::addHighlightClassWithOnlyCharStart \&.t vars blue \\$ + +.CE +.TP +\fB::ctext::addHighlightClassForSpecialChars\fR \fIpathName\fR \fIclass\fR \fIcolor\fR \fIcharstring\fR +Add a highlighting class \fIclass\fR to the ctext widget \fIpathName\fR\&. +The highlighting will be done with the color \fIcolor\fR\&. All chars in \fIcharstring\fR will be +highlighted\&. +.TP +\fB::ctext::addHighlightClassForRegexp\fR \fIpathName\fR \fIclass\fR \fIcolor\fR \fIpattern\fR +Add a highlighting class \fIclass\fR to the ctext widget \fIpathName\fR\&. +The highlighting will be done with the color \fIcolor\fR\&. All text parts matching the regexp \fIpattern\fR +will be highlighted\&. +.TP +\fB::ctext::clearHighlightClasses\fR \fIpathName\fR +Remove all highlight classes from the widget \fIpathName\fR\&. +.TP +\fB::ctext::getHighlightClasses\fR \fIpathName\fR +List all highlight classes for the widget \fIpathName\fR\&. +.TP +\fB::ctext::deleteHighlightClass\fR \fIpathName\fR \fIclass\fR +Delete the highlight class \fIclass\fR from the widget \fIpathName\fR +.TP +\fB::ctext::enableComments\fR \fIenable\fR +Enable C comment highlighting\&. The \fIclass\fR for c-style comments is \fB_cComment\fR\&. +The C comment highlighting is disabled by default\&. +.TP +\fB::ctext::disableComments\fR \fIenable\fR +Disable C comment highlighting\&. +.PP +.SH "WIDGET COMMANDS" +Each ctext widget created with the above command supports the following +commands and options in addition to the standard text widget commands and +options\&. +.TP +\fIpathName\fR \fBhighlight\fR \fIstartIndex\fR \fIendIndex\fR +Highlight the text between \fIstartIndex\fR and \fIendIndex\fR\&. +.TP +\fIpathName\fR \fBfastdelete\fR \fIindex1\fR ?\fIindex2\fR? +Delete text range without updating the highlighting\&. Arguments +are identical to the \fIpathName\fR \fBdelete\fR command inherited from +the standard text widget\&. +.TP +\fIpathName\fR \fBfastinsert\fR +Insert text without updating the highlighting\&. Arguments +are identical to the \fIpathName\fR \fBinsert\fR command inherited from +the standard text widget\&. +.TP +\fIpathName\fR \fBcopy\fR +Call \fBtk_textCopy\fR for the ctext instance\&. +.TP +\fIpathName\fR \fBcut\fR +Call \fBtk_textCut\fR for the ctext instance\&. +.TP +\fIpathName\fR \fBpaste\fR +Call \fBtk_textPaste\fR for the ctext instance\&. +.TP +\fIpathName\fR \fBappend\fR +Append the current selection to the clipboard\&. +.TP +\fIpathName\fR \fBconfigure\fR \fIoption\fR \fIvalue\fR ?\&.\&.\&.? +Set the options for the ctext widget\&. Each option name must be followed +the new value\&. +.PP +.SH "WIDGET OPTIONS" +.LP +.nf +.ta 6c +Command-Line Switch: \fB-linemap\fR +Database Name: \fB\fR +Database Class: \fB\fR + +.fi +.IP +Creates (-linemap 1) or deletes (-linemap 0) a line number list on the +left of the widget\&. The default is to have a linemap displayed\&. +.LP +.nf +.ta 6c +Command-Line Switch: \fB-linemapfg\fR +Database Name: \fB\fR +Database Class: \fB\fR + +.fi +.IP +Changes the foreground of the linemap\&. +The default is the same color as the main text +widget\&. +.LP +.nf +.ta 6c +Command-Line Switch: \fB-linemapbg\fR +Database Name: \fB\fR +Database Class: \fB\fR + +.fi +.IP +Changes the background of the linemap\&. +The default is the same color as the main text +widget\&. +.LP +.nf +.ta 6c +Command-Line Switch: \fB-linemap_select_fg\fR +Database Name: \fB\fR +Database Class: \fB\fR + +.fi +.IP +Changes the selected +line foreground\&. The default is black\&. +.LP +.nf +.ta 6c +Command-Line Switch: \fB-linemap_select_bg\fR +Database Name: \fB\fR +Database Class: \fB\fR + +.fi +.IP +Changes the selected line +background\&. The default is yellow\&. +.LP +.nf +.ta 6c +Command-Line Switch: \fB-linemap_mark_command\fR +Database Name: \fB\fR +Database Class: \fB\fR + +.fi +.IP +Calls a procedure or command +with the \fIpathName\fR of the ctext window, the \fItype\fR which is +either \fBmarked\fR or \fBunmarked\fR, and finally the line +number selected\&. +The proc prototype is: +.CS + + +proc linemark_cmd {win type line}\&. + +.CE +.IP +See also +ctext_test_interactive\&.tcl +.LP +.nf +.ta 6c +Command-Line Switch: \fB-highlight\fR +Database Name: \fB\fR +Database Class: \fB\fR + +.fi +.IP +Takes a boolean value which defines +whether or not to highlight text which is inserted +or deleted\&. The default is 1\&. +.LP +.nf +.ta 6c +Command-Line Switch: \fB-linemap_markable\fR +Database Name: \fB\fR +Database Class: \fB\fR + +.fi +.IP +Takes a boolean value which +specifies whether or not lines in the linemap +are markable with the mouse\&. The default is 1\&. +.PP +.SH EXAMPLE +.CS + + + package require Tk + package require ctext + + proc main {} { + pack [frame \&.f] -fill both -expand 1 + pack [scrollbar \&.f\&.s -command {\&.f\&.t yview}] -side right -fill y + + pack [ctext \&.f\&.t -bg black -fg white -insertbackground yellow -yscrollcommand {\&.f\&.s set}] -fill both -expand 1 + + ctext::addHighlightClass \&.f\&.t widgets purple [list ctext button label text frame toplevel scrollbar checkbutton canvas listbox menu menubar menubutton radiobutton scale entry message tk_chooseDir tk_getSaveFile tk_getOpenFile tk_chooseColor tk_optionMenu] + + ctext::addHighlightClass \&.f\&.t flags orange [list -text -command -yscrollcommand -xscrollcommand -background -foreground -fg -bg -highlightbackground -y -x -highlightcolor -relief -width -height -wrap -font -fill -side -outline -style -insertwidth -textvariable -activebackground -activeforeground -insertbackground -anchor -orient -troughcolor -nonewline -expand -type -message -title -offset -in -after -yscroll -xscroll -forward -regexp -count -exact -padx -ipadx -filetypes -all -from -to -label -value -variable -regexp -backwards -forwards -bd -pady -ipady -state -row -column -cursor -highlightcolors -linemap -menu -tearoff -displayof -cursor -underline -tags -tag] + + ctext::addHighlightClass \&.f\&.t stackControl red {proc uplevel namespace while for foreach if else} + ctext::addHighlightClassWithOnlyCharStart \&.f\&.t vars mediumspringgreen "\\$" + ctext::addHighlightClass \&.f\&.t variable_funcs gold {set global variable unset} + ctext::addHighlightClassForSpecialChars \&.f\&.t brackets green {[]{}} + ctext::addHighlightClassForRegexp \&.f\&.t paths lightblue {\\\&.[a-zA-Z0-9\\_\\-]+} + ctext::addHighlightClassForRegexp \&.f\&.t comments khaki {#[^\\n\\r]*} + \&.f\&.t fastinsert end [info body main] + + pack [frame \&.f1] -fill x + + \&.f\&.t highlight 1\&.0 end + + pack [button \&.f1\&.exit -text Exit -command exit] -side left + + pack [entry \&.e] -side bottom -fill x + \&.e insert end "ctext::deleteHighlightClass \&.f\&.t " + bind \&.e {eval [\&.e get]} + } + main + + +.CE +Further examples are in the source package for ctext\&. +.SH THANKS +Kevin Kenny, Neil Madden, Jeffrey Hobbs, Richard Suchenwirth, +Johan Bengtsson, Mac Cody, Günther, Andreas Sievers, and Michael Schlenker\&. +.SH "BUGS, IDEAS, FEEDBACK" +This document, and the package it describes, will undoubtedly contain +bugs and other problems\&. +Please report such in the category \fIctext\fR of the +\fITklib Trackers\fR [http://core\&.tcl\&.tk/tklib/reportlist]\&. +Please also report any ideas for enhancements you may have for either +package and/or documentation\&. +.SH "SEE ALSO" +re_syntax, text +.SH KEYWORDS +syntax highlighting, text, widget +.SH COPYRIGHT +.nf +Copyright (c) George Peter Staplin + +.fi \ No newline at end of file diff --git a/embedded/man/files/modules/cursor/cursor.n b/embedded/man/files/modules/cursor/cursor.n new file mode 100644 index 00000000..a8d8d214 --- /dev/null +++ b/embedded/man/files/modules/cursor/cursor.n @@ -0,0 +1,323 @@ +'\" +'\" Generated from file 'cursor\&.man' by tcllib/doctools with format 'nroff' +'\" Copyright (c) Jeffrey Hobbs +'\" +.TH "cursor" n 0\&.3\&.1 tklib "Tk cursor routines" +.\" The -*- nroff -*- definitions below are for supplemental macros used +.\" in Tcl/Tk manual entries. +.\" +.\" .AP type name in/out ?indent? +.\" Start paragraph describing an argument to a library procedure. +.\" type is type of argument (int, etc.), in/out is either "in", "out", +.\" or "in/out" to describe whether procedure reads or modifies arg, +.\" and indent is equivalent to second arg of .IP (shouldn't ever be +.\" needed; use .AS below instead) +.\" +.\" .AS ?type? ?name? +.\" Give maximum sizes of arguments for setting tab stops. Type and +.\" name are examples of largest possible arguments that will be passed +.\" to .AP later. If args are omitted, default tab stops are used. +.\" +.\" .BS +.\" Start box enclosure. From here until next .BE, everything will be +.\" enclosed in one large box. +.\" +.\" .BE +.\" End of box enclosure. +.\" +.\" .CS +.\" Begin code excerpt. +.\" +.\" .CE +.\" End code excerpt. +.\" +.\" .VS ?version? ?br? +.\" Begin vertical sidebar, for use in marking newly-changed parts +.\" of man pages. The first argument is ignored and used for recording +.\" the version when the .VS was added, so that the sidebars can be +.\" found and removed when they reach a certain age. If another argument +.\" is present, then a line break is forced before starting the sidebar. +.\" +.\" .VE +.\" End of vertical sidebar. +.\" +.\" .DS +.\" Begin an indented unfilled display. +.\" +.\" .DE +.\" End of indented unfilled display. +.\" +.\" .SO ?manpage? +.\" Start of list of standard options for a Tk widget. The manpage +.\" argument defines where to look up the standard options; if +.\" omitted, defaults to "options". The options follow on successive +.\" lines, in three columns separated by tabs. +.\" +.\" .SE +.\" End of list of standard options for a Tk widget. +.\" +.\" .OP cmdName dbName dbClass +.\" Start of description of a specific option. cmdName gives the +.\" option's name as specified in the class command, dbName gives +.\" the option's name in the option database, and dbClass gives +.\" the option's class in the option database. +.\" +.\" .UL arg1 arg2 +.\" Print arg1 underlined, then print arg2 normally. +.\" +.\" .QW arg1 ?arg2? +.\" Print arg1 in quotes, then arg2 normally (for trailing punctuation). +.\" +.\" .PQ arg1 ?arg2? +.\" Print an open parenthesis, arg1 in quotes, then arg2 normally +.\" (for trailing punctuation) and then a closing parenthesis. +.\" +.\" # Set up traps and other miscellaneous stuff for Tcl/Tk man pages. +.if t .wh -1.3i ^B +.nr ^l \n(.l +.ad b +.\" # Start an argument description +.de AP +.ie !"\\$4"" .TP \\$4 +.el \{\ +. ie !"\\$2"" .TP \\n()Cu +. el .TP 15 +.\} +.ta \\n()Au \\n()Bu +.ie !"\\$3"" \{\ +\&\\$1 \\fI\\$2\\fP (\\$3) +.\".b +.\} +.el \{\ +.br +.ie !"\\$2"" \{\ +\&\\$1 \\fI\\$2\\fP +.\} +.el \{\ +\&\\fI\\$1\\fP +.\} +.\} +.. +.\" # define tabbing values for .AP +.de AS +.nr )A 10n +.if !"\\$1"" .nr )A \\w'\\$1'u+3n +.nr )B \\n()Au+15n +.\" +.if !"\\$2"" .nr )B \\w'\\$2'u+\\n()Au+3n +.nr )C \\n()Bu+\\w'(in/out)'u+2n +.. +.AS Tcl_Interp Tcl_CreateInterp in/out +.\" # BS - start boxed text +.\" # ^y = starting y location +.\" # ^b = 1 +.de BS +.br +.mk ^y +.nr ^b 1u +.if n .nf +.if n .ti 0 +.if n \l'\\n(.lu\(ul' +.if n .fi +.. +.\" # BE - end boxed text (draw box now) +.de BE +.nf +.ti 0 +.mk ^t +.ie n \l'\\n(^lu\(ul' +.el \{\ +.\" Draw four-sided box normally, but don't draw top of +.\" box if the box started on an earlier page. +.ie !\\n(^b-1 \{\ +\h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul' +.\} +.el \}\ +\h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul' +.\} +.\} +.fi +.br +.nr ^b 0 +.. +.\" # VS - start vertical sidebar +.\" # ^Y = starting y location +.\" # ^v = 1 (for troff; for nroff this doesn't matter) +.de VS +.if !"\\$2"" .br +.mk ^Y +.ie n 'mc \s12\(br\s0 +.el .nr ^v 1u +.. +.\" # VE - end of vertical sidebar +.de VE +.ie n 'mc +.el \{\ +.ev 2 +.nf +.ti 0 +.mk ^t +\h'|\\n(^lu+3n'\L'|\\n(^Yu-1v\(bv'\v'\\n(^tu+1v-\\n(^Yu'\h'-|\\n(^lu+3n' +.sp -1 +.fi +.ev +.\} +.nr ^v 0 +.. +.\" # Special macro to handle page bottom: finish off current +.\" # box/sidebar if in box/sidebar mode, then invoked standard +.\" # page bottom macro. +.de ^B +.ev 2 +'ti 0 +'nf +.mk ^t +.if \\n(^b \{\ +.\" Draw three-sided box if this is the box's first page, +.\" draw two sides but no top otherwise. +.ie !\\n(^b-1 \h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c +.el \h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c +.\} +.if \\n(^v \{\ +.nr ^x \\n(^tu+1v-\\n(^Yu +\kx\h'-\\nxu'\h'|\\n(^lu+3n'\ky\L'-\\n(^xu'\v'\\n(^xu'\h'|0u'\c +.\} +.bp +'fi +.ev +.if \\n(^b \{\ +.mk ^y +.nr ^b 2 +.\} +.if \\n(^v \{\ +.mk ^Y +.\} +.. +.\" # DS - begin display +.de DS +.RS +.nf +.sp +.. +.\" # DE - end display +.de DE +.fi +.RE +.sp +.. +.\" # SO - start of list of standard options +.de SO +'ie '\\$1'' .ds So \\fBoptions\\fR +'el .ds So \\fB\\$1\\fR +.SH "STANDARD OPTIONS" +.LP +.nf +.ta 5.5c 11c +.ft B +.. +.\" # SE - end of list of standard options +.de SE +.fi +.ft R +.LP +See the \\*(So manual entry for details on the standard options. +.. +.\" # OP - start of full description for a single option +.de OP +.LP +.nf +.ta 4c +Command-Line Name: \\fB\\$1\\fR +Database Name: \\fB\\$2\\fR +Database Class: \\fB\\$3\\fR +.fi +.IP +.. +.\" # CS - begin code excerpt +.de CS +.RS +.nf +.ta .25i .5i .75i 1i +.. +.\" # CE - end code excerpt +.de CE +.fi +.RE +.. +.\" # UL - underline word +.de UL +\\$1\l'|0\(ul'\\$2 +.. +.\" # QW - apply quotation marks to word +.de QW +.ie '\\*(lq'"' ``\\$1''\\$2 +.\"" fix emacs highlighting +.el \\*(lq\\$1\\*(rq\\$2 +.. +.\" # PQ - apply parens and quotation marks to word +.de PQ +.ie '\\*(lq'"' (``\\$1''\\$2)\\$3 +.\"" fix emacs highlighting +.el (\\*(lq\\$1\\*(rq\\$2)\\$3 +.. +.\" # QR - quoted range +.de QR +.ie '\\*(lq'"' ``\\$1''\\-``\\$2''\\$3 +.\"" fix emacs highlighting +.el \\*(lq\\$1\\*(rq\\-\\*(lq\\$2\\*(rq\\$3 +.. +.\" # MT - "empty" string +.de MT +.QW "" +.. +.BS +.SH NAME +cursor \- Procedures to handle CURSOR data +.SH SYNOPSIS +package require \fBTk \fR +.sp +package require \fBcursor ?0\&.3\&.1?\fR +.sp +\fB::cursor::propagate\fR \fIwidget\fR \fIcursor\fR +.sp +\fB::cursor::restore\fR \fIwidget\fR ?\fIcursor\fR? +.sp +\fB::cursor::display\fR ?\fIparent\fR? +.sp +.BE +.SH DESCRIPTION +The \fBcursor\fR package provides commands to handle Tk cursors\&. +.SH COMMANDS +The following commands are available: +.TP +\fB::cursor::propagate\fR \fIwidget\fR \fIcursor\fR +Sets the cursor for the specified \fIwidget\fR and all its descendants +to \fIcursor\fR\&. +.TP +\fB::cursor::restore\fR \fIwidget\fR ?\fIcursor\fR? +Restore the original or previously set cursor for the specified +\fIwidget\fR and all its descendants\&. If \fIcursor\fR is specified, +that will be used if on any widget that did not have a preset cursor +(set by a previous call to \fB::cursor::propagate\fR)\&. +.TP +\fB::cursor::display\fR ?\fIparent\fR? +Pops up a dialog with a listbox containing all the cursor names\&. +Selecting a cursor name will display it in that dialog\&. This is +simply for viewing any available cursors on the platform\&. +.PP +.SH "BUGS, IDEAS, FEEDBACK" +This document, and the package it describes, will undoubtedly contain +bugs and other problems\&. +Please report such in the category \fIcursor\fR of the +\fITklib Trackers\fR [http://core\&.tcl\&.tk/tklib/reportlist]\&. +Please also report any ideas for enhancements you may have for either +package and/or documentation\&. +.SH "SEE ALSO" +Tk_GetCursor(3), cursors(n), options(n) +.SH KEYWORDS +cursor +.SH COPYRIGHT +.nf +Copyright (c) Jeffrey Hobbs + +.fi \ No newline at end of file diff --git a/embedded/man/files/modules/datefield/datefield.n b/embedded/man/files/modules/datefield/datefield.n new file mode 100644 index 00000000..302aa0aa --- /dev/null +++ b/embedded/man/files/modules/datefield/datefield.n @@ -0,0 +1,339 @@ +'\" +'\" Generated from file 'datefield\&.man' by tcllib/doctools with format 'nroff' +'\" Copyright (c) Keith Vetter +'\" +.TH "datefield" n 0\&.2 tklib "Tk datefield widget" +.\" The -*- nroff -*- definitions below are for supplemental macros used +.\" in Tcl/Tk manual entries. +.\" +.\" .AP type name in/out ?indent? +.\" Start paragraph describing an argument to a library procedure. +.\" type is type of argument (int, etc.), in/out is either "in", "out", +.\" or "in/out" to describe whether procedure reads or modifies arg, +.\" and indent is equivalent to second arg of .IP (shouldn't ever be +.\" needed; use .AS below instead) +.\" +.\" .AS ?type? ?name? +.\" Give maximum sizes of arguments for setting tab stops. Type and +.\" name are examples of largest possible arguments that will be passed +.\" to .AP later. If args are omitted, default tab stops are used. +.\" +.\" .BS +.\" Start box enclosure. From here until next .BE, everything will be +.\" enclosed in one large box. +.\" +.\" .BE +.\" End of box enclosure. +.\" +.\" .CS +.\" Begin code excerpt. +.\" +.\" .CE +.\" End code excerpt. +.\" +.\" .VS ?version? ?br? +.\" Begin vertical sidebar, for use in marking newly-changed parts +.\" of man pages. The first argument is ignored and used for recording +.\" the version when the .VS was added, so that the sidebars can be +.\" found and removed when they reach a certain age. If another argument +.\" is present, then a line break is forced before starting the sidebar. +.\" +.\" .VE +.\" End of vertical sidebar. +.\" +.\" .DS +.\" Begin an indented unfilled display. +.\" +.\" .DE +.\" End of indented unfilled display. +.\" +.\" .SO ?manpage? +.\" Start of list of standard options for a Tk widget. The manpage +.\" argument defines where to look up the standard options; if +.\" omitted, defaults to "options". The options follow on successive +.\" lines, in three columns separated by tabs. +.\" +.\" .SE +.\" End of list of standard options for a Tk widget. +.\" +.\" .OP cmdName dbName dbClass +.\" Start of description of a specific option. cmdName gives the +.\" option's name as specified in the class command, dbName gives +.\" the option's name in the option database, and dbClass gives +.\" the option's class in the option database. +.\" +.\" .UL arg1 arg2 +.\" Print arg1 underlined, then print arg2 normally. +.\" +.\" .QW arg1 ?arg2? +.\" Print arg1 in quotes, then arg2 normally (for trailing punctuation). +.\" +.\" .PQ arg1 ?arg2? +.\" Print an open parenthesis, arg1 in quotes, then arg2 normally +.\" (for trailing punctuation) and then a closing parenthesis. +.\" +.\" # Set up traps and other miscellaneous stuff for Tcl/Tk man pages. +.if t .wh -1.3i ^B +.nr ^l \n(.l +.ad b +.\" # Start an argument description +.de AP +.ie !"\\$4"" .TP \\$4 +.el \{\ +. ie !"\\$2"" .TP \\n()Cu +. el .TP 15 +.\} +.ta \\n()Au \\n()Bu +.ie !"\\$3"" \{\ +\&\\$1 \\fI\\$2\\fP (\\$3) +.\".b +.\} +.el \{\ +.br +.ie !"\\$2"" \{\ +\&\\$1 \\fI\\$2\\fP +.\} +.el \{\ +\&\\fI\\$1\\fP +.\} +.\} +.. +.\" # define tabbing values for .AP +.de AS +.nr )A 10n +.if !"\\$1"" .nr )A \\w'\\$1'u+3n +.nr )B \\n()Au+15n +.\" +.if !"\\$2"" .nr )B \\w'\\$2'u+\\n()Au+3n +.nr )C \\n()Bu+\\w'(in/out)'u+2n +.. +.AS Tcl_Interp Tcl_CreateInterp in/out +.\" # BS - start boxed text +.\" # ^y = starting y location +.\" # ^b = 1 +.de BS +.br +.mk ^y +.nr ^b 1u +.if n .nf +.if n .ti 0 +.if n \l'\\n(.lu\(ul' +.if n .fi +.. +.\" # BE - end boxed text (draw box now) +.de BE +.nf +.ti 0 +.mk ^t +.ie n \l'\\n(^lu\(ul' +.el \{\ +.\" Draw four-sided box normally, but don't draw top of +.\" box if the box started on an earlier page. +.ie !\\n(^b-1 \{\ +\h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul' +.\} +.el \}\ +\h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul' +.\} +.\} +.fi +.br +.nr ^b 0 +.. +.\" # VS - start vertical sidebar +.\" # ^Y = starting y location +.\" # ^v = 1 (for troff; for nroff this doesn't matter) +.de VS +.if !"\\$2"" .br +.mk ^Y +.ie n 'mc \s12\(br\s0 +.el .nr ^v 1u +.. +.\" # VE - end of vertical sidebar +.de VE +.ie n 'mc +.el \{\ +.ev 2 +.nf +.ti 0 +.mk ^t +\h'|\\n(^lu+3n'\L'|\\n(^Yu-1v\(bv'\v'\\n(^tu+1v-\\n(^Yu'\h'-|\\n(^lu+3n' +.sp -1 +.fi +.ev +.\} +.nr ^v 0 +.. +.\" # Special macro to handle page bottom: finish off current +.\" # box/sidebar if in box/sidebar mode, then invoked standard +.\" # page bottom macro. +.de ^B +.ev 2 +'ti 0 +'nf +.mk ^t +.if \\n(^b \{\ +.\" Draw three-sided box if this is the box's first page, +.\" draw two sides but no top otherwise. +.ie !\\n(^b-1 \h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c +.el \h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c +.\} +.if \\n(^v \{\ +.nr ^x \\n(^tu+1v-\\n(^Yu +\kx\h'-\\nxu'\h'|\\n(^lu+3n'\ky\L'-\\n(^xu'\v'\\n(^xu'\h'|0u'\c +.\} +.bp +'fi +.ev +.if \\n(^b \{\ +.mk ^y +.nr ^b 2 +.\} +.if \\n(^v \{\ +.mk ^Y +.\} +.. +.\" # DS - begin display +.de DS +.RS +.nf +.sp +.. +.\" # DE - end display +.de DE +.fi +.RE +.sp +.. +.\" # SO - start of list of standard options +.de SO +'ie '\\$1'' .ds So \\fBoptions\\fR +'el .ds So \\fB\\$1\\fR +.SH "STANDARD OPTIONS" +.LP +.nf +.ta 5.5c 11c +.ft B +.. +.\" # SE - end of list of standard options +.de SE +.fi +.ft R +.LP +See the \\*(So manual entry for details on the standard options. +.. +.\" # OP - start of full description for a single option +.de OP +.LP +.nf +.ta 4c +Command-Line Name: \\fB\\$1\\fR +Database Name: \\fB\\$2\\fR +Database Class: \\fB\\$3\\fR +.fi +.IP +.. +.\" # CS - begin code excerpt +.de CS +.RS +.nf +.ta .25i .5i .75i 1i +.. +.\" # CE - end code excerpt +.de CE +.fi +.RE +.. +.\" # UL - underline word +.de UL +\\$1\l'|0\(ul'\\$2 +.. +.\" # QW - apply quotation marks to word +.de QW +.ie '\\*(lq'"' ``\\$1''\\$2 +.\"" fix emacs highlighting +.el \\*(lq\\$1\\*(rq\\$2 +.. +.\" # PQ - apply parens and quotation marks to word +.de PQ +.ie '\\*(lq'"' (``\\$1''\\$2)\\$3 +.\"" fix emacs highlighting +.el (\\*(lq\\$1\\*(rq\\$2)\\$3 +.. +.\" # QR - quoted range +.de QR +.ie '\\*(lq'"' ``\\$1''\\-``\\$2''\\$3 +.\"" fix emacs highlighting +.el \\*(lq\\$1\\*(rq\\-\\*(lq\\$2\\*(rq\\$3 +.. +.\" # MT - "empty" string +.de MT +.QW "" +.. +.BS +.SH NAME +datefield \- Tk datefield widget +.SH SYNOPSIS +package require \fBTk \fR +.sp +package require \fBdatefield ?0\&.2?\fR +.sp +\fB::datefield::datefield\fR \fIwidgetpath\fR ?\fIoptions\fR? +.sp +.BE +.SH DESCRIPTION +The \fBdatefield\fR package provides the datefield widget which +is an enhanced text entry widget for the purpose of date entry\&. Only +valid dates of the form MM/DD/YYYY can be entered\&. +.PP +The datefield widget is, in fact, just an entry widget with +specialized bindings\&. This means all the command and options for an +entry widget apply equally here\&. +.SH COMMANDS +.TP +\fB::datefield::datefield\fR \fIwidgetpath\fR ?\fIoptions\fR? +Creates and configures a date field widget\&. +.PP +.SH OPTIONS +See the \fBentry\fR manual entry for details on all available options\&. +.SH EXAMPLE +.CS + + + package require datefield + + wm title \&. "Datefield example" + proc DayOfWeek {args} { + set now [clock scan $::myDate] + set ::myDate2 [clock format $now -format %A] + } + trace variable myDate w DayOfWeek + + ::datefield::datefield \&.df -textvariable myDate + label \&.l1 -text "Enter a date:" -anchor e + label \&.l2 -text "That date is a:" -anchor e + label \&.l3 -textvariable myDate2 -relief sunken -width 12 + + grid \&.l1 \&.df -sticky ew + grid \&.l2 \&.l3 -sticky ew + focus \&.df + +.CE +.SH "BUGS, IDEAS, FEEDBACK" +This document, and the package it describes, will undoubtedly contain +bugs and other problems\&. +Please report such in the category \fIdatefield\fR of the +\fITklib Trackers\fR [http://core\&.tcl\&.tk/tklib/reportlist]\&. +Please also report any ideas for enhancements you may have for either +package and/or documentation\&. +.SH "SEE ALSO" +clock(n), entry(n) +.SH KEYWORDS +clock, date, dateentry, entry, widget +.SH CATEGORY +Widget +.SH COPYRIGHT +.nf +Copyright (c) Keith Vetter + +.fi \ No newline at end of file diff --git a/embedded/man/files/modules/diagrams/diagram.n b/embedded/man/files/modules/diagrams/diagram.n new file mode 100644 index 00000000..eeb5fd84 --- /dev/null +++ b/embedded/man/files/modules/diagrams/diagram.n @@ -0,0 +1,3249 @@ +'\" +'\" Generated from file 'diagram\&.man' by tcllib/doctools with format 'nroff' +'\" +.TH "diagram" n 0\&.3 tklib "Documentation toolbox" +.\" The -*- nroff -*- definitions below are for supplemental macros used +.\" in Tcl/Tk manual entries. +.\" +.\" .AP type name in/out ?indent? +.\" Start paragraph describing an argument to a library procedure. +.\" type is type of argument (int, etc.), in/out is either "in", "out", +.\" or "in/out" to describe whether procedure reads or modifies arg, +.\" and indent is equivalent to second arg of .IP (shouldn't ever be +.\" needed; use .AS below instead) +.\" +.\" .AS ?type? ?name? +.\" Give maximum sizes of arguments for setting tab stops. Type and +.\" name are examples of largest possible arguments that will be passed +.\" to .AP later. If args are omitted, default tab stops are used. +.\" +.\" .BS +.\" Start box enclosure. From here until next .BE, everything will be +.\" enclosed in one large box. +.\" +.\" .BE +.\" End of box enclosure. +.\" +.\" .CS +.\" Begin code excerpt. +.\" +.\" .CE +.\" End code excerpt. +.\" +.\" .VS ?version? ?br? +.\" Begin vertical sidebar, for use in marking newly-changed parts +.\" of man pages. The first argument is ignored and used for recording +.\" the version when the .VS was added, so that the sidebars can be +.\" found and removed when they reach a certain age. If another argument +.\" is present, then a line break is forced before starting the sidebar. +.\" +.\" .VE +.\" End of vertical sidebar. +.\" +.\" .DS +.\" Begin an indented unfilled display. +.\" +.\" .DE +.\" End of indented unfilled display. +.\" +.\" .SO ?manpage? +.\" Start of list of standard options for a Tk widget. The manpage +.\" argument defines where to look up the standard options; if +.\" omitted, defaults to "options". The options follow on successive +.\" lines, in three columns separated by tabs. +.\" +.\" .SE +.\" End of list of standard options for a Tk widget. +.\" +.\" .OP cmdName dbName dbClass +.\" Start of description of a specific option. cmdName gives the +.\" option's name as specified in the class command, dbName gives +.\" the option's name in the option database, and dbClass gives +.\" the option's class in the option database. +.\" +.\" .UL arg1 arg2 +.\" Print arg1 underlined, then print arg2 normally. +.\" +.\" .QW arg1 ?arg2? +.\" Print arg1 in quotes, then arg2 normally (for trailing punctuation). +.\" +.\" .PQ arg1 ?arg2? +.\" Print an open parenthesis, arg1 in quotes, then arg2 normally +.\" (for trailing punctuation) and then a closing parenthesis. +.\" +.\" # Set up traps and other miscellaneous stuff for Tcl/Tk man pages. +.if t .wh -1.3i ^B +.nr ^l \n(.l +.ad b +.\" # Start an argument description +.de AP +.ie !"\\$4"" .TP \\$4 +.el \{\ +. ie !"\\$2"" .TP \\n()Cu +. el .TP 15 +.\} +.ta \\n()Au \\n()Bu +.ie !"\\$3"" \{\ +\&\\$1 \\fI\\$2\\fP (\\$3) +.\".b +.\} +.el \{\ +.br +.ie !"\\$2"" \{\ +\&\\$1 \\fI\\$2\\fP +.\} +.el \{\ +\&\\fI\\$1\\fP +.\} +.\} +.. +.\" # define tabbing values for .AP +.de AS +.nr )A 10n +.if !"\\$1"" .nr )A \\w'\\$1'u+3n +.nr )B \\n()Au+15n +.\" +.if !"\\$2"" .nr )B \\w'\\$2'u+\\n()Au+3n +.nr )C \\n()Bu+\\w'(in/out)'u+2n +.. +.AS Tcl_Interp Tcl_CreateInterp in/out +.\" # BS - start boxed text +.\" # ^y = starting y location +.\" # ^b = 1 +.de BS +.br +.mk ^y +.nr ^b 1u +.if n .nf +.if n .ti 0 +.if n \l'\\n(.lu\(ul' +.if n .fi +.. +.\" # BE - end boxed text (draw box now) +.de BE +.nf +.ti 0 +.mk ^t +.ie n \l'\\n(^lu\(ul' +.el \{\ +.\" Draw four-sided box normally, but don't draw top of +.\" box if the box started on an earlier page. +.ie !\\n(^b-1 \{\ +\h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul' +.\} +.el \}\ +\h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul' +.\} +.\} +.fi +.br +.nr ^b 0 +.. +.\" # VS - start vertical sidebar +.\" # ^Y = starting y location +.\" # ^v = 1 (for troff; for nroff this doesn't matter) +.de VS +.if !"\\$2"" .br +.mk ^Y +.ie n 'mc \s12\(br\s0 +.el .nr ^v 1u +.. +.\" # VE - end of vertical sidebar +.de VE +.ie n 'mc +.el \{\ +.ev 2 +.nf +.ti 0 +.mk ^t +\h'|\\n(^lu+3n'\L'|\\n(^Yu-1v\(bv'\v'\\n(^tu+1v-\\n(^Yu'\h'-|\\n(^lu+3n' +.sp -1 +.fi +.ev +.\} +.nr ^v 0 +.. +.\" # Special macro to handle page bottom: finish off current +.\" # box/sidebar if in box/sidebar mode, then invoked standard +.\" # page bottom macro. +.de ^B +.ev 2 +'ti 0 +'nf +.mk ^t +.if \\n(^b \{\ +.\" Draw three-sided box if this is the box's first page, +.\" draw two sides but no top otherwise. +.ie !\\n(^b-1 \h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c +.el \h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c +.\} +.if \\n(^v \{\ +.nr ^x \\n(^tu+1v-\\n(^Yu +\kx\h'-\\nxu'\h'|\\n(^lu+3n'\ky\L'-\\n(^xu'\v'\\n(^xu'\h'|0u'\c +.\} +.bp +'fi +.ev +.if \\n(^b \{\ +.mk ^y +.nr ^b 2 +.\} +.if \\n(^v \{\ +.mk ^Y +.\} +.. +.\" # DS - begin display +.de DS +.RS +.nf +.sp +.. +.\" # DE - end display +.de DE +.fi +.RE +.sp +.. +.\" # SO - start of list of standard options +.de SO +'ie '\\$1'' .ds So \\fBoptions\\fR +'el .ds So \\fB\\$1\\fR +.SH "STANDARD OPTIONS" +.LP +.nf +.ta 5.5c 11c +.ft B +.. +.\" # SE - end of list of standard options +.de SE +.fi +.ft R +.LP +See the \\*(So manual entry for details on the standard options. +.. +.\" # OP - start of full description for a single option +.de OP +.LP +.nf +.ta 4c +Command-Line Name: \\fB\\$1\\fR +Database Name: \\fB\\$2\\fR +Database Class: \\fB\\$3\\fR +.fi +.IP +.. +.\" # CS - begin code excerpt +.de CS +.RS +.nf +.ta .25i .5i .75i 1i +.. +.\" # CE - end code excerpt +.de CE +.fi +.RE +.. +.\" # UL - underline word +.de UL +\\$1\l'|0\(ul'\\$2 +.. +.\" # QW - apply quotation marks to word +.de QW +.ie '\\*(lq'"' ``\\$1''\\$2 +.\"" fix emacs highlighting +.el \\*(lq\\$1\\*(rq\\$2 +.. +.\" # PQ - apply parens and quotation marks to word +.de PQ +.ie '\\*(lq'"' (``\\$1''\\$2)\\$3 +.\"" fix emacs highlighting +.el (\\*(lq\\$1\\*(rq\\$2)\\$3 +.. +.\" # QR - quoted range +.de QR +.ie '\\*(lq'"' ``\\$1''\\-``\\$2''\\$3 +.\"" fix emacs highlighting +.el \\*(lq\\$1\\*(rq\\-\\*(lq\\$2\\*(rq\\$3 +.. +.\" # MT - "empty" string +.de MT +.QW "" +.. +.BS +.SH NAME +diagram \- Diagram drawing +.SH SYNOPSIS +package require \fBTcl 8\&.5\fR +.sp +package require \fBTk 8\&.5\fR +.sp +package require \fBdiagram 1\fR +.sp +\fB::diagram\fR \fIobjectName\fR \fIcanvas\fR ?\fIscript\fR? +.sp +\fIdiagramObject\fR \fBnew direction\fR \fIname\fR ?\fIkey\fR \fIvalue\fR\&.\&.\&.? +.sp +\fIdiagramObject\fR \fBnew element\fR \fIname\fR \fIattributes\fR \fIcmdprefix\fR +.sp +\fIdiagramObject\fR \fBnew alias\fR \fIname\fR \fIcmdprefix\fR +.sp +\fIdiagramObject\fR \fBnew command\fR \fIname\fR \fIarguments\fR \fIbody\fR +.sp +\fIdiagramObject\fR \fBnew attribute\fR \fIname\fR ?\fIkey\fR \fIvalue\fR\&.\&.\&.? +.sp +\fIdiagramObject\fR \fBunknown attribute\fR \fIcmdprefix\fR +.sp +\fIdiagramObject\fR \fBdraw\fR \fIscript\fR +.sp +\fBarc\fR \fIattr\fR\&.\&.\&. +.sp +\fBarrow\fR \fIattr\fR\&.\&.\&. +.sp +\fB-->\fR \fIattr\fR\&.\&.\&. +.sp +\fB<-->\fR \fIattr\fR\&.\&.\&. +.sp +\fB<-->\fR \fIattr\fR\&.\&.\&. +.sp +\fBblock\fR \fIscript\fR \fIattr\fR\&.\&.\&. +.sp +\fBbox\fR \fIattr\fR\&.\&.\&. +.sp +\fBcircle\fR \fIattr\fR\&.\&.\&. +.sp +\fBO\fR \fIattr\fR\&.\&.\&. +.sp +\fBdiamond\fR \fIattr\fR\&.\&.\&. +.sp +\fB<>\fR \fIattr\fR\&.\&.\&. +.sp +\fBdrum\fR \fIattr\fR\&.\&.\&. +.sp +\fBellipse\fR \fIattr\fR\&.\&.\&. +.sp +\fBline\fR \fIattr\fR\&.\&.\&. +.sp +\fB--\fR \fIattr\fR\&.\&.\&. +.sp +\fBmove\fR \fIattr\fR +.sp +\fBspline\fR \fIattr\fR\&.\&.\&. +.sp +\fBtext\fR \fIattr\fR\&.\&.\&. +.sp +\fBwest\fR +.sp +\fBw\fR +.sp +\fBleft\fR +.sp +\fBl\fR +.sp +\fBsouth\fR +.sp +\fBs\fR +.sp +\fBdown\fR +.sp +\fBbottom\fR +.sp +\fBbot\fR +.sp +\fBb\fR +.sp +\fBeast\fR +.sp +\fBe\fR +.sp +\fBright\fR +.sp +\fBr\fR +.sp +\fBnorth\fR +.sp +\fBn\fR +.sp +\fBup\fR +.sp +\fBtop\fR +.sp +\fBt\fR +.sp +\fBnorthwest\fR +.sp +\fBnw\fR +.sp +\fBup-left\fR +.sp +\fBupleft\fR +.sp +\fBleftup\fR +.sp +\fBnortheast\fR +.sp +\fBne\fR +.sp +\fBup-right\fR +.sp +\fBupright\fR +.sp +\fBrightup\fR +.sp +\fBsouthwest\fR +.sp +\fBsw\fR +.sp +\fBdown-left\fR +.sp +\fBdownleft\fR +.sp +\fBleftdown\fR +.sp +\fBsoutheast\fR +.sp +\fBse\fR +.sp +\fBdown-right\fR +.sp +\fBdownright\fR +.sp +\fBrightdown\fR +.sp +\fInumber\fR \fBcm\fR +.sp +\fInumber\fR \fBmm\fR +.sp +\fInumber\fR \fBinch\fR +.sp +\fInumber\fR \fBpt\fR +.sp +\fInumber\fR \fInumber\fR +.sp +\fBby\fR \fIdistance\fR \fIdirection\fR +.sp +\fIpoint1\fR \fB+\fR \fIpoint2\fR +.sp +\fIpoint1\fR \fB-\fR \fIpoint2\fR +.sp +\fIpoint\fR \fBby\fR \fIdistance\fR \fIdirection\fR +.sp +\fIpoint1\fR \fB|\fR \fIpoint2\fR +.sp +\fIn\fR \fBbetween\fR \fIpoin1\fR \fIpoint2\fR +.sp +\fBintersect\fR \fIelem1\fR \fIelem2\fR +.sp +\fIelement\fR \fBnames\fR ?\fIpattern\fR? +.sp +\fIelement\fR \fIcorner\fR +.sp +\fIelement\fR \fIcorner1\fR \fIcorner2\fR\&.\&.\&. +.sp +\fIelement\fR ?\fIcorner1\fR\&.\&.\&. ?\fBnames\fR ?\fIpattern\fR??]? +.sp +\fB\fBn\fRth\fR ?\fIcorner\fR? +.sp +\fB\fBn\fRth\fR \fBlast\fR ?\fIcorner\fR? +.sp +\fB\fBn\fRth\fR \fIshape\fR ?\fIcorner\fR? +.sp +\fB\fBn\fRth\fR \fBlast\fR \fIshape\fR ?\fIcorner\fR? +.sp +\fBlast\fR ?\fIcorner\fR? +.sp +\fBlast\fR \fIshape\fR ?\fIcorner\fR? +.sp +\fB1st\fR +.sp +\fB2nd\fR +.sp +\fB3rd\fR +.sp +.BE +.SH DESCRIPTION +Welcome to \fBdiagram\fR, a package for the easy construction of +diagrams (sic), i\&.e\&. 2D vector graphics, sometimes also called \fIpictures\fR\&. +Note that this package is not a replacement for \fBTk\fR's canvas, +but rather a layer sitting on top of it, to make it easier to use\&. +In other words, using the canvas as the core graphics engine \fBdiagram\fR abstracts away from the minutiae of handling coordinates to +position and size the drawn elements, allowing the user to concentrate +on the content of the diagram instead\&. +.PP +This is similar to Brian Kernighan's PIC language for troff, which is +the spiritual ancestor of this package\&. +.PP +This document contains the reference to the API and drawing (language) +commands\&. Its intended audience are users of the package wishing to +refresh their memory\&. +Newcomers should read the \fIDiagram Language Tutorial\fR first\&. +Developers wishing to work on the internals of the package and its +supporting packages should look at section +\fBDiagram Classes\fR +first, and then the comments in the sources of the packages itself\&. +.PP +In the remainder of the document we first describe the APIs of the +diagram class and its instances, followed by the language reference +for the drawing language itself\&. +.SH API +.SS "CLASS API" +The package exports the API described here\&. +.TP +\fB::diagram\fR \fIobjectName\fR \fIcanvas\fR ?\fIscript\fR? +The command creates a new instance of a diagram +controller and returns the fully qualified name of the +object command as its result\&. +The new instance is connected to the specified +\fIcanvas\fR object, which is used as the diagrams +graphics engine\&. This is usually an instance of Tk's +canvas, however any object which is API compatible to +Tk's canvas can be used here\&. +.sp +The API of this object command is described in the +following section, \fBObject API\fR\&. It may be +used to invoke various operations on the object\&. +.sp +If the \fIscript\fR argument is specified then method +\fBdraw\fR will be invoked on it\&. +.PP +.SS "OBJECT API" +Instances of the diagram class support the following +methods: +.TP +\fIdiagramObject\fR \fBnew direction\fR \fIname\fR ?\fIkey\fR \fIvalue\fR\&.\&.\&.? +This method defines a new named direction and its +attributes\&. The latter is given through the +\fIkey\fR/\fIvalue\fR pairs coming after the \fIname\fR\&. +.sp +Users are mostly free to specify arbitrary attributes +with whatever meaning they desire\&. The exception are +the names \fIangle\fR and \fIopposite\fR\&. They are +special to the diagram package and have a fixed meaning\&. +.RS +.TP +angle +This attribute specifies the angle of the direction in +degrees, where 0 points east (to the right) and 90 points +north (up)\&. +.TP +opposite +This attribute specifies the name of the direction +which should be considered as complementary to the +named one\&. +.RE +.TP +\fIdiagramObject\fR \fBnew element\fR \fIname\fR \fIattributes\fR \fIcmdprefix\fR +This method defines a new graphics element for the +drawing language\&. I\&.e\&. \fIname\fR will become a new +command in the language, and the specified command +prefix (\fIcmdprefix\fR) will be called to perform +the actual drawing\&. +.sp +\fIattributes\fR specifies the set of attributes for which +data has to be available\&. I\&.e\&. the system will run the +\&.\&.\&.-callbacks for these attributes\&. +See the method \fBnew attribute\fR for more information +on attribute definitions\&. +.sp +The command prefix is expected to conform to the +following signature: +.RS +.TP +\fBcmdprefix\fR \fIcanvas\fR \fIattributes\fR +Where \fIcanvas\fR is the handle of the canvas widget +to draw to, and \fIattributes\fR is a dictionary +holding the attributes for the element, be they +user-specified, or defaults\&. +.sp +The results of the command has to be a list containing +at least two and at most four items\&. These are, in order: +.RS +.IP [1] +The list of canvas items the drawn element consists of\&. +.IP [2] +The dictionary of named locations in the element, its +\fIcorners\fR\&. +.IP [3] +An optional mode, either "relative" or "absolute"\&. +When not returned "relative" is assumed\&. In the +case of a relative element position the attributes +"with" and "at" are used to determine the final +position of the new element\&. +.IP [4] +An optional name of a direction\&. If not the +empty string this is handed to the automatic +layouter as the new direction to follow\&. +.RE +.RE +.TP +\fIdiagramObject\fR \fBnew alias\fR \fIname\fR \fIcmdprefix\fR +This method defines a new command for the drawing +language\&. I\&.e\&. \fIname\fR will become a new command in +the language, and the specified command prefix +(\fIcmdprefix\fR) will be called on use of this new +command\&. Any arguments given to the command are +simply passed to the prefix\&. There is no fixed siganture\&. +.sp +Note that the prefix is run in the context of the +drawing language, allowing the direct use of any +existing commands\&. +.TP +\fIdiagramObject\fR \fBnew command\fR \fIname\fR \fIarguments\fR \fIbody\fR +This is like \fBnew alias\fR except that the new +command is defined as a procedure in the language's +context, with regular argument list and body\&. +.TP +\fIdiagramObject\fR \fBnew attribute\fR \fIname\fR ?\fIkey\fR \fIvalue\fR\&.\&.\&.? +This method defines a new named attribute which can be +used by graphical elements\&. The handling of the +attribute by the processor is declared through the +\fIkey\fR/\fIvalue\fR pairs coming after the \fIname\fR\&. +.sp +The accepted keys and their meanings are: +.RS +.TP +\fBkey\fR +The value of this key is the name of the key +under which the attribute's value shall be +stored in the attribute dictionary given to +the drawing command after attribute processing +is complete\&. +.sp +This key is optional\&. If it is not specified it +defaults to the name of the attribute\&. +.TP +\fBget\fR +The value of this key is a command prefix +which will be invoked to retrieve the +attribute's argument(s) from the command +line\&. +.sp +This key is optional\&. If it is not specified a +default is used which takes the single word +after the attribute name as the attribute's +value\&. +.sp +The signature of the command prefix is +.RS +.TP +\fBcmdprefix\fR \fIwordqueue\fR +Where \fIwordqueue\fR is the handle of +a queue object conforming to the API +of the queues provided by package +\fBstruct::queue\fR\&. This queue +contains the not-yet-processed part of +the attribute definitions, with one +entry per word, with the first entry +the word \fIafter\fR name of the +attribute\&. In other words, the +attribute's name has already been +removed from the queue\&. +.sp +The result of the command is the value +of the attribute, which may have been +taken from the queue, or not\&. +.RE +.TP +\fBtransform\fR +The value of this key is a command prefix +which will be invoked to transform the +retrieved value (See \fBget\fR) into their +final form\&. +.sp +This key is optional\&. If it is not specified +no transformation is done\&. +The signature of the command prefix is +.RS +.TP +\fBcmdprefix\fR \fIvalue\fR +Where \fIvalue\fR is the value to transform\&. +.sp +The result of the command is the final +value of the attribute\&. +.RE +.TP +\fBtype\fR +The value of this key is a command prefix +which will be invoked to validate the +attribute's argument(s)\&. +.sp +This key is optional\&. If it is not specified +no validation is done\&. +.sp +The signature of the command prefix is that of +snit validation types\&. See the documentation +of the \fBsnit\fR package\&. +.TP +\fBmerge\fR +The value of this key is a command prefix +which will be invoked to insert the +transformed and validated attribute value into +the dictionary of collected attributes\&. +.sp +This key is optional\&. If it is not specified +a default merge is chosen, based on the data +for key \fBaggregate\fR, see below\&. +The signature of the command prefix is +.RS +.TP +\fBcmdprefix\fR \fIvalue\fR \fIdict\fR +Where \fIvalue\fR is the value to +insert, and \fIdict\fR the dictionary +of attributes and values collected so +far\&. +.sp +The result of the command is the new +dictionary of attributes\&. +.RE +.TP +\fBaggregate\fR +The value of this key is a boolean flag\&. It +has an effect if and only if the key \fBmerge\fR was not specified\&. This key is +optional\&. If it is not specified it defaults +to \fBFalse\fR\&. +.sp +If the key is effective, the value of \fBFalse\fR means that the attribute's value is +\fIset\fR into the dictionary using the value +of key \fIkey\fR (see above) as index, +\fIoverwriting\fR any previously specified value\&. +.sp +If the key is effective, the value of \fBTrue\fR means that the attribute's value is +\fIadded\fR to the dictionary using the value +of key \fIkey\fR (see above) as index, +\fIextending\fR any previously specified value\&. +This means that the final value of the +attribute as seen after processing will be a +list of the collected values\&. +.TP +\fBdefault\fR +The value of this key is a command prefix +which will be invoked after collection of +attributes has been completed and this +attribute is in the list of required +attributes for the drawing element (See +argument \fIattributes\fR of method +\fBnew element\fR)\&. +.sp +Note that the connection is made through the +value of key \fIkey\fR, not through the +attribute name per se\&. +.sp +Further note that this command prefix is +invoked even if a user specified attribute +value is present\&. This allows the command +to go beyond simply setting defaults, it +can calculate and store derived values as +well\&. +.sp +This key is optional\&. If an element requires +this attribute, but \fIdefault\fR is not +specified then nothing will be done\&. +.sp +The signature of the command prefix is +.RS +.TP +\fBcmdprefix\fR \fBinit\fR +This method is run when the attribute +is defined, its responsibility is to +initialize anything in the language +namespace for the attribute and +default processing\&. +.sp +The result of this method is ignored\&. +.TP +\fBcmdprefix\fR \fBfill\fR \fIvarname\fR +This method is run to put defaults, or +derived values into the attribute dictionary +named by \fIvarname\fR\&. This variable will +be found in the calling context\&. +.sp +The result of this method is ignored\&. +.TP +\fBcmdprefix\fR \fBset\fR \fIname\fR \fIvalue\fR +This method is run to push current a +attribute value into the language +namespace, to make it the new default\&. +.sp +The result of this method is ignored\&. +.RE +.TP +\fBlinked\fR +This key is effective if and only if key +\fBdefault\fR is not specified\&. In that +case is supplies a default handling for +\fBdefault\fR, linking the attribute to a +variable in the language context\&. +.sp +The value for this key is a 2-element list +containing the name of the variable to link +to, and its initial value, in this order\&. +.RE +.TP +\fIdiagramObject\fR \fBunknown attribute\fR \fIcmdprefix\fR +This method registers the command prefix with the +subsystem processing the attributes for element +commands, telling it to call it when it encounters an +attribute it is unable to handle on its on\&. +.sp +It is allowed to register more than callback, these +will be called in order of registration (i\&.e\&. first to +last), until one of the callbacks accepts the current +input\&. +The command prefix is expected to conform to the +following signature: +.RS +.TP +\fBcmdprefix\fR \fIwordqueue\fR +Where \fIwordqueue\fR is the handle of a queue +object conforming to the API of the queues +provided by package \fBstruct::queue\fR\&. +This queue contains the not-yet-processed part +of the attribute definitions, with one entry +per word, with the first entry the name of the +attribute which could not be processed\&. +.sp +The results of the command has to be a boolean +value where \fBTrue\fR signals that this +callback has accepted the attribute, processed +it, and the new state of the \fIwordqueue\fR +is where the general processing shall continue\&. +.sp +Given the signature the command has basically +two ways of handling (rewriting) the attributes +it recognizes: +.RS +.IP [1] +Replace the attribute (and arguments) +with a different attribute and arguments\&. +.IP [2] +Push additional words in front to get +the general processing unstuck\&. +.RE +.RE +.TP +\fIdiagramObject\fR \fBdraw\fR \fIscript\fR +This method runs the given \fIscript\fR in the +context of the drawing language definitions\&. +See section \fBLanguage Reference\fR for +details on the available commands\&. +.sp +\fINote\fR that \fIscript\fR is \fItrusted\fR\&. +It is executed in the current interpreter with +access to its full abilities\&. +For the execution of untrusted diagram scripts this +interpreter should be a safe one\&. +.PP +.SH "LANGUAGE REFERENCE" +.SS ELEMENTS +This section lists the commands for the predefined drawing elements, +aka shapes\&. These commands are all defined in the language's context\&. +All commands of this section return the handle of the newly created +element as their result\&. This handle also exists as a command which +can be used to query the element for its corners (names, values)\&. +See section \fBMiscellaneous Commands\fR\&. +IMAGE: figure-02-basic-shapes +.TP +\fBarc\fR \fIattr\fR\&.\&.\&. +IMAGE: figure-02-arc +An open element with the corresponding corners, i\&.e\&. "start", "end", +and "center"\&. +Note however that it also has the compass rose of closed elements as +its corners, with the center of the arc's circle as the center of the +compass and the other points on the circle the arc is part of\&. +It handles the attributes +.RS +.TP +\fBanchor\fR \fIname\fR +.TP +\fBljust\fR +.TP +\fBrjust\fR +.TP +\fBabove\fR +.TP +\fBbelow\fR +IMAGE: figure-22-text-anchoring-3 +Specifies the anchor of the text which is to be placed at the +element's center, by name\&. I\&.e\&. this attribute defines the text's +position relative to the element's center\&. +The value is ignored if no text was specified for the element\&. +If not specified the system falls back to the value taken from the +language variable \fBanchor\fR, which itself defaults to +\fBcenter\fR\&. +The legal values are all those accepted by +\fITk_GetAnchor\fR [http://www\&.tcl\&.tk/man/tcl8\&.5/TkLib/GetAnchor\&.htm]\&. +The commands without arguments are all shorthands with the anchor +implied\&. Note that they do not combine, only the last is used\&. For +comined directions the main attribute command, \fBanchor\fR has to be +used\&. +.RS +.TP +\fBljust\fR +"anchor west" +.TP +\fBrjust\fR +"anchor east" +.TP +\fBabove\fR +"anchor south" +.TP +\fBbelow\fR +"anchor north" +.RE +.TP +\fBclockwise\fR +.TP +\fBcw\fR +Specifies the direction of the \fBarc\fR element, here going +clockwise\&. +The complementary attribute is \fBcounterclockwise\fR\&. +If not specified the system falls back to the value taken from the +language variable \fBclockwise\fR, which itself defaults to +\fBfalse\fR, for counter-clockwise direction\&. +.TP +\fBcolor\fR \fIspec\fR +IMAGE: figure-21-style-colors +Specifies the color used to draw the lines of the element\&. +If not specified the system falls back to the value taken from the +language variable \fBlinecolor\fR, which itself defaults to \fBblack\fR\&. +.TP +\fBcounterclockwise\fR +.TP +\fBccw\fR +Specifies the direction of the \fBarc\fR element, here +counter-clockwise\&. +The complementary attribute is \fBclockwise\fR\&. +If not specified the system falls back to the value taken from the +language variable \fBclockwise\fR, which itself defaults to +\fBfalse\fR, for counter-clockwise direction\&. +.TP +\fBfillcolor\fR \fIspec\fR +IMAGE: figure-21-style-colors +Specifies the color used to draw the inside of the element\&. +If not specified the system falls back to the value taken from the +language variable \fBfillcolor\fR, which itself defaults to the empty +string, signaling "no filling"\&. +.TP +\fBfrom\fR \fIlocation\fR +Specifies the location where the \fBarc\fR element begins\&. +Defaults to the current location as maintained by the layouting +system\&. +.TP +\fBjustify\fR \fBleft\fR|\fBcenter\fR|\fBright\fR +Specifies how multi-line text associated with the element is +positioned within its box\&. +The value is ignored if no text was specified for the element\&. +If not specified the system falls back to the value taken from the +language variable \fBjustify\fR, which itself defaults to +\fBleft\fR\&. +The legal values are \fBleft\fR, \fBright\fR, and \fBcenter\fR\&. +.TP +\fBradius\fR \fIlength\fR +Specifies the radius of the \fBarc\fR element, or rather, the radius +of the circle the shown arc is a part of\&. +If not specified the system falls back to the value taken from the +language variable \fBarcradius\fR, which itself defaults to the pixel +equivalent of \fB1 cm\fR\&. +.TP +\fBstroke\fR \fIwidth\fR +IMAGE: figure-20-style-stroke +Specifies the width of the lines drawn for the the element, in pixels\&. +If not specified the system falls back to the value taken from the +language variable \fBlinewidth\fR, which itself defaults to \fB1\fR\&. +.TP +\fBstyle\fR \fIspec\fR +IMAGE: figure-18-style-dash +Specifies the style used to draw the lines of the element\&. +If not specified the system falls back to the value taken from the +language variable \fBlinestyle\fR, which itself defaults to +\fBsolid\fR lines\&. +The legal values are all those accepted by +\fITk_GetDash\fR [http://www\&.tcl\&.tk/man/tcl8\&.5/TkLib/GetDash\&.htm], +and additionally all which are listed below: +.RS +.TP +\fBsolid\fR, empty string +Draw solid line\&. +.TP +\fBdash\fR, \fBdashed\fR, \fB-\fR +Draw a dashed line\&. +.TP +\fBdot\fR, \fBdotted\fR, \fB\&.\fR +Draw a dotted line\&. +.TP +\fBdash-dot\fR, \fB-\&.\fR +Draw a dash-dotted line +.TP +\fBdash-dot-dot\fR, \fB-\&.\&.\fR +Draw a dash-dot-dotted line\&. +.RE +.IP +Note that the values "solid", "dot(ted)", "dash(ed)", "dash-dot", and +"dash-dot-dot" are all accepted as shorthands for the \fBstyle\fR +command using them as argument\&. +.TP +\fBtext\fR \fIstring\fR +Specifies the text to associate with the element\&. +Defaults to nothing\&. +When specified multiple times the actually shown text is the +concatenation of the individual strings, vertically stacked, with the +first string specified being the topmost element\&. +.TP +\fBtextcolor\fR \fIspec\fR +Specifies the color used to draw the text of an element with\&. +Ignored if there is no text\&. +If not specified the system falls back to the value taken from the +language variable \fBtextcolor\fR, which itself defaults to +\fBblack\fR\&. +.TP +\fBtextfont\fR \fIspec\fR +Specifies the font used to draw the text of an element with\&. +Ignored if there is no text\&. +If not specified the system falls back to the value taken from the +language variable \fBtextfont\fR, which itself defaults to +\fBHelvetica 12pt\fR\&. +.TP +\fBto\fR \fIlocation\fR +Specifies the location where the \fBarc\fR element ends\&. +Defaults to a location such that a 90-degree arc is drawn in the +chosen direction, starting at \fBfrom\fR\&. +.RE +.TP +\fBarrow\fR \fIattr\fR\&.\&.\&. +.TP +\fB-->\fR \fIattr\fR\&.\&.\&. +.TP +\fB<-->\fR \fIattr\fR\&.\&.\&. +.TP +\fB<-->\fR \fIattr\fR\&.\&.\&. +IMAGE: figure-02-arrow +An alias for the \fBline\fR element (see below), with the attribute +\fBarrowhead\fR preset to \fB->\fR, \fB<->\fR, or \fB<-\fR\&. The +\fBarrow\fR is equivalent to \fB-->\fR\&. +.TP +\fBblock\fR \fIscript\fR \fIattr\fR\&.\&.\&. +A closed element with the corresponding corners, i\&.e\&. the eight +directions of the compass rose, and "center"\&. +The main effect is the aggregration of all elements created by the +\fIscript\fR into one element\&. +This also means that while the elements created by the script are +visible in the element history while the script is executing, +afterward the history contains only the block itself, and not the +elements it is composed of\&. +.sp +The script has access to the current state of all variables in the +language context\&. +Any changes to the variables will be reverted after execution of the +block\&. +However, also, any variables set in the script will be exported as +corners of the element, allowing users to define their own named +locations in the block\&. +.sp +Regarding the layout mechanism any changes made by the script are +reverted after the element is done\&. +In other words, a block is an implicit \fBgroup\fR\&. +.sp +Blocks handle all attributes, propgating their settings into the +script as the default values active during script execution\&. +.TP +\fBbox\fR \fIattr\fR\&.\&.\&. +IMAGE: figure-02-box +A closed element with the corresponding corners, i\&.e\&. the eight +directions of the compass rose, and "center"\&. +It handles the attributes +.RS +.TP +\fBanchor\fR \fIname\fR +.TP +\fBljust\fR +.TP +\fBrjust\fR +.TP +\fBabove\fR +.TP +\fBbelow\fR +IMAGE: figure-22-text-anchoring-3 +Specifies the anchor of the text which is to be placed at the +element's center, by name\&. I\&.e\&. this attribute defines the text's +position relative to the element's center\&. +The value is ignored if no text was specified for the element\&. +If not specified the system falls back to the value taken from the +language variable \fBanchor\fR, which itself defaults to +\fBcenter\fR\&. +The legal values are all those accepted by +\fITk_GetAnchor\fR [http://www\&.tcl\&.tk/man/tcl8\&.5/TkLib/GetAnchor\&.htm]\&. +The commands without arguments are all shorthands with the anchor +implied\&. Note that they do not combine, only the last is used\&. For +comined directions the main attribute command, \fBanchor\fR has to be +used\&. +.RS +.TP +\fBljust\fR +"anchor west" +.TP +\fBrjust\fR +"anchor east" +.TP +\fBabove\fR +"anchor south" +.TP +\fBbelow\fR +"anchor north" +.RE +.TP +\fBat\fR \fIlocation\fR +Specifies the location of the element's corner named by the attribute +\fBwith\fR\&. +Defaults to the current location as maintained by the layouting +system\&. +.TP +\fBcolor\fR \fIspec\fR +IMAGE: figure-21-style-colors +Specifies the color used to draw the lines of the element\&. +If not specified the system falls back to the value taken from the +language variable \fBlinecolor\fR, which itself defaults to \fBblack\fR\&. +.TP +\fBfillcolor\fR \fIspec\fR +IMAGE: figure-21-style-colors +Specifies the color used to draw the inside of the element\&. +If not specified the system falls back to the value taken from the +language variable \fBfillcolor\fR, which itself defaults to the empty +string, signaling "no filling"\&. +.TP +\fBheight\fR \fIlength\fR +.TP +\fBht\fR \fIlength\fR +Specifies the height of the element\&. +If not specified the system falls back to the value taken from the +language variable \fBboxheight\fR, which itself defaults to the +pixel equivalent of \fB2 cm\fR\&. +.TP +\fBjustify\fR \fBleft\fR|\fBcenter\fR|\fBright\fR +Specifies how multi-line text associated with the element is +positioned within its box\&. +The value is ignored if no text was specified for the element\&. +If not specified the system falls back to the value taken from the +language variable \fBjustify\fR, which itself defaults to +\fBleft\fR\&. +The legal values are \fBleft\fR, \fBright\fR, and \fBcenter\fR\&. +.TP +\fBslant\fR \fIangle\fR +Specifies the angle by which the \fBbox\fR element is slanted, in +degrees\&. +If not specified the system falls back to the value taken from the +language variable \fBslant\fR, which itself defaults to \fB90\fR, +i\&.e\&. vertical, no slant\&. +0 degrees is slanting straight east, pointing to the right\&. +90 degrees is slanting to the north, pointing straight up\&. +.TP +\fBstroke\fR \fIwidth\fR +IMAGE: figure-20-style-stroke +Specifies the width of the lines drawn for the the element, in pixels\&. +If not specified the system falls back to the value taken from the +language variable \fBlinewidth\fR, which itself defaults to \fB1\fR\&. +.TP +\fBstyle\fR \fIspec\fR +IMAGE: figure-18-style-dash +Specifies the style used to draw the lines of the element\&. +If not specified the system falls back to the value taken from the +language variable \fBlinestyle\fR, which itself defaults to +\fBsolid\fR lines\&. +The legal values are all those accepted by +\fITk_GetDash\fR [http://www\&.tcl\&.tk/man/tcl8\&.5/TkLib/GetDash\&.htm], +and additionally all which are listed below: +.RS +.TP +\fBsolid\fR, empty string +Draw solid line\&. +.TP +\fBdash\fR, \fBdashed\fR, \fB-\fR +Draw a dashed line\&. +.TP +\fBdot\fR, \fBdotted\fR, \fB\&.\fR +Draw a dotted line\&. +.TP +\fBdash-dot\fR, \fB-\&.\fR +Draw a dash-dotted line +.TP +\fBdash-dot-dot\fR, \fB-\&.\&.\fR +Draw a dash-dot-dotted line\&. +.RE +.IP +Note that the values "solid", "dot(ted)", "dash(ed)", "dash-dot", and +"dash-dot-dot" are all accepted as shorthands for the \fBstyle\fR +command using them as argument\&. +.TP +\fBtext\fR \fIstring\fR +Specifies the text to associate with the element\&. +Defaults to nothing\&. +When specified multiple times the actually shown text is the +concatenation of the individual strings, vertically stacked, with the +first string specified being the topmost element\&. +.TP +\fBtextcolor\fR \fIspec\fR +Specifies the color used to draw the text of an element with\&. +Ignored if there is no text\&. +If not specified the system falls back to the value taken from the +language variable \fBtextcolor\fR, which itself defaults to +\fBblack\fR\&. +.TP +\fBtextfont\fR \fIspec\fR +Specifies the font used to draw the text of an element with\&. +Ignored if there is no text\&. +If not specified the system falls back to the value taken from the +language variable \fBtextfont\fR, which itself defaults to +\fBHelvetica 12pt\fR\&. +.TP +\fBwidth\fR \fIlength\fR +.TP +\fBwid\fR \fIlength\fR +Specifies the width of the element\&. +If not specified the system falls back to the value taken from the +language variable \fBboxwidth\fR, which itself defaults to the pixel +equivalent of \fB2 cm\fR\&. +.TP +\fBwith\fR \fIcorner\fR +Specifies the corner of the element to place at the location given by +the attribute \fBat\fR\&. +Defaults to the current corner as maintained by the layouting system, +except if the value for \fBat\fR was specified by the user\&. In that +case it defaults to \fBcenter\fR\&. +.RE +.TP +\fBcircle\fR \fIattr\fR\&.\&.\&. +.TP +\fBO\fR \fIattr\fR\&.\&.\&. +IMAGE: figure-02-circle +A closed element with the corresponding corners, i\&.e\&. the eight +directions of the compass rose, and "center"\&. +It handles the attributes +.RS +.TP +\fBanchor\fR \fIname\fR +.TP +\fBljust\fR +.TP +\fBrjust\fR +.TP +\fBabove\fR +.TP +\fBbelow\fR +IMAGE: figure-22-text-anchoring-3 +Specifies the anchor of the text which is to be placed at the +element's center, by name\&. I\&.e\&. this attribute defines the text's +position relative to the element's center\&. +The value is ignored if no text was specified for the element\&. +If not specified the system falls back to the value taken from the +language variable \fBanchor\fR, which itself defaults to +\fBcenter\fR\&. +The legal values are all those accepted by +\fITk_GetAnchor\fR [http://www\&.tcl\&.tk/man/tcl8\&.5/TkLib/GetAnchor\&.htm]\&. +The commands without arguments are all shorthands with the anchor +implied\&. Note that they do not combine, only the last is used\&. For +comined directions the main attribute command, \fBanchor\fR has to be +used\&. +.RS +.TP +\fBljust\fR +"anchor west" +.TP +\fBrjust\fR +"anchor east" +.TP +\fBabove\fR +"anchor south" +.TP +\fBbelow\fR +"anchor north" +.RE +.TP +\fBat\fR \fIlocation\fR +Specifies the location of the element's corner named by the attribute +\fBwith\fR\&. +Defaults to the current location as maintained by the layouting +system\&. +.TP +\fBcolor\fR \fIspec\fR +IMAGE: figure-21-style-colors +Specifies the color used to draw the lines of the element\&. +If not specified the system falls back to the value taken from the +language variable \fBlinecolor\fR, which itself defaults to \fBblack\fR\&. +.TP +\fBdiameter\fR \fIlength\fR +.TP +\fBdiam\fR \fIlength\fR +Specifies the diameter of the \fBcircle\fR element, as an alternative +way to specify its \fBradius\fR\&. +Effective if and only if the radius was not specified\&. I\&.e\&. if both +diameter and radius are specified then the radius infomration has +precendence\&. +This attribute has no default, because the defaults are taken from the +radius\&. +.TP +\fBfillcolor\fR \fIspec\fR +IMAGE: figure-21-style-colors +Specifies the color used to draw the inside of the element\&. +If not specified the system falls back to the value taken from the +language variable \fBfillcolor\fR, which itself defaults to the empty +string, signaling "no filling"\&. +.TP +\fBjustify\fR \fBleft\fR|\fBcenter\fR|\fBright\fR +Specifies how multi-line text associated with the element is +positioned within its box\&. +The value is ignored if no text was specified for the element\&. +If not specified the system falls back to the value taken from the +language variable \fBjustify\fR, which itself defaults to +\fBleft\fR\&. +The legal values are \fBleft\fR, \fBright\fR, and \fBcenter\fR\&. +.TP +\fBradius\fR \fIlength\fR +.TP +\fBrad\fR \fIlength\fR +Specifies the radius of the \fBcircle\fR element\&. +If not specified the system falls back to the value taken from the +language variable \fBcircleradius\fR, which itself defaults to the +pixel equivalent of \fB1 cm\fR\&. +.TP +\fBstroke\fR \fIwidth\fR +IMAGE: figure-20-style-stroke +Specifies the width of the lines drawn for the the element, in pixels\&. +If not specified the system falls back to the value taken from the +language variable \fBlinewidth\fR, which itself defaults to \fB1\fR\&. +.TP +\fBstyle\fR \fIspec\fR +IMAGE: figure-18-style-dash +Specifies the style used to draw the lines of the element\&. +If not specified the system falls back to the value taken from the +language variable \fBlinestyle\fR, which itself defaults to +\fBsolid\fR lines\&. +The legal values are all those accepted by +\fITk_GetDash\fR [http://www\&.tcl\&.tk/man/tcl8\&.5/TkLib/GetDash\&.htm], +and additionally all which are listed below: +.RS +.TP +\fBsolid\fR, empty string +Draw solid line\&. +.TP +\fBdash\fR, \fBdashed\fR, \fB-\fR +Draw a dashed line\&. +.TP +\fBdot\fR, \fBdotted\fR, \fB\&.\fR +Draw a dotted line\&. +.TP +\fBdash-dot\fR, \fB-\&.\fR +Draw a dash-dotted line +.TP +\fBdash-dot-dot\fR, \fB-\&.\&.\fR +Draw a dash-dot-dotted line\&. +.RE +.IP +Note that the values "solid", "dot(ted)", "dash(ed)", "dash-dot", and +"dash-dot-dot" are all accepted as shorthands for the \fBstyle\fR +command using them as argument\&. +.TP +\fBtext\fR \fIstring\fR +Specifies the text to associate with the element\&. +Defaults to nothing\&. +When specified multiple times the actually shown text is the +concatenation of the individual strings, vertically stacked, with the +first string specified being the topmost element\&. +.TP +\fBtextcolor\fR \fIspec\fR +Specifies the color used to draw the text of an element with\&. +Ignored if there is no text\&. +If not specified the system falls back to the value taken from the +language variable \fBtextcolor\fR, which itself defaults to +\fBblack\fR\&. +.TP +\fBtextfont\fR \fIspec\fR +Specifies the font used to draw the text of an element with\&. +Ignored if there is no text\&. +If not specified the system falls back to the value taken from the +language variable \fBtextfont\fR, which itself defaults to +\fBHelvetica 12pt\fR\&. +.TP +\fBwith\fR \fIcorner\fR +Specifies the corner of the element to place at the location given by +the attribute \fBat\fR\&. +Defaults to the current corner as maintained by the layouting system, +except if the value for \fBat\fR was specified by the user\&. In that +case it defaults to \fBcenter\fR\&. +.RE +.TP +\fBdiamond\fR \fIattr\fR\&.\&.\&. +.TP +\fB<>\fR \fIattr\fR\&.\&.\&. +IMAGE: figure-02-diamond +A closed element with the corresponding corners, i\&.e\&. the eight +directions of the compass rose, and "center"\&. +It handles the attributes +.RS +.TP +\fBanchor\fR \fIname\fR +.TP +\fBljust\fR +.TP +\fBrjust\fR +.TP +\fBabove\fR +.TP +\fBbelow\fR +IMAGE: figure-22-text-anchoring-3 +Specifies the anchor of the text which is to be placed at the +element's center, by name\&. I\&.e\&. this attribute defines the text's +position relative to the element's center\&. +The value is ignored if no text was specified for the element\&. +If not specified the system falls back to the value taken from the +language variable \fBanchor\fR, which itself defaults to +\fBcenter\fR\&. +The legal values are all those accepted by +\fITk_GetAnchor\fR [http://www\&.tcl\&.tk/man/tcl8\&.5/TkLib/GetAnchor\&.htm]\&. +The commands without arguments are all shorthands with the anchor +implied\&. Note that they do not combine, only the last is used\&. For +comined directions the main attribute command, \fBanchor\fR has to be +used\&. +.RS +.TP +\fBljust\fR +"anchor west" +.TP +\fBrjust\fR +"anchor east" +.TP +\fBabove\fR +"anchor south" +.TP +\fBbelow\fR +"anchor north" +.RE +.TP +\fBaspect\fR \fInumber\fR +Specifies the aspect ratio, i\&.e ratio of width to height, of the +\fBdiamond\fR element\&. +The manner in which a default is calculated when not specified also +depends on the specifications of the attributes \fBwidth\fR and +\fBheight\fR, if any\&. +.sp +If both \fBwidth\fR, and \fBheight\fR are specified then any +specification of \fBaspect\fR is ignored, as it is implicitly defined +in the width and height as well, and this takes precedence\&. A missing +specification is ignored in that case well, i\&.e\&. no defaults are +required\&. +.sp +If the \fBaspect\fR is specified, and one of the attributes +\fBwidth\fR or \fBheight\fR, then the missing attribute is calculated +from the two which are specified\&. No defaults are required for these +cases either\&. +.sp +If only one of the attributes \fBwidth\fR or \fBheight\fR is specified +then the system uses a fallback for the \fBaspect\fR, the value taken +from the language variable \fBdiamondaspect\fR, which itselfs defaults +to \fB2\fR\&. +.sp +If none of of the attributes \fBwidth\fR or \fBheight\fR is specified +then the system uses a fallback for the \fBwidth\fR, the value taken +from the language variable \fBboxwidth\fR, which itselfs defaults to +the pixel equivalent of \fB2 cm\fR\&. For the aspect it uses either +the user-specified value or the default taken as described in the +previous paragraph\&. +.TP +\fBat\fR \fIlocation\fR +Specifies the location of the element's corner named by the attribute +\fBwith\fR\&. +Defaults to the current location as maintained by the layouting +system\&. +.TP +\fBcolor\fR \fIspec\fR +IMAGE: figure-21-style-colors +Specifies the color used to draw the lines of the element\&. +If not specified the system falls back to the value taken from the +language variable \fBlinecolor\fR, which itself defaults to \fBblack\fR\&. +.TP +\fBfillcolor\fR \fIspec\fR +IMAGE: figure-21-style-colors +Specifies the color used to draw the inside of the element\&. +If not specified the system falls back to the value taken from the +language variable \fBfillcolor\fR, which itself defaults to the empty +string, signaling "no filling"\&. +.TP +\fBheight\fR \fIlength\fR +Specifies the height of the \fBdiamond\fR element\&. +The manner in which a default is calculated when not specified also +depends on the specifications of the attributes \fBaspect\fR and +\fBwidth\fR, if any\&. +.sp +If both \fBwidth\fR, and \fBheight\fR are specified then any +specification of \fBaspect\fR is ignored, as it is implicitly defined +in the width and height as well, and this takes precedence\&. A missing +specification is ignored in that case well, i\&.e\&. no defaults are +required\&. +.sp +If the \fBaspect\fR is specified, and one of the attributes +\fBwidth\fR or \fBheight\fR, then the missing attribute is calculated +from the two which are specified\&. No defaults are required for these +cases either\&. +.sp +If only one of the attributes \fBwidth\fR or \fBheight\fR is specified +then the system uses a fallback for the \fBaspect\fR, the value taken +from the language variable \fBdiamondaspect\fR, which itselfs defaults +to \fB2\fR\&. +.sp +If none of of the attributes \fBwidth\fR or \fBheight\fR is specified +then the system uses a fallback for the \fBwidth\fR, the value taken +from the language variable \fBboxwidth\fR, which itselfs defaults to +the pixel equivalent of \fB2 cm\fR\&. For the aspect it uses either +the user-specified value or the default taken as described in the +previous paragraph\&. +.TP +\fBjustify\fR \fBleft\fR|\fBcenter\fR|\fBright\fR +Specifies how multi-line text associated with the element is +positioned within its box\&. +The value is ignored if no text was specified for the element\&. +If not specified the system falls back to the value taken from the +language variable \fBjustify\fR, which itself defaults to +\fBleft\fR\&. +The legal values are \fBleft\fR, \fBright\fR, and \fBcenter\fR\&. +.TP +\fBstroke\fR \fIwidth\fR +IMAGE: figure-20-style-stroke +Specifies the width of the lines drawn for the the element, in pixels\&. +If not specified the system falls back to the value taken from the +language variable \fBlinewidth\fR, which itself defaults to \fB1\fR\&. +.TP +\fBstyle\fR \fIspec\fR +IMAGE: figure-18-style-dash +Specifies the style used to draw the lines of the element\&. +If not specified the system falls back to the value taken from the +language variable \fBlinestyle\fR, which itself defaults to +\fBsolid\fR lines\&. +The legal values are all those accepted by +\fITk_GetDash\fR [http://www\&.tcl\&.tk/man/tcl8\&.5/TkLib/GetDash\&.htm], +and additionally all which are listed below: +.RS +.TP +\fBsolid\fR, empty string +Draw solid line\&. +.TP +\fBdash\fR, \fBdashed\fR, \fB-\fR +Draw a dashed line\&. +.TP +\fBdot\fR, \fBdotted\fR, \fB\&.\fR +Draw a dotted line\&. +.TP +\fBdash-dot\fR, \fB-\&.\fR +Draw a dash-dotted line +.TP +\fBdash-dot-dot\fR, \fB-\&.\&.\fR +Draw a dash-dot-dotted line\&. +.RE +.IP +Note that the values "solid", "dot(ted)", "dash(ed)", "dash-dot", and +"dash-dot-dot" are all accepted as shorthands for the \fBstyle\fR +command using them as argument\&. +.TP +\fBtext\fR \fIstring\fR +Specifies the text to associate with the element\&. +Defaults to nothing\&. +When specified multiple times the actually shown text is the +concatenation of the individual strings, vertically stacked, with the +first string specified being the topmost element\&. +.TP +\fBtextcolor\fR \fIspec\fR +Specifies the color used to draw the text of an element with\&. +Ignored if there is no text\&. +If not specified the system falls back to the value taken from the +language variable \fBtextcolor\fR, which itself defaults to +\fBblack\fR\&. +.TP +\fBtextfont\fR \fIspec\fR +Specifies the font used to draw the text of an element with\&. +Ignored if there is no text\&. +If not specified the system falls back to the value taken from the +language variable \fBtextfont\fR, which itself defaults to +\fBHelvetica 12pt\fR\&. +.TP +\fBwidth\fR \fIlength\fR +Specifies the width of the \fBdiamond\fR element\&. +The manner in which a default is calculated when not specified also +depends on the specifications of the attributes \fBaspect\fR and +\fBheight\fR, if any\&. +.sp +If both \fBwidth\fR, and \fBheight\fR are specified then any +specification of \fBaspect\fR is ignored, as it is implicitly defined +in the width and height as well, and this takes precedence\&. A missing +specification is ignored in that case well, i\&.e\&. no defaults are +required\&. +.sp +If the \fBaspect\fR is specified, and one of the attributes +\fBwidth\fR or \fBheight\fR, then the missing attribute is calculated +from the two which are specified\&. No defaults are required for these +cases either\&. +.sp +If only one of the attributes \fBwidth\fR or \fBheight\fR is specified +then the system uses a fallback for the \fBaspect\fR, the value taken +from the language variable \fBdiamondaspect\fR, which itselfs defaults +to \fB2\fR\&. +.sp +If none of of the attributes \fBwidth\fR or \fBheight\fR is specified +then the system uses a fallback for the \fBwidth\fR, the value taken +from the language variable \fBboxwidth\fR, which itselfs defaults to +the pixel equivalent of \fB2 cm\fR\&. For the aspect it uses either +the user-specified value or the default taken as described in the +previous paragraph\&. +.TP +\fBwith\fR \fIcorner\fR +Specifies the corner of the element to place at the location given by +the attribute \fBat\fR\&. +Defaults to the current corner as maintained by the layouting system, +except if the value for \fBat\fR was specified by the user\&. In that +case it defaults to \fBcenter\fR\&. +.RE +.TP +\fBdrum\fR \fIattr\fR\&.\&.\&. +IMAGE: figure-02-drum +A closed element with the corresponding corners, i\&.e\&. the eight +directions of the compass rose, and "center"\&. +It handles the attributes +.RS +.TP +\fBanchor\fR \fIname\fR +.TP +\fBljust\fR +.TP +\fBrjust\fR +.TP +\fBabove\fR +.TP +\fBbelow\fR +IMAGE: figure-22-text-anchoring-3 +Specifies the anchor of the text which is to be placed at the +element's center, by name\&. I\&.e\&. this attribute defines the text's +position relative to the element's center\&. +The value is ignored if no text was specified for the element\&. +If not specified the system falls back to the value taken from the +language variable \fBanchor\fR, which itself defaults to +\fBcenter\fR\&. +The legal values are all those accepted by +\fITk_GetAnchor\fR [http://www\&.tcl\&.tk/man/tcl8\&.5/TkLib/GetAnchor\&.htm]\&. +The commands without arguments are all shorthands with the anchor +implied\&. Note that they do not combine, only the last is used\&. For +comined directions the main attribute command, \fBanchor\fR has to be +used\&. +.RS +.TP +\fBljust\fR +"anchor west" +.TP +\fBrjust\fR +"anchor east" +.TP +\fBabove\fR +"anchor south" +.TP +\fBbelow\fR +"anchor north" +.RE +.TP +\fBaspect\fR \fInumber\fR +Specifies the aspect ratio, i\&.e ratio of width to height, of the +ellipses which are used to draw the top and bottom of the \fBdrum\fR +element\&. +If not specified the system falls back to the value taken from the +language variable \fBdrumaspect\fR, which itself defaults to +\fB0\&.35\fR\&. +.TP +\fBat\fR \fIlocation\fR +Specifies the location of the element's corner named by the attribute +\fBwith\fR\&. +Defaults to the current location as maintained by the layouting +system\&. +.TP +\fBcolor\fR \fIspec\fR +IMAGE: figure-21-style-colors +Specifies the color used to draw the lines of the element\&. +If not specified the system falls back to the value taken from the +language variable \fBlinecolor\fR, which itself defaults to \fBblack\fR\&. +.TP +\fBfillcolor\fR \fIspec\fR +IMAGE: figure-21-style-colors +Specifies the color used to draw the inside of the element\&. +If not specified the system falls back to the value taken from the +language variable \fBfillcolor\fR, which itself defaults to the empty +string, signaling "no filling"\&. +.TP +\fBheight\fR \fIlength\fR +.TP +\fBht\fR \fIlength\fR +Specifies the height of the element\&. +If not specified the system falls back to the value taken from the +language variable \fBboxheight\fR, which itself defaults to the +pixel equivalent of \fB2 cm\fR\&. +.TP +\fBjustify\fR \fBleft\fR|\fBcenter\fR|\fBright\fR +Specifies how multi-line text associated with the element is +positioned within its box\&. +The value is ignored if no text was specified for the element\&. +If not specified the system falls back to the value taken from the +language variable \fBjustify\fR, which itself defaults to +\fBleft\fR\&. +The legal values are \fBleft\fR, \fBright\fR, and \fBcenter\fR\&. +.TP +\fBstroke\fR \fIwidth\fR +IMAGE: figure-20-style-stroke +Specifies the width of the lines drawn for the the element, in pixels\&. +If not specified the system falls back to the value taken from the +language variable \fBlinewidth\fR, which itself defaults to \fB1\fR\&. +.TP +\fBstyle\fR \fIspec\fR +IMAGE: figure-18-style-dash +Specifies the style used to draw the lines of the element\&. +If not specified the system falls back to the value taken from the +language variable \fBlinestyle\fR, which itself defaults to +\fBsolid\fR lines\&. +The legal values are all those accepted by +\fITk_GetDash\fR [http://www\&.tcl\&.tk/man/tcl8\&.5/TkLib/GetDash\&.htm], +and additionally all which are listed below: +.RS +.TP +\fBsolid\fR, empty string +Draw solid line\&. +.TP +\fBdash\fR, \fBdashed\fR, \fB-\fR +Draw a dashed line\&. +.TP +\fBdot\fR, \fBdotted\fR, \fB\&.\fR +Draw a dotted line\&. +.TP +\fBdash-dot\fR, \fB-\&.\fR +Draw a dash-dotted line +.TP +\fBdash-dot-dot\fR, \fB-\&.\&.\fR +Draw a dash-dot-dotted line\&. +.RE +.IP +Note that the values "solid", "dot(ted)", "dash(ed)", "dash-dot", and +"dash-dot-dot" are all accepted as shorthands for the \fBstyle\fR +command using them as argument\&. +.TP +\fBtext\fR \fIstring\fR +Specifies the text to associate with the element\&. +Defaults to nothing\&. +When specified multiple times the actually shown text is the +concatenation of the individual strings, vertically stacked, with the +first string specified being the topmost element\&. +.TP +\fBtextcolor\fR \fIspec\fR +Specifies the color used to draw the text of an element with\&. +Ignored if there is no text\&. +If not specified the system falls back to the value taken from the +language variable \fBtextcolor\fR, which itself defaults to +\fBblack\fR\&. +.TP +\fBtextfont\fR \fIspec\fR +Specifies the font used to draw the text of an element with\&. +Ignored if there is no text\&. +If not specified the system falls back to the value taken from the +language variable \fBtextfont\fR, which itself defaults to +\fBHelvetica 12pt\fR\&. +.TP +\fBwidth\fR \fIlength\fR +.TP +\fBwid\fR \fIlength\fR +Specifies the width of the element\&. +If not specified the system falls back to the value taken from the +language variable \fBboxwidth\fR, which itself defaults to the pixel +equivalent of \fB2 cm\fR\&. +.TP +\fBwith\fR \fIcorner\fR +Specifies the corner of the element to place at the location given by +the attribute \fBat\fR\&. +Defaults to the current corner as maintained by the layouting system, +except if the value for \fBat\fR was specified by the user\&. In that +case it defaults to \fBcenter\fR\&. +.RE +.TP +\fBellipse\fR \fIattr\fR\&.\&.\&. +IMAGE: figure-02-ellipse +A closed element with the corresponding corners, i\&.e\&. the eight +directions of the compass rose, and "center"\&. +It handles the attributes +.RS +.TP +\fBanchor\fR \fIname\fR +.TP +\fBljust\fR +.TP +\fBrjust\fR +.TP +\fBabove\fR +.TP +\fBbelow\fR +IMAGE: figure-22-text-anchoring-3 +Specifies the anchor of the text which is to be placed at the +element's center, by name\&. I\&.e\&. this attribute defines the text's +position relative to the element's center\&. +The value is ignored if no text was specified for the element\&. +If not specified the system falls back to the value taken from the +language variable \fBanchor\fR, which itself defaults to +\fBcenter\fR\&. +The legal values are all those accepted by +\fITk_GetAnchor\fR [http://www\&.tcl\&.tk/man/tcl8\&.5/TkLib/GetAnchor\&.htm]\&. +The commands without arguments are all shorthands with the anchor +implied\&. Note that they do not combine, only the last is used\&. For +comined directions the main attribute command, \fBanchor\fR has to be +used\&. +.RS +.TP +\fBljust\fR +"anchor west" +.TP +\fBrjust\fR +"anchor east" +.TP +\fBabove\fR +"anchor south" +.TP +\fBbelow\fR +"anchor north" +.RE +.TP +\fBat\fR \fIlocation\fR +Specifies the location of the element's corner named by the attribute +\fBwith\fR\&. +Defaults to the current location as maintained by the layouting +system\&. +.TP +\fBcolor\fR \fIspec\fR +IMAGE: figure-21-style-colors +Specifies the color used to draw the lines of the element\&. +If not specified the system falls back to the value taken from the +language variable \fBlinecolor\fR, which itself defaults to \fBblack\fR\&. +.TP +\fBfillcolor\fR \fIspec\fR +IMAGE: figure-21-style-colors +Specifies the color used to draw the inside of the element\&. +If not specified the system falls back to the value taken from the +language variable \fBfillcolor\fR, which itself defaults to the empty +string, signaling "no filling"\&. +.TP +\fBheight\fR \fIlength\fR +.TP +\fBht\fR \fIlength\fR +Specifies the height of the element\&. +If not specified the system falls back to the value taken from the +language variable \fBboxheight\fR, which itself defaults to the +pixel equivalent of \fB2 cm\fR\&. +.TP +\fBjustify\fR \fBleft\fR|\fBcenter\fR|\fBright\fR +Specifies how multi-line text associated with the element is +positioned within its box\&. +The value is ignored if no text was specified for the element\&. +If not specified the system falls back to the value taken from the +language variable \fBjustify\fR, which itself defaults to +\fBleft\fR\&. +The legal values are \fBleft\fR, \fBright\fR, and \fBcenter\fR\&. +.TP +\fBstroke\fR \fIwidth\fR +IMAGE: figure-20-style-stroke +Specifies the width of the lines drawn for the the element, in pixels\&. +If not specified the system falls back to the value taken from the +language variable \fBlinewidth\fR, which itself defaults to \fB1\fR\&. +.TP +\fBstyle\fR \fIspec\fR +IMAGE: figure-18-style-dash +Specifies the style used to draw the lines of the element\&. +If not specified the system falls back to the value taken from the +language variable \fBlinestyle\fR, which itself defaults to +\fBsolid\fR lines\&. +The legal values are all those accepted by +\fITk_GetDash\fR [http://www\&.tcl\&.tk/man/tcl8\&.5/TkLib/GetDash\&.htm], +and additionally all which are listed below: +.RS +.TP +\fBsolid\fR, empty string +Draw solid line\&. +.TP +\fBdash\fR, \fBdashed\fR, \fB-\fR +Draw a dashed line\&. +.TP +\fBdot\fR, \fBdotted\fR, \fB\&.\fR +Draw a dotted line\&. +.TP +\fBdash-dot\fR, \fB-\&.\fR +Draw a dash-dotted line +.TP +\fBdash-dot-dot\fR, \fB-\&.\&.\fR +Draw a dash-dot-dotted line\&. +.RE +.IP +Note that the values "solid", "dot(ted)", "dash(ed)", "dash-dot", and +"dash-dot-dot" are all accepted as shorthands for the \fBstyle\fR +command using them as argument\&. +.TP +\fBtext\fR \fIstring\fR +Specifies the text to associate with the element\&. +Defaults to nothing\&. +When specified multiple times the actually shown text is the +concatenation of the individual strings, vertically stacked, with the +first string specified being the topmost element\&. +.TP +\fBtextcolor\fR \fIspec\fR +Specifies the color used to draw the text of an element with\&. +Ignored if there is no text\&. +If not specified the system falls back to the value taken from the +language variable \fBtextcolor\fR, which itself defaults to +\fBblack\fR\&. +.TP +\fBtextfont\fR \fIspec\fR +Specifies the font used to draw the text of an element with\&. +Ignored if there is no text\&. +If not specified the system falls back to the value taken from the +language variable \fBtextfont\fR, which itself defaults to +\fBHelvetica 12pt\fR\&. +.TP +\fBwidth\fR \fIlength\fR +.TP +\fBwid\fR \fIlength\fR +Specifies the width of the element\&. +If not specified the system falls back to the value taken from the +language variable \fBboxwidth\fR, which itself defaults to the pixel +equivalent of \fB2 cm\fR\&. +.TP +\fBwith\fR \fIcorner\fR +Specifies the corner of the element to place at the location given by +the attribute \fBat\fR\&. +Defaults to the current corner as maintained by the layouting system, +except if the value for \fBat\fR was specified by the user\&. In that +case it defaults to \fBcenter\fR\&. +.RE +.TP +\fBline\fR \fIattr\fR\&.\&.\&. +.TP +\fB--\fR \fIattr\fR\&.\&.\&. +IMAGE: figure-02-line +An open element with the corresponding corners, i\&.e\&. "start", "end", +and "center"\&. +It handles the attributes +.RS +.TP +\fBanchor\fR \fIname\fR +.TP +\fBljust\fR +.TP +\fBrjust\fR +.TP +\fBabove\fR +.TP +\fBbelow\fR +IMAGE: figure-22-text-anchoring-3 +Specifies the anchor of the text which is to be placed at the +element's center, by name\&. I\&.e\&. this attribute defines the text's +position relative to the element's center\&. +The value is ignored if no text was specified for the element\&. +If not specified the system falls back to the value taken from the +language variable \fBanchor\fR, which itself defaults to +\fBcenter\fR\&. +The legal values are all those accepted by +\fITk_GetAnchor\fR [http://www\&.tcl\&.tk/man/tcl8\&.5/TkLib/GetAnchor\&.htm]\&. +The commands without arguments are all shorthands with the anchor +implied\&. Note that they do not combine, only the last is used\&. For +comined directions the main attribute command, \fBanchor\fR has to be +used\&. +.RS +.TP +\fBljust\fR +"anchor west" +.TP +\fBrjust\fR +"anchor east" +.TP +\fBabove\fR +"anchor south" +.TP +\fBbelow\fR +"anchor north" +.RE +.TP +\fBarrowhead\fR \fIspec\fR +IMAGE: figure-19-style-arrowheads +Specifies where to draw arrowheads on the \fBline\fR element, at the +beginning or end, at both ends, or none\&. +If not specified the system falls back to the value taken from the +language variable \fBarrowhead\fR, which itself defaults to +\fBnone\fR\&. +The legal values are +.RS +.TP +\fBnone\fR, \fB-\fR +Draw no arrowheads, at neither end of the line\&. +.TP +\fBstart\fR, \fBfirst\fR, \fB<-\fR +Draw an arrowhead at the beginning of the line, but not at its end\&. +.TP +\fBend\fR, \fBlast\fR, \fB->\fR +Draw an arrowhead at the end of the line, but not at its beginning\&. +.TP +\fBboth\fR, \fB<->\fR +Draw arrowheads at both ends of the line\&. +.RE +.IP +Note that the values "start", "end", "-", "->", "<-", and "<->" are +all accepted as shorthands for the \fBarrowhead\fR command using them +as argument\&. +.TP +\fBat\fR \fIlocation\fR +\fBLine\fR elements are normally positioned absolutely, using the +locations specified through the attributes \fBfrom\fR, \fBthen\fR, and +\fBto\fR\&. +If \fBat\fR is specified however then these positions are translated a +last time, moving the line's corner named by the attribute \fBwith\fR +to the location given by this attribute\&. +.TP +\fBchop\fR ?\fIlength\fR? +Specifies the length of the \fBline\fR element to remove from the +beginning and/or end\&. +Defaults to nothing\&. +If specified once the chopping applies to both beginning and end of +the line\&. +If specified twice or more the last two specifications are used, and +applied to beginning and end of the line, in this order\&. +Whenever the attribute is specified without an explicit length, the +system falls back to the value taken from the language variable +\fBcircleradius\fR, which itself defaults to the pixel equivalent of +\fB1 cm\fR +.TP +\fBcolor\fR \fIspec\fR +IMAGE: figure-21-style-colors +Specifies the color used to draw the lines of the element\&. +If not specified the system falls back to the value taken from the +language variable \fBlinecolor\fR, which itself defaults to \fBblack\fR\&. +.TP +\fBfillcolor\fR \fIspec\fR +IMAGE: figure-21-style-colors +Specifies the color used to draw the inside of the element\&. +If not specified the system falls back to the value taken from the +language variable \fBfillcolor\fR, which itself defaults to the empty +string, signaling "no filling"\&. +.TP +\fBfrom\fR \fIlocation\fR +Specifies the location where the \fBline\fR element begins\&. +Defaults to the current location as maintained by the layouting +system\&. +.TP +\fBjustify\fR \fBleft\fR|\fBcenter\fR|\fBright\fR +Specifies how multi-line text associated with the element is +positioned within its box\&. +The value is ignored if no text was specified for the element\&. +If not specified the system falls back to the value taken from the +language variable \fBjustify\fR, which itself defaults to +\fBleft\fR\&. +The legal values are \fBleft\fR, \fBright\fR, and \fBcenter\fR\&. +.TP +\fBnoturn\fR +Specifies that the direction of \fBline\fR element at its end is not +propagated to the layout management\&. +If not specified the direction of the line becomes the new direction +the layout\&. +.TP +\fBsmooth\fR +Specifies the use of bezier splines for the \fBline\fR element\&. +If not specified lines are drawn exactly through the specified +waypoints, without any smooth curves\&. +.TP +\fBstroke\fR \fIwidth\fR +IMAGE: figure-20-style-stroke +Specifies the width of the lines drawn for the the element, in pixels\&. +If not specified the system falls back to the value taken from the +language variable \fBlinewidth\fR, which itself defaults to \fB1\fR\&. +.TP +\fBstyle\fR \fIspec\fR +IMAGE: figure-18-style-dash +Specifies the style used to draw the lines of the element\&. +If not specified the system falls back to the value taken from the +language variable \fBlinestyle\fR, which itself defaults to +\fBsolid\fR lines\&. +The legal values are all those accepted by +\fITk_GetDash\fR [http://www\&.tcl\&.tk/man/tcl8\&.5/TkLib/GetDash\&.htm], +and additionally all which are listed below: +.RS +.TP +\fBsolid\fR, empty string +Draw solid line\&. +.TP +\fBdash\fR, \fBdashed\fR, \fB-\fR +Draw a dashed line\&. +.TP +\fBdot\fR, \fBdotted\fR, \fB\&.\fR +Draw a dotted line\&. +.TP +\fBdash-dot\fR, \fB-\&.\fR +Draw a dash-dotted line +.TP +\fBdash-dot-dot\fR, \fB-\&.\&.\fR +Draw a dash-dot-dotted line\&. +.RE +.IP +Note that the values "solid", "dot(ted)", "dash(ed)", "dash-dot", and +"dash-dot-dot" are all accepted as shorthands for the \fBstyle\fR +command using them as argument\&. +.TP +\fBtext\fR \fIstring\fR +Specifies the text to associate with the element\&. +Defaults to nothing\&. +When specified multiple times the actually shown text is the +concatenation of the individual strings, vertically stacked, with the +first string specified being the topmost element\&. +.TP +\fBtextcolor\fR \fIspec\fR +Specifies the color used to draw the text of an element with\&. +Ignored if there is no text\&. +If not specified the system falls back to the value taken from the +language variable \fBtextcolor\fR, which itself defaults to +\fBblack\fR\&. +.TP +\fBtextfont\fR \fIspec\fR +Specifies the font used to draw the text of an element with\&. +Ignored if there is no text\&. +If not specified the system falls back to the value taken from the +language variable \fBtextfont\fR, which itself defaults to +\fBHelvetica 12pt\fR\&. +.TP +\fBthen\fR \fIlocation\fR +.TP +\fBthen\fR ( ?\fIlength\fR?)\&.\&.\&. +.TP +( ?\fIlength\fR?)\&.\&.\&. +This attribute specifies an intermediate location the \fBline\fR +element has to go through\&. +It can be specified multiple times, with each use adding one +additional location to the series which the line will go +through\&. These location will be traversed in the order they were +specified\&. +.sp +The location can be given explicitly, or as a series of directions +with distances\&. In the latter case the names of all known directions +are accepted for the direction part\&. +If no distance is specified for a direction the system falls back to +the value taken from the language variable \fBmovelength\fR, which +itself defaults to the pixel equivalent of \fB2 cm\fR\&. +The whole set of direction,distance pairs is treated as a series of +translations which are added up to provide the final translation +specifying the intermediate point (relative to the preceding point)\&. +.sp +The last named direction is propagated to the layout system as the +direction to follow\&. The use of \fBnoturn\fR is not able to overide +this behaviour\&. +.sp +At last, the names of the registered directions also serve as +attribute commands, with an implicit attribute \fBthen\fR in front of +them\&. +.sp +If no intermediate or last location is specified for the line the +system falls back to a point \fBmovelength\fR pixels away from the +starting location, in the current direction as maintained by the +layouting system +.TP +\fBto\fR \fIlocation\fR +Specifies the location where the \fBline\fR element ends\&. +This attribute has no default\&. The default is handled by the attribute +\fBthen\fR, which makes it appear as if \fBto\fR has a default when +not specified\&. +.TP +\fBwith\fR \fIcorner\fR +\fBLine\fR elements are normally positioned absolutely, using the +locations specified through the attributes \fBfrom\fR, \fBthen\fR, and +\fBto\fR\&. +If \fBat\fR is specified however then these positions are translated a +last time, moving the line's corner named by the attribute \fBwith\fR +to the location given by this attribute\&. +This means that \fIwith\fR is effective if and only if the attribute +\fBat\fR was specified as well for the line\&. +.RE +.TP +\fBmove\fR \fIattr\fR +An open element with the corresponding corners, i\&.e\&. "start", "end", +and "center"\&. +A \fBmove\fR element is in essence an invisible \fBline\fR\&. +While the main effect we are interested in is the change it makes to +the layout system, it is an actual element, i\&.e\&. it has the same +corners as an ordinary line, and shows up in the history as well, +allowing future references to all the places it touched\&. +It handles the same attibutes as \fBline\fR elements\&. +.TP +\fBspline\fR \fIattr\fR\&.\&.\&. +IMAGE: figure-02-spline +An alias for the \fBline\fR element (see above), with the attribute +\fBsmooth\fR preset\&. +.TP +\fBtext\fR \fIattr\fR\&.\&.\&. +IMAGE: figure-02-text +A closed element with the corresponding corners, i\&.e\&. the eight +directions of the compass rose, and "center"\&. +It handles the attributes +.RS +.TP +\fBanchor\fR \fIname\fR +.TP +\fBljust\fR +.TP +\fBrjust\fR +.TP +\fBabove\fR +.TP +\fBbelow\fR +IMAGE: figure-22-text-anchoring-3 +Specifies the anchor of the text which is to be placed at the +element's center, by name\&. I\&.e\&. this attribute defines the text's +position relative to the element's center\&. +The value is ignored if no text was specified for the element\&. +If not specified the system falls back to the value taken from the +language variable \fBanchor\fR, which itself defaults to +\fBcenter\fR\&. +The legal values are all those accepted by +\fITk_GetAnchor\fR [http://www\&.tcl\&.tk/man/tcl8\&.5/TkLib/GetAnchor\&.htm]\&. +The commands without arguments are all shorthands with the anchor +implied\&. Note that they do not combine, only the last is used\&. For +comined directions the main attribute command, \fBanchor\fR has to be +used\&. +.RS +.TP +\fBljust\fR +"anchor west" +.TP +\fBrjust\fR +"anchor east" +.TP +\fBabove\fR +"anchor south" +.TP +\fBbelow\fR +"anchor north" +.RE +.TP +\fBat\fR \fIlocation\fR +Specifies the location of the element's corner named by the attribute +\fBwith\fR\&. +Defaults to the current location as maintained by the layouting +system\&. +.TP +\fBheight\fR \fIlength\fR +Specifies the height of the \fBtext\fR element\&. +Defaults to the natural height of its text\&. +.TP +\fBjustify\fR \fBleft\fR|\fBcenter\fR|\fBright\fR +Specifies how multi-line text associated with the element is +positioned within its box\&. +The value is ignored if no text was specified for the element\&. +If not specified the system falls back to the value taken from the +language variable \fBjustify\fR, which itself defaults to +\fBleft\fR\&. +The legal values are \fBleft\fR, \fBright\fR, and \fBcenter\fR\&. +.TP +\fBtext\fR \fIstring\fR +Specifies the text to associate with the element\&. +Defaults to nothing\&. +When specified multiple times the actually shown text is the +concatenation of the individual strings, vertically stacked, with the +first string specified being the topmost element\&. +.TP +\fBtextcolor\fR \fIspec\fR +Specifies the color used to draw the text of an element with\&. +Ignored if there is no text\&. +If not specified the system falls back to the value taken from the +language variable \fBtextcolor\fR, which itself defaults to +\fBblack\fR\&. +.TP +\fBtextfont\fR \fIspec\fR +Specifies the font used to draw the text of an element with\&. +Ignored if there is no text\&. +If not specified the system falls back to the value taken from the +language variable \fBtextfont\fR, which itself defaults to +\fBHelvetica 12pt\fR\&. +.TP +\fBwidth\fR \fIlength\fR +Specifies the width of the \fBtext\fR element\&. +Defaults to the natural width of its text\&. +.TP +\fBwith\fR \fIcorner\fR +Specifies the corner of the element to place at the location given by +the attribute \fBat\fR\&. +Defaults to the current corner as maintained by the layouting system, +except if the value for \fBat\fR was specified by the user\&. In that +case it defaults to \fBcenter\fR\&. +.RE +.PP +.SS ATTRIBUTES +The set of all attributes supported by all the element commands is +shown below\&. +While we speak of them as commands, and provide a syntax, they are not +truly available as actual commands, but only as part of the arguments +for an element command\&. +.PP +Note that some of the attribute names are overloaded, i\&.e\&. have +multiple, different, definitions\&. During processing of attributes for +an element the actual definition used is chosen based on the type of +the element the processing is for\&. +.PP +Further, as a catch-all clause, any attribute which could not be +processed according to the definitions below will be treated as the +argument of an implicit \fBtext\fR attribute\&. +.TP +\fBanchor\fR \fIname\fR +.TP +\fBljust\fR +.TP +\fBrjust\fR +.TP +\fBabove\fR +.TP +\fBbelow\fR +IMAGE: figure-22-text-anchoring-3 +Specifies the anchor of the text which is to be placed at the +element's center, by name\&. I\&.e\&. this attribute defines the text's +position relative to the element's center\&. +The value is ignored if no text was specified for the element\&. +If not specified the system falls back to the value taken from the +language variable \fBanchor\fR, which itself defaults to +\fBcenter\fR\&. +The legal values are all those accepted by +\fITk_GetAnchor\fR [http://www\&.tcl\&.tk/man/tcl8\&.5/TkLib/GetAnchor\&.htm]\&. +The commands without arguments are all shorthands with the anchor +implied\&. Note that they do not combine, only the last is used\&. For +comined directions the main attribute command, \fBanchor\fR has to be +used\&. +.RS +.TP +\fBljust\fR +"anchor west" +.TP +\fBrjust\fR +"anchor east" +.TP +\fBabove\fR +"anchor south" +.TP +\fBbelow\fR +"anchor north" +.RE +.TP +\fBarrowhead\fR \fIspec\fR +IMAGE: figure-19-style-arrowheads +Specifies where to draw arrowheads on the \fBline\fR element, at the +beginning or end, at both ends, or none\&. +If not specified the system falls back to the value taken from the +language variable \fBarrowhead\fR, which itself defaults to +\fBnone\fR\&. +The legal values are +.RS +.TP +\fBnone\fR, \fB-\fR +Draw no arrowheads, at neither end of the line\&. +.TP +\fBstart\fR, \fBfirst\fR, \fB<-\fR +Draw an arrowhead at the beginning of the line, but not at its end\&. +.TP +\fBend\fR, \fBlast\fR, \fB->\fR +Draw an arrowhead at the end of the line, but not at its beginning\&. +.TP +\fBboth\fR, \fB<->\fR +Draw arrowheads at both ends of the line\&. +.RE +.IP +Note that the values "start", "end", "-", "->", "<-", and "<->" are +all accepted as shorthands for the \fBarrowhead\fR command using them +as argument\&. +.TP +\fBaspect\fR \fInumber\fR +Specifies the aspect ratio, i\&.e ratio of width to height, of the +\fBdiamond\fR element\&. +The manner in which a default is calculated when not specified also +depends on the specifications of the attributes \fBwidth\fR and +\fBheight\fR, if any\&. +.sp +If both \fBwidth\fR, and \fBheight\fR are specified then any +specification of \fBaspect\fR is ignored, as it is implicitly defined +in the width and height as well, and this takes precedence\&. A missing +specification is ignored in that case well, i\&.e\&. no defaults are +required\&. +.sp +If the \fBaspect\fR is specified, and one of the attributes +\fBwidth\fR or \fBheight\fR, then the missing attribute is calculated +from the two which are specified\&. No defaults are required for these +cases either\&. +.sp +If only one of the attributes \fBwidth\fR or \fBheight\fR is specified +then the system uses a fallback for the \fBaspect\fR, the value taken +from the language variable \fBdiamondaspect\fR, which itselfs defaults +to \fB2\fR\&. +.sp +If none of of the attributes \fBwidth\fR or \fBheight\fR is specified +then the system uses a fallback for the \fBwidth\fR, the value taken +from the language variable \fBboxwidth\fR, which itselfs defaults to +the pixel equivalent of \fB2 cm\fR\&. For the aspect it uses either +the user-specified value or the default taken as described in the +previous paragraph\&. +.TP +\fBaspect\fR \fInumber\fR +Specifies the aspect ratio, i\&.e ratio of width to height, of the +ellipses which are used to draw the top and bottom of the \fBdrum\fR +element\&. +If not specified the system falls back to the value taken from the +language variable \fBdrumaspect\fR, which itself defaults to +\fB0\&.35\fR\&. +.TP +\fBat\fR \fIlocation\fR +Specifies the location of the element's corner named by the attribute +\fBwith\fR\&. +Defaults to the current location as maintained by the layouting +system\&. +.TP +\fBat\fR \fIlocation\fR +\fBLine\fR elements are normally positioned absolutely, using the +locations specified through the attributes \fBfrom\fR, \fBthen\fR, and +\fBto\fR\&. +If \fBat\fR is specified however then these positions are translated a +last time, moving the line's corner named by the attribute \fBwith\fR +to the location given by this attribute\&. +.TP +\fBchop\fR ?\fIlength\fR? +Specifies the length of the \fBline\fR element to remove from the +beginning and/or end\&. +Defaults to nothing\&. +If specified once the chopping applies to both beginning and end of +the line\&. +If specified twice or more the last two specifications are used, and +applied to beginning and end of the line, in this order\&. +Whenever the attribute is specified without an explicit length, the +system falls back to the value taken from the language variable +\fBcircleradius\fR, which itself defaults to the pixel equivalent of +\fB1 cm\fR +.TP +\fBclockwise\fR +.TP +\fBcw\fR +Specifies the direction of the \fBarc\fR element, here going +clockwise\&. +The complementary attribute is \fBcounterclockwise\fR\&. +If not specified the system falls back to the value taken from the +language variable \fBclockwise\fR, which itself defaults to +\fBfalse\fR, for counter-clockwise direction\&. +.TP +\fBcolor\fR \fIspec\fR +IMAGE: figure-21-style-colors +Specifies the color used to draw the lines of the element\&. +If not specified the system falls back to the value taken from the +language variable \fBlinecolor\fR, which itself defaults to \fBblack\fR\&. +.TP +\fBcounterclockwise\fR +.TP +\fBccw\fR +Specifies the direction of the \fBarc\fR element, here +counter-clockwise\&. +The complementary attribute is \fBclockwise\fR\&. +If not specified the system falls back to the value taken from the +language variable \fBclockwise\fR, which itself defaults to +\fBfalse\fR, for counter-clockwise direction\&. +.TP +\fBdiameter\fR \fIlength\fR +.TP +\fBdiam\fR \fIlength\fR +Specifies the diameter of the \fBcircle\fR element, as an alternative +way to specify its \fBradius\fR\&. +Effective if and only if the radius was not specified\&. I\&.e\&. if both +diameter and radius are specified then the radius infomration has +precendence\&. +This attribute has no default, because the defaults are taken from the +radius\&. +.TP +\fBfillcolor\fR \fIspec\fR +IMAGE: figure-21-style-colors +Specifies the color used to draw the inside of the element\&. +If not specified the system falls back to the value taken from the +language variable \fBfillcolor\fR, which itself defaults to the empty +string, signaling "no filling"\&. +.TP +\fBfrom\fR \fIlocation\fR +Specifies the location where the \fBline\fR element begins\&. +Defaults to the current location as maintained by the layouting +system\&. +.TP +\fBfrom\fR \fIlocation\fR +Specifies the location where the \fBarc\fR element begins\&. +Defaults to the current location as maintained by the layouting +system\&. +.TP +\fBheight\fR \fIlength\fR +.TP +\fBht\fR \fIlength\fR +Specifies the height of the element\&. +If not specified the system falls back to the value taken from the +language variable \fBboxheight\fR, which itself defaults to the +pixel equivalent of \fB2 cm\fR\&. +.TP +\fBheight\fR \fIlength\fR +Specifies the height of the \fBdiamond\fR element\&. +The manner in which a default is calculated when not specified also +depends on the specifications of the attributes \fBaspect\fR and +\fBwidth\fR, if any\&. +.sp +If both \fBwidth\fR, and \fBheight\fR are specified then any +specification of \fBaspect\fR is ignored, as it is implicitly defined +in the width and height as well, and this takes precedence\&. A missing +specification is ignored in that case well, i\&.e\&. no defaults are +required\&. +.sp +If the \fBaspect\fR is specified, and one of the attributes +\fBwidth\fR or \fBheight\fR, then the missing attribute is calculated +from the two which are specified\&. No defaults are required for these +cases either\&. +.sp +If only one of the attributes \fBwidth\fR or \fBheight\fR is specified +then the system uses a fallback for the \fBaspect\fR, the value taken +from the language variable \fBdiamondaspect\fR, which itselfs defaults +to \fB2\fR\&. +.sp +If none of of the attributes \fBwidth\fR or \fBheight\fR is specified +then the system uses a fallback for the \fBwidth\fR, the value taken +from the language variable \fBboxwidth\fR, which itselfs defaults to +the pixel equivalent of \fB2 cm\fR\&. For the aspect it uses either +the user-specified value or the default taken as described in the +previous paragraph\&. +.TP +\fBheight\fR \fIlength\fR +Specifies the height of the \fBtext\fR element\&. +Defaults to the natural height of its text\&. +.TP +\fBjustify\fR \fBleft\fR|\fBcenter\fR|\fBright\fR +Specifies how multi-line text associated with the element is +positioned within its box\&. +The value is ignored if no text was specified for the element\&. +If not specified the system falls back to the value taken from the +language variable \fBjustify\fR, which itself defaults to +\fBleft\fR\&. +The legal values are \fBleft\fR, \fBright\fR, and \fBcenter\fR\&. +.TP +\fBnoturn\fR +Specifies that the direction of \fBline\fR element at its end is not +propagated to the layout management\&. +If not specified the direction of the line becomes the new direction +the layout\&. +.TP +\fBradius\fR \fIlength\fR +.TP +\fBrad\fR \fIlength\fR +Specifies the radius of the \fBcircle\fR element\&. +If not specified the system falls back to the value taken from the +language variable \fBcircleradius\fR, which itself defaults to the +pixel equivalent of \fB1 cm\fR\&. +.TP +\fBradius\fR \fIlength\fR +Specifies the radius of the \fBarc\fR element, or rather, the radius +of the circle the shown arc is a part of\&. +If not specified the system falls back to the value taken from the +language variable \fBarcradius\fR, which itself defaults to the pixel +equivalent of \fB1 cm\fR\&. +.TP +\fBslant\fR \fIangle\fR +Specifies the angle by which the \fBbox\fR element is slanted, in +degrees\&. +If not specified the system falls back to the value taken from the +language variable \fBslant\fR, which itself defaults to \fB90\fR, +i\&.e\&. vertical, no slant\&. +0 degrees is slanting straight east, pointing to the right\&. +90 degrees is slanting to the north, pointing straight up\&. +.TP +\fBsmooth\fR +Specifies the use of bezier splines for the \fBline\fR element\&. +If not specified lines are drawn exactly through the specified +waypoints, without any smooth curves\&. +.TP +\fBstroke\fR \fIwidth\fR +IMAGE: figure-20-style-stroke +Specifies the width of the lines drawn for the the element, in pixels\&. +If not specified the system falls back to the value taken from the +language variable \fBlinewidth\fR, which itself defaults to \fB1\fR\&. +.TP +\fBstyle\fR \fIspec\fR +IMAGE: figure-18-style-dash +Specifies the style used to draw the lines of the element\&. +If not specified the system falls back to the value taken from the +language variable \fBlinestyle\fR, which itself defaults to +\fBsolid\fR lines\&. +The legal values are all those accepted by +\fITk_GetDash\fR [http://www\&.tcl\&.tk/man/tcl8\&.5/TkLib/GetDash\&.htm], +and additionally all which are listed below: +.RS +.TP +\fBsolid\fR, empty string +Draw solid line\&. +.TP +\fBdash\fR, \fBdashed\fR, \fB-\fR +Draw a dashed line\&. +.TP +\fBdot\fR, \fBdotted\fR, \fB\&.\fR +Draw a dotted line\&. +.TP +\fBdash-dot\fR, \fB-\&.\fR +Draw a dash-dotted line +.TP +\fBdash-dot-dot\fR, \fB-\&.\&.\fR +Draw a dash-dot-dotted line\&. +.RE +.IP +Note that the values "solid", "dot(ted)", "dash(ed)", "dash-dot", and +"dash-dot-dot" are all accepted as shorthands for the \fBstyle\fR +command using them as argument\&. +.TP +\fBtext\fR \fIstring\fR +Specifies the text to associate with the element\&. +Defaults to nothing\&. +When specified multiple times the actually shown text is the +concatenation of the individual strings, vertically stacked, with the +first string specified being the topmost element\&. +.TP +\fBtextcolor\fR \fIspec\fR +Specifies the color used to draw the text of an element with\&. +Ignored if there is no text\&. +If not specified the system falls back to the value taken from the +language variable \fBtextcolor\fR, which itself defaults to +\fBblack\fR\&. +.TP +\fBtextfont\fR \fIspec\fR +Specifies the font used to draw the text of an element with\&. +Ignored if there is no text\&. +If not specified the system falls back to the value taken from the +language variable \fBtextfont\fR, which itself defaults to +\fBHelvetica 12pt\fR\&. +.TP +\fBthen\fR \fIlocation\fR +.TP +\fBthen\fR ( ?\fIlength\fR?)\&.\&.\&. +.TP +( ?\fIlength\fR?)\&.\&.\&. +This attribute specifies an intermediate location the \fBline\fR +element has to go through\&. +It can be specified multiple times, with each use adding one +additional location to the series which the line will go +through\&. These location will be traversed in the order they were +specified\&. +.sp +The location can be given explicitly, or as a series of directions +with distances\&. In the latter case the names of all known directions +are accepted for the direction part\&. +If no distance is specified for a direction the system falls back to +the value taken from the language variable \fBmovelength\fR, which +itself defaults to the pixel equivalent of \fB2 cm\fR\&. +The whole set of direction,distance pairs is treated as a series of +translations which are added up to provide the final translation +specifying the intermediate point (relative to the preceding point)\&. +.sp +The last named direction is propagated to the layout system as the +direction to follow\&. The use of \fBnoturn\fR is not able to overide +this behaviour\&. +.sp +At last, the names of the registered directions also serve as +attribute commands, with an implicit attribute \fBthen\fR in front of +them\&. +.sp +If no intermediate or last location is specified for the line the +system falls back to a point \fBmovelength\fR pixels away from the +starting location, in the current direction as maintained by the +layouting system +.TP +\fBto\fR \fIlocation\fR +Specifies the location where the \fBline\fR element ends\&. +This attribute has no default\&. The default is handled by the attribute +\fBthen\fR, which makes it appear as if \fBto\fR has a default when +not specified\&. +.TP +\fBto\fR \fIlocation\fR +Specifies the location where the \fBarc\fR element ends\&. +Defaults to a location such that a 90-degree arc is drawn in the +chosen direction, starting at \fBfrom\fR\&. +.TP +\fBwidth\fR \fIlength\fR +.TP +\fBwid\fR \fIlength\fR +Specifies the width of the element\&. +If not specified the system falls back to the value taken from the +language variable \fBboxwidth\fR, which itself defaults to the pixel +equivalent of \fB2 cm\fR\&. +.TP +\fBwidth\fR \fIlength\fR +Specifies the width of the \fBdiamond\fR element\&. +The manner in which a default is calculated when not specified also +depends on the specifications of the attributes \fBaspect\fR and +\fBheight\fR, if any\&. +.sp +If both \fBwidth\fR, and \fBheight\fR are specified then any +specification of \fBaspect\fR is ignored, as it is implicitly defined +in the width and height as well, and this takes precedence\&. A missing +specification is ignored in that case well, i\&.e\&. no defaults are +required\&. +.sp +If the \fBaspect\fR is specified, and one of the attributes +\fBwidth\fR or \fBheight\fR, then the missing attribute is calculated +from the two which are specified\&. No defaults are required for these +cases either\&. +.sp +If only one of the attributes \fBwidth\fR or \fBheight\fR is specified +then the system uses a fallback for the \fBaspect\fR, the value taken +from the language variable \fBdiamondaspect\fR, which itselfs defaults +to \fB2\fR\&. +.sp +If none of of the attributes \fBwidth\fR or \fBheight\fR is specified +then the system uses a fallback for the \fBwidth\fR, the value taken +from the language variable \fBboxwidth\fR, which itselfs defaults to +the pixel equivalent of \fB2 cm\fR\&. For the aspect it uses either +the user-specified value or the default taken as described in the +previous paragraph\&. +.TP +\fBwidth\fR \fIlength\fR +Specifies the width of the \fBtext\fR element\&. +Defaults to the natural width of its text\&. +.TP +\fBwith\fR \fIcorner\fR +Specifies the corner of the element to place at the location given by +the attribute \fBat\fR\&. +Defaults to the current corner as maintained by the layouting system, +except if the value for \fBat\fR was specified by the user\&. In that +case it defaults to \fBcenter\fR\&. +.TP +\fBwith\fR \fIcorner\fR +\fBLine\fR elements are normally positioned absolutely, using the +locations specified through the attributes \fBfrom\fR, \fBthen\fR, and +\fBto\fR\&. +If \fBat\fR is specified however then these positions are translated a +last time, moving the line's corner named by the attribute \fBwith\fR +to the location given by this attribute\&. +This means that \fIwith\fR is effective if and only if the attribute +\fBat\fR was specified as well for the line\&. +.PP +.SS CORNERS +Corners are named values for in elements, usually locations\&. +.IP \(bu +The \fIclosed\fR elements define corners for the compass rose, +including the "center", and their "width" and "height"\&. +.sp +IMAGE: figure-27-corners-closed +.sp +.IP \(bu +\fBblock\fR elements additionally export all variables which were set +during their definition as corners\&. +.IP \(bu +The \fIopen\fR elements on the other hand define "start", "end", and +"center"\&. The first two map to the locations originally provided +through the attributes \fBfrom\fR and \fBto\fR of the element\&. +.sp +IMAGE: figure-28-corners-open +.sp +.IP \(bu +The center of \fBline\fR and \fBmove\fR elements is the location +halfway between "start" and "end" corners, this is regardless of any +intermediate locations the element may have\&. +.IP \(bu +The \fBline\fR and \fBmove\fR elements additionally name all their +locations as corners using numbers as names, starting from \fB1\fR +(equivalent to "start"), in order of traversal\&. +.sp +IMAGE: figure-15-spline-1 +.sp +.IP \(bu +The center of \fBarc\fR elements is the center of the circle the arc +is part off\&. +.IP \(bu +The \fBarc\fR elements additionally define the compass rose of +closed elements as well\&. +.PP +.SS "NAMED DIRECTIONS" +The named directions are commands which tell the layout system in +which direction to go when placing the next element without an +explicit position specification\&. +They can also be used as arguments to the attribute \fBthen\fR, and +the command \fBby\fR for relative points, see there for the relevant +syntax\&. +.PP +The diagram core defines the directions of the compass rose, plus a +number of aliases\&. See below for the full list\&. +.PP +IMAGE: figure-27-corners-closed +.PP +This overlaps with the pre-defined corners for closed elements\&. This +is used by the layout system, when are going in direction X the name +of the opposite direction is the name of the corner at which the new +element will be attached to the current position, and if this corner +does not exist the nearest actual corner by angle is used\&. +.PP +.TP +\fBwest\fR +.TP +\fBw\fR +.TP +\fBleft\fR +.TP +\fBl\fR +.TP +\fBsouth\fR +.TP +\fBs\fR +.TP +\fBdown\fR +.TP +\fBbottom\fR +.TP +\fBbot\fR +.TP +\fBb\fR +.TP +\fBeast\fR +.TP +\fBe\fR +.TP +\fBright\fR +.TP +\fBr\fR +.TP +\fBnorth\fR +.TP +\fBn\fR +.TP +\fBup\fR +.TP +\fBtop\fR +.TP +\fBt\fR +.TP +\fBnorthwest\fR +.TP +\fBnw\fR +.TP +\fBup-left\fR +.TP +\fBupleft\fR +.TP +\fBleftup\fR +.TP +\fBnortheast\fR +.TP +\fBne\fR +.TP +\fBup-right\fR +.TP +\fBupright\fR +.TP +\fBrightup\fR +.TP +\fBsouthwest\fR +.TP +\fBsw\fR +.TP +\fBdown-left\fR +.TP +\fBdownleft\fR +.TP +\fBleftdown\fR +.TP +\fBsoutheast\fR +.TP +\fBse\fR +.TP +\fBdown-right\fR +.TP +\fBdownright\fR +.TP +\fBrightdown\fR +.PP +.SS "MISCELLANEOUS COMMANDS" +.TP +\fInumber\fR \fBcm\fR +.TP +\fInumber\fR \fBmm\fR +.TP +\fInumber\fR \fBinch\fR +.TP +\fInumber\fR \fBpt\fR +These commands allow the specification of distances and coordinates in +metric and imperial units, returning the equivalent distance or +coordinate in pixels, which is the unit used internally for all +calculations\&. +.sp +The conversion factors are based on the result of \fBtk scaling\fR +and are computed once, at the time the package is sourced, future +changes of the \fBtk scaling\fR factor have no effect\&. +.TP +\fInumber\fR \fInumber\fR +.sp +IMAGE: figure-50-point-cons-absolute +.sp +This command takes the x and y coordinates of a location and returns +the \fIabsolute\fR point for it\&. +.TP +\fBby\fR \fIdistance\fR \fIdirection\fR +.sp +IMAGE: figure-51-point-cons-relative +.sp +This command takes a \fIdistance\fR and \fIdirection\fR (angle in +degress, or registered direction name) and returns the \fIrelative\fR +point for it, i\&.e\&. the \fIdelta\fR or \fItranslation\fR it +represents\&. +.sp +Note also the (dis)similarities to the directional specifications for +the attribute \fBthen\fR of \fBline\fR and \fBmove\fR elements\&. +Where we say here +.CS + +by 50 east +.CE +.IP +for the attribute we say +.CS + +\&.\&.\&. then east 50 \&.\&.\&. +.CE +.IP +or just +.CS + +\&.\&.\&. then east \&.\&.\&. +.CE +.TP +\fIpoint1\fR \fB+\fR \fIpoint2\fR +.sp +IMAGE: figure-48-point-vectoradd +.sp +This command interprets two points as vectors and adds them together\&. +If at least one of the points is \fIabsolute\fR the result is +absolute as well\&. +The result is a \fIrelative\fR point if and only if both points are +\fIrelative\fR\&. +.TP +\fIpoint1\fR \fB-\fR \fIpoint2\fR +.sp +IMAGE: figure-49-point-vectorsub +.sp +This command interprets two points as vectors and subtracts the second +from the first\&. +If at least one of the points is \fIabsolute\fR the result is +absolute as well\&. +The result is a \fIrelative\fR point if and only if both points are +\fIrelative\fR\&. +.TP +\fIpoint\fR \fBby\fR \fIdistance\fR \fIdirection\fR +This command is a more convenient, or at least shorter, form of +.CS + + + [$point + [by $distance $direction]] + +.CE +.TP +\fIpoint1\fR \fB|\fR \fIpoint2\fR +.sp +IMAGE: figure-31-point-projection +.sp +This command calculates the \fIprojection\fR of two points, i\&.e\&. the +result is the point having the x-coordinate of \fIpoint1\fR and the +y-coordinate of \fIpoint2\fR\&. +.TP +\fIn\fR \fBbetween\fR \fIpoin1\fR \fIpoint2\fR +.sp +IMAGE: figure-29-point-interpolation-1 +.sp +This command computes the point which is \fIn\fR*100 percent of the +way between \fIpoint1\fR and \fIpoint2\fR, and returns it as its +result\&. +This means that for +.RS +.TP +\fIn\fR == 0 +The result is \fIpoint1\fR\&. +.TP +\fIn\fR == 1 +The result is \fIpoint2\fR\&. +.TP +\fIn\fR == 0\&.5 +The result is half way between the two points\&. +.RE +.IP +etc\&. +\fINote\fR that it is allowed to use values < 0 and > 1 for \fIn\fR +.TP +\fBintersect\fR \fIelem1\fR \fIelem2\fR +.sp +IMAGE: figure-32-point-intersection +.sp +This command takes two \fIopen\fR elements, computes the lines going +through their "start"- and "end"-corners, and returns the point where +these two lines intersect\&. +The command throws an error if the lines do not intersect, or are +coincident\&. +.TP +\fIelement\fR \fBnames\fR ?\fIpattern\fR? +This command returns a list containing the names of all corners for +the \fIelement\fR\&. If a pattern is specified then only the names +matching it (via \fBstring match\fR are returned\&. Otherwise all +names are returned (equivalent to a default pattern of \fB*\fR)\&. +.TP +\fIelement\fR \fIcorner\fR +This command returns the value for the \fIcorner\fR of the +\fIelement\fR\&. +This can be anything, including points and elements\&. +.TP +\fIelement\fR \fIcorner1\fR \fIcorner2\fR\&.\&.\&. +This is a convenience shorthand for +.CS + + +[[[$elem $corner1] $corner2] \&.\&.\&.] + +.CE +.IP +assuming that the value for +.CS + + [$elem $corner1] +.CE +.IP, etc\&. is +again an element\&. +.TP +\fIelement\fR ?\fIcorner1\fR\&.\&.\&. ?\fBnames\fR ?\fIpattern\fR??]? +This is a convenience shorthand for +.CS + + +[[[$elem $corner1] \&.\&.\&.] names ?pattern?] + +.CE +.IP +assuming that the value for +.CS + + [$elem $corner1] +.CE +.IP, etc\&. is +again an element\&. +.TP +\fB\fBn\fRth\fR ?\fIcorner\fR? +This command asks the diagram history for the \fBn\fRth element +created, searching from the beginning of the history (counting from 1) +and returns it as its result\&. +If the \fIcorner\fR is specified then the value for this corner is +returned instead\&. +.TP +\fB\fBn\fRth\fR \fBlast\fR ?\fIcorner\fR? +This command asks the diagram history for the \fBn\fRth element +created, searching from the end of the history and returns it as its +result\&. +If the \fIcorner\fR is specified then the value for this corner is +returned instead\&. +.TP +\fB\fBn\fRth\fR \fIshape\fR ?\fIcorner\fR? +This command asks the diagram history for the \fBn\fRth element +created, of the given \fIshape\fR, searching from the beginning of the +history (counting from 1) and returns it as its result\&. +If the \fIcorner\fR is specified then the value for this corner is +returned instead\&. +.TP +\fB\fBn\fRth\fR \fBlast\fR \fIshape\fR ?\fIcorner\fR? +This command asks the diagram history for the \fBn\fRth element +created, of the given \fIshape\fR, searching from the end of the +history and returns it as its result\&. +If the \fIcorner\fR is specified then the value for this corner is +returned instead\&. +.TP +\fBlast\fR ?\fIcorner\fR? +.TP +\fBlast\fR \fIshape\fR ?\fIcorner\fR? +Convenience commands mapping to "\fB1st last\fR" +and "\fB1st last\fR \fIshape\fR"\&. +.TP +\fB1st\fR +.TP +\fB2nd\fR +.TP +\fB3rd\fR +Aliases for \fB1th\fR, \fB2th\fR, and \fB3th\fR, for readability, +usable whereever \fB\fBn\fRth\fR can ocur\&. +.PP +.SS VARIABLES +The language context contains a number of predefined variables which +hold the default values for various attributes\&. These variables, their +uses, and values are: +.TP +\fBanchor\fR +The default value for the attribute \fBanchor\fR\&. +Initialized to \fBcenter\fR\&. +The legal values are all those accepted by +\fITk_GetAnchor\fR [http://www\&.tcl\&.tk/man/tcl8\&.5/TkLib/GetAnchor\&.htm]\&. +.TP +\fBarcradius\fR +The default value for the attribute \fBradius\fR of \fBarc\fR +elements\&. +Initialized to the pixel equivalent of \fB1 cm\fR\&. +.TP +\fBarrowhead\fR +The default value for the attribute \fBarrowhead\fR\&. +Initialized to \fBnone\fR\&. +The legal values are +.RS +.TP +\fBnone\fR, \fB-\fR +Draw no arrowheads, at neither end of the line\&. +.TP +\fBstart\fR, \fBfirst\fR, \fB<-\fR +Draw an arrowhead at the beginning of the line, but not at its end\&. +.TP +\fBend\fR, \fBlast\fR, \fB->\fR +Draw an arrowhead at the end of the line, but not at its beginning\&. +.TP +\fBboth\fR, \fB<->\fR +Draw arrowheads at both ends of the line\&. +.RE +.TP +\fBboxheight\fR +The default value for the attribute \fBheight\fR of \fBbox\fR, +\fBdiamond\fR and \fBellipse\fR elements\&. +Initialized to the pixel equivalent of \fB2 cm\fR\&. +.TP +\fBboxwidth\fR +The default value for the attribute \fBwidth\fR of \fBbox\fR, +\fBdiamond\fR and \fBellipse\fR elements\&. +Initialized to the pixel equivalent of \fB2 cm\fR\&. +.TP +\fBclockwise\fR +The default value for the attributes \fBclockwise\fR and +\fBcounterclockwise\fR of \fBarc\fR elements\&. +Initialized to \fBFalse\fR, for counter-clockwise direction\&. +.TP +\fBcircleradius\fR +The default value for the attribute \fBradius\fR of \fBcircle\fR +elements, and also the default for the attribute \fBchop\fR, when +specified without an explicit length\&. +Initialized to the pixel equivalent of \fB1 cm\fR\&. +.TP +\fBdrumaspect\fR +The default value for the attribute \fBaspect\fR of \fBdrum\fR +elements\&. +Initialized to \fB0\&.35\fR\&. +.TP +\fBfillcolor\fR +The default value for the attribute \fBfillcolor\fR of all elements +which can be filled\&. +Initialized to the empty string, signaling that the element is not +filled\&. +.TP +\fBjustify\fR +The default value for the attribute \fBjustify\fR\&. +Initialized to \fBleft\fR\&. +The legal values are \fBleft\fR, \fBright\fR, and \fBcenter\fR\&. +.TP +\fBlinecolor\fR +The default value for the attribute \fBcolor\fR of all elements having +to draw lines (all but \fBtext\fR)\&. +Initialized to \fBblack\fR\&. +.TP +\fBlinestyle\fR +The default value for the attribute \fBstyle\fR of all elements +having to draw some line\&. +Initialized to \fBsolid\fR\&. +The legal values are all those accepted by +\fITk_GetDash\fR [http://www\&.tcl\&.tk/man/tcl8\&.5/TkLib/GetDash\&.htm], +and additionally all which are listed below: +.RS +.TP +\fBsolid\fR, empty string +Draw solid line\&. +.TP +\fBdash\fR, \fBdashed\fR, \fB-\fR +Draw a dashed line\&. +.TP +\fBdot\fR, \fBdotted\fR, \fB\&.\fR +Draw a dotted line\&. +.TP +\fBdash-dot\fR, \fB-\&.\fR +Draw a dash-dotted line +.TP +\fBdash-dot-dot\fR, \fB-\&.\&.\fR +Draw a dash-dot-dotted line\&. +.RE +.TP +\fBlinewidth\fR +The default value for the attribute \fBstroke\fR of all elements +having to draw some line\&. +Initialized to \fB1\fR (pixels)\&. +.TP +\fBmovelength\fR +The default value for the directional specification of intermediate +locations by the attribute \fBthen\fR of \fBline\fR and \fBmove\fR +elements\&. +Initialized to the pixel equivalent of \fB2 cm\fR\&. +.TP +\fBslant\fR +The default value for the attribute \fBslant\fR of \fBbox\fR elements\&. +Initialized to 90 degrees, i\&.e\&. slant straight up\&. +.TP +\fBtextcolor\fR +The default value for the attribute \fBtextcolor\fR of all elements +having to draw some text\&. +Initialized to \fBblack\fR\&. +.TP +\fBtextfont\fR +The default value for the attribute \fBtextfont\fR of all elements +having to draw some text\&. +Initialized to \fBHelvetica 12pt\fR\&. +.PP +.SH "DIAGRAM CLASSES" The intended audience of this section are developers wishing to work +on the internals of the diagram package\&. +Regular users of \fBdiagram\fR can skip this section without +missing anything\&. +.PP +The main information seen here is the figure below, showing the +hierarchy of the classes implementing diagram\&. +.PP +IMAGE: figure-00-dependencies +.PP +At the bottom, all at the same level are the supporting packages like +\fBsnit\fR, etc\&. These can all be found in Tcllib\&. +.PP +Above them is the set of diagram classes implementing the various +aspects of the system, i\&.e\&.: +.TP +\fBdiagram\fR +The main class, that which is seen by the user\&. +.TP +\fBdiagram::core\fR +The core engine, itself distributed over four helper classes\&. +.TP +\fBdiagram::basic\fR +The implementation of the standard shapes, like box, circle, etc\&., +based on the extension features of the core\&. +.TP +\fBdiagram::element\fR +Core support class, the database of created elements\&. It also keeps +the history, i\&.e\&. the order in which elements were created\&. +.TP +\fBdiagram::attribute\fR +Core support class, the generic handling of definition and processing +of attributes\&. +.TP +\fBdiagram::direction\fR +Core support class, the database of named directions\&. +.TP +\fBdiagram::navigation\fR +Core support class, the state of layout engine, i\&.e\&. current position +and directin, and operations on it\&. +.TP +\fBdiagram::point\fR +General support class handling various vector operations\&. +.PP +.SH REFERENCES +.SH "BUGS, IDEAS, FEEDBACK" +This document, and the package it describes, will undoubtedly contain +bugs and other problems\&. +Please report such in the category \fIdiagram\fR of the +\fITklib Trackers\fR [http://core\&.tcl\&.tk/tklib/reportlist]\&. +Please also report any ideas for enhancements you may have for either +package and/or documentation\&. +.SH KEYWORDS +2D geometry, arc, arrow, box, canvas, circle, diagram, diamond, drawing, drum, ellipse, image, interpolation, intersection, line, move, picture, plane geometry, plotting, point, raster image, spline, text, vector +.SH CATEGORY +Documentation tools \ No newline at end of file diff --git a/embedded/man/files/modules/getstring/tk_getString.n b/embedded/man/files/modules/getstring/tk_getString.n new file mode 100644 index 00000000..71ab84aa --- /dev/null +++ b/embedded/man/files/modules/getstring/tk_getString.n @@ -0,0 +1,323 @@ +'\" +'\" Generated from file 'tk_getString\&.man' by tcllib/doctools with format 'nroff' +'\" +.TH "getstring" n 0\&.1 tklib "A dialog which prompts for a string input" +.\" The -*- nroff -*- definitions below are for supplemental macros used +.\" in Tcl/Tk manual entries. +.\" +.\" .AP type name in/out ?indent? +.\" Start paragraph describing an argument to a library procedure. +.\" type is type of argument (int, etc.), in/out is either "in", "out", +.\" or "in/out" to describe whether procedure reads or modifies arg, +.\" and indent is equivalent to second arg of .IP (shouldn't ever be +.\" needed; use .AS below instead) +.\" +.\" .AS ?type? ?name? +.\" Give maximum sizes of arguments for setting tab stops. Type and +.\" name are examples of largest possible arguments that will be passed +.\" to .AP later. If args are omitted, default tab stops are used. +.\" +.\" .BS +.\" Start box enclosure. From here until next .BE, everything will be +.\" enclosed in one large box. +.\" +.\" .BE +.\" End of box enclosure. +.\" +.\" .CS +.\" Begin code excerpt. +.\" +.\" .CE +.\" End code excerpt. +.\" +.\" .VS ?version? ?br? +.\" Begin vertical sidebar, for use in marking newly-changed parts +.\" of man pages. The first argument is ignored and used for recording +.\" the version when the .VS was added, so that the sidebars can be +.\" found and removed when they reach a certain age. If another argument +.\" is present, then a line break is forced before starting the sidebar. +.\" +.\" .VE +.\" End of vertical sidebar. +.\" +.\" .DS +.\" Begin an indented unfilled display. +.\" +.\" .DE +.\" End of indented unfilled display. +.\" +.\" .SO ?manpage? +.\" Start of list of standard options for a Tk widget. The manpage +.\" argument defines where to look up the standard options; if +.\" omitted, defaults to "options". The options follow on successive +.\" lines, in three columns separated by tabs. +.\" +.\" .SE +.\" End of list of standard options for a Tk widget. +.\" +.\" .OP cmdName dbName dbClass +.\" Start of description of a specific option. cmdName gives the +.\" option's name as specified in the class command, dbName gives +.\" the option's name in the option database, and dbClass gives +.\" the option's class in the option database. +.\" +.\" .UL arg1 arg2 +.\" Print arg1 underlined, then print arg2 normally. +.\" +.\" .QW arg1 ?arg2? +.\" Print arg1 in quotes, then arg2 normally (for trailing punctuation). +.\" +.\" .PQ arg1 ?arg2? +.\" Print an open parenthesis, arg1 in quotes, then arg2 normally +.\" (for trailing punctuation) and then a closing parenthesis. +.\" +.\" # Set up traps and other miscellaneous stuff for Tcl/Tk man pages. +.if t .wh -1.3i ^B +.nr ^l \n(.l +.ad b +.\" # Start an argument description +.de AP +.ie !"\\$4"" .TP \\$4 +.el \{\ +. ie !"\\$2"" .TP \\n()Cu +. el .TP 15 +.\} +.ta \\n()Au \\n()Bu +.ie !"\\$3"" \{\ +\&\\$1 \\fI\\$2\\fP (\\$3) +.\".b +.\} +.el \{\ +.br +.ie !"\\$2"" \{\ +\&\\$1 \\fI\\$2\\fP +.\} +.el \{\ +\&\\fI\\$1\\fP +.\} +.\} +.. +.\" # define tabbing values for .AP +.de AS +.nr )A 10n +.if !"\\$1"" .nr )A \\w'\\$1'u+3n +.nr )B \\n()Au+15n +.\" +.if !"\\$2"" .nr )B \\w'\\$2'u+\\n()Au+3n +.nr )C \\n()Bu+\\w'(in/out)'u+2n +.. +.AS Tcl_Interp Tcl_CreateInterp in/out +.\" # BS - start boxed text +.\" # ^y = starting y location +.\" # ^b = 1 +.de BS +.br +.mk ^y +.nr ^b 1u +.if n .nf +.if n .ti 0 +.if n \l'\\n(.lu\(ul' +.if n .fi +.. +.\" # BE - end boxed text (draw box now) +.de BE +.nf +.ti 0 +.mk ^t +.ie n \l'\\n(^lu\(ul' +.el \{\ +.\" Draw four-sided box normally, but don't draw top of +.\" box if the box started on an earlier page. +.ie !\\n(^b-1 \{\ +\h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul' +.\} +.el \}\ +\h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul' +.\} +.\} +.fi +.br +.nr ^b 0 +.. +.\" # VS - start vertical sidebar +.\" # ^Y = starting y location +.\" # ^v = 1 (for troff; for nroff this doesn't matter) +.de VS +.if !"\\$2"" .br +.mk ^Y +.ie n 'mc \s12\(br\s0 +.el .nr ^v 1u +.. +.\" # VE - end of vertical sidebar +.de VE +.ie n 'mc +.el \{\ +.ev 2 +.nf +.ti 0 +.mk ^t +\h'|\\n(^lu+3n'\L'|\\n(^Yu-1v\(bv'\v'\\n(^tu+1v-\\n(^Yu'\h'-|\\n(^lu+3n' +.sp -1 +.fi +.ev +.\} +.nr ^v 0 +.. +.\" # Special macro to handle page bottom: finish off current +.\" # box/sidebar if in box/sidebar mode, then invoked standard +.\" # page bottom macro. +.de ^B +.ev 2 +'ti 0 +'nf +.mk ^t +.if \\n(^b \{\ +.\" Draw three-sided box if this is the box's first page, +.\" draw two sides but no top otherwise. +.ie !\\n(^b-1 \h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c +.el \h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c +.\} +.if \\n(^v \{\ +.nr ^x \\n(^tu+1v-\\n(^Yu +\kx\h'-\\nxu'\h'|\\n(^lu+3n'\ky\L'-\\n(^xu'\v'\\n(^xu'\h'|0u'\c +.\} +.bp +'fi +.ev +.if \\n(^b \{\ +.mk ^y +.nr ^b 2 +.\} +.if \\n(^v \{\ +.mk ^Y +.\} +.. +.\" # DS - begin display +.de DS +.RS +.nf +.sp +.. +.\" # DE - end display +.de DE +.fi +.RE +.sp +.. +.\" # SO - start of list of standard options +.de SO +'ie '\\$1'' .ds So \\fBoptions\\fR +'el .ds So \\fB\\$1\\fR +.SH "STANDARD OPTIONS" +.LP +.nf +.ta 5.5c 11c +.ft B +.. +.\" # SE - end of list of standard options +.de SE +.fi +.ft R +.LP +See the \\*(So manual entry for details on the standard options. +.. +.\" # OP - start of full description for a single option +.de OP +.LP +.nf +.ta 4c +Command-Line Name: \\fB\\$1\\fR +Database Name: \\fB\\$2\\fR +Database Class: \\fB\\$3\\fR +.fi +.IP +.. +.\" # CS - begin code excerpt +.de CS +.RS +.nf +.ta .25i .5i .75i 1i +.. +.\" # CE - end code excerpt +.de CE +.fi +.RE +.. +.\" # UL - underline word +.de UL +\\$1\l'|0\(ul'\\$2 +.. +.\" # QW - apply quotation marks to word +.de QW +.ie '\\*(lq'"' ``\\$1''\\$2 +.\"" fix emacs highlighting +.el \\*(lq\\$1\\*(rq\\$2 +.. +.\" # PQ - apply parens and quotation marks to word +.de PQ +.ie '\\*(lq'"' (``\\$1''\\$2)\\$3 +.\"" fix emacs highlighting +.el (\\*(lq\\$1\\*(rq\\$2)\\$3 +.. +.\" # QR - quoted range +.de QR +.ie '\\*(lq'"' ``\\$1''\\-``\\$2''\\$3 +.\"" fix emacs highlighting +.el \\*(lq\\$1\\*(rq\\-\\*(lq\\$2\\*(rq\\$3 +.. +.\" # MT - "empty" string +.de MT +.QW "" +.. +.BS +.SH NAME +getstring \- A string dialog +.SH SYNOPSIS +package require \fBTcl 8\&.4\fR +.sp +package require \fBgetstring ?0\&.1?\fR +.sp +\fB::getstring::tk_getString\fR \fIpathName\fR \fIvariable\fR \fItext\fR ?options? +.sp +.BE +.SH DESCRIPTION +This package provides a dialog which consists of an Entry, OK, and +Cancel buttons\&. +.PP +.TP +\fB::getstring::tk_getString\fR \fIpathName\fR \fIvariable\fR \fItext\fR ?options? +Creates a dialog which prompts the user with \fItext\fR to input a text string\&. +The contents of the entry are put in the \fIvariable\fR upon closure of the +dialog\&. The command returns a boolean indicating if the user pressed OK or +not\&. If -geometry is not specified, the dialog is centered in its parent +toplevel unless its parent is \&. in which case the dialog is centered in the +screen\&. +Options: +-title +-allowempty a boolean argument indicating if the dialog should accept an empty entry +-entryoptions simply passes its arguments through to the entry widget\&. This is valuble for performing extra validation +using the Entry widget validation hooks\&. +-geometry specifies the geometry of the window +.PP +.SH EXAMPLE +.CS + + +package require getstring +namespace import getstring::* + +if {[tk_getString \&.gs text "Feed me a string please:"]} { + puts "user entered: $text" +} + + +.CE +.SH "BUGS, IDEAS, FEEDBACK" +This document, and the package it describes, will undoubtedly contain +bugs and other problems\&. +Please report such in the category \fIgetstring\fR of the +\fITklib Trackers\fR [http://core\&.tcl\&.tk/tklib/reportlist]\&. +Please also report any ideas for enhancements you may have for either +package and/or documentation\&. +.SH KEYWORDS +dialog, entry, string \ No newline at end of file diff --git a/embedded/man/files/modules/history/tklib_history.n b/embedded/man/files/modules/history/tklib_history.n new file mode 100644 index 00000000..947609be --- /dev/null +++ b/embedded/man/files/modules/history/tklib_history.n @@ -0,0 +1,357 @@ +'\" +'\" Generated from file 'tklib_history\&.man' by tcllib/doctools with format 'nroff' +'\" +.TH "history" n 0\&.1 tklib "Provides a history for Entry widgets" +.\" The -*- nroff -*- definitions below are for supplemental macros used +.\" in Tcl/Tk manual entries. +.\" +.\" .AP type name in/out ?indent? +.\" Start paragraph describing an argument to a library procedure. +.\" type is type of argument (int, etc.), in/out is either "in", "out", +.\" or "in/out" to describe whether procedure reads or modifies arg, +.\" and indent is equivalent to second arg of .IP (shouldn't ever be +.\" needed; use .AS below instead) +.\" +.\" .AS ?type? ?name? +.\" Give maximum sizes of arguments for setting tab stops. Type and +.\" name are examples of largest possible arguments that will be passed +.\" to .AP later. If args are omitted, default tab stops are used. +.\" +.\" .BS +.\" Start box enclosure. From here until next .BE, everything will be +.\" enclosed in one large box. +.\" +.\" .BE +.\" End of box enclosure. +.\" +.\" .CS +.\" Begin code excerpt. +.\" +.\" .CE +.\" End code excerpt. +.\" +.\" .VS ?version? ?br? +.\" Begin vertical sidebar, for use in marking newly-changed parts +.\" of man pages. The first argument is ignored and used for recording +.\" the version when the .VS was added, so that the sidebars can be +.\" found and removed when they reach a certain age. If another argument +.\" is present, then a line break is forced before starting the sidebar. +.\" +.\" .VE +.\" End of vertical sidebar. +.\" +.\" .DS +.\" Begin an indented unfilled display. +.\" +.\" .DE +.\" End of indented unfilled display. +.\" +.\" .SO ?manpage? +.\" Start of list of standard options for a Tk widget. The manpage +.\" argument defines where to look up the standard options; if +.\" omitted, defaults to "options". The options follow on successive +.\" lines, in three columns separated by tabs. +.\" +.\" .SE +.\" End of list of standard options for a Tk widget. +.\" +.\" .OP cmdName dbName dbClass +.\" Start of description of a specific option. cmdName gives the +.\" option's name as specified in the class command, dbName gives +.\" the option's name in the option database, and dbClass gives +.\" the option's class in the option database. +.\" +.\" .UL arg1 arg2 +.\" Print arg1 underlined, then print arg2 normally. +.\" +.\" .QW arg1 ?arg2? +.\" Print arg1 in quotes, then arg2 normally (for trailing punctuation). +.\" +.\" .PQ arg1 ?arg2? +.\" Print an open parenthesis, arg1 in quotes, then arg2 normally +.\" (for trailing punctuation) and then a closing parenthesis. +.\" +.\" # Set up traps and other miscellaneous stuff for Tcl/Tk man pages. +.if t .wh -1.3i ^B +.nr ^l \n(.l +.ad b +.\" # Start an argument description +.de AP +.ie !"\\$4"" .TP \\$4 +.el \{\ +. ie !"\\$2"" .TP \\n()Cu +. el .TP 15 +.\} +.ta \\n()Au \\n()Bu +.ie !"\\$3"" \{\ +\&\\$1 \\fI\\$2\\fP (\\$3) +.\".b +.\} +.el \{\ +.br +.ie !"\\$2"" \{\ +\&\\$1 \\fI\\$2\\fP +.\} +.el \{\ +\&\\fI\\$1\\fP +.\} +.\} +.. +.\" # define tabbing values for .AP +.de AS +.nr )A 10n +.if !"\\$1"" .nr )A \\w'\\$1'u+3n +.nr )B \\n()Au+15n +.\" +.if !"\\$2"" .nr )B \\w'\\$2'u+\\n()Au+3n +.nr )C \\n()Bu+\\w'(in/out)'u+2n +.. +.AS Tcl_Interp Tcl_CreateInterp in/out +.\" # BS - start boxed text +.\" # ^y = starting y location +.\" # ^b = 1 +.de BS +.br +.mk ^y +.nr ^b 1u +.if n .nf +.if n .ti 0 +.if n \l'\\n(.lu\(ul' +.if n .fi +.. +.\" # BE - end boxed text (draw box now) +.de BE +.nf +.ti 0 +.mk ^t +.ie n \l'\\n(^lu\(ul' +.el \{\ +.\" Draw four-sided box normally, but don't draw top of +.\" box if the box started on an earlier page. +.ie !\\n(^b-1 \{\ +\h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul' +.\} +.el \}\ +\h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul' +.\} +.\} +.fi +.br +.nr ^b 0 +.. +.\" # VS - start vertical sidebar +.\" # ^Y = starting y location +.\" # ^v = 1 (for troff; for nroff this doesn't matter) +.de VS +.if !"\\$2"" .br +.mk ^Y +.ie n 'mc \s12\(br\s0 +.el .nr ^v 1u +.. +.\" # VE - end of vertical sidebar +.de VE +.ie n 'mc +.el \{\ +.ev 2 +.nf +.ti 0 +.mk ^t +\h'|\\n(^lu+3n'\L'|\\n(^Yu-1v\(bv'\v'\\n(^tu+1v-\\n(^Yu'\h'-|\\n(^lu+3n' +.sp -1 +.fi +.ev +.\} +.nr ^v 0 +.. +.\" # Special macro to handle page bottom: finish off current +.\" # box/sidebar if in box/sidebar mode, then invoked standard +.\" # page bottom macro. +.de ^B +.ev 2 +'ti 0 +'nf +.mk ^t +.if \\n(^b \{\ +.\" Draw three-sided box if this is the box's first page, +.\" draw two sides but no top otherwise. +.ie !\\n(^b-1 \h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c +.el \h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c +.\} +.if \\n(^v \{\ +.nr ^x \\n(^tu+1v-\\n(^Yu +\kx\h'-\\nxu'\h'|\\n(^lu+3n'\ky\L'-\\n(^xu'\v'\\n(^xu'\h'|0u'\c +.\} +.bp +'fi +.ev +.if \\n(^b \{\ +.mk ^y +.nr ^b 2 +.\} +.if \\n(^v \{\ +.mk ^Y +.\} +.. +.\" # DS - begin display +.de DS +.RS +.nf +.sp +.. +.\" # DE - end display +.de DE +.fi +.RE +.sp +.. +.\" # SO - start of list of standard options +.de SO +'ie '\\$1'' .ds So \\fBoptions\\fR +'el .ds So \\fB\\$1\\fR +.SH "STANDARD OPTIONS" +.LP +.nf +.ta 5.5c 11c +.ft B +.. +.\" # SE - end of list of standard options +.de SE +.fi +.ft R +.LP +See the \\*(So manual entry for details on the standard options. +.. +.\" # OP - start of full description for a single option +.de OP +.LP +.nf +.ta 4c +Command-Line Name: \\fB\\$1\\fR +Database Name: \\fB\\$2\\fR +Database Class: \\fB\\$3\\fR +.fi +.IP +.. +.\" # CS - begin code excerpt +.de CS +.RS +.nf +.ta .25i .5i .75i 1i +.. +.\" # CE - end code excerpt +.de CE +.fi +.RE +.. +.\" # UL - underline word +.de UL +\\$1\l'|0\(ul'\\$2 +.. +.\" # QW - apply quotation marks to word +.de QW +.ie '\\*(lq'"' ``\\$1''\\$2 +.\"" fix emacs highlighting +.el \\*(lq\\$1\\*(rq\\$2 +.. +.\" # PQ - apply parens and quotation marks to word +.de PQ +.ie '\\*(lq'"' (``\\$1''\\$2)\\$3 +.\"" fix emacs highlighting +.el (\\*(lq\\$1\\*(rq\\$2)\\$3 +.. +.\" # QR - quoted range +.de QR +.ie '\\*(lq'"' ``\\$1''\\-``\\$2''\\$3 +.\"" fix emacs highlighting +.el \\*(lq\\$1\\*(rq\\-\\*(lq\\$2\\*(rq\\$3 +.. +.\" # MT - "empty" string +.de MT +.QW "" +.. +.BS +.SH NAME +history \- Provides a history for Entry widgets +.SH SYNOPSIS +package require \fBTcl 8\&.4\fR +.sp +package require \fBTk 8\&.4\fR +.sp +package require \fBhistory ?0\&.1?\fR +.sp +\fB::history::init\fR \fIpathName\fR ?length? +.sp +\fB::history::remove\fR \fIpathName\fR +.sp +\fB::history::add\fR \fIpathName\fR \fItext\fR +.sp +\fB::history::get\fR \fIpathName\fR +.sp +\fB::history::clear\fR \fIpathName\fR +.sp +\fB::history::configure\fR \fIpathName\fR \fIoption\fR ?value? +.sp +bell +.sp +.BE +.SH DESCRIPTION +This package provides a convenient history mechanism for Entry widgets\&. +The history may be accessed with the up and down arrow keys\&. +.PP +.TP +\fB::history::init\fR \fIpathName\fR ?length? +Arranges to remember the history of the named Entry widget\&. An optional length +determines the number of history entries to keep\&. This may be changed later +with \fB::history::configure\fR\&. History entries must be added with the +\fB::history::add\fR command before they can be seen\&. +.TP +\fB::history::remove\fR \fIpathName\fR +Forgets all history entries for the Entry \fIpathName\fR and removes the history +bindings\&. +.TP +\fB::history::add\fR \fIpathName\fR \fItext\fR +This command is used to add history entries to an Entry that has previously had +\fB::history::init\fR called on it\&. This command should be called from your Entry +handler with the contents of the entry (or whatever you wish to add to the history)\&. +.TP +\fB::history::get\fR \fIpathName\fR +This command returns a list containing the history entries for the Entry \fIpathName\fR +.TP +\fB::history::clear\fR \fIpathName\fR +This command clears the history list for the named Entry\&. +.TP +\fB::history::configure\fR \fIpathName\fR \fIoption\fR ?value? +This command queries or sets configuration options\&. Currently the options recognized +are \fIlength\fR and \fIalert\fR\&. Setting the length determines the number of history entries to keep for +the named Entry\&. Alert specifies the command to run when the user reaches the end of the history, it defaults to +.TP +bell +\&. Although configure requires a \fIpathName\fR argument, the setting for alert is global and the path is ignored\&. +.PP +.CS + + +entry \&.e +bind \&.e [list ProcessEntry %W] +::history::init \&.e +pack \&.e + +proc ProcessEntry {w} { + set text [$w get] + if {$text == ""} { return } + ::history::add $w $text + puts $text + $w delete 0 end +} + + +.CE +.SH "BUGS, IDEAS, FEEDBACK" +This document, and the package it describes, will undoubtedly contain +bugs and other problems\&. +Please report such in the category \fIentry::history\fR of the +\fITklib Trackers\fR [http://core\&.tcl\&.tk/tklib/reportlist]\&. +Please also report any ideas for enhancements you may have for either +package and/or documentation\&. +.SH KEYWORDS +entry, history \ No newline at end of file diff --git a/embedded/man/files/modules/ico/ico.n b/embedded/man/files/modules/ico/ico.n new file mode 100644 index 00000000..111f1cea --- /dev/null +++ b/embedded/man/files/modules/ico/ico.n @@ -0,0 +1,498 @@ +'\" +'\" Generated from file 'ico\&.man' by tcllib/doctools with format 'nroff' +'\" +.TH "ico" n 1\&.0\&.5 tklib "Windows ICO handling" +.\" The -*- nroff -*- definitions below are for supplemental macros used +.\" in Tcl/Tk manual entries. +.\" +.\" .AP type name in/out ?indent? +.\" Start paragraph describing an argument to a library procedure. +.\" type is type of argument (int, etc.), in/out is either "in", "out", +.\" or "in/out" to describe whether procedure reads or modifies arg, +.\" and indent is equivalent to second arg of .IP (shouldn't ever be +.\" needed; use .AS below instead) +.\" +.\" .AS ?type? ?name? +.\" Give maximum sizes of arguments for setting tab stops. Type and +.\" name are examples of largest possible arguments that will be passed +.\" to .AP later. If args are omitted, default tab stops are used. +.\" +.\" .BS +.\" Start box enclosure. From here until next .BE, everything will be +.\" enclosed in one large box. +.\" +.\" .BE +.\" End of box enclosure. +.\" +.\" .CS +.\" Begin code excerpt. +.\" +.\" .CE +.\" End code excerpt. +.\" +.\" .VS ?version? ?br? +.\" Begin vertical sidebar, for use in marking newly-changed parts +.\" of man pages. The first argument is ignored and used for recording +.\" the version when the .VS was added, so that the sidebars can be +.\" found and removed when they reach a certain age. If another argument +.\" is present, then a line break is forced before starting the sidebar. +.\" +.\" .VE +.\" End of vertical sidebar. +.\" +.\" .DS +.\" Begin an indented unfilled display. +.\" +.\" .DE +.\" End of indented unfilled display. +.\" +.\" .SO ?manpage? +.\" Start of list of standard options for a Tk widget. The manpage +.\" argument defines where to look up the standard options; if +.\" omitted, defaults to "options". The options follow on successive +.\" lines, in three columns separated by tabs. +.\" +.\" .SE +.\" End of list of standard options for a Tk widget. +.\" +.\" .OP cmdName dbName dbClass +.\" Start of description of a specific option. cmdName gives the +.\" option's name as specified in the class command, dbName gives +.\" the option's name in the option database, and dbClass gives +.\" the option's class in the option database. +.\" +.\" .UL arg1 arg2 +.\" Print arg1 underlined, then print arg2 normally. +.\" +.\" .QW arg1 ?arg2? +.\" Print arg1 in quotes, then arg2 normally (for trailing punctuation). +.\" +.\" .PQ arg1 ?arg2? +.\" Print an open parenthesis, arg1 in quotes, then arg2 normally +.\" (for trailing punctuation) and then a closing parenthesis. +.\" +.\" # Set up traps and other miscellaneous stuff for Tcl/Tk man pages. +.if t .wh -1.3i ^B +.nr ^l \n(.l +.ad b +.\" # Start an argument description +.de AP +.ie !"\\$4"" .TP \\$4 +.el \{\ +. ie !"\\$2"" .TP \\n()Cu +. el .TP 15 +.\} +.ta \\n()Au \\n()Bu +.ie !"\\$3"" \{\ +\&\\$1 \\fI\\$2\\fP (\\$3) +.\".b +.\} +.el \{\ +.br +.ie !"\\$2"" \{\ +\&\\$1 \\fI\\$2\\fP +.\} +.el \{\ +\&\\fI\\$1\\fP +.\} +.\} +.. +.\" # define tabbing values for .AP +.de AS +.nr )A 10n +.if !"\\$1"" .nr )A \\w'\\$1'u+3n +.nr )B \\n()Au+15n +.\" +.if !"\\$2"" .nr )B \\w'\\$2'u+\\n()Au+3n +.nr )C \\n()Bu+\\w'(in/out)'u+2n +.. +.AS Tcl_Interp Tcl_CreateInterp in/out +.\" # BS - start boxed text +.\" # ^y = starting y location +.\" # ^b = 1 +.de BS +.br +.mk ^y +.nr ^b 1u +.if n .nf +.if n .ti 0 +.if n \l'\\n(.lu\(ul' +.if n .fi +.. +.\" # BE - end boxed text (draw box now) +.de BE +.nf +.ti 0 +.mk ^t +.ie n \l'\\n(^lu\(ul' +.el \{\ +.\" Draw four-sided box normally, but don't draw top of +.\" box if the box started on an earlier page. +.ie !\\n(^b-1 \{\ +\h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul' +.\} +.el \}\ +\h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul' +.\} +.\} +.fi +.br +.nr ^b 0 +.. +.\" # VS - start vertical sidebar +.\" # ^Y = starting y location +.\" # ^v = 1 (for troff; for nroff this doesn't matter) +.de VS +.if !"\\$2"" .br +.mk ^Y +.ie n 'mc \s12\(br\s0 +.el .nr ^v 1u +.. +.\" # VE - end of vertical sidebar +.de VE +.ie n 'mc +.el \{\ +.ev 2 +.nf +.ti 0 +.mk ^t +\h'|\\n(^lu+3n'\L'|\\n(^Yu-1v\(bv'\v'\\n(^tu+1v-\\n(^Yu'\h'-|\\n(^lu+3n' +.sp -1 +.fi +.ev +.\} +.nr ^v 0 +.. +.\" # Special macro to handle page bottom: finish off current +.\" # box/sidebar if in box/sidebar mode, then invoked standard +.\" # page bottom macro. +.de ^B +.ev 2 +'ti 0 +'nf +.mk ^t +.if \\n(^b \{\ +.\" Draw three-sided box if this is the box's first page, +.\" draw two sides but no top otherwise. +.ie !\\n(^b-1 \h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c +.el \h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c +.\} +.if \\n(^v \{\ +.nr ^x \\n(^tu+1v-\\n(^Yu +\kx\h'-\\nxu'\h'|\\n(^lu+3n'\ky\L'-\\n(^xu'\v'\\n(^xu'\h'|0u'\c +.\} +.bp +'fi +.ev +.if \\n(^b \{\ +.mk ^y +.nr ^b 2 +.\} +.if \\n(^v \{\ +.mk ^Y +.\} +.. +.\" # DS - begin display +.de DS +.RS +.nf +.sp +.. +.\" # DE - end display +.de DE +.fi +.RE +.sp +.. +.\" # SO - start of list of standard options +.de SO +'ie '\\$1'' .ds So \\fBoptions\\fR +'el .ds So \\fB\\$1\\fR +.SH "STANDARD OPTIONS" +.LP +.nf +.ta 5.5c 11c +.ft B +.. +.\" # SE - end of list of standard options +.de SE +.fi +.ft R +.LP +See the \\*(So manual entry for details on the standard options. +.. +.\" # OP - start of full description for a single option +.de OP +.LP +.nf +.ta 4c +Command-Line Name: \\fB\\$1\\fR +Database Name: \\fB\\$2\\fR +Database Class: \\fB\\$3\\fR +.fi +.IP +.. +.\" # CS - begin code excerpt +.de CS +.RS +.nf +.ta .25i .5i .75i 1i +.. +.\" # CE - end code excerpt +.de CE +.fi +.RE +.. +.\" # UL - underline word +.de UL +\\$1\l'|0\(ul'\\$2 +.. +.\" # QW - apply quotation marks to word +.de QW +.ie '\\*(lq'"' ``\\$1''\\$2 +.\"" fix emacs highlighting +.el \\*(lq\\$1\\*(rq\\$2 +.. +.\" # PQ - apply parens and quotation marks to word +.de PQ +.ie '\\*(lq'"' (``\\$1''\\$2)\\$3 +.\"" fix emacs highlighting +.el (\\*(lq\\$1\\*(rq\\$2)\\$3 +.. +.\" # QR - quoted range +.de QR +.ie '\\*(lq'"' ``\\$1''\\-``\\$2''\\$3 +.\"" fix emacs highlighting +.el \\*(lq\\$1\\*(rq\\-\\*(lq\\$2\\*(rq\\$3 +.. +.\" # MT - "empty" string +.de MT +.QW "" +.. +.BS +.SH NAME +ico \- Reading and writing windows icons +.SH SYNOPSIS +package require \fBTcl 8\&.4\fR +.sp +package require \fBico ?1\&.0\&.5?\fR +.sp +\fB::ico::icons\fR \fIfile\fR ?\fIoption\fR \fIvalue\fR\&.\&.\&.? +.sp +\fB::ico::iconMembers\fR \fIfile\fR \fIname\fR ?\fIoption\fR \fIvalue\fR\&.\&.\&.? +.sp +\fB::ico::getIcon\fR \fIfile\fR \fIname\fR ?\fIoption\fR \fIvalue\fR\&.\&.\&.? +.sp +\fB::ico::getIconByName\fR \fIfile\fR \fIname\fR ?\fIoption\fR \fIvalue\fR\&.\&.\&.? +.sp +\fB::ico::getFileIcon\fR \fIfile\fR ?\fIoption\fR \fIvalue\fR\&.\&.\&.? +.sp +\fB::ico::writeIcon\fR \fIfile\fR \fIname\fR \fIdepth\fR \fIdata\fR ?\fIoption\fR \fIvalue\fR\&.\&.\&.? +.sp +\fB::ico::copyIcon\fR \fIfile\fR \fIindex\fR \fIfile2\fR \fIindex2\fR ?\fIoption\fR \fIvalue\fR\&.\&.\&.? +.sp +\fB::ico::EXEtoICO\fR \fIfile\fR ?dir? +.sp +\fB::ico::clearCache\fR ?file? +.sp +\fB::ico::transparentColor\fR \fIimage\fR \fIcolor\fR +.sp +\fB::ico::Show\fR \fIfile\fR ?\fIoption\fR \fIvalue\fR\&.\&.\&.? +.sp +.BE +.SH DESCRIPTION +This package provides functions for reading and writing Windows icons +from ICO, EXE, DLL, ICL, and BMP files\&. +As used in this module an icon is a visual representation of an object\&. +An icon consists of one or more images usually with varying resolution +and color depth\&. Each icon and image has a resource identifier which +may be a text string or a positive integer value\&. Most commands use this +identifier to specify which icon or image to operate on\&. +.SH API +.TP +\fB::ico::icons\fR \fIfile\fR ?\fIoption\fR \fIvalue\fR\&.\&.\&.? +Returns a list of icons found in \fIfile\fR where each element is the +name or numeric ID\&. Recognizes the following options: +.RS +.TP +\fB-type\fR fileFormat +.RE +.sp +.TP +\fB::ico::iconMembers\fR \fIfile\fR \fIname\fR ?\fIoption\fR \fIvalue\fR\&.\&.\&.? +Returns a list of images that make up the icon with ID \fIname\fR\&. Each element is itself a +sublist in the format {name width height bpp}\&. Recognizes the following options: +.RS +.TP +\fB-type\fR fileFormat +.RE +.sp +.TP +\fB::ico::getIcon\fR \fIfile\fR \fIname\fR ?\fIoption\fR \fIvalue\fR\&.\&.\&.? +Extracts the icon with ID \fIname\fR from \fIfile\fR\&. +The default \fB-format\fR is \fBimage\fR which will return the +name of a Tk image containing the icon\&. The resolution and color depth +are selected with the ?-res?, ?-bpp?, and ?-exact? options\&. +If -exact is specified and there is no exact match, an error is thrown\&. +Optionally \fB-image\fR may be used to specify the name of the Tk +image that is created\&. If \fB-format\fR is \fBcolors\fR then a +list of color names in the #RRGGBB format is returned\&. Each list element +is a horizontal row\&. Each horizontal row contains a list of colors for +all the pixels in that row from left to right\&. If \fB-format\fR is +\fBname\fR then the resource name of the image chosen is returned\&. +This is useful for calling writeIcon or getIconByName\&. +Recognizes the following \fIoption\fRs\&. +.RS +.TP +\fB-type\fR fileFormat +.TP +\fB-format\fR value +.TP +\fB-image\fR value +.TP +\fB-res\fR value +.TP +\fB-bpp\fR value +.TP +\fB-exact\fR value +.RE +.sp +.TP +\fB::ico::getIconByName\fR \fIfile\fR \fIname\fR ?\fIoption\fR \fIvalue\fR\&.\&.\&.? +Extracts the image with ID \fIname\fR from \fIfile\fR\&. This name should be the name of a +specific image as returned by \fB::ico::iconMembers\fR, not an icon name returned from +\fB::ico::icons\fR\&. If there is no matching resource ID +in \fIfile\fR an error is thrown\&. Recognizes the following options: +.RS +.TP +\fB-type\fR fileFormat +.TP +\fB-format\fR value +.RE +.sp +.TP +\fB::ico::getFileIcon\fR \fIfile\fR ?\fIoption\fR \fIvalue\fR\&.\&.\&.? +This command is only functional when running under Windows\&. It reads the Windows +registry to determine the display icon for \fIfile\fR as it would appear in Explorer +or similar\&. \fIfile\fR does not need to exist and may also be specified as a file +extension with a leading dot\&. If \fIfile\fR is a directory or you specify the +special name \fBFolder\fR then the icon representing a folder is returned\&. This +command takes the same arguments and usage as \fBgetIcon\fR: +.RS +.TP +\fB-format\fR value +.TP +\fB-image\fR value +.TP +\fB-res\fR value +.TP +\fB-bpp\fR value +.TP +\fB-exact\fR value +.RE +.sp +.TP +\fB::ico::writeIcon\fR \fIfile\fR \fIname\fR \fIdepth\fR \fIdata\fR ?\fIoption\fR \fIvalue\fR\&.\&.\&.? +Writes an image to \fIfile\fR\&. \fIname\fR is the resource identifier of the +image in \fIfile\fR to write\&. +When writing to an EXE, DLL, or ICL file you may only overwrite existing icons with an +icon of the same dimensions and color depth\&. No icons may be added to these file types\&. +.sp +When writing to BMP the name is ignored as this type can contain only one image\&. This means +if the file already existed it is completely overwritten\&. +.sp +When writing to an ICO or ICODATA file if the name +specified does not exist then an image is appended and will be named the next in sequence +(the specified name is ignored)\&. Images in ICO and ICODATA files may be overwritten with differing +dimensions or color depths\&. +Note that you will get strange results when displaying icons if you fail to change every image +which makes up a given icon\&. +.RS +.TP +integer \fIdepth\fR (in) +This argument must have a value of \fB1\fR, \fB4\fR, \fB8\fR, +\fB24\fR, or \fB32\fR\&. If \fIdata\fR has more colors than the +color depth allows an error will be generated\&. +.TP +options \fIdata\fR (in) +This argument is either a list of colors in the format returned by +\fB::ico::getIcon -format colors\fR or the name of a Tk image\&. +.RE +.sp +Recognizes the following \fIoption\fRs\&. +.RS +.TP +\fB-type\fR fileFormat +.RE +.sp +.TP +\fB::ico::copyIcon\fR \fIfile\fR \fIindex\fR \fIfile2\fR \fIindex2\fR ?\fIoption\fR \fIvalue\fR\&.\&.\&.? +Copies the icon at \fIindex\fR in \fIfile\fR to \fIindex2\fR in \fIfile2\fR\&. +.RS +.TP +\fB-fromtype\fR fileFormat +.TP +\fB-totype\fR fileFormat +.RE +.sp +.TP +\fB::ico::EXEtoICO\fR \fIfile\fR ?dir? +Extracts all icons from the executable \fIfile\fR to ICO files placed in \fIdir\fR\&. ?dir? defaults to the directory \fIfile\fR is located in\&. Icon files will be named in the form \fIfile\fR-ID\&.ico where ID is the icon resource identifier\&. +.RS +.TP +\fB-type\fR fileFormat +.RE +.sp +.TP +\fB::ico::clearCache\fR ?file? +The \fB::ico::getIconList\fR command caches icon offsets inside EXE, DLL, ICL, +and ICO files in order to speed up extraction\&. This command clears that +cache for the specific ?file? or all files\&. +.TP +\fB::ico::transparentColor\fR \fIimage\fR \fIcolor\fR +If \fIimage\fR is a single word it is assumed to be the name of a Tk image\&. +All pixels matching \fIcolor\fR in the \fIimage\fR will be set transparent\&. +Alternatively, \fIimage\fR may be a color list in which case a modified list +is returned\&. +.TP +\fB::ico::Show\fR \fIfile\fR ?\fIoption\fR \fIvalue\fR\&.\&.\&.? +Application level command which displays a window showing all the +icons in \fIfile\fR and their name\&. +.RS +.TP +\fB-type\fR fileFormat +.TP +\fB-parent\fR pathName +.RE +.PP +.SH EXAMPLE +.CS + + + button \&.explore -image [::ico::getIcon explorer\&.exe 0 -name explore -res 16 -bpp 8] + + set i [lsearch -inline [::ico::iconMembers tclkit\&.exe 0] {* 32 32 8}] + set colorlist [::ico::getIconByName tclkit\&.exe [lindex $i 0] -format colors] + +.CE +.SH LIMITATIONS +Icons may not be added or removed from file types other than ICO\&. Icons in these files +may only be replaced with icons of the same dimensions and color depth\&. +.PP +Icons of 8bpp or lower must include black in the pallete, this means if your icon does +not have black in it, you will need to leave a color free so that it may be included by +writeIcon\&. +.PP +There is currently no way to read alpha channel information from 32bpp icons\&. +.PP +Tk images do not have an alpha channel so the only way to write a true 32bpp icon is from +a color list\&. writing a 32bpp icon from a Tkimage is identical to writing a 24bpp icon\&. +.SH "BUGS, IDEAS, FEEDBACK" +This document, and the package it describes, will undoubtedly contain +bugs and other problems\&. +Please report such in the category \fIico\fR of the +\fITklib Trackers\fR [http://core\&.tcl\&.tk/tklib/reportlist]\&. +Please also report any ideas for enhancements you may have for either +package and/or documentation\&. +.SH KEYWORDS +dll, entry, exe, ico, icon \ No newline at end of file diff --git a/embedded/man/files/modules/ipentry/ipentry.n b/embedded/man/files/modules/ipentry/ipentry.n new file mode 100644 index 00000000..88be882c --- /dev/null +++ b/embedded/man/files/modules/ipentry/ipentry.n @@ -0,0 +1,506 @@ +'\" +'\" Generated from file 'ipentry\&.man' by tcllib/doctools with format 'nroff' +'\" +.TH "ipentry" n 0\&.3 tklib "An IP address entry widget" +.\" The -*- nroff -*- definitions below are for supplemental macros used +.\" in Tcl/Tk manual entries. +.\" +.\" .AP type name in/out ?indent? +.\" Start paragraph describing an argument to a library procedure. +.\" type is type of argument (int, etc.), in/out is either "in", "out", +.\" or "in/out" to describe whether procedure reads or modifies arg, +.\" and indent is equivalent to second arg of .IP (shouldn't ever be +.\" needed; use .AS below instead) +.\" +.\" .AS ?type? ?name? +.\" Give maximum sizes of arguments for setting tab stops. Type and +.\" name are examples of largest possible arguments that will be passed +.\" to .AP later. If args are omitted, default tab stops are used. +.\" +.\" .BS +.\" Start box enclosure. From here until next .BE, everything will be +.\" enclosed in one large box. +.\" +.\" .BE +.\" End of box enclosure. +.\" +.\" .CS +.\" Begin code excerpt. +.\" +.\" .CE +.\" End code excerpt. +.\" +.\" .VS ?version? ?br? +.\" Begin vertical sidebar, for use in marking newly-changed parts +.\" of man pages. The first argument is ignored and used for recording +.\" the version when the .VS was added, so that the sidebars can be +.\" found and removed when they reach a certain age. If another argument +.\" is present, then a line break is forced before starting the sidebar. +.\" +.\" .VE +.\" End of vertical sidebar. +.\" +.\" .DS +.\" Begin an indented unfilled display. +.\" +.\" .DE +.\" End of indented unfilled display. +.\" +.\" .SO ?manpage? +.\" Start of list of standard options for a Tk widget. The manpage +.\" argument defines where to look up the standard options; if +.\" omitted, defaults to "options". The options follow on successive +.\" lines, in three columns separated by tabs. +.\" +.\" .SE +.\" End of list of standard options for a Tk widget. +.\" +.\" .OP cmdName dbName dbClass +.\" Start of description of a specific option. cmdName gives the +.\" option's name as specified in the class command, dbName gives +.\" the option's name in the option database, and dbClass gives +.\" the option's class in the option database. +.\" +.\" .UL arg1 arg2 +.\" Print arg1 underlined, then print arg2 normally. +.\" +.\" .QW arg1 ?arg2? +.\" Print arg1 in quotes, then arg2 normally (for trailing punctuation). +.\" +.\" .PQ arg1 ?arg2? +.\" Print an open parenthesis, arg1 in quotes, then arg2 normally +.\" (for trailing punctuation) and then a closing parenthesis. +.\" +.\" # Set up traps and other miscellaneous stuff for Tcl/Tk man pages. +.if t .wh -1.3i ^B +.nr ^l \n(.l +.ad b +.\" # Start an argument description +.de AP +.ie !"\\$4"" .TP \\$4 +.el \{\ +. ie !"\\$2"" .TP \\n()Cu +. el .TP 15 +.\} +.ta \\n()Au \\n()Bu +.ie !"\\$3"" \{\ +\&\\$1 \\fI\\$2\\fP (\\$3) +.\".b +.\} +.el \{\ +.br +.ie !"\\$2"" \{\ +\&\\$1 \\fI\\$2\\fP +.\} +.el \{\ +\&\\fI\\$1\\fP +.\} +.\} +.. +.\" # define tabbing values for .AP +.de AS +.nr )A 10n +.if !"\\$1"" .nr )A \\w'\\$1'u+3n +.nr )B \\n()Au+15n +.\" +.if !"\\$2"" .nr )B \\w'\\$2'u+\\n()Au+3n +.nr )C \\n()Bu+\\w'(in/out)'u+2n +.. +.AS Tcl_Interp Tcl_CreateInterp in/out +.\" # BS - start boxed text +.\" # ^y = starting y location +.\" # ^b = 1 +.de BS +.br +.mk ^y +.nr ^b 1u +.if n .nf +.if n .ti 0 +.if n \l'\\n(.lu\(ul' +.if n .fi +.. +.\" # BE - end boxed text (draw box now) +.de BE +.nf +.ti 0 +.mk ^t +.ie n \l'\\n(^lu\(ul' +.el \{\ +.\" Draw four-sided box normally, but don't draw top of +.\" box if the box started on an earlier page. +.ie !\\n(^b-1 \{\ +\h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul' +.\} +.el \}\ +\h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul' +.\} +.\} +.fi +.br +.nr ^b 0 +.. +.\" # VS - start vertical sidebar +.\" # ^Y = starting y location +.\" # ^v = 1 (for troff; for nroff this doesn't matter) +.de VS +.if !"\\$2"" .br +.mk ^Y +.ie n 'mc \s12\(br\s0 +.el .nr ^v 1u +.. +.\" # VE - end of vertical sidebar +.de VE +.ie n 'mc +.el \{\ +.ev 2 +.nf +.ti 0 +.mk ^t +\h'|\\n(^lu+3n'\L'|\\n(^Yu-1v\(bv'\v'\\n(^tu+1v-\\n(^Yu'\h'-|\\n(^lu+3n' +.sp -1 +.fi +.ev +.\} +.nr ^v 0 +.. +.\" # Special macro to handle page bottom: finish off current +.\" # box/sidebar if in box/sidebar mode, then invoked standard +.\" # page bottom macro. +.de ^B +.ev 2 +'ti 0 +'nf +.mk ^t +.if \\n(^b \{\ +.\" Draw three-sided box if this is the box's first page, +.\" draw two sides but no top otherwise. +.ie !\\n(^b-1 \h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c +.el \h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c +.\} +.if \\n(^v \{\ +.nr ^x \\n(^tu+1v-\\n(^Yu +\kx\h'-\\nxu'\h'|\\n(^lu+3n'\ky\L'-\\n(^xu'\v'\\n(^xu'\h'|0u'\c +.\} +.bp +'fi +.ev +.if \\n(^b \{\ +.mk ^y +.nr ^b 2 +.\} +.if \\n(^v \{\ +.mk ^Y +.\} +.. +.\" # DS - begin display +.de DS +.RS +.nf +.sp +.. +.\" # DE - end display +.de DE +.fi +.RE +.sp +.. +.\" # SO - start of list of standard options +.de SO +'ie '\\$1'' .ds So \\fBoptions\\fR +'el .ds So \\fB\\$1\\fR +.SH "STANDARD OPTIONS" +.LP +.nf +.ta 5.5c 11c +.ft B +.. +.\" # SE - end of list of standard options +.de SE +.fi +.ft R +.LP +See the \\*(So manual entry for details on the standard options. +.. +.\" # OP - start of full description for a single option +.de OP +.LP +.nf +.ta 4c +Command-Line Name: \\fB\\$1\\fR +Database Name: \\fB\\$2\\fR +Database Class: \\fB\\$3\\fR +.fi +.IP +.. +.\" # CS - begin code excerpt +.de CS +.RS +.nf +.ta .25i .5i .75i 1i +.. +.\" # CE - end code excerpt +.de CE +.fi +.RE +.. +.\" # UL - underline word +.de UL +\\$1\l'|0\(ul'\\$2 +.. +.\" # QW - apply quotation marks to word +.de QW +.ie '\\*(lq'"' ``\\$1''\\$2 +.\"" fix emacs highlighting +.el \\*(lq\\$1\\*(rq\\$2 +.. +.\" # PQ - apply parens and quotation marks to word +.de PQ +.ie '\\*(lq'"' (``\\$1''\\$2)\\$3 +.\"" fix emacs highlighting +.el (\\*(lq\\$1\\*(rq\\$2)\\$3 +.. +.\" # QR - quoted range +.de QR +.ie '\\*(lq'"' ``\\$1''\\-``\\$2''\\$3 +.\"" fix emacs highlighting +.el \\*(lq\\$1\\*(rq\\-\\*(lq\\$2\\*(rq\\$3 +.. +.\" # MT - "empty" string +.de MT +.QW "" +.. +.BS +.SH NAME +ipentry \- An IP address entry widget +.SH SYNOPSIS +package require \fBTcl 8\&.4\fR +.sp +package require \fBTk 8\&.4\fR +.sp +package require \fBipentry ?0\&.3?\fR +.sp +\fB::ipentry::ipentry\fR \fIpathName\fR ?\fIoption\fR \fIvalue\fR\&.\&.\&.? +.sp +\fB::ipentry::ipentry6\fR \fIpathName\fR ?\fIoption\fR \fIvalue\fR\&.\&.\&.? +.sp +\fIpathName\fR \fBcomplete\fR +.sp +\fIpathName\fR \fBget\fR +.sp +\fIpathName\fR \fBinsert\fR \fIiplist\fR +.sp +\fIpathName\fR \fBicursor\fR \fIindex\fR +.sp +\fIpathName\fR \fBconfigure\fR \fIoption\fR \fIvalue\fR\&.\&.\&. +.sp +\fIpathName\fR \fBcget\fR \fIoption\fR +.sp +.BE +.SH DESCRIPTION +This package provides a widget for the entering of a IP address\&. +.PP +.TP +\fB::ipentry::ipentry\fR \fIpathName\fR ?\fIoption\fR \fIvalue\fR\&.\&.\&.? +Creates a new IPv4 ipentry widget and configures it with the given options and +their values\&. +.TP +\fB::ipentry::ipentry6\fR \fIpathName\fR ?\fIoption\fR \fIvalue\fR\&.\&.\&.? +Creates a new ipentry widget for the entry of an IPv6 address\&. All options +are the same as the IPv4 widget\&. +.PP +Each widget created with the command above supports the following methods: +.TP +\fIpathName\fR \fBcomplete\fR +Returns a boolean value\&. True indicates that the entry contains a +complete IP address, meaning all fields have a value\&. In some cases +IPv6 address are valid when fields are missing\&. You will need to do your +own validation to detect this\&. +.TP +\fIpathName\fR \fBget\fR +Returns the contents of the entry as a list consisting of 4 or 8 elements\&. +.TP +\fIpathName\fR \fBinsert\fR \fIiplist\fR +IPv4 +Takes a list of 4 elements and inserts one into each quad of the entry, in order\&. +All values in the list must be empty or integers\&. Values outside the range 0 to 255 +are modified to be within the range\&. +IPv6 +Takes a list of 8 elements and inserts one into each quad of the entry, in order\&. +All values in the list must be empty or 1 to 4 hex digits\&. +.TP +\fIpathName\fR \fBicursor\fR \fIindex\fR +Sets the position of the widgets insertion cursor\&. Only integer values between +0 and 15 are valid for ipentry and 0 to 31 for ipentry6\&. +Setting the icursor will only have an effect if the widget +already has the input focus\&. +.TP +\fIpathName\fR \fBconfigure\fR \fIoption\fR \fIvalue\fR\&.\&.\&. +Modifies the configuration of the widget\&. For options and +their meaning see the widget options section\&. +.TP +\fIpathName\fR \fBcget\fR \fIoption\fR +Returns information about the current configuration of the widget, for +the specified option\&. For options and their meaning see the widget +options section\&. +.PP +.SH "WIDGET OPTIONS" +.LP +.nf +.ta 6c +Command-Line Switch: \fB-textvariable\fR +Database Name: \fBtextvariable\fR +Database Class: \fBVariable\fR + +.fi +.IP +The name of a variable which holds the value of the IP address\&. +The value must be a string of the form NNN\&.NNN\&.NNN\&.NNN for IPv4 or +HHHH:HHHH:HHHH:HHHH:HHHH:HHHH:HHHH:HHHH for IPv6 where H is a hex digit\&. +The variable will be modified to represent a valid IP address if it is not +already\&. +.LP +.nf +.ta 6c +Command-Line Switch: \fB-state\fR +Database Name: \fBstate\fR +Database Class: \fBState\fR + +.fi +.IP +Specifies one of three states for the entry: \fBnormal\fR, +\fBdisabled\fR, or \fBreadonly\fR\&. +.LP +.nf +.ta 6c +Command-Line Switch: \fB-font\fR +Database Name: \fBfont\fR +Database Class: \fBFont\fR + +.fi +.LP +.nf +.ta 6c +Command-Line Switch: \fB-bd\fR +Database Name: \fBborderWidth\fR +Database Class: \fBBorderWidth\fR + +.fi +.LP +.nf +.ta 6c +Command-Line Switch: \fB-fg\fR +Database Name: \fBforeground\fR +Database Class: \fBForeground\fR + +.fi +.LP +.nf +.ta 6c +Command-Line Switch: \fB-bg\fR +Database Name: \fBbackground\fR +Database Class: \fBBackground\fR + +.fi +.LP +.nf +.ta 6c +Command-Line Switch: \fB-relief\fR +Database Name: \fBrelief\fR +Database Class: \fBRelief\fR + +.fi +.LP +.nf +.ta 6c +Command-Line Switch: \fB-highlightthickness\fR +Database Name: \fBhighlightThickness\fR +Database Class: \fBHighlightThickness\fR + +.fi +.LP +.nf +.ta 6c +Command-Line Switch: \fB-highlightcolor\fR +Database Name: \fBhighlightColor\fR +Database Class: \fBHighlightColor\fR + +.fi +.LP +.nf +.ta 6c +Command-Line Switch: \fB-highlightbackground\fR +Database Name: \fBhighlightBackground\fR +Database Class: \fBHighlightBackground\fR + +.fi +.LP +.nf +.ta 6c +Command-Line Switch: \fB-selectbackground\fR +Database Name: \fBselectBackground\fR +Database Class: \fBBackground\fR + +.fi +.LP +.nf +.ta 6c +Command-Line Switch: \fB-selectforeground\fR +Database Name: \fBselectForeground\fR +Database Class: \fBForeground\fR + +.fi +.LP +.nf +.ta 6c +Command-Line Switch: \fB-selectborderwidth\fR +Database Name: \fBselectBorderWidth\fR +Database Class: \fBBorderWidth\fR + +.fi +.LP +.nf +.ta 6c +Command-Line Switch: \fB-disabledbackground\fR +Database Name: \fBdisabledBackground\fR +Database Class: \fBDisabledBackground\fR + +.fi +.LP +.nf +.ta 6c +Command-Line Switch: \fB-disabledforeground\fR +Database Name: \fBdisabledForeground\fR +Database Class: \fBDisabledForeground\fR + +.fi +.LP +.nf +.ta 6c +Command-Line Switch: \fB-readonlybackground\fR +Database Name: \fBreadonlyBackground\fR +Database Class: \fBReadonlyBackground\fR + +.fi +.LP +.nf +.ta 6c +Command-Line Switch: \fB-insertbackground\fR +Database Name: \fBinsertBackground\fR +Database Class: \fBBackground\fR + +.fi +.IP +Standard widget options\&. See \fBoptions\fR for a description of their +meanings and values\&. +.PP +.SH "BUGS, IDEAS, FEEDBACK" +This document, and the package it describes, will undoubtedly contain +bugs and other problems\&. +Please report such in the category \fIipentry\fR of the +\fITklib Trackers\fR [http://core\&.tcl\&.tk/tklib/reportlist]\&. +Please also report any ideas for enhancements you may have for either +package and/or documentation\&. +.SH KEYWORDS +entry, ip address, network +.SH CATEGORY +Widget \ No newline at end of file diff --git a/embedded/man/files/modules/khim/khim.n b/embedded/man/files/modules/khim/khim.n new file mode 100644 index 00000000..41fcdc93 --- /dev/null +++ b/embedded/man/files/modules/khim/khim.n @@ -0,0 +1,447 @@ +'\" +'\" Generated from file 'khim\&.man' by tcllib/doctools with format 'nroff' +'\" +.TH "khim" n 1\&.0 tklib "Kevin's Hacky Input Method" +.\" The -*- nroff -*- definitions below are for supplemental macros used +.\" in Tcl/Tk manual entries. +.\" +.\" .AP type name in/out ?indent? +.\" Start paragraph describing an argument to a library procedure. +.\" type is type of argument (int, etc.), in/out is either "in", "out", +.\" or "in/out" to describe whether procedure reads or modifies arg, +.\" and indent is equivalent to second arg of .IP (shouldn't ever be +.\" needed; use .AS below instead) +.\" +.\" .AS ?type? ?name? +.\" Give maximum sizes of arguments for setting tab stops. Type and +.\" name are examples of largest possible arguments that will be passed +.\" to .AP later. If args are omitted, default tab stops are used. +.\" +.\" .BS +.\" Start box enclosure. From here until next .BE, everything will be +.\" enclosed in one large box. +.\" +.\" .BE +.\" End of box enclosure. +.\" +.\" .CS +.\" Begin code excerpt. +.\" +.\" .CE +.\" End code excerpt. +.\" +.\" .VS ?version? ?br? +.\" Begin vertical sidebar, for use in marking newly-changed parts +.\" of man pages. The first argument is ignored and used for recording +.\" the version when the .VS was added, so that the sidebars can be +.\" found and removed when they reach a certain age. If another argument +.\" is present, then a line break is forced before starting the sidebar. +.\" +.\" .VE +.\" End of vertical sidebar. +.\" +.\" .DS +.\" Begin an indented unfilled display. +.\" +.\" .DE +.\" End of indented unfilled display. +.\" +.\" .SO ?manpage? +.\" Start of list of standard options for a Tk widget. The manpage +.\" argument defines where to look up the standard options; if +.\" omitted, defaults to "options". The options follow on successive +.\" lines, in three columns separated by tabs. +.\" +.\" .SE +.\" End of list of standard options for a Tk widget. +.\" +.\" .OP cmdName dbName dbClass +.\" Start of description of a specific option. cmdName gives the +.\" option's name as specified in the class command, dbName gives +.\" the option's name in the option database, and dbClass gives +.\" the option's class in the option database. +.\" +.\" .UL arg1 arg2 +.\" Print arg1 underlined, then print arg2 normally. +.\" +.\" .QW arg1 ?arg2? +.\" Print arg1 in quotes, then arg2 normally (for trailing punctuation). +.\" +.\" .PQ arg1 ?arg2? +.\" Print an open parenthesis, arg1 in quotes, then arg2 normally +.\" (for trailing punctuation) and then a closing parenthesis. +.\" +.\" # Set up traps and other miscellaneous stuff for Tcl/Tk man pages. +.if t .wh -1.3i ^B +.nr ^l \n(.l +.ad b +.\" # Start an argument description +.de AP +.ie !"\\$4"" .TP \\$4 +.el \{\ +. ie !"\\$2"" .TP \\n()Cu +. el .TP 15 +.\} +.ta \\n()Au \\n()Bu +.ie !"\\$3"" \{\ +\&\\$1 \\fI\\$2\\fP (\\$3) +.\".b +.\} +.el \{\ +.br +.ie !"\\$2"" \{\ +\&\\$1 \\fI\\$2\\fP +.\} +.el \{\ +\&\\fI\\$1\\fP +.\} +.\} +.. +.\" # define tabbing values for .AP +.de AS +.nr )A 10n +.if !"\\$1"" .nr )A \\w'\\$1'u+3n +.nr )B \\n()Au+15n +.\" +.if !"\\$2"" .nr )B \\w'\\$2'u+\\n()Au+3n +.nr )C \\n()Bu+\\w'(in/out)'u+2n +.. +.AS Tcl_Interp Tcl_CreateInterp in/out +.\" # BS - start boxed text +.\" # ^y = starting y location +.\" # ^b = 1 +.de BS +.br +.mk ^y +.nr ^b 1u +.if n .nf +.if n .ti 0 +.if n \l'\\n(.lu\(ul' +.if n .fi +.. +.\" # BE - end boxed text (draw box now) +.de BE +.nf +.ti 0 +.mk ^t +.ie n \l'\\n(^lu\(ul' +.el \{\ +.\" Draw four-sided box normally, but don't draw top of +.\" box if the box started on an earlier page. +.ie !\\n(^b-1 \{\ +\h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul' +.\} +.el \}\ +\h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul' +.\} +.\} +.fi +.br +.nr ^b 0 +.. +.\" # VS - start vertical sidebar +.\" # ^Y = starting y location +.\" # ^v = 1 (for troff; for nroff this doesn't matter) +.de VS +.if !"\\$2"" .br +.mk ^Y +.ie n 'mc \s12\(br\s0 +.el .nr ^v 1u +.. +.\" # VE - end of vertical sidebar +.de VE +.ie n 'mc +.el \{\ +.ev 2 +.nf +.ti 0 +.mk ^t +\h'|\\n(^lu+3n'\L'|\\n(^Yu-1v\(bv'\v'\\n(^tu+1v-\\n(^Yu'\h'-|\\n(^lu+3n' +.sp -1 +.fi +.ev +.\} +.nr ^v 0 +.. +.\" # Special macro to handle page bottom: finish off current +.\" # box/sidebar if in box/sidebar mode, then invoked standard +.\" # page bottom macro. +.de ^B +.ev 2 +'ti 0 +'nf +.mk ^t +.if \\n(^b \{\ +.\" Draw three-sided box if this is the box's first page, +.\" draw two sides but no top otherwise. +.ie !\\n(^b-1 \h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c +.el \h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c +.\} +.if \\n(^v \{\ +.nr ^x \\n(^tu+1v-\\n(^Yu +\kx\h'-\\nxu'\h'|\\n(^lu+3n'\ky\L'-\\n(^xu'\v'\\n(^xu'\h'|0u'\c +.\} +.bp +'fi +.ev +.if \\n(^b \{\ +.mk ^y +.nr ^b 2 +.\} +.if \\n(^v \{\ +.mk ^Y +.\} +.. +.\" # DS - begin display +.de DS +.RS +.nf +.sp +.. +.\" # DE - end display +.de DE +.fi +.RE +.sp +.. +.\" # SO - start of list of standard options +.de SO +'ie '\\$1'' .ds So \\fBoptions\\fR +'el .ds So \\fB\\$1\\fR +.SH "STANDARD OPTIONS" +.LP +.nf +.ta 5.5c 11c +.ft B +.. +.\" # SE - end of list of standard options +.de SE +.fi +.ft R +.LP +See the \\*(So manual entry for details on the standard options. +.. +.\" # OP - start of full description for a single option +.de OP +.LP +.nf +.ta 4c +Command-Line Name: \\fB\\$1\\fR +Database Name: \\fB\\$2\\fR +Database Class: \\fB\\$3\\fR +.fi +.IP +.. +.\" # CS - begin code excerpt +.de CS +.RS +.nf +.ta .25i .5i .75i 1i +.. +.\" # CE - end code excerpt +.de CE +.fi +.RE +.. +.\" # UL - underline word +.de UL +\\$1\l'|0\(ul'\\$2 +.. +.\" # QW - apply quotation marks to word +.de QW +.ie '\\*(lq'"' ``\\$1''\\$2 +.\"" fix emacs highlighting +.el \\*(lq\\$1\\*(rq\\$2 +.. +.\" # PQ - apply parens and quotation marks to word +.de PQ +.ie '\\*(lq'"' (``\\$1''\\$2)\\$3 +.\"" fix emacs highlighting +.el (\\*(lq\\$1\\*(rq\\$2)\\$3 +.. +.\" # QR - quoted range +.de QR +.ie '\\*(lq'"' ``\\$1''\\-``\\$2''\\$3 +.\"" fix emacs highlighting +.el \\*(lq\\$1\\*(rq\\-\\*(lq\\$2\\*(rq\\$3 +.. +.\" # MT - "empty" string +.de MT +.QW "" +.. +.BS +.SH NAME +khim \- Provides key bindings for entering international characters on a keyboard that does not support them +.SH SYNOPSIS +package require \fBTcl \fR +.sp +package require \fBkhim ?1\&.0?\fR +.sp +\fB::khim::getOptions\fR \fIpath\fR +.sp +\fB::khim::getConfig\fR +.sp +\fB::khim::setConfig\fR \fIversion\fR \fIenabled\fR \fIcompose\fR \fImap\fR +.sp +\fB::khim::showHelp\fR \fIpath\fR +.sp +.BE +.SH DESCRIPTION +This package provides a set of key bindings to allow +a user to enter arbitrary characters on a keyboard that +does not support them\&. It works by designating some seldom-used key +of the keyboard as a "Compose" key (this key is distinct from any key +so labeled, and is often "Pause," "F12" or "L2"), and having the +"Compose" key, followed by a two-key sequence, have the effect of +inserting some character in a widget\&. +In addition, the "Compose" key, when struck twice in succession, +brings up a dialog containing a Unicode character map, allowing +arbitrary characters to be inserted\&. +.PP +The vast bulk of the package's functionality is implemented in a +single bindtag, \fBKHIM\fR\&. An application can request that any +text or entry widget use the package to allow for entry of arbitrary +characters by placing this binding tag ahead of the \fBText\fR or +\fBEntry\fR binding tag for the widget: +.CS + + +text \&.t -width 80 -height 24 +bindtags \&.t {\&.t KHIM Text \&. all} + +.CE +Note that the \fBKHIM\fR tag must precede the \fBText\fR or +\fBEntry\fR class binding, or the package will not function +correctly\&. +.SH PROCEDURES +In addition to commands supporting the KHIM binding tag, the following +commands are exported from the package: +.TP +\fB::khim::getOptions\fR \fIpath\fR +Posts a top-level modal dialog with the path name \fIpath\fR that +prompts the user for KHIM options\&. The user is allowed to reconfigure +the key sequences for the "Compose" key, change the choice of key to +use for the "Compose" function, and enable/disable the KHIM key +bindings entirely\&. +.TP +\fB::khim::getConfig\fR +Returns a Tcl script that restores the current configuration of KHIM: +the enabled/disabled state, the choice of "Compose" key, and the key +sequences that may be composed\&. This script is designed to be +saved to a configuration file for use in a subsequent invocation of +the same application: +.CS + + +# Save KHIM configuration +set f [open ~/\&.khimrc w] +puts $f [::khim::getConfig] +close $f + +# Restore KHIM configuration +source ~/\&.khimrc + +.CE +.TP +\fB::khim::setConfig\fR \fIversion\fR \fIenabled\fR \fIcompose\fR \fImap\fR +Restores an earlier saved configuration\&. Few, if any, applications +will call this command in any other way than to evaluate it as +returned from \fB::khim::getConfig\fR\&. +.TP +\fB::khim::showHelp\fR \fIpath\fR +Displays a top-level dialog giving user-level help for KHIM; the +dialog will have the path name \fIpath\fR\&. +.PP +.SH LOCALISATION +.PP +Programmers who wish to make KHIM available in a non-English-speaking +locale may do so by providing a \fB\&.msg\fR file with the appropriate +localised text\&. The catalog requires the following messages: +.TP +\fBApply\fR +Text that will appear on the "Apply" button in the dialog that sets +KHIM options\&. +.TP +\fBCancel\fR +Text that will appear on the "Cancel" button in several dialogs\&. +.TP +\fBChange\fR +Text that will appear on the "Change" button, which alters the binding +of a pair of composed characters (creating or replacing as +appropriate)\&. +.TP +\fBCharacter\fR +Text that will appear on the label of the entry widget that accepts a +character resulting from a composed sequence\&. +.TP +\fB{Compose Key}\fR +Window title for a dialog that prompts the user to strike the key that +will be used for the "Compose" key\&. +.TP +\fB{Compose key:}\fR +Label that identifies a component showing the "Compose" key choice in +the KHIM options dialog\&. +.TP +\fB{Composed sequence must be two characters long}\fR +Error message that is displayed if the user attempts to define a +"Compose" sequence that is shorter or longer than two characters\&. +.TP +\fBDelete\fR +Text for a button that deletes a "Compose" sequence\&. +.TP +\fBHelp\&.\&.\&.\fR +Text for a button that displays the KHIM user help dialog\&. +.TP +\fBHELPTEXT\fR +Complete text for the user-level help for KHIM\&. Refer to +"\fIen\&.msg\fR" for the English-language version of the help\&. +.TP +\fB{Input key sequence}\fR +Text for a label of the entry widget that prompts the user for a +two-character sequence to use with the "Compose" key\&. +.TP +\fB{Insert Character}\fR +Window title of the dialog box that displays a Unicode character map +and prompts the user to select a character to insert\&. +.TP +\fB{Key sequences}\fR +Text for a label at the head of a listbox showing the composed +sequences that are currently bound\&. +.TP +\fB{KHIM Controls}\fR +Window title for the dialog box that prompts for KHIM settings\&. +.TP +\fB{KHIM Help}\fR +Window title for the window that display help text for KHIM\&. +.TP +\fBOK\fR +Label for the OK button on several dialogs\&. +.TP +\fBSelect code page:\fR +Label for a spinbox that prompts the user for a Unicode code page number\&. +.TP +\fBSELECT COMPOSE KEY\fR +A message, which should be composed in short lines, prompting the user +to press the key that will become the "Compose" key in KHIM\&. +.TP +\fBUnicode\&.\&.\&.\fR +Text for a button that brings up the character map to select the +character to which a composed sequence binds\&. +.TP +\fB{Use KHIM}\fR +Text for a checkbutton that asks whether the user wishes to use KHIM +to manage composed key sequences\&. +.PP +.SH ACKNOWLEDGMENTS +KHIM was originally inspired by the key bindings that Brent Welch +developed for the 'sedit' editor used in the 'exmh' mail user agent\&. +The code for KHIM is entirely separate from that for 'sedit'\&. +.SH "BUGS, IDEAS, FEEDBACK" +This document, and the package it describes, will undoubtedly contain +bugs and other problems\&. +Please report such in the category \fIkhim\fR of the +\fITklib Trackers\fR [http://core\&.tcl\&.tk/tklib/reportlist]\&. +Please also report any ideas for enhancements you may have for either +package and/or documentation\&. +.SH KEYWORDS +character, i18n, input, international, method \ No newline at end of file diff --git a/embedded/man/files/modules/menubar/menubar.n b/embedded/man/files/modules/menubar/menubar.n new file mode 100644 index 00000000..c506c50f --- /dev/null +++ b/embedded/man/files/modules/menubar/menubar.n @@ -0,0 +1,945 @@ +'\" +'\" Generated from file 'menubar\&.man' by tcllib/doctools with format 'nroff' +'\" Copyright (c) 2009 Tom Krehbiel All rights reserved\&. +'\" +.TH "menubar" n 0\&.5 tklib "Create and manipulate menubars" +.\" The -*- nroff -*- definitions below are for supplemental macros used +.\" in Tcl/Tk manual entries. +.\" +.\" .AP type name in/out ?indent? +.\" Start paragraph describing an argument to a library procedure. +.\" type is type of argument (int, etc.), in/out is either "in", "out", +.\" or "in/out" to describe whether procedure reads or modifies arg, +.\" and indent is equivalent to second arg of .IP (shouldn't ever be +.\" needed; use .AS below instead) +.\" +.\" .AS ?type? ?name? +.\" Give maximum sizes of arguments for setting tab stops. Type and +.\" name are examples of largest possible arguments that will be passed +.\" to .AP later. If args are omitted, default tab stops are used. +.\" +.\" .BS +.\" Start box enclosure. From here until next .BE, everything will be +.\" enclosed in one large box. +.\" +.\" .BE +.\" End of box enclosure. +.\" +.\" .CS +.\" Begin code excerpt. +.\" +.\" .CE +.\" End code excerpt. +.\" +.\" .VS ?version? ?br? +.\" Begin vertical sidebar, for use in marking newly-changed parts +.\" of man pages. The first argument is ignored and used for recording +.\" the version when the .VS was added, so that the sidebars can be +.\" found and removed when they reach a certain age. If another argument +.\" is present, then a line break is forced before starting the sidebar. +.\" +.\" .VE +.\" End of vertical sidebar. +.\" +.\" .DS +.\" Begin an indented unfilled display. +.\" +.\" .DE +.\" End of indented unfilled display. +.\" +.\" .SO ?manpage? +.\" Start of list of standard options for a Tk widget. The manpage +.\" argument defines where to look up the standard options; if +.\" omitted, defaults to "options". The options follow on successive +.\" lines, in three columns separated by tabs. +.\" +.\" .SE +.\" End of list of standard options for a Tk widget. +.\" +.\" .OP cmdName dbName dbClass +.\" Start of description of a specific option. cmdName gives the +.\" option's name as specified in the class command, dbName gives +.\" the option's name in the option database, and dbClass gives +.\" the option's class in the option database. +.\" +.\" .UL arg1 arg2 +.\" Print arg1 underlined, then print arg2 normally. +.\" +.\" .QW arg1 ?arg2? +.\" Print arg1 in quotes, then arg2 normally (for trailing punctuation). +.\" +.\" .PQ arg1 ?arg2? +.\" Print an open parenthesis, arg1 in quotes, then arg2 normally +.\" (for trailing punctuation) and then a closing parenthesis. +.\" +.\" # Set up traps and other miscellaneous stuff for Tcl/Tk man pages. +.if t .wh -1.3i ^B +.nr ^l \n(.l +.ad b +.\" # Start an argument description +.de AP +.ie !"\\$4"" .TP \\$4 +.el \{\ +. ie !"\\$2"" .TP \\n()Cu +. el .TP 15 +.\} +.ta \\n()Au \\n()Bu +.ie !"\\$3"" \{\ +\&\\$1 \\fI\\$2\\fP (\\$3) +.\".b +.\} +.el \{\ +.br +.ie !"\\$2"" \{\ +\&\\$1 \\fI\\$2\\fP +.\} +.el \{\ +\&\\fI\\$1\\fP +.\} +.\} +.. +.\" # define tabbing values for .AP +.de AS +.nr )A 10n +.if !"\\$1"" .nr )A \\w'\\$1'u+3n +.nr )B \\n()Au+15n +.\" +.if !"\\$2"" .nr )B \\w'\\$2'u+\\n()Au+3n +.nr )C \\n()Bu+\\w'(in/out)'u+2n +.. +.AS Tcl_Interp Tcl_CreateInterp in/out +.\" # BS - start boxed text +.\" # ^y = starting y location +.\" # ^b = 1 +.de BS +.br +.mk ^y +.nr ^b 1u +.if n .nf +.if n .ti 0 +.if n \l'\\n(.lu\(ul' +.if n .fi +.. +.\" # BE - end boxed text (draw box now) +.de BE +.nf +.ti 0 +.mk ^t +.ie n \l'\\n(^lu\(ul' +.el \{\ +.\" Draw four-sided box normally, but don't draw top of +.\" box if the box started on an earlier page. +.ie !\\n(^b-1 \{\ +\h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul' +.\} +.el \}\ +\h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul' +.\} +.\} +.fi +.br +.nr ^b 0 +.. +.\" # VS - start vertical sidebar +.\" # ^Y = starting y location +.\" # ^v = 1 (for troff; for nroff this doesn't matter) +.de VS +.if !"\\$2"" .br +.mk ^Y +.ie n 'mc \s12\(br\s0 +.el .nr ^v 1u +.. +.\" # VE - end of vertical sidebar +.de VE +.ie n 'mc +.el \{\ +.ev 2 +.nf +.ti 0 +.mk ^t +\h'|\\n(^lu+3n'\L'|\\n(^Yu-1v\(bv'\v'\\n(^tu+1v-\\n(^Yu'\h'-|\\n(^lu+3n' +.sp -1 +.fi +.ev +.\} +.nr ^v 0 +.. +.\" # Special macro to handle page bottom: finish off current +.\" # box/sidebar if in box/sidebar mode, then invoked standard +.\" # page bottom macro. +.de ^B +.ev 2 +'ti 0 +'nf +.mk ^t +.if \\n(^b \{\ +.\" Draw three-sided box if this is the box's first page, +.\" draw two sides but no top otherwise. +.ie !\\n(^b-1 \h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c +.el \h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c +.\} +.if \\n(^v \{\ +.nr ^x \\n(^tu+1v-\\n(^Yu +\kx\h'-\\nxu'\h'|\\n(^lu+3n'\ky\L'-\\n(^xu'\v'\\n(^xu'\h'|0u'\c +.\} +.bp +'fi +.ev +.if \\n(^b \{\ +.mk ^y +.nr ^b 2 +.\} +.if \\n(^v \{\ +.mk ^Y +.\} +.. +.\" # DS - begin display +.de DS +.RS +.nf +.sp +.. +.\" # DE - end display +.de DE +.fi +.RE +.sp +.. +.\" # SO - start of list of standard options +.de SO +'ie '\\$1'' .ds So \\fBoptions\\fR +'el .ds So \\fB\\$1\\fR +.SH "STANDARD OPTIONS" +.LP +.nf +.ta 5.5c 11c +.ft B +.. +.\" # SE - end of list of standard options +.de SE +.fi +.ft R +.LP +See the \\*(So manual entry for details on the standard options. +.. +.\" # OP - start of full description for a single option +.de OP +.LP +.nf +.ta 4c +Command-Line Name: \\fB\\$1\\fR +Database Name: \\fB\\$2\\fR +Database Class: \\fB\\$3\\fR +.fi +.IP +.. +.\" # CS - begin code excerpt +.de CS +.RS +.nf +.ta .25i .5i .75i 1i +.. +.\" # CE - end code excerpt +.de CE +.fi +.RE +.. +.\" # UL - underline word +.de UL +\\$1\l'|0\(ul'\\$2 +.. +.\" # QW - apply quotation marks to word +.de QW +.ie '\\*(lq'"' ``\\$1''\\$2 +.\"" fix emacs highlighting +.el \\*(lq\\$1\\*(rq\\$2 +.. +.\" # PQ - apply parens and quotation marks to word +.de PQ +.ie '\\*(lq'"' (``\\$1''\\$2)\\$3 +.\"" fix emacs highlighting +.el (\\*(lq\\$1\\*(rq\\$2)\\$3 +.. +.\" # QR - quoted range +.de QR +.ie '\\*(lq'"' ``\\$1''\\-``\\$2''\\$3 +.\"" fix emacs highlighting +.el \\*(lq\\$1\\*(rq\\-\\*(lq\\$2\\*(rq\\$3 +.. +.\" # MT - "empty" string +.de MT +.QW "" +.. +.BS +.SH NAME +menubar \- Creates an instance of the \fImenubar\fR Class\&. +.SH SYNOPSIS +package require \fBTcl 8\&.6\fR +.sp +package require \fBTk 8\&.6\fR +.sp +package require \fBmenubar ?0\&.5?\fR +.sp +\fBmenubar new\fR ?options? +.sp +\fImBarInst\fR \fBdefine\fR \fIbody\fR +.sp +\fImBarInst\fR \fBinstall\fR \fIpathName body\fR +.sp +\fImBarInst\fR \fBmenu\&.configure\fR \fIoption tag-settings ?option tag-settings \&.\&.\&.?\fR +.sp +\fImBarInst\fR \fBmenu\&.namespace\fR \fItag namespace\fR +.sp +\fImBarInst\fR \fBmenu\&.hide\fR \fItag\fR +.sp +\fImBarInst\fR \fBmenu\&.show\fR \fItag\fR +.sp +\fImBarInst\fR \fBtag\&.add\fR \fItag value\fR +.sp +\fImBarInst\fR \fBtag\&.configure\fR \fIpathName tag ?option value \&.\&.\&.option value?\fR +.sp +\fImBarInst\fR \fBtag\&.cget\fR \fIpathName tag ?option?\fR +.sp +\fImBarInst\fR \fBgroup\&.add\fR \fItag label ?cmd? ?accel? ?sequence? ?state?\fR +.sp +\fImBarInst\fR \fBgroup\&.delete\fR \fItag label\fR +.sp +\fImBarInst\fR \fBgroup\&.move\fR \fIdirection tag label\fR +.sp +\fImBarInst\fR \fBgroup\&.configure\fR \fItag label ?option value \&.\&.\&.option value?\fR +.sp +\fImBarInst\fR \fBgroup\&.serialize\fR \fItag\fR +.sp +\fImBarInst\fR \fBgroup\&.deserialize\fR \fItag stream\fR +.sp +\fImBarInst\fR \fBnotebook\&.addTabStore\fR \fIpathname\fR +.sp +\fImBarInst\fR \fBnotebook\&.deleteTabStore\fR \fIpathname\fR +.sp +\fImBarInst\fR \fBnotebook\&.setTabValue\fR \fIpathname tag\fR +.sp +\fImBarInst\fR \fBnotebook\&.restoreTabValues\fR \fIpathname\fR +.sp +.BE +.SH DESCRIPTION +.TP +\fBmenubar new\fR ?options? +.PP +.PP +Create and return a new instance of the menubar class\&. The +menubar class encapsulates the definition, installation and +dynamic behavior of a menubar\&. The class doesn't depend on a +widget framework and therefore can be used with or without a +framework (e\&.g\&. Bwidget, IWidget, Snit, etc\&.)\&. Unlike other Tk +widget commands, the menubar command doesn't have a \fIpathName\fR +argument because menubars are handled by the window manager (i\&.e\&. wm) +and not the application\&. +.SH OPTIONS +The following options can be passed to the \fImenubar new\fR command\&. +.PP +These options are inherited from the Tk menu command, their effect is +platform specific\&. +.TP +\fB\fI-activebackground\fR [http://docs\&.activestate\&.com/activetcl/8\&.5/tcl/TkCmd/options\&.htm#M-activebackground]\fR +.TP +\fB\fI-activeborderwidth\fR [http://docs\&.activestate\&.com/activetcl/8\&.5/tcl/TkCmd/options\&.htm#M-activeborderwidth]\fR +.TP +\fB\fI-activeforeground\fR [http://docs\&.activestate\&.com/activetcl/8\&.5/tcl/TkCmd/options\&.htm#M-activeforeground]\fR +.TP +\fB\fI-background\fR [http://docs\&.activestate\&.com/activetcl/8\&.5/tcl/TkCmd/options\&.htm#M-background]\fR +.TP +\fB\fI-borderwidth\fR [http://docs\&.activestate\&.com/activetcl/8\&.5/tcl/TkCmd/options\&.htm#M-borderwidth]\fR +.TP +\fB\fI-cursor\fR [http://docs\&.activestate\&.com/activetcl/8\&.5/tcl/TkCmd/options\&.htm#M-cursor]\fR +.TP +\fB\fI-disabledforeground\fR [http://docs\&.activestate\&.com/activetcl/8\&.5/tcl/TkCmd/options\&.htm#M-disabledforeground]\fR +.TP +\fB\fI-font\fR [http://docs\&.activestate\&.com/activetcl/8\&.5/tcl/TkCmd/options\&.htm#M-font]\fR +.TP +\fB\fI-foreground\fR [http://docs\&.activestate\&.com/activetcl/8\&.5/tcl/TkCmd/options\&.htm#M-foreground]\fR +.TP +\fB\fI-relief\fR [http://docs\&.activestate\&.com/activetcl/8\&.5/tcl/TkCmd/options\&.htm#M-relief]\fR +.PP +.SH INTRODUCTION +.PP +An instance of the menubar class provides methods for compiling a +description of the menubar, configuring menu items and +installing the menubar in toplevel windows\&. +.PP +A menubar can be thought of as a tree of cascading menus\&. Users define +a menubar using a language that results in a human readable description +of a menubar\&. The description of the menubar is then compiled by an +instance of the menubar class after which it can be installed in one or more +toplevel windows\&. +.PP +The menubar class provides many unique capabilities that are not +found in other tcl/tk menubar implementation\&. Some of these are: +.IP \(bu +A tagging system that simplifies access to menu entries in the menu tree\&. +.IP \(bu +Support for user defined tags that depend on the toplevel window context\&. +.IP \(bu +A simplified and uniform interface for all callback commands\&. +.IP \(bu +Namespace support for all callback commands so callback commands can be easily grouped into namespaces\&. +.IP \(bu +Support for hiding and exposing menus on the menubar\&. +.IP \(bu +A simplified method for creating radiobutton groups\&. +.IP \(bu +Automatic management of state variables for checkbuttons and radiobuttons\&. +.IP \(bu +Scope control for the state variables of checkbuttons and radiobuttons\&. +.IP \(bu +Tear-off menu management that ensures only one tearoff menu is created\&. +.IP \(bu +Support for dynamic menu extension to simplify the creation of recent document menus\&. +.IP \(bu +Support for saving and restoring dynamic menu extensions\&. +.PP +.SH TERMINOLOGY +.TP +MENUBAR +The visible rendering of a menubar in a toplevel window is a horizontally +group of cascading Tk menus\&. +.TP +MENU +A menu is an ordered list of items that is rendered +vertically\&. Menus are not visible until a user +preforms some action (normally a event)\&. A menu +may contain any number of child menus that are rendered as +cascading menus\&. Cascading menus are rendered next to the parent menu +when they are activated\&. +.TP +MENU ENTRY +A menu contains an ordered list of items called entries\&. +Menu entries have a type and the menubar class supports the +following 6 entry types: +\fICommand\fR, \fICheckbutton\fR, \fIRadiobutton\fR, \fISeparator\fR, \fIGroup\fR and \fIMenu\fR\&. +.TP +ENTRY LABEL +Each menu entry has a visible string that is called the entry label\&. +.TP +TAG +A tag is name that is normally used to referr to an item in a menu +tree\&. A tag name is an alphanumeric character string +that may include the underscore character\&. Menu tree tags are +defined for all nodes and leafs in a menu tree\&. This provides a +flat abstraction of the tree and simplifies item referencing in +menubar methods\&. Without this abstraction it would be +necessary to reference menu elements using a tree path which +could change at run-time\&. The menubar class also has a method that +can create a user defined tag\&. User +defined tags store values that change based on the currently +active toplevel window\&. User defined tags can be used to store widget +pathnames use by callback code so that output can be routed to the +appropriate toplevel window\&. +.PP +.SH METHODS +.TP +\fImBarInst\fR \fBdefine\fR \fIbody\fR +Compiles \fIbody\fR into a tree of menu entries which define the +visual layout of the menubar\&. The \fIbody\fR argument +describes the layout using the following syntax, where the +elements of the syntax are described below\&. +.sp +\fIbody == definitions\fR +.CS + + +definitions ::= { | | } +ignore ::= { | | # } +definition ::= { | | | | | } +command ::=