Commiting initial Git version.
46
README.md
@ -1,5 +1,43 @@
|
||||
# InterimDataTool
|
||||
# ESS Interim Data Analysis Tool for Windows OS
|
||||
|
||||
This repository contains the tool and R portable that allows users to run the interim data analysis without any R knowledge or other software prerequisities besides using Windows.
|
||||
|
||||
This is just a simple C# wrapper that runs (provided) R portable.
|
||||
R portable is sourced from Sourceforge.net: https://sourceforge.net/projects/rportable/
|
||||
|
||||
## How to use the tool
|
||||
|
||||
### End users
|
||||
|
||||
Please use the zip file provided via MyESS.
|
||||
If for some reason that is not available, they can use the `Tool.zip` file from the `end_users/` subdirectory in this repository.
|
||||
|
||||
### Developers
|
||||
|
||||
The `Tool/` subdirectory contains the source code for the GUI tool.
|
||||
After compilations make sure to create the following directory structure under (!) the final executable (say `tool.exe`):
|
||||
- tool.exe
|
||||
- `R/` should contain a copy of `R_portable` directory contents
|
||||
- `Tool_files/` should contain a copy of `TOOL_FILES` directory contents
|
||||
|
||||
**Important information**
|
||||
`TOOL_FILES` only contains old demo scripts and is not updated regularly in this repository. Please use the appropriate GIT repository for the latest versions of scripts!
|
||||
|
||||
## LICENSE
|
||||
|
||||
Gnu GPL V2. Please see included LICENSE file.
|
||||
|
||||
## AUTHORS
|
||||
|
||||
European Social Survey WP8 team:
|
||||
- Joost Kappelhof
|
||||
- Roberto Briceno.Rosas
|
||||
- May Doušak
|
||||
|
||||
Programming:
|
||||
- May Doušak
|
||||
|
||||
## SUPPORT
|
||||
|
||||
may.dousak@fdv.uni-lj.si or the appropriate MyESS folder
|
||||
|
||||
ESS Interim data analysis tool source.
|
||||
|
||||
Just a simple C# wrapper for portable R.
|
3
R_portable/R/App/AppInfo/Launcher/R-Portable.ini
Executable file
@ -0,0 +1,3 @@
|
||||
[Launch]
|
||||
ProgramExecutable=R-Portable\bin\i386\rgui.exe
|
||||
ProgramExecutable64=R-Portable\bin\x64\rgui.exe
|
BIN
R_portable/R/App/AppInfo/appicon.ico
Executable file
After Width: | Height: | Size: 45 KiB |
BIN
R_portable/R/App/AppInfo/appicon_16.png
Executable file
After Width: | Height: | Size: 697 B |
BIN
R_portable/R/App/AppInfo/appicon_32.png
Executable file
After Width: | Height: | Size: 1.3 KiB |
26
R_portable/R/App/AppInfo/appinfo.ini
Executable file
@ -0,0 +1,26 @@
|
||||
[Format]
|
||||
Type=PortableApps.comFormat
|
||||
Version=3.5
|
||||
|
||||
[Details]
|
||||
Name=R Portable
|
||||
AppID=R-Portable
|
||||
Publisher=R Development Core Team
|
||||
Homepage=http://r-project.org/
|
||||
Category=Education
|
||||
Description=R: A Language and Environment for Statistical Computing
|
||||
Language=Multilingual
|
||||
|
||||
[License]
|
||||
Shareable=true
|
||||
OpenSource=true
|
||||
Freeware=true
|
||||
CommercialUse=true
|
||||
|
||||
[Version]
|
||||
PackageVersion=4.0.0.0
|
||||
DisplayVersion=4.0.0
|
||||
|
||||
[Control]
|
||||
Icons=1
|
||||
Start=R-Portable.exe
|
11
R_portable/R/App/AppInfo/pac_installer_log.ini
Executable file
@ -0,0 +1,11 @@
|
||||
[PortableApps.comInstaller]
|
||||
Info1=Do not delete or modify this file. It may be necessary for this app to function correctly.
|
||||
Info2=This file was generated by the PortableApps.com Installer wizard and modified by the official PortableApps.com Installer TM Rare Ideas, LLC as the app was installed.
|
||||
Info3=This file should be excluded from git repositories by using the appropriate gitignore.
|
||||
Run=true
|
||||
WizardVersion=3.5.16.0
|
||||
PackagingDate=2020-04-30
|
||||
PackagingTime=7:51:55
|
||||
InstallerVersion=3.5.16.0
|
||||
InstallDate=2020-05-19
|
||||
InstallTime=10:49:31
|
736
R_portable/R/App/R-portable/CHANGES
Executable file
@ -0,0 +1,736 @@
|
||||
Windows-specific changes to R
|
||||
|
||||
CHANGES IN R VERSIONS > 2.15.0:
|
||||
|
||||
* Windows-specific changes will now be announced in the common NEWS
|
||||
file.
|
||||
|
||||
CHANGES IN R VERSION 2.15.0:
|
||||
|
||||
NEW FEATURES:
|
||||
|
||||
* The 32-bit and 64-bit builds are now treated equally, as it is
|
||||
anticipated that 64-bit R will soon be (if not already) the more
|
||||
commonly used. This entails:
|
||||
|
||||
The Rterm or Rgui title mentions 32-bit as well as 64-bit.
|
||||
|
||||
The desktop icons are labelled R i386 and R x64.
|
||||
|
||||
R CMD INSTALL for a package with compiled code will fail if
|
||||
compilation fails for any of the installed sub-architectures: use
|
||||
--no-multiarch to override this.
|
||||
|
||||
* postscript(file = "|cmd") now works on Windows.
|
||||
|
||||
* file.symlink() is now implemented on NTFS file systems on Vista
|
||||
or later, for accounts which have suitable permissions (and most
|
||||
will not). It can link existing directories, and existing-or-not
|
||||
files.
|
||||
|
||||
* There is a new function Sys.junction() to create junction points
|
||||
on NTFS file systems.
|
||||
|
||||
* C-level error formats now use the trio library, and so for
|
||||
example output 1.53e-11 (as required by C99) rather than
|
||||
1.53e-011.
|
||||
|
||||
INSTALLER:
|
||||
|
||||
* The installer has many fewer options with more files always being
|
||||
installed, as a few Mb of file space is nowadays no longer an
|
||||
issue.
|
||||
|
||||
* It is now possible to select '64-bit Files' from the standard
|
||||
installer even on a 32-bit version of Windows.
|
||||
|
||||
PACKAGE INSTALLATION:
|
||||
|
||||
* As the current toolchain uses only 32-bit executables, it is
|
||||
possible to compile a package for both architectures on 32-bit
|
||||
Windows provided both architectures of R have been installed: use
|
||||
Rcmd INSTALL --compile-both.
|
||||
|
||||
* Rcmd INSTALL --merge-multiarch will work (but do a normal
|
||||
install) if only one architecture is installed.
|
||||
|
||||
BUG FIXES:
|
||||
|
||||
* Due to a race condition, some graphics changes were not flushed
|
||||
to the display if another graphics window was closed at nearly
|
||||
the same time. (Reported by Michael Sumner.)
|
||||
|
||||
CHANGES IN R VERSION 2.14.2:
|
||||
|
||||
NEW FEATURES:
|
||||
|
||||
* bitmap() and dev2bitmap() look for gswin64c.exe (as used by
|
||||
64-bit GhostScript), in preference to gswin32c.exe.
|
||||
|
||||
INSTALLATION:
|
||||
|
||||
* The sources (and packages) can now be compiled using the multilib
|
||||
toolchain developed for R 2.15.x: see the MULTI macro in
|
||||
MkRules.dist. This toolchain is used for the CRAN binary
|
||||
distribution.
|
||||
|
||||
PACKAGE INSTALLATION:
|
||||
|
||||
* The preferred toolchain has changed since the one used for R
|
||||
2.12.0 to 2.14.1: see the'R Installation and Administration
|
||||
manual'. Compiled code (except DLLs) may be incompatible with
|
||||
previous toolchains (and compiled C++ code almost certainly will
|
||||
be: users of Rcpp take care).
|
||||
|
||||
Ensure that the settings in MkRules.local are appropriate to the
|
||||
toolchain you use.
|
||||
|
||||
* There is a new macro (aka make variable) SHLIB_PTHREAD_FLAGS.
|
||||
This is set to -pthread on builds using toolchains which support
|
||||
it, and should be included in both PKG_CPPFLAGS (or the Fortran
|
||||
or F9x equivalents) and PKG_LIBS.
|
||||
|
||||
BUG FIXES:
|
||||
|
||||
* Using a prompt of more than 80 characters in readline() could
|
||||
cause a buffer overflow in Rterm. (Reported by Henrik
|
||||
Bengtsson.)
|
||||
|
||||
* Some of the custom messages in the installer were corrupted: add
|
||||
a BOM mark to the file as now required by Unicode Inno Setup.
|
||||
(PR#14816)
|
||||
|
||||
CHANGES IN R VERSION 2.14.1:
|
||||
|
||||
NEW FEATURES:
|
||||
|
||||
* The Save as menu item on the script editor adds extension .R to a
|
||||
file name without an extension.
|
||||
|
||||
* In package parallel, detectCores(logical = FALSE) makes an
|
||||
OS-dependent attempt to find the number of physical cores. It
|
||||
usually succeeds, even on XP.
|
||||
|
||||
PACKAGE INSTALLATION:
|
||||
|
||||
* The directory pointed to by USER_LOCAL can now have
|
||||
architecture-specific sub-directories lib/i386 and lib/x64.
|
||||
|
||||
BUG FIXES:
|
||||
|
||||
* The fix for PR#14543 caused stack problems with outputting large
|
||||
R objects (e.g., data frames of 25,000 items). (PR#14698)
|
||||
|
||||
* In a double-byte locale (Chinese, Japanese, Korean), grep() and
|
||||
friends might have used byte-wise matching of strings in the
|
||||
native encoding. (PR#14622)
|
||||
|
||||
CHANGES IN R VERSION 2.14.0:
|
||||
|
||||
NEW FEATURES:
|
||||
|
||||
* The yLineBias of the windows() family of devices has been changed
|
||||
from 0.1 to 0.2: this changes slightly the vertical positioning
|
||||
of text (including axis annotations). This can be overridden by
|
||||
setting the new "ylbias" graphical parameter. This was done for
|
||||
consistency with other devices such as pdf().
|
||||
|
||||
* R CMD build once again attempts to preserve file permissions on
|
||||
Windows.
|
||||
|
||||
* There is support for cairographics-based devices using the same
|
||||
code as on Unix-alikes. This can be selected by the new type
|
||||
argument of the bitmap devices bmp(), jpeg(), png() and tiff(),
|
||||
and devices svg(), cairo_pdf() and cairo_ps() are now available
|
||||
on Windows.
|
||||
|
||||
These are not compiled in by default when building from source:
|
||||
see the instructions in the 'R Installation and Administration
|
||||
Manual'.
|
||||
|
||||
* All the Windows-specific graphics devices now have a family
|
||||
argument. If non-empty this specifies an initial family to be
|
||||
used for fonts 1-4. If empty the fonts specified in the Rdevga
|
||||
configuration file are used for the Windows GDI devices and
|
||||
"sans" for cairographics-based devices.
|
||||
|
||||
This will generally be a Windows font name such as "Lucida
|
||||
Bright" or one of the device-independent names ("sans", "serif"
|
||||
and "mono"). Outside Western Europe you may need to select a
|
||||
family that better supports your locale such as "Arial MS
|
||||
Unicode" or one specific to Chinese/Korean/Thai ....
|
||||
|
||||
* There is a new antialias argument to windows(), win.print() and
|
||||
the bitmap devices. This is an option that can be set in
|
||||
windows.options() to set the default for windows() (and
|
||||
win.graph()).
|
||||
|
||||
This gives a hint to the Windows plotting system. Whether
|
||||
anti-aliasing is actually used principally depends on the OS
|
||||
settings: this argument should at least be able to turn it off.
|
||||
The default behaviour (unchanged from before) is that Windows
|
||||
will use anti-aliasing for screen devices (and bitmap devices, as
|
||||
they plot on a hidden screen) if ClearType has been enabled. For
|
||||
those not using ClearType, windows.options(antialias =
|
||||
"cleartype") will make this the default, and it will probably
|
||||
give more legible plots.
|
||||
|
||||
The argument can also be used for the cairographics-based
|
||||
versions of the bitmap devices.
|
||||
|
||||
* The 'Update packages ...' menu item now runs
|
||||
update.packages(ask="graphics", checkBuilt=TRUE).
|
||||
|
||||
* R CMD INSTALL preserves the package-directory modification time
|
||||
when it restores an earlier install of the package.
|
||||
|
||||
* File extensions .xz, .rda and .RData have been added to those
|
||||
which default to binary transfer for download.file().
|
||||
|
||||
* install.packages() and R CMD check have a small delay after
|
||||
removing a directory to counteract some interference from
|
||||
anti-virus software.
|
||||
|
||||
* There is a Danish translation of the RGui menus.
|
||||
|
||||
INSTALLATION:
|
||||
|
||||
* Compilation of C and Fortran code now uses the optimization flag
|
||||
-mtune=core2: this will improve performance a few percent on
|
||||
recent CPUs at the expense of those which are several years old.
|
||||
Its effect is particularly evident on 64-bit builds.
|
||||
|
||||
This can be overridden when building from the sources: see the
|
||||
EOPTS macro defined in file MkRules.dist.
|
||||
|
||||
* Where both 32- and 64-bit versions of R are installed, the file
|
||||
association for .RData files defaults to 64-bit R (it defaulted
|
||||
to 32-bit in R 2.12.x and 2.13.x).
|
||||
|
||||
* There is preliminary support for 'multilib' toolchains which use
|
||||
options --m32 or --m64 to select the architecture; set the
|
||||
appropriate macros in MkRules.local.
|
||||
|
||||
It is the intention to move to such a toolchain when they become
|
||||
mature enough.
|
||||
|
||||
PACKAGE INSTALLATION:
|
||||
|
||||
* Rzlib.dll (sometimes used in packages _via_ $(ZLIB_LIBS)) does
|
||||
not include the buggy gzio interface from zlib 1.2.5.
|
||||
|
||||
DEFUNCT:
|
||||
|
||||
* zip.unpack() (deprecated in R 2.13.0) is defunct: use unzip()
|
||||
instead.
|
||||
|
||||
BUG FIXES:
|
||||
|
||||
* Raster drawing on win.metafile() (or copying a plot that includes
|
||||
a raster image from another device to a Metafile) now does not
|
||||
crash. (Reported by Stefan Gelissen.)
|
||||
|
||||
CHANGES IN R VERSION 2.13.2:
|
||||
|
||||
BUG FIXES:
|
||||
|
||||
* The fix for PR#14583 caused inconsistent behaviour in other
|
||||
areas, e.g. PR#14628, extra lines appearing in image displays,
|
||||
and uneven bases on histograms. (PR#14632).
|
||||
|
||||
* Opening large numbers of windows() graphics devices could cause
|
||||
some of them to fail to redraw (PR#14668).
|
||||
|
||||
CHANGES IN R VERSION 2.13.1:
|
||||
|
||||
NEW FEATURES:
|
||||
|
||||
* R CMD build no longer attempts to preserve file permissions on
|
||||
Windows, because Windows (unlike POSIX-compliant OSes) stops
|
||||
read-only files being deleted in version-control directories.
|
||||
|
||||
* shell.exec() now interprets files relative to the current working
|
||||
directory (rather than R_HOME).
|
||||
|
||||
* file.info() now accepts 'file' names with trailing directory
|
||||
separators, even though such names are invalid on Windows.
|
||||
|
||||
* The windows() family of devices now supports() per-pixel alpha
|
||||
for raster images.
|
||||
|
||||
BUG FIXES:
|
||||
|
||||
* Launching the PDF manuals from the Rgui menus did not work on
|
||||
some versions of Windows.
|
||||
|
||||
* The windows() screen device would sometimes fail to plot
|
||||
(visibly) points with pch=".". PR#14583
|
||||
|
||||
* system() and related functions sometimes failed when run in Rgui.
|
||||
|
||||
* Saving to PDF from the menu of a windows() device used defaults
|
||||
for family, fg and bg from ps.options() rather than pdf.options()
|
||||
(but the factory-fresh defaults were the same).
|
||||
|
||||
* Shutting down the R session cleaned up the temporary directory
|
||||
before closing all graphics devices. On Windows this
|
||||
necessitated changing the working directory, so some devices
|
||||
(e.g., tiff()) could write files in the wrong directory if closed
|
||||
during shutdown. The order has been reversed.
|
||||
|
||||
CHANGES IN R VERSION 2.13.0:
|
||||
|
||||
WINDOWS VERSION:
|
||||
|
||||
* Windows 2000 is no longer supported. (It went end-of-life in
|
||||
July 2010.)
|
||||
|
||||
NEW FEATURES:
|
||||
|
||||
* win_iconv has been updated: this version has a change in the
|
||||
behaviour with BOMs on UTF-16 and UTF-32 files - it removes BOMs
|
||||
when reading and adds them when writing. (This is consistent
|
||||
with Microsoft applications, but Unix versions of iconv usually
|
||||
ignore them.)
|
||||
|
||||
* Support for repository type win64.binary (used for 64-bit Windows
|
||||
binaries for R 2.11.x only) has been removed.
|
||||
|
||||
* The installers no longer put an 'Uninstall' item on the start
|
||||
menu (to conform to current Microsoft UI guidelines).
|
||||
|
||||
* Running R always sets the environment variable R_ARCH (as it does
|
||||
on a Unix-alike from the shell-script front-end).
|
||||
|
||||
* The defaults for options("browser") and options("pdfviewer") are
|
||||
now set from environment variables R_BROWSER and R_PDFVIEWER
|
||||
respectively (as on a Unix-alike). A value of "false" suppresses
|
||||
display (even if there is no false.exe present on the path).
|
||||
|
||||
* If options("install.lock") is set to TRUE, binary package
|
||||
installs are protected against failure similar to the way source
|
||||
package installs are protected.
|
||||
|
||||
* file.exists() and unlink() have more support for files > 2GB.
|
||||
|
||||
* The versions of R.exe in R_HOME/bin/i386,x64/bin now support
|
||||
options such as R --vanilla CMD: there is no comparable interface
|
||||
for Rcmd.exe.
|
||||
|
||||
* A few more file operations will now work with >2GB files.
|
||||
|
||||
* The environment variable R_HOME in an R session now uses slash as
|
||||
the path separator (as it always has when set by Rcmd.exe).
|
||||
|
||||
* Rgui has a new menu item for the PDF 'Sweave User Manual'.
|
||||
|
||||
DEPRECATED:
|
||||
|
||||
* zip.unpack() is deprecated: use unzip().
|
||||
|
||||
INSTALLATION:
|
||||
|
||||
* There is support for libjpeg-turbo _via_ setting JPEGDIR to that
|
||||
value in MkRules.local.
|
||||
|
||||
Support for jpeg-6b has been removed.
|
||||
|
||||
* The sources now work with libpng-1.5.1, jpegsrc.v8c (which are
|
||||
used in the CRAN builds) and tiff-4.0.0beta6 (CRAN builds use
|
||||
3.9.1). It is possible that they no longer work with older
|
||||
versions than libpng-1.4.5.
|
||||
|
||||
BUG FIXES:
|
||||
|
||||
* Workaround for the incorrect values given by Windows' casinh
|
||||
function on the branch cuts.
|
||||
|
||||
* Bug fixes for drawing raster objects on windows(). The symptom
|
||||
was the occasional raster image not being drawn, especially when
|
||||
drawing multiple raster images in a single expression. Thanks to
|
||||
Michael Sumner for report and testing.
|
||||
|
||||
* Printing extremely long string values could overflow the stack
|
||||
and cause the GUI to crash. (PR#14543)
|
||||
|
||||
CHANGES IN R VERSION 2.12.2:
|
||||
|
||||
NEW FEATURES:
|
||||
|
||||
* Building badly-written vignettes which used the default device
|
||||
(pdf(file = "Rplots.pdf")) could leave the device open and hence
|
||||
the file Rplots.pdf could not be removed on Windows: all devices
|
||||
are now closed.
|
||||
|
||||
BUG FIXES:
|
||||
|
||||
* In some circumstances the caret (cursor) could be positioned
|
||||
incorrectly. (PR#14460)
|
||||
|
||||
* When loading Rconsole from disk, a spurious warning message was
|
||||
sometimes shown.
|
||||
|
||||
* In R 2.12.1, system() sometimes passed an empty input stream to
|
||||
the new process rather than allowing user input.
|
||||
|
||||
* The internal method for untar() does a better job of unravelling
|
||||
symbolic links in the tarball (but still with many limitations).
|
||||
|
||||
* The graphical dialog version of select.list() could cause later
|
||||
dialogs to fail if Windows events were not processed between the
|
||||
calls.
|
||||
|
||||
CHANGES IN R VERSION 2.12.1:
|
||||
|
||||
NEW FEATURES:
|
||||
|
||||
* system() and system2() with output redirected to a character
|
||||
vector now give a warning if the command returns a non-zero error
|
||||
code. (This is what a Unix-alike does as from R 2.12.0.)
|
||||
|
||||
* system() and system2() no longer discard output from the command
|
||||
to stdout and stderr as often as they used to, and more cases of
|
||||
system2() are implemented.
|
||||
|
||||
* stdout is now flushed after echoing the input line.
|
||||
|
||||
* The internal implementation of tar() (package utils) is now
|
||||
supported on Windows.
|
||||
|
||||
INSTALLATION:
|
||||
|
||||
* The MSI installer is now made by an R script, and there is now
|
||||
support for 64-bit builds. (Unlike the Inno Setup installer,
|
||||
there are separate MSI installers for 32- and 64-bit Windows.)
|
||||
|
||||
It is now built using WiX 3.x rather than WiX 2.0. (As a result
|
||||
it is about 25% smaller.)
|
||||
|
||||
BUG FIXES:
|
||||
|
||||
* Some warning/error messages from dyn.load() could be masked in
|
||||
Rgui on Windows 7, as that OS can return messages containing
|
||||
carriage returns and Rgui does not support overwriting.
|
||||
|
||||
* Filenames could not be specified using backslashes in Sweave().
|
||||
|
||||
* In R 2.12.0, system(intern = TRUE) captured stderr on Rterm when
|
||||
it was documented to only do so on Rgui.
|
||||
|
||||
* Rgui in R 2.12.0 (only) did not always handle lines containing
|
||||
carriage returns (\r) correctly: sometimes random characters
|
||||
where shown.
|
||||
|
||||
Since carriage returns have been supported in Rgui, the cursor
|
||||
positioning after outputting a line containing a carriage return
|
||||
had been unreliable.
|
||||
|
||||
CHANGES IN R VERSION 2.12.0:
|
||||
|
||||
NEW FEATURES:
|
||||
|
||||
* A sub-architecture is used for 32-bit (i386) as well as 64-bit
|
||||
(x64) builds. 32-bit packages containing compiled code need to
|
||||
re-installed for this release (64-bit packages built for 2.11.x
|
||||
will most likely still work).
|
||||
|
||||
Architecture-specific files (such as Rgui.exe and Rscript.exe)
|
||||
are now in R_HOME/bin/i386 or R_HOME/bin/x64.
|
||||
|
||||
Because many people expect it, there is an executable
|
||||
R_HOME/bin/R.exe, which accepts --arch and launches either
|
||||
R_HOME/bin/i386/R.exe or R_HOME/bin/x64/R.exe, and analogously
|
||||
for Rscript.exe. If not specified by their argument --arch,
|
||||
these check the environment variable R_ARCH for the architecture
|
||||
to use.
|
||||
|
||||
* The Rgui console now has an optional blinking caret (cursor) to
|
||||
assist screen readers for the visually impaired.
|
||||
|
||||
* normalizePath() now signals a warning instead of an error when
|
||||
the input path does not exist. It attempts partial
|
||||
normalization, or if that fails, returns the original input.
|
||||
|
||||
* All the Rcmd sub-commands except config and Sd2d are now handled
|
||||
internally rather by shell scripts.
|
||||
|
||||
* Rcmd has a new sub-command texify to run MiKTeX's texify.exe with
|
||||
arguments to find files such as Sweave.sty. See the examples in
|
||||
?Sweave.
|
||||
|
||||
* system(intern = FALSE) now returns 127 (the same as Unix-alikes)
|
||||
rather than -1 if the command cannot be run, and (like
|
||||
Unix-alikes) no longer gives a warning.
|
||||
|
||||
* Rscript -e and similar use a temporary file, and now work harder
|
||||
to ensure that filename is not the same as some other
|
||||
simultaneous R process.
|
||||
|
||||
INSTALLATION:
|
||||
|
||||
* The preferred toolchain for 32-bit builds (including packages) is
|
||||
now based on gcc 4.5.0: see the 'R Installation and
|
||||
Administration Manual'.
|
||||
|
||||
* It is now possible to build R and the standard installer without
|
||||
Perl: only maintainer-mode tasks now need Perl.
|
||||
|
||||
64-bit NEWS:
|
||||
|
||||
* The 32- and 64-bit distributions have been merged:
|
||||
|
||||
There is a combined installer (called R-<version>-win.exe). When
|
||||
used under 32-bit Windows this works as before and installs
|
||||
32-bit R. When used under 64-bit Windows there are options to
|
||||
install either or both of 32- and 64-bit R: the default is to
|
||||
install both.
|
||||
|
||||
The default package type is "win.binary" on both 32- and 64-bit
|
||||
builds: a single repository contains binary packages for both
|
||||
architectures. This is in place for CRAN, CRAN extras and BioC:
|
||||
type = "win64.binary" can still be used for any repositories
|
||||
which follow the R 2.11.x convention. With the default filters
|
||||
(see ?available.packages) packages will only be offered if they
|
||||
are available for the current architecture.
|
||||
|
||||
The default personal library, e.g. ~/R/win-library/2.12 is now
|
||||
the same for both 32- and 64-bit R.
|
||||
|
||||
* The recommended 64-bit toolchain has been changed to one that
|
||||
does not add leading underscores. See <URL:
|
||||
http://cran.r-project.org/bin/windows/Rtools/>. Any static or
|
||||
import libraries for external software used in installing
|
||||
packages will need to be re-compiled for this toolchain, but the
|
||||
use of DLLs is unaffected.
|
||||
|
||||
* For those building R from the sources, the 64-bit Tcl binary
|
||||
distribution for 2.12.x is in file R64a_Tcl_8-5-8.zip and
|
||||
contains e.g. directory Tcl/bin64 and not Tcl/bin.
|
||||
|
||||
PACKAGE INSTALLATION:
|
||||
|
||||
* The deprecated environment variable RHOME is no longer set when a
|
||||
package is installed: use R_HOME instead (and depend on R (>=
|
||||
2.9) ).
|
||||
|
||||
* Package installation, including configure.win scripts, can use
|
||||
${R_HOME}/bin${R_ARCH_BIN} as a portable way to find the binaries
|
||||
such as Rscript.exe.
|
||||
|
||||
BUG FIXES:
|
||||
|
||||
* R.exe when used in place of Rterm.exe set the environment
|
||||
variables set by R CMD. Conversely, R CMD BATCH did not.
|
||||
|
||||
CHANGES IN R VERSION 2.11.1 patched:
|
||||
|
||||
BUG FIXES:
|
||||
|
||||
* file.rename() now waits for the rename to complete before
|
||||
returning, so that operations on the new filename will not fail.
|
||||
|
||||
* Sys.info() and win.version() now report Windows 7 as such (and
|
||||
not as Vista), and Sys.info() now reports the machine type as
|
||||
"x86-64" on 64-bit platforms.
|
||||
|
||||
* serialize() to a raw vector works around the dismal performance
|
||||
of Windows' memory manager by allocating much larger chunks of
|
||||
memory less frequently.
|
||||
|
||||
* readClipboard() could cause a segfault with certain clipboard
|
||||
data.
|
||||
|
||||
* A fix intended for Mac OS X was incorrectly applied to Windows,
|
||||
so iconv(x, from, "") in a C locale was interpreted as requesting
|
||||
translation to UTF-8.
|
||||
|
||||
* system(intern=TRUE) often returned 0 rather than an error status
|
||||
if the command could not be found, if run from Rterm or from Rgui
|
||||
with show.output.on.console = FALSE.
|
||||
|
||||
* memory.limit() did not allow sizes greater than 4095 on 64 bit
|
||||
builds. (PR#14372)
|
||||
|
||||
CHANGES IN R VERSION 2.11.1:
|
||||
|
||||
NEW FEATURES:
|
||||
|
||||
* The Rgui console, pagers and editor on the 64-bit build now have
|
||||
a title bar icon.
|
||||
|
||||
* The outer frame/console for Rgui/Rterm mentions '(64-bit)' to
|
||||
make it easier to distinguish running copies of R.
|
||||
|
||||
* The package entries in listbox shown by the Install package(s)
|
||||
... menu are now explicitly sorted in the current locale (as they
|
||||
were in most previous releases, but not in 2.11.0).
|
||||
|
||||
* R CMD INSTALL can install zipfiles as binary packages.
|
||||
|
||||
* Errors in the Rconsole file are ignored: silently on startup,
|
||||
with a warning when Rconsole is loaded interactively.
|
||||
|
||||
CHANGES IN R VERSION 2.11.0:
|
||||
|
||||
NEW FEATURES:
|
||||
|
||||
* There is now a native x64 Windows port, with a binary installer
|
||||
and binaries of packages available on CRAN. See the 'R
|
||||
Administration and Installation Manual' and the 'R for Windows
|
||||
FAQ'.
|
||||
|
||||
* Rcmd cmd (or R CMD cmd) now runs an arbitrary 'cmd' if 'cmd' is
|
||||
not one of the builtin commands, and does not have extension
|
||||
'.sh' or '.pl' (when it is run as a shell or Perl script
|
||||
respectively). This is done by passing 'cmd' to the command
|
||||
interpreter determined by the COMSPEC environment variable (which
|
||||
in a vanilla Windows system points to cmd.exe).
|
||||
|
||||
* X11() and x11() gain additional arguments to be more similar to
|
||||
the Unix X11() device.
|
||||
|
||||
* file.rename() can work across volumes (by copy-and-delete).
|
||||
|
||||
* The main HTML help page now links to this CHANGES file.
|
||||
(Suggested by Henrik Bengtsson.)
|
||||
|
||||
* strftime(format = "%z") now gives the timezone names used by the
|
||||
Olson database and not those used by Windows.
|
||||
|
||||
* iconv(to = "ASCII") no longer transliterates, but iconv(to =
|
||||
"ASCII//TRANSLIT") will. This makes tools::showNonASCII() work
|
||||
the same way as on other platforms.
|
||||
|
||||
* readRegistry() can look at either the 32- or 64-bit view of the
|
||||
Registry on 64-bit Windows.
|
||||
|
||||
INSTALLATION:
|
||||
|
||||
* The Tcl timezone files (3Mb on disc) are now an optional part of
|
||||
the installation: they would be very rarely used with R.
|
||||
|
||||
* RSetReg.exe has been updated to (un)set the version-specific keys
|
||||
in the same way as the main installer, and to have the optional
|
||||
argument /Personal to (un)set the per-user rather than the
|
||||
per-machine keys (which need administrative access).
|
||||
|
||||
* When building R, the recommended way is now to supply a file
|
||||
R_HOME/src/gnuwin32/MkRules.local instead of editing MkRules:
|
||||
there is now no MkRules file in the distribution, but one is
|
||||
generated during the build process.
|
||||
|
||||
MkRules.local can be generated by copying and editing
|
||||
MkRules.dist.
|
||||
|
||||
* The MSI installer defaults to an all-user (per machine) install
|
||||
(by setting the ALLUSERS property to 1). This can be changed at
|
||||
installation, and it can be built for a user-mode install (see
|
||||
MkRules.dist).
|
||||
|
||||
BUG FIXES:
|
||||
|
||||
* Using ESC to interrupt a system() call could cause R to become
|
||||
unstable.
|
||||
|
||||
* 0^1i (which should be complex NAN) was incorrect.
|
||||
|
||||
CHANGES IN R VERSION 2.10.1 patched:
|
||||
|
||||
BUG FIXES:
|
||||
|
||||
* Some of the MDI toolbar buttons (e.g., "Open Script") did not
|
||||
return the focus to the console if the user cancelled the action.
|
||||
|
||||
* system() (and hence shell()) did not always set the standard file
|
||||
handles properly, so some programs would not run.
|
||||
|
||||
* setWinProgressBar() did not check the type of its 'title' and
|
||||
'label' arguments and might have crashed if they were
|
||||
mis-specified. It now does, thanks to a report by Greg Snow.
|
||||
|
||||
CHANGES IN R VERSION 2.10.1:
|
||||
|
||||
BUG FIXES:
|
||||
|
||||
* The installer did not properly record help type choices in
|
||||
R_HOME/etc/Rprofile.site.
|
||||
|
||||
* Rcmd INSTALL once again uses --no-restore, for consistency with
|
||||
the Unix version and R 2.9.2.
|
||||
|
||||
* The HTML package index was not constructed properly when the
|
||||
library path was specified with backslashes. (Patch submitted by
|
||||
Gabor Grothendieck.)
|
||||
|
||||
CHANGES IN R VERSION 2.10.0:
|
||||
|
||||
NEW FEATURES:
|
||||
|
||||
* windows() now has a parameter fillOddEven (default TRUE), which
|
||||
controls the mode used for polygon fills of self-intersecting
|
||||
shapes.
|
||||
|
||||
* The functions arrangeWindows() and getWindowsHandles() have been
|
||||
added to give more programmatic control to the appearance of
|
||||
windows in an R session.
|
||||
|
||||
* A 'Windows' menu has been added to the SDI version of the R GUI,
|
||||
and the corresponding menu in the MDI version has been expanded
|
||||
slightly.
|
||||
|
||||
* The libpng library has been updated to version 1.2.40.
|
||||
|
||||
* The remaining Perl scripts build, check, Rprof, Sd2Rd in
|
||||
R_HOME/bin now have extension .pl.
|
||||
|
||||
* Rcmd (or R CMD) can now run .sh (shell) and .pl (Perl) scripts
|
||||
anywhere on the path (as well as .bat and .exe files as before).
|
||||
|
||||
PACKAGE INSTALLATION:
|
||||
|
||||
* Rcmd SHLIB (which is used by Rcmd INSTALL) now calls make without
|
||||
a target, rather than target 'all'. This is now the same as on
|
||||
Unix, and was announced in the NEWS file for 2.9.0.
|
||||
|
||||
* Help files are no longer zipped: rendering as text, HTML, latex
|
||||
or examples is now done when needed.
|
||||
|
||||
Options --use-zip and --use-zip-help in R CMD INSTALL are no
|
||||
longer available and --auto-zip only zips data (or not).
|
||||
|
||||
Help in packages installed under 2.9.x may not work correctly,
|
||||
and a warning is given when such a package is attached by
|
||||
library(). Re-installation of all packages is strongly
|
||||
recommended (use update.packages(checkBuilt = TRUE)).
|
||||
|
||||
Binary packages are installed without CHM help if they contain it
|
||||
(as those intended for 2.9.x may).
|
||||
|
||||
* It is possible to install source packages without Rtools provided
|
||||
they have no compiled code and no configure.win or cleanup.win
|
||||
script.
|
||||
|
||||
INSTALLATION:
|
||||
|
||||
* Support for memory profiling is enabled in a standard build (this
|
||||
can be changed by editing config.h).
|
||||
|
||||
* CHM help is no longer supported.
|
||||
|
||||
* The help default for the standard installer is HTML help rather
|
||||
than CHM help.
|
||||
|
||||
* The categories in the installers have been simplified. Now the
|
||||
files to support installation of source packages are always
|
||||
installed (they are now only 0.7Mb), and there are no longer
|
||||
categories 'chtml', 'html/help', 'latex' and 'Rd'.
|
||||
|
||||
BUG FIXES:
|
||||
|
||||
* Rcmd open now works as documented: previously Rcmd open.exe was
|
||||
required.
|
||||
|
||||
* cat(x, file=) in Rgui tried to interpret UTF-8-encoded strings
|
||||
for the console rather than converting them to the native
|
||||
encoding.
|
||||
|
340
R_portable/R/App/R-portable/COPYING
Executable file
@ -0,0 +1,340 @@
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 2, June 1991
|
||||
|
||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
|
||||
51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
License is intended to guarantee your freedom to share and change free
|
||||
software--to make sure the software is free for all its users. This
|
||||
General Public License applies to most of the Free Software
|
||||
Foundation's software and to any other program whose authors commit to
|
||||
using it. (Some other Free Software Foundation software is covered by
|
||||
the GNU Library General Public License instead.) You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
this service if you wish), that you receive source code or can get it
|
||||
if you want it, that you can change the software or use pieces of it
|
||||
in new free programs; and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
anyone to deny you these rights or to ask you to surrender the rights.
|
||||
These restrictions translate to certain responsibilities for you if you
|
||||
distribute copies of the software, or if you modify it.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must give the recipients all the rights that
|
||||
you have. You must make sure that they, too, receive or can get the
|
||||
source code. And you must show them these terms so they know their
|
||||
rights.
|
||||
|
||||
We protect your rights with two steps: (1) copyright the software, and
|
||||
(2) offer you this license which gives you legal permission to copy,
|
||||
distribute and/or modify the software.
|
||||
|
||||
Also, for each author's protection and ours, we want to make certain
|
||||
that everyone understands that there is no warranty for this free
|
||||
software. If the software is modified by someone else and passed on, we
|
||||
want its recipients to know that what they have is not the original, so
|
||||
that any problems introduced by others will not reflect on the original
|
||||
authors' reputations.
|
||||
|
||||
Finally, any free program is threatened constantly by software
|
||||
patents. We wish to avoid the danger that redistributors of a free
|
||||
program will individually obtain patent licenses, in effect making the
|
||||
program proprietary. To prevent this, we have made it clear that any
|
||||
patent must be licensed for everyone's free use or not licensed at all.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License applies to any program or other work which contains
|
||||
a notice placed by the copyright holder saying it may be distributed
|
||||
under the terms of this General Public License. The "Program", below,
|
||||
refers to any such program or work, and a "work based on the Program"
|
||||
means either the Program or any derivative work under copyright law:
|
||||
that is to say, a work containing the Program or a portion of it,
|
||||
either verbatim or with modifications and/or translated into another
|
||||
language. (Hereinafter, translation is included without limitation in
|
||||
the term "modification".) Each licensee is addressed as "you".
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running the Program is not restricted, and the output from the Program
|
||||
is covered only if its contents constitute a work based on the
|
||||
Program (independent of having been made by running the Program).
|
||||
Whether that is true depends on what the Program does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Program's
|
||||
source code as you receive it, in any medium, provided that you
|
||||
conspicuously and appropriately publish on each copy an appropriate
|
||||
copyright notice and disclaimer of warranty; keep intact all the
|
||||
notices that refer to this License and to the absence of any warranty;
|
||||
and give any other recipients of the Program a copy of this License
|
||||
along with the Program.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy, and
|
||||
you may at your option offer warranty protection in exchange for a fee.
|
||||
|
||||
2. You may modify your copy or copies of the Program or any portion
|
||||
of it, thus forming a work based on the Program, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
|
||||
a) You must cause the modified files to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
b) You must cause any work that you distribute or publish, that in
|
||||
whole or in part contains or is derived from the Program or any
|
||||
part thereof, to be licensed as a whole at no charge to all third
|
||||
parties under the terms of this License.
|
||||
|
||||
c) If the modified program normally reads commands interactively
|
||||
when run, you must cause it, when started running for such
|
||||
interactive use in the most ordinary way, to print or display an
|
||||
announcement including an appropriate copyright notice and a
|
||||
notice that there is no warranty (or else, saying that you provide
|
||||
a warranty) and that users may redistribute the program under
|
||||
these conditions, and telling the user how to view a copy of this
|
||||
License. (Exception: if the Program itself is interactive but
|
||||
does not normally print such an announcement, your work based on
|
||||
the Program is not required to print an announcement.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Program,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Program, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Program.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Program
|
||||
with the Program (or with a work based on the Program) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may copy and distribute the Program (or a work based on it,
|
||||
under Section 2) in object code or executable form under the terms of
|
||||
Sections 1 and 2 above provided that you also do one of the following:
|
||||
|
||||
a) Accompany it with the complete corresponding machine-readable
|
||||
source code, which must be distributed under the terms of Sections
|
||||
1 and 2 above on a medium customarily used for software interchange; or,
|
||||
|
||||
b) Accompany it with a written offer, valid for at least three
|
||||
years, to give any third party, for a charge no more than your
|
||||
cost of physically performing source distribution, a complete
|
||||
machine-readable copy of the corresponding source code, to be
|
||||
distributed under the terms of Sections 1 and 2 above on a medium
|
||||
customarily used for software interchange; or,
|
||||
|
||||
c) Accompany it with the information you received as to the offer
|
||||
to distribute corresponding source code. (This alternative is
|
||||
allowed only for noncommercial distribution and only if you
|
||||
received the program in object code or executable form with such
|
||||
an offer, in accord with Subsection b above.)
|
||||
|
||||
The source code for a work means the preferred form of the work for
|
||||
making modifications to it. For an executable work, complete source
|
||||
code means all the source code for all modules it contains, plus any
|
||||
associated interface definition files, plus the scripts used to
|
||||
control compilation and installation of the executable. However, as a
|
||||
special exception, the source code distributed need not include
|
||||
anything that is normally distributed (in either source or binary
|
||||
form) with the major components (compiler, kernel, and so on) of the
|
||||
operating system on which the executable runs, unless that component
|
||||
itself accompanies the executable.
|
||||
|
||||
If distribution of executable or object code is made by offering
|
||||
access to copy from a designated place, then offering equivalent
|
||||
access to copy the source code from the same place counts as
|
||||
distribution of the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
4. You may not copy, modify, sublicense, or distribute the Program
|
||||
except as expressly provided under this License. Any attempt
|
||||
otherwise to copy, modify, sublicense or distribute the Program is
|
||||
void, and will automatically terminate your rights under this License.
|
||||
However, parties who have received copies, or rights, from you under
|
||||
this License will not have their licenses terminated so long as such
|
||||
parties remain in full compliance.
|
||||
|
||||
5. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Program or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Program (or any work based on the
|
||||
Program), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Program or works based on it.
|
||||
|
||||
6. Each time you redistribute the Program (or any work based on the
|
||||
Program), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute or modify the Program subject to
|
||||
these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties to
|
||||
this License.
|
||||
|
||||
7. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Program at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Program by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Program.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under
|
||||
any particular circumstance, the balance of the section is intended to
|
||||
apply and the section as a whole is intended to apply in other
|
||||
circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system, which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
8. If the distribution and/or use of the Program is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Program under this License
|
||||
may add an explicit geographical distribution limitation excluding
|
||||
those countries, so that distribution is permitted only in or among
|
||||
countries not thus excluded. In such case, this License incorporates
|
||||
the limitation as if written in the body of this License.
|
||||
|
||||
9. The Free Software Foundation may publish revised and/or new versions
|
||||
of the General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Program
|
||||
specifies a version number of this License which applies to it and "any
|
||||
later version", you have the option of following the terms and conditions
|
||||
either of that version or of any later version published by the Free
|
||||
Software Foundation. If the Program does not specify a version number of
|
||||
this License, you may choose any version ever published by the Free Software
|
||||
Foundation.
|
||||
|
||||
10. If you wish to incorporate parts of the Program into other free
|
||||
programs whose distribution conditions are different, write to the author
|
||||
to ask for permission. For software which is copyrighted by the Free
|
||||
Software Foundation, write to the Free Software Foundation; we sometimes
|
||||
make exceptions for this. Our decision will be guided by the two goals
|
||||
of preserving the free status of all derivatives of our free software and
|
||||
of promoting the sharing and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
||||
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
||||
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
||||
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
||||
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
||||
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
||||
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
||||
REPAIR OR CORRECTION.
|
||||
|
||||
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
||||
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
||||
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
||||
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
||||
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
||||
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
convey the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program is interactive, make it output a short notice like this
|
||||
when it starts in an interactive mode:
|
||||
|
||||
Gnomovision version 69, Copyright (C) year name of author
|
||||
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, the commands you use may
|
||||
be called something other than `show w' and `show c'; they could even be
|
||||
mouse-clicks or menu items--whatever suits your program.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your
|
||||
school, if any, to sign a "copyright disclaimer" for the program, if
|
||||
necessary. Here is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
|
||||
`Gnomovision' (which makes passes at compilers) written by James Hacker.
|
||||
|
||||
<signature of Ty Coon>, 1 April 1989
|
||||
Ty Coon, President of Vice
|
||||
|
||||
This General Public License does not permit incorporating your program into
|
||||
proprietary programs. If your program is a subroutine library, you may
|
||||
consider it more useful to permit linking proprietary applications with the
|
||||
library. If this is what you want to do, use the GNU Library General
|
||||
Public License instead of this License.
|
7618
R_portable/R/App/R-portable/MD5
Executable file
97
R_portable/R/App/R-portable/README
Executable file
@ -0,0 +1,97 @@
|
||||
|
||||
THE BASIC R README
|
||||
|
||||
|
||||
(See "doc/FAQ" and "doc/RESOURCES" for more detailed information
|
||||
- these files are only in the tarballs)
|
||||
(See "INSTALL" for help on installation)
|
||||
|
||||
1. INTRODUCTION
|
||||
|
||||
This directory contains the source code tree for R, which is a
|
||||
language which is not entirely unlike (versions 3 and 4 of) the S
|
||||
language developed at AT&T Bell Laboratories by Rick Becker, John
|
||||
Chambers and Allan Wilks.
|
||||
|
||||
R is free software distributed under a GNU-style copyleft.
|
||||
|
||||
The core of R is an interpreted computer language with a syntax
|
||||
superficially similar to C, but which is actually a "functional
|
||||
programming language" with capabilities similar to Scheme. The
|
||||
language allows branching and looping as well as modular programming
|
||||
using functions. Most of the user-visible functions in R are written
|
||||
in R, calling upon a smaller set of internal primitives. It is
|
||||
possible for the user to interface to procedures written in C or
|
||||
Fortran languages for efficiency, and also to write additional
|
||||
primitives.
|
||||
|
||||
The R distribution contains functionality for a large number of
|
||||
statistical procedures. Among these are: linear and generalized
|
||||
linear models, nonlinear regression models, time series analysis,
|
||||
classical parametric and nonparametric tests, clustering and
|
||||
smoothing. There is also a large set of functions which provide a
|
||||
flexible graphical environment for creating various kinds of data
|
||||
presentations.
|
||||
|
||||
A package specification allows the production of loadable modules for
|
||||
specific purposes, and several thousand contributed packages are made
|
||||
available through the CRAN sites (see
|
||||
https://CRAN.R-project.org/mirrors.html for the current members).
|
||||
|
||||
|
||||
2. HISTORY
|
||||
|
||||
R was initially written by Robert Gentleman and Ross Ihaka of the
|
||||
Statistics Department of the University of Auckland. In addition, a
|
||||
large group of individuals has contributed to R by sending code and bug
|
||||
reports.
|
||||
|
||||
Since mid-1997 there has been a core group who can modify the R source
|
||||
code archive, listed in file doc/AUTHORS.
|
||||
|
||||
R 1.0.0 was released on 29 February 2000 and 2.0.0 on 4 October 2004.
|
||||
R 3.0.0 came out on 3 April 2013.
|
||||
|
||||
This file has been minimally revised since the release of R 1.0.0.
|
||||
|
||||
3. PRESENT STATUS
|
||||
|
||||
The present version implements most of the functionality in the 1988
|
||||
book "The New S Language" (the "Blue Book") and many of the
|
||||
applications. In addition, we have implemented a large part of the
|
||||
functionality from the 1992 book "Statistical Models in S" (the "White
|
||||
Book") and the 1998 book "Programming with Data" (the "Green Book").
|
||||
|
||||
All the R functions have been documented in the form of help pages in
|
||||
an "output independent" form which can be used to create versions for
|
||||
HTML, PDF, text etc. A 1900+ page Reference Index (a collection of
|
||||
most of the help pages: there is also a 3300+ page version with all
|
||||
the help pages, including recommended packages) can be obtained in
|
||||
PDF. The manual `An Introduction to R' provides a more user-friendly
|
||||
starting point, and there is an FAQ, a draft `R Language Definition'
|
||||
manual and more specialized manuals on admininstration, data
|
||||
import/export and extending R. See INSTALL for instructions on how to
|
||||
generate these documents.
|
||||
|
||||
|
||||
4. GOALS
|
||||
|
||||
Our aim at the start of this project was to demonstrate that it was
|
||||
possible to produce an S-like environment which did not suffer from
|
||||
the memory-demands and performance problems which S has. Somewhat
|
||||
later, we started to turn R into a "real" system, but unfortunately we
|
||||
lost a large part of the efficiency advantage in the process, so have
|
||||
revised the memory management mechanism and implemented delayed
|
||||
loading of R objects. A lot of performance tuning has been done,
|
||||
including the ability to use tuned linear-algebra libraries.
|
||||
|
||||
Longer-term goals include to explore new ideas: e.g. virtual objects
|
||||
and component-based programming, and expanding the scope of existing
|
||||
ones like formula-based interfaces. Further, we wish to get a handle
|
||||
on a general approach to graphical user interfaces (preferably with
|
||||
cross-platform portability), and to develop better 3-D and dynamic
|
||||
graphics.
|
||||
|
||||
|
||||
Sincerely,
|
||||
The R Core Team.
|
226
R_portable/R/App/R-portable/README.R-4.0.0
Executable file
@ -0,0 +1,226 @@
|
||||
R 4.0.0 for Windows
|
||||
===================
|
||||
|
||||
This distribution contains a binary distribution of R- to run on
|
||||
Windows XP and later (including 64-bit versions of Windows) on ix86
|
||||
and x86_64 chips. It is designed to be as close as possible to the
|
||||
implementation on Unix, but see the list of differences below. The
|
||||
port was by Guido Masarotto, Brian Ripley and Duncan Murdoch.
|
||||
|
||||
|
||||
Installation
|
||||
============
|
||||
|
||||
The distribution is distributed as an installer R-4.0.0-win.exe. Just
|
||||
run this for a Windows-style installer.
|
||||
|
||||
For more details, including command-line options for the installer and
|
||||
how to uninstall, see the rw-FAQ. If you are reading this as part of
|
||||
an installed version of R, that is both a file rw-FAQ in this directory
|
||||
and a file doc\html\rw-FAQ.html.
|
||||
|
||||
|
||||
Usage
|
||||
=====
|
||||
|
||||
There are two versions of the R executable in R-4.0.0\bin\i386 (32-bit)
|
||||
and R-4.0.0\bin\x64 (64-bit). By default only the first is
|
||||
installed on 32-bit versions of Windows, and both on 64-bit OSes.
|
||||
|
||||
GUI:
|
||||
|
||||
Rgui.exe runs as a standard Windows GUI executable and provides an R
|
||||
console in its own window. It takes the standard R command-line
|
||||
arguments; these are most easily set by making a shortcut to
|
||||
...\R-4.0.0\bin\i386\Rgui.exe (or x64\Rgui.exe) and adding the
|
||||
arguments in the Target field. Set the 'Start in' field of the
|
||||
shortcut to the directory you want to use as the working directory
|
||||
(where workspaces and files are saved to and loaded from). The
|
||||
installer creates a shortcut on the desktop for you (by default).
|
||||
|
||||
You have a choice of interface: SDI (separate windows) or MDI
|
||||
(multiple child windows in one large window). MDI is the default:
|
||||
select SDI by adding --sdi in the Target field: this can also be
|
||||
selected from the installer.
|
||||
|
||||
Command-line editing is available: see Help | Console for details.
|
||||
|
||||
The menus provide shortcuts to some R commands such as help, help.start,
|
||||
apropos, ls, load, save.image, search.
|
||||
|
||||
The 'load' menu items (Source R code, Display file, Load Workspace)
|
||||
keep track of the directory that was last used, and start their dialog
|
||||
boxes from that directory the next time they are used. That directory
|
||||
can be made the working directory by the File | Change dir menu item.
|
||||
All the 'save' menu items start dialog boxes at the current working
|
||||
directory: this includes 'Save Workspace' and the various ways to save
|
||||
graphics, as well as saving the workspace at the end of the session.
|
||||
|
||||
Note that a few of the text help files use accented Western European.
|
||||
To see all the characters you must use an appropriate font
|
||||
(European-language True Type fonts should be OK). To check if your
|
||||
preferred font has these characters, try "help(text)" and look at the
|
||||
examples.
|
||||
|
||||
|
||||
TERMINAL/BATCH:
|
||||
|
||||
Rterm.exe will run from a command line such as a 'Command Prompt'
|
||||
window running the standard shell, cmd.exe, as well as the ports of
|
||||
bash and tcsh that we use. Its primary purpose is to allow batch
|
||||
operation, but it does provide all the facilities needed for
|
||||
interactive use, including command-line editing (see the file
|
||||
README.Rterm).
|
||||
|
||||
Batch use: At its simplest, Rterm.exe can be used in a batch mode by
|
||||
commands like
|
||||
|
||||
Rterm.exe --no-restore --no-save < infile > outfile 2>&1
|
||||
|
||||
although users will probably want to set up simple .bat or .cmd files
|
||||
to run batch jobs. You can also use it via R CMD BATCH: see ?BATCH or
|
||||
R CMD BATCH --help.
|
||||
|
||||
Use with ESS: You can use Rterm.exe to provide inferior R-mode in ESS
|
||||
under NTEmacs. The pager is automatically set to "console" so text
|
||||
help will be displayed in emacs buffers.
|
||||
|
||||
|
||||
GRAPHICS:
|
||||
|
||||
The screen device is called windows(). This is launched
|
||||
automatically, and can also be launched explicitly by windows() from
|
||||
both Rgui.exe and Rterm.exe. A printer device can be opened using
|
||||
win.print(), and graphs drawn as metafiles by win.metafile().
|
||||
|
||||
The graphics device pops up a separate window which has two menus. The
|
||||
device's File menu allows saving or printing or to run dev.off().
|
||||
|
||||
The History menu allows the recording of plots. When plots have been
|
||||
recorded they can be reviewed by PgUp and PgDn, saved and replaced.
|
||||
Recording can be turned on automatically (the Recording item on the
|
||||
list) or individual plots can be added (Add or the INS key).
|
||||
|
||||
The whole plot history can be saved to or retrieved from an R variable
|
||||
in the global environment.
|
||||
The format of recorded plots may change between R versions.
|
||||
Recorded plots should NOT be used as a permanent
|
||||
storage format for R plots.
|
||||
|
||||
There is only one graphics history shared by all the windows devices.
|
||||
|
||||
|
||||
Customization
|
||||
=============
|
||||
|
||||
Environment variables can be set as NAME=value at the end of the
|
||||
command line, including in a shortcut. They can also be set (as
|
||||
NAME=value lines) in the file .Renviron in the working directory, or
|
||||
if that does not exist HOME\.Renviron.
|
||||
|
||||
Many aspects of the console (size, appearance, font, font size,
|
||||
colours) can be customized by editing the file etc\Rconsole, and a
|
||||
copy with a user's settings can be put in her HOME directory or in the
|
||||
working directory. (The exact sequence is to search the directory
|
||||
pointed to by the first found of the environment variables R_USER then
|
||||
HOME, then the Windows "personal" directory (typically
|
||||
'C:\Users\username\My Documents' on recent versions of Windows and
|
||||
'C:\Documents and Settings\username\My Documents' on XP) then
|
||||
{HOMEDRIVE}{HOMEPATH} then the working directory, finally R_HOME\etc.
|
||||
This also applies to .Renviron and other uses of 'HOME' in our
|
||||
documentation.) The file contains a description of the settings that
|
||||
can be altered. See also ?Rconsole.
|
||||
|
||||
An alternative way to edit the Rconsole file is to use the GUI
|
||||
preferences item on the Edit menu in Rgui.exe. This can change some
|
||||
of the settings (for example colours, font and window sizes) on the
|
||||
current running console.
|
||||
|
||||
The mapping between Windows fonts and the font number used in R's
|
||||
graphics can be set by editing the file etc\Rdevga, and a copy with a
|
||||
user's settings can be put in the HOME or working directory (see the
|
||||
description of Rconsole). This mapping applies to both the screen
|
||||
device and the printer device.
|
||||
|
||||
Many R defaults can be set in the file R_HOME\etc\Rprofile or a user's
|
||||
file .Rprofile. In particular:
|
||||
|
||||
- The pager is set by options(pager=). The default is "internal"
|
||||
which brings up a separate console-like window. The internal pager
|
||||
can use a single window or a different window for each topic shown
|
||||
(configurable in Rconsole). Other possibilities we have used are
|
||||
"notepad" and "console" to list the files in the console (Rgui.exe)
|
||||
or terminal window (Rterm.exe).
|
||||
|
||||
|
||||
Adding packages
|
||||
===============
|
||||
|
||||
Binaries for many packages are available under
|
||||
CRAN/bin/windows/contrib. These are zip files which should be
|
||||
unpacked in R-4.0.0\library. The simplest option is use the items on
|
||||
the Packages menu to install from a zip file or to download from CRAN.
|
||||
|
||||
Private libraries of packages can be used and can be specified by the
|
||||
environment variable R_LIBS. (Separate directories by ";" in this
|
||||
version.) They will not be linked to HTML help. In more detail, to
|
||||
use packages installed in directory R:\libraries\gm, set
|
||||
|
||||
R_LIBS=R:\libraries\gm
|
||||
|
||||
in the environment or your .Renviron file or on the command line, or
|
||||
add the line
|
||||
|
||||
.libPaths("R:/libraries/gm")
|
||||
|
||||
to your .Rprofile or at the end of R_HOME\etc\Rprofile.
|
||||
|
||||
To install a package from source code you need the source-package
|
||||
distribution installed from R-4.0.0-win32.exe (but not the R sources).
|
||||
The 'R Installation and Administration' manual contains detailed
|
||||
instructions.
|
||||
|
||||
|
||||
Differences from Unix versions of R
|
||||
===================================
|
||||
|
||||
- R can be interrupted by Esc in Rgui and by Ctrl-C or Ctrl-Break in Rterm:
|
||||
Ctrl-C is used for copying in the GUI version. C-c C-c works
|
||||
under NTemacs.
|
||||
|
||||
- Command-line editing is always available, but is simpler than
|
||||
under readline-based input on Unix. For Rgui.exe, see the menu item
|
||||
'Help | Console', for Rterm.exe the file README.Rterm.
|
||||
|
||||
- Paths to files can be specified with "/" or "\\".
|
||||
|
||||
- system() is enhanced here and does not automatically use a shell.
|
||||
See its help page and that of shell().
|
||||
|
||||
- graphics device bmp() is available in this version.
|
||||
|
||||
|
||||
Using package tcltk
|
||||
===================
|
||||
|
||||
The package tcltk supports building graphical interfaces with Tcl/Tk.
|
||||
"Support Files for Package tcltk" needs to be selected from the
|
||||
installer for this to work; alternatively you can use an existing
|
||||
installation of Tcl/Tk 8.6.x by following the instructions in the
|
||||
rw-FAQ.
|
||||
|
||||
|
||||
Building From Source
|
||||
====================
|
||||
|
||||
See the 'R Installation and Adminstration' Manual
|
||||
(doc\manual\R-admin.html).
|
||||
|
||||
|
||||
Feedback
|
||||
========
|
||||
|
||||
Please send comments and bug reports to
|
||||
|
||||
R-windows@r-project.org
|
||||
|
BIN
R_portable/R/App/R-portable/Tcl/bin/tcl86.dll
Executable file
BIN
R_portable/R/App/R-portable/Tcl/bin/tk86.dll
Executable file
276
R_portable/R/App/R-portable/Tcl/bin64/lib/bwidget-1.9.12/BWman/ArrowButton.html
Executable file
@ -0,0 +1,276 @@
|
||||
<HTML>
|
||||
<HEAD><TITLE>ArrowButton</TITLE></HEAD>
|
||||
<BODY BGCOLOR=white>
|
||||
<DL><DT><I><A HREF="#descr">NAME</A></I></DT>
|
||||
<DD><B>ArrowButton</B>
|
||||
- Button widget with an arrow shape.
|
||||
</DD></DL>
|
||||
<DL>
|
||||
<DT><I>CREATION</I></DT>
|
||||
<DD><A HREF="#descr"><B>ArrowButton</B></A> <I>pathName</I> ?<I>option value...</I>?</DD>
|
||||
</DL>
|
||||
<DL>
|
||||
<DT><I>STANDARD OPTIONS</I></DT>
|
||||
<DD><TABLE CELLSPACING=0 CELLSPACING=0 BORDER=0>
|
||||
<TR>
|
||||
<TD> <A HREF="options.htm#M-activebackground">-activebackground</A></TR>
|
||||
<TD> <A HREF="options.htm#M-activeforeground">-activeforeground</A></TR>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> <A HREF="options.htm#M-background">-background or -bg</A></TD>
|
||||
<TD> <A HREF="options.htm#M-borderwidth">-borderwidth or -bd</A></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> <A HREF="options.htm#M-disabledforeground">-disabledforeground</A></TR>
|
||||
<TD> <A HREF="options.htm#M-foreground">-foreground or -fg</A></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> <A HREF="options.htm#M-highlightbackground">-highlightbackground</A></TR>
|
||||
<TD> <A HREF="options.htm#M-highlightcolor">-highlightcolor</A></TR>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> <A HREF="options.htm#M-highlightthickness">-highlightthickness</A></TR>
|
||||
<TD> <A HREF="options.htm#M-relief">-relief</A></TR>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> <A HREF="options.htm#M-repeatdelay">-repeatdelay</A></TR>
|
||||
<TD> <A HREF="options.htm#M-repeatinterval">-repeatinterval</A></TR>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> <A HREF="options.htm#M-takefocus">-takefocus</A></TR>
|
||||
<TD> <A HREF="options.htm#M-troughcolor">-troughcolor</A></TR>
|
||||
</TR>
|
||||
</TABLE></DD>
|
||||
</DL>
|
||||
<DL>
|
||||
<DT><I><A HREF="#wso">WIDGET-SPECIFIC OPTIONS</A></I></DT>
|
||||
<DD><TABLE CELLSPACING=0 CELLSPACING=0 BORDER=0>
|
||||
<TR>
|
||||
<TD> <A HREF="#-armcommand">-armcommand</A></TR>
|
||||
<TD> <A HREF="#-arrowbd">-arrowbd</A></TR>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> <A HREF="#-arrowrelief">-arrowrelief</A></TR>
|
||||
<TD> <A HREF="#-clean">-clean</A></TR>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> <A HREF="#-command">-command</A></TR>
|
||||
<TD> <A HREF="#-dir">-dir</A></TR>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> <A HREF="#-disarmcommand">-disarmcommand</A></TR>
|
||||
<TD> <A HREF="#-height">-height</A></TR>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> <A HREF="#-helptext">-helptext</A></TR>
|
||||
<TD> <A HREF="#-helptype">-helptype</A></TR>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> <A HREF="#-helpvar">-helpvar</A></TR>
|
||||
<TD> <A HREF="#-ipadx">-ipadx</A></TR>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> <A HREF="#-ipady">-ipady</A></TR>
|
||||
<TD> <A HREF="#-state">-state</A></TR>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> <A HREF="#-type">-type</A></TR>
|
||||
<TD> <A HREF="#-width">-width</A></TR>
|
||||
</TR>
|
||||
</TABLE></DD>
|
||||
</DL>
|
||||
<DL>
|
||||
<DT><I><A HREF="#wc">WIDGET COMMAND</A></I></DT>
|
||||
<DD><I>pathName</I> <A HREF="#cget"><B>cget</B></A>
|
||||
<I>option</I>
|
||||
</DD>
|
||||
<DD><I>pathName</I> <A HREF="#configure"><B>configure</B></A>
|
||||
?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
|
||||
</DD>
|
||||
<DD><I>pathName</I> <A HREF="#invoke"><B>invoke</B></A>
|
||||
</DD>
|
||||
</DL>
|
||||
<BR><HR WIDTH="100%"><BR>
|
||||
<B><A NAME="descr"></A>DESCRIPTION</B><BR>
|
||||
<P>
|
||||
|
||||
ArrowButton can be of two types following <B>type</B> option:
|
||||
for <B>button</B> type, it is standard button with an arrow drawn on it;
|
||||
for <B>arrow</B> type, it is an arrow like scrollbar's arrow.
|
||||
</P>
|
||||
<BR><HR WIDTH="50%"><BR>
|
||||
<B><A NAME="wso">WIDGET-SPECIFIC OPTIONS</A></B><BR>
|
||||
<DL><DT><A NAME="-armcommand"><B>-armcommand</B></A></DT>
|
||||
<DD>
|
||||
|
||||
Specifies a Tcl command to associate with the ArrowButton when mouse button 1 is pressed
|
||||
over the ArrowButton. When <B>repeatdelay</B> or <B>repeatinterval</B> option is positive
|
||||
integer, this command is repeatedly called if mouse pointer is over the button and until
|
||||
mouse button 1 is released.
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="-arrowbd"><B>-arrowbd</B></A></DT>
|
||||
<DD>
|
||||
|
||||
When ArrowButton <B>type</B> is <I>arrow</I>, specifies the border width of the
|
||||
arrow. Must be 1 or 2.
|
||||
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="-arrowrelief"><B>-arrowrelief</B></A></DT>
|
||||
<DD>
|
||||
|
||||
When ArrowButton <B>type</B> is <I>arrow</I>, specifies the relief of the arrow.
|
||||
Must be <B>raised</B> or <B>sunken</B>.
|
||||
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="-clean"><B>-clean</B></A></DT>
|
||||
<DD>
|
||||
|
||||
Specifies a level of quality, between 0 and 2, for the arrow.
|
||||
If 0, the arrow is drawn with its maximum width and height.
|
||||
If 1, the base of arrow is arranged to be odd to have same edges.
|
||||
If 2, the base of arrow is arranged to be odd and the orthogonal to be (base+1)/2 to
|
||||
have 'straight' diagonal for edges.
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="-command"><B>-command</B></A></DT>
|
||||
<DD>
|
||||
|
||||
Specifies a Tcl command to associate with the ArrowButton. This command
|
||||
is typically invoked when mouse button 1 is released over the ArrowButton
|
||||
window.
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="-dir"><B>-dir</B></A></DT>
|
||||
<DD>
|
||||
|
||||
Specifies the direction of the arrow: <B>top</B>, <B>bottom</B>, <B>left</B>
|
||||
or <B>right</B>.
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="-disarmcommand"><B>-disarmcommand</B></A></DT>
|
||||
<DD>
|
||||
|
||||
Specifies a Tcl command to associate with the ArrowButton when mouse button 1 is released.
|
||||
This command is called even if pointer is not over the ArrowButton, and always before
|
||||
the command specified by <B>command</B> option.
|
||||
It is typically used in conjuntion with <B>armcommand</B>, <B>repeatdelay</B> and
|
||||
<B>repeatinterval</B>.
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="-height"><B>-height</B></A></DT>
|
||||
<DD>
|
||||
|
||||
Specifies a desired height for the ArrowButton. The value is in screen units.
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="-helptext"><B>-helptext</B></A></DT>
|
||||
<DD>
|
||||
|
||||
Text for dynamic help. If empty, no help is available for this widget.
|
||||
See also <A HREF="DynamicHelp.html">DynamicHelp</A>.
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="-helptype"><B>-helptype</B></A></DT>
|
||||
<DD>
|
||||
Type of dynamic help. Use <I>balloon</I> or <I>variable</I>.
|
||||
See also <A HREF="DynamicHelp.html">DynamicHelp</A>.
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="-helpvar"><B>-helpvar</B></A></DT>
|
||||
<DD>
|
||||
Variable to use when <B>helptype</B> option is <I>variable</I>.
|
||||
See also <A HREF="DynamicHelp.html">DynamicHelp</A>.
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="-ipadx"><B>-ipadx</B></A></DT>
|
||||
<DD>
|
||||
|
||||
Specifies a minimun pad between the ArrowButton border and the right and left side
|
||||
of the arrow. The value is in screen units.
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="-ipady"><B>-ipady</B></A></DT>
|
||||
<DD>
|
||||
|
||||
Specifies a minimun pad between the ArrowButton border and the top and bottom side
|
||||
of the arrow. The value is in screen units.
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="-state"><B>-state</B></A></DT>
|
||||
<DD>
|
||||
|
||||
Specifies one of three states for the ArrowButton: <B>normal</B>, <B>active</B>,
|
||||
or <B>disabled</B>.
|
||||
<DL><DT>If ArrowButton <B>type</B> is <I>button</I>:</DT>
|
||||
<DD>In normal state the ArrowButton is displayed using the
|
||||
<B>foreground</B> and <B>background</B> options. The active state is
|
||||
typically used when the pointer is over the ArrowButton. In active state
|
||||
the ArrowButton is displayed using the <B>activeforeground</B> and
|
||||
<B>activebackground</B> options. In disabled state the <B>disabledforeground</B> and
|
||||
<B>background</B> options determine how the ArrowButton is displayed.
|
||||
</DD>
|
||||
<DT>If ArrowButton <B>type</B> is <I>arrow</I>:</DT>
|
||||
<DD>Only colors of arrow change. The background of ArrowButton is always
|
||||
displayed using <B>troughcolor</B> option.
|
||||
In normal state the ArrowButton is displayed using the <B>background</B> option. The active
|
||||
state is typically used when the pointer is over the ArrowButton. In active state
|
||||
the ArrowButton is displayed using the <B>activebackground</B> option. In disabled state
|
||||
the ArrowButton is displayed with a dark stipple.
|
||||
</DD>
|
||||
</DL>
|
||||
Disabled state means that the ArrowButton
|
||||
should be insensitive: the default bindings will refuse to activate
|
||||
the widget and will ignore mouse button presses.
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="-type"><B>-type</B></A></DT>
|
||||
<DD>
|
||||
|
||||
Determines the type of the ArrowButton: <B>button</B> for standard button look, or
|
||||
<B>arrow</B> scrollbar's arrow look.
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="-width"><B>-width</B></A></DT>
|
||||
<DD>
|
||||
|
||||
Specifies a desired width for the ArrowButton. The value is in screen units.
|
||||
</DD>
|
||||
</DL>
|
||||
<HR WIDTH="50%"><BR>
|
||||
<B><A NAME="wc">WIDGET COMMAND</A></B><BR>
|
||||
<DL><DT><A NAME="cget"><I>pathName</I> <B>cget</B></A>
|
||||
<I>option</I>
|
||||
</DT><DD>
|
||||
|
||||
Returns the current value of the configuration option given by <I>option</I>.
|
||||
<I>Option</I> may have any of the values accepted by the creation command.
|
||||
</DD></DL>
|
||||
<DL><DT><A NAME="configure"><I>pathName</I> <B>configure</B></A>
|
||||
?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
|
||||
</DT><DD>
|
||||
|
||||
Query or modify the configuration options of the widget. If no <I>option</I> is specified,
|
||||
returns a list describing all of the available options for <I>pathName</I>.
|
||||
If <I>option</I> is specified with no <I>value</I>, then the command returns a list
|
||||
describing the one named <I>option</I> (this list will be identical to the corresponding
|
||||
sublist of the value returned if no <I>option</I> is specified). If one or
|
||||
more <I>option-value</I> pairs are specified, then the command modifies the given widget
|
||||
option(s) to have the given value(s); in this case the command returns an empty string.
|
||||
<I>Option</I> may have any of the values accepted by the creation command.
|
||||
Read-only options are not be modified.
|
||||
|
||||
</DD></DL>
|
||||
<DL><DT><A NAME="invoke"><I>pathName</I> <B>invoke</B></A>
|
||||
</DT><DD>
|
||||
|
||||
If ArrowButton <B>state</B> is not disabled, this invoke the commands of the button.
|
||||
ArrowButton is redisplayed with active color and sunken relief, and
|
||||
<B>armcommand</B> is called. Then ArrowButton is redisplayed with
|
||||
normal color and its defined relief, and <B>disarmcommand</B> then <B>command</B>
|
||||
are called.
|
||||
<P><B>invoke</B> is called when ArrowButton has input focus and user press the space bar.
|
||||
</DD></DL>
|
||||
</BODY></HTML>
|
228
R_portable/R/App/R-portable/Tcl/bin64/lib/bwidget-1.9.12/BWman/BWidget.html
Executable file
@ -0,0 +1,228 @@
|
||||
<HTML>
|
||||
<HEAD><TITLE>BWidget</TITLE></HEAD>
|
||||
<BODY BGCOLOR=white>
|
||||
<IMG SRC="constr.gif" WIDTH="40" HEIGHT="40"> Under construction ...<BR>
|
||||
<DL><DT><I><A HREF="#descr">NAME</A></I></DT>
|
||||
<DD><B>BWidget</B>
|
||||
- Description text
|
||||
</DD></DL>
|
||||
<DL>
|
||||
<DT><I><A HREF="#wc">COMMAND</A></I></DT>
|
||||
<DD>BWidget::<A HREF="#XLFDfont"><B>XLFDfont</B></A>
|
||||
<I>cmd</I>
|
||||
?<I>arg...</I>?
|
||||
</DD>
|
||||
<DD>BWidget::<A HREF="#assert"><B>assert</B></A>
|
||||
<I>exp</I>
|
||||
?<I>msg</I>?
|
||||
</DD>
|
||||
<DD>BWidget::<A HREF="#badOptionString"><B>badOptionString</B></A>
|
||||
<I>type</I>
|
||||
<I>value</I>
|
||||
<I>list</I>
|
||||
</DD>
|
||||
<DD>BWidget::<A HREF="#bindMouseWheel"><B>bindMouseWheel</B></A>
|
||||
<I>widget</I>
|
||||
</DD>
|
||||
<DD>BWidget::<A HREF="#classes"><B>classes</B></A>
|
||||
<I>class</I>
|
||||
</DD>
|
||||
<DD>BWidget::<A HREF="#clonename"><B>clonename</B></A>
|
||||
<I>menu</I>
|
||||
</DD>
|
||||
<DD>BWidget::<A HREF="#focus"><B>focus</B></A>
|
||||
<I>option</I>
|
||||
<I>path</I>
|
||||
</DD>
|
||||
<DD>BWidget::<A HREF="#get3dcolor"><B>get3dcolor</B></A>
|
||||
<I>path</I>
|
||||
<I>bgcolor</I>
|
||||
</DD>
|
||||
<DD>BWidget::<A HREF="#getname"><B>getname</B></A>
|
||||
<I>name</I>
|
||||
</DD>
|
||||
<DD>BWidget::<A HREF="#grab"><B>grab</B></A>
|
||||
<I>option</I>
|
||||
<I>path</I>
|
||||
</DD>
|
||||
<DD>BWidget::<A HREF="#inuse"><B>inuse</B></A>
|
||||
<I>class</I>
|
||||
</DD>
|
||||
<DD>BWidget::<A HREF="#library"><B>library</B></A>
|
||||
<I>class</I> ?<i>class ...</i>?
|
||||
</DD>
|
||||
<DD>BWidget::<A HREF="#lreorder"><B>lreorder</B></A>
|
||||
<I>list</I>
|
||||
<I>neworder</I>
|
||||
</DD>
|
||||
<DD>BWidget::<A HREF="#parsetext"><B>parsetext</B></A>
|
||||
<I>text</I>
|
||||
</DD>
|
||||
<DD>BWidget::<A HREF="#place"><B>place</B></A>
|
||||
<I>path</I>
|
||||
<I>w</I>
|
||||
<I>h</I>
|
||||
?<I>arg...</I>?
|
||||
</DD>
|
||||
<DD>BWidget::<A HREF="#write"><B>write</B></A>
|
||||
<I>filename</I> ?<i>mode</i>?
|
||||
</DD>
|
||||
<DD>BWidget::<A HREF="#wrongNumArgsString"><B>wrongNumArgsString</B></A>
|
||||
<I>string</I>
|
||||
</DD>
|
||||
</DL>
|
||||
<BR><HR WIDTH="100%"><BR>
|
||||
<B><A NAME="descr"></A>DESCRIPTION</B><BR>
|
||||
<P>
|
||||
Description text
|
||||
</P>
|
||||
<HR WIDTH="50%"><BR>
|
||||
<B><A NAME="wc">COMMAND</A></B><BR>
|
||||
<DL><DT><A NAME="XLFDfont">BWidget::<B>XLFDfont</B></A>
|
||||
<I>cmd</I>
|
||||
?<I>arg...</I>?
|
||||
</DT><DD>
|
||||
Description text
|
||||
</DD></DL>
|
||||
<DL><DT><A NAME="assert">BWidget::<B>assert</B></A>
|
||||
<I>exp</I>
|
||||
?<I>msg</I>?
|
||||
</DT><DD>
|
||||
Description text
|
||||
</DD></DL>
|
||||
<DL><DT><A NAME="badOptionString">BWidget::<B>badOptionString</B></A>
|
||||
<I>type</I>
|
||||
<I>value</I>
|
||||
<I>list</I>
|
||||
</DT><DD>
|
||||
Return a proper error string for a <i>value</i> of <i>type</i> that doesn't
|
||||
match <i>list</i>.
|
||||
</DD></DL>
|
||||
|
||||
<DL><DT><A NAME="bindMouseWheel">BWidget::<B>bindMouseWheel</B></A>
|
||||
<I>widget</I>
|
||||
</DT><DD>
|
||||
Bind the given <i>widget</i> with the standard mouse wheel bindings.
|
||||
</DD></DL>
|
||||
|
||||
<DL><DT><A NAME="classes">BWidget::<B>classes</B></A>
|
||||
<I>class</I>
|
||||
</DT><DD>
|
||||
Returns a list of classes needed by the given <i>class</i>.
|
||||
</DD></DL>
|
||||
|
||||
<DL><DT><A NAME="clonename">BWidget::<B>clonename</B></A>
|
||||
<I>menu</I>
|
||||
</DT><DD>
|
||||
Description text
|
||||
</DD></DL>
|
||||
<DL><DT><A NAME="focus">BWidget::<B>focus</B></A>
|
||||
<I>option</I>
|
||||
<I>path</I>
|
||||
</DT><DD>
|
||||
Description text
|
||||
</DD></DL>
|
||||
<DL><DT><A NAME="get3dcolor">BWidget::<B>get3dcolor</B></A>
|
||||
<I>path</I>
|
||||
<I>bgcolor</I>
|
||||
</DT><DD>
|
||||
Description text
|
||||
</DD></DL>
|
||||
<DL><DT><A NAME="getname">BWidget::<B>getname</B></A>
|
||||
<I>name</I>
|
||||
</DT><DD>
|
||||
Description text
|
||||
</DD></DL>
|
||||
<DL><DT><A NAME="grab">BWidget::<B>grab</B></A>
|
||||
<I>option</I>
|
||||
<I>path</I>
|
||||
</DT><DD>
|
||||
Description text
|
||||
</DD></DL>
|
||||
|
||||
<DL><DT><A NAME="inuse">BWidget::<B>inuse</B></A>
|
||||
<I>class</I>
|
||||
</DT><DD>
|
||||
Returns true or false if the given <i>class</i> is being used by the
|
||||
current running program.
|
||||
</DD></DL>
|
||||
|
||||
<DL><DT><A NAME="library">BWidget::<B>library</B></A>
|
||||
<I>class</I>
|
||||
?<i>class ...</i>?
|
||||
</DT><DD>
|
||||
Returns a string of code that contains all the libraries needed to
|
||||
use the widgets given by <i>class</i>. Each class's code and the
|
||||
code of its dependent classes is appended to the string and returned.
|
||||
This is mostly useful for saving BWidgets to another project.
|
||||
</DD></DL>
|
||||
|
||||
<DL><DT><A NAME="lreorder">BWidget::<B>lreorder</B></A>
|
||||
<I>list</I>
|
||||
<I>neworder</I>
|
||||
</DT><DD>
|
||||
Description text
|
||||
</DD></DL>
|
||||
<DL><DT><A NAME="parsetext">BWidget::<B>parsetext</B></A>
|
||||
<I>text</I>
|
||||
</DT><DD>
|
||||
Description text
|
||||
</DD></DL>
|
||||
<DL><DT><A NAME="place">BWidget::<B>place</B></A>
|
||||
<I>path</I>
|
||||
<I>w</I>
|
||||
<I>h</I>
|
||||
?<I>arg...</I>?
|
||||
</DT><DD>
|
||||
Used to position and resize the widget specified by
|
||||
<I>path</I>. <I>w</I> and <I>h</I> are used to specify the requested
|
||||
width and height of the <I>path</I> widget for use by <B>wm
|
||||
geometry</B> (set to 0 to use current values). The placement of the widget relative to other widgets or
|
||||
the screen is controlled by additional arguments:
|
||||
<DL>
|
||||
<DT><B>at</B> <I>x</I> <I>y</I></DT>
|
||||
<DD>Place the widget specified by the <I>path</I> argument at screen
|
||||
position x,y. See <B>wm geometry</B> for information about window
|
||||
placement values.</DD>
|
||||
|
||||
<DT><B>center</B> <I>?widget?</I></DT>
|
||||
<DD>Place the <I>path</I> widget centered against <I>widget</I> or against the
|
||||
root widget if <I>widget</I> is not given.</DD>
|
||||
|
||||
<DT><B>left</B> <I>?widget?</I></DT>
|
||||
<DT><B>right</B> <I>?widget?</I></DT>
|
||||
<DD>Place the <I>path</I> widget either left or right of the
|
||||
reference widget (or the root widget if <I>widget</I> is not
|
||||
specified). If the reference widget's position is such that the newly
|
||||
placed window might be obscured then the opposite side will be tried.</DD>
|
||||
|
||||
<DT><B>above</B> <I>?widget?</I></DT>
|
||||
<DT><B>below</B> <I>?widget?</I></DT>
|
||||
<DD>As for left/right above, this option causes the widget to be
|
||||
placed either above or below the reference widget with the opposite
|
||||
placement being attempted if the newly placed widget will not be visible.
|
||||
</DL>
|
||||
</DL>
|
||||
|
||||
<DL><DT><A NAME="write">BWidget::<B>write</B></A>
|
||||
<I>filename</I>
|
||||
?<i>mode</i>?
|
||||
</DT><DD>
|
||||
Writes the currently used set of BWidget class code to the given
|
||||
<i>filename</i>. All the code necessary to run the BWidgets
|
||||
currently in use is written to the file. This is mostly useful
|
||||
for saving BWidget code to another project as a single file instead
|
||||
of the entire BWidget package.
|
||||
</DD></DL>
|
||||
|
||||
<DL>
|
||||
<DT><A NAME="wrongNumArgsString">BWidget::<B>wrongNumArgsString</B></A>
|
||||
<I>string</I>
|
||||
</DT>
|
||||
<DD>
|
||||
Returns a standard error string for the wrong number of arguments.
|
||||
<i>string</i> is appended to the standard string.
|
||||
</DD>
|
||||
</DL>
|
||||
|
||||
</BODY></HTML>
|
307
R_portable/R/App/R-portable/Tcl/bin64/lib/bwidget-1.9.12/BWman/Button.html
Executable file
@ -0,0 +1,307 @@
|
||||
<HTML>
|
||||
<HEAD><TITLE>Button</TITLE></HEAD>
|
||||
<BODY BGCOLOR=white>
|
||||
<DL><DT><I><A HREF="#descr">NAME</A></I></DT>
|
||||
<DD><B>Button</B>
|
||||
- Button widget with enhanced options
|
||||
</DD></DL>
|
||||
<DL>
|
||||
<DT><I>CREATION</I></DT>
|
||||
<DD><A HREF="#descr"><B>Button</B></A> <I>pathName</I> ?<I>option value...</I>?</DD>
|
||||
</DL>
|
||||
<DL>
|
||||
<DT><I>STANDARD OPTIONS</I></DT>
|
||||
<DT><I>Not themed</I></DT>
|
||||
<DD><TABLE CELLSPACING=0 CELLSPACING=0 BORDER=0>
|
||||
<TR>
|
||||
<TD> <A HREF="options.htm#M-activebackground">-activebackground</A></TD>
|
||||
<TD> <A HREF="options.htm#M-activeforeground">-activeforeground</A></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> <A HREF="options.htm#M-anchor">-anchor</A></TD>
|
||||
<TD> <A HREF="options.htm#M-background">-background or -bg</A></TD>
|
||||
</TD>
|
||||
<TR>
|
||||
<TD> <A HREF="options.htm#M-bitmap">-bitmap</A></TD>
|
||||
<TD> <A HREF="options.htm#M-borderwidth">-borderwidth or -bd</A></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> <A HREF="options.htm#M-cursor">-cursor</A></TD>
|
||||
<TD> <A HREF="options.htm#M-disabledforeground">-disabledforeground</A></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> <A HREF="options.htm#M-font">-font</A></TD>
|
||||
<TD> <A HREF="options.htm#M-foreground">-foreground or -fg</A></TD>
|
||||
</TD>
|
||||
<TR>
|
||||
<TD> <A HREF="options.htm#M-highlightbackground">-highlightbackground</A></TD>
|
||||
<TD> <A HREF="options.htm#M-highlightcolor">-highlightcolor</A></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> <A HREF="options.htm#M-highlightthickness">-highlightthickness</A></TD>
|
||||
<TD> <A HREF="options.htm#M-image">-image</A></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> <A HREF="options.htm#M-justify">-justify</A></TD>
|
||||
<TD> <A HREF="options.htm#M-padx">-padx</A></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> <A HREF="options.htm#M-pady">-pady</A></TD>
|
||||
<TD> <A HREF="options.htm#M-repeatdelay">-repeatdelay</A></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> <A HREF="options.htm#M-repeatinterval">-repeatinterval</A></TD>
|
||||
<TD> <A HREF="options.htm#M-takefocus">-takefocus</A></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> <A HREF="options.htm#M-text">-text</A></TD>
|
||||
<TD> <A HREF="options.htm#M-textvariable">-textvariable</A></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> <A HREF="options.htm#M-wraplength">-wraplength</A></TD>
|
||||
</TABLE></DD>
|
||||
<DT><I>Themed</I></DT>
|
||||
<DD><TABLE CELLSPACING=0 CELLSPACING=0 BORDER=0>
|
||||
<TR>
|
||||
<TD> <A HREF="options.htm#M-compound">-compound</A></TD>
|
||||
<TD> <A HREF="options.htm#M-cursor">-cursor</A></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> <A HREF="options.htm#M-image">-image</A></TD>
|
||||
<TD> <A HREF="options.htm#M-style">-style</A></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> <A HREF="options.htm#M-repeatdelay">-repeatdelay</A></TD>
|
||||
<TD> <A HREF="options.htm#M-repeatinterval">-repeatinterval</A></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> <A HREF="options.htm#M-takefocus">-takefocus</A></TD>
|
||||
<TD> <A HREF="options.htm#M-text">-text</A></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> <A HREF="options.htm#M-textvariable">-textvariable</A></TD>
|
||||
</TABLE></DD>
|
||||
</DL>
|
||||
<DL>
|
||||
<DT><I><A HREF="#wso">WIDGET-SPECIFIC OPTIONS</A></I></DT>
|
||||
<DD><TABLE CELLSPACING=0 CELLSPACING=0 BORDER=0>
|
||||
<TR>
|
||||
<TD> <A HREF="#-armcommand">-armcommand</A></TD>
|
||||
<TD> <A HREF="#-command">-command</A></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> <A HREF="#-default">-default</A></TD>
|
||||
<TD> <A HREF="#-disarmcommand">-disarmcommand</A></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> <A HREF="#-height">-height</A></TD>
|
||||
<TD> <A HREF="#-helptext">-helptext</A></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> <A HREF="#-helptype">-helptype</A></TD>
|
||||
<TD> <A HREF="#-helpvar">-helpvar</A></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> <A HREF="#-name">-name</A></TD>
|
||||
<TD> <A HREF="#-relief">-relief</A></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> <A HREF="#-state">-state</A></TD>
|
||||
<TD> <A HREF="#-underline">-underline</A></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> <A HREF="#-width">-width</A></TD>
|
||||
</TABLE></DD>
|
||||
</DL>
|
||||
<DL>
|
||||
<DT><I><A HREF="#wc">WIDGET COMMAND</A></I></DT>
|
||||
<DD><I>pathName</I> <A HREF="#cget"><B>cget</B></A>
|
||||
<I>option</I>
|
||||
</DD>
|
||||
<DD><I>pathName</I> <A HREF="#configure"><B>configure</B></A>
|
||||
?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
|
||||
</DD>
|
||||
<DD><I>pathName</I> <A HREF="#invoke"><B>invoke</B></A>
|
||||
</DD>
|
||||
</DL>
|
||||
<BR><HR WIDTH="100%"><BR>
|
||||
<B><A NAME="descr"></A>DESCRIPTION</B><BR>
|
||||
<P>
|
||||
|
||||
Button widget extends the Tk button with new options.
|
||||
<A HREF="DynamicHelp.html">DynamicHelp</A> options,
|
||||
a new relief style, callback for <B>arm</B>/<B>disarm</B>, and
|
||||
<B>repeatdelay</B>/<B>repeatinterval</B> options has been added.
|
||||
</P>
|
||||
<BR><HR WIDTH="50%"><BR>
|
||||
<B><A NAME="wso">WIDGET-SPECIFIC OPTIONS</A></B><BR>
|
||||
<DL><DT><A NAME="-armcommand"><B>-armcommand</B></A></DT>
|
||||
<DD>
|
||||
|
||||
Specifies a Tcl command to associate with the Button when mouse button 1 is pressed over the
|
||||
Button. When <B>repeatdelay</B> or <B>repeatinterval</B> option is positive integer,
|
||||
this command is repeatedly called if mouse pointer is over the Button and until mouse
|
||||
button 1 is released.
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="-command"><B>-command</B></A></DT>
|
||||
<DD>
|
||||
|
||||
Specifies a Tcl command to associate with the Button. This command
|
||||
is typically invoked when mouse button 1 is released over the Button
|
||||
window.
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="-default"><B>-default</B></A></DT>
|
||||
<DD>
|
||||
|
||||
Specifies one of three states for the default ring: <B>normal</B>, <B>active</B>,
|
||||
or <B>disabled</B>. In active state, the button is drawn with the platform specific
|
||||
appearance for a default button. In normal state, the button is drawn with the platform
|
||||
specific appearance for a non-default button, leaving enough space to draw the default
|
||||
button appearance. The normal and active states will result in buttons of the same size.
|
||||
In disabled state, the button is drawn with the non-default button appearance without
|
||||
leaving space for the default appearance. The disabled state may result
|
||||
in a smaller button than the active state.
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="-disarmcommand"><B>-disarmcommand</B></A></DT>
|
||||
<DD>
|
||||
|
||||
Specifies a Tcl command to associate with the Button when mouse button 1 is released.
|
||||
This command is called even if pointer is not over the Button, and always before
|
||||
the command specified by <B>command</B> option.
|
||||
It is typically used in conjuntion with <B>armcommand</B>, <B>repeatdelay</B> and
|
||||
<B>repeatinterval</B>.
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="-height"><B>-height</B></A></DT>
|
||||
<DD>
|
||||
|
||||
Specifies a desired height for the Button.
|
||||
If an image or bitmap is being displayed in the Button then the value is in
|
||||
screen units;
|
||||
for text it is in lines of text.
|
||||
If this option isn't specified, the Button's desired height is computed
|
||||
from the size of the image or bitmap or text being displayed in it.<BR>
|
||||
Option not available when widget is <I>themed</I>.
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="-helptext"><B>-helptext</B></A></DT>
|
||||
<DD>
|
||||
|
||||
Text for dynamic help. If empty, no help is available for this widget.
|
||||
See also <A HREF="DynamicHelp.html">DynamicHelp</A>.
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="-helptype"><B>-helptype</B></A></DT>
|
||||
<DD>
|
||||
Type of dynamic help. Use <I>balloon</I> or <I>variable</I>.
|
||||
See also <A HREF="DynamicHelp.html">DynamicHelp</A>.
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="-helpvar"><B>-helpvar</B></A></DT>
|
||||
<DD>
|
||||
Variable to use when <B>helptype</B> option is <I>variable</I>.
|
||||
See also <A HREF="DynamicHelp.html">DynamicHelp</A>.
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="-name"><B>-name</B></A></DT>
|
||||
<DD>
|
||||
|
||||
Specifies a standard name for the button. If the option <B>*<I>name</I>Name</B> is
|
||||
found in the resources database, then <B>text</B> and <B>underline</B> options
|
||||
are extracted from its value.
|
||||
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="-relief"><B>-relief</B></A></DT>
|
||||
<DD>
|
||||
|
||||
Specifies the 3-D effect desired for the widget. Acceptable values are standard values for
|
||||
button relief (<B>raised</B>, <B>sunken</B>, <B>flat</B>, <B>ridge</B>, <B>solid</B>, and <B>groove</B>) and <B>link</B>, which specifies that button relief is <B>flat</B> when pointer
|
||||
is outside the button and <B>raised</B> when pointer is inside.<BR>
|
||||
This option has only the following effect if the widget is <I>themed</I>:
|
||||
The value <B>link</B> used a style <B>Toolbutton</B> while any other value uses the standard effect.
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="-state"><B>-state</B></A></DT>
|
||||
<DD>
|
||||
|
||||
Specifies one of three states for the Button: <B>normal</B>, <B>active</B>,
|
||||
or <B>disabled</B>. In normal state the Button is displayed using the
|
||||
<B>foreground</B> and <B>background</B> options. The active state is
|
||||
typically used when the pointer is over the Button. In active state
|
||||
the Button is displayed using the <B>activeforeground</B> and
|
||||
<B>activebackground</B> options. Disabled state means that the Button
|
||||
should be insensitive: the default bindings will refuse to activate
|
||||
the widget and will ignore mouse button presses.
|
||||
In this state the <B>disabledforeground</B> and
|
||||
<B>background</B> options determine how the Button is displayed.
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="-underline"><B>-underline</B></A></DT>
|
||||
<DD>
|
||||
|
||||
Specifies the integer index of a character to underline in the label of the button.
|
||||
0 corresponds to the first character of the text displayed, 1 to the next character,
|
||||
and so on.
|
||||
<BR>The binding <B><Alt-<I>char</I>></B> is automatically set on the toplevel
|
||||
of the Button to call Button::<B>setfocus</B>.
|
||||
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="-width"><B>-width</B></A></DT>
|
||||
<DD>
|
||||
|
||||
If an image or bitmap is being displayed in the Button then the value is in
|
||||
screen units;
|
||||
for text it is in characters.
|
||||
If this option isn't specified, the Button's desired width is computed
|
||||
from the size of the image or bitmap or text being displayed in it.
|
||||
</DD>
|
||||
</DL>
|
||||
<HR WIDTH="50%"><BR>
|
||||
<B><A NAME="wc">WIDGET COMMAND</A></B><BR>
|
||||
<DL><DT><A NAME="cget"><I>pathName</I> <B>cget</B></A>
|
||||
<I>option</I>
|
||||
</DT><DD>
|
||||
|
||||
Returns the current value of the configuration option given by <I>option</I>.
|
||||
<I>Option</I> may have any of the values accepted by the creation command.
|
||||
</DD></DL>
|
||||
<DL><DT><A NAME="configure"><I>pathName</I> <B>configure</B></A>
|
||||
?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
|
||||
</DT><DD>
|
||||
|
||||
Query or modify the configuration options of the widget. If no <I>option</I> is specified,
|
||||
returns a list describing all of the available options for <I>pathName</I>.
|
||||
If <I>option</I> is specified with no <I>value</I>, then the command returns a list
|
||||
describing the one named <I>option</I> (this list will be identical to the corresponding
|
||||
sublist of the value returned if no <I>option</I> is specified). If one or
|
||||
more <I>option-value</I> pairs are specified, then the command modifies the given widget
|
||||
option(s) to have the given value(s); in this case the command returns an empty string.
|
||||
<I>Option</I> may have any of the values accepted by the creation command.
|
||||
Read-only options are not be modified.
|
||||
|
||||
</DD></DL>
|
||||
<DL><DT><A NAME="invoke"><I>pathName</I> <B>invoke</B></A>
|
||||
</DT><DD>
|
||||
|
||||
If Button <B>state</B> is not disabled, this invoke the commands of the Button.
|
||||
Button is redisplayed with active color and sunken relief, and
|
||||
<B>armcommand</B> is called. Then Button is redisplayed with
|
||||
normal color and its defined relief, and <B>disarmcommand</B> then <B>command</B>
|
||||
are called.
|
||||
<P><B>invoke</B> is called when Button has input focus and user press the space bar.
|
||||
|
||||
</DD></DL>
|
||||
<HR WIDTH="50%"><BR>
|
||||
<B><A NAME="wc">BINDINGS</A></B><BR>
|
||||
<DL><DT><A NAME="Invoke"><I><<Invoke>></I></A>
|
||||
</DT><DD>
|
||||
|
||||
Invoke the <B>invoke</B> widget command.
|
||||
</DD></DL>
|
||||
<HR WIDTH="50%"><BR>
|
||||
</BODY></HTML>
|
266
R_portable/R/App/R-portable/Tcl/bin64/lib/bwidget-1.9.12/BWman/ButtonBox.html
Executable file
@ -0,0 +1,266 @@
|
||||
<HTML>
|
||||
<HEAD><TITLE>ButtonBox</TITLE></HEAD>
|
||||
<BODY BGCOLOR=white>
|
||||
<DL><DT><I><A HREF="#descr">NAME</A></I></DT>
|
||||
<DD><B>ButtonBox</B>
|
||||
- Set of buttons with horizontal or vertical layout
|
||||
</DD></DL>
|
||||
<DL>
|
||||
<DT><I>CREATION</I></DT>
|
||||
<DD><A HREF="#descr"><B>ButtonBox</B></A> <I>pathName</I> ?<I>option value...</I>?</DD>
|
||||
</DL>
|
||||
<DL>
|
||||
<DT><I><A HREF="#wso">WIDGET-SPECIFIC OPTIONS</A></I></DT>
|
||||
<DD><TABLE CELLSPACING=0 CELLSPACING=0 BORDER=0>
|
||||
<TR>
|
||||
<TD> <A HREF="#-background">-background or -bg</A></TD>
|
||||
<TD> <A HREF="#-default">-default</A></TR>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> <A HREF="#-homogeneous">-homogeneous</A></TD>
|
||||
<TD> <A HREF="#-orient">-orient</A></TR>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> <A HREF="#-padx">-padx</A></TD>
|
||||
<TD> <A HREF="#-pady">-pady</A></TR>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> <A HREF="#-spacing">-spacing</A></TD>
|
||||
<TD> <A HREF="#-state">-state</A></TR>
|
||||
</TABLE></DD>
|
||||
</DL>
|
||||
<DL>
|
||||
<DT><I><A HREF="#wc">WIDGET COMMAND</A></I></DT>
|
||||
<DD><I>pathName</I> <A HREF="#add"><B>add</B></A>
|
||||
?<I>option value...</I>?
|
||||
</DD>
|
||||
<DD><I>pathName</I> <A HREF="#cget"><B>cget</B></A>
|
||||
<I>option</I>
|
||||
</DD>
|
||||
<DD><I>pathName</I> <A HREF="#configure"><B>configure</B></A>
|
||||
?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
|
||||
</DD>
|
||||
<DD><I>pathName</I> <A HREF="#delete"><B>delete</B></A>
|
||||
<I>index</I>
|
||||
</DD>
|
||||
<DD><I>pathName</I> <A HREF="#index"><B>index</B></A>
|
||||
<I>index</I>
|
||||
</DD>
|
||||
<DD><I>pathName</I> <A HREF="#insert"><B>insert</B></A>
|
||||
<i>index</i> ?<I>option value...</I>?
|
||||
</DD>
|
||||
<DD><I>pathName</I> <A HREF="#invoke"><B>invoke</B></A>
|
||||
<I>index</I>
|
||||
</DD>
|
||||
<DD><I>pathName</I> <A HREF="#itemcget"><B>itemcget</B></A>
|
||||
<I>index</I>
|
||||
<I>option</I>
|
||||
</DD>
|
||||
<DD><I>pathName</I> <A HREF="#itemconfigure"><B>itemconfigure</B></A>
|
||||
<I>index</I>
|
||||
?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
|
||||
</DD>
|
||||
<DD><I>pathName</I> <A HREF="#setfocus"><B>setfocus</B></A>
|
||||
<I>index</I>
|
||||
</DD>
|
||||
</DL>
|
||||
<BR><HR WIDTH="100%"><BR>
|
||||
<B><A NAME="descr"></A>DESCRIPTION</B><BR>
|
||||
<P>
|
||||
|
||||
ButtonBox layouts Button horizontally or vertically.
|
||||
Some commands take an <I>index</I> as argument indicating on which
|
||||
Button it work. This index may be specified in any of the following forms:
|
||||
<P>
|
||||
<DL COMPACT>
|
||||
<DT>
|
||||
<I>number</I>
|
||||
<DD>
|
||||
Specifies the Button numerically, where 0 corresponds
|
||||
to the first added Button, 1 to the next, and so on.
|
||||
<DT>
|
||||
<B>end</B> or <B>last</B>
|
||||
<DD>
|
||||
Indicates the last item added.
|
||||
<DT><B>default</B>
|
||||
<DD>
|
||||
Indicates the default Button.
|
||||
|
||||
<DT>
|
||||
<i>name</i>
|
||||
<DD>
|
||||
Indicates the button whose <b>-name</b> option is <i>name</i>.
|
||||
|
||||
<DT>
|
||||
<i>text</i>
|
||||
<DD>
|
||||
Indicates the button whose <b>-text</b> option is <i>text</i>.
|
||||
</DL>
|
||||
|
||||
</P>
|
||||
<BR><HR WIDTH="50%"><BR>
|
||||
<B><A NAME="wso">WIDGET-SPECIFIC OPTIONS</A></B><BR>
|
||||
<DL><DT><A NAME="-background"><B>-background</B></A></DT>
|
||||
<DD>
|
||||
|
||||
Specifies a default background color for all added buttons and for the frame.<BR>
|
||||
For <I>themed</I> wigets, the button color is not set.
|
||||
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="-default"><B>-default</B></A></DT>
|
||||
<DD>
|
||||
|
||||
Specifies the default button of the button box. The value is an integer
|
||||
referencing the n-th added button, starting from 0.
|
||||
If this value is -1 (the default), all button wil be drawn with their -default
|
||||
option set to disabled, and this value can not be changed. <BR>If this value is
|
||||
not -1, the associated button is drawn with -default option set to active and
|
||||
the others are drawn with -default option set to normal. The value can be changed
|
||||
by configure.
|
||||
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="-homogeneous"><B>-homogeneous (read-only)</B></A></DT>
|
||||
<DD>
|
||||
|
||||
Specifies wether or not buttons must have the same width for horizontal layout.
|
||||
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="-orient"><B>-orient (read-only)</B></A></DT>
|
||||
<DD>
|
||||
|
||||
Specifies the orientation of the button box. If this option is <B>horizontal</B>
|
||||
(the default), buttons are added from top to bottom.
|
||||
If this option is <B>vertical</B>, buttons are added from left to right.
|
||||
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="-padx"><B>-padx</B></A></DT>
|
||||
<DD>
|
||||
|
||||
Specifies a default value for the -padx option of all added buttons.<BR>
|
||||
Option has no effect for <I>themed</I> wigets.
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="-pady"><B>-pady</B></A></DT>
|
||||
<DD>
|
||||
|
||||
Specifies a default value for the -pady option of all added buttons.<BR>
|
||||
Option has no effect for <I>themed</I> wigets.
|
||||
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="-spacing"><B>-spacing</B></A></DT>
|
||||
<DD>
|
||||
|
||||
Specifies the default spacing between buttons. This value can be changed before each
|
||||
call to <B>add</B>.
|
||||
|
||||
</DD>
|
||||
</DL>
|
||||
|
||||
<DL><DT><A NAME="-state"><B>-state</B></A></DT>
|
||||
<DD>
|
||||
|
||||
Specifies a state for all the buttons in the button box. Can be any state supported by buttons.
|
||||
|
||||
</DD>
|
||||
</DL>
|
||||
|
||||
<HR WIDTH="50%"><BR>
|
||||
<B><A NAME="wc">WIDGET COMMAND</A></B><BR>
|
||||
<DL><DT><A NAME="add"><I>pathName</I> <B>add</B></A>
|
||||
?<I>option value...</I>?
|
||||
</DT><DD>
|
||||
|
||||
Add a button to the button box.
|
||||
<P>
|
||||
See <A HREF="Button.html"><B>Button</B></A> for description of options.
|
||||
</DD></DL>
|
||||
<DL><DT><A NAME="cget"><I>pathName</I> <B>cget</B></A>
|
||||
<I>option</I>
|
||||
</DT><DD>
|
||||
|
||||
Returns the current value of the configuration option given by <I>option</I>.
|
||||
<I>Option</I> may have any of the values accepted by the creation command.
|
||||
</DD></DL>
|
||||
<DL><DT><A NAME="configure"><I>pathName</I> <B>configure</B></A>
|
||||
?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
|
||||
</DT><DD>
|
||||
|
||||
Query or modify the configuration options of the widget. If no <I>option</I> is specified,
|
||||
returns a list describing all of the available options for <I>pathName</I>.
|
||||
If <I>option</I> is specified with no <I>value</I>, then the command returns a list
|
||||
describing the one named <I>option</I> (this list will be identical to the corresponding
|
||||
sublist of the value returned if no <I>option</I> is specified). If one or
|
||||
more <I>option-value</I> pairs are specified, then the command modifies the given widget
|
||||
option(s) to have the given value(s); in this case the command returns an empty string.
|
||||
<I>Option</I> may have any of the values accepted by the creation command.
|
||||
Read-only options are not be modified.
|
||||
|
||||
</DD></DL>
|
||||
|
||||
<DL><DT><A NAME="delete"><I>pathName</I> <B>delete</B></A>
|
||||
<I>index</I>
|
||||
</DT><DD>
|
||||
|
||||
Delete the button at <i>index</i> from the button box.
|
||||
|
||||
</DD></DL>
|
||||
|
||||
<DL><DT><A NAME="index"><I>pathName</I> <B>index</B></A>
|
||||
<I>index</I>
|
||||
</DT><DD>
|
||||
|
||||
Return the numerical index corresponding to the item.
|
||||
|
||||
</DD></DL>
|
||||
|
||||
<DL><DT><A NAME="insert"><I>pathName</I> <B>insert</B></A>
|
||||
<I>index</I> ?<I>option value...</I>?
|
||||
</DT><DD>
|
||||
|
||||
Insert a new button into the button box before the given index.
|
||||
|
||||
</DD></DL>
|
||||
|
||||
<DL><DT><A NAME="invoke"><I>pathName</I> <B>invoke</B></A>
|
||||
<I>index</I>
|
||||
</DT><DD>
|
||||
|
||||
Invoke the Button given by <I>index</I>.
|
||||
|
||||
</DD></DL>
|
||||
<DL><DT><A NAME="itemcget"><I>pathName</I> <B>itemcget</B></A>
|
||||
<I>index</I>
|
||||
<I>option</I>
|
||||
</DT><DD>
|
||||
|
||||
Returns the current value of a configuration option for the item.
|
||||
<I>Option</I> may have any of the values accepted by the item creation command.
|
||||
|
||||
</DD></DL>
|
||||
<DL><DT><A NAME="itemconfigure"><I>pathName</I> <B>itemconfigure</B></A>
|
||||
<I>index</I>
|
||||
?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
|
||||
</DT><DD>
|
||||
|
||||
This command is similar to the <B>configure</B> command, except that it applies to the
|
||||
options for an individual item, whereas <B>configure</B> applies to the options for
|
||||
the widget as a whole. <B>Options</B> may have any of the values accepted by the
|
||||
item creation widget command. If options are specified, options are modified as indicated
|
||||
in the command and the command returns an empty string. If no options are specified,
|
||||
returns a list describing the current options for the item.
|
||||
Read-only options are not be modified.
|
||||
|
||||
</DD></DL>
|
||||
<DL><DT><A NAME="setfocus"><I>pathName</I> <B>setfocus</B></A>
|
||||
<I>index</I>
|
||||
</DT><DD>
|
||||
|
||||
Set the focus to the Button given by <I>index</I>.
|
||||
|
||||
</DD></DL>
|
||||
</BODY></HTML>
|
410
R_portable/R/App/R-portable/Tcl/bin64/lib/bwidget-1.9.12/BWman/ComboBox.html
Executable file
@ -0,0 +1,410 @@
|
||||
<HTML>
|
||||
<HEAD><TITLE>ComboBox</TITLE></HEAD>
|
||||
<BODY BGCOLOR=white>
|
||||
<DL><DT><I><A HREF="#descr">NAME</A></I></DT>
|
||||
<DD><B>ComboBox</B>
|
||||
- ComboBox widget
|
||||
</DD></DL>
|
||||
<DL>
|
||||
<DT><I>CREATION</I></DT>
|
||||
<DD><A HREF="#descr"><B>ComboBox</B></A> <I>pathName</I> ?<I>option value...</I>?</DD>
|
||||
</DL>
|
||||
<DL>
|
||||
<DT><I><A HREF="ArrowButton.html">OPTIONS from <B>ArrowButton</B></A></I></DT>
|
||||
<DD><TABLE CELLSPACING=0 CELLPADDING=0 BORDER=0>
|
||||
<TR>
|
||||
<TD> -background or -bg</TD>
|
||||
<TD> -disabledforeground</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> -foreground or -fg</TD>
|
||||
<TD> -state</TD>
|
||||
</TR>
|
||||
</TABLE></DD>
|
||||
</DL>
|
||||
<DL>
|
||||
<DT><I><A HREF="Entry.html">OPTIONS from <B>Entry</B></A></I></DT>
|
||||
<DD><TABLE CELLSPACING=0 CELLPADDING=0 BORDER=0>
|
||||
<TR>
|
||||
<TD> -command</TD>
|
||||
<TD> -disabledforeground</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> -dragenabled</TD>
|
||||
<TD> -dragendcmd</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> -dragevent</TD>
|
||||
<TD> -draginitcmd</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> -dragtype</TD>
|
||||
<TD> -dropcmd</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> -dropenabled</TD>
|
||||
<TD> -dropovercmd</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> -droptypes</TD>
|
||||
<TD> -editable</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> -entrybg (see <B>-background</B>)</TD>
|
||||
<TD> -entryfg (see <B>-foreground</B>)</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> -exportselection</TD>
|
||||
<TD> -font</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> -helptext</TD>
|
||||
<TD> -helptype</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> -helpvar</TD>
|
||||
<TD> -highlightbackground</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> -highlightcolor</TD>
|
||||
<TD> -highlightthickness</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> -insertbackground</TD>
|
||||
<TD> -insertborderwidth</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> -insertofftime</TD>
|
||||
<TD> -insertontime</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> -insertwidth</TD>
|
||||
<TD> -justify</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> -selectbackground</TD>
|
||||
<TD> -selectborderwidth</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> -selectforeground</TD>
|
||||
<TD> -show</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> -state</TD>
|
||||
<TD> -takefocus</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> -text</TD>
|
||||
<TD> -textvariable</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> -width</TD>
|
||||
<TD> -xscrollcommand</TD>
|
||||
</TR>
|
||||
</TABLE></DD>
|
||||
</DL>
|
||||
<DL>
|
||||
<DT><I><A HREF="#wso">WIDGET-SPECIFIC OPTIONS</A></I></DT>
|
||||
<DD><TABLE CELLSPACING=0 CELLSPACING=0 BORDER=0>
|
||||
<TR>
|
||||
<TD> <A HREF="#-autocomplete">-autocomplete</A></TD>
|
||||
<TD> <A HREF="#-autopost">-autopost</A></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> <A HREF="#-bwlistbox">-bwlistbox</A></TD>
|
||||
<TD> <A HREF="#-expand">-expand</A></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> <A HREF="#-height">-height</A></TD>
|
||||
<TD> <A HREF="#-hottrack">-hottrack</A></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> <A HREF="#-images">-images</A></TD>
|
||||
<TD> <A HREF="#-listboxwidth">-listboxwidth</A></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> <A HREF="#-modifycmd">-modifycmd</A></TD>
|
||||
<TD> <A HREF="#-postcommand">-postcommand</A></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> <A HREF="#-values">-values</A></TD>
|
||||
</TR>
|
||||
</TABLE></DD>
|
||||
</DL>
|
||||
<DL>
|
||||
<DT><I><A HREF="#wc">WIDGET COMMAND</A></I></DT>
|
||||
<DD><I>pathName</I> <A HREF="#bind"><B>bind</B></A>
|
||||
?<I>arg...</I>?
|
||||
</DD>
|
||||
<DD><I>pathName</I> <A HREF="#cget"><B>cget</B></A>
|
||||
<I>option</I>
|
||||
</DD>
|
||||
<DD><I>pathName</I> <A HREF="#clearvalue"><B>clearvalue</B></A>
|
||||
</DD>
|
||||
<DD><I>pathName</I> <A HREF="#configure"><B>configure</B></A>
|
||||
?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
|
||||
</DD>
|
||||
<DD><I>pathName</I> <A HREF="#get"><B>get</B></A></DD>
|
||||
<DD><I>pathName</I> <A HREF="#getentry"><B>getentry</B></A></DD>
|
||||
<DD><I>pathName</I> <A HREF="#getlistbox"><B>getlistbox</B></A></DD>
|
||||
<DD><I>pathName</I> <A HREF="#getvalue"><B>getvalue</B></A></DD>
|
||||
<DD><I>pathName</I> <A HREF="#icursor"><B>icursor</B></A>
|
||||
<I>index</I>
|
||||
</DD>
|
||||
<DD><I>pathName</I> <A HREF="#post"><B>post</B></A></DD>
|
||||
<DD><I>pathName</I> <A HREF="#setvalue"><B>setvalue</B></A>
|
||||
<I>index</I>
|
||||
</DD>
|
||||
<DD><I>pathName</I> <A HREF="#unpost"><B>unpost</B></A></DD>
|
||||
</DL>
|
||||
<BR><HR WIDTH="100%"><BR>
|
||||
<B><A NAME="descr"></A>DESCRIPTION</B><BR>
|
||||
<P>
|
||||
|
||||
ComboBox widget enables the user to select a value among a list given by
|
||||
the <B>values</B> option. The list of possible values can be popped by
|
||||
pressing the ArrowButton or by clicking in the entry when <B>editable</B>
|
||||
value of the ComboBox is <B>false</B>.<BR> If <B>editable</B> value of the
|
||||
ComboBox is <B>true</B> and the entry has the focus, the user can press the
|
||||
top and bottom arrow keys to modify its value. If the current value exactly
|
||||
match a value in the list, then the previous (for top arrow key) or then
|
||||
next (for bottom arrow key) value in the list is displayed. If the current
|
||||
value match the beginning of a value in the list, then this value is
|
||||
displayed. If the current value doesnt match anything, then the first
|
||||
value is displayed.
|
||||
|
||||
</P>
|
||||
<BR><HR WIDTH="50%"><BR>
|
||||
<B><A NAME="wso">WIDGET-SPECIFIC OPTIONS</A></B><BR>
|
||||
<DL>
|
||||
<DT><A NAME="-autocomplete"><B>-autocomplete</B></A></DT>
|
||||
<DD>
|
||||
Specifies whether or not the combobox should attempt to auto-complete
|
||||
the value in the entry field as the user types. If true, the combobox
|
||||
will fill in a value that it finds in its value list as the user types
|
||||
into the entry.
|
||||
</DD>
|
||||
</DL>
|
||||
|
||||
<DL>
|
||||
<DT><A NAME="-autopost"><B>-autopost</B></A></DT>
|
||||
<DD>
|
||||
Specifies whether or not the combobox should post the drop down as
|
||||
the user types. If true, the combobox will post and scroll to the
|
||||
entry that most closely matches the user entry.
|
||||
</DD>
|
||||
</DL>
|
||||
|
||||
<DL>
|
||||
<DT><A NAME="-bwlistbox"><B>-bwlistbox</B></A></DT>
|
||||
<DD>
|
||||
Specifies that the combobox should use a BWidget listbox in its drop
|
||||
down instead of the standard Tk option. This option is enabled by
|
||||
default if the <b>-images</b> option is not empty.
|
||||
</DD>
|
||||
</DL>
|
||||
|
||||
<DL><DT><A NAME="-expand"><B>-expand</B></A></DT>
|
||||
<DD>
|
||||
|
||||
Specifies the value expansion behavior for the window. It must be
|
||||
<B>none</B> (default) or <B>tab</B>. If <B>tab</B> is specified, then
|
||||
a Tab binding is added to attempt to expand the current value based on
|
||||
the other values in <B>-values</B>.
|
||||
</DD>
|
||||
</DL>
|
||||
|
||||
<DL><DT><A NAME="-height"><B>-height</B></A></DT>
|
||||
<DD>
|
||||
|
||||
Specifies the desired height for the window, in lines. If zero or less,
|
||||
then the desired height for the window is made just large enough to hold
|
||||
all the elements in the listbox.
|
||||
</DD>
|
||||
|
||||
<DL>
|
||||
<DT><A NAME="-hottrack"><B>-hottrack</B></A></DT>
|
||||
<DD>
|
||||
The selection in the drop down listbox will follow the mouse cursor
|
||||
as it moves.
|
||||
</DD>
|
||||
</DL>
|
||||
|
||||
<DL>
|
||||
<DT><A NAME="-images"><B>-images</B></A></DT>
|
||||
<DD>
|
||||
A list of images that correspond to the <b>-values</b> option. Each
|
||||
image will be drawn next to its value in the drop down. This option
|
||||
enables the <b>-bwlistbox</b> by default as it is needed to display
|
||||
images.
|
||||
</DD>
|
||||
</DL>
|
||||
|
||||
<DL>
|
||||
<DT><A NAME="-listboxwidth"><B>-listboxwidth</B></A></DT>
|
||||
<DD>
|
||||
Specifies the width of the listbox in the drop down. Defaults to the
|
||||
same size as the combobox.
|
||||
</DD>
|
||||
</DL>
|
||||
|
||||
</DL>
|
||||
<DL><DT><A NAME="-modifycmd"><B>-modifycmd</B></A></DT>
|
||||
<DD>
|
||||
|
||||
Specifies a Tcl command called when the user modify the value of the ComboBox by selecting it in the listbox or pressing arrow key.
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="-postcommand"><B>-postcommand</B></A></DT>
|
||||
<DD>
|
||||
|
||||
Specifies a Tcl command called before the listbox of the ComboBox is mapped.
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="-values"><B>-values</B></A></DT>
|
||||
<DD>
|
||||
|
||||
Specifies the values to display in the listbox of the ComboBox.
|
||||
</DD>
|
||||
</DL>
|
||||
<HR WIDTH="50%"><BR>
|
||||
<B><A NAME="wc">WIDGET COMMAND</A></B><BR>
|
||||
<DL><DT><A NAME="bind"><I>pathName</I> <B>bind</B></A>
|
||||
?<I>arg...</I>?
|
||||
</DT><DD>
|
||||
|
||||
Set bindings on the entry widget.
|
||||
|
||||
</DD></DL>
|
||||
<DL><DT><A NAME="cget"><I>pathName</I> <B>cget</B></A>
|
||||
<I>option</I>
|
||||
</DT><DD>
|
||||
|
||||
Returns the current value of the configuration option given by <I>option</I>.
|
||||
<I>Option</I> may have any of the values accepted by the creation command.
|
||||
|
||||
</DD></DL>
|
||||
|
||||
<DL><DT><A NAME="clearvalue"><I>pathName</I> <B>clearvalue</B></A>
|
||||
</DT><DD>
|
||||
|
||||
Clears the current text of the ComboBox.
|
||||
|
||||
</DD></DL>
|
||||
|
||||
<DL><DT><A NAME="configure"><I>pathName</I> <B>configure</B></A>
|
||||
?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
|
||||
</DT><DD>
|
||||
|
||||
Query or modify the configuration options of the widget. If no
|
||||
<I>option</I> is specified, returns a list describing all of the available
|
||||
options for <I>pathName</I>. If <I>option</I> is specified with no
|
||||
<I>value</I>, then the command returns a list describing the one named
|
||||
<I>option</I> (this list will be identical to the corresponding sublist of
|
||||
the value returned if no <I>option</I> is specified). If one or more
|
||||
<I>option-value</I> pairs are specified, then the command modifies the
|
||||
given widget option(s) to have the given value(s); in this case the command
|
||||
returns an empty string. <I>Option</I> may have any of the values accepted
|
||||
by the creation command. Read-only options are not be modified.
|
||||
|
||||
</DD></DL>
|
||||
|
||||
<DL><DT><A NAME="get"><I>pathName</I> <B>get</B></A>
|
||||
</DT><DD>
|
||||
|
||||
Returns the current contents of the entry.
|
||||
|
||||
</DD></DL>
|
||||
|
||||
<DL><DT><A NAME="getentry"><I>pathName</I> <B>getentry</B></A>
|
||||
</DT><DD>
|
||||
|
||||
Returns the path to the contained entry widget.
|
||||
|
||||
</DD></DL>
|
||||
|
||||
<DL><DT><A NAME="getlistbox"><I>pathName</I> <B>getlistbox</B></A>
|
||||
</DT><DD>
|
||||
|
||||
Returns the path to the listbox in the drop down.
|
||||
|
||||
</DD></DL>
|
||||
|
||||
<DL><DT><A NAME="getvalue"><I>pathName</I> <B>getvalue</B></A>
|
||||
</DT><DD>
|
||||
|
||||
Returns the index of the current text of the ComboBox in the list of values,
|
||||
or -1 if it doesn't match any value.
|
||||
|
||||
</DD></DL>
|
||||
|
||||
<DL><DT><A NAME="icursor"><I>pathName</I> <B>icursor</B></A>
|
||||
<I>index</I>
|
||||
</DT><DD>
|
||||
|
||||
Arrange for the insertion cursor to be displayed just before the
|
||||
character given by <i>index</i>. Returns an empty string.
|
||||
|
||||
</DD></DL>
|
||||
|
||||
<DL><DT><A NAME="post"><I>pathName</I> <B>post</B></A>
|
||||
</DT><DD>
|
||||
|
||||
Post the drop down.
|
||||
|
||||
</DD></DL>
|
||||
|
||||
<DL><DT><A NAME="setvalue"><I>pathName</I> <B>setvalue</B></A>
|
||||
<I>index</I>
|
||||
</DT><DD>
|
||||
|
||||
Set the text of the ComboBox to the value indicated by <I>index</I> in the list of values.
|
||||
<I>index</I> may be specified in any of the following forms:
|
||||
<P>
|
||||
<DL COMPACT>
|
||||
<DT>
|
||||
<B>last</B>
|
||||
<DD>
|
||||
Specifies the last element of the list of values.
|
||||
<DT><B>first</B>
|
||||
<DD>
|
||||
Specifies the first element of the list of values.
|
||||
<DT>
|
||||
<B>next</B>
|
||||
<DD>
|
||||
Specifies the element following the current (ie returned by <B>getvalue</B>) in the list
|
||||
of values.
|
||||
<DT><B>previous</B>
|
||||
<DD>
|
||||
Specifies the element preceding the current (ie returned by <B>getvalue</B>) in the list
|
||||
of values.
|
||||
<DT>
|
||||
@<I>number</I>
|
||||
<DD>
|
||||
Specifies the integer index in the list of values.
|
||||
</DL>
|
||||
|
||||
</DD></DL>
|
||||
|
||||
<DL><DT><A NAME="unpost"><I>pathName</I> <B>unpost</B></A>
|
||||
</DT><DD>
|
||||
|
||||
Unpost the drop down.
|
||||
|
||||
</DD></DL>
|
||||
|
||||
<HR><BR><B>BINDINGS</B><BR><BR>
|
||||
|
||||
When Entry of the ComboBox has the input focus, it has the following bindings, in addition
|
||||
to the default Entry bindings:
|
||||
<UL>
|
||||
<LI>Page up set the value of the ComboBox to the first value.
|
||||
<LI>Page down set the value of the ComboBox to the last value.
|
||||
<LI>Arrow up set the value of the ComboBox to the previous value.
|
||||
<LI>Arrow down set the value of the ComboBox to the next value.
|
||||
<LI>If <B>-autopost</B> is enabled, Escape unposts the listbox.
|
||||
</UL>
|
||||
If the listbox is not mapped and ComboBox is not editable or disabled,
|
||||
mouse button 1 on the Entry cause the listbox to popup, as if the user press the ArrowButton.
|
||||
|
||||
</BODY></HTML>
|
328
R_portable/R/App/R-portable/Tcl/bin64/lib/bwidget-1.9.12/BWman/Dialog.html
Executable file
@ -0,0 +1,328 @@
|
||||
<HTML>
|
||||
<HEAD><TITLE>Dialog</TITLE></HEAD>
|
||||
<BODY BGCOLOR=white>
|
||||
<DL><DT><I><A HREF="#descr">NAME</A></I></DT>
|
||||
<DD><B>Dialog</B>
|
||||
- Dialog abstraction with custom buttons
|
||||
</DD></DL>
|
||||
<DL>
|
||||
<DT><I>CREATION</I></DT>
|
||||
<DD><A HREF="#descr"><B>Dialog</B></A> <I>pathName</I> ?<I>option value...</I>?</DD>
|
||||
</DL>
|
||||
<DL>
|
||||
<DT><I><A HREF="ButtonBox.html">OPTIONS from <B>ButtonBox</B></A></I></DT>
|
||||
<DD><TABLE CELLSPACING=0 CELLPADDING=0 BORDER=0>
|
||||
<TR>
|
||||
<TD> -background or -bg</TD>
|
||||
<TD> -homogeneous</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> -padx</TD>
|
||||
<TD> -pady</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> -spacing</TD>
|
||||
</TABLE></DD>
|
||||
</DL>
|
||||
<DL>
|
||||
<DT><I><A HREF="#wso">WIDGET-SPECIFIC OPTIONS</A></I></DT>
|
||||
<DD><TABLE CELLSPACING=0 CELLSPACING=0 BORDER=0>
|
||||
<TR>
|
||||
<TD> <A HREF="#-anchor">-anchor</A></TR>
|
||||
<TD> <A HREF="#-bitmap">-bitmap</A></TR>
|
||||
</TR>
|
||||
<TR>
|
||||
|
||||
<TD> <A HREF="#-cancel">-cancel</A></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> <A HREF="#-default">-default</A></TR>
|
||||
<TD> <A HREF="#-geometry">-geometry</A></TR>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> <A HREF="#-image">-image</A></TR>
|
||||
<TD> <A HREF="#-modal">-modal</A></TR>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> <A HREF="#-parent">-parent</A></TR>
|
||||
<TD> <A HREF="#-place">-place</A></TR>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> <A HREF="#-separator">-separator</A></TR>
|
||||
<TD> <A HREF="#-side">-side</A></TR>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> <A HREF="#-title">-title</A></TR>
|
||||
<TD> <A HREF="#-transient">-transient</A></TR>
|
||||
</TR>
|
||||
</TABLE></DD>
|
||||
</DL>
|
||||
<DL>
|
||||
<DT><I><A HREF="#wc">WIDGET COMMAND</A></I></DT>
|
||||
<DD><I>pathName</I> <A HREF="#add"><B>add</B></A>
|
||||
?<I>arg...</I>?
|
||||
</DD>
|
||||
<DD><I>pathName</I> <A HREF="#cget"><B>cget</B></A>
|
||||
<I>option</I>
|
||||
</DD>
|
||||
<DD><I>pathName</I> <A HREF="#configure"><B>configure</B></A>
|
||||
?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
|
||||
</DD>
|
||||
<DD><I>pathName</I> <A HREF="#draw"><B>draw</B></A>
|
||||
?<I>focus</I>?
|
||||
</DD>
|
||||
<DD><I>pathName</I> <A HREF="#enddialog"><B>enddialog</B></A>
|
||||
<I>result</I>
|
||||
</DD>
|
||||
<DD><I>pathName</I> <A HREF="#getframe"><B>getframe</B></A>
|
||||
</DD>
|
||||
<DD><I>pathName</I> <A HREF="#invoke"><B>invoke</B></A>
|
||||
<I>index</I>
|
||||
</DD>
|
||||
<DD><I>pathName</I> <A HREF="#itemcget"><B>itemcget</B></A>
|
||||
<I>index</I>
|
||||
<I>option</I>
|
||||
</DD>
|
||||
<DD><I>pathName</I> <A HREF="#itemconfigure"><B>itemconfigure</B></A>
|
||||
<I>index</I>
|
||||
?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
|
||||
</DD>
|
||||
<DD><I>pathName</I> <A HREF="#setfocus"><B>setfocus</B></A>
|
||||
<I>index</I>
|
||||
</DD>
|
||||
<DD><I>pathName</I> <A HREF="#withdraw"><B>withdraw</B></A>
|
||||
</DD>
|
||||
</DL>
|
||||
<BR><HR WIDTH="100%"><BR>
|
||||
<B><A NAME="descr"></A>DESCRIPTION</B><BR>
|
||||
<P>
|
||||
|
||||
Dialog widget enables the user to create a dialog box.
|
||||
Some commands take an <I>index</I> as argument indicating on which
|
||||
Button it work. This index is the same specified for equivalent ButtonBox command:
|
||||
<P>
|
||||
<DL COMPACT>
|
||||
<DT>
|
||||
<I>number</I>
|
||||
<DD>
|
||||
Specifies the Button numerically, where 0 corresponds
|
||||
to the first added Button, 1 to the next, and so on.
|
||||
<DT>
|
||||
<B>end</B> or <B>last</B>
|
||||
<DD>
|
||||
Indicates the last item added.
|
||||
<DT><B>default</B>
|
||||
<DD>
|
||||
Indicates the default Button.
|
||||
</DL>
|
||||
|
||||
</P>
|
||||
<BR><HR WIDTH="50%"><BR>
|
||||
<B><A NAME="wso">WIDGET-SPECIFIC OPTIONS</A></B><BR>
|
||||
<DL><DT><A NAME="-anchor"><B>-anchor (read-only)</B></A></DT>
|
||||
<DD>
|
||||
|
||||
Specifies the anchor point of the ButtonBox.
|
||||
Must be one of <B>w</B>, <B>e</B>, <B>n</B>, <B>s</B> or <B>c</B>.
|
||||
If <B>side</B> option is set to <I>top</I> or <I>bottom</I>,
|
||||
<B>anchor</B> values <I>n</I>, <I>s</I> and <I>c</I> have the same effect.
|
||||
If <B>side</B> option is set to <I>left</I> or <I>right</I>,
|
||||
<B>anchor</B> values <I>w</I>, <I>e</I> and <I>c</I> have the same effect.
|
||||
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="-bitmap"><B>-bitmap (read-only)</B></A></DT>
|
||||
<DD>
|
||||
|
||||
Specifies a bitmap to display at the left of the user frame.
|
||||
<B>image</B> option override <B>bitmap</B>.
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="-cancel"><B>-cancel</B></A></DT>
|
||||
<DD>
|
||||
|
||||
Specifies the number of the cancel button of the Dialog. When user presses Esc or the windows close button,
|
||||
this button is invoked.<BR>
|
||||
If set to <B>-1</B>, Esc does not invoke anything.
|
||||
The window close button <I>destroys</I> the dialog in this case and returns <B>-1</B>.
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="-default"><B>-default</B></A></DT>
|
||||
<DD>
|
||||
|
||||
Specifies the number of the default button of the Dialog.
|
||||
When user press Return in the Dialog, this button is invoked.
|
||||
</DD>
|
||||
</DL>
|
||||
</DL>
|
||||
<DL><DT><A NAME="-geometry"><B>-geometry</B></A></DT>
|
||||
<DD>
|
||||
|
||||
Set the <B>geometry</B> used when method <B>draw</B> is called.
|
||||
See <B>wm geometry</B> for a parameter description.
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="-image"><B>-image (read-only)</B></A></DT>
|
||||
<DD>
|
||||
|
||||
Specifies an image to display at the left of the user frame.
|
||||
<B>image</B> option override <B>bitmap</B>.
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="-modal"><B>-modal</B></A></DT>
|
||||
<DD>
|
||||
|
||||
This option must be <B>none</B>, <B>local</B> or <B>global</B>. The value of this option
|
||||
specifies the grab mode of the dialog and how works Dialog::<B>draw</B>.
|
||||
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="-parent"><B>-parent</B></A></DT>
|
||||
<DD>
|
||||
|
||||
Parent of the Dialog. Dialog is placed relative to its parent. If empty, it is
|
||||
placed relative to the root window. Also see <B>place</B> option.
|
||||
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="-place"><B>-place</B></A></DT>
|
||||
<DD>
|
||||
Specifies where to draw the Dialog toplevel relative to the dialog's
|
||||
parent. Must be one of <B>none</B>, <B>center</B>, <B>left</B>, <B>right</B>,
|
||||
<B>above</B>, <B>below</B>. Default value of <B>place</B> is <I>center</I>.
|
||||
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="-separator"><B>-separator (read-only)</B></A></DT>
|
||||
<DD>
|
||||
|
||||
Specifies wether or not to draw a separator between the user frame and the ButtonBox.
|
||||
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="-side"><B>-side (read-only)</B></A></DT>
|
||||
<DD>
|
||||
|
||||
Specifies where to draw the ButtonBox relative to the user frame. Must be one of
|
||||
<B>top</B>, <B>left</B>, <B>bottom</B> or <B>right</B>.
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="-title"><B>-title</B></A></DT>
|
||||
<DD>
|
||||
|
||||
Title of the Dialog toplevel.
|
||||
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="-transient"><B>-transient (read-only)</B></A></DT>
|
||||
<DD>
|
||||
|
||||
Specifies if the Dialog Toplevel should be a transient window or not. Default
|
||||
value of <B>transient</B> is <I>true</I>.
|
||||
|
||||
</DD>
|
||||
</DL>
|
||||
<HR WIDTH="50%"><BR>
|
||||
<B><A NAME="wc">WIDGET COMMAND</A></B><BR>
|
||||
<DL><DT><A NAME="add"><I>pathName</I> <B>add</B></A>
|
||||
?<I>arg...</I>?
|
||||
</DT><DD>
|
||||
|
||||
Add a button to the button box of the dialog box. Default -command option is
|
||||
<I>Dialog::enddialog $path index</I> where <I>index</I> is number of button added.
|
||||
</DD></DL>
|
||||
<DL><DT><A NAME="cget"><I>pathName</I> <B>cget</B></A>
|
||||
<I>option</I>
|
||||
</DT><DD>
|
||||
|
||||
Returns the current value of the configuration option given by <I>option</I>.
|
||||
<I>Option</I> may have any of the values accepted by the creation command.
|
||||
</DD></DL>
|
||||
<DL><DT><A NAME="configure"><I>pathName</I> <B>configure</B></A>
|
||||
?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
|
||||
</DT><DD>
|
||||
|
||||
Query or modify the configuration options of the widget. If no <I>option</I> is specified,
|
||||
returns a list describing all of the available options for <I>pathName</I>.
|
||||
If <I>option</I> is specified with no <I>value</I>, then the command returns a list
|
||||
describing the one named <I>option</I> (this list will be identical to the corresponding
|
||||
sublist of the value returned if no <I>option</I> is specified). If one or
|
||||
more <I>option-value</I> pairs are specified, then the command modifies the given widget
|
||||
option(s) to have the given value(s); in this case the command returns an empty string.
|
||||
<I>Option</I> may have any of the values accepted by the creation command.
|
||||
Read-only options are not be modified.
|
||||
|
||||
</DD></DL>
|
||||
<DL><DT><A NAME="draw"><I>pathName</I> <B>draw</B></A>
|
||||
?<I>focus</I>?
|
||||
</DT><DD>
|
||||
|
||||
This command draw the Dialog, and set grab to it following <B>modal</B> option.
|
||||
If <B>modal</B> option is set to <I>none</I>, the command returns immediatly
|
||||
an empty string. In all other case, the command returns when Dialog::<B>enddialog</B>
|
||||
is called or when Dialog is destroyed.
|
||||
The return value is the result argument of Dialog::<B>enddialog</B> or -1 if it is destroyed.
|
||||
<P>
|
||||
By default, the focus is set to the default button referenced by <B>default</B> option,
|
||||
or to the toplevel of Dialog if no default button has been set.
|
||||
If <I>focus</I> is present, it must be a pathname, or an index to a button.
|
||||
Initial focus is set on this pathname or corresponding button.
|
||||
|
||||
</DD></DL>
|
||||
<DL><DT><A NAME="enddialog"><I>pathName</I> <B>enddialog</B></A>
|
||||
<I>result</I>
|
||||
</DT><DD>
|
||||
|
||||
This command is typically called within a command of a button to make Dialog::<B>draw</B>
|
||||
return.
|
||||
|
||||
</DD></DL>
|
||||
<DL><DT><A NAME="getframe"><I>pathName</I> <B>getframe</B></A>
|
||||
</DT><DD>
|
||||
|
||||
Returns the pathname of the user window.
|
||||
</DD></DL>
|
||||
<DL><DT><A NAME="invoke"><I>pathName</I> <B>invoke</B></A>
|
||||
<I>index</I>
|
||||
</DT><DD>
|
||||
|
||||
Invoke the Button given by <I>index</I>.
|
||||
|
||||
</DD></DL>
|
||||
<DL><DT><A NAME="itemcget"><I>pathName</I> <B>itemcget</B></A>
|
||||
<I>index</I>
|
||||
<I>option</I>
|
||||
</DT><DD>
|
||||
|
||||
Returns the current value of a configuration option for the item.
|
||||
<I>Option</I> may have any of the values accepted by the item creation command.
|
||||
|
||||
</DD></DL>
|
||||
<DL><DT><A NAME="itemconfigure"><I>pathName</I> <B>itemconfigure</B></A>
|
||||
<I>index</I>
|
||||
?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
|
||||
</DT><DD>
|
||||
|
||||
This command is similar to the <B>configure</B> command, except that it applies to the
|
||||
options for an individual item, whereas <B>configure</B> applies to the options for
|
||||
the widget as a whole. <B>Options</B> may have any of the values accepted by the
|
||||
item creation widget command. If options are specified, options are modified as indicated
|
||||
in the command and the command returns an empty string. If no options are specified,
|
||||
returns a list describing the current options for the item.
|
||||
Read-only options are not be modified.
|
||||
|
||||
</DD></DL>
|
||||
<DL><DT><A NAME="setfocus"><I>pathName</I> <B>setfocus</B></A>
|
||||
<I>index</I>
|
||||
</DT><DD>
|
||||
|
||||
Set the focus to the Button given by <I>index</I>.
|
||||
|
||||
</DD></DL>
|
||||
<DL><DT><A NAME="withdraw"><I>pathName</I> <B>withdraw</B></A>
|
||||
</DT><DD>
|
||||
|
||||
Call this command to hide the dialog box.
|
||||
|
||||
</DD></DL>
|
||||
</BODY></HTML>
|
141
R_portable/R/App/R-portable/Tcl/bin64/lib/bwidget-1.9.12/BWman/DragSite.html
Executable file
@ -0,0 +1,141 @@
|
||||
<HTML>
|
||||
<HEAD><TITLE>DragSite</TITLE></HEAD>
|
||||
<BODY BGCOLOR=white>
|
||||
<DL><DT><I><A HREF="#descr">NAME</A></I></DT>
|
||||
<DD><B>DragSite</B>
|
||||
- Commands set for Drag facilities
|
||||
</DD></DL>
|
||||
<DL>
|
||||
<DT><I><A HREF="#wc">COMMAND</A></I></DT>
|
||||
<DD>DragSite::<A HREF="#include"><B>include</B></A>
|
||||
<I>class</I>
|
||||
<I>type</I>
|
||||
<I>event</I>
|
||||
</DD>
|
||||
<DD>DragSite::<A HREF="#register"><B>register</B></A>
|
||||
<I>path</I>
|
||||
?<I>option value...</I>?
|
||||
</DD>
|
||||
<DD>DragSite::<A HREF="#setdrag"><B>setdrag</B></A>
|
||||
<I>path</I>
|
||||
<I>subpath</I>
|
||||
<I>initcmd</I>
|
||||
<I>endcmd</I>
|
||||
?<I>force</I>?
|
||||
</DD>
|
||||
</DL>
|
||||
<BR><HR WIDTH="100%"><BR>
|
||||
<B><A NAME="descr"></A>DESCRIPTION</B><BR>
|
||||
<P>
|
||||
|
||||
Commands of this namespace enable user to define a BWidget or a Tk widget as a drag site.
|
||||
|
||||
|
||||
|
||||
</P>
|
||||
<HR WIDTH="50%"><BR>
|
||||
<B><A NAME="wc">COMMAND</A></B><BR>
|
||||
<DL><DT><A NAME="include">DragSite::<B>include</B></A>
|
||||
<I>class</I>
|
||||
<I>type</I>
|
||||
<I>event</I>
|
||||
</DT><DD>
|
||||
|
||||
This command provides a simple way to include options relatives to a drag site into
|
||||
BWidget resources definition.
|
||||
It includes the options needed for <B>register</B>: <I>-dragevent</I>, initialized to
|
||||
<I>event</I>, <I>-draginitcmd</I> and <I>-dragendcmd</I>, initialized to empty string,
|
||||
and two new options:
|
||||
<TABLE BORDER=0 CELLSPACING=1>
|
||||
<TR><TD><I>-dragenabled</I><TD>Specifies wether or not drag is active (initialized to 0)
|
||||
<TR><TD><I>-dragtype</I><TD>Default or alternate dragged data type (initialized to <I>type</I>)
|
||||
</TABLE>
|
||||
|
||||
</DD></DL>
|
||||
<DL><DT><A NAME="register">DragSite::<B>register</B></A>
|
||||
<I>path</I>
|
||||
?<I>option value...</I>?
|
||||
</DT><DD>
|
||||
|
||||
This command is used to declare <I>path</I> as a drag site. Options are:
|
||||
|
||||
<P>
|
||||
<DL><DT><A NAME="DragSite-dragendcmd"><B>-dragendcmd</B></A></DT>
|
||||
<DD>
|
||||
|
||||
Command called when drag terminates (ie when user release drag icon).
|
||||
This command is called with the following arguments:
|
||||
<UL>
|
||||
<LI>the pathname of the drag source (the widget itself),
|
||||
<LI>the pathname of the drop target,
|
||||
<LI>the operation,
|
||||
<LI>the type of the dragged data,
|
||||
<LI>the dragged data,
|
||||
<LI>result of the drop (result of the call to <B>-dropcmd</B> of the target),
|
||||
</UL>
|
||||
If the drop does not occurs, the target and the operation are empty string and the result
|
||||
is 0.
|
||||
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="DragSite-dragevent"><B>-dragevent</B></A></DT>
|
||||
<DD>
|
||||
|
||||
Specifies the number of the mouse button associated to the drag.
|
||||
Must be <B>1</B>, <B>2</B> or <B>3</B>.
|
||||
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="DragSite-draginitcmd"><B>-draginitcmd</B></A></DT>
|
||||
<DD>
|
||||
|
||||
Command called when drag initiates. When the event of option <B>dragevent</B> occurs on
|
||||
<I>path</I>, this command is called with the following arguments:
|
||||
<UL>
|
||||
<LI>pathname of the drag source (<I>path</I>),
|
||||
<LI>root x-coordinate of pointer,
|
||||
<LI>root y-coordinate of pointer,
|
||||
<LI>a toplevel created to represent dragged data. When returning, if it
|
||||
has no children, a bitmap is automatically displayed.
|
||||
</UL>
|
||||
If the command returns an empty string, then the drag will be
|
||||
suppressed. Otherwise the command must return a list containing three
|
||||
elements:
|
||||
<UL>
|
||||
<LI>the type of the data,
|
||||
<LI>the list of acceptable basic operations (<B>copy</B>, <B>move</B> and <B>link</B>)
|
||||
<LI>and the data.
|
||||
</UL>
|
||||
Note that even if <B>copy</B> does not appear in the list of basic
|
||||
operation, it is considered as an acceptable operation, since
|
||||
<B>copy</B> semantic does not modify the drag source.
|
||||
|
||||
</DD>
|
||||
</DL>
|
||||
</DD></DL>
|
||||
<DL><DT><A NAME="setdrag">DragSite::<B>setdrag</B></A>
|
||||
<I>path</I>
|
||||
<I>subpath</I>
|
||||
<I>initcmd</I>
|
||||
<I>endcmd</I>
|
||||
?<I>force</I>?
|
||||
</DT><DD>
|
||||
|
||||
This command provides a simple way to call <B>register</B> during a BWidget creation or
|
||||
configuration.
|
||||
<UL>
|
||||
<LI><I>path</I> is the pathname of the BWidget,
|
||||
<LI><I>subpath</I> is the pathname of the tk widget where drag event occurs,
|
||||
<LI><I>initcmd</I> BWidget command for <I>drag-init</I> event,
|
||||
<LI><I>endcmd</I> BWidget command for <I>drag-end</I> event,
|
||||
<LI><I>force</I> specifies wether or not to call <B>register</B> whenever no option value has
|
||||
changed (0 by default - for BWidget configuration, use 1 for BWidget creation).
|
||||
</UL>
|
||||
<B>setdrag</B> verifies the modification flag of options <B>dragenabled</B> and
|
||||
<B>dragevent</B> and calls <B>register</B> if needed according to the options values and
|
||||
<I>initcmd</I> and <I>endcmd</I> arguments. <B>draginitcmd</B> and <B>dragendcmd</B> are not
|
||||
taken from options of widget because they are considered as user command, called by
|
||||
BWidget implementation of <I>drag-init</I> and <I>drag-end</I> events.
|
||||
|
||||
</DD></DL>
|
||||
</BODY></HTML>
|
266
R_portable/R/App/R-portable/Tcl/bin64/lib/bwidget-1.9.12/BWman/DropSite.html
Executable file
@ -0,0 +1,266 @@
|
||||
<HTML>
|
||||
<HEAD><TITLE>DropSite</TITLE></HEAD>
|
||||
<BODY BGCOLOR=white>
|
||||
<DL><DT><I><A HREF="#descr">NAME</A></I></DT>
|
||||
<DD><B>DropSite</B>
|
||||
- Commands set for Drop facilities
|
||||
</DD></DL>
|
||||
<DL>
|
||||
<DT><I><A HREF="#wc">COMMAND</A></I></DT>
|
||||
<DD>DropSite::<A HREF="#include"><B>include</B></A>
|
||||
<I>class</I>
|
||||
<I>types</I>
|
||||
</DD>
|
||||
<DD>DropSite::<A HREF="#register"><B>register</B></A>
|
||||
<I>path</I>
|
||||
?<I>option value...</I>?
|
||||
</DD>
|
||||
<DD>DropSite::<A HREF="#setcursor"><B>setcursor</B></A>
|
||||
<I>cursor</I>
|
||||
</DD>
|
||||
<DD>DropSite::<A HREF="#setdrop"><B>setdrop</B></A>
|
||||
<I>path</I>
|
||||
<I>subpath</I>
|
||||
<I>dropover</I>
|
||||
<I>drop</I>
|
||||
?<I>force</I>?
|
||||
</DD>
|
||||
<DD>DropSite::<A HREF="#setoperation"><B>setoperation</B></A>
|
||||
<I>op</I>
|
||||
</DD>
|
||||
</DL>
|
||||
<BR><HR WIDTH="100%"><BR>
|
||||
<B><A NAME="descr"></A>DESCRIPTION</B><BR>
|
||||
<P>
|
||||
|
||||
Commands of this namespace enable user to define a BWidget or a Tk widget as a drop site.
|
||||
A drop site is composed of the type of object that can be dropped and associated operation,
|
||||
a command called when drop occurs, and a command when an object is dragged over the widget.
|
||||
A drop site must have at least one type of acceptable object and a drop command.
|
||||
|
||||
</P>
|
||||
<HR WIDTH="50%"><BR>
|
||||
<B><A NAME="wc">COMMAND</A></B><BR>
|
||||
<DL><DT><A NAME="include">DropSite::<B>include</B></A>
|
||||
<I>class</I>
|
||||
<I>types</I>
|
||||
</DT><DD>
|
||||
|
||||
This command provides a simple way to include options relatives to a drop site into
|
||||
BWidget resources definition.
|
||||
It includes the options needed for <B>register</B>, <I>-dropovercmd</I> and <I>-dropcmd</I>,
|
||||
initialized to empty string, and <I>-droptypes</I>, initialized to <I>types</I>,
|
||||
and one new option:
|
||||
<TABLE BORDER=0 CELLSPACING=1>
|
||||
<TR><TD><I>-dropenabled</I><TD>Specifies wether or not drop is active (initialized to 0)
|
||||
</TABLE>
|
||||
|
||||
</DD></DL>
|
||||
<DL><DT><A NAME="register">DropSite::<B>register</B></A>
|
||||
<I>path</I>
|
||||
?<I>option value...</I>?
|
||||
</DT><DD>
|
||||
|
||||
This command is used to declare <I>path</I> as a drop site. Options are:
|
||||
|
||||
<P>
|
||||
<DL><DT><A NAME="DropSite-dropcmd"><B>-dropcmd</B></A></DT>
|
||||
<DD>
|
||||
|
||||
This command is called when user release the drag icon over a valid
|
||||
drop target widget. Arguments passed to the command are:
|
||||
|
||||
<UL>
|
||||
<LI>pathname of the drop target (the widget itself),
|
||||
<LI>pathname of the drag source,
|
||||
<LI>root x-coordinate of the pointer,
|
||||
<LI>root y-coordinate of the pointer,
|
||||
<LI>operation,
|
||||
<LI>type of the dragged data,
|
||||
<LI>dragged data.
|
||||
</UL>
|
||||
|
||||
Its return values is passed as a result to the <B>-dragendcmd</B>
|
||||
command of the drag source widget.
|
||||
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="DropSite-dropovercmd"><B>-dropovercmd</B></A></DT>
|
||||
<DD>
|
||||
|
||||
This command can be used to provide a dynamic drag while <I>drag-over</I> events.
|
||||
While a drag occurs, events <Enter>, <Motion> and <Leave> are catched.
|
||||
Arguments passed to the command are:
|
||||
<UL>
|
||||
<LI>pathname of the drop target (the widget itself),
|
||||
<LI>pathname of the drag source,
|
||||
<LI>event over the drop target: <I>enter</I>, <I>motion</I> or <I>leave</I>,
|
||||
<LI>root x-coordinate of the pointer,
|
||||
<LI>root y-coordinate of the pointer,
|
||||
<LI>operation,
|
||||
<LI>type of the dragged data,
|
||||
<LI>dragged data.
|
||||
</UL>
|
||||
Command must the new status of the drag:
|
||||
<UL>
|
||||
<LI>0 if widget refuse this drag. Command will not be recalled on motion/leave event.
|
||||
<LI>1 if widget accept this drag. Command will not be recalled on motion/leave event.
|
||||
<LI>2 if widget refuse this drag. Command will be recalled on each motion event to reevaluate.
|
||||
<LI>3 if widget accept this drag. Command will be recalled on each motion event to reevaluate.
|
||||
|
||||
</UL>
|
||||
Here is a list of events and associated actions on a DropSite widget. This example
|
||||
assumes that dragged data type is valid for the drop target.
|
||||
<B>status</B> is the status of the drag on a DropSite. Its value is:
|
||||
<BR><BR>
|
||||
|
||||
<TABLE BORDER CELLSPACING=1 CELLPADDING=4>
|
||||
<TR>
|
||||
<TD WIDTH="18%" VALIGN="TOP" ALIGN="CENTER">Event</TD>
|
||||
<TD WIDTH="10%" VALIGN="TOP" ALIGN="CENTER">Old status</TD>
|
||||
<TD WIDTH="48%" VALIGN="TOP" ALIGN="CENTER">Action</TD>
|
||||
<TD WIDTH="24%" VALIGN="TOP" ALIGN="CENTER">New status</TD>
|
||||
</TR>
|
||||
<TR><TD WIDTH="18%" VALIGN="TOP" ROWSPAN=2>
|
||||
<FONT SIZE=2><Enter></FONT></TD>
|
||||
<TD WIDTH="10%" VALIGN="TOP" ROWSPAN=2>
|
||||
<FONT SIZE=2>-</FONT></TD>
|
||||
<TD WIDTH="48%" VALIGN="TOP">
|
||||
<FONT SIZE=2>if DropSite has <B>dropovercmd</B>, call it with <I>enter</I></FONT></TD>
|
||||
<TD WIDTH="24%" VALIGN="TOP">
|
||||
<FONT SIZE=2>result of <B>dropovercmd</B></FONT></TD>
|
||||
</TR>
|
||||
<TR><TD WIDTH="48%" VALIGN="TOP">
|
||||
<FONT SIZE=2>else</FONT></TD>
|
||||
<TD WIDTH="24%" VALIGN="TOP">
|
||||
<FONT SIZE=2>1</FONT></TD>
|
||||
</TR>
|
||||
<TR><TD WIDTH="18%" VALIGN="TOP" ROWSPAN=2>
|
||||
<FONT SIZE=2><Motion></FONT></TD>
|
||||
<TD WIDTH="10%" VALIGN="TOP">
|
||||
<FONT SIZE=2>0 or 1</FONT></TD>
|
||||
<TD WIDTH="48%" VALIGN="TOP"> </TD>
|
||||
<TD WIDTH="24%" VALIGN="TOP">
|
||||
<FONT SIZE=2>unchanged</FONT></TD>
|
||||
</TR>
|
||||
<TR><TD WIDTH="10%" VALIGN="TOP">
|
||||
<FONT SIZE=2>2 or 3</FONT></TD>
|
||||
<TD WIDTH="48%" VALIGN="TOP">
|
||||
<FONT SIZE=2>call <B>dropovercmd</B> with <I>motion</I></FONT></TD>
|
||||
<TD WIDTH="24%" VALIGN="TOP">
|
||||
<FONT SIZE=2>result of <B>dropovercmd</B></FONT></TD>
|
||||
</TR>
|
||||
<TR><TD WIDTH="18%" VALIGN="TOP" ROWSPAN=2>
|
||||
<FONT SIZE=2><Leave></FONT> </TD>
|
||||
<TD WIDTH="10%" VALIGN="TOP">
|
||||
<FONT SIZE=2>0 or 1</FONT></TD>
|
||||
<TD WIDTH="48%" VALIGN="TOP"> </TD>
|
||||
<TD WIDTH="24%" VALIGN="TOP">
|
||||
<FONT SIZE=2>-</FONT></TD>
|
||||
</TR>
|
||||
<TR><TD WIDTH="10%" VALIGN="TOP">
|
||||
<FONT SIZE=2>2 or 3</FONT></TD>
|
||||
<TD WIDTH="48%" VALIGN="TOP">
|
||||
<FONT SIZE=2>call <B>dropovercmd</B> with <I>leave</I></FONT></TD>
|
||||
<TD WIDTH="24%" VALIGN="TOP">
|
||||
<FONT SIZE=2>-</FONT></TD>
|
||||
</TR>
|
||||
<TR><TD WIDTH="18%" VALIGN="TOP" ROWSPAN=4>
|
||||
<FONT SIZE=2><Drop></FONT></TD>
|
||||
<TD WIDTH="10%" VALIGN="TOP">
|
||||
<FONT SIZE=2>0</FONT></TD>
|
||||
<TD WIDTH="48%" VALIGN="TOP">
|
||||
<FONT SIZE=2>call <B>dragendcmd</B> of drag source</FONT></TD>
|
||||
<TD WIDTH="24%" VALIGN="TOP" ROWSPAN=4>
|
||||
<FONT SIZE=2>-</FONT></TD>
|
||||
</TR>
|
||||
<TR><TD WIDTH="10%" VALIGN="TOP">
|
||||
<FONT SIZE=2>1</FONT></TD>
|
||||
<TD WIDTH="48%" VALIGN="TOP">
|
||||
<FONT SIZE=2>call <B>dropcmd</B> and call <B>dragendcmd</B> of drag source</FONT></TD>
|
||||
</TR>
|
||||
<TR><TD WIDTH="10%" VALIGN="TOP">
|
||||
<FONT SIZE=2>2</FONT></TD>
|
||||
<TD WIDTH="48%" VALIGN="TOP">
|
||||
<FONT SIZE=2>call <B>dropovercmd</B> with <I>leave</I> and call <B>dragendcmd</B> of drag source</FONT></TD>
|
||||
</TR>
|
||||
<TR><TD WIDTH="10%" VALIGN="TOP">
|
||||
<FONT SIZE=2>3</FONT></TD>
|
||||
<TD WIDTH="48%" VALIGN="TOP">
|
||||
<FONT SIZE=2>call <B>dropcmd</B> and call <B>dragendcmd</B> of drag source</FONT></TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
<BR>
|
||||
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="DropSite-droptypes"><B>-droptypes</B></A></DT>
|
||||
<DD>
|
||||
|
||||
Specifies a list {<I>type</I> <I>oplist</I> ?<I>type</I> <I>oplist</I>? ...} of acceptable
|
||||
types and associated operations for the drop target.
|
||||
For each type, <I>oplist</I> is a list
|
||||
{<I>descops</I> <I>mod</I> ?<I>descops</I> <I>mod</I>? ...} describing operations and
|
||||
modifier keys for these operations.
|
||||
<I>descops</I> describe an operation. It can be a predefined operations (<B>copy</B>,
|
||||
<B>move</B> or <B>link</B>) or a new user defined operation, of the form {<I>subop</I>
|
||||
<B>baseop</B> ?<I>bitmap</I>?}.
|
||||
<I>subop</I> is the name given to the sub operation, <I>baseop</I> is the name of the
|
||||
base operation (<B>copy</B>, <B>move</B> or <B>link</B>) and <I>bitmap</I> is a bitmap
|
||||
to display for the operation.
|
||||
<BR>If <I>bitmap</I> is empty, the default bitmap of the base operation is used for the
|
||||
sub operation.
|
||||
<BR><I>subop</I> can be a base operation, in order to change the bitmap of a base operation.
|
||||
In this case, <I>baseop</I> must be empty or equal to <I>subop</I>.
|
||||
<BR><I>mod</I> is the modifer key for the operation. It can be:
|
||||
<UL>
|
||||
<LI><B>none</B> to specify that no modifier key is pressed. This modifier can only be used
|
||||
with a sub operation named <B>default</B> (and vice versa), which has the behaviour of not
|
||||
display any bitmap operation. For all type, if the modifier <B>none</B> is not given, it is
|
||||
automatically associated to the <B>default</B> sub operation of a <B>copy</B> base operation.
|
||||
<LI><B>program</B> to specifies a sub operation accessible only by <B>DropSite::setoperation</B>.
|
||||
<LI>A list combining <B>shift</B>, <B>control</B> and <B>alt</B>, which means their
|
||||
corresponding key.
|
||||
</UL>
|
||||
|
||||
</DD>
|
||||
</DL>
|
||||
</DD></DL>
|
||||
<DL><DT><A NAME="setcursor">DropSite::<B>setcursor</B></A>
|
||||
<I>cursor</I>
|
||||
</DT><DD>
|
||||
|
||||
This command can be used within the script <B>dragovercmd</B>. It is usefull to provide
|
||||
visual effect about the state of the drag.
|
||||
</DD></DL>
|
||||
<DL><DT><A NAME="setdrop">DropSite::<B>setdrop</B></A>
|
||||
<I>path</I>
|
||||
<I>subpath</I>
|
||||
<I>dropover</I>
|
||||
<I>drop</I>
|
||||
?<I>force</I>?
|
||||
</DT><DD>
|
||||
|
||||
This command provides a simple way to call <B>register</B> during a BWidget creation or
|
||||
configuration.
|
||||
<UL>
|
||||
<LI><I>path</I> is the pathname of the BWidget,
|
||||
<LI><I>subpath</I> is the pathname of the tk widget where drag event occurs,
|
||||
<LI><I>dropover</I> is a command for <I>drag-over</I> event,
|
||||
<LI><I>drop</I> is a command for <I>drop</I> event,
|
||||
<LI><I>force</I> specifies wether or not to call <B>register</B> whenever no option value
|
||||
has changed (0 by default - for BWidget configuration, use 1 for BWidget creation).
|
||||
</UL>
|
||||
<B>setdrop</B> verifies the modification flag of options <B>dropenabled</B> and
|
||||
<B>droptypes</B> and calls <B>register</B> if needed according to the options values and
|
||||
<I>dropover</I> and <I>drop</I> arguments. <B>dropovercmd</B> and <B>dropcmd</B> are not
|
||||
taken from options of widget because they are considered as user command, called by
|
||||
BWidget implementation of <I>drag-over</I> and <I>drop</I> events.
|
||||
|
||||
</DD></DL>
|
||||
<DL><DT><A NAME="setoperation">DropSite::<B>setoperation</B></A>
|
||||
<I>op</I>
|
||||
</DT><DD>
|
||||
Description text
|
||||
</DD></DL>
|
||||
</BODY></HTML>
|
251
R_portable/R/App/R-portable/Tcl/bin64/lib/bwidget-1.9.12/BWman/DynamicHelp.html
Executable file
@ -0,0 +1,251 @@
|
||||
<HTML>
|
||||
<HEAD><TITLE>DynamicHelp</TITLE></HEAD>
|
||||
<BODY BGCOLOR=white>
|
||||
<DL><DT><I><A HREF="#descr">NAME</A></I></DT>
|
||||
<DD><B>DynamicHelp</B>
|
||||
- Provide help to Tk widget or BWidget
|
||||
</DD></DL>
|
||||
<DL>
|
||||
<DT><I><A HREF="#wc">COMMAND</A></I></DT>
|
||||
<DD>DynamicHelp::<A HREF="#add"><B>add</B></A>
|
||||
<i>widget</i> ?<I>option value ...</I>?
|
||||
</DD>
|
||||
<DD>DynamicHelp::<A HREF="#configure"><B>configure</B></A>
|
||||
?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
|
||||
</DD>
|
||||
<DD>DynamicHelp::<A HREF="#delete"><B>delete</B></A>
|
||||
<i>widget</i>
|
||||
</DD>
|
||||
<DD>DynamicHelp::<A HREF="#include"><B>include</B></A>
|
||||
<I>class</I>
|
||||
<I>type</I>
|
||||
</DD>
|
||||
<DD>DynamicHelp::<A HREF="#register"><B>register</B></A>
|
||||
<I>path</I>
|
||||
<I>type</I>
|
||||
?<I>arg...</I>?
|
||||
</DD>
|
||||
<DD>DynamicHelp::<A HREF="#sethelp"><B>sethelp</B></A>
|
||||
<I>path</I>
|
||||
<I>subpath</I>
|
||||
?<I>force</I>?
|
||||
</DD>
|
||||
</DL>
|
||||
<BR><HR WIDTH="100%"><BR>
|
||||
<B><A NAME="descr"></A>DESCRIPTION</B><BR>
|
||||
<P>
|
||||
Description text
|
||||
</P>
|
||||
<HR WIDTH="50%"><BR>
|
||||
<B><A NAME="wc">COMMAND</A></B><BR>
|
||||
|
||||
<DL><DT><A NAME="add">DynamicHelp::<B>add</B></A>
|
||||
?<I>option value ...</I>?
|
||||
</DT><DD>
|
||||
<p>
|
||||
This command adds dynamic help to the given <i>widget</i>.
|
||||
</p>
|
||||
<DL><DT><A NAME="add-command"><B>-command</B></A></DT>
|
||||
<DD>
|
||||
If specified, refers to a command to execute to get the help
|
||||
text to display. The command must return a string to display.
|
||||
If the command returns an empty string, no help is displayed.
|
||||
</DD>
|
||||
</DL>
|
||||
|
||||
<DL><DT><A NAME="add-index"><B>-index</B></A></DT>
|
||||
<DD>
|
||||
If specified, refers to a menu index to bind the help to instead of
|
||||
a widget. If <b>-type</b> is not menu, this option is ignored.
|
||||
</DD>
|
||||
</DL>
|
||||
|
||||
<DL><DT><A NAME="add-item"><B>-item</B></A></DT>
|
||||
<DD>
|
||||
If specified, refers to an item or tag on a canvas widget or to a tag
|
||||
in a text widget to bind the help to instead of to a widget.
|
||||
</DD>
|
||||
</DL>
|
||||
|
||||
<DL><DT><A NAME="add-type"><B>-type</B></A></DT>
|
||||
<DD>
|
||||
Specifies the type of help. Can be:
|
||||
<b>balloon</b>, <b>variable</b> or <b>menu</b>.
|
||||
Default is <b>balloon</b>.
|
||||
</DD>
|
||||
</DL>
|
||||
|
||||
<DL><DT><A NAME="add-text"><B>-text</B></A></DT>
|
||||
<DD>
|
||||
The text to be displayed as help.
|
||||
</DD>
|
||||
</DL>
|
||||
|
||||
<DL><DT><A NAME="add-variable"><B>-variable</B></A></DT>
|
||||
<DD>
|
||||
Specifies a variable name to which the help string will be
|
||||
written. Some other widget (e.g., a status bar) is
|
||||
responsible for displaying this variable.
|
||||
</DD>
|
||||
</DL>
|
||||
|
||||
<p>
|
||||
Creating dynamic help for a menu is a two-step process. The menu
|
||||
itself must first be added and then each menu entry must be added
|
||||
separately. Here is a brief example.
|
||||
</p>
|
||||
|
||||
<TABLE BORDER=2 CELLSPACING=2 WIDTH="80%">
|
||||
<TR><TD><PRE>
|
||||
<FONT COLOR=red><I># create menu</I></FONT>
|
||||
menu .m -type menubar
|
||||
<FONT COLOR=red><I># associate menubar to toplevel BEFORE DynamicHelp::register</I></FONT>
|
||||
<FONT COLOR=red><I># to make it works with menu clone name</I></FONT>
|
||||
. configure -menu .m
|
||||
.m add cascade -label "File" -menu .m.file
|
||||
menu .m.file
|
||||
.m.file add command -label "Open..."
|
||||
.m.file add command -label "Quit"
|
||||
<FONT COLOR=red><I># create label for help, using variable varinfo</I></FONT>
|
||||
label .l -textvariable varinfo
|
||||
<FONT COLOR=red><I># associate all entries of menu .m.file to variable varinfo</I></FONT>
|
||||
DynamicHelp::add .m.file -type menu -variable varinfo
|
||||
<FONT COLOR=red><I># then declare entries of .m.file</I></FONT>
|
||||
DynamicHelp::add .m.file -type menu -index 0 -text "Detach menu"
|
||||
DynamicHelp::add .m.file -type menu -index 1 -text "Open a file"
|
||||
DynamicHelp::add .m.file -type menu -index 2 -text "Exit demo"
|
||||
</PRE></TD></TR></TABLE></CENTER>
|
||||
|
||||
</DL>
|
||||
|
||||
<DL><DT><A NAME="configure">DynamicHelp::<B>configure</B></A>
|
||||
?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
|
||||
</DT><DD>
|
||||
This command configure the ballon help.
|
||||
<P>
|
||||
<DL><DT><A NAME="DynamicHelp-borderwidth"><B>-borderwidth</B></A></DT>
|
||||
<DD>
|
||||
Width of the black border around the balloon.
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="DynamicHelp-delay"><B>-delay</B></A></DT>
|
||||
<DD>
|
||||
Define the delay in millisecond of mouse inactivity before displaying
|
||||
the balloon.
|
||||
</DD>
|
||||
</DL>
|
||||
<dl>
|
||||
<dt><a name="DynamicHelp-state"><b>-state</b></a></dt>
|
||||
<dd>
|
||||
Specifies one of two states for help balloons: <b>normal</b> and
|
||||
<b>disabled</b>.
|
||||
</dd>
|
||||
<dd>
|
||||
If <b>state</b> is <b>disabled</b>, help balloons will not be displayed
|
||||
for any registered widget.
|
||||
</dd>
|
||||
</dl>
|
||||
<DL><DT><A NAME="DynamicHelp-topbackground"><B>-topbackground</B></A></DT>
|
||||
<DD>
|
||||
The background color of the toplevel window created for a balloon.
|
||||
</DD>
|
||||
</DL>
|
||||
<BR>Other standard options are:
|
||||
<DD><TABLE CELLSPACING=0 CELLSPACING=0 BORDER=0>
|
||||
<TR>
|
||||
<TD> <A HREF="options.htm#M-background">-background or -bg</A></TD>
|
||||
<TD> <A HREF="options.htm#M-font">-font</A></TR>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> <A HREF="options.htm#M-foreground">-foreground or -fg</A></TD>
|
||||
<TD> <A HREF="options.htm#M-justify">-justify</A></TR>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> <A HREF="options.htm#M-padx">-padx</A></TD>
|
||||
<TD> <A HREF="options.htm#M-pady">-pady</A></TR>
|
||||
</TR>
|
||||
</TABLE></DD>
|
||||
</DD></DL>
|
||||
|
||||
<DL><DT><A NAME="delete">DynamicHelp::<B>delete</B></A>
|
||||
<I>widget</I>
|
||||
</DT><DD>
|
||||
Delete all dynamic help for the given <i>widget</i>.
|
||||
</DD></DL>
|
||||
|
||||
<DL><DT><A NAME="include">DynamicHelp::<B>include</B></A>
|
||||
<I>class</I>
|
||||
<I>type</I>
|
||||
</DT><DD>
|
||||
Description text
|
||||
</DD></DL>
|
||||
<DL><DT><A NAME="register">DynamicHelp::<B>register</B></A>
|
||||
<I>path</I>
|
||||
<I>type</I>
|
||||
?<I>arg...</I>?
|
||||
</DT><DD>
|
||||
<p>
|
||||
<b>Its use is deprecated. Use <i>DynamicHelp::add</i> instead.</b>
|
||||
</p>
|
||||
|
||||
Register a help text to the widget <I>path</I>.
|
||||
<I>type</I> determines the type of the help or the type of the widget.
|
||||
Depending on <I>type</I>, other options must be provided.
|
||||
<BR>
|
||||
<TABLE CELLSPACING=5 CELLPADDING=0 BORDER=0>
|
||||
<TR><TD><B> type </B></TD><TD><B> options </B></TD></TR>
|
||||
<TR><TD><B><I> balloon </I></B></TD><TD><I> ?tagOrItem? text </I></TD></TR>
|
||||
<TR><TD><B><I> variable </I></B></TD><TD><I> ?tagOrItem? varName text </I></TD></TR>
|
||||
<TR><TD><B><I> menu </I></B></TD><TD><I> varName </I></TD></TR>
|
||||
<TR><TD><B><I> menuentry </I></B></TD><TD><I> index text </I></TD></TR>
|
||||
</TABLE>
|
||||
<BR>If one of the option is missing or is empty, help is removed for this widget.
|
||||
<p>
|
||||
|
||||
If <i>tagOrItem</i> is specified, then <i>path</i> is a canvas or a text. In
|
||||
case of a canvas, <i>tagOrItem</i> is the name of a tag or item on the canvas
|
||||
to which the help will be bound. In case of a text, <i>tagOrItem</i> is the
|
||||
name of a tag on the text to which the help will be bound.
|
||||
|
||||
</p>
|
||||
For type other than <I>balloon</I>, <I>varName</I> is typically a variable
|
||||
linked to a label.
|
||||
<BR>For menu, balloon type help is not available. To declare a help for menu,
|
||||
you first declare the menu, and then entries of this menu.
|
||||
<BR>For example:
|
||||
<BR><BR>
|
||||
<CENTER>
|
||||
<TABLE BORDER=2 CELLSPACING=2 WIDTH="80%">
|
||||
<TR><TD><PRE>
|
||||
<FONT COLOR=red><I># create menu</I></FONT>
|
||||
menu .m -type menubar
|
||||
<FONT COLOR=red><I># associate menubar to toplevel BEFORE DynamicHelp::register</I></FONT>
|
||||
<FONT COLOR=red><I># to make it works with menu clone name</I></FONT>
|
||||
. configure -menu .m
|
||||
.m add cascade -label "File" -menu .m.file
|
||||
menu .m.file
|
||||
.m.file add command -label "Open..."
|
||||
.m.file add command -label "Quit"
|
||||
<FONT COLOR=red><I># create label for help, using variable varinfo</I></FONT>
|
||||
label .l -textvariable varinfo
|
||||
<FONT COLOR=red><I># associate all entries of menu .m.file to variable varinfo</I></FONT>
|
||||
DynamicHelp::register .m.file menu varinfo
|
||||
<FONT COLOR=red><I># then declare entries of .m.file</I></FONT>
|
||||
DynamicHelp::register .m.file menuentry 0 "Detach menu"
|
||||
DynamicHelp::register .m.file menuentry 1 "Open a file"
|
||||
DynamicHelp::register .m.file menuentry 2 "Exit demo"
|
||||
</PRE></TD></TR></TABLE></CENTER>
|
||||
<BR>
|
||||
<BR>Notice that if popup menu is owned by a menubar, you must associate first the menubar
|
||||
to its toplevel. In this case, when you create a menu popup, its clone window is also
|
||||
created, and DynamicHelp::register detects the exitence of the clone window and maps
|
||||
events to it.
|
||||
</DD></DL>
|
||||
<DL><DT><A NAME="sethelp">DynamicHelp::<B>sethelp</B></A>
|
||||
<I>path</I>
|
||||
<I>subpath</I>
|
||||
?<I>force</I>?
|
||||
</DT><DD>
|
||||
Description text
|
||||
</DD></DL>
|
||||
</BODY></HTML>
|
366
R_portable/R/App/R-portable/Tcl/bin64/lib/bwidget-1.9.12/BWman/Entry.html
Executable file
@ -0,0 +1,366 @@
|
||||
<HTML>
|
||||
<HEAD><TITLE>Entry</TITLE></HEAD>
|
||||
<BODY BGCOLOR=white>
|
||||
<DL><DT><I><A HREF="#descr">NAME</A></I></DT>
|
||||
<DD><B>Entry</B>
|
||||
- Entry widget with <B>state</B> option, dynamic help and drag and drop facilities
|
||||
</DD></DL>
|
||||
<DL>
|
||||
<DT><I>CREATION</I></DT>
|
||||
<DD><A HREF="#descr"><B>Entry</B></A> <I>pathName</I> ?<I>option value...</I>?</DD>
|
||||
</DL>
|
||||
<DL>
|
||||
<DT><I>STANDARD OPTIONS</I></DT>
|
||||
<DT><I>Not themed</I></DT>
|
||||
<DD><TABLE CELLSPACING=0 CELLSPACING=0 BORDER=0>
|
||||
<TR>
|
||||
<TD> <A HREF="options.htm#M-background">-background or -bg</A></TD>
|
||||
<TD> <A HREF="options.htm#M-borderwidth">-borderwidth or -bd</A></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> <A HREF="options.htm#M-disabledbackground">-disabledbackground</A></TD>
|
||||
<TD> <A HREF="options.htm#M-disabledforeground">-disabledforeground</A></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> <A HREF="options.htm#M-exportselection">-exportselection</A></TD>
|
||||
<TD> <A HREF="options.htm#M-font">-font</A></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> <A HREF="options.htm#M-foreground">-foreground or -fg</A></TD>
|
||||
<TD> <A HREF="options.htm#M-highlightbackground">-highlightbackground</A></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> <A HREF="options.htm#M-highlightcolor">-highlightcolor</A></TD>
|
||||
<TD> <A HREF="options.htm#M-highlightthickness">-highlightthickness</A></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> <A HREF="options.htm#M-insertbackground">-insertbackground</A></TD>
|
||||
<TD> <A HREF="options.htm#M-insertborderwidth">-insertborderwidth</A></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> <A HREF="options.htm#M-insertofftime">-insertofftime</A></TD>
|
||||
<TD> <A HREF="options.htm#M-insertontime">-insertontime</A></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> <A HREF="options.htm#M-insertwidth">-insertwidth</A></TD>
|
||||
<TD> <A HREF="options.htm#M-justify">-justify</A></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> <A HREF="options.htm#M-relief">-relief</A></TD>
|
||||
<TD> <A HREF="options.htm#M-selectbackground">-selectbackground</A></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> <A HREF="options.htm#M-selectborderwidth">-selectborderwidth</A></TD>
|
||||
<TD> <A HREF="options.htm#M-selectforeground">-selectforeground</A></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> <A HREF="options.htm#M-takefocus">-takefocus</A></TD>
|
||||
<TD> <A HREF="options.htm#M-text">-text</A></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> <A HREF="options.htm#M-textvariable">-textvariable</A></TD>
|
||||
<TD> <A HREF="options.htm#M-xscrollcommand">-xscrollcommand</A></TD>
|
||||
</TABLE></DD>
|
||||
</DL>
|
||||
<DL>
|
||||
<DT><I>Themed</I></DT>
|
||||
<DD><TABLE CELLSPACING=0 CELLSPACING=0 BORDER=0>
|
||||
<TR>
|
||||
<TD> <A HREF="options.htm#M-exportselection">-exportselection</A></TD>
|
||||
<TD> <A HREF="options.htm#M-font">-font</A></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> <A HREF="options.htm#M-insertofftime">-insertofftime</A></TD>
|
||||
<TD> <A HREF="options.htm#M-insertontime">-insertontime</A></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> <A HREF="options.htm#M-insertwidth">-insertwidth</A></TD>
|
||||
<TD> <A HREF="options.htm#M-justify">-justify</A></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> <A HREF="options.htm#M-takefocus">-takefocus</A></TD>
|
||||
<TD> <A HREF="options.htm#M-text">-text</A></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> <A HREF="options.htm#M-textvariable">-textvariable</A></TD>
|
||||
<TD> <A HREF="options.htm#M-xscrollcommand">-xscrollcommand</A></TD>
|
||||
</TABLE></DD>
|
||||
</DL>
|
||||
<DL>
|
||||
<DT><I><A HREF="#wso">WIDGET-SPECIFIC OPTIONS</A></I></DT>
|
||||
<DD><TABLE CELLSPACING=0 CELLSPACING=0 BORDER=0>
|
||||
<TR>
|
||||
<TD> <A HREF="#-command">-command</A></TD>
|
||||
<TD> <A HREF="#-dragenabled">-dragenabled</A></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> <A HREF="#-dragendcmd">-dragendcmd</A></TD>
|
||||
<TD> <A HREF="#-dragevent">-dragevent</A></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> <A HREF="#-draginitcmd">-draginitcmd</A></TD>
|
||||
<TD> <A HREF="#-dragtype">-dragtype</A></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> <A HREF="#-dropcmd">-dropcmd</A></TD>
|
||||
<TD> <A HREF="#-dropenabled">-dropenabled</A></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> <A HREF="#-dropovercmd">-dropovercmd</A></TD>
|
||||
<TD> <A HREF="#-droptypes">-droptypes</A></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> <A HREF="#-editable">-editable</A></TD>
|
||||
<TD> <A HREF="#-helptext">-helptext</A></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> <A HREF="#-helptype">-helptype</A></TD>
|
||||
<TD> <A HREF="#-helpvar">-helpvar</A></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> <A HREF="#-show">-show</A></TD>
|
||||
<TD> <A HREF="#-state">-state</A></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> <A HREF="#-width">-width</A></TD>
|
||||
</TABLE></DD>
|
||||
</DL>
|
||||
<DL>
|
||||
<DT><I><A HREF="#wc">WIDGET COMMAND</A></I></DT>
|
||||
<DD><I>pathName</I> <A HREF="#cget"><B>cget</B></A>
|
||||
<I>option</I>
|
||||
</DD>
|
||||
<DD><I>pathName</I> <A HREF="#configure"><B>configure</B></A>
|
||||
?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
|
||||
</DD>
|
||||
<DD><I>pathName</I> <A HREF="#invoke"><B>invoke</B></A>
|
||||
</DD>
|
||||
</DL>
|
||||
<BR><HR WIDTH="100%"><BR>
|
||||
<B><A NAME="descr"></A>DESCRIPTION</B><BR>
|
||||
<P>
|
||||
|
||||
The <B>Entry</B> widget extends the default Tk entry. Options have been added to provide
|
||||
visual effect depending on the state of the Entry,
|
||||
<A HREF="DynamicHelp.html">DynamicHelp</A> options,
|
||||
and <A HREF="DragSite.html">Drag</A> and
|
||||
<A HREF="DropSite.html">Drop</A>.
|
||||
Entry behaves much like a Label, with <B>text</B> option to set its contents.
|
||||
<BR>Tk entry command can also be used on Entry widget.
|
||||
|
||||
</P>
|
||||
<BR><HR WIDTH="50%"><BR>
|
||||
<B><A NAME="wso">WIDGET-SPECIFIC OPTIONS</A></B><BR>
|
||||
<DL><DT><A NAME="-command"><B>-command</B></A></DT>
|
||||
<DD>
|
||||
|
||||
Specifies a command when user press <Return> in the Entry.
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="-dragenabled"><B>-dragenabled</B></A></DT>
|
||||
<DD>
|
||||
A boolean specifying if drag is enabled.
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="-dragendcmd"><B>-dragendcmd</B></A></DT>
|
||||
<DD>
|
||||
|
||||
Specifies a command to be called when drag ended.
|
||||
<B>dragendcmd</B> must be a command conforming to the description of the
|
||||
option <B>dragendcmd</B> of <B>DragSite::<A HREF="DragSite.html#register">register</A></B>.
|
||||
|
||||
<BR>If <B>dragendcmd</B> is empty, the internal <I>dragend</I> command updates the entry
|
||||
following the operation (<B>move</B> or <B>copy</B>) and the dragged data
|
||||
(whole or selected part of the entry).
|
||||
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="-dragevent"><B>-dragevent</B></A></DT>
|
||||
<DD>
|
||||
|
||||
Specifies the number of the mouse button associated to the drag.
|
||||
Must be <B>1</B>, <B>2</B> or <B>3</B>.
|
||||
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="-draginitcmd"><B>-draginitcmd</B></A></DT>
|
||||
<DD>
|
||||
|
||||
Specifies a command to be called when <B>dragevent</B> occurs on widget.
|
||||
<B>draginitcmd</B> must be a command conforming to the description of the
|
||||
option <B>draginitcmd</B> of <B>DragSite::<A HREF="DragSite.html#register">register</A></B>.
|
||||
|
||||
<BR>if <B>draginitcmd</B> is empty, the command refuse the drag if entry is empty or if
|
||||
portion of text is selected and event doesn't occur above the selection. In all other cases,
|
||||
the command returns:
|
||||
<UL>
|
||||
<LI>as the data type, the value of option <B>dragtype</B> or <I>TEXT</I> if empty,
|
||||
<LI>as the operations, <I>{copy move}</I> if <B>state</B> is normal and <B>editable</B>
|
||||
is true, or <I>{copy}</I> only in other cases,
|
||||
<LI>as the data, the whole content or the selected portion of the entry.
|
||||
</UL>
|
||||
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="-dragtype"><B>-dragtype</B></A></DT>
|
||||
<DD>
|
||||
|
||||
Specifies an alternate type of dragged object.
|
||||
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="-dropcmd"><B>-dropcmd</B></A></DT>
|
||||
<DD>
|
||||
|
||||
Entry has a command wrapper for <I>drop</I> events. This command stops auto scrolling
|
||||
and extract current position.
|
||||
<BR>If <B>dropcmd</B> is not empty, it is called with the following arguments:
|
||||
<UL>
|
||||
<LI>the pathname of the Entry,
|
||||
<LI>the pathname of the drag source,
|
||||
<LI>the numeric index in the entry designated by the cursor,
|
||||
<LI>the current operation,
|
||||
<LI>the data type,
|
||||
<LI>the data.
|
||||
</UL>
|
||||
and must return a value conforming to <B>dropcmd</B> option described in
|
||||
<B>DropSite::<A HREF="DropSite.html#register">register</A></B>.
|
||||
If <B>dropcmd</B> is empty, the wrapper updates the entry following the type of data:
|
||||
<DL><DD><TABLE BORDER=0 CELLSPACING=1>
|
||||
<TR><TD><I>COLOR</I> or <I>FGCOLOR</I></TD>
|
||||
<TD>reconfigure the <B>foreground</B> of the Entry</TD>
|
||||
<TR><TD><I>BGCOLOR</I></TD>
|
||||
<TD>reconfigure the <B>background</B> of the Entry</TD>
|
||||
<TR><TD><I>TEXT</I>,<BR>or any other tag</TD>
|
||||
<TD>reconfigure the Entry to display the associated string.</TD>
|
||||
</TABLE></DL>
|
||||
and returns 1.
|
||||
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="-dropenabled"><B>-dropenabled</B></A></DT>
|
||||
<DD>
|
||||
A boolean specifying if drop is enabled.
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="-dropovercmd"><B>-dropovercmd</B></A></DT>
|
||||
<DD>
|
||||
|
||||
Entry has a command wrapper for <I>drag-over</I> events. This command enables auto scrolling
|
||||
and position extraction during the <I>drag-over</I>.
|
||||
<BR>If <B>dropovercmd</B> is empty, the wrapper accepts the drop if <B>editable</b> option is
|
||||
true and <B>state</B> option is normal.
|
||||
<BR>If <B>dropovercmd</B> is not empty, it is called with the following arguments:
|
||||
<UL>
|
||||
<LI>the pathname of the Entry,
|
||||
<LI>the pathname of the drag source,
|
||||
<LI>the event,
|
||||
<LI>the numeric index in the entry designated by the cursor,
|
||||
<LI>the current operation,
|
||||
<LI>the data type,
|
||||
<LI>the data.
|
||||
</UL>
|
||||
and must return a value conforming to <B>dropovercmd</B> option described in
|
||||
<B>DropSite::<A HREF="DropSite.html#register">register</A></B>.
|
||||
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="-droptypes"><B>-droptypes</B></A></DT>
|
||||
<DD>
|
||||
|
||||
Specifies a list of accepted dropped object/operation.
|
||||
See option <B>droptypes</B> of
|
||||
<B>DropSite::<A HREF="DropSite.html#register">register</A></B>.
|
||||
for more infromation.
|
||||
|
||||
Default accepts <I>FGCOLOR</I>, <I>COLOR</I>, <I>BGCOLOR</I> and <I>TEXT</I>,
|
||||
all with <B>copy</B> and <B>move</B> operations.
|
||||
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="-editable"><B>-editable</B></A></DT>
|
||||
<DD>
|
||||
|
||||
Specifies whether the Entry is editable by the user. Equivalent to the <B>state</B> option
|
||||
of the Tk entry widget.
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="-helptext"><B>-helptext</B></A></DT>
|
||||
<DD>
|
||||
|
||||
Text for dynamic help. If empty, no help is available for this widget.
|
||||
See also <A HREF="DynamicHelp.html">DynamicHelp</A>.
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="-helptype"><B>-helptype</B></A></DT>
|
||||
<DD>
|
||||
Type of dynamic help. Use <I>balloon</I> or <I>variable</I>.
|
||||
See also <A HREF="DynamicHelp.html">DynamicHelp</A>.
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="-helpvar"><B>-helpvar</B></A></DT>
|
||||
<DD>
|
||||
Variable to use when <B>helptype</B> option is <I>variable</I>.
|
||||
See also <A HREF="DynamicHelp.html">DynamicHelp</A>.
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="-show"><B>-show</B></A></DT>
|
||||
<DD>
|
||||
|
||||
If this option is specified, then the true contents of the entry are not displayed in the
|
||||
window. Instead, each character in the entry's value will be displayed as the first character
|
||||
in the value of this option, such as ``*''. This is useful, for example, if the entry is to
|
||||
be used to enter a password. If characters in the entry are selected and copied elsewhere, the
|
||||
information copied will be what is displayed, not the true contents of the entry.
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="-state"><B>-state</B></A></DT>
|
||||
<DD>
|
||||
|
||||
Specifies one of two states for the Entry: <B>normal</B> or <B>disabled</B>.
|
||||
In normal state the text of the Entry is displayed using the <B>foreground</B> option.
|
||||
In disabled state the text of the Entry is displayed using the <B>disabledforeground</B>
|
||||
option. If the entry is disabled then the value may not be changed by user input
|
||||
and no insertion cursor will be displayed, even if the input focus is in the widget.
|
||||
Disabled state is the same as not editable with visual effect.
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="-width"><B>-width</B></A></DT>
|
||||
<DD>
|
||||
|
||||
Specifies an integer value indicating the desired width of the entry window, in average-size
|
||||
characters of the widget's font. If the value is less than or equal to zero, the widget picks
|
||||
a size just large enough to hold its current text.
|
||||
</DD>
|
||||
</DL>
|
||||
<HR WIDTH="50%"><BR>
|
||||
<B><A NAME="wc">WIDGET COMMAND</A></B><BR>
|
||||
<DL><DT><A NAME="cget"><I>pathName</I> <B>cget</B></A>
|
||||
<I>option</I>
|
||||
</DT><DD>
|
||||
|
||||
Returns the current value of the configuration option given by <I>option</I>.
|
||||
<I>Option</I> may have any of the values accepted by the creation command.
|
||||
</DD></DL>
|
||||
<DL><DT><A NAME="configure"><I>pathName</I> <B>configure</B></A>
|
||||
?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
|
||||
</DT><DD>
|
||||
|
||||
Query or modify the configuration options of the widget. If no <I>option</I> is specified,
|
||||
returns a list describing all of the available options for <I>pathName</I>.
|
||||
If <I>option</I> is specified with no <I>value</I>, then the command returns a list
|
||||
describing the one named <I>option</I> (this list will be identical to the corresponding
|
||||
sublist of the value returned if no <I>option</I> is specified). If one or
|
||||
more <I>option-value</I> pairs are specified, then the command modifies the given widget
|
||||
option(s) to have the given value(s); in this case the command returns an empty string.
|
||||
<I>Option</I> may have any of the values accepted by the creation command.
|
||||
Read-only options are not be modified.
|
||||
|
||||
</DD></DL>
|
||||
<DL><DT><A NAME="invoke"><I>pathName</I> <B>invoke</B></A>
|
||||
</DT><DD>
|
||||
|
||||
Calls the command specified by the option <B>-command</B>.
|
||||
|
||||
</DD></DL>
|
||||
</BODY></HTML>
|
362
R_portable/R/App/R-portable/Tcl/bin64/lib/bwidget-1.9.12/BWman/Label.html
Executable file
@ -0,0 +1,362 @@
|
||||
<HTML>
|
||||
<HEAD><TITLE>Label</TITLE></HEAD>
|
||||
<BODY BGCOLOR=white>
|
||||
<DL><DT><I><A HREF="#descr">NAME</A></I></DT>
|
||||
<DD><B>Label</B>
|
||||
- Label widget with <B>state</B> option, dynamic help and drag and drop facilities
|
||||
</DD></DL>
|
||||
<DL>
|
||||
<DT><I>CREATION</I></DT>
|
||||
<DD><A HREF="#descr"><B>Label</B></A> <I>pathName</I> ?<I>option value...</I>?</DD>
|
||||
</DL>
|
||||
<DL>
|
||||
<DT><I>STANDARD OPTIONS</I></DT>
|
||||
<DT><I>Not themed</I></DT>
|
||||
<DD><TABLE CELLSPACING=0 CELLSPACING=0 BORDER=0>
|
||||
<TR>
|
||||
<TD> <A HREF="options.htm#M-anchor">-anchor</A></TR>
|
||||
<TD> <A HREF="options.htm#M-background">-background or -bg</A></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> <A HREF="options.htm#M-bitmap">-bitmap</A></TR>
|
||||
<TD> <A HREF="options.htm#M-borderwidth">-borderwidth or -bd</A></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> <A HREF="options.htm#M-cursor">-cursor</A></TR>
|
||||
<TD> <A HREF="options.htm#M-disabledforeground">-disabledforeground</A></TR>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> <A HREF="options.htm#M-font">-font</A></TR>
|
||||
<TD> <A HREF="options.htm#M-foreground">-foreground or -fg</A></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> <A HREF="options.htm#M-highlightbackground">-highlightbackground</A></TR>
|
||||
<TD> <A HREF="options.htm#M-highlightcolor">-highlightcolor</A></TR>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> <A HREF="options.htm#M-highlightthickness">-highlightthickness</A></TR>
|
||||
<TD> <A HREF="options.htm#M-image">-image</A></TR>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> <A HREF="options.htm#M-justify">-justify</A></TR>
|
||||
<TD> <A HREF="options.htm#M-padx">-padx</A></TR>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> <A HREF="options.htm#M-pady">-pady</A></TR>
|
||||
<TD> <A HREF="options.htm#M-relief">-relief</A></TR>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> <A HREF="options.htm#M-takefocus">-takefocus</A></TR>
|
||||
<TD> <A HREF="options.htm#M-text">-text</A></TR>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> <A HREF="options.htm#M-textvariable">-textvariable</A></TR>
|
||||
<TD> <A HREF="options.htm#M-wraplength">-wraplength</A></TR>
|
||||
</TR>
|
||||
</TABLE></DD>
|
||||
<DT><I>Themed</I></DT>
|
||||
<DD><TABLE CELLSPACING=0 CELLSPACING=0 BORDER=0>
|
||||
<TR>
|
||||
<TD> <A HREF="options.htm#M-anchor">-anchor</A></TR>
|
||||
<TD> <A HREF="options.htm#M-background">-background or -bg</A></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> <A HREF="options.htm#M-cursor">-cursor</A></TD></TR>
|
||||
<TR>
|
||||
<TD> <A HREF="options.htm#M-font">-font</A></TR>
|
||||
<TD> <A HREF="options.htm#M-foreground">-foreground or -fg</A></TD>
|
||||
</TR>
|
||||
<TD> <A HREF="options.htm#M-image">-image</A></TR>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> <A HREF="options.htm#M-justify">-justify</A></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> <A HREF="options.htm#M-relief">-relief</A></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> <A HREF="options.htm#M-takefocus">-takefocus</A></TR>
|
||||
<TD> <A HREF="options.htm#M-text">-text</A></TR>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> <A HREF="options.htm#M-textvariable">-textvariable</A></TR>
|
||||
<TD> <A HREF="options.htm#M-wraplength">-wraplength</A></TR>
|
||||
</TR>
|
||||
</TABLE></DD>
|
||||
</DL>
|
||||
<DL>
|
||||
<DT><I><A HREF="#wso">WIDGET-SPECIFIC OPTIONS</A></I></DT>
|
||||
<DD><TABLE CELLSPACING=0 CELLSPACING=0 BORDER=0>
|
||||
<TR>
|
||||
<TD> <A HREF="#-dragenabled">-dragenabled</A></TR>
|
||||
<TD> <A HREF="#-dragendcmd">-dragendcmd</A></TR>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> <A HREF="#-dragevent">-dragevent</A></TR>
|
||||
<TD> <A HREF="#-draginitcmd">-draginitcmd</A></TR>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> <A HREF="#-dragtype">-dragtype</A></TR>
|
||||
<TD> <A HREF="#-dropcmd">-dropcmd</A></TR>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> <A HREF="#-dropenabled">-dropenabled</A></TR>
|
||||
<TD> <A HREF="#-dropovercmd">-dropovercmd</A></TR>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> <A HREF="#-droptypes">-droptypes</A></TR>
|
||||
<TD> <A HREF="#-focus">-focus</A></TR>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> <A HREF="#-height">-height</A></TR>
|
||||
<TD> <A HREF="#-helptext">-helptext</A></TR>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> <A HREF="#-helptype">-helptype</A></TR>
|
||||
<TD> <A HREF="#-helpvar">-helpvar</A></TR>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> <A HREF="#-name">-name</A></TR>
|
||||
<TD> <A HREF="#-state">-state</A></TR>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> <A HREF="#-underline">-underline</A></TR>
|
||||
<TD> <A HREF="#-width">-width</A></TR>
|
||||
</TR>
|
||||
</TABLE></DD>
|
||||
</DL>
|
||||
<DL>
|
||||
<DT><I><A HREF="#wc">WIDGET COMMAND</A></I></DT>
|
||||
<DD><I>pathName</I> <A HREF="#cget"><B>cget</B></A>
|
||||
<I>option</I>
|
||||
</DD>
|
||||
<DD><I>pathName</I> <A HREF="#configure"><B>configure</B></A>
|
||||
?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
|
||||
</DD>
|
||||
<DD><I>pathName</I> <A HREF="#setfocus"><B>setfocus</B></A>
|
||||
</DD>
|
||||
</DL>
|
||||
<BR><HR WIDTH="100%"><BR>
|
||||
<B><A NAME="descr"></A>DESCRIPTION</B><BR>
|
||||
<P>
|
||||
|
||||
The <B>Label</B> widget extends the default Tk label. Options have been added to provide
|
||||
visual effect depending on the state of the Label, <A HREF="DynamicHelp.html">DynamicHelp</A> options, and <A HREF="DragSite.html">Drag
|
||||
</A> and <A HREF="DropSite.html">Drop</A>.
|
||||
</P>
|
||||
<BR><HR WIDTH="50%"><BR>
|
||||
<B><A NAME="wso">WIDGET-SPECIFIC OPTIONS</A></B><BR>
|
||||
<DL><DT><A NAME="-dragenabled"><B>-dragenabled</B></A></DT>
|
||||
<DD>
|
||||
A boolean specifying if drag is enabled.
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="-dragendcmd"><B>-dragendcmd</B></A></DT>
|
||||
<DD>
|
||||
|
||||
Specifies a command to be called when drag ended.
|
||||
<B>dragendcmd</B> must be a command conforming to the description of the
|
||||
option <B>dragendcmd</B> of <B>DragSite::<A HREF="DragSite.html#register">register</A></B>.
|
||||
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="-dragevent"><B>-dragevent</B></A></DT>
|
||||
<DD>
|
||||
|
||||
Specifies the number of the mouse button associated to the drag.
|
||||
Must be <B>1</B>, <B>2</B> or <B>3</B>.
|
||||
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="-draginitcmd"><B>-draginitcmd</B></A></DT>
|
||||
<DD>
|
||||
|
||||
Specifies a command to be called when <B>dragevent</B> occurs on widget.
|
||||
<B>draginitcmd</B> must be a command conforming to the description of the
|
||||
option <B>draginitcmd</B> of <B>DragSite::<A HREF="DragSite.html#register">register</A></B>.
|
||||
|
||||
<BR>If <B>draginitcmd</B> is empty, the internal <B>draginitcmd</B> command is used instead
|
||||
and returns:
|
||||
<DL><DD><TABLE BORDER=0 CELLSPACING=1>
|
||||
<TR><TD valign=top><I>IMAGE {copy} <image name></I>
|
||||
<TD>if an image is displayed.
|
||||
<TR><TD valign=top><I>BITMAP {copy} <bitmap name></I>
|
||||
<TD>if a bitmap is displayed.
|
||||
<TR><TD valign=top><I>TEXT {copy} <text></I>
|
||||
<TD>if a text is displayed.
|
||||
</TABLE></DL>
|
||||
Note that if <B>dragtype</B> option is not empty, its value is used instead of those above.
|
||||
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="-dragtype"><B>-dragtype</B></A></DT>
|
||||
<DD>
|
||||
|
||||
Specifies an alternate type of dragged object.
|
||||
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="-dropcmd"><B>-dropcmd</B></A></DT>
|
||||
<DD>
|
||||
|
||||
Specifies a command to be called when drop occurs on the widget.
|
||||
<B>dropcmd</B> must be a command conforming to the description of the
|
||||
option <B>dropcmd</B> of <B>DropSite::<A HREF="DropSite.html#register">register</A></B>.
|
||||
|
||||
<BR>If <B>dropcmd</B> is empty, the command updates the label following the type of the data:
|
||||
<DL><DD><TABLE BORDER=0 CELLSPACING=1>
|
||||
<TR><TD><I>COLOR</I> or <I>FGCOLOR</I></TD>
|
||||
<TD>reconfigure the <B>foreground</B> of the Label.</TD>
|
||||
<TR><TD><I>BGCOLOR</I></TD>
|
||||
<TD>reconfigure the <B>background</B> of the Label.</TD>
|
||||
<TR><TD><I>IMAGE</I></TD>
|
||||
<TD>reconfigure the Label to display the associated image.</TD>
|
||||
<TR><TD><I>BITMAP</I></TD>
|
||||
<TD>reconfigure the Label to display the associated bitmap.
|
||||
<B>image</B> option is set to empty.</TD>
|
||||
<TR><TD><I>TEXT</I>,<BR>or any other tag</TD>
|
||||
<TD>reconfigure the Label to display the associated string.
|
||||
<B>image</B> and <B>bitmap</B> options are set to empty.</TD>
|
||||
</TABLE></DL>
|
||||
and returns 1.
|
||||
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="-dropenabled"><B>-dropenabled</B></A></DT>
|
||||
<DD>
|
||||
A boolean specifying if drop is enabled.
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="-dropovercmd"><B>-dropovercmd</B></A></DT>
|
||||
<DD>
|
||||
|
||||
Specifies a command to be called when drag icon is over the widget.
|
||||
<B>dropovercmd</B> must be a command conforming to the description of the
|
||||
option <B>dropovercmd</B> of <B>DropSite::<A HREF="DropSite.html#register">register</A></B>.
|
||||
|
||||
<BR>If <B>dropovercmd</B> is empty, Label always accepts the drop if data type is
|
||||
<I>FGCOLOR</I>, <I>COLOR</I>, <I>BGCOLOR</I>, and accepts all other data type only if
|
||||
<B>state</B> is normal.
|
||||
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="-droptypes"><B>-droptypes</B></A></DT>
|
||||
<DD>
|
||||
|
||||
Specifies a list of accepted dropped object/operation.
|
||||
See option <B>droptypes</B> of
|
||||
<B>DropSite::<A HREF="DropSite.html#register">register</A></B>.
|
||||
for more infromation.
|
||||
|
||||
Default accepts <I>FGCOLOR</I>, <I>COLOR</I>, <I>BGCOLOR</I>, <I>TEXT</I>, <I>BITMAP</I>
|
||||
and <I>IMAGE</I>, all with <B>copy</B> and <B>move</B> operations.
|
||||
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="-focus"><B>-focus</B></A></DT>
|
||||
<DD>
|
||||
|
||||
Specifies a pathname to set the focus on for Label::<B>setfocus</B> command.
|
||||
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="-height"><B>-height</B></A></DT>
|
||||
<DD>
|
||||
|
||||
Specifies a desired height for the label.
|
||||
If an image or bitmap is being displayed in the label then the value is in
|
||||
screen units, for text it is in lines of text.
|
||||
If this option isn't specified, the label's desired height is computed
|
||||
from the size of the image or bitmap or text being displayed in it.<BR>
|
||||
Option not available for <I>themed</I> widgets.
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="-helptext"><B>-helptext</B></A></DT>
|
||||
<DD>
|
||||
|
||||
Text for dynamic help. If empty, no help is available for this widget.
|
||||
See also <A HREF="DynamicHelp.html">DynamicHelp</A>.
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="-helptype"><B>-helptype</B></A></DT>
|
||||
<DD>
|
||||
Type of dynamic help. Use <I>balloon</I> or <I>variable</I>.
|
||||
See also <A HREF="DynamicHelp.html">DynamicHelp</A>.
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="-helpvar"><B>-helpvar</B></A></DT>
|
||||
<DD>
|
||||
Variable to use when <B>helptype</B> option is <I>variable</I>.
|
||||
See also <A HREF="DynamicHelp.html">DynamicHelp</A>.
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="-name"><B>-name</B></A></DT>
|
||||
<DD>
|
||||
|
||||
Specifies a standard name for the label. If the option <B>*<I>name</I>Name</B> is
|
||||
found in the resource database, then <B>text</B> and <B>underline</B> options
|
||||
are extracted from its value.
|
||||
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="-state"><B>-state</B></A></DT>
|
||||
<DD>
|
||||
|
||||
Specifies one of two states for the Label: <B>normal</B> or <B>disabled</B>.
|
||||
In normal state the text of the Label is displayed using the <B>foreground</B> option.
|
||||
In disabled state the text of the Label is displayed using the <B>disabledforeground</B> option.
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="-underline"><B>-underline</B></A></DT>
|
||||
<DD>
|
||||
|
||||
Specifies the integer index of a character to underline in the label.
|
||||
0 corresponds to the first character of the text displayed, 1 to the next character,
|
||||
and so on.
|
||||
<BR>The binding <B><Alt-<I>char</I>></B> is automatically set on the toplevel
|
||||
of the Label to call Label::<B>setfocus</B>.
|
||||
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="-width"><B>-width</B></A></DT>
|
||||
<DD>
|
||||
|
||||
Specifies a desired width for the label.
|
||||
If an image or bitmap is being displayed in the label then the value is in
|
||||
screen units, for text it is in characters.
|
||||
If this option isn't specified, the label's desired width is computed
|
||||
from the size of the image or bitmap or text being displayed in it.
|
||||
|
||||
</DD>
|
||||
</DL>
|
||||
<HR WIDTH="50%"><BR>
|
||||
<B><A NAME="wc">WIDGET COMMAND</A></B><BR>
|
||||
<DL><DT><A NAME="cget"><I>pathName</I> <B>cget</B></A>
|
||||
<I>option</I>
|
||||
</DT><DD>
|
||||
|
||||
Returns the current value of the configuration option given by <I>option</I>.
|
||||
<I>Option</I> may have any of the values accepted by the creation command.
|
||||
</DD></DL>
|
||||
<DL><DT><A NAME="configure"><I>pathName</I> <B>configure</B></A>
|
||||
?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
|
||||
</DT><DD>
|
||||
|
||||
Query or modify the configuration options of the widget. If no <I>option</I> is specified,
|
||||
returns a list describing all of the available options for <I>pathName</I>.
|
||||
If <I>option</I> is specified with no <I>value</I>, then the command returns a list
|
||||
describing the one named <I>option</I> (this list will be identical to the corresponding
|
||||
sublist of the value returned if no <I>option</I> is specified). If one or
|
||||
more <I>option-value</I> pairs are specified, then the command modifies the given widget
|
||||
option(s) to have the given value(s); in this case the command returns an empty string.
|
||||
<I>Option</I> may have any of the values accepted by the creation command.
|
||||
Read-only options are not be modified.
|
||||
|
||||
</DD></DL>
|
||||
<DL><DT><A NAME="setfocus"><I>pathName</I> <B>setfocus</B></A>
|
||||
</DT><DD>
|
||||
|
||||
Set the focus on the pathname given by <B>-focus</B> option if <B>-state</B> is <I>normal</I>.
|
||||
|
||||
</DD></DL>
|
||||
</BODY></HTML>
|
194
R_portable/R/App/R-portable/Tcl/bin64/lib/bwidget-1.9.12/BWman/LabelEntry.html
Executable file
@ -0,0 +1,194 @@
|
||||
<HTML>
|
||||
<HEAD><TITLE>LabelEntry</TITLE></HEAD>
|
||||
<BODY BGCOLOR=white>
|
||||
<DL><DT><I><A HREF="#descr">NAME</A></I></DT>
|
||||
<DD><B>LabelEntry</B>
|
||||
-
|
||||
LabelFrame containing an Entry widget.
|
||||
|
||||
</DD></DL>
|
||||
<DL>
|
||||
<DT><I>CREATION</I></DT>
|
||||
<DD><A HREF="#descr"><B>LabelEntry</B></A> <I>pathName</I> ?<I>option value...</I>?</DD>
|
||||
</DL>
|
||||
<DL>
|
||||
<DT><I><A HREF="Entry.html">OPTIONS from <B>Entry</B></A></I></DT>
|
||||
<DD><TABLE CELLSPACING=0 CELLPADDING=0 BORDER=0>
|
||||
<TR>
|
||||
<TD> -borderwidth or -bd</TD>
|
||||
<TD> -command</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> -disabledforeground</TD>
|
||||
<TD> -dragenabled</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> -dragendcmd</TD>
|
||||
<TD> -dragevent</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> -draginitcmd</TD>
|
||||
<TD> -dragtype</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> -dropcmd</TD>
|
||||
<TD> -dropenabled</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> -dropovercmd</TD>
|
||||
<TD> -droptypes</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> -editable</TD>
|
||||
<TD> -entrybg (see <B>-background</B>)</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> -entryfg (see <B>-foreground</B>)</TD>
|
||||
<TD> -exportselection</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> -font</TD>
|
||||
<TD> -helptext</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> -helptype</TD>
|
||||
<TD> -helpvar</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> -highlightbackground</TD>
|
||||
<TD> -highlightcolor</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> -highlightthickness</TD>
|
||||
<TD> -insertbackground</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> -insertborderwidth</TD>
|
||||
<TD> -insertofftime</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> -insertontime</TD>
|
||||
<TD> -insertwidth</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> -justify</TD>
|
||||
<TD> -relief</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> -selectbackground</TD>
|
||||
<TD> -selectborderwidth</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> -selectforeground</TD>
|
||||
<TD> -show</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> -state</TD>
|
||||
<TD> -takefocus</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> -text</TD>
|
||||
<TD> -textvariable</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> -width</TD>
|
||||
<TD> -xscrollcommand</TD>
|
||||
</TR>
|
||||
</TABLE></DD>
|
||||
</DL>
|
||||
<DL>
|
||||
<DT><I><A HREF="LabelFrame.html">OPTIONS from <B>LabelFrame</B></A></I></DT>
|
||||
<DD><TABLE CELLSPACING=0 CELLPADDING=0 BORDER=0>
|
||||
<TR>
|
||||
<TD> -background or -bg</TD>
|
||||
<TD> -disabledforeground</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> -foreground or -fg</TD>
|
||||
<TD> -helptext</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> -helptype</TD>
|
||||
<TD> -helpvar</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> -label (see <B>-text</B>)</TD>
|
||||
<TD> -labelanchor (see <B>-anchor</B>)</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> -labelfont (see <B>-font</B>)</TD>
|
||||
<TD> -labelheight (see <B>-height</B>)</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> -labeljustify (see <B>-justify</B>)</TD>
|
||||
<TD> -labelwidth (see <B>-width</B>)</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> -name</TD>
|
||||
<TD> -padx</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> -pady</TD>
|
||||
<TD> -side</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> -state</TD>
|
||||
<TD> -underline</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> -wraplength</TD>
|
||||
</TABLE></DD>
|
||||
</DL>
|
||||
<DL>
|
||||
<DT><I><A HREF="#wc">WIDGET COMMAND</A></I></DT>
|
||||
<DD><I>pathName</I> <A HREF="#bind"><B>bind</B></A>
|
||||
?<I>arg...</I>?
|
||||
</DD>
|
||||
<DD><I>pathName</I> <A HREF="#cget"><B>cget</B></A>
|
||||
<I>option</I>
|
||||
</DD>
|
||||
<DD><I>pathName</I> <A HREF="#configure"><B>configure</B></A>
|
||||
?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
|
||||
</DD>
|
||||
</DL>
|
||||
<BR><HR WIDTH="100%"><BR>
|
||||
<B><A NAME="descr"></A>DESCRIPTION</B><BR>
|
||||
<P>
|
||||
|
||||
LabelEntry is a widget composed of <A HREF="LabelFrame.html">LabelFrame</A> widget
|
||||
containing an <A HREF="Entry.html">Entry</A> widget.
|
||||
Tk entry command can also be used on LabelEntry widget.
|
||||
|
||||
</P>
|
||||
<HR WIDTH="50%"><BR>
|
||||
<B><A NAME="wc">WIDGET COMMAND</A></B><BR>
|
||||
<DL><DT><A NAME="bind"><I>pathName</I> <B>bind</B></A>
|
||||
?<I>arg...</I>?
|
||||
</DT><DD>
|
||||
|
||||
Set bindings on the entry widget.
|
||||
|
||||
</DD></DL>
|
||||
<DL><DT><A NAME="cget"><I>pathName</I> <B>cget</B></A>
|
||||
<I>option</I>
|
||||
</DT><DD>
|
||||
|
||||
Returns the current value of the configuration option given by <I>option</I>.
|
||||
<I>Option</I> may have any of the values accepted by the creation command.
|
||||
</DD></DL>
|
||||
<DL><DT><A NAME="configure"><I>pathName</I> <B>configure</B></A>
|
||||
?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
|
||||
</DT><DD>
|
||||
|
||||
Query or modify the configuration options of the widget. If no <I>option</I> is specified,
|
||||
returns a list describing all of the available options for <I>pathName</I>.
|
||||
If <I>option</I> is specified with no <I>value</I>, then the command returns a list
|
||||
describing the one named <I>option</I> (this list will be identical to the corresponding
|
||||
sublist of the value returned if no <I>option</I> is specified). If one or
|
||||
more <I>option-value</I> pairs are specified, then the command modifies the given widget
|
||||
option(s) to have the given value(s); in this case the command returns an empty string.
|
||||
<I>Option</I> may have any of the values accepted by the creation command.
|
||||
Read-only options are not be modified.
|
||||
|
||||
</DD></DL>
|
||||
</BODY></HTML>
|
144
R_portable/R/App/R-portable/Tcl/bin64/lib/bwidget-1.9.12/BWman/LabelFrame.html
Executable file
@ -0,0 +1,144 @@
|
||||
<HTML>
|
||||
<HEAD><TITLE>LabelFrame</TITLE></HEAD>
|
||||
<BODY BGCOLOR=white>
|
||||
<DL><DT><I><A HREF="#descr">NAME</A></I></DT>
|
||||
<DD><B>LabelFrame</B>
|
||||
- Frame with a Label
|
||||
</DD></DL>
|
||||
<DL>
|
||||
<DT><I>CREATION</I></DT>
|
||||
<DD><A HREF="#descr"><B>LabelFrame</B></A> <I>pathName</I> ?<I>option value...</I>?</DD>
|
||||
</DL>
|
||||
<DL>
|
||||
<DT><I>STANDARD OPTIONS</I></DT>
|
||||
<DD><TABLE CELLSPACING=0 CELLSPACING=0 BORDER=0>
|
||||
<TR>
|
||||
<TD> <A HREF="options.htm#M-borderwidth">-borderwidth or -bd</A></TD>
|
||||
<TD> <A HREF="options.htm#M-relief">-relief</A></TR>
|
||||
</TR>
|
||||
</TABLE></DD>
|
||||
</DL>
|
||||
<DL>
|
||||
<DT><I><A HREF="Label.html">OPTIONS from <B>Label</B></A></I></DT>
|
||||
<DD><TABLE CELLSPACING=0 CELLPADDING=0 BORDER=0>
|
||||
<TR>
|
||||
<TD> -anchor</TD>
|
||||
<TD> -background or -bg</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> -bitmap</TD>
|
||||
<TD> -disabledforeground</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> -focus</TD>
|
||||
<TD> -font</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> -foreground or -fg</TD>
|
||||
<TD> -height</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> -helptext</TD>
|
||||
<TD> -helptype</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> -helpvar</TD>
|
||||
<TD> -image</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> -justify</TD>
|
||||
<TD> -name</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> -padx</TD>
|
||||
<TD> -pady</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> -state</TD>
|
||||
<TD> -text</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> -textvariable</TD>
|
||||
<TD> -underline</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> -width</TD>
|
||||
<TD> -wraplength</TD>
|
||||
</TABLE></DD>
|
||||
</DL>
|
||||
<DL>
|
||||
<DT><I><A HREF="#wso">WIDGET-SPECIFIC OPTIONS</A></I></DT>
|
||||
<DD><TABLE CELLSPACING=0 CELLSPACING=0 BORDER=0>
|
||||
<TR>
|
||||
<TD> <A HREF="#-side">-side</A></TR>
|
||||
</TABLE></DD>
|
||||
</DL>
|
||||
<DL>
|
||||
<DT><I><A HREF="#wc">WIDGET COMMAND</A></I></DT>
|
||||
<DD>LabelFrame::<A HREF="#align"><B>align</B></A>
|
||||
?<I>arg...</I>?
|
||||
</DD>
|
||||
<DD><I>pathName</I> <A HREF="#cget"><B>cget</B></A>
|
||||
<I>option</I>
|
||||
</DD>
|
||||
<DD><I>pathName</I> <A HREF="#configure"><B>configure</B></A>
|
||||
?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
|
||||
</DD>
|
||||
<DD><I>pathName</I> <A HREF="#getframe"><B>getframe</B></A>
|
||||
</DD>
|
||||
</DL>
|
||||
<BR><HR WIDTH="100%"><BR>
|
||||
<B><A NAME="descr"></A>DESCRIPTION</B><BR>
|
||||
<P>
|
||||
|
||||
LabelFrame enables user to create a frame with a
|
||||
<A HREF="Label.html">Label</A> positionned at any side.
|
||||
LabelFrame is used by <A HREF="ComboBox.html">ComboBox</A>
|
||||
and <A HREF="SpinBox.html">SpinBox</A>.
|
||||
</P>
|
||||
<BR><HR WIDTH="50%"><BR>
|
||||
<B><A NAME="wso">WIDGET-SPECIFIC OPTIONS</A></B><BR>
|
||||
<DL><DT><A NAME="-side"><B>-side (read-only)</B></A></DT>
|
||||
<DD>
|
||||
|
||||
Specifies where to position the Label relative to the user frame: <B>top</B>, <B>bottom</B>, <B>left</B> or <B>right</B>.
|
||||
</DD>
|
||||
</DL>
|
||||
<HR WIDTH="50%"><BR>
|
||||
<B><A NAME="wc">WIDGET COMMAND</A></B><BR>
|
||||
<DL><DT><A NAME="align">LabelFrame::<B>align</B></A>
|
||||
?<I>arg...</I>?
|
||||
</DT><DD>
|
||||
|
||||
This command align label of all widget given by <I>args</I> of class LabelFrame
|
||||
(or "derived") by setting their width to the max one +1
|
||||
|
||||
</DD></DL>
|
||||
<DL><DT><A NAME="cget"><I>pathName</I> <B>cget</B></A>
|
||||
<I>option</I>
|
||||
</DT><DD>
|
||||
|
||||
Returns the current value of the configuration option given by <I>option</I>.
|
||||
<I>Option</I> may have any of the values accepted by the creation command.
|
||||
</DD></DL>
|
||||
<DL><DT><A NAME="configure"><I>pathName</I> <B>configure</B></A>
|
||||
?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
|
||||
</DT><DD>
|
||||
|
||||
Query or modify the configuration options of the widget. If no <I>option</I> is specified,
|
||||
returns a list describing all of the available options for <I>pathName</I>.
|
||||
If <I>option</I> is specified with no <I>value</I>, then the command returns a list
|
||||
describing the one named <I>option</I> (this list will be identical to the corresponding
|
||||
sublist of the value returned if no <I>option</I> is specified). If one or
|
||||
more <I>option-value</I> pairs are specified, then the command modifies the given widget
|
||||
option(s) to have the given value(s); in this case the command returns an empty string.
|
||||
<I>Option</I> may have any of the values accepted by the creation command.
|
||||
Read-only options are not be modified.
|
||||
|
||||
</DD></DL>
|
||||
<DL><DT><A NAME="getframe"><I>pathName</I> <B>getframe</B></A>
|
||||
</DT><DD>
|
||||
|
||||
Return the frame where the user can create any other widget.
|
||||
</DD></DL>
|
||||
</BODY></HTML>
|
675
R_portable/R/App/R-portable/Tcl/bin64/lib/bwidget-1.9.12/BWman/ListBox.html
Executable file
@ -0,0 +1,675 @@
|
||||
<HTML>
|
||||
<HEAD><TITLE>ListBox</TITLE></HEAD>
|
||||
<BODY BGCOLOR=white>
|
||||
<DL><DT><I><A HREF="#descr">NAME</A></I></DT>
|
||||
<DD><B>ListBox</B>
|
||||
- ListBox widget
|
||||
</DD></DL>
|
||||
<DL>
|
||||
<DT><I>CREATION</I></DT>
|
||||
<DD><A HREF="#descr"><B>ListBox</B></A> <I>pathName</I> ?<I>option value...</I>?</DD>
|
||||
</DL>
|
||||
<DL>
|
||||
<DT><I>STANDARD OPTIONS</I></DT>
|
||||
<DD><TABLE CELLSPACING=0 CELLSPACING=0 BORDER=0>
|
||||
<TR>
|
||||
<TD> <A HREF="options.htm#M-background">-background or -bg</A></TD>
|
||||
<TD> <A HREF="options.htm#M-borderwidth">-borderwidth or -bd</A></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> <A HREF="options.htm#M-cursor">-cursor</A></TD>
|
||||
<TD> <A HREF="options.htm#M-highlightbackground">-highlightbackground</A></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> <A HREF="options.htm#M-highlightcolor">-highlightcolor</A></TD>
|
||||
<TD> <A HREF="options.htm#M-highlightthickness">-highlightthickness</A></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> <A HREF="options.htm#M-relief">-relief</A></TD>
|
||||
<TD> <A HREF="options.htm#M-selectbackground">-selectbackground</A></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> <A HREF="options.htm#M-selectforeground">-selectforeground</A></TD>
|
||||
<TD> <A HREF="options.htm#M-takefocus">-takefocus</A></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> <A HREF="options.htm#M-xscrollcommand">-xscrollcommand</A></TD>
|
||||
<TD> <A HREF="options.htm#M-yscrollcommand">-yscrollcommand</A></TD>
|
||||
</TR>
|
||||
</TABLE></DD>
|
||||
</DL>
|
||||
<DL>
|
||||
<DT><I><A HREF="#wso">WIDGET-SPECIFIC OPTIONS</A></I></DT>
|
||||
<DD><TABLE CELLSPACING=0 CELLSPACING=0 BORDER=0>
|
||||
<TR>
|
||||
<TD> <A HREF="#-autofocus">-autofocus</A></TD>
|
||||
<TD> <A HREF="#-deltax">-deltax</A></TD>
|
||||
<TD> <A HREF="#-deltay">-deltay</A></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> <A HREF="#-dragenabled">-dragenabled</A></TD>
|
||||
<TD> <A HREF="#-dragendcmd">-dragendcmd</A></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> <A HREF="#-dragevent">-dragevent</A></TD>
|
||||
<TD> <A HREF="#-draginitcmd">-draginitcmd</A></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> <A HREF="#-dragtype">-dragtype</A></TD>
|
||||
<TD> <A HREF="#-dropcmd">-dropcmd</A></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> <A HREF="#-dropenabled">-dropenabled</A></TD>
|
||||
<TD> <A HREF="#-dropovercmd">-dropovercmd</A></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> <A HREF="#-dropovermode">-dropovermode</A></TD>
|
||||
<TD> <A HREF="#-droptypes">-droptypes</A></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> <A HREF="#-height">-height</A></TD>
|
||||
<TD> <A HREF="#-multicolumn">-multicolumn</A></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> <A HREF="#-padx">-padx</A></TD>
|
||||
<TD> <A HREF="#-redraw">-redraw</A></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> <A HREF="#-selectfill">-selectfill</A></TD>
|
||||
<TD> <A HREF="#-selectmode">-selectmode</A></TD>
|
||||
<TD> <A HREF="#-width">-width</A></TD>
|
||||
</TABLE></DD>
|
||||
</DL>
|
||||
<DL>
|
||||
<DT><I><A HREF="#wc">WIDGET COMMAND</A></I></DT>
|
||||
<DD><I>pathName</I> <A HREF="#bindImage"><B>bindImage</B></A>
|
||||
<I>event</I>
|
||||
<I>script</I>
|
||||
</DD>
|
||||
<DD><I>pathName</I> <A HREF="#bindText"><B>bindText</B></A>
|
||||
<I>event</I>
|
||||
<I>script</I>
|
||||
</DD>
|
||||
<DD><I>pathName</I> <A HREF="#cget"><B>cget</B></A>
|
||||
<I>option</I>
|
||||
</DD>
|
||||
<DD><I>pathName</I> <A HREF="#configure"><B>configure</B></A>
|
||||
?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
|
||||
</DD>
|
||||
<DD><I>pathName</I> <A HREF="#delete"><B>delete</B></A>
|
||||
?<I>arg...</I>?
|
||||
</DD>
|
||||
<DD><I>pathName</I> <A HREF="#edit"><B>edit</B></A>
|
||||
<I>item</I>
|
||||
<I>text</I>
|
||||
?<I>verifycmd</I>?
|
||||
?<I>clickres</I>?
|
||||
?<I>select</I>?
|
||||
</DD>
|
||||
<DD><I>pathName</I> <A HREF="#exists"><B>exists</B></A>
|
||||
<I>item</I>
|
||||
</DD>
|
||||
<DD><I>pathName</I> <A HREF="#index"><B>index</B></A>
|
||||
<I>item</I>
|
||||
</DD>
|
||||
<DD><I>pathName</I> <A HREF="#insert"><B>insert</B></A>
|
||||
<I>index</I>
|
||||
<I>item</I>
|
||||
?<I>option value...</I>?
|
||||
</DD>
|
||||
<DD><I>pathName</I> <A HREF="#item"><B>item</B></A>
|
||||
<I>first</I>
|
||||
?<I>last</I>?
|
||||
</DD>
|
||||
<DD><I>pathName</I> <A HREF="#itemcget"><B>itemcget</B></A>
|
||||
<I>item</I>
|
||||
<I>option</I>
|
||||
</DD>
|
||||
<DD><I>pathName</I> <A HREF="#itemconfigure"><B>itemconfigure</B></A>
|
||||
<I>item</I>
|
||||
?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
|
||||
</DD>
|
||||
<DD><I>pathName</I> <A HREF="#items"><B>items</B></A>
|
||||
?<I>first</I>?
|
||||
?<I>last</I>?
|
||||
</DD>
|
||||
<DD><I>pathName</I> <A HREF="#move"><B>move</B></A>
|
||||
<I>item</I>
|
||||
<I>index</I>
|
||||
</DD>
|
||||
<DD><I>pathName</I> <A HREF="#reorder"><B>reorder</B></A>
|
||||
<I>neworder</I>
|
||||
</DD>
|
||||
<DD><I>pathName</I> <A HREF="#see"><B>see</B></A>
|
||||
<I>item</I>
|
||||
</DD>
|
||||
<DD><I>pathName</I> <A HREF="#selection"><B>selection</B></A>
|
||||
<I>cmd</I>
|
||||
?<I>arg...</I>?
|
||||
</DD>
|
||||
<DD><I>pathName</I> <A HREF="#xview"><B>xview</B></A>
|
||||
?<I>arg...</I>?
|
||||
</DD>
|
||||
<DD><I>pathName</I> <A HREF="#yview"><B>yview</B></A>
|
||||
?<I>arg...</I>?
|
||||
</DD>
|
||||
</DL>
|
||||
<BR><HR WIDTH="100%"><BR>
|
||||
<B><A NAME="descr"></A>DESCRIPTION</B><BR>
|
||||
<P>
|
||||
|
||||
<B>ListBox</B> widget uses canvas to display a list of items.
|
||||
Each item is composed of a label with its own font and foreground attributes, and an optional
|
||||
image or window. Each item is drawn in a single line, whose height is defined by the
|
||||
<B>deltay</B> option, so they must have at most this height.
|
||||
A item is uniquely identified by a string given at creation (by the
|
||||
<B>insert</B> command). The ListBox can have one or more columns, depending on
|
||||
<B>multicolumn</B> option. The user do not handle columns; the number of columns
|
||||
is determined following the height of the ListBox in order to see each item vertically.
|
||||
|
||||
</P>
|
||||
<BR><HR WIDTH="50%"><BR>
|
||||
<B><A NAME="wso">WIDGET-SPECIFIC OPTIONS</A></B><BR>
|
||||
<DL><DT><A NAME="-autofocus"><B>-autofocus (read-only)</B></A></DT>
|
||||
<DD>
|
||||
If this option is true, the listbox will take focus any time the user
|
||||
clicks in it. Without focus, the listbox's mouse wheel bindings will
|
||||
not work properly. The default is true.
|
||||
</DD>
|
||||
</DL>
|
||||
|
||||
<DL><DT><A NAME="-deltax"><B>-deltax</B></A></DT>
|
||||
<DD>
|
||||
|
||||
Specifies horizontal pad between each columns.
|
||||
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="-deltay"><B>-deltay</B></A></DT>
|
||||
<DD>
|
||||
|
||||
Specifies vertical size of the items.
|
||||
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="-dragenabled"><B>-dragenabled</B></A></DT>
|
||||
<DD>
|
||||
A boolean specifying if drag is enabled.
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="-dragendcmd"><B>-dragendcmd</B></A></DT>
|
||||
<DD>
|
||||
|
||||
Specifies a command to be called when drag ended.
|
||||
<B>dragendcmd</B> must be a command conforming to the description of the
|
||||
option <B>dragendcmd</B> of <B>DragSite::<A HREF="DragSite.html#register">register</A></B>.
|
||||
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="-dragevent"><B>-dragevent</B></A></DT>
|
||||
<DD>
|
||||
|
||||
Specifies the number of the mouse button associated to the drag.
|
||||
Must be <B>1</B>, <B>2</B> or <B>3</B>.
|
||||
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="-draginitcmd"><B>-draginitcmd</B></A></DT>
|
||||
<DD>
|
||||
|
||||
ListBox has a command wrapper for <I>drag-init</I> events. This command refused the drag
|
||||
if no item is designated. In other cases:
|
||||
<BR>If <B>draginitcmd</B> is empty, it returns:
|
||||
<UL>
|
||||
<LI>the value of option <B>dragtype</B> or <I>LISTBOX_ITEM</I> if empty as the data type,
|
||||
<LI><I>{move copy link}</I> as the operations,
|
||||
<LI>the item identifier as the data.
|
||||
</UL>
|
||||
If <B>draginitcmd</B> is not empty, it is called with the following arguments:
|
||||
<UL>
|
||||
<LI>the pathname of the listbox,
|
||||
<LI>the identifier of the dragged item,
|
||||
<LI>the toplevel created to represent dragged data.
|
||||
</UL>
|
||||
and must return a value conforming to <B>draginitcmd</B> option described in
|
||||
<B>DragSite::<A HREF="DragSite.html#register">register</A></B>.
|
||||
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="-dragtype"><B>-dragtype</B></A></DT>
|
||||
<DD>
|
||||
|
||||
Specifies an alternate type of dragged object.
|
||||
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="-dropcmd"><B>-dropcmd</B></A></DT>
|
||||
<DD>
|
||||
|
||||
ListBox has a command wrapper for <I>drop</I> events. This command stops auto scrolling
|
||||
and extract item and position.
|
||||
<BR>If <B>dropcmd</B> is not empty, it is called with the following arguments:
|
||||
<UL>
|
||||
<LI>the pathname of the listbox,
|
||||
<LI>the pathname of the drag source,
|
||||
<LI>a list describing where the drop occurs. It can be:
|
||||
<UL>
|
||||
<LI><I>{</I><B>widget</B><I>}</I>,
|
||||
<LI><I>{</I><B>item</B> <I>item}</I> or
|
||||
<LI><I>{</I><B>position</B> <I>index}</I>.
|
||||
</UL>
|
||||
<LI>the current operation,
|
||||
<LI>the data type,
|
||||
<LI>the data.
|
||||
</UL>
|
||||
|
||||
<p>
|
||||
The default drop command allows for drag-and-drop within the listbox but
|
||||
not to or from other widgets.
|
||||
</p>
|
||||
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="-dropenabled"><B>-dropenabled</B></A></DT>
|
||||
<DD>
|
||||
A boolean specifying if drop is enabled.
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="-dropovercmd"><B>-dropovercmd</B></A></DT>
|
||||
<DD>
|
||||
|
||||
LsitBox has a command wrapper for <I>drag-over</I> events. This command enables auto scrolling
|
||||
and position extraction during the <I>drag-over</I>.
|
||||
If <B>dropovercmd</B> is not empty, the command is called with the following aguments:
|
||||
<UL>
|
||||
<LI>the pathname of the listbox,
|
||||
<LI>the pathname of the drag source,
|
||||
<LI>a list describing where the drop can occur, whose elements are:
|
||||
<UL>
|
||||
<LI>the string <I>widget</I> if <B>dropovertype</B> option contains <I>w</I>, else empty string.
|
||||
<LI>the targeted item if drag icon points an item and <B>dropovertype</B> option contains
|
||||
<I>i</I>, else empty string.
|
||||
<LI>an index within two items where drag icon points to if <B>dropovertype</B> option
|
||||
contains <I>p</I>, else empty string.
|
||||
<LI>optionally, the preferred method if drop can occur both inside an item and between two
|
||||
items. The value is <I>position</I> or <I>item</I>.
|
||||
</UL>
|
||||
<LI>the current operation,
|
||||
<LI>the data type,
|
||||
<LI>the data.
|
||||
</UL>
|
||||
The command must return a list with two elements:
|
||||
<UL>
|
||||
<LI>the drop status, conforming to those described in <B>dropovercmd</B> option of
|
||||
<B>DropSite::<A HREF="DropSite.html#register">register</A></B>,
|
||||
<LI>the choosen method: <I>widget</I>, <I>item</I> or <I>position</I>.
|
||||
</UL>
|
||||
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="-dropovermode"><B>-dropovermode</B></A></DT>
|
||||
<DD>
|
||||
|
||||
Specifies the type of <I>drop-over</I> interaction. Must be a combination of
|
||||
<B>w</B>, which specifies that drop can occurs everywhere on widget,
|
||||
<B>p</B>, which specifies that drop can occurs between two items,
|
||||
and <B>i</B>, which specifies that drop occurs inside items.
|
||||
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="-droptypes"><B>-droptypes</B></A></DT>
|
||||
<DD>
|
||||
|
||||
Specifies a list of accepted dropped object/operation.
|
||||
See option <B>droptypes</B> of
|
||||
<B>DropSite::<A HREF="DropSite.html#register">register</A></B>.
|
||||
for more infromation.
|
||||
|
||||
<BR>Default is <I>LISTBOX_ITEM</I> with operations <B>copy</B> and <B>move</B>.
|
||||
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="-height"><B>-height</B></A></DT>
|
||||
<DD>
|
||||
|
||||
Specifies the desired height for the listbox in units of <B>deltay</B> pixels.
|
||||
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="-multicolumn"><B>-multicolumn</B></A></DT>
|
||||
<DD>
|
||||
|
||||
Specifies wether or not ListBox layouts items in order to see each one vertically.
|
||||
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="-padx"><B>-padx</B></A></DT>
|
||||
<DD>
|
||||
|
||||
Specifies distance between image or window and text of the items.
|
||||
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="-redraw"><B>-redraw</B></A></DT>
|
||||
<DD>
|
||||
|
||||
Specifies wether or not the listbox should be redrawn when entering idle.
|
||||
Set it to false if you call <B>update</B> while modifying the listbox.
|
||||
|
||||
</DD>
|
||||
</DL>
|
||||
|
||||
<DL><DT><A NAME="-selectfill"><B>-selectfill (read-only)</B></A></DT>
|
||||
<DD>
|
||||
If true, the listbox will draw a selection rectangle that fills the
|
||||
listbox from left-to-right instead of just drawing a box around the
|
||||
selected item. This more closely mimics the standard Tk listbox.
|
||||
</DD>
|
||||
</DL>
|
||||
|
||||
<DL><DT><A NAME="-selectmode"><B>-selectmode</B></A></DT>
|
||||
<DD>
|
||||
|
||||
Specifies the desired selection-mode for the listbox. Must be one of
|
||||
<B>none</B>, <B>single</B> or <B>multiple</B>. <B>selectmode</B> <I>single</I>
|
||||
allows to select 1 item by its text or image. <B>selectmode</B> <I>multiple</I>
|
||||
allows to select multiple items by their text or image. For more info on
|
||||
selectmodes <I>single</I> or <I>multiple</I>, see the Tk <B>listbox</B>
|
||||
command. Default value for <B>selectmode</B> is <I>none</I>.
|
||||
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="-width"><B>-width</B></A></DT>
|
||||
<DD>
|
||||
|
||||
Specifies the desired width for the listbox in units of 8 pixels.
|
||||
|
||||
</DD>
|
||||
</DL>
|
||||
<HR WIDTH="50%"><BR>
|
||||
<B><A NAME="wc">WIDGET COMMAND</A></B><BR>
|
||||
<DL><DT><A NAME="bindImage"><I>pathName</I> <B>bindImage</B></A>
|
||||
<I>event</I>
|
||||
<I>script</I>
|
||||
</DT><DD>
|
||||
|
||||
This command associates a command to execute whenever the event
|
||||
sequence given by <I>event</I> occurs on the image of a item.
|
||||
The item idenfier on which the event occurs is appended to the command.
|
||||
|
||||
<p>
|
||||
Any occurrence of <b>%W</b> in <i>script</i> is substituted with the
|
||||
path of the listbox.
|
||||
</p>
|
||||
|
||||
</DD></DL>
|
||||
<DL><DT><A NAME="bindText"><I>pathName</I> <B>bindText</B></A>
|
||||
<I>event</I>
|
||||
<I>script</I>
|
||||
</DT><DD>
|
||||
|
||||
This command associates a command to execute whenever the event
|
||||
sequence given by <I>event</I> occurs on the label of a item.
|
||||
The item idenfier on which the event occurs is appended to the command.
|
||||
|
||||
<p>
|
||||
Any occurrence of <b>%W</b> in <i>script</i> is substituted with the
|
||||
path of the listbox.
|
||||
</p>
|
||||
|
||||
</DD></DL>
|
||||
<DL><DT><A NAME="cget"><I>pathName</I> <B>cget</B></A>
|
||||
<I>option</I>
|
||||
</DT><DD>
|
||||
|
||||
Returns the current value of the configuration option given by <I>option</I>.
|
||||
<I>Option</I> may have any of the values accepted by the creation command.
|
||||
</DD></DL>
|
||||
<DL><DT><A NAME="configure"><I>pathName</I> <B>configure</B></A>
|
||||
?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
|
||||
</DT><DD>
|
||||
|
||||
Query or modify the configuration options of the widget. If no <I>option</I> is specified,
|
||||
returns a list describing all of the available options for <I>pathName</I>.
|
||||
If <I>option</I> is specified with no <I>value</I>, then the command returns a list
|
||||
describing the one named <I>option</I> (this list will be identical to the corresponding
|
||||
sublist of the value returned if no <I>option</I> is specified). If one or
|
||||
more <I>option-value</I> pairs are specified, then the command modifies the given widget
|
||||
option(s) to have the given value(s); in this case the command returns an empty string.
|
||||
<I>Option</I> may have any of the values accepted by the creation command.
|
||||
Read-only options are not be modified.
|
||||
|
||||
</DD></DL>
|
||||
<DL><DT><A NAME="delete"><I>pathName</I> <B>delete</B></A>
|
||||
?<I>arg...</I>?
|
||||
</DT><DD>
|
||||
|
||||
Deletes all items in <I>arg</I>. <I>arg</I> can be a list
|
||||
of items or a list of list of items.
|
||||
To delete all items, do <I>$pathName delete [$pathName items]</I>.
|
||||
|
||||
</DD></DL>
|
||||
<DL><DT><A NAME="edit"><I>pathName</I> <B>edit</B></A>
|
||||
<I>item</I>
|
||||
<I>text</I>
|
||||
?<I>verifycmd</I>?
|
||||
?<I>clickres</I>?
|
||||
?<I>select</I>?
|
||||
</DT><DD>
|
||||
|
||||
Provides a way for the user to edit in place the label of an item.
|
||||
<BR>The command takes the initial text as argument and does not modify the label of the
|
||||
edited node, but returns an empty string if edition is canceled, or the typed text
|
||||
if edition is accepted.
|
||||
<BR>When editing, the user can cancel by pressing Escape, or accept by pressing Return.
|
||||
<BR><I>clickres</I> specifies what to do if the user click outside the editable area.
|
||||
If <I>clickres</I> is 0 (the default), the edition is canceled.
|
||||
If <I>clickres</I> is 1, the edition is accepted.
|
||||
In all other case, the edition continues.
|
||||
<BR>If edition is accepted and <I>modifycmd</I> is not empty, then it is called with
|
||||
the new text as argument and must return 1 to accept the new text, 0 to refuse it
|
||||
and continue edition.
|
||||
<BR><I>select</I> specifies wether or not the initial text should be selected. Default is 1.
|
||||
|
||||
</DD></DL>
|
||||
<DL><DT><A NAME="exists"><I>pathName</I> <B>exists</B></A>
|
||||
<I>item</I>
|
||||
</DT><DD>
|
||||
|
||||
Returns 1 if <I>item</I> exists in the listbox, else 0.
|
||||
|
||||
</DD></DL>
|
||||
<DL><DT><A NAME="index"><I>pathName</I> <B>index</B></A>
|
||||
<I>item</I>
|
||||
</DT><DD>
|
||||
|
||||
Returns the position of <I>item</I> in the list.
|
||||
|
||||
</DD></DL>
|
||||
<DL><DT><A NAME="insert"><I>pathName</I> <B>insert</B></A>
|
||||
<I>index</I>
|
||||
<I>item</I>
|
||||
?<I>option value...</I>?
|
||||
</DT><DD>
|
||||
|
||||
<p>
|
||||
Inserts a new item identified by <I>item</I> in the list at position <I>index</I>.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Any instance of <i>#auto</i> within the item name will be replaced by the
|
||||
number of the item in the order of insertion.
|
||||
</p>
|
||||
|
||||
<P>
|
||||
<DL><DT><A NAME="Item-data"><B>-data</B></A></DT>
|
||||
<DD>
|
||||
|
||||
User data associated to the item.
|
||||
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="Item-fill"><B>-fill</B></A></DT>
|
||||
<DD>
|
||||
|
||||
Specifies the foreground color of the label of the item.
|
||||
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="Item-font"><B>-font</B></A></DT>
|
||||
<DD>
|
||||
|
||||
Specifies a font for the label of the item.
|
||||
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="Item-image"><B>-image</B></A></DT>
|
||||
<DD>
|
||||
|
||||
Specifies an image to display at the left of the label of the item.
|
||||
<B>window</B> option override <B>image</B>.
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="Item-indent"><B>-indent</B></A></DT>
|
||||
<DD>
|
||||
|
||||
Specifies the amount of extra space in pixels at the left of the item.
|
||||
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="Item-text"><B>-text</B></A></DT>
|
||||
<DD>
|
||||
|
||||
Specifies the label of the item.
|
||||
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="Item-window"><B>-window</B></A></DT>
|
||||
<DD>
|
||||
|
||||
Specifies a pathname to display at the left of the label of the item.
|
||||
<B>window</B> option override <B>image</B>.
|
||||
</DD>
|
||||
</DL>
|
||||
</DD></DL>
|
||||
<DL><DT><A NAME="item"><I>pathName</I> <B>item</B></A>
|
||||
<I>first</I>
|
||||
?<I>last</I>?
|
||||
</DT><DD>
|
||||
|
||||
<B>Its use is deprecated. Use <I>items</I> instead.</B><BR>
|
||||
If <I>last</I> is omitted, returns the item at index <I>first</I> in the list,
|
||||
or an empty string if <I>first</I> refers to a non-existent element.
|
||||
If <I>last</I> is specified, the command returns a list whose elements are all
|
||||
of the items between <I>first</I> and <I>last</I>, inclusive.
|
||||
Both <I>first</I> and <I>last</I> may have any of the standard forms for indices.
|
||||
|
||||
</DD></DL>
|
||||
<DL><DT><A NAME="itemcget"><I>pathName</I> <B>itemcget</B></A>
|
||||
<I>item</I>
|
||||
<I>option</I>
|
||||
</DT><DD>
|
||||
|
||||
Returns the current value of a configuration option for the item.
|
||||
<I>Option</I> may have any of the values accepted by the item creation command.
|
||||
|
||||
</DD></DL>
|
||||
<DL><DT><A NAME="itemconfigure"><I>pathName</I> <B>itemconfigure</B></A>
|
||||
<I>item</I>
|
||||
?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
|
||||
</DT><DD>
|
||||
|
||||
This command is similar to the <B>configure</B> command, except that it applies to the
|
||||
options for an individual item, whereas <B>configure</B> applies to the options for
|
||||
the widget as a whole. <B>Options</B> may have any of the values accepted by the
|
||||
item creation widget command. If options are specified, options are modified as indicated
|
||||
in the command and the command returns an empty string. If no options are specified,
|
||||
returns a list describing the current options for the item.
|
||||
Read-only options are not be modified.
|
||||
|
||||
</DD></DL>
|
||||
<DL><DT><A NAME="items"><I>pathName</I> <B>items</B></A>
|
||||
?<I>first</I>?
|
||||
?<I>last</I>?
|
||||
</DT><DD>
|
||||
|
||||
If <I>first</I> and <I>last</I> are omitted, returns the list of all items.
|
||||
If <I>first</I> is specified and <I>last</I> omitted, returns the item at index
|
||||
<I>first</I>, or an empty string if <I>first</I> refers to a non-existent element.
|
||||
If <I>first</I> and <I>last</I> are specified, the command returns a list whose elements
|
||||
are all of the items between <I>first</I> and <I>last</I>,
|
||||
inclusive. Both <I>first</I> and <I>last</I> may have any of the standard
|
||||
forms for indices.
|
||||
|
||||
</DD></DL>
|
||||
<DL><DT><A NAME="move"><I>pathName</I> <B>move</B></A>
|
||||
<I>item</I>
|
||||
<I>index</I>
|
||||
</DT><DD>
|
||||
|
||||
Moves <I>item</I> at position <I>index</I> in the list.
|
||||
|
||||
</DD></DL>
|
||||
<DL><DT><A NAME="reorder"><I>pathName</I> <B>reorder</B></A>
|
||||
<I>neworder</I>
|
||||
</DT><DD>
|
||||
|
||||
Modifies the order of items in the listbox given by <I>neworder</I>. Items that do not
|
||||
appear in <I>neworder</I> are no moved.
|
||||
|
||||
</DD></DL>
|
||||
<DL><DT><A NAME="see"><I>pathName</I> <B>see</B></A>
|
||||
<I>item</I>
|
||||
</DT><DD>
|
||||
|
||||
Arrange the scrolling area to make <I>item</I> visible.
|
||||
|
||||
</DD></DL>
|
||||
<DL><DT><A NAME="selection"><I>pathName</I> <B>selection</B></A>
|
||||
<I>cmd</I>
|
||||
?<I>arg...</I>?
|
||||
</DT><DD>
|
||||
|
||||
Modifies the list of selected items following <I>cmd</I>:
|
||||
<DL>
|
||||
<DT><B>clear</B>
|
||||
<DD>remove all items of the selection.
|
||||
<DT><B>set</B>
|
||||
<DD>set the selection to all items in <I>arg</I>
|
||||
<DT><B>add</B>
|
||||
<DD>add all items of <I>arg</I> in the selection
|
||||
<DT><B>remove</B>
|
||||
<DD>remove all items of <I>arg</I> of the selection
|
||||
<DT><B>get</B>
|
||||
<DD>return the current selected items
|
||||
</DL>
|
||||
|
||||
</DD></DL>
|
||||
<DL><DT><A NAME="xview"><I>pathName</I> <B>xview</B></A>
|
||||
?<I>arg...</I>?
|
||||
</DT><DD>
|
||||
|
||||
Standard command to enable horizontal scrolling of <I>pathName</I>.
|
||||
|
||||
</DD></DL>
|
||||
<DL><DT><A NAME="yview"><I>pathName</I> <B>yview</B></A>
|
||||
?<I>arg...</I>?
|
||||
</DT><DD>
|
||||
|
||||
Standard command to enable vertical scrolling of <I>pathName</I>.
|
||||
|
||||
</DD></DL>
|
||||
|
||||
|
||||
<b>BINDINGS</b>
|
||||
|
||||
<p>
|
||||
A <b><<ListboxSelect>></b> virtual event is generated any time the
|
||||
selection in the listbox changes.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
The listbox has all the standard mouse wheel bindings when it has focus.
|
||||
</p>
|
||||
</p>
|
||||
</BODY></HTML>
|
302
R_portable/R/App/R-portable/Tcl/bin64/lib/bwidget-1.9.12/BWman/MainFrame.html
Executable file
@ -0,0 +1,302 @@
|
||||
<HTML>
|
||||
<HEAD><TITLE>MainFrame</TITLE></HEAD>
|
||||
<BODY BGCOLOR=white>
|
||||
<DL><DT><I><A HREF="#descr">NAME</A></I></DT>
|
||||
<DD><B>MainFrame</B>
|
||||
- Manage toplevel with menu, toolbar and statusbar
|
||||
</DD></DL>
|
||||
<DL>
|
||||
<DT><I>CREATION</I></DT>
|
||||
<DD><A HREF="#descr"><B>MainFrame</B></A> <I>pathName</I> ?<I>option value...</I>?</DD>
|
||||
</DL>
|
||||
<DL>
|
||||
<DT><I><A HREF="ProgressBar.html">OPTIONS from <B>ProgressBar</B></A></I></DT>
|
||||
<DD><TABLE CELLSPACING=0 CELLPADDING=0 BORDER=0>
|
||||
<TR>
|
||||
<TD> -background or -bg</TD>
|
||||
<TD> -progressfg (see <B>-foreground</B>)</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> -progressmax (see <B>-maximum</B>)</TD>
|
||||
<TD> -progresstype (see <B>-type</B>)</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> -progressvar (see <B>-variable</B>)</TD>
|
||||
</TR>
|
||||
</TABLE></DD>
|
||||
</DL>
|
||||
<DL>
|
||||
<DT><I><A HREF="#wso">WIDGET-SPECIFIC OPTIONS</A></I></DT>
|
||||
<DD><TABLE CELLSPACING=0 CELLSPACING=0 BORDER=0>
|
||||
<TR>
|
||||
<TD> <A HREF="#-height">-height</A></TD></TR>
|
||||
<TR>
|
||||
<TD> <A HREF="#-menu">-menu</A></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> <A HREF="#-separator">-separator</A></TD></TR>
|
||||
<TR>
|
||||
<TD> <A HREF="#-textvariable">-textvariable</A></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> <A HREF="#-width">-width</A></TD></TR>
|
||||
<TD> <A HREF="#-sizegrip">-sizegrip</A></TR>
|
||||
</TABLE></DD>
|
||||
</DL>
|
||||
<DL>
|
||||
<DT><I><A HREF="#wc">WIDGET COMMAND</A></I></DT>
|
||||
<DD><I>pathName</I> <A HREF="#addindicator"><B>addindicator</B></A>
|
||||
?<I>arg...</I>?
|
||||
</DD>
|
||||
<DD><I>pathName</I> <A HREF="#addtoolbar"><B>addtoolbar</B></A>
|
||||
</DD>
|
||||
<DD><I>pathName</I> <A HREF="#cget"><B>cget</B></A>
|
||||
<I>option</I>
|
||||
</DD>
|
||||
<DD><I>pathName</I> <A HREF="#configure"><B>configure</B></A>
|
||||
?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
|
||||
</DD>
|
||||
<DD><I>pathName</I> <A HREF="#getframe"><B>getframe</B></A>
|
||||
</DD>
|
||||
<DD><I>pathName</I> <A HREF="#getindicator"><B>getindicator</B></A>
|
||||
<I>index</I>
|
||||
</DD>
|
||||
<DD><I>pathName</I> <A HREF="#getmenu"><B>getmenu</B></A>
|
||||
<I>menuid</I>
|
||||
</DD>
|
||||
<DD><I>pathName</I> <A HREF="#gettoolbar"><B>gettoolbar</B></A>
|
||||
<I>index</I>
|
||||
</DD>
|
||||
<DD><I>pathName</I> <A HREF="#setmenustate"><B>setmenustate</B></A>
|
||||
<I>tag</I>
|
||||
<I>state</I>
|
||||
</DD>
|
||||
<DD><I>pathName</I> <A HREF="#showstatusbar"><B>showstatusbar</B></A>
|
||||
<I>name</I>
|
||||
</DD>
|
||||
<DD><I>pathName</I> <A HREF="#showtoolbar"><B>showtoolbar</B></A>
|
||||
<I>index</I>
|
||||
<I>bool</I>
|
||||
</DD>
|
||||
</DL>
|
||||
<BR><HR WIDTH="100%"><BR>
|
||||
<B><A NAME="descr"></A>DESCRIPTION</B><BR>
|
||||
<P>
|
||||
|
||||
MainFrame manage toplevel to have:<BR>
|
||||
<UL>
|
||||
<LI>simple menu creation, with automatic accelerator bindings and
|
||||
<A HREF="DynamicHelp.html">DynamicHelp</A> association,</LI>
|
||||
<LI>one or more toolbars that user can hide,</LI>
|
||||
<LI>a status bar, displaying a user message or a menu description, and optionally a
|
||||
<A HREF="ProgressBar.html">ProgressBar</A>.</LI>
|
||||
</UL>
|
||||
</P>
|
||||
<BR><HR WIDTH="50%"><BR>
|
||||
<B><A NAME="wso">WIDGET-SPECIFIC OPTIONS</A></B><BR>
|
||||
<DL><DT><A NAME="-height"><B>-height</B></A></DT>
|
||||
<DD>
|
||||
|
||||
Specifies the desired height for the user frame in any of the forms acceptable to
|
||||
Tk_GetPixels. If this option is less than or equal to zero (the default) then the window
|
||||
will not request any size at all.
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="-menu"><B>-menu (read-only)</B></A></DT>
|
||||
<DD>
|
||||
|
||||
This option describes the menu. This is a list whose each five elements describe
|
||||
one cascade menu. It has the following form:
|
||||
{<I>menuname</I> <I>tags</I> <I>menuId</I> <I>tearoff</I> <I>menuentries</I>...}
|
||||
where <I>menuentries</I> is a list where each element describe one menu entry, which can be:
|
||||
<UL>
|
||||
<LI>for a separator:<BR>
|
||||
{<B>separator</B>}</LI>
|
||||
<LI>for a command:<BR>
|
||||
{<B>command</B> <I>menuname</I> ?<I>tags</I>? ?<I>description</I>? ?<I>accelerator</I>? ?<I>option</I> <I>value</I>? ...}</LI>
|
||||
<LI>for a check button:<BR>
|
||||
{<B>checkbutton</B> <I>menuname</I> ?<I>tags</I>? ?<I>description</I>? ?<I>accelerator</I>? ?<I>option</I> <I>value</I>? ...}</LI>
|
||||
<LI>for a radio button:<BR>
|
||||
{<B>radiobutton</B> <I>menuname</I> ?<I>tags</I>? ?<I>description</I>? ?<I>accelerator</I> ?<I>option</I> <I>value</I>? ...}</LI>
|
||||
<LI>for a cascade menu:<BR>
|
||||
{<B>cascade</B> <I>menuname</I> <I>tags</I> <I>menuId</I> <I>tearoff</I> <I>menuentries</I>}</LI>
|
||||
</UL>
|
||||
where:
|
||||
<UL>
|
||||
<LI><I>menuname</I> is the name of the menu. If it contains a &, the following character
|
||||
is automatically converted to the corresponding <B>-underline</B> option of <B>menu add</B>
|
||||
command.</LI>
|
||||
<LI><I>tags</I> is the tags list for the entry, used for enabling or disabling menu
|
||||
entries with <B>MainFrame::setmenustate</B>.</LI>
|
||||
<LI><I>menuId</I> is an id for the menu, from which you can get menu pathname with
|
||||
<B>MainFrame::getmenu</B>.</LI>
|
||||
<LI><I>tearoff</I> specifies if menu has tearoff entry.</LI>
|
||||
<LI><I>description</I> specifies a string for <A HREF=\"DynamicHelp.html\">DynamicHelp</A>.</LI>
|
||||
<LI><I>accelerator</I> specifies a key sequence. It is a list of two elements, where the first
|
||||
is one of <B>Shift</B>, <B>Ctrl</B>, <B>Alt</B>, <B>CtrlAlt</B>, <B>Cmd</B>, or <B>ShiftCmd</B>, and the second as letter
|
||||
(see <A HREF="#-casesensitive">-casesensitive</A> option for interpretation), digit or
|
||||
a special key name.
|
||||
An accelerator string is build and corresponding binding set on the toplevel to invoke the
|
||||
menu entry.</LI>
|
||||
<LI><I>option value</I> specifies additionnal options for the entry (see <B>menu add</B>
|
||||
command).</LI>
|
||||
</UL>
|
||||
Each value enclosed by ? are optional and defaulted to empty string, but must be
|
||||
provided if one or more following options is not empty.
|
||||
<BR>Example:
|
||||
<PRE>
|
||||
set descmenu {
|
||||
"&File" {} {} 0 {
|
||||
{command "&New" {} "Create a new document" {Ctrl n} -command Menu::new}
|
||||
{command "&Open..." {} "Open an existing document" {Ctrl o} -command Menu::open}
|
||||
{command "&Save" open "Save the document" {Ctrl s} -command Menu::save}
|
||||
{cascade "&Export" {} export 0 {
|
||||
{command "Format &1" open "Export document to format 1" {} -command {Menu::export 1}}
|
||||
{command "Format &2" open "Export document to format 2" {} -command {Menu::export 2}}
|
||||
}}
|
||||
{separator}
|
||||
{cascade "&Recent files" {} recent 0 {}}
|
||||
{separator}
|
||||
{command "E&xit" {} "Exit the application" {} -command Menu::exit}
|
||||
}
|
||||
"&Options" {} {} 0 {
|
||||
{checkbutton "Toolbar" {} "Show/hide toolbar" {}
|
||||
-variable Menu::_drawtoolbar
|
||||
-command {$Menu::_mainframe showtoolbar toolbar $Menu::_drawtoolbar}
|
||||
}
|
||||
}
|
||||
}
|
||||
</PRE>
|
||||
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="-separator"><B>-separator (read-only)</B></A></DT>
|
||||
<DD>
|
||||
|
||||
Specifies if separator should be drawn at the top and/or at the bottom of the user window.
|
||||
Must be one of the values <B>none</B>, <B>top</B>, <B>bottom</B> or <B>both</B>.
|
||||
It depends on the relief of subwidgets of user window.
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="-textvariable"><B>-textvariable</B></A></DT>
|
||||
<DD>
|
||||
|
||||
Specifies the textvariable option for the label of the status bar.
|
||||
<A HREF="DynamicHelp.html">DynamicHelp</A> description
|
||||
of menu entries are mapped to this variable at the creation of the MainFrame.
|
||||
If this variable is changed by MainFrame::configure, menu description will
|
||||
not be available.
|
||||
<BR>You change the text of the label by modifying the value of the variable.
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="-width"><B>-width</B></A></DT>
|
||||
<DD>
|
||||
|
||||
Specifies the desired width for the user frame in any of the forms acceptable to
|
||||
Tk_GetPixels. If this option is less than or equal to zero (the default) then the window
|
||||
will not request any size at all.
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="-sizegrip"><B>-sizegrip (themed, read-only)</B></A></DT>
|
||||
<DD>
|
||||
|
||||
If bool argument is true and themed mode, show a ttk sizegrip widget in the lower-right corner.
|
||||
</DD>
|
||||
<HR WIDTH="50%"><BR>
|
||||
<B><A NAME="wc">WIDGET COMMAND</A></B><BR>
|
||||
<DL><DT><A NAME="addindicator"><I>pathName</I> <B>addindicator</B></A>
|
||||
?<I>arg...</I>?
|
||||
</DT><DD>
|
||||
|
||||
Add an indicator box at the right of the status bar. Each indicator are added from left
|
||||
to right. An indicator is a Tk label widget configured with option-value pair
|
||||
given by ?<I>arg...</I>?. <B>-relief</B> and <B>-borderwidth</B> options are respetively
|
||||
defaulted to <I>sunken</I> and 1. Returns the pathname of the created label.
|
||||
</DD></DL>
|
||||
<DL><DT><A NAME="addtoolbar"><I>pathName</I> <B>addtoolbar</B></A>
|
||||
</DT><DD>
|
||||
|
||||
Add a toolbar to the MainFrame. Returns the pathname of the new window where to place
|
||||
toolbar items.
|
||||
</DD></DL>
|
||||
<DL><DT><A NAME="cget"><I>pathName</I> <B>cget</B></A>
|
||||
<I>option</I>
|
||||
</DT><DD>
|
||||
|
||||
Returns the current value of the configuration option given by <I>option</I>.
|
||||
<I>Option</I> may have any of the values accepted by the creation command.
|
||||
</DD></DL>
|
||||
<DL><DT><A NAME="configure"><I>pathName</I> <B>configure</B></A>
|
||||
?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
|
||||
</DT><DD>
|
||||
|
||||
Query or modify the configuration options of the widget. If no <I>option</I> is specified,
|
||||
returns a list describing all of the available options for <I>pathName</I>.
|
||||
If <I>option</I> is specified with no <I>value</I>, then the command returns a list
|
||||
describing the one named <I>option</I> (this list will be identical to the corresponding
|
||||
sublist of the value returned if no <I>option</I> is specified). If one or
|
||||
more <I>option-value</I> pairs are specified, then the command modifies the given widget
|
||||
option(s) to have the given value(s); in this case the command returns an empty string.
|
||||
<I>Option</I> may have any of the values accepted by the creation command.
|
||||
Read-only options are not be modified.
|
||||
|
||||
</DD></DL>
|
||||
<DL><DT><A NAME="getframe"><I>pathName</I> <B>getframe</B></A>
|
||||
</DT><DD>
|
||||
|
||||
Returns the pathname of the user window.
|
||||
</DD></DL>
|
||||
<DL><DT><A NAME="getindicator"><I>pathName</I> <B>getindicator</B></A>
|
||||
<I>index</I>
|
||||
</DT><DD>
|
||||
|
||||
Returns the pathname of the <I>index</I>th added indicator.
|
||||
</DD></DL>
|
||||
<DL><DT><A NAME="getmenu"><I>pathName</I> <B>getmenu</B></A>
|
||||
<I>menuid</I>
|
||||
</DT><DD>
|
||||
|
||||
Returns the pathname of the menu whose id is <I>menuid</I>.
|
||||
</DD></DL>
|
||||
<DL><DT><A NAME="getmenustate"><I>pathName</I> <B>getmenustate</B></A>
|
||||
<I>tag</I>
|
||||
<I>state</I>
|
||||
</DT><DD>
|
||||
|
||||
Returns the state of the given menu <I>tag</I>.
|
||||
</DD></DL>
|
||||
<DL><DT><A NAME="gettoolbar"><I>pathName</I> <B>gettoolbar</B></A>
|
||||
<I>index</I>
|
||||
</DT><DD>
|
||||
|
||||
Returns the pathname of the <I>index</I>th added toolbar.
|
||||
</DD></DL>
|
||||
<DL><DT><A NAME="setmenustate"><I>pathName</I> <B>setmenustate</B></A>
|
||||
<I>tag</I>
|
||||
<I>state</I>
|
||||
</DT><DD>
|
||||
|
||||
Set the <B>-state</B> option value of all the menu entries that have the tag <I>tag</I>
|
||||
to <I>state</I>.
|
||||
A menu entry is disabled, if one of its associated tags have state <B>disabled</B>.
|
||||
|
||||
</DD></DL>
|
||||
<DL><DT><A NAME="showstatusbar"><I>pathName</I> <B>showstatusbar</B></A>
|
||||
<I>name</I>
|
||||
</DT><DD>
|
||||
|
||||
<I>name</I> is one of <B>none</B>, <B>status</B> or <B>progression</B>.
|
||||
Use <B>none</B> to hide the status bar, <B>status</B> to display the label only, or
|
||||
<B>progression</B> to display the label and the
|
||||
<A HREF="ProgressBar.html">ProgressBar</A>.
|
||||
</DD></DL>
|
||||
<DL><DT><A NAME="showtoolbar"><I>pathName</I> <B>showtoolbar</B></A>
|
||||
<I>index</I>
|
||||
<I>bool</I>
|
||||
</DT><DD>
|
||||
|
||||
Hide if <I>bool</I> is 0, or show if <I>bool</I> is 1 the <I>index</I>th added toolbar.
|
||||
To prevent your toplevel from resizing while hiding/showing toolbar,
|
||||
do [wm geometry $top [wm geometry $top]] when it is managed.
|
||||
</DD></DL>
|
||||
</BODY></HTML>
|
221
R_portable/R/App/R-portable/Tcl/bin64/lib/bwidget-1.9.12/BWman/MessageDlg.html
Executable file
@ -0,0 +1,221 @@
|
||||
<HTML>
|
||||
<HEAD><TITLE>MessageDlg</TITLE></HEAD>
|
||||
<BODY BGCOLOR=white>
|
||||
<DL><DT><I><A HREF="#descr">NAME</A></I></DT>
|
||||
<DD><B>MessageDlg</B>
|
||||
- Message dialog box
|
||||
</DD></DL>
|
||||
<DL>
|
||||
<DT><I>CREATION</I></DT>
|
||||
<DD><A HREF="#descr"><B>MessageDlg</B></A> <I>pathName</I> ?<I>option value...</I>?</DD>
|
||||
</DL>
|
||||
<DL>
|
||||
<DT><I>STANDARD OPTIONS</I></DT>
|
||||
<DD><TABLE CELLSPACING=0 CELLSPACING=0 BORDER=0>
|
||||
<TR>
|
||||
<TD> <A HREF="options.htm#M-anchor">-anchor</A></TD>
|
||||
<TD> <A HREF="options.htm#M-font">-font</A></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> <A HREF="options.htm#M-foreground">-foreground or -fg</A></TD>
|
||||
<TD> <A HREF="options.htm#M-padx">-padx</A></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> <A HREF="options.htm#M-pady">-pady</A></TD>
|
||||
</TABLE></DD>
|
||||
</DL>
|
||||
<DL>
|
||||
<DT><I><A HREF="Dialog.html">OPTIONS from <B>Dialog</B></A></I></DT>
|
||||
<DD><TABLE CELLSPACING=0 CELLPADDING=0 BORDER=0>
|
||||
<TR>
|
||||
<TD> -background or -bg</TD>
|
||||
<TD> -cancel</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> -default</TD>
|
||||
<TD> -parent</TD>
|
||||
</TR>
|
||||
</TABLE></DD>
|
||||
</DL>
|
||||
<DL>
|
||||
<DT><I><A HREF="#wso">WIDGET-SPECIFIC OPTIONS</A></I></DT>
|
||||
<DD><TABLE CELLSPACING=0 CELLSPACING=0 BORDER=0>
|
||||
<TR>
|
||||
<TD> <A HREF="#-aspect">-aspect</A></TD>
|
||||
<TD> <A HREF="#-buttons">-buttons</A></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> <A HREF="#-buttonwidth">-buttonwidth</A></TD>
|
||||
<TD> <A HREF="#-icon">-icon</A></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> <A HREF="#-justify">-justify</A></TD>
|
||||
<TD> <A HREF="#-message">-message</A></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> <A HREF="#-title">-title</A></TD>
|
||||
<TD> <A HREF="#-type">-type</A></TD>
|
||||
<TR>
|
||||
<TD> <A HREF="#-width">-width</A></TD>
|
||||
</TR>
|
||||
</TR>
|
||||
</TABLE></DD>
|
||||
</DL>
|
||||
<BR><HR WIDTH="100%"><BR>
|
||||
<B><A NAME="descr"></A>DESCRIPTION</B><BR>
|
||||
<P>
|
||||
|
||||
MessageDlg provides a simple way to display a message dialog.
|
||||
MessageDlg::<B>create</B> creates the message dialog, displays
|
||||
it and return the index of the pressed button, or -1 if it is destroyed.
|
||||
When returning, the dialog no longer exists.
|
||||
|
||||
</P>
|
||||
<BR><HR WIDTH="50%"><BR>
|
||||
<B><A NAME="wso">WIDGET-SPECIFIC OPTIONS</A></B><BR>
|
||||
<DL><DT><A NAME="-aspect"><B>-aspect</B></A></DT>
|
||||
<DD>
|
||||
|
||||
Specifies a non-negative integer value indicating desired
|
||||
aspect ratio for the text. The aspect ratio is specified as
|
||||
100*width/height. 100 means the text should
|
||||
be as wide as it is tall, 200 means the text should
|
||||
be twice as wide as it is tall, 50 means the text should
|
||||
be twice as tall as it is wide, and so on.
|
||||
Used to choose line length for text if <B>width</B> option
|
||||
isn't specified.
|
||||
Defaults to 150.
|
||||
|
||||
The options <B>-width</B> and <B>-aspect</B> are directly heritated from the Tk message widget.
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="-buttons"><B>-buttons</B></A></DT>
|
||||
<DD>
|
||||
|
||||
Specifies a list of buttons to display when <B>type</B> option is <I>user</I>.
|
||||
If a button has a symbolic name, its associated text will be displayed.
|
||||
|
||||
</DD>
|
||||
</DL>
|
||||
|
||||
<DL><DT><A NAME="-buttonwidth"><B>-buttonwidth</B></A></DT>
|
||||
<DD>
|
||||
Specifies the standard width of the buttons in the dialog.
|
||||
</DD>
|
||||
</DL>
|
||||
|
||||
<DL><DT><A NAME="-icon"><B>-icon</B></A></DT>
|
||||
<DD>
|
||||
|
||||
Specifies an icon to display. Must be one of the following: <B>error</B>, <B>info</B>,
|
||||
<B>question</B> or <B>warning</B>.
|
||||
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="-justify"><B>-justify</B></A></DT>
|
||||
<DD>
|
||||
|
||||
Specifies how to justify lines of text.
|
||||
Must be one of <B>left</B>, <B>center</B>, or <B>right</B>. Defaults
|
||||
to <B>left</B>.
|
||||
This option works together with the <B>anchor</B>, <B>aspect</B>,
|
||||
<B>padx</B>, <B>pady</B>, and <B>width</B> options to provide a variety
|
||||
of arrangements of the text within the window.
|
||||
The <B>aspect</B> and <B>width</B> options determine the amount of
|
||||
screen space needed to display the text.
|
||||
The <B>anchor</B>, <B>padx</B>, and <B>pady</B> options determine where this
|
||||
rectangular area is displayed within the widget's window, and the
|
||||
<B>justify</B> option determines how each line is displayed within that
|
||||
rectangular region.
|
||||
For example, suppose <B>anchor</B> is <B>e</B> and <B>justify</B> is
|
||||
<B>left</B>, and that the message window is much larger than needed
|
||||
for the text.
|
||||
The the text will displayed so that the left edges of all the lines
|
||||
line up and the right edge of the longest line is <B>padx</B> from
|
||||
the right side of the window; the entire text block will be centered
|
||||
in the vertical span of the window.
|
||||
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="-message"><B>-message</B></A></DT>
|
||||
<DD>
|
||||
|
||||
Specifies the message to display in this message box.
|
||||
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="-title"><B>-title</B></A></DT>
|
||||
<DD>
|
||||
|
||||
Specifies a string to display as the title of the message box.
|
||||
If the value is empty (the default), a default title will be set corresponding
|
||||
to the <B>icon</B> option.
|
||||
The default associated title is in english, and can be modified to set it in
|
||||
another language by specifying the resource:
|
||||
<PRE> *MessageDlg.<I>name</I>Title: <I>value</I></PRE>
|
||||
or the equivalent tcl command:
|
||||
<PRE> option add *MessageDlg.<I>name</I>Title <I>value</I></PRE>
|
||||
where <I>name</I> is the name of an icon as defined in the <B>icon</B> option.
|
||||
<BR>For example, for french language, you can specify for a warning dialog:
|
||||
<PRE> option add *MessageDlg.warningTitle "Attention"</PRE>
|
||||
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="-type"><B>-type</B></A></DT>
|
||||
<DD>
|
||||
|
||||
Specifies a set of buttons to be displayed. The following values are possible:
|
||||
<DD>
|
||||
<P>
|
||||
<DL COMPACT>
|
||||
<DT>
|
||||
<B>abortretryignore</B>
|
||||
<DD>
|
||||
Displays three buttons whose symbolic names are <B>abort</B>,
|
||||
<B>retry</B> and <B>ignore</B>.<P>
|
||||
<DT>
|
||||
<B>ok</B>
|
||||
<DD>
|
||||
Displays one button whose symbolic name is <B>ok</B>.<P>
|
||||
<DT>
|
||||
<B>okcancel</B>
|
||||
<DD>
|
||||
Displays two buttons whose symbolic names are <B>ok</B> and <B>cancel</B>.<P>
|
||||
<DT>
|
||||
<B>retrycancel</B>
|
||||
<DD>
|
||||
Displays two buttons whose symbolic names are <B>retry</B> and <B>cancel</B>.<P>
|
||||
<DT>
|
||||
<B>yesno</B>
|
||||
<DD>
|
||||
Displays two buttons whose symbolic names are <B>yes</B> and <B>no</B>.<P>
|
||||
<DT>
|
||||
<B>yesnocancel</B>
|
||||
<DD>
|
||||
Displays three buttons whose symbolic names are <B>yes</B>, <B>no</B>
|
||||
and <B>cancel</B>.
|
||||
<P>
|
||||
<DT>
|
||||
<B>user</B>
|
||||
<DD>
|
||||
Displays buttons of <B>-buttons</B> option.<P>
|
||||
</DD>
|
||||
|
||||
<P>
|
||||
For any <B>-type</B> but <B>user</B>, the native Tk widget <B>tk_messageBox</B> is used.
|
||||
In this case, only the following options are considered: <B>-default</B>, <B>-icon</B>, <B>-message</B>, <B>-title</B> and <B>-type</B>.
|
||||
</P>
|
||||
</DL>
|
||||
<DL><DT><A NAME="-width"><B>-width</B></A></DT>
|
||||
<DD>
|
||||
|
||||
Specifies the length of lines in the window.
|
||||
If this option has a value greater than zero then the <B>aspect</B>
|
||||
option is ignored and the <B>width</B> option determines the line
|
||||
length.
|
||||
If this option has a value less than or equal to zero, then
|
||||
the <B>aspect</B> option determines the line length.
|
||||
|
||||
</DD>
|
||||
</DL>
|
||||
</BODY></HTML>
|
483
R_portable/R/App/R-portable/Tcl/bin64/lib/bwidget-1.9.12/BWman/NoteBook.html
Executable file
@ -0,0 +1,483 @@
|
||||
<HTML>
|
||||
<HEAD><TITLE>NoteBook</TITLE></HEAD>
|
||||
<BODY BGCOLOR=white>
|
||||
<DL><DT><I><A HREF="#descr">NAME</A></I></DT>
|
||||
<DD><B>NoteBook</B>
|
||||
- Notebook manager widget
|
||||
</DD></DL>
|
||||
<DL>
|
||||
<DT><I>CREATION</I></DT>
|
||||
<DD><A HREF="#descr"><B>NoteBook</B></A> <I>pathName</I> ?<I>option value...</I>?</DD>
|
||||
</DL>
|
||||
<DL>
|
||||
<DT><I>STANDARD OPTIONS</I></DT>
|
||||
<DD><TABLE CELLSPACING=0 CELLSPACING=0 BORDER=0>
|
||||
<TR>
|
||||
<TD> <A HREF="options.htm#M-font">-font</A></TR>
|
||||
</TABLE></DD>
|
||||
</DL>
|
||||
<DL>
|
||||
<DT><I><A HREF="ArrowButton.html">OPTIONS from <B>ArrowButton</B></A></I></DT>
|
||||
<DD><TABLE CELLSPACING=0 CELLPADDING=0 BORDER=0>
|
||||
<TR>
|
||||
<TD> -activebackground</TD>
|
||||
<TD> -activeforeground</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> -background or -bg</TD>
|
||||
<TD> -borderwidth or -bd</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> -disabledforeground</TD>
|
||||
<TD> -foreground or -fg</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> -repeatdelay</TD>
|
||||
<TD> -repeatinterval</TD>
|
||||
</TR>
|
||||
</TABLE></DD>
|
||||
</DL>
|
||||
<DL>
|
||||
<DT><I><A HREF="#wso">WIDGET-SPECIFIC OPTIONS</A></I></DT>
|
||||
<DD><TABLE CELLSPACING=0 CELLSPACING=0 BORDER=0>
|
||||
<TR>
|
||||
<TD> <A HREF="#-arcradius">-arcradius</A></TD>
|
||||
<TD> <A HREF="#-height">-height</A></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> <A HREF="#-homogeneous">-homogeneous</A></TD>
|
||||
<TD> <A HREF="#-internalborderwidth">-internalborderwidth or -ibd</A></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> <A HREF="#-side">-side</A></TD>
|
||||
<TD> <A HREF="#-tabbevelsize">-tabbevelsize</A></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> <A HREF="#-tabpady">-tabpady</A></TD>
|
||||
<TD> <A HREF="#-width">-width</A></TD>
|
||||
</TR>
|
||||
</TABLE></DD>
|
||||
</DL>
|
||||
<DL>
|
||||
<DT><I><A HREF="#wc">WIDGET COMMAND</A></I></DT>
|
||||
<DD><I>pathName</I> <A HREF="#bindtabs"><B>bindtabs</B></A>
|
||||
<I>event</I>
|
||||
<I>script</I>
|
||||
</DD>
|
||||
<DD><I>pathName</I> <A HREF="#cget"><B>cget</B></A>
|
||||
<I>option</I>
|
||||
</DD>
|
||||
<DD><I>pathName</I> <A HREF="#compute_size"><B>compute_size</B></A>
|
||||
</DD>
|
||||
<DD><I>pathName</I> <A HREF="#configure"><B>configure</B></A>
|
||||
?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
|
||||
</DD>
|
||||
<DD><I>pathName</I> <A HREF="#delete"><B>delete</B></A>
|
||||
<I>page</I>
|
||||
?<I>destroyframe</I>?
|
||||
</DD>
|
||||
<DD><I>pathName</I> <A HREF="#getframe"><B>getframe</B></A>
|
||||
<I>page</I>
|
||||
</DD>
|
||||
<DD><I>pathName</I> <A HREF="#index"><B>index</B></A>
|
||||
<I>page</I>
|
||||
</DD>
|
||||
<DD><I>pathName</I> <A HREF="#insert"><B>insert</B></A>
|
||||
<I>index</I>
|
||||
<I>page</I>
|
||||
?<I>option value...</I>?
|
||||
</DD>
|
||||
<DD><I>pathName</I> <A HREF="#itemcget"><B>itemcget</B></A>
|
||||
<I>page</I>
|
||||
<I>option</I>
|
||||
</DD>
|
||||
<DD><I>pathName</I> <A HREF="#itemconfigure"><B>itemconfigure</B></A>
|
||||
<I>page</I>
|
||||
?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
|
||||
</DD>
|
||||
<DD><I>pathName</I> <A HREF="#move"><B>move</B></A>
|
||||
<I>page</I>
|
||||
<I>index</I>
|
||||
</DD>
|
||||
<DD><I>pathName</I> <A HREF="#page"><B>page</B></A>
|
||||
<I>first</I>
|
||||
?<I>last</I>?
|
||||
</DD>
|
||||
<DD><I>pathName</I> <A HREF="#pages"><B>pages</B></A>
|
||||
?<I>first</I>?
|
||||
?<I>last</I>?
|
||||
</DD>
|
||||
<DD><I>pathName</I> <A HREF="#raise"><B>raise</B></A>
|
||||
?<I>page</I>?
|
||||
</DD>
|
||||
<DD><I>pathName</I> <A HREF="#see"><B>see</B></A>
|
||||
<I>page</I>
|
||||
</DD>
|
||||
</DL>
|
||||
<BR><HR WIDTH="100%"><BR>
|
||||
<B><A NAME="descr"></A>DESCRIPTION</B><BR>
|
||||
<P>
|
||||
|
||||
The NoteBook widget manages a set of pages and displays one of them. A page
|
||||
is a <B>frame</B> or <B>ttk::frame</B> that is included in the NoteBook by its
|
||||
<A HREF="#insert"><B>insert</B></A> command. Each page is associated with a tab;
|
||||
the tabs are displayed in a band either above or below the pages, depending on
|
||||
the value of the option <A HREF="#-side">-side</A>.
|
||||
|
||||
</P>
|
||||
<BR><HR WIDTH="50%"><BR>
|
||||
<B><A NAME="wso">WIDGET-SPECIFIC OPTIONS</A></B><BR>
|
||||
<DL><DT><A NAME="-arcradius"><B>-arcradius</B></A></DT>
|
||||
<DD>
|
||||
|
||||
Specifies the amount of rounding effect at the corners of a tab. This value
|
||||
can be adjusted from 0 to 8 pixels with the default being 2 pixels. Usually,
|
||||
small values are preferable.
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="-height"><B>-height</B></A></DT>
|
||||
<DD>
|
||||
|
||||
Specifies the desired height for the pages. If this option is equal to zero (the default)
|
||||
then the window will not request any size at all.
|
||||
In this case, user may want to call NoteBook::<B>compute_size</B> to make NoteBook larger
|
||||
enough to contains the largest page.
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="-homogeneous"><B>-homogeneous</B></A></DT>
|
||||
<DD>
|
||||
|
||||
Specifies whether or not the label of the pages must have the same width.
|
||||
|
||||
</DD>
|
||||
</DL>
|
||||
|
||||
<DL><DT><A NAME="-internalborderwidth"><B>-internalborderwidth</B> or <B>-ibd</B></A></DT>
|
||||
<DD>
|
||||
|
||||
Value that is applied to each page in the NoteBook as its <B>-borderwidth</B> or <B>-bd</B>.
|
||||
|
||||
</DD>
|
||||
</DL>
|
||||
|
||||
|
||||
<DL><DT><A NAME="-side"><B>-side</B></A></DT>
|
||||
<DD>
|
||||
|
||||
Specifies the side where to place the label of the pages. Must be one
|
||||
of <B>top</B> or <B>bottom</B>.
|
||||
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="-tabbevelsize"><B>-tabbevelsize</B></A></DT>
|
||||
<DD>
|
||||
|
||||
Specifies the amount of bevel the tabs should have. This value can be adjusted from
|
||||
0 to 8 pixels with the default being 0 pixels. A zero pixel bevel is essentially rectangular
|
||||
while non-zero bevel size will look trapezoidal.
|
||||
</DD>
|
||||
</DL>
|
||||
|
||||
<DL><DT><A NAME="-tabpady"><B>-tabpady</B></A></DT>
|
||||
<DD>
|
||||
Specifies the padding between the text in the tab and the top and bottom
|
||||
of the tab. Padding may be a list of two values to specify padding for
|
||||
top and bottom separately. Padding defaults to {0 6}.
|
||||
</DD>
|
||||
</DL>
|
||||
|
||||
<DL><DT><A NAME="-width"><B>-width</B></A></DT>
|
||||
<DD>
|
||||
|
||||
Specifies the desired width for the pages. If this option is equal to zero (the default)
|
||||
then the window will not request any size at all.
|
||||
In this case, user may want to call NoteBook::<B>compute_size</B> to make NoteBook larger
|
||||
enough to contains the largest page.
|
||||
</DD>
|
||||
</DL>
|
||||
<HR WIDTH="50%"><BR>
|
||||
<B><A NAME="wc">WIDGET COMMAND</A></B><BR>
|
||||
<DL><DT><A NAME="bindtabs"><I>pathName</I> <B>bindtabs</B></A>
|
||||
<I>event</I>
|
||||
<I>script</I>
|
||||
</DT><DD>
|
||||
|
||||
This command associates a command to execute whenever the event
|
||||
sequence given by <I>event</I> occurs on a tab. The page identifier on which
|
||||
the event occurs is appended to the command.
|
||||
|
||||
</DD></DL>
|
||||
<DL><DT><A NAME="cget"><I>pathName</I> <B>cget</B></A>
|
||||
<I>option</I>
|
||||
</DT><DD>
|
||||
|
||||
Returns the current value of the configuration option given by <I>option</I>.
|
||||
<I>Option</I> may have any of the values accepted by the creation command.
|
||||
</DD></DL>
|
||||
<DL><DT><A NAME="compute_size"><I>pathName</I> <B>compute_size</B></A>
|
||||
</DT><DD>
|
||||
|
||||
This command can be called to make the NoteBook large enough to contain the largest page.
|
||||
Note that if all pages use -createcmd, they will have no requested size.
|
||||
|
||||
</DD></DL>
|
||||
<DL><DT><A NAME="configure"><I>pathName</I> <B>configure</B></A>
|
||||
?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
|
||||
</DT><DD>
|
||||
|
||||
Query or modify the configuration options of the widget. If no <I>option</I> is specified,
|
||||
returns a list describing all of the available options for <I>pathName</I>.
|
||||
If <I>option</I> is specified with no <I>value</I>, then the command returns a list
|
||||
describing the one named <I>option</I> (this list will be identical to the corresponding
|
||||
sublist of the value returned if no <I>option</I> is specified). If one or
|
||||
more <I>option-value</I> pairs are specified, then the command modifies the given widget
|
||||
option(s) to have the given value(s); in this case the command returns an empty string.
|
||||
<I>Option</I> may have any of the values accepted by the creation command.
|
||||
Read-only options are not be modified.
|
||||
|
||||
</DD></DL>
|
||||
<DL><DT><A NAME="delete"><I>pathName</I> <B>delete</B></A>
|
||||
<I>page</I>
|
||||
?<I>destroyframe</I>?
|
||||
</DT><DD>
|
||||
|
||||
Deletes the page <I>page</I>. If <I>destroyframe</I> is 1 (the default), the frame
|
||||
associated to <I>page</I> is destroyed. If <I>destroyframe</I> is 0, the frame is not
|
||||
destroyed and is reused by further call to <B>insert</B> with the same <I>page</I>.
|
||||
|
||||
</DD></DL>
|
||||
<DL><DT><A NAME="getframe"><I>pathName</I> <B>getframe</B></A>
|
||||
<I>page</I>
|
||||
</DT><DD>
|
||||
|
||||
Returns the pathname of the page <I>page</I>.
|
||||
|
||||
</DD></DL>
|
||||
<DL><DT><A NAME="index"><I>pathName</I> <B>index</B></A>
|
||||
<I>page</I>
|
||||
</DT><DD>
|
||||
|
||||
Return the numerical index corresponding to the item.
|
||||
|
||||
</DD></DL>
|
||||
<DL><DT><A NAME="insert"><I>pathName</I> <B>insert</B></A>
|
||||
<I>index</I>
|
||||
<I>page</I>
|
||||
?<I>option value...</I>?
|
||||
</DT><DD>
|
||||
|
||||
Insert a new page identified by <I>page</I> at position <I>index</I> in the pages list.
|
||||
<I>index</I> must be numeric or <B>end</B>. The pathname of the new page is returned.
|
||||
Dynamic help, if it is specified by the options, is
|
||||
displayed when the pointer hovers over the tab that belongs to the page.
|
||||
|
||||
<P>
|
||||
<DL><DT><A NAME="Page-activebackground"><B>-activebackground</B></A></DT>
|
||||
<DD>
|
||||
|
||||
Background color for the tab when it is active.
|
||||
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="Page-activeforeground"><B>-activeforeground</B></A></DT>
|
||||
<DD>
|
||||
|
||||
Color used for the tab's text when the tab is active.
|
||||
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="Page-background"><B>-background</B></A></DT>
|
||||
<DD>
|
||||
|
||||
Background color for the tab when it is not active.
|
||||
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="Page-createcmd"><B>-createcmd</B></A></DT>
|
||||
<DD>
|
||||
|
||||
Specifies a command to be called the first time the page is raised.
|
||||
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="Page-disabledforeground"><B>-disabledforeground</B></A></DT>
|
||||
<DD>
|
||||
|
||||
Color used for the tab's text when the tab is disabled.
|
||||
|
||||
</DD>
|
||||
</DL>
|
||||
|
||||
<DL><DT><A NAME="Page-foreground"><B>-foreground</B></A></DT>
|
||||
<DD>
|
||||
|
||||
Color used for the tab's text when the tab is neither active nor disabled.
|
||||
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="Page-helpcmd"><B>-helpcmd</B></A></DT>
|
||||
<DD>
|
||||
|
||||
Has no effect.
|
||||
See also <A HREF="DynamicHelp.html">DynamicHelp</A>.
|
||||
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="Page-helptext"><B>-helptext</B></A></DT>
|
||||
<DD>
|
||||
|
||||
Text for dynamic help. If empty, no help is available for this page.
|
||||
See also <A HREF="DynamicHelp.html">DynamicHelp</A>.
|
||||
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="Page-helptype"><B>-helptype</B></A></DT>
|
||||
<DD>
|
||||
|
||||
Type of dynamic help. Use <I>balloon</I> (the default for a NoteBook
|
||||
page) or <I>variable</I>.
|
||||
See also <A HREF="DynamicHelp.html">DynamicHelp</A>.
|
||||
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="Page-helpvar"><B>-helpvar</B></A></DT>
|
||||
<DD>
|
||||
|
||||
Variable to use when <B>-helptype</B> option is <I>variable</I>.
|
||||
See also <A HREF="DynamicHelp.html">DynamicHelp</A>.
|
||||
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="Page-image"><B>-image</B></A></DT>
|
||||
<DD>
|
||||
|
||||
Specifies an image to display for the page at the left of the label
|
||||
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="Page-leavecmd"><B>-leavecmd</B></A></DT>
|
||||
<DD>
|
||||
|
||||
Specifies a command to be called when a page is about to be leaved.
|
||||
The command must return 0 if the page can not be leaved, or 1 if it can.
|
||||
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="Page-ractiveimage"><B>-ractiveimage</B></A></DT>
|
||||
<DD>
|
||||
|
||||
Image to show on the right of the tab when the tab is active.
|
||||
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="Page-raisecmd"><B>-raisecmd</B></A></DT>
|
||||
<DD>
|
||||
|
||||
Specifies a command to be called each time the page is raised.
|
||||
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="Page-rimage"><B>-rimage</B></A></DT>
|
||||
<DD>
|
||||
|
||||
Image to show on the right of the tab when the tab is not active.
|
||||
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="Page-rimagecmd"><B>-rimagecmd</B></A></DT>
|
||||
<DD>
|
||||
|
||||
Specifies a command to be evaluated, with two arguments appended, when the
|
||||
image shown on the right of the tab is clicked. The first appended argument
|
||||
is the Tk window path of the NoteBook, the second is the name of the page.
|
||||
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="Page-state"><B>-state</B></A></DT>
|
||||
<DD>
|
||||
|
||||
Specifies the state of the page. Must be <B>normal</B> or <B>disabled</B>.
|
||||
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="Page-text"><B>-text</B></A></DT>
|
||||
<DD>
|
||||
|
||||
Specifies a label to display for the page.
|
||||
|
||||
</DD>
|
||||
</DL>
|
||||
</DD></DL>
|
||||
<DL><DT><A NAME="itemcget"><I>pathName</I> <B>itemcget</B></A>
|
||||
<I>page</I>
|
||||
<I>option</I>
|
||||
</DT><DD>
|
||||
|
||||
Returns the current value of a configuration option for the item.
|
||||
<I>Option</I> may have any of the values accepted by the item creation command.
|
||||
|
||||
</DD></DL>
|
||||
<DL><DT><A NAME="itemconfigure"><I>pathName</I> <B>itemconfigure</B></A>
|
||||
<I>page</I>
|
||||
?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
|
||||
</DT><DD>
|
||||
|
||||
This command is similar to the <B>configure</B> command, except that it applies to the
|
||||
options for an individual item, whereas <B>configure</B> applies to the options for
|
||||
the widget as a whole. <B>Options</B> may have any of the values accepted by the
|
||||
item creation widget command. If options are specified, options are modified as indicated
|
||||
in the command and the command returns an empty string. If no options are specified,
|
||||
returns a list describing the current options for the item.
|
||||
Read-only options are not be modified.
|
||||
|
||||
</DD></DL>
|
||||
<DL><DT><A NAME="move"><I>pathName</I> <B>move</B></A>
|
||||
<I>page</I>
|
||||
<I>index</I>
|
||||
</DT><DD>
|
||||
|
||||
Moves <I>page</I> tab to index <I>index</I>.
|
||||
|
||||
</DD></DL>
|
||||
<DL><DT><A NAME="page"><I>pathName</I> <B>page</B></A>
|
||||
<I>first</I>
|
||||
?<I>last</I>?
|
||||
</DT><DD>
|
||||
|
||||
<B>Its use is deprecated. Use <I>pages</I> instead.</B><BR>
|
||||
If <I>last</I> is omitted, returns the page at index <I>first</I>, or an empty string if
|
||||
<I>first</I> refers to a non-existent element. If <I>last</I> is specified, the command
|
||||
returns a list whose elements are all of the pages between <I>first</I> and <I>last</I>,
|
||||
inclusive. Both <I>first</I> and <I>last</I> may have any of the standard
|
||||
forms for indices.
|
||||
|
||||
</DD></DL>
|
||||
<DL><DT><A NAME="pages"><I>pathName</I> <B>pages</B></A>
|
||||
?<I>first</I>?
|
||||
?<I>last</I>?
|
||||
</DT><DD>
|
||||
|
||||
If <I>first</I> and <I>last</I> are omitted, returns the list of all pages.
|
||||
If <I>first</I> is specified and <I>last</I> omitted, returns the page at index
|
||||
<I>first</I>, or an empty string if <I>first</I> refers to a non-existent element.
|
||||
If <I>first</I> and <I>last</I> are specified, the command returns a list whose elements
|
||||
are all of the pages between <I>first</I> and <I>last</I>,
|
||||
inclusive. Both <I>first</I> and <I>last</I> may have any of the standard
|
||||
forms for indices.
|
||||
|
||||
</DD></DL>
|
||||
<DL><DT><A NAME="raise"><I>pathName</I> <B>raise</B></A>
|
||||
?<I>page</I>?
|
||||
</DT><DD>
|
||||
|
||||
Raise the page <I>page</I>, or return the raised page if <I>page</I> is omitted.
|
||||
|
||||
</DD></DL>
|
||||
<DL><DT><A NAME="see"><I>pathName</I> <B>see</B></A>
|
||||
<I>page</I>
|
||||
</DT><DD>
|
||||
|
||||
Scrolls labels to make the label of the page <I>page</I> visible.
|
||||
|
||||
</DD></DL>
|
||||
</BODY></HTML>
|
180
R_portable/R/App/R-portable/Tcl/bin64/lib/bwidget-1.9.12/BWman/PagesManager.html
Executable file
@ -0,0 +1,180 @@
|
||||
<HTML>
|
||||
<HEAD><TITLE>PagesManager</TITLE></HEAD>
|
||||
<BODY BGCOLOR=white>
|
||||
<DL><DT><I><A HREF="#descr">NAME</A></I></DT>
|
||||
<DD><B>PagesManager</B>
|
||||
- Pages manager widget
|
||||
</DD></DL>
|
||||
<DL>
|
||||
<DT><I>CREATION</I></DT>
|
||||
<DD><A HREF="#descr"><B>PagesManager</B></A> <I>pathName</I> ?<I>option value...</I>?</DD>
|
||||
</DL>
|
||||
<DL>
|
||||
<DT><I>STANDARD OPTIONS</I></DT>
|
||||
<DD><TABLE CELLSPACING=0 CELLSPACING=0 BORDER=0>
|
||||
<TR>
|
||||
<TD> <A HREF="options.htm#M-background">-background</A></TR>
|
||||
</TABLE></DD>
|
||||
</DL>
|
||||
<DL>
|
||||
<DT><I><A HREF="#wso">WIDGET-SPECIFIC OPTIONS</A></I></DT>
|
||||
<DD><TABLE CELLSPACING=0 CELLSPACING=0 BORDER=0>
|
||||
<TR>
|
||||
<TD> <A HREF="#-height">-height</A></TR>
|
||||
<TD> <A HREF="#-width">-width</A></TR>
|
||||
</TR>
|
||||
</TABLE></DD>
|
||||
</DL>
|
||||
<DL>
|
||||
<DT><I><A HREF="#wc">WIDGET COMMAND</A></I></DT>
|
||||
<DD><I>pathName</I> <A HREF="#add"><B>add</B></A>
|
||||
<I>page</I>
|
||||
</DD>
|
||||
<DD><I>pathName</I> <A HREF="#cget"><B>cget</B></A>
|
||||
<I>option</I>
|
||||
</DD>
|
||||
<DD><I>pathName</I> <A HREF="#compute_size"><B>compute_size</B></A>
|
||||
</DD>
|
||||
<DD><I>pathName</I> <A HREF="#configure"><B>configure</B></A>
|
||||
?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
|
||||
</DD>
|
||||
<DD><I>pathName</I> <A HREF="#delete"><B>delete</B></A>
|
||||
<I>page</I>
|
||||
</DD>
|
||||
<DD><I>pathName</I> <A HREF="#getframe"><B>getframe</B></A>
|
||||
<I>page</I>
|
||||
</DD>
|
||||
<DD><I>pathName</I> <A HREF="#page"><B>page</B></A>
|
||||
<I>first</I>
|
||||
?<I>last</I>?
|
||||
</DD>
|
||||
<DD><I>pathName</I> <A HREF="#pages"><B>pages</B></A>
|
||||
?<I>first</I>?
|
||||
?<I>last</I>?
|
||||
</DD>
|
||||
<DD><I>pathName</I> <A HREF="#raise"><B>raise</B></A>
|
||||
?<I>page</I>?
|
||||
</DD>
|
||||
</DL>
|
||||
<BR><HR WIDTH="100%"><BR>
|
||||
<B><A NAME="descr"></A>DESCRIPTION</B><BR>
|
||||
<P>
|
||||
|
||||
PagesManager widget manages a set of pages and displays one of them.
|
||||
PagesManager does not provide any user access method, as NoteBook
|
||||
does, so it can be done through a listbox, a menu, radiobutton, or
|
||||
whatever. The widget shows no pages during creation; there must be an
|
||||
explicit call to <B>raise</B> to display one.
|
||||
|
||||
</P>
|
||||
<BR><HR WIDTH="50%"><BR>
|
||||
<B><A NAME="wso">WIDGET-SPECIFIC OPTIONS</A></B><BR>
|
||||
<DL><DT><A NAME="-height"><B>-height</B></A></DT>
|
||||
<DD>
|
||||
|
||||
Specifies the desired height for the pages. If this option is equal to zero (the default)
|
||||
then the window will not request any size at all.
|
||||
In this case, user may want to call PagesManager::<B>compute_size</B> to make PagesManager
|
||||
larger enough to contains the largest page.
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="-width"><B>-width</B></A></DT>
|
||||
<DD>
|
||||
|
||||
Specifies the desired width for the pages. If this option is equal to zero (the default)
|
||||
then the window will not request any size at all.
|
||||
In this case, user may want to call PagesManager::<B>compute_size</B> to make PagesManager
|
||||
larger enough to contains the largest page.
|
||||
</DD>
|
||||
</DL>
|
||||
<HR WIDTH="50%"><BR>
|
||||
<B><A NAME="wc">WIDGET COMMAND</A></B><BR>
|
||||
<DL><DT><A NAME="add"><I>pathName</I> <B>add</B></A>
|
||||
<I>page</I>
|
||||
</DT><DD>
|
||||
|
||||
Add a new page identified by <I>page</I>, which is an arbitrary
|
||||
identifier. The pathname of the new page is returned and widgets for
|
||||
the page should be created with this as the parent or ancestor.
|
||||
However, PagesManager manages its own geometry. <B>pack</B>,
|
||||
<B>grid</B> or an equivalent should not be used with the pathname
|
||||
returned by <B>add</B>.
|
||||
|
||||
</DD></DL>
|
||||
<DL><DT><A NAME="cget"><I>pathName</I> <B>cget</B></A>
|
||||
<I>option</I>
|
||||
</DT><DD>
|
||||
|
||||
Returns the current value of the configuration option given by <I>option</I>.
|
||||
<I>Option</I> may have any of the values accepted by the creation command.
|
||||
</DD></DL>
|
||||
<DL><DT><A NAME="compute_size"><I>pathName</I> <B>compute_size</B></A>
|
||||
</DT><DD>
|
||||
|
||||
This command can be called to make the PagesManager large enough to contain the largest page.
|
||||
|
||||
</DD></DL>
|
||||
<DL><DT><A NAME="configure"><I>pathName</I> <B>configure</B></A>
|
||||
?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
|
||||
</DT><DD>
|
||||
|
||||
Query or modify the configuration options of the widget. If no <I>option</I> is specified,
|
||||
returns a list describing all of the available options for <I>pathName</I>.
|
||||
If <I>option</I> is specified with no <I>value</I>, then the command returns a list
|
||||
describing the one named <I>option</I> (this list will be identical to the corresponding
|
||||
sublist of the value returned if no <I>option</I> is specified). If one or
|
||||
more <I>option-value</I> pairs are specified, then the command modifies the given widget
|
||||
option(s) to have the given value(s); in this case the command returns an empty string.
|
||||
<I>Option</I> may have any of the values accepted by the creation command.
|
||||
Read-only options are not be modified.
|
||||
|
||||
</DD></DL>
|
||||
<DL><DT><A NAME="delete"><I>pathName</I> <B>delete</B></A>
|
||||
<I>page</I>
|
||||
</DT><DD>
|
||||
|
||||
Deletes the page <I>page</I>.
|
||||
|
||||
</DD></DL>
|
||||
<DL><DT><A NAME="getframe"><I>pathName</I> <B>getframe</B></A>
|
||||
<I>page</I>
|
||||
</DT><DD>
|
||||
|
||||
Returns the pathname of the page <I>page</I>.
|
||||
|
||||
</DD></DL>
|
||||
<DL><DT><A NAME="page"><I>pathName</I> <B>page</B></A>
|
||||
<I>first</I>
|
||||
?<I>last</I>?
|
||||
</DT><DD>
|
||||
|
||||
<B>Its use is deprecated. Use <I>pages</I> instead.</B><BR>
|
||||
If <I>last</I> is omitted, returns the page at index <I>first</I>, or an empty string if
|
||||
<I>first</I> refers to a non-existent element. If <I>last</I> is specified, the command
|
||||
returns a list whose elements are all of the pages between <I>first</I> and <I>last</I>,
|
||||
inclusive. Both <I>first</I> and <I>last</I> may have any of the standard
|
||||
forms for indices.
|
||||
|
||||
</DD></DL>
|
||||
<DL><DT><A NAME="pages"><I>pathName</I> <B>pages</B></A>
|
||||
?<I>first</I>?
|
||||
?<I>last</I>?
|
||||
</DT><DD>
|
||||
|
||||
If <I>first</I> and <I>last</I> are omitted, returns the list of all pages.
|
||||
If <I>first</I> is specified and <I>last</I> omitted, returns the page at index
|
||||
<I>first</I>, or an empty string if <I>first</I> refers to a non-existent element.
|
||||
If <I>first</I> and <I>last</I> are specified, the command returns a list whose elements
|
||||
are all of the pages between <I>first</I> and <I>last</I>,
|
||||
inclusive. Both <I>first</I> and <I>last</I> may have any of the standard
|
||||
forms for indices.
|
||||
|
||||
</DD></DL>
|
||||
<DL><DT><A NAME="raise"><I>pathName</I> <B>raise</B></A>
|
||||
?<I>page</I>?
|
||||
</DT><DD>
|
||||
|
||||
Raise the page <I>page</I>, or return the raised page if <I>page</I> is omitted.
|
||||
|
||||
</DD></DL>
|
||||
</BODY></HTML>
|
158
R_portable/R/App/R-portable/Tcl/bin64/lib/bwidget-1.9.12/BWman/PanedWindow.html
Executable file
@ -0,0 +1,158 @@
|
||||
<HTML>
|
||||
<HEAD><TITLE>PanedWindow</TITLE></HEAD>
|
||||
<BODY BGCOLOR=white>
|
||||
<DL><DT><I><A HREF="#descr">NAME</A></I></DT>
|
||||
<DD><B>PanedWindow</B>
|
||||
- Tiled layout manager widget
|
||||
</DD></DL>
|
||||
<DL>
|
||||
<DT><I>CREATION</I></DT>
|
||||
<DD><A HREF="#descr"><B>PanedWindow</B></A> <I>pathName</I> ?<I>option value...</I>?</DD>
|
||||
</DL>
|
||||
<DL>
|
||||
<DT><I>STANDARD OPTIONS</I></DT>
|
||||
<DD><TABLE CELLSPACING=0 CELLSPACING=0 BORDER=0>
|
||||
<TR>
|
||||
<TD> <A HREF="options.htm#M-background">-background or -bg</A></TD>
|
||||
</TABLE></DD>
|
||||
</DL>
|
||||
<DL>
|
||||
<DT><I><A HREF="#wso">WIDGET-SPECIFIC OPTIONS</A></I></DT>
|
||||
<DD><TABLE CELLSPACING=0 CELLSPACING=0 BORDER=0>
|
||||
<TR>
|
||||
<TD> <A HREF="#-activator">-activator</A></TD>
|
||||
<TD> <A HREF="#-pad">-pad</A></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> <A HREF="#-side">-side</A></TD>
|
||||
<TD> <A HREF="#-weights">-weights</A></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> <A HREF="#-width">-width</A></TD>
|
||||
</TR>
|
||||
</TABLE></DD>
|
||||
</DL>
|
||||
<DL>
|
||||
<DT><I><A HREF="#wc">WIDGET COMMAND</A></I></DT>
|
||||
<DD><I>pathName</I> <A HREF="#add"><B>add</B></A>
|
||||
?<I>option value...</I>?
|
||||
</DD>
|
||||
<DD><I>pathName</I> <A HREF="#cget"><B>cget</B></A>
|
||||
<I>option</I>
|
||||
</DD>
|
||||
<DD><I>pathName</I> <A HREF="#configure"><B>configure</B></A>
|
||||
?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
|
||||
</DD>
|
||||
<DD><I>pathName</I> <A HREF="#getframe"><B>getframe</B></A>
|
||||
<I>index</I>
|
||||
</DD>
|
||||
</DL>
|
||||
<BR><HR WIDTH="100%"><BR>
|
||||
<B><A NAME="descr"></A>DESCRIPTION</B><BR>
|
||||
<P>
|
||||
|
||||
PanedWindow is a widget that lays out children in
|
||||
a vertically or horizontally tiled format.
|
||||
The user can adjust the size of the panes, with a pane control sash created
|
||||
between children.
|
||||
</P>
|
||||
<BR><HR WIDTH="50%"><BR>
|
||||
<B><A NAME="wso">WIDGET-SPECIFIC OPTIONS</A></B><BR>
|
||||
<DL><DT><A NAME="-activator"><B>-activator (read-only)</B></A></DT>
|
||||
<DD>
|
||||
|
||||
By default, the control sash is either a button or a line depending
|
||||
upon the underlying operating system. This sash may be explicitly set
|
||||
using this option. If set to <B>line</B> then the sash consists of
|
||||
just a dividing line. Otherwise if set to <B>button</B> then it
|
||||
constists of a knob that can be dragged.
|
||||
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="-pad"><B>-pad (read-only)</B></A></DT>
|
||||
<DD>
|
||||
|
||||
Specifies additional space between the button of the sash and children.
|
||||
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="-side"><B>-side (read-only)</B></A></DT>
|
||||
<DD>
|
||||
|
||||
Specifies the side of the sash, which implies the layout: <B>top</B> or <B>bottom</B>
|
||||
(horizontal layout), <B>left</B> or <B>right</B> (vertical layout).
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="-weights"><B>-weights (read-only)</B></A></DT>
|
||||
<DD>
|
||||
|
||||
Specifies how the weights specified when adding panes should be used. Must be
|
||||
<B>extra</B> or <B>available</B>. When using <I>extra</I>, only extra space is
|
||||
devided among the diffferent panes relative to their weight. When using
|
||||
<I>available</I>, all space is devided among the diffferent panes relative to
|
||||
their weight. Default value for <B>weights</B> is <I>extra</I>.
|
||||
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="-width"><B>-width (read-only)</B></A></DT>
|
||||
<DD>
|
||||
|
||||
Specifies the width of the button of the sash. This option is ignored
|
||||
if the activator is set to <B>line</B>.
|
||||
|
||||
</DD>
|
||||
</DL>
|
||||
<HR WIDTH="50%"><BR>
|
||||
<B><A NAME="wc">WIDGET COMMAND</A></B><BR>
|
||||
<DL><DT><A NAME="add"><I>pathName</I> <B>add</B></A>
|
||||
?<I>option value...</I>?
|
||||
</DT><DD>
|
||||
|
||||
This command add a new pane. The new pane is placed below the previous pane for
|
||||
vertical layout or at right for horizontal layout. This command returns a frame
|
||||
where user can place its widget. Valid options are:
|
||||
<P>
|
||||
<DL><DT><A NAME="Pane-minsize"><B>-minsize</B></A></DT>
|
||||
<DD>
|
||||
|
||||
Specifies the minimum size requested for the pane.
|
||||
See the <B>grid</B> command for more information.
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="Pane-weight"><B>-weight</B></A></DT>
|
||||
<DD>
|
||||
|
||||
Specifies the relative weight for apportioning any extra spaces among panes.
|
||||
See the <B>grid</B> command for more information.
|
||||
</DD>
|
||||
</DL>
|
||||
</DD></DL>
|
||||
<DL><DT><A NAME="cget"><I>pathName</I> <B>cget</B></A>
|
||||
<I>option</I>
|
||||
</DT><DD>
|
||||
|
||||
Returns the current value of the configuration option given by <I>option</I>.
|
||||
<I>Option</I> may have any of the values accepted by the creation command.
|
||||
</DD></DL>
|
||||
<DL><DT><A NAME="configure"><I>pathName</I> <B>configure</B></A>
|
||||
?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
|
||||
</DT><DD>
|
||||
|
||||
Query or modify the configuration options of the widget. If no <I>option</I> is specified,
|
||||
returns a list describing all of the available options for <I>pathName</I>.
|
||||
If <I>option</I> is specified with no <I>value</I>, then the command returns a list
|
||||
describing the one named <I>option</I> (this list will be identical to the corresponding
|
||||
sublist of the value returned if no <I>option</I> is specified). If one or
|
||||
more <I>option-value</I> pairs are specified, then the command modifies the given widget
|
||||
option(s) to have the given value(s); in this case the command returns an empty string.
|
||||
<I>Option</I> may have any of the values accepted by the creation command.
|
||||
Read-only options are not be modified.
|
||||
|
||||
</DD></DL>
|
||||
<DL><DT><A NAME="getframe"><I>pathName</I> <B>getframe</B></A>
|
||||
<I>index</I>
|
||||
</DT><DD>
|
||||
|
||||
Returns the pathname of the <I>index</I>th added pane.
|
||||
</DD></DL>
|
||||
</BODY></HTML>
|
153
R_portable/R/App/R-portable/Tcl/bin64/lib/bwidget-1.9.12/BWman/PanelFrame.html
Executable file
@ -0,0 +1,153 @@
|
||||
<HTML>
|
||||
<HEAD><TITLE>PanelFrame</TITLE></HEAD>
|
||||
<BODY BGCOLOR=white>
|
||||
<DL><DT><I><A HREF="#descr">NAME</A></I></DT>
|
||||
<DD><B>PanelFrame</B>
|
||||
- Frame with a boxed title area
|
||||
</DD></DL>
|
||||
<DL>
|
||||
<DT><I>CREATION</I></DT>
|
||||
<DD><A HREF="#descr"><B>PanelFrame</B></A> <I>pathName</I> ?<I>option value...</I>?</DD>
|
||||
</DL>
|
||||
<DL>
|
||||
<DT><I>STANDARD OPTIONS</I></DT>
|
||||
<DD><TABLE CELLSPACING=0 CELLSPACING=0 BORDER=0>
|
||||
<TR>
|
||||
<TD> <A HREF="options.htm#M-background">-background or -bg</A></TD>
|
||||
<TD> <A HREF="options.htm#M-borderwidth">-borderwidth or -bd</A></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> <A HREF="options.htm#M-text">-text</A></TR>
|
||||
<TD> <A HREF="options.htm#M-textvariable">-textvariable</A></TR>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> <A HREF="options.htm#M-font">-font</A></TD>
|
||||
<TD> <A HREF="options.htm#M-relief">-relief</A></TD>
|
||||
</TR>
|
||||
</TABLE></DD>
|
||||
</DL>
|
||||
<DL>
|
||||
<DT><I><A HREF="#wso">WIDGET-SPECIFIC OPTIONS</A></I></DT>
|
||||
<DD><TABLE CELLSPACING=0 CELLSPACING=0 BORDER=0>
|
||||
<TR>
|
||||
<TD> <A HREF="#-height">-height</A></TR>
|
||||
<TD> <A HREF="#-width">-width</A></TR>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> <A HREF="#-panelbackground">-panelbackground</A></TD>
|
||||
<TD> <A HREF="#-panelforeground">-panelforeground</A></TR>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> <A HREF="#-ipad">-ipad</A></TR>
|
||||
</TR>
|
||||
</TABLE></DD>
|
||||
</DL>
|
||||
<DL>
|
||||
<DT><I><A HREF="#wc">WIDGET COMMAND</A></I></DT>
|
||||
<DD><I>pathName</I> <A HREF="#cget"><B>cget</B></A>
|
||||
<I>option</I>
|
||||
</DD>
|
||||
<DD><I>pathName</I> <A HREF="#configure"><B>configure</B></A>
|
||||
?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
|
||||
</DD>
|
||||
</DL>
|
||||
<BR><HR WIDTH="100%"><BR>
|
||||
<B><A NAME="descr"></A>DESCRIPTION</B><BR>
|
||||
|
||||
<P>
|
||||
PanelFrame creates a frame area with a boxed title area. The boxed title
|
||||
area contains a label ands allows for other items to be placed in it. This
|
||||
can serve like a mini-toolbar.
|
||||
</P>
|
||||
|
||||
<BR><HR WIDTH="50%"><BR>
|
||||
<B><A NAME="wso">WIDGET-SPECIFIC OPTIONS</A></B><BR>
|
||||
<DL><DT><A NAME="-height"><B>-height</B></A></DT>
|
||||
<DD>
|
||||
Specifies the desired height for the widget.
|
||||
</DD>
|
||||
<DT><A NAME="-ipad"><B>-ipad</B></A></DT>
|
||||
<DD>
|
||||
The spacing to place around individual panel area items.
|
||||
</DD>
|
||||
<DT><A NAME="-panelbackground"><B>-panelbackground</B></A></DT>
|
||||
<DD>
|
||||
The color for the panel area background.
|
||||
Defaults to the selection highlight background color.
|
||||
</DD>
|
||||
<DT><A NAME="-panelforeground"><B>-panelforeground</B></A></DT>
|
||||
<DD>
|
||||
The color for the title text.
|
||||
Defaults to the selection highlight foreground color.
|
||||
</DD>
|
||||
<DT><A NAME="-width"><B>-width</B></A></DT>
|
||||
<DD>
|
||||
Specifies the desired width for the widget.
|
||||
</DD>
|
||||
</DL>
|
||||
|
||||
<HR WIDTH="50%"><BR>
|
||||
<B><A NAME="wc">WIDGET COMMAND</A></B><BR>
|
||||
<DL><DT><A NAME="add"><I>pathName</I> <B>add</B></A> <B>widget</B>
|
||||
?<I>option</I> <I>value</I> <I>option</I> <I>value</I> ...?
|
||||
</DT><DD>
|
||||
Add a widget to the panel. Widgets are <B>pack</B>ed in.
|
||||
Possible options are:
|
||||
<DL>
|
||||
<DT><B>-side</B></DT>
|
||||
<DD>Side to place item on (defaults to <B>right</B>).</DD>
|
||||
<DT><B>-fill</B></DT>
|
||||
<DD>Whether to fill space (defaults to <B>none</B>).</DD>
|
||||
<DT><B>-expand</B></DT>
|
||||
<DD>Whether to expand space (defaults to <B>0</B>).</DD>
|
||||
<DT><B>-pad</B></DT>
|
||||
<DD>Override of the widget's <B>-ipad</B> option for this item.</DD>
|
||||
</DL>
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="cget"><I>pathName</I> <B>cget</B></A>
|
||||
<I>option</I>
|
||||
</DT><DD>
|
||||
Returns the current value of the configuration option given by <I>option</I>.
|
||||
<I>Option</I> may have any of the values accepted by the creation command.
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="configure"><I>pathName</I> <B>configure</B></A>
|
||||
?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
|
||||
</DT><DD>
|
||||
|
||||
Query or modify the configuration options of the widget. If no
|
||||
<I>option</I> is specified, returns a list describing all of the available
|
||||
options for <I>pathName</I>. If <I>option</I> is specified with no
|
||||
<I>value</I>, then the command returns a list describing the one named
|
||||
<I>option</I> (this list will be identical to the corresponding sublist of
|
||||
the value returned if no <I>option</I> is specified). If one or more
|
||||
<I>option-value</I> pairs are specified, then the command modifies the
|
||||
given widget option(s) to have the given value(s); in this case the command
|
||||
returns an empty string.
|
||||
<I>Option</I> may have any of the values accepted by the creation command.
|
||||
Read-only options are not be modified.
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="delete"><I>pathName</I> <B>delete</B></A>
|
||||
<B>widget</B> ?<I>widget</I> ...?
|
||||
</DT><DD>
|
||||
Delete a widget and associated state from the panel.</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="getframe"><I>pathName</I> <B>getframe</B></A>
|
||||
</DT><DD>
|
||||
Get the frame widget for the status bar in which status bar items should be
|
||||
created.</DD>
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="items"><I>pathName</I> <B>items</B></A>
|
||||
</DT><DD>List of items in the status bar.</DD>
|
||||
<DL>
|
||||
<DL><DT><A NAME="remove"><I>pathName</I> <B>remove</B></A>
|
||||
<B>widget</B> ?<I>widget</I> ...?
|
||||
</DT><DD>
|
||||
Remove a widget item and associated state from the panel without destroying
|
||||
the item.</DD>
|
||||
</DL>
|
||||
|
||||
</BODY></HTML>
|
214
R_portable/R/App/R-portable/Tcl/bin64/lib/bwidget-1.9.12/BWman/PasswdDlg.html
Executable file
@ -0,0 +1,214 @@
|
||||
<HTML>
|
||||
<HEAD><TITLE>PasswdDlg</TITLE></HEAD>
|
||||
<BODY BGCOLOR=white>
|
||||
<DL><DT><I><A HREF="#descr">NAME</A></I></DT>
|
||||
<DD><B>PasswdDlg</B>
|
||||
- Login/Password dialog box
|
||||
</DD></DL>
|
||||
<DL>
|
||||
<DT><I>CREATION</I></DT>
|
||||
<DD><A HREF="#descr"><B>PasswdDlg</B></A> <I>pathName</I> ?<I>option value...</I>?</DD>
|
||||
</DL>
|
||||
<DL>
|
||||
<DT><I><A HREF="Dialog.html">OPTIONS from <B>Dialog</B></A></I></DT>
|
||||
<DD><TABLE CELLSPACING=0 CELLPADDING=0 BORDER=0>
|
||||
<TR>
|
||||
<TD> -anchor</TD>
|
||||
<TD> -background or -bg</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> -homogeneous</TD>
|
||||
<TD> -modal</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> -padx</TD>
|
||||
<TD> -pady</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> -parent</TD>
|
||||
<TD> -spacing</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> -title</TD>
|
||||
</TABLE></DD>
|
||||
</DL>
|
||||
<DL>
|
||||
<DT><I><A HREF="LabelEntry.html">OPTIONS from <B>LabelEntry</B></A></I></DT>
|
||||
<DD><TABLE CELLSPACING=0 CELLPADDING=0 BORDER=0>
|
||||
<TR>
|
||||
<TD> -background or -bg</TD>
|
||||
<TD> -borderwidth or -bd</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> -disabledforeground</TD>
|
||||
<TD> -entrybg</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> -entryfg</TD>
|
||||
<TD> -exportselection</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> -font</TD>
|
||||
<TD> -foreground or -fg</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> -helptype</TD>
|
||||
<TD> -highlightbackground</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> -highlightcolor</TD>
|
||||
<TD> -highlightthickness</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> -insertbackground</TD>
|
||||
<TD> -insertborderwidth</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> -insertofftime</TD>
|
||||
<TD> -insertontime</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> -insertwidth</TD>
|
||||
<TD> -labelanchor</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> -labelfont</TD>
|
||||
<TD> -labelheight</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> -labeljustify</TD>
|
||||
<TD> -labelwidth</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> -loginhelptext (see <B>-helptext</B>)</TD>
|
||||
<TD> -loginhelpvar (see <B>-helpvar</B>)</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> -loginlabel (see <B>-label</B>)</TD>
|
||||
<TD> -logintext (see <B>-text</B>)</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> -logintextvariable (see <B>-textvariable</B>)</TD>
|
||||
<TD> -loginunderline (see <B>-underline</B>)</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> -passwdeditable (see <B>-editable</B>)</TD>
|
||||
<TD> -passwdhelptext (see <B>-helptext</B>)</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> -passwdhelpvar (see <B>-helpvar</B>)</TD>
|
||||
<TD> -passwdlabel (see <B>-label</B>)</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> -passwdstate (see <B>-state</B>)</TD>
|
||||
<TD> -passwdtext (see <B>-text</B>)</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> -passwdtextvariable (see <B>-textvariable</B>)</TD>
|
||||
<TD> -passwdunderline (see <B>-underline</B>)</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> -relief</TD>
|
||||
<TD> -selectbackground</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> -selectborderwidth</TD>
|
||||
<TD> -selectforeground</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> -wraplength</TD>
|
||||
</TABLE></DD>
|
||||
</DL>
|
||||
<DL>
|
||||
<DT><I><A HREF="#wso">WIDGET-SPECIFIC OPTIONS</A></I></DT>
|
||||
<DD><TABLE CELLSPACING=0 CELLSPACING=0 BORDER=0>
|
||||
<TR>
|
||||
<TD> <A HREF="#-command">-command</A></TR>
|
||||
<TD> <A HREF="#-type">-type</A></TR>
|
||||
</TR>
|
||||
</TABLE></DD>
|
||||
</DL>
|
||||
<DL>
|
||||
<DT><I><A HREF="#wc">WIDGET COMMAND</A></I></DT>
|
||||
<DD><I>pathName</I> <A HREF="#cget"><B>cget</B></A>
|
||||
<I>option</I>
|
||||
</DD>
|
||||
<DD><I>pathName</I> <A HREF="#configure"><B>configure</B></A>
|
||||
?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
|
||||
</DD>
|
||||
</DL>
|
||||
<BR><HR WIDTH="100%"><BR>
|
||||
<B><A NAME="descr"></A>DESCRIPTION</B><BR>
|
||||
<P>
|
||||
|
||||
PasswdDlg provides a simple way to display a login/password dialog.
|
||||
PasswdDlg::<B>create</B> creates the dialog, displays it, and return the value of login
|
||||
and password in a list, or an empty list if it is destroyed or user press cancel.
|
||||
When returning, the dialog no longer exists.
|
||||
<BR>Additionnal resources can be set to modify other text:
|
||||
<PRE>
|
||||
*loginName Label for login LabelEntry
|
||||
*passwordName Label for password LabelEntry
|
||||
</PRE>
|
||||
|
||||
</P>
|
||||
<BR><HR WIDTH="50%"><BR>
|
||||
<B><A NAME="wso">WIDGET-SPECIFIC OPTIONS</A></B><BR>
|
||||
<DL><DT><A NAME="-command"><B>-command</B></A></DT>
|
||||
<DD>
|
||||
|
||||
Specifies a command to call when user press ok button.
|
||||
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="-type"><B>-type</B></A></DT>
|
||||
<DD>
|
||||
|
||||
Specifies a set of buttons to be displayed. The following values are possible:
|
||||
<DD>
|
||||
<P>
|
||||
<DL COMPACT>
|
||||
<DT>
|
||||
<B>ok</B>
|
||||
<DD>
|
||||
Displays one button whose symbolic name is <B>ok</B>.<P>
|
||||
<DT>
|
||||
<B>okcancel</B>
|
||||
<DD>
|
||||
Displays two buttons whose symbolic names are <B>ok</B> and <B>cancel</B>.<P>
|
||||
</DL COMPACT>
|
||||
|
||||
</DD>
|
||||
</DL>
|
||||
|
||||
</DD>
|
||||
</DL>
|
||||
<HR WIDTH="50%"><BR>
|
||||
<B><A NAME="wc">WIDGET COMMAND</A></B><BR>
|
||||
<DL><DT><A NAME="cget"><I>pathName</I> <B>cget</B></A>
|
||||
<I>option</I>
|
||||
</DT><DD>
|
||||
|
||||
Returns the current value of the configuration option given by <I>option</I>.
|
||||
<I>Option</I> may have any of the values accepted by the creation command.
|
||||
</DD></DL>
|
||||
<DL><DT><A NAME="configure"><I>pathName</I> <B>configure</B></A>
|
||||
?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
|
||||
</DT><DD>
|
||||
|
||||
Query or modify the configuration options of the widget. If no <I>option</I> is specified,
|
||||
returns a list describing all of the available options for <I>pathName</I>.
|
||||
If <I>option</I> is specified with no <I>value</I>, then the command returns a list
|
||||
describing the one named <I>option</I> (this list will be identical to the corresponding
|
||||
sublist of the value returned if no <I>option</I> is specified). If one or
|
||||
more <I>option-value</I> pairs are specified, then the command modifies the given widget
|
||||
option(s) to have the given value(s); in this case the command returns an empty string.
|
||||
<I>Option</I> may have any of the values accepted by the creation command.
|
||||
Read-only options are not be modified.
|
||||
|
||||
</DD></DL>
|
||||
<HR>
|
||||
|
||||
<ADRESS>Stephane Lavirotte <A HREF="mailto:Stephane.Lavirotte@sophia.inria.fr">(Stephane.Lavirotte@sophia.inria.fr)</A></ADRESS>
|
||||
|
||||
</BODY></HTML>
|
152
R_portable/R/App/R-portable/Tcl/bin64/lib/bwidget-1.9.12/BWman/ProgressBar.html
Executable file
@ -0,0 +1,152 @@
|
||||
<HTML>
|
||||
<HEAD><TITLE>ProgressBar</TITLE></HEAD>
|
||||
<BODY BGCOLOR=white>
|
||||
<DL><DT><I><A HREF="#descr">NAME</A></I></DT>
|
||||
<DD><B>ProgressBar</B>
|
||||
- Progress indicator widget
|
||||
</DD></DL>
|
||||
<DL>
|
||||
<DT><I>CREATION</I></DT>
|
||||
<DD><A HREF="#descr"><B>ProgressBar</B></A> <I>pathName</I> ?<I>option value...</I>?</DD>
|
||||
</DL>
|
||||
<DL>
|
||||
<DT><I>STANDARD OPTIONS</I></DT>
|
||||
<DD><TABLE CELLSPACING=0 CELLSPACING=0 BORDER=0>
|
||||
<TR>
|
||||
<TD> <A HREF="options.htm#M-background">-background or -bg</A></TD>
|
||||
<TD> <A HREF="options.htm#M-borderwidth">-borderwidth or -bd</A></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> <A HREF="options.htm#M-foreground">-foreground or -fg</A></TD>
|
||||
<TD> <A HREF="options.htm#M-orient">-orient</A></TR>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> <A HREF="options.htm#M-relief">-relief</A></TR>
|
||||
<TD> <A HREF="options.htm#M-troughcolor">-troughcolor</A></TR>
|
||||
</TR>
|
||||
</TABLE></DD>
|
||||
</DL>
|
||||
<DL>
|
||||
<DT><I><A HREF="#wso">WIDGET-SPECIFIC OPTIONS</A></I></DT>
|
||||
<DD><TABLE CELLSPACING=0 CELLSPACING=0 BORDER=0>
|
||||
<TR>
|
||||
<TD> <A HREF="#-height">-height</A></TR>
|
||||
<TD> <A HREF="#-maximum">-maximum</A></TR>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> <A HREF="#-type">-type</A></TR>
|
||||
<TD> <A HREF="#-variable">-variable</A></TR>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> <A HREF="#-width">-width</A></TR>
|
||||
</TABLE></DD>
|
||||
</DL>
|
||||
<DL>
|
||||
<DT><I><A HREF="#wc">WIDGET COMMAND</A></I></DT>
|
||||
<DD><I>pathName</I> <A HREF="#cget"><B>cget</B></A>
|
||||
<I>option</I>
|
||||
</DD>
|
||||
<DD><I>pathName</I> <A HREF="#configure"><B>configure</B></A>
|
||||
?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
|
||||
</DD>
|
||||
</DL>
|
||||
<BR><HR WIDTH="100%"><BR>
|
||||
<B><A NAME="descr"></A>DESCRIPTION</B><BR>
|
||||
<P>
|
||||
|
||||
ProgressBar widget indicates the user the progress of a lengthly operation.
|
||||
It is used by <A HREF="MainFrame.html">MainFrame</A>
|
||||
and <A HREF="ProgressDlg.html">ProgressDlg</A>.
|
||||
</P>
|
||||
<BR><HR WIDTH="50%"><BR>
|
||||
<B><A NAME="wso">WIDGET-SPECIFIC OPTIONS</A></B><BR>
|
||||
<DL><DT><A NAME="-height"><B>-height</B></A></DT>
|
||||
<DD>
|
||||
|
||||
Specifies the desired height for the progress indicator.
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="-maximum"><B>-maximum</B></A></DT>
|
||||
<DD>
|
||||
|
||||
Specifies the maximum value of the variable. This value must be
|
||||
greater than zero.
|
||||
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="-type"><B>-type</B></A></DT>
|
||||
<DD>
|
||||
|
||||
Specifies the type of the ProgressBar. Must be one of <B>normal</B>,
|
||||
<B>incremental</B>, <B>infinite</B> or <B>nonincremental_infinite</B>.
|
||||
|
||||
<BR><BR>If <B>type</B> is <I>normal</I>, the progress indicator is drawn
|
||||
proportional to the variable value and <B>maximum</B> option each time the
|
||||
variable is set.
|
||||
|
||||
<BR><BR>If <B>type</B> is <I>incremental</I>, the value of the progress
|
||||
indicator is maintained internally, and incremented each time the variable is
|
||||
set by its value. The progress indicator is drawn proportional to the internal
|
||||
value and
|
||||
<B>maximum</B> option.
|
||||
|
||||
<BR><BR>If <B>type</B> is <I>infinite</I>, the value of the progress indicator
|
||||
is maintained internally, and incremented each time the variable is set by its
|
||||
value. The progress indicator moves from left to right if internal value
|
||||
(modulo <B>maximum</B>) is less than <B>maximum</B>/2, and from right to left
|
||||
if internal value is greater than <B>maximum</B>/2.
|
||||
|
||||
<BR><BR>If <B>type</B> is <I>nonincremental_infinite</I>, the value of the
|
||||
progress indicator taken from the variable value, The progress indicator moves
|
||||
from left to right if variable value (modulo <B>maximum</B>) is less than
|
||||
<B>maximum</B>/2, and from right to left if internal value is greater than
|
||||
<B>maximum</B>/2.
|
||||
|
||||
<BR><BR>See <B>-variable</B> option for special case of its value,
|
||||
|
||||
<BR><BR>Default value for <B>type</B> is <I>normal</I>.
|
||||
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="-variable"><B>-variable</B></A></DT>
|
||||
<DD>
|
||||
|
||||
Specifies the variable attached to the progress indicator. Progress indicator
|
||||
is updated when the value of the variable changes. If the value of the
|
||||
variable is negative, the progress indicator is not displayed (it is drawn flat
|
||||
with <B>background</B> color - usefull for ProgressDlg to make it
|
||||
invisible). If its value 0, progress indicator is reinitialized.
|
||||
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="-width"><B>-width</B></A></DT>
|
||||
<DD>
|
||||
|
||||
Specifies the desired width for the progress indicator.
|
||||
</DD>
|
||||
</DL>
|
||||
<HR WIDTH="50%"><BR>
|
||||
<B><A NAME="wc">WIDGET COMMAND</A></B><BR>
|
||||
<DL><DT><A NAME="cget"><I>pathName</I> <B>cget</B></A>
|
||||
<I>option</I>
|
||||
</DT><DD>
|
||||
|
||||
Returns the current value of the configuration option given by <I>option</I>.
|
||||
<I>Option</I> may have any of the values accepted by the creation command.
|
||||
</DD></DL>
|
||||
<DL><DT><A NAME="configure"><I>pathName</I> <B>configure</B></A>
|
||||
?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
|
||||
</DT><DD>
|
||||
|
||||
Query or modify the configuration options of the widget. If no <I>option</I> is specified,
|
||||
returns a list describing all of the available options for <I>pathName</I>.
|
||||
If <I>option</I> is specified with no <I>value</I>, then the command returns a list
|
||||
describing the one named <I>option</I> (this list will be identical to the corresponding
|
||||
sublist of the value returned if no <I>option</I> is specified). If one or
|
||||
more <I>option-value</I> pairs are specified, then the command modifies the given widget
|
||||
option(s) to have the given value(s); in this case the command returns an empty string.
|
||||
<I>Option</I> may have any of the values accepted by the creation command.
|
||||
Read-only options are not be modified.
|
||||
|
||||
</DD></DL>
|
||||
</BODY></HTML>
|
145
R_portable/R/App/R-portable/Tcl/bin64/lib/bwidget-1.9.12/BWman/ProgressDlg.html
Executable file
@ -0,0 +1,145 @@
|
||||
<HTML>
|
||||
<HEAD><TITLE>ProgressDlg</TITLE></HEAD>
|
||||
<BODY BGCOLOR=white>
|
||||
<DL><DT><I><A HREF="#descr">NAME</A></I></DT>
|
||||
<DD><B>ProgressDlg</B>
|
||||
- Progress indicator dialog box
|
||||
</DD></DL>
|
||||
<DL>
|
||||
<DT><I>CREATION</I></DT>
|
||||
<DD><A HREF="#descr"><B>ProgressDlg</B></A> <I>pathName</I> ?<I>option value...</I>?</DD>
|
||||
</DL>
|
||||
<DL>
|
||||
<DT><I>STANDARD OPTIONS</I></DT>
|
||||
<DD><TABLE CELLSPACING=0 CELLSPACING=0 BORDER=0>
|
||||
<TR>
|
||||
<TD> <A HREF="options.htm#M-font">-font</A></TR>
|
||||
<TD> <A HREF="options.htm#M-textvariable">-textvariable</A></TR>
|
||||
</TR>
|
||||
</TABLE></DD>
|
||||
</DL>
|
||||
<DL>
|
||||
<DT><I><A HREF="Dialog.html">OPTIONS from <B>Dialog</B></A></I></DT>
|
||||
<DD><TABLE CELLSPACING=0 CELLPADDING=0 BORDER=0>
|
||||
<TR>
|
||||
<TD> -background or -bg</TD>
|
||||
<TD> -parent</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> -separator</TD>
|
||||
<TD> -title</TD>
|
||||
</TR>
|
||||
</TABLE></DD>
|
||||
</DL>
|
||||
<DL>
|
||||
<DT><I><A HREF="ProgressBar.html">OPTIONS from <B>ProgressBar</B></A></I></DT>
|
||||
<DD><TABLE CELLSPACING=0 CELLPADDING=0 BORDER=0>
|
||||
<TR>
|
||||
<TD> -background or -bg</TD>
|
||||
<TD> -borderwidth or -bd</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> -foreground or -fg</TD>
|
||||
<TD> -maximum</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> -relief</TD>
|
||||
<TD> -troughcolor</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> -type</TD>
|
||||
<TD> -variable</TD>
|
||||
</TR>
|
||||
</TABLE></DD>
|
||||
</DL>
|
||||
<DL>
|
||||
<DT><I><A HREF="#wso">WIDGET-SPECIFIC OPTIONS</A></I></DT>
|
||||
<DD><TABLE CELLSPACING=0 CELLSPACING=0 BORDER=0>
|
||||
<TR>
|
||||
<TD> <A HREF="#-command">-command</A></TR>
|
||||
<TD> <A HREF="#-height">-height</A></TR>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> <A HREF="#-stop">-stop</A></TR>
|
||||
<TD> <A HREF="#-width">-width</A></TR>
|
||||
</TR>
|
||||
</TABLE></DD>
|
||||
</DL>
|
||||
<DL>
|
||||
<DT><I><A HREF="#wc">WIDGET COMMAND</A></I></DT>
|
||||
<DD><I>pathName</I> <A HREF="#cget"><B>cget</B></A>
|
||||
<I>option</I>
|
||||
</DD>
|
||||
<DD><I>pathName</I> <A HREF="#configure"><B>configure</B></A>
|
||||
?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
|
||||
</DD>
|
||||
</DL>
|
||||
<BR><HR WIDTH="100%"><BR>
|
||||
<B><A NAME="descr"></A>DESCRIPTION</B><BR>
|
||||
<P>
|
||||
|
||||
ProgressDlg provides a simple way to display a progress indicator dialog.
|
||||
ProgressDlg::<B>create</B> creates the dialog, displays it, set a local
|
||||
grab to it and immediatly return. The dialog is updated by modifying the
|
||||
value of the variable of options <B>-textvariable</B> and <B>-variable</B>.
|
||||
You have to destroy the dialog after use.
|
||||
|
||||
</P>
|
||||
<BR><HR WIDTH="50%"><BR>
|
||||
<B><A NAME="wso">WIDGET-SPECIFIC OPTIONS</A></B><BR>
|
||||
<DL><DT><A NAME="-command"><B>-command</B></A></DT>
|
||||
<DD>
|
||||
|
||||
Specifies a command to call when user press stop button. Note that it
|
||||
is the program's responsibility to periodically call <B>update</B> so
|
||||
that button press events can be generated.
|
||||
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="-height"><B>-height</B></A></DT>
|
||||
<DD>
|
||||
|
||||
Specifies a desired height for the label in lines of text.
|
||||
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="-stop"><B>-stop</B></A></DT>
|
||||
<DD>
|
||||
|
||||
Specifies the text of the button typically used to stop process. If empty, no button will
|
||||
be drawn. This can be a symbolic name.
|
||||
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="-width"><B>-width</B></A></DT>
|
||||
<DD>
|
||||
|
||||
Specifies a desired width for the label in characters.
|
||||
|
||||
</DD>
|
||||
</DL>
|
||||
<HR WIDTH="50%"><BR>
|
||||
<B><A NAME="wc">WIDGET COMMAND</A></B><BR>
|
||||
<DL><DT><A NAME="cget"><I>pathName</I> <B>cget</B></A>
|
||||
<I>option</I>
|
||||
</DT><DD>
|
||||
|
||||
Returns the current value of the configuration option given by <I>option</I>.
|
||||
<I>Option</I> may have any of the values accepted by the creation command.
|
||||
</DD></DL>
|
||||
<DL><DT><A NAME="configure"><I>pathName</I> <B>configure</B></A>
|
||||
?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
|
||||
</DT><DD>
|
||||
|
||||
Query or modify the configuration options of the widget. If no <I>option</I> is specified,
|
||||
returns a list describing all of the available options for <I>pathName</I>.
|
||||
If <I>option</I> is specified with no <I>value</I>, then the command returns a list
|
||||
describing the one named <I>option</I> (this list will be identical to the corresponding
|
||||
sublist of the value returned if no <I>option</I> is specified). If one or
|
||||
more <I>option-value</I> pairs are specified, then the command modifies the given widget
|
||||
option(s) to have the given value(s); in this case the command returns an empty string.
|
||||
<I>Option</I> may have any of the values accepted by the creation command.
|
||||
Read-only options are not be modified.
|
||||
|
||||
</DD></DL>
|
||||
</BODY></HTML>
|
130
R_portable/R/App/R-portable/Tcl/bin64/lib/bwidget-1.9.12/BWman/ScrollView.html
Executable file
@ -0,0 +1,130 @@
|
||||
<HTML>
|
||||
<HEAD><TITLE>ScrollView</TITLE></HEAD>
|
||||
<BODY BGCOLOR=white>
|
||||
<DL><DT><I><A HREF="#descr">NAME</A></I></DT>
|
||||
<DD><B>ScrollView</B>
|
||||
- Display the visible area of a scrolled window
|
||||
</DD></DL>
|
||||
<DL>
|
||||
<DT><I>CREATION</I></DT>
|
||||
<DD><A HREF="#descr"><B>ScrollView</B></A> <I>pathName</I> ?<I>option value...</I>?</DD>
|
||||
</DL>
|
||||
<DL>
|
||||
<DT><I>STANDARD OPTIONS</I></DT>
|
||||
<DD><TABLE CELLSPACING=0 CELLSPACING=0 BORDER=0>
|
||||
<TR>
|
||||
<TD> <A HREF="options.htm#M-background">-background or -bg</A></TD>
|
||||
<TD> <A HREF="options.htm#M-borderwidth">-borderwidth or -bd</A></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> <A HREF="options.htm#M-cursor">-cursor</A></TR>
|
||||
<TD> <A HREF="options.htm#M-relief">-relief</A></TR>
|
||||
</TR>
|
||||
</TABLE></DD>
|
||||
</DL>
|
||||
<DL>
|
||||
<DT><I><A HREF="#wso">WIDGET-SPECIFIC OPTIONS</A></I></DT>
|
||||
<DD><TABLE CELLSPACING=0 CELLSPACING=0 BORDER=0>
|
||||
<TR>
|
||||
<TD> <A HREF="#-fill">-fill</A></TR>
|
||||
<TD> <A HREF="#-foreground">-foreground or -fg</A></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> <A HREF="#-height">-height</A></TR>
|
||||
<TD> <A HREF="#-width">-width</A></TR>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> <A HREF="#-window">-window</A></TR>
|
||||
</TABLE></DD>
|
||||
</DL>
|
||||
<DL>
|
||||
<DT><I><A HREF="#wc">WIDGET COMMAND</A></I></DT>
|
||||
<DD><I>pathName</I> <A HREF="#cget"><B>cget</B></A>
|
||||
<I>option</I>
|
||||
</DD>
|
||||
<DD><I>pathName</I> <A HREF="#configure"><B>configure</B></A>
|
||||
?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
|
||||
</DD>
|
||||
</DL>
|
||||
<BR><HR WIDTH="100%"><BR>
|
||||
<B><A NAME="descr"></A>DESCRIPTION</B><BR>
|
||||
<P>
|
||||
|
||||
ScrollView displays the visible area of a scrolled window within
|
||||
its scroll region.
|
||||
|
||||
</P>
|
||||
<BR><HR WIDTH="50%"><BR>
|
||||
<B><A NAME="wso">WIDGET-SPECIFIC OPTIONS</A></B><BR>
|
||||
<DL><DT><A NAME="-fill"><B>-fill</B></A></DT>
|
||||
<DD>
|
||||
|
||||
Specifies the fill color of the rectangle.
|
||||
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="-foreground"><B>-foreground</B></A></DT>
|
||||
<DD>
|
||||
|
||||
Specifies the color of the border of the rectangle.
|
||||
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="-height"><B>-height</B></A></DT>
|
||||
<DD>
|
||||
|
||||
Specifies the desired height for the ScrollView.
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="-width"><B>-width</B></A></DT>
|
||||
<DD>
|
||||
|
||||
Specifies the desired width for the ScrollView.
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="-window"><B>-window</B></A></DT>
|
||||
<DD>
|
||||
|
||||
Specifies the window to view. This widget must have <B>-xscrollcommand</B> and
|
||||
<B>-yscrollcommand</B> options, and respond to <B>xview</B> and <B>yview</B> command.
|
||||
In order to make ScrollView working with other scrollbar, <B>-xscrollcommand</B> and
|
||||
<B>-yscrollcommand</B> options of the widget must be set before the widget is passed to
|
||||
the <B>-window</B> option of the ScrollView (for example, if the widget is handled by
|
||||
a ScrolledWindow, call <B>setwidget</B> before setting <B>-window</B> option).
|
||||
|
||||
</DD>
|
||||
</DL>
|
||||
<HR WIDTH="50%"><BR>
|
||||
<B><A NAME="wc">WIDGET COMMAND</A></B><BR>
|
||||
<DL><DT><A NAME="cget"><I>pathName</I> <B>cget</B></A>
|
||||
<I>option</I>
|
||||
</DT><DD>
|
||||
|
||||
Returns the current value of the configuration option given by <I>option</I>.
|
||||
<I>Option</I> may have any of the values accepted by the creation command.
|
||||
</DD></DL>
|
||||
<DL><DT><A NAME="configure"><I>pathName</I> <B>configure</B></A>
|
||||
?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
|
||||
</DT><DD>
|
||||
|
||||
Query or modify the configuration options of the widget. If no <I>option</I> is specified,
|
||||
returns a list describing all of the available options for <I>pathName</I>.
|
||||
If <I>option</I> is specified with no <I>value</I>, then the command returns a list
|
||||
describing the one named <I>option</I> (this list will be identical to the corresponding
|
||||
sublist of the value returned if no <I>option</I> is specified). If one or
|
||||
more <I>option-value</I> pairs are specified, then the command modifies the given widget
|
||||
option(s) to have the given value(s); in this case the command returns an empty string.
|
||||
<I>Option</I> may have any of the values accepted by the creation command.
|
||||
Read-only options are not be modified.
|
||||
|
||||
</DD></DL>
|
||||
<HR><BR><B>BINDINGS</B><BR><BR>
|
||||
|
||||
<DL><DT>If mouse button 1 is pressed and dragged over the ScrollView, the top left corner of
|
||||
the visible area of the scrolled window is moved proportionally to the mouse displacement.
|
||||
</DT></DL>
|
||||
<DL><DT>If mouse button 3 is pressed over the ScrollView, the top left corner of the visible
|
||||
area is proportionally set to this point.
|
||||
</DT></DL>
|
||||
|
||||
</BODY></HTML>
|
@ -0,0 +1,194 @@
|
||||
<HTML>
|
||||
<HEAD><TITLE>ScrollableFrame</TITLE></HEAD>
|
||||
<BODY BGCOLOR=white>
|
||||
<DL><DT><I><A HREF="#descr">NAME</A></I></DT>
|
||||
<DD><B>ScrollableFrame</B>
|
||||
- Scrollable frame containing widget
|
||||
</DD></DL>
|
||||
<DL>
|
||||
<DT><I>CREATION</I></DT>
|
||||
<DD><A HREF="#descr"><B>ScrollableFrame</B></A> <I>pathName</I> ?<I>option value...</I>?</DD>
|
||||
</DL>
|
||||
<DL>
|
||||
<DT><I>STANDARD OPTIONS</I></DT>
|
||||
<DD><TABLE CELLSPACING=0 CELLSPACING=0 BORDER=0>
|
||||
<TR>
|
||||
<TD> <A HREF="options.htm#M-background">-background or -bg</A></TD>
|
||||
<TD> <A HREF="options.htm#M-xscrollcommand">-xscrollcommand</A></TD></TR>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> <A HREF="options.htm#M-yscrollcommand">-yscrollcommand</A></TD></TR>
|
||||
</TABLE></DD>
|
||||
<BR>
|
||||
Themed widget (<B>Widget::theme true</B>): Options <B>-background</B> and <B>-bg</B> are not available.
|
||||
Modify style <B>TFrame</B> property <B>-background</B> instead.
|
||||
</DL>
|
||||
<DL>
|
||||
<DT><I><A HREF="#wso">WIDGET-SPECIFIC OPTIONS</A></I></DT>
|
||||
<DD><TABLE CELLSPACING=0 CELLSPACING=0 BORDER=0>
|
||||
<TR>
|
||||
<TD> <A HREF="#-areaheight">-areaheight</A></TR>
|
||||
<TD> <A HREF="#-areawidth">-areawidth</A></TR>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> <A HREF="#-constrainedheight">-constrainedheight</A></TR>
|
||||
<TD> <A HREF="#-constrainedwidth">-constrainedwidth</A></TR>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> <A HREF="#-height">-height</A></TR>
|
||||
<TD> <A HREF="#-width">-width</A></TR>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> <A HREF="#-xscrollincrement">-xscrollincrement</A></TR>
|
||||
<TD> <A HREF="#-yscrollincrement">-yscrollincrement</A></TR>
|
||||
</TR>
|
||||
</TABLE></DD>
|
||||
</DL>
|
||||
<DL>
|
||||
<DT><I><A HREF="#wc">WIDGET COMMAND</A></I></DT>
|
||||
<DD><I>pathName</I> <A HREF="#cget"><B>cget</B></A>
|
||||
<I>option</I>
|
||||
</DD>
|
||||
<DD><I>pathName</I> <A HREF="#configure"><B>configure</B></A>
|
||||
?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
|
||||
</DD>
|
||||
<DD><I>pathName</I> <A HREF="#getframe"><B>getframe</B></A>
|
||||
</DD>
|
||||
<DD><I>pathName</I> <A HREF="#see"><B>see</B></A>
|
||||
<I>widget</I>
|
||||
?<I>vert</I>?
|
||||
?<I>horz</I>?
|
||||
</DD>
|
||||
<DD><I>pathName</I> <A HREF="#xview"><B>xview</B></A>
|
||||
?<I>arg...</I>?
|
||||
</DD>
|
||||
<DD><I>pathName</I> <A HREF="#yview"><B>yview</B></A>
|
||||
?<I>arg...</I>?
|
||||
</DD>
|
||||
</DL>
|
||||
<BR><HR WIDTH="100%"><BR>
|
||||
<B><A NAME="descr"></A>DESCRIPTION</B><BR>
|
||||
<P>
|
||||
|
||||
ScrollableFrame widget containing widget.
|
||||
|
||||
</P>
|
||||
<BR><HR WIDTH="50%"><BR>
|
||||
<B><A NAME="wso">WIDGET-SPECIFIC OPTIONS</A></B><BR>
|
||||
<DL><DT><A NAME="-areaheight"><B>-areaheight</B></A></DT>
|
||||
<DD>
|
||||
|
||||
Specifies the height for the scrollable area. If zero, then the height
|
||||
of the scrollable area is made just large enough to hold all its children.
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="-areawidth"><B>-areawidth</B></A></DT>
|
||||
<DD>
|
||||
|
||||
Specifies the width for the scrollable area. If zero, then the width
|
||||
of the scrollable area window is made just large enough to hold all its children.
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="-constrainedheight"><B>-constrainedheight</B></A></DT>
|
||||
<DD>
|
||||
|
||||
Specifies whether or not the scrollable area should have the same height of the
|
||||
scrolled window. If true, vertical scrollbar is not needed.
|
||||
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="-constrainedwidth"><B>-constrainedwidth</B></A></DT>
|
||||
<DD>
|
||||
|
||||
Specifies whether or not the scrollable area should have the same width of the
|
||||
scrolled window. If true, horizontal scrollbar is not needed.
|
||||
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="-height"><B>-height</B></A></DT>
|
||||
<DD>
|
||||
|
||||
Specifies the desired height for the window in pixels.
|
||||
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="-width"><B>-width</B></A></DT>
|
||||
<DD>
|
||||
|
||||
Specifies the desired width for the window in pixels.
|
||||
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="-xscrollincrement"><B>-xscrollincrement</B></A></DT>
|
||||
<DD>
|
||||
|
||||
See <B>xscrollincrement</B> option of <B>canvas</B> widget.
|
||||
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="-yscrollincrement"><B>-yscrollincrement</B></A></DT>
|
||||
<DD>
|
||||
|
||||
See <B>yscrollincrement</B> option of <B>canvas</B> widget.
|
||||
|
||||
</DD>
|
||||
</DL>
|
||||
<HR WIDTH="50%"><BR>
|
||||
<B><A NAME="wc">WIDGET COMMAND</A></B><BR>
|
||||
<DL><DT><A NAME="cget"><I>pathName</I> <B>cget</B></A>
|
||||
<I>option</I>
|
||||
</DT><DD>
|
||||
|
||||
Returns the current value of the configuration option given by <I>option</I>.
|
||||
<I>Option</I> may have any of the values accepted by the creation command.
|
||||
</DD></DL>
|
||||
<DL><DT><A NAME="configure"><I>pathName</I> <B>configure</B></A>
|
||||
?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
|
||||
</DT><DD>
|
||||
|
||||
Query or modify the configuration options of the widget. If no <I>option</I> is specified,
|
||||
returns a list describing all of the available options for <I>pathName</I>.
|
||||
If <I>option</I> is specified with no <I>value</I>, then the command returns a list
|
||||
describing the one named <I>option</I> (this list will be identical to the corresponding
|
||||
sublist of the value returned if no <I>option</I> is specified). If one or
|
||||
more <I>option-value</I> pairs are specified, then the command modifies the given widget
|
||||
option(s) to have the given value(s); in this case the command returns an empty string.
|
||||
<I>Option</I> may have any of the values accepted by the creation command.
|
||||
Read-only options are not be modified.
|
||||
|
||||
</DD></DL>
|
||||
<DL><DT><A NAME="getframe"><I>pathName</I> <B>getframe</B></A>
|
||||
</DT><DD>
|
||||
|
||||
Return the pathname of the scrolled frame where widget should be created.
|
||||
|
||||
</DD></DL>
|
||||
<DL><DT><A NAME="see"><I>pathName</I> <B>see</B></A>
|
||||
<I>widget</I>
|
||||
?<I>vert</I>?
|
||||
?<I>horz</I>?
|
||||
</DT><DD>
|
||||
|
||||
Arrange scrollable area to make <I>widget</I> visible in the window.
|
||||
<I>vert</I> and <I>horz</I> specify which part of <I>widget</I> must be preferably
|
||||
visible, in case where <I>widget</I> is too tall or too large to be entirely visible.
|
||||
<I>vert</I> must be <B>top</B> (the default) or <B>bottom</B>,
|
||||
and <I>horz</I> must be <B>left</B> (the default) or <B>right</B>.
|
||||
If <I>vert</I> or <I>horz</I> is not a valid value, area is not scrolled in this direction.
|
||||
|
||||
</DD></DL>
|
||||
<DL><DT><A NAME="xview"><I>pathName</I> <B>xview</B></A>
|
||||
?<I>arg...</I>?
|
||||
</DT><DD>
|
||||
|
||||
Standard command to enable horizontal scrolling of <I>pathName</I>.
|
||||
|
||||
</DD></DL>
|
||||
<DL><DT><A NAME="yview"><I>pathName</I> <B>yview</B></A>
|
||||
?<I>arg...</I>?
|
||||
</DT><DD>
|
||||
|
||||
Standard command to enable vertical scrolling of <I>pathName</I>.
|
||||
|
||||
</DD></DL>
|
||||
</BODY></HTML>
|
@ -0,0 +1,160 @@
|
||||
<HTML>
|
||||
<HEAD><TITLE>ScrolledWindow</TITLE></HEAD>
|
||||
<BODY BGCOLOR=white>
|
||||
<DL><DT><I><A HREF="#descr">NAME</A></I></DT>
|
||||
<DD><B>ScrolledWindow</B>
|
||||
- Generic scrolled widget
|
||||
</DD></DL>
|
||||
<DL>
|
||||
<DT><I>CREATION</I></DT>
|
||||
<DD><A HREF="#descr"><B>ScrolledWindow</B></A> <I>pathName</I> ?<I>option value...</I>?</DD>
|
||||
</DL>
|
||||
<DL>
|
||||
<DT><I>STANDARD OPTIONS</I></DT>
|
||||
<DT><I>Not themed</I></DT>
|
||||
<DD><TABLE CELLSPACING=0 CELLSPACING=0 BORDER=0>
|
||||
<TR>
|
||||
<TD> <A HREF="options.htm#M-background">-background or -bg</A></TD>
|
||||
<TD> <A HREF="options.htm#M-borderwidth">-borderwidth or -bd</A></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> <A HREF="options.htm#M-relief">-relief</A></TR>
|
||||
</TABLE></DD>
|
||||
<DT><I>Themed</I></DT>
|
||||
<DD><TABLE CELLSPACING=0 CELLSPACING=0 BORDER=0>
|
||||
<TR>
|
||||
<TD> <A HREF="options.htm#M-borderwidth">-borderwidth or -bd</A></TD>
|
||||
<TD> <A HREF="options.htm#M-relief">-relief</A></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> (<B>-bg</B> has no effect)</TD>
|
||||
</TR>
|
||||
</TABLE></DD>
|
||||
</DL>
|
||||
<DL>
|
||||
<DT><I><A HREF="#wso">WIDGET-SPECIFIC OPTIONS</A></I></DT>
|
||||
<DD><TABLE CELLSPACING=0 CELLSPACING=0 BORDER=0>
|
||||
<TR>
|
||||
<TD> <A HREF="#-auto">-auto</A></TR>
|
||||
<TD> <A HREF="#-ipad">-ipad</A></TR>
|
||||
<TD> <A HREF="#-managed">-managed</A></TR>
|
||||
<TD> <A HREF="#-scrollbar">-scrollbar</A></TR>
|
||||
<TD> <A HREF="#-sides">-sides</A></TR>
|
||||
<TD> <A HREF="#-size">-size</A></TR>
|
||||
</TR>
|
||||
</TABLE></DD>
|
||||
</DL>
|
||||
<DL>
|
||||
<DT><I><A HREF="#wc">WIDGET COMMAND</A></I></DT>
|
||||
<DD><I>pathName</I> <A HREF="#cget"><B>cget</B></A>
|
||||
<I>option</I>
|
||||
</DD>
|
||||
<DD><I>pathName</I> <A HREF="#configure"><B>configure</B></A>
|
||||
?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
|
||||
</DD>
|
||||
<DD><I>pathName</I> <A HREF="#getframe"><B>getframe</B></A>
|
||||
</DD>
|
||||
<DD><I>pathName</I> <A HREF="#setwidget"><B>setwidget</B></A>
|
||||
<I>widget</I>
|
||||
</DD>
|
||||
</DL>
|
||||
<BR><HR WIDTH="100%"><BR>
|
||||
<B><A NAME="descr"></A>DESCRIPTION</B><BR>
|
||||
<P>
|
||||
|
||||
ScrolledWindow enables user to create easily a widget with its scrollbar.
|
||||
Scrollbars are created by ScrolledWindow and scroll commands are automatically associated to
|
||||
a scrollable widget with <B>ScrolledWindow::setwidget</B>.
|
||||
</P>
|
||||
<BR><HR WIDTH="50%"><BR>
|
||||
<B><A NAME="wso">WIDGET-SPECIFIC OPTIONS</A></B><BR>
|
||||
<DL><DT><A NAME="-auto"><B>-auto</B></A></DT>
|
||||
<DD>
|
||||
|
||||
Specifies the desired auto managed scrollbar:
|
||||
<LI><B>none</B> means scrollbar are always drawn
|
||||
<LI><B>horizontal</B> means horizontal scrollbar is drawn as needed
|
||||
<LI><B>vertical</B> means vertical scrollbar is drawn as needed
|
||||
<LI><B>both</B> means horizontal and vertical scrollbars are drawn as needed (default value)
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="-ipad"><B>-ipad (read-only)</B></A></DT>
|
||||
<DD>
|
||||
|
||||
Padding in pixels between client widget and scrollbars.
|
||||
Default value: <B>1</B>.
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="-managed"><B>-managed (read-only)</B></A></DT>
|
||||
<DD>
|
||||
|
||||
If true, scrollbar are managed during creation, so their size are included in the requested size of the
|
||||
ScrolledWindow. If false, they are not.
|
||||
Default value: <B>true</B>.
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="-scrollbar"><B>-scrollbar</B></A></DT>
|
||||
<DD>
|
||||
|
||||
Specifies the desired scrollbar: <B>none</B>, <B>horizontal</B>, <B>vertical</B>
|
||||
or <B>both</B> (default value).
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="-sides"><B>-sides (read-only)</B></A></DT>
|
||||
<DD>
|
||||
|
||||
Side of the scrollbars.
|
||||
Possible values are: <B>ne</B>, <B>en</B>, <B>nw</B>, <B>wn</B>, <B>se</B> (default value), <B>es</B>, <B>sw</B>, <B>ws</B>.
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="-size"><B>-size (read-only)</B></A></DT>
|
||||
<DD>
|
||||
|
||||
Size of the scrollbars in pixels.
|
||||
Use </B>0</B> for standard size (default value).<BR>
|
||||
This option has no effect if widget is <I>themed</I>.
|
||||
</DD>
|
||||
</DL>
|
||||
<HR WIDTH="50%"><BR>
|
||||
<B><A NAME="wc">WIDGET COMMAND</A></B><BR>
|
||||
<DL><DT><A NAME="cget"><I>pathName</I> <B>cget</B></A>
|
||||
<I>option</I>
|
||||
</DT><DD>
|
||||
|
||||
Returns the current value of the configuration option given by <I>option</I>.
|
||||
<I>Option</I> may have any of the values accepted by the creation command.
|
||||
</DD></DL>
|
||||
<DL><DT><A NAME="configure"><I>pathName</I> <B>configure</B></A>
|
||||
?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
|
||||
</DT><DD>
|
||||
|
||||
Query or modify the configuration options of the widget. If no <I>option</I> is specified,
|
||||
returns a list describing all of the available options for <I>pathName</I>.
|
||||
If <I>option</I> is specified with no <I>value</I>, then the command returns a list
|
||||
describing the one named <I>option</I> (this list will be identical to the corresponding
|
||||
sublist of the value returned if no <I>option</I> is specified). If one or
|
||||
more <I>option-value</I> pairs are specified, then the command modifies the given widget
|
||||
option(s) to have the given value(s); in this case the command returns an empty string.
|
||||
<I>Option</I> may have any of the values accepted by the creation command.
|
||||
Read-only options are not be modified.
|
||||
|
||||
</DD></DL>
|
||||
<DL><DT><A NAME="getframe"><I>pathName</I> <B>getframe</B></A>
|
||||
</DT><DD>
|
||||
|
||||
Return the pathname of the frame where the scrolled widget should be created. This command
|
||||
is no longer needed. You can directly create the scrolled widget as the child
|
||||
of <I>pathName</I>.
|
||||
</DD></DL>
|
||||
<DL><DT><A NAME="setwidget"><I>pathName</I> <B>setwidget</B></A>
|
||||
<I>widget</I>
|
||||
</DT><DD>
|
||||
|
||||
Associate <I>widget</I> to the the scrollbars. <I>widget</I> becomes
|
||||
managed by the ScrolledWindow. The user should not attempt to manage
|
||||
<I>widget</I> until it is no longer managed by the ScrolledWindow.
|
||||
<I>widget</I> must be a scrollable widget, i.e. have the options
|
||||
<B>xscrollcommand</B>/<B>yscrollcommand</B> and the command <B>xview</B>/<B>yview</B>,
|
||||
such as canvas or text.
|
||||
</DD></DL>
|
||||
</BODY></HTML>
|
211
R_portable/R/App/R-portable/Tcl/bin64/lib/bwidget-1.9.12/BWman/SelectColor.html
Executable file
@ -0,0 +1,211 @@
|
||||
<HTML>
|
||||
<HEAD><TITLE>SelectColor</TITLE></HEAD>
|
||||
<BODY BGCOLOR=white>
|
||||
<DL><DT><I><A HREF="#descr">NAME</A></I></DT>
|
||||
<DD><B>SelectColor</B>
|
||||
- Color selection widget
|
||||
</DD></DL>
|
||||
<DL>
|
||||
<DT><I>CREATION</I></DT>
|
||||
<DD><A HREF="#descr"><B>SelectColor</B></A> <I>pathName</I> ?<I>option value...</I>?</DD>
|
||||
</DL>
|
||||
<DL>
|
||||
<DT><I><A HREF="#wso">WIDGET-SPECIFIC OPTIONS</A></I></DT>
|
||||
<DD><TABLE CELLSPACING=0 CELLSPACING=0 BORDER=0>
|
||||
<TR>
|
||||
<TD> <A HREF="#-background">-background</A></td>
|
||||
<TD> <A HREF="#-color">-color</A></td>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> <A HREF="#-command">-command</A></td>
|
||||
<TD> <A HREF="#-help">-help</A></td>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> <A HREF="#-parent">-parent</A></td>
|
||||
<TD> <A HREF="#-placement">-placement</A></td>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> <A HREF="#-title">-title</A></td>
|
||||
<TD> <A HREF="#-type">-type</A></td>
|
||||
</TR>
|
||||
</TABLE></DD>
|
||||
</DL>
|
||||
<DL>
|
||||
<DT><I><A HREF="#wc">WIDGET COMMAND</A></I></DT>
|
||||
<DD><I>pathName</I> <A HREF="#cget"><B>cget</B></A>
|
||||
<I>option</I>
|
||||
</DD>
|
||||
<DD><I>pathName</I> <A HREF="#configure"><B>configure</B></A>
|
||||
?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
|
||||
</DD>
|
||||
<DD>SelectColor::<A HREF="#dialog"><B>dialog</B></A>
|
||||
<I>pathName</I>
|
||||
<I>?option value ...?</I>
|
||||
</DD>
|
||||
<DD>SelectColor::<A HREF="#menu"><B>menu</B></A>
|
||||
<I>pathName</I>
|
||||
<I>placement</I>
|
||||
<I>?option value ...?</I>
|
||||
</DD>
|
||||
<DD>SelectColor::<A HREF="#setbasecolor"><B>setbasecolor</B></A>
|
||||
<I>index</I>
|
||||
<I>color</I>
|
||||
</DD>
|
||||
<DD>SelectColor::<A HREF="#setcolor"><B>setcolor</B></A>
|
||||
<I>index</I>
|
||||
<I>color</I>
|
||||
</DD>
|
||||
</DL>
|
||||
<BR><HR WIDTH="100%"><BR>
|
||||
<B><A NAME="descr"></A>DESCRIPTION</B><BR>
|
||||
<P>
|
||||
|
||||
SelectColor provides a simple way to select color. It can be displayed
|
||||
as a dialog box or as a menubutton.
|
||||
|
||||
</P>
|
||||
<BR><HR WIDTH="50%"><BR>
|
||||
<B><A NAME="wso">WIDGET-SPECIFIC OPTIONS</A></B><BR>
|
||||
<DL><DT><A NAME="-background"><B>-background</B></A></DT>
|
||||
<DD>
|
||||
|
||||
Specifies the background color of the widget.
|
||||
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="-color"><B>-color</B></A></DT>
|
||||
<DD>
|
||||
|
||||
Specifies the initial color used in the widget's color selectors. When modifying a
|
||||
color that is used in the GUI, the value supplied is typically the existing value of
|
||||
that color.
|
||||
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="-command"><B>-command</B></A></DT>
|
||||
<DD>
|
||||
|
||||
Specifies a command to be evaluated, with a color value appended, whenever
|
||||
the color selected in the dialog changes. This facility can be used to modify
|
||||
a color in the calling GUI and preview the change before deciding whether or not
|
||||
to accept it. If the user selects "Cancel" in the dialog, the command is called
|
||||
a final time to restore the initial color (supplied by option <B>-color</B>) that was
|
||||
used before the dialog was opened.
|
||||
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="-help"><B>-help</B></A></DT>
|
||||
<DD>
|
||||
|
||||
This option takes a Boolean value. If the value is Boolean true, the SelectColor
|
||||
dialog will include a balloon help for text entry and mouse operation.
|
||||
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="-parent"><B>-parent</B></A></DT>
|
||||
<DD>
|
||||
|
||||
Parent of the Dialog. Dialog is centered in its parent. If empty, it is centered in
|
||||
root window.
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="-placement"><B>-placement</B></A></DT>
|
||||
<DD>
|
||||
|
||||
Where to place the <i>popup</i> color dialog when displaying it.
|
||||
Must be any of: <b>at</b>, <b>center</b>, <b>left</b>,
|
||||
<b>right</b>, <b>above</b>, or <b>below</b>. If <i>-parent</i> is specified,
|
||||
placement will be in relation to the parent widget.
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="-title"><B>-title</B></A></DT>
|
||||
<DD>
|
||||
|
||||
Title of the Dialog toplevel.
|
||||
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="-type"><B>-type (read-only)</B></A></DT>
|
||||
<DD>
|
||||
|
||||
Specifies the type of the SelectColor widget. Must be <B>dialog</B> or
|
||||
<B>popup</B>. <BR>If <B>type</B> option is <I>dialog</I>,
|
||||
SelectColor::<B>create</B> directly creates the dialog, displays it and
|
||||
return an empty string if cancel button is pressed or if dialog is destroyed,
|
||||
and the selected color if ok button is pressed. In all cases, dialog is
|
||||
destroyed. <BR>If <B>type</B> option is <I>popup</I>,
|
||||
SelectColor::<B>create</B> creates a small, popup dialog with a small set of
|
||||
predefined colors and a button to activate a full color dialog.
|
||||
|
||||
</DD>
|
||||
</DL>
|
||||
<HR WIDTH="50%"><BR>
|
||||
<B><A NAME="wc">WIDGET COMMAND</A></B><BR>
|
||||
<DL><DT><A NAME="cget"><I>pathName</I> <B>cget</B></A>
|
||||
<I>option</I>
|
||||
</DT><DD>
|
||||
|
||||
Returns the current value of the configuration option given by <I>option</I>.
|
||||
<I>Option</I> may have any of the values accepted by the creation command.
|
||||
</DD></DL>
|
||||
<DL><DT><A NAME="configure"><I>pathName</I> <B>configure</B></A>
|
||||
?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
|
||||
</DT><DD>
|
||||
|
||||
Query or modify the configuration options of the widget. If no <I>option</I> is specified,
|
||||
returns a list describing all of the available options for <I>pathName</I>.
|
||||
If <I>option</I> is specified with no <I>value</I>, then the command returns a list
|
||||
describing the one named <I>option</I> (this list will be identical to the corresponding
|
||||
sublist of the value returned if no <I>option</I> is specified). If one or
|
||||
more <I>option-value</I> pairs are specified, then the command modifies the given widget
|
||||
option(s) to have the given value(s); in this case the command returns an empty string.
|
||||
<I>Option</I> may have any of the values accepted by the creation command.
|
||||
Read-only options are not be modified.
|
||||
|
||||
</DD></DL>
|
||||
<DL><DT><A NAME="dialog">SelectColor::<B>dialog</B></A>
|
||||
<I>pathName</I>
|
||||
<I>?option value ...?</I>
|
||||
</DT><DD>
|
||||
|
||||
Creates a dialog for the user to select a custom color.
|
||||
|
||||
</DD></DL>
|
||||
|
||||
<DL><DT><A NAME="dialog">SelectColor::<B>menu</B></A>
|
||||
<I>pathName</I>
|
||||
<I>placement</I>
|
||||
<I>?option value ...?</I>
|
||||
</DT><DD>
|
||||
|
||||
Creates a small, popup dialog for the user to select from a predefined list
|
||||
of colors with an additional button to display a full color dialog.
|
||||
|
||||
<p>
|
||||
<i>placement</i> can be any of <b>at</b>, <b>center</b>, <b>left</b>,
|
||||
<b>right</b>, <b>above</b>, or <b>below</b>. If <i>-parent</i> is specified,
|
||||
placement will be in relation to the parent widget.
|
||||
</p>
|
||||
|
||||
</DD></DL>
|
||||
|
||||
</DD></DL>
|
||||
<DL><DT><A NAME="setbasecolor">SelectColor::<B>setbasecolor</B></A>
|
||||
<I>index</I>
|
||||
<I>color</I>
|
||||
</DT><DD>
|
||||
|
||||
Set the value of user predefined base color at index <I>index</I> to <I>color</I>.
|
||||
<I>index</I> must be between 0 and 10.
|
||||
|
||||
</DD></DL>
|
||||
<DL><DT><A NAME="setcolor">SelectColor::<B>setcolor</B></A>
|
||||
<I>index</I>
|
||||
<I>color</I>
|
||||
</DT><DD>
|
||||
|
||||
Set the value of user predefined color at index <I>index</I> to <I>color</I>.
|
||||
<I>index</I> must be between 0 and 10.
|
||||
|
||||
</DD></DL>
|
||||
</BODY></HTML>
|
152
R_portable/R/App/R-portable/Tcl/bin64/lib/bwidget-1.9.12/BWman/SelectFont.html
Executable file
@ -0,0 +1,152 @@
|
||||
<HTML>
|
||||
<HEAD><TITLE>SelectFont</TITLE></HEAD>
|
||||
<BODY BGCOLOR=white>
|
||||
<DL><DT><I><A HREF="#descr">NAME</A></I></DT>
|
||||
<DD><B>SelectFont</B>
|
||||
- Font selection widget
|
||||
</DD></DL>
|
||||
<DL>
|
||||
<DT><I>CREATION</I></DT>
|
||||
<DD><A HREF="#descr"><B>SelectFont</B></A> <I>pathName</I> ?<I>option value...</I>?</DD>
|
||||
</DL>
|
||||
<DL>
|
||||
<DT><I>STANDARD OPTIONS</I></DT>
|
||||
<DD><TABLE CELLSPACING=0 CELLSPACING=0 BORDER=0>
|
||||
<TR>
|
||||
<TD> <A HREF="options.htm#M-background">-background or -bg</A></TD>
|
||||
<TD> <A HREF="options.htm#M-font">-font</A></TR>
|
||||
</TR>
|
||||
</TABLE></DD>
|
||||
</DL>
|
||||
<DL>
|
||||
<DT><I><A HREF="#wso">WIDGET-SPECIFIC OPTIONS</A></I></DT>
|
||||
<DD><TABLE CELLSPACING=0 CELLSPACING=0 BORDER=0>
|
||||
<TR>
|
||||
<TD> <A HREF="#-command">-command</A></TR>
|
||||
<TD> <A HREF="#-initialcolor">-initialcolor</A></TR>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> <A HREF="#-nosizes">-nosizes</A></TR>
|
||||
<TD> <A HREF="#-parent">-parent</A></TR>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> <A HREF="#-sampletext">-sampletext</A></TR>
|
||||
<TD> <A HREF="#-title">-title</A></TR>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> <A HREF="#-type">-type</A></TR>
|
||||
</TABLE></DD>
|
||||
</DL>
|
||||
<DL>
|
||||
<DT><I><A HREF="#wc">WIDGET COMMAND</A></I></DT>
|
||||
<DD><I>pathName</I> <A HREF="#cget"><B>cget</B></A>
|
||||
<I>option</I>
|
||||
</DD>
|
||||
<DD><I>pathName</I> <A HREF="#configure"><B>configure</B></A>
|
||||
?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
|
||||
</DD>
|
||||
<DD>SelectFont::<A HREF="#loadfont"><B>loadfont</B></A>
|
||||
</DD>
|
||||
</DL>
|
||||
<BR><HR WIDTH="100%"><BR>
|
||||
<B><A NAME="descr"></A>DESCRIPTION</B><BR>
|
||||
<P>
|
||||
|
||||
SelectFont provides a simple way to choose font. It can be displayed
|
||||
as a dialog box or as a toolbar.
|
||||
<BR>Textual items in Dialog box uses <B>-name</B> options so they
|
||||
can be translated to any language. Symbolic name used are
|
||||
<B>ok</B>, <B>cancel</B>, <B>font</B>, <B>size</B>, <B>style</B>,
|
||||
<B>bold</B>, <B>italic</B>, <B>underline</B> and <B>overstrike</B>.
|
||||
|
||||
</P>
|
||||
<BR><HR WIDTH="50%"><BR>
|
||||
<B><A NAME="wso">WIDGET-SPECIFIC OPTIONS</A></B><BR>
|
||||
<DL><DT><A NAME="-command"><B>-command</B></A></DT>
|
||||
<DD>
|
||||
|
||||
Specifies a command to call when user select a new font when SelectFont <B>type</B>
|
||||
option is <I>toolbar</I>.
|
||||
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="-initialcolor"><B>-initialcolor</B></A></DT>
|
||||
<DD>
|
||||
|
||||
If specified, add an additional button that lets the user pick a
|
||||
color. This option is ignored if <B>type</B> is <I>toolbar</I>.
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="-nosizes"><B>-nosizes</B></A></DT>
|
||||
<DD>
|
||||
|
||||
If true, don't show the listbox containing valid font sizes. This
|
||||
option is ignored if <B>type</B> is <I>toolbar</I>.
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="-parent"><B>-parent</B></A></DT>
|
||||
<DD>
|
||||
|
||||
Parent of the Dialog. Dialog is centered in its parent. If empty, it is centered in
|
||||
root window.
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="-sampletext"><B>-sampletext</B></A></DT>
|
||||
<DD>
|
||||
|
||||
Specifies the text displayed in the preview area.
|
||||
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="-title"><B>-title</B></A></DT>
|
||||
<DD>
|
||||
|
||||
Title of the Dialog toplevel.
|
||||
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="-type"><B>-type</B></A></DT>
|
||||
<DD>
|
||||
|
||||
Specifies the type of the SelectFont widget. Must be <B>dialog</B> or <B>toolbar</B>.
|
||||
<BR>If <B>type</B> option is <I>dialog</I>, SelectFont::<B>create</B> directly creates the
|
||||
dialog, displays it and return an empty string if cancel button is
|
||||
pressed or if dialog is destroyed, and the selected font (and color
|
||||
if <B>initialcolor</B>) if ok button is pressed. In all cases, dialog
|
||||
is destroyed.
|
||||
<BR>If <B>type</B> option is <I>toolbar</I>, SelectFont::<B>create</B> returns the pathname
|
||||
of the widget created.
|
||||
|
||||
</DD>
|
||||
</DL>
|
||||
<HR WIDTH="50%"><BR>
|
||||
<B><A NAME="wc">WIDGET COMMAND</A></B><BR>
|
||||
<DL><DT><A NAME="cget"><I>pathName</I> <B>cget</B></A>
|
||||
<I>option</I>
|
||||
</DT><DD>
|
||||
|
||||
Returns the current value of the configuration option given by <I>option</I>.
|
||||
<I>Option</I> may have any of the values accepted by the creation command.
|
||||
</DD></DL>
|
||||
<DL><DT><A NAME="configure"><I>pathName</I> <B>configure</B></A>
|
||||
?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
|
||||
</DT><DD>
|
||||
|
||||
Query or modify the configuration options of the widget. If no <I>option</I> is specified,
|
||||
returns a list describing all of the available options for <I>pathName</I>.
|
||||
If <I>option</I> is specified with no <I>value</I>, then the command returns a list
|
||||
describing the one named <I>option</I> (this list will be identical to the corresponding
|
||||
sublist of the value returned if no <I>option</I> is specified). If one or
|
||||
more <I>option-value</I> pairs are specified, then the command modifies the given widget
|
||||
option(s) to have the given value(s); in this case the command returns an empty string.
|
||||
<I>Option</I> may have any of the values accepted by the creation command.
|
||||
Read-only options are not be modified.
|
||||
|
||||
</DD></DL>
|
||||
<DL><DT><A NAME="loadfont">SelectFont::<B>loadfont</B></A>
|
||||
</DT><DD>
|
||||
|
||||
Load the font available in the system.
|
||||
|
||||
</DD></DL>
|
||||
</BODY></HTML>
|
@ -0,0 +1,77 @@
|
||||
<HTML>
|
||||
<HEAD><TITLE>Separator</TITLE></HEAD>
|
||||
<BODY BGCOLOR=white>
|
||||
<DL><DT><I><A HREF="#descr">NAME</A></I></DT>
|
||||
<DD><B>Separator</B>
|
||||
- 3D separator widget
|
||||
</DD></DL>
|
||||
<DL>
|
||||
<DT><I>CREATION</I></DT>
|
||||
<DD><A HREF="#descr"><B>Separator</B></A> <I>pathName</I> ?<I>option value...</I>?</DD>
|
||||
</DL>
|
||||
<DL>
|
||||
<DT><I>STANDARD OPTIONS</I></DT>
|
||||
<DD><TABLE CELLSPACING=0 CELLSPACING=0 BORDER=0>
|
||||
<TR>
|
||||
<TD> <A HREF="options.htm#M-background">-background or -bg</A></TD>
|
||||
<TD> <A HREF="options.htm#M-orient">-orient</A></TR>
|
||||
</TR>
|
||||
</TABLE></DD>
|
||||
</DL>
|
||||
<DL>
|
||||
<DT><I><A HREF="#wso">WIDGET-SPECIFIC OPTIONS</A></I></DT>
|
||||
<DD><TABLE CELLSPACING=0 CELLSPACING=0 BORDER=0>
|
||||
<TR>
|
||||
<TD> <A HREF="#-relief">-relief</A></TR>
|
||||
</TABLE></DD>
|
||||
</DL>
|
||||
<DL>
|
||||
<DT><I><A HREF="#wc">WIDGET COMMAND</A></I></DT>
|
||||
<DD><I>pathName</I> <A HREF="#cget"><B>cget</B></A>
|
||||
<I>option</I>
|
||||
</DD>
|
||||
<DD><I>pathName</I> <A HREF="#configure"><B>configure</B></A>
|
||||
?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
|
||||
</DD>
|
||||
</DL>
|
||||
<BR><HR WIDTH="100%"><BR>
|
||||
<B><A NAME="descr"></A>DESCRIPTION</B><BR>
|
||||
<P>
|
||||
|
||||
Separator is a widget that display an horizontal or vertical 3-D line.
|
||||
|
||||
</P>
|
||||
<BR><HR WIDTH="50%"><BR>
|
||||
<B><A NAME="wso">WIDGET-SPECIFIC OPTIONS</A></B><BR>
|
||||
<DL><DT><A NAME="-relief"><B>-relief</B></A></DT>
|
||||
<DD>
|
||||
|
||||
Specifies the relief of the Separator. Must be <B>groove</B> (the default) or <B>ridge</B>.
|
||||
|
||||
</DD>
|
||||
</DL>
|
||||
<HR WIDTH="50%"><BR>
|
||||
<B><A NAME="wc">WIDGET COMMAND</A></B><BR>
|
||||
<DL><DT><A NAME="cget"><I>pathName</I> <B>cget</B></A>
|
||||
<I>option</I>
|
||||
</DT><DD>
|
||||
|
||||
Returns the current value of the configuration option given by <I>option</I>.
|
||||
<I>Option</I> may have any of the values accepted by the creation command.
|
||||
</DD></DL>
|
||||
<DL><DT><A NAME="configure"><I>pathName</I> <B>configure</B></A>
|
||||
?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
|
||||
</DT><DD>
|
||||
|
||||
Query or modify the configuration options of the widget. If no <I>option</I> is specified,
|
||||
returns a list describing all of the available options for <I>pathName</I>.
|
||||
If <I>option</I> is specified with no <I>value</I>, then the command returns a list
|
||||
describing the one named <I>option</I> (this list will be identical to the corresponding
|
||||
sublist of the value returned if no <I>option</I> is specified). If one or
|
||||
more <I>option-value</I> pairs are specified, then the command modifies the given widget
|
||||
option(s) to have the given value(s); in this case the command returns an empty string.
|
||||
<I>Option</I> may have any of the values accepted by the creation command.
|
||||
Read-only options are not be modified.
|
||||
|
||||
</DD></DL>
|
||||
</BODY></HTML>
|
250
R_portable/R/App/R-portable/Tcl/bin64/lib/bwidget-1.9.12/BWman/SpinBox.html
Executable file
@ -0,0 +1,250 @@
|
||||
<HTML>
|
||||
<HEAD><TITLE>SpinBox</TITLE></HEAD>
|
||||
<BODY BGCOLOR=white>
|
||||
<DL><DT><I><A HREF="#descr">NAME</A></I></DT>
|
||||
<DD><B>SpinBox</B>
|
||||
- SpinBox widget
|
||||
</DD></DL>
|
||||
<DL>
|
||||
<DT><I>CREATION</I></DT>
|
||||
<DD><A HREF="#descr"><B>SpinBox</B></A> <I>pathName</I> ?<I>option value...</I>?</DD>
|
||||
</DL>
|
||||
<DL>
|
||||
<DT><I><A HREF="ArrowButton.html">OPTIONS from <B>ArrowButton</B></A></I></DT>
|
||||
<DD><TABLE CELLSPACING=0 CELLPADDING=0 BORDER=0>
|
||||
<TR>
|
||||
<TD> -background or -bg</TD>
|
||||
<TD> -disabledforeground</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> -foreground or -fg</TD>
|
||||
<TD> -repeatdelay</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> -repeatinterval</TD>
|
||||
<TD> -state</TD>
|
||||
</TR>
|
||||
</TABLE></DD>
|
||||
</DL>
|
||||
<DL>
|
||||
<DT><I><A HREF="Entry.html">OPTIONS from <B>Entry</B></A></I></DT>
|
||||
<DD><TABLE CELLSPACING=0 CELLPADDING=0 BORDER=0>
|
||||
<TR>
|
||||
<TD> -command</TD>
|
||||
<TD> -disabledforeground</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> -dragenabled</TD>
|
||||
<TD> -dragendcmd</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> -dragevent</TD>
|
||||
<TD> -draginitcmd</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> -dragtype</TD>
|
||||
<TD> -dropcmd</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> -dropenabled</TD>
|
||||
<TD> -dropovercmd</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> -droptypes</TD>
|
||||
<TD> -editable</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> -entrybg (see <B>-background</B>)</TD>
|
||||
<TD> -entryfg (see <B>-foreground</B>)</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> -exportselection</TD>
|
||||
<TD> -font</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> -helptext</TD>
|
||||
<TD> -helptype</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> -helpvar</TD>
|
||||
<TD> -highlightbackground</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> -highlightcolor</TD>
|
||||
<TD> -highlightthickness</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> -insertbackground</TD>
|
||||
<TD> -insertborderwidth</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> -insertofftime</TD>
|
||||
<TD> -insertontime</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> -insertwidth</TD>
|
||||
<TD> -justify</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> -selectbackground</TD>
|
||||
<TD> -selectborderwidth</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> -selectforeground</TD>
|
||||
<TD> -show</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> -state</TD>
|
||||
<TD> -takefocus</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> -text</TD>
|
||||
<TD> -textvariable</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> -width</TD>
|
||||
<TD> -xscrollcommand</TD>
|
||||
</TR>
|
||||
</TABLE></DD>
|
||||
</DL>
|
||||
<DL>
|
||||
<DT><I><A HREF="#wso">WIDGET-SPECIFIC OPTIONS</A></I></DT>
|
||||
<DD><TABLE CELLSPACING=0 CELLSPACING=0 BORDER=0>
|
||||
<TR>
|
||||
<TD> <A HREF="#-modifycmd">-modifycmd</A></TR>
|
||||
<TD> <A HREF="#-range">-range</A></TR>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> <A HREF="#-values">-values</A></TR>
|
||||
</TABLE></DD>
|
||||
</DL>
|
||||
<DL>
|
||||
<DT><I><A HREF="#wc">WIDGET COMMAND</A></I></DT>
|
||||
<DD><I>pathName</I> <A HREF="#bind"><B>bind</B></A>
|
||||
?<I>arg...</I>?
|
||||
</DD>
|
||||
<DD><I>pathName</I> <A HREF="#cget"><B>cget</B></A>
|
||||
<I>option</I>
|
||||
</DD>
|
||||
<DD><I>pathName</I> <A HREF="#configure"><B>configure</B></A>
|
||||
?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
|
||||
</DD>
|
||||
<DD><I>pathName</I> <A HREF="#getvalue"><B>getvalue</B></A>
|
||||
</DD>
|
||||
<DD><I>pathName</I> <A HREF="#setvalue"><B>setvalue</B></A>
|
||||
<I>index</I>
|
||||
</DD>
|
||||
</DL>
|
||||
<BR><HR WIDTH="100%"><BR>
|
||||
<B><A NAME="descr"></A>DESCRIPTION</B><BR>
|
||||
<P>
|
||||
|
||||
SpinBox widget enables the user to select a value among a list given by the <B>values</B>
|
||||
option or a set of values defined by a mininum, a maximum and an increment.
|
||||
Notice that <B>range</B> option defines a list of values, so <B>getvalue</B> and
|
||||
<B>setvalue</B> work with both values and range.
|
||||
|
||||
</P>
|
||||
<BR><HR WIDTH="50%"><BR>
|
||||
<B><A NAME="wso">WIDGET-SPECIFIC OPTIONS</A></B><BR>
|
||||
<DL><DT><A NAME="-modifycmd"><B>-modifycmd</B></A></DT>
|
||||
<DD>
|
||||
|
||||
Specifies a Tcl command called when the user modify the value of the SpinBox.
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="-range"><B>-range</B></A></DT>
|
||||
<DD>
|
||||
|
||||
Specifies a list of three intergers (or real) describing the minimum, maximum and increment
|
||||
of the SpinBox.
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="-values"><B>-values</B></A></DT>
|
||||
<DD>
|
||||
|
||||
Specifies the values accepted by the SpinBox. This option takes precedence over
|
||||
<B>range</B> option.
|
||||
</DD>
|
||||
</DL>
|
||||
<HR WIDTH="50%"><BR>
|
||||
<B><A NAME="wc">WIDGET COMMAND</A></B><BR>
|
||||
<DL><DT><A NAME="bind"><I>pathName</I> <B>bind</B></A>
|
||||
?<I>arg...</I>?
|
||||
</DT><DD>
|
||||
|
||||
Set bindings on the entry widget.
|
||||
|
||||
</DD></DL>
|
||||
<DL><DT><A NAME="cget"><I>pathName</I> <B>cget</B></A>
|
||||
<I>option</I>
|
||||
</DT><DD>
|
||||
|
||||
Returns the current value of the configuration option given by <I>option</I>.
|
||||
<I>Option</I> may have any of the values accepted by the creation command.
|
||||
</DD></DL>
|
||||
<DL><DT><A NAME="configure"><I>pathName</I> <B>configure</B></A>
|
||||
?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
|
||||
</DT><DD>
|
||||
|
||||
Query or modify the configuration options of the widget. If no <I>option</I> is specified,
|
||||
returns a list describing all of the available options for <I>pathName</I>.
|
||||
If <I>option</I> is specified with no <I>value</I>, then the command returns a list
|
||||
describing the one named <I>option</I> (this list will be identical to the corresponding
|
||||
sublist of the value returned if no <I>option</I> is specified). If one or
|
||||
more <I>option-value</I> pairs are specified, then the command modifies the given widget
|
||||
option(s) to have the given value(s); in this case the command returns an empty string.
|
||||
<I>Option</I> may have any of the values accepted by the creation command.
|
||||
Read-only options are not be modified.
|
||||
|
||||
</DD></DL>
|
||||
<DL><DT><A NAME="getvalue"><I>pathName</I> <B>getvalue</B></A>
|
||||
</DT><DD>
|
||||
|
||||
Returns the index of the current text of the SpinBox in the list of values,
|
||||
or -1 if it doesn't match any value.
|
||||
|
||||
</DD></DL>
|
||||
<DL><DT><A NAME="setvalue"><I>pathName</I> <B>setvalue</B></A>
|
||||
<I>index</I>
|
||||
</DT><DD>
|
||||
|
||||
Set the text of the SpinBox to the value indicated by <I>index</I> in the list of values.
|
||||
<I>index</I> may be specified in any of the following forms:
|
||||
<P>
|
||||
<DL COMPACT>
|
||||
<DT>
|
||||
<B>last</B>
|
||||
<DD>
|
||||
Specifies the last element of the list of values.
|
||||
<DT><B>first</B>
|
||||
<DD>
|
||||
Specifies the first element of the list of values.
|
||||
<DT>
|
||||
<B>next</B>
|
||||
<DD>
|
||||
Specifies the element following the current (ie returned by <B>getvalue</B>) in the list
|
||||
of values.
|
||||
<DT><B>previous</B>
|
||||
<DD>
|
||||
Specifies the element preceding the current (ie returned by <B>getvalue</B>) in the list
|
||||
of values.
|
||||
<DT>
|
||||
@<I>number</I>
|
||||
<DD>
|
||||
Specifies the integer index in the list of values.
|
||||
</DL>
|
||||
|
||||
</DD></DL>
|
||||
<HR><BR><B>BINDINGS</B><BR><BR>
|
||||
|
||||
When Entry of the SpinBox has the input focus, it has the following bindings, in addition
|
||||
to the default Entry bindings:
|
||||
<UL>
|
||||
<LI>Page up set the value of the SpinBox to the last value.
|
||||
<LI>Page down set the value of the SpinBox to the first value.
|
||||
<LI>Arrow up set the value of the SpinBox to the next value.
|
||||
<LI>Arrow down set the value of the SpinBox to the previous value.
|
||||
</UL>
|
||||
|
||||
</BODY></HTML>
|
147
R_portable/R/App/R-portable/Tcl/bin64/lib/bwidget-1.9.12/BWman/StatusBar.html
Executable file
@ -0,0 +1,147 @@
|
||||
<HTML>
|
||||
<HEAD><TITLE>StatusBar</TITLE></HEAD>
|
||||
<BODY BGCOLOR=white>
|
||||
<DL><DT><I><A HREF="#descr">NAME</A></I></DT>
|
||||
<DD><B>StatusBar</B>
|
||||
- status bar widget
|
||||
</DD></DL>
|
||||
<DL>
|
||||
<DT><I>CREATION</I></DT>
|
||||
<DD><A HREF="#descr"><B>StatusBar</B></A> <I>pathName</I> ?<I>option value...</I>?</DD>
|
||||
</DL>
|
||||
<DL>
|
||||
<DT><I>STANDARD OPTIONS</I></DT>
|
||||
<DD><TABLE CELLSPACING=0 CELLSPACING=0 BORDER=0>
|
||||
<TR>
|
||||
<TD> <A HREF="options.htm#M-background">-background or -bg</A></TD>
|
||||
<TD> <A HREF="options.htm#M-borderwidth">-borderwidth or -bd</A></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> <A HREF="options.htm#M-foreground">-foreground or -fg</A></TD>
|
||||
<TD> <A HREF="options.htm#M-orient">-orient</A></TR>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> <A HREF="options.htm#M-relief">-relief</A></TR>
|
||||
<TD> <A HREF="options.htm#M-troughcolor">-troughcolor</A></TR>
|
||||
</TR>
|
||||
</TABLE></DD>
|
||||
</DL>
|
||||
<DL>
|
||||
<DT><I><A HREF="#wso">WIDGET-SPECIFIC OPTIONS</A></I></DT>
|
||||
<DD><TABLE CELLSPACING=0 CELLSPACING=0 BORDER=0>
|
||||
<TR>
|
||||
<TD> <A HREF="#-height">-height</A></TR>
|
||||
<TD> <A HREF="#-showresize">-showresize</A></TR>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> <A HREF="#-ipad">-ipad</A></TR>
|
||||
<TD> <A HREF="#-pad">-pad</A></TR>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> <A HREF="#-width">-width</A>
|
||||
</TR>
|
||||
</TABLE></DD>
|
||||
</DL>
|
||||
<DL>
|
||||
<DT><I><A HREF="#wc">WIDGET COMMAND</A></I></DT>
|
||||
<DD><I>pathName</I> <A HREF="#cget"><B>cget</B></A>
|
||||
<I>option</I>
|
||||
</DD>
|
||||
<DD><I>pathName</I> <A HREF="#configure"><B>configure</B></A>
|
||||
?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
|
||||
</DD>
|
||||
</DL>
|
||||
<BR><HR WIDTH="100%"><BR>
|
||||
<B><A NAME="descr"></A>DESCRIPTION</B><BR>
|
||||
|
||||
<P>
|
||||
StatusBar widget is a simple container widget with a corner resize control,
|
||||
meant to be placed at the bottom of a toplevel dialog.
|
||||
</P>
|
||||
|
||||
<BR><HR WIDTH="50%"><BR>
|
||||
<B><A NAME="wso">WIDGET-SPECIFIC OPTIONS</A></B><BR>
|
||||
<DL><DT><A NAME="-height"><B>-height</B></A></DT>
|
||||
<DD>
|
||||
Specifies the desired height for the widget.
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="-showresize"><B>-showresize</B></A></DT>
|
||||
<DD>
|
||||
Specifies whether to show the corner resize control.
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="-pad"><B>-pad</B></A></DT>
|
||||
<DD>
|
||||
The spacing to place around the status bar.
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="-ipad"><B>-ipad</B></A></DT>
|
||||
<DD>
|
||||
The spacing to place around individual status bar items.
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="-width"><B>-width</B></A></DT>
|
||||
<DD>
|
||||
Specifies the desired width for the widget.
|
||||
</DD>
|
||||
</DL>
|
||||
|
||||
<HR WIDTH="50%"><BR>
|
||||
<B><A NAME="wc">WIDGET COMMAND</A></B><BR>
|
||||
<DL><DT><A NAME="add"><I>pathName</I> <B>add</B></A> <B>widget</B>
|
||||
?<I>option</I> <I>value</I> <I>option</I> <I>value</I> ...?
|
||||
</DT><DD>
|
||||
Add a widget to the status bar. Possible options are:
|
||||
<DL>
|
||||
<DT><B>-weight</B></DT>
|
||||
<DD>Weighting of this item for resizing (passed to <B>grid</B>).</DD>
|
||||
<DT><B>-separator</B></DT>
|
||||
<DD>Whether to use a separator for this item.</DD>
|
||||
<DT><B>-sticky</B></DT>
|
||||
<DD>Passed on to grid.</DD>
|
||||
<DT><B>-pad</B></DT>
|
||||
<DD>Override of the widget's <B>-ipad</B> option for this item.</DD>
|
||||
</DL>
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="cget"><I>pathName</I> <B>cget</B></A>
|
||||
<I>option</I>
|
||||
</DT><DD>
|
||||
Returns the current value of the configuration option given by <I>option</I>.
|
||||
<I>Option</I> may have any of the values accepted by the creation command.
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="configure"><I>pathName</I> <B>configure</B></A>
|
||||
?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
|
||||
</DT><DD>
|
||||
|
||||
Query or modify the configuration options of the widget. If no
|
||||
<I>option</I> is specified, returns a list describing all of the available
|
||||
options for <I>pathName</I>. If <I>option</I> is specified with no
|
||||
<I>value</I>, then the command returns a list describing the one named
|
||||
<I>option</I> (this list will be identical to the corresponding sublist of
|
||||
the value returned if no <I>option</I> is specified). If one or more
|
||||
<I>option-value</I> pairs are specified, then the command modifies the
|
||||
given widget option(s) to have the given value(s); in this case the command
|
||||
returns an empty string.
|
||||
<I>Option</I> may have any of the values accepted by the creation command.
|
||||
Read-only options are not be modified.
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="delete"><I>pathName</I> <B>delete</B></A>
|
||||
<B>widget</B> ?<I>widget</I> ...?
|
||||
</DT><DD>
|
||||
Delete a widget and associated state from the status bar.</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="getframe"><I>pathName</I> <B>getframe</B></A>
|
||||
</DT><DD>
|
||||
Get the frame widget for the status bar in which status bar items should be
|
||||
created.</DD>
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="items"><I>pathName</I> <B>items</B></A>
|
||||
</DT><DD>List of items in the status bar.</DD>
|
||||
<DL>
|
||||
|
||||
</BODY></HTML>
|
107
R_portable/R/App/R-portable/Tcl/bin64/lib/bwidget-1.9.12/BWman/TitleFrame.html
Executable file
@ -0,0 +1,107 @@
|
||||
<HTML>
|
||||
<HEAD><TITLE>TitleFrame</TITLE></HEAD>
|
||||
<BODY BGCOLOR=white>
|
||||
<DL><DT><I><A HREF="#descr">NAME</A></I></DT>
|
||||
<DD><B>TitleFrame</B>
|
||||
- Frame with a title
|
||||
</DD></DL>
|
||||
<DL>
|
||||
<DT><I>CREATION</I></DT>
|
||||
<DD><A HREF="#descr"><B>TitleFrame</B></A> <I>pathName</I> ?<I>option value...</I>?</DD>
|
||||
</DL>
|
||||
<DL>
|
||||
<DT><I>STANDARD OPTIONS</I></DT>
|
||||
<DD><TABLE CELLSPACING=0 CELLSPACING=0 BORDER=0>
|
||||
<TR>
|
||||
<TD> <A HREF="options.htm#M-background">-background or -bg</A></TD>
|
||||
<TD> <A HREF="options.htm#M-borderwidth">-borderwidth or -bd</A></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> <A HREF="options.htm#M-font">-font</A></TR>
|
||||
<TD> <A HREF="options.htm#M-foreground">-foreground or -fg</A></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> <A HREF="options.htm#M-relief">-relief</A></TR>
|
||||
<TD> <A HREF="options.htm#M-text">-text</A></TR>
|
||||
</TR>
|
||||
</TABLE></DD>
|
||||
</DL>
|
||||
<DL>
|
||||
<DT><I><A HREF="#wso">WIDGET-SPECIFIC OPTIONS</A></I></DT>
|
||||
<DD><TABLE CELLSPACING=0 CELLSPACING=0 BORDER=0>
|
||||
<TR>
|
||||
<TD> <A HREF="#-baseline">-baseline</A></TR>
|
||||
<TD> <A HREF="#-ipad">-ipad</A></TR>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> <A HREF="#-side">-side</A></TR>
|
||||
</TABLE></DD>
|
||||
</DL>
|
||||
<DL>
|
||||
<DT><I><A HREF="#wc">WIDGET COMMAND</A></I></DT>
|
||||
<DD><I>pathName</I> <A HREF="#cget"><B>cget</B></A>
|
||||
<I>option</I>
|
||||
</DD>
|
||||
<DD><I>pathName</I> <A HREF="#configure"><B>configure</B></A>
|
||||
?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
|
||||
</DD>
|
||||
<DD><I>pathName</I> <A HREF="#getframe"><B>getframe</B></A>
|
||||
</DD>
|
||||
</DL>
|
||||
<BR><HR WIDTH="100%"><BR>
|
||||
<B><A NAME="descr"></A>DESCRIPTION</B><BR>
|
||||
<P>
|
||||
|
||||
TitleFrame enables user to create a frame with a title like XmFrame Motif widget.
|
||||
</P>
|
||||
<BR><HR WIDTH="50%"><BR>
|
||||
<B><A NAME="wso">WIDGET-SPECIFIC OPTIONS</A></B><BR>
|
||||
<DL><DT><A NAME="-baseline"><B>-baseline</B></A></DT>
|
||||
<DD>
|
||||
|
||||
Specifies the vertical alignment of the title: <B>top</B>, <B>center</B> or <B>bottom</B>.
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="-ipad"><B>-ipad</B></A></DT>
|
||||
<DD>
|
||||
|
||||
Specifies a pad between the border of the frame and the user frame.
|
||||
The value is in screen units.
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="-side"><B>-side</B></A></DT>
|
||||
<DD>
|
||||
|
||||
Specifies the horizontal alignment of the title: <B>left</B>, <B>center</B> or <B>right</B>.
|
||||
</DD>
|
||||
</DL>
|
||||
<HR WIDTH="50%"><BR>
|
||||
<B><A NAME="wc">WIDGET COMMAND</A></B><BR>
|
||||
<DL><DT><A NAME="cget"><I>pathName</I> <B>cget</B></A>
|
||||
<I>option</I>
|
||||
</DT><DD>
|
||||
|
||||
Returns the current value of the configuration option given by <I>option</I>.
|
||||
<I>Option</I> may have any of the values accepted by the creation command.
|
||||
</DD></DL>
|
||||
<DL><DT><A NAME="configure"><I>pathName</I> <B>configure</B></A>
|
||||
?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
|
||||
</DT><DD>
|
||||
|
||||
Query or modify the configuration options of the widget. If no <I>option</I> is specified,
|
||||
returns a list describing all of the available options for <I>pathName</I>.
|
||||
If <I>option</I> is specified with no <I>value</I>, then the command returns a list
|
||||
describing the one named <I>option</I> (this list will be identical to the corresponding
|
||||
sublist of the value returned if no <I>option</I> is specified). If one or
|
||||
more <I>option-value</I> pairs are specified, then the command modifies the given widget
|
||||
option(s) to have the given value(s); in this case the command returns an empty string.
|
||||
<I>Option</I> may have any of the values accepted by the creation command.
|
||||
Read-only options are not be modified.
|
||||
|
||||
</DD></DL>
|
||||
<DL><DT><A NAME="getframe"><I>pathName</I> <B>getframe</B></A>
|
||||
</DT><DD>
|
||||
|
||||
Return the frame where the user can create any other widget.
|
||||
</DD></DL>
|
||||
</BODY></HTML>
|
937
R_portable/R/App/R-portable/Tcl/bin64/lib/bwidget-1.9.12/BWman/Tree.html
Executable file
@ -0,0 +1,937 @@
|
||||
<HTML>
|
||||
<HEAD><TITLE>Tree</TITLE></HEAD>
|
||||
<BODY BGCOLOR=white>
|
||||
<DL><DT><I><A HREF="#descr">NAME</A></I></DT>
|
||||
<DD><B>Tree</B>
|
||||
- Tree widget
|
||||
</DD></DL>
|
||||
<DL>
|
||||
<DT><I>CREATION</I></DT>
|
||||
<DD><A HREF="#descr"><B>Tree</B></A> <I>pathName</I> ?<I>option value...</I>?</DD>
|
||||
</DL>
|
||||
<DL>
|
||||
<DT><I>STANDARD OPTIONS</I></DT>
|
||||
<DD><TABLE CELLSPACING=0 CELLSPACING=0 BORDER=0>
|
||||
<TR>
|
||||
<TD> <A HREF="options.htm#M-background">-background or -bg</A></TD>
|
||||
<TD> <A HREF="options.htm#M-borderwidth">-borderwidth or -bd</A></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> <A HREF="options.htm#M-cursor">-cursor</A></TD>
|
||||
<TD> <A HREF="options.htm#M-highlightbackground">-highlightbackground</A></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> <A HREF="options.htm#M-highlightcolor">-highlightcolor</A></TD>
|
||||
<TD> <A HREF="options.htm#M-highlightthickness">-highlightthickness</A></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> <A HREF="options.htm#M-relief">-relief</A></TD>
|
||||
<TD> <A HREF="options.htm#M-selectbackground">-selectbackground</A></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> <A HREF="options.htm#M-selectforeground">-selectforeground</A></TD>
|
||||
<TD> <A HREF="options.htm#M-takefocus">-takefocus</A></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> <A HREF="options.htm#M-xscrollcommand">-xscrollcommand</A></TD>
|
||||
<TD> <A HREF="options.htm#M-yscrollcommand">-yscrollcommand</A></TD>
|
||||
</TR>
|
||||
</TABLE></DD>
|
||||
</DL>
|
||||
<DL>
|
||||
<DT><I><A HREF="#wso">WIDGET-SPECIFIC OPTIONS</A></I></DT>
|
||||
<DD><TABLE CELLSPACING=0 CELLSPACING=0 BORDER=0>
|
||||
<TR>
|
||||
<TD> <A HREF="#-closecmd">-closecmd</A></TD>
|
||||
<TD> <A HREF="#-crossfill">-crossfill</A></TD>
|
||||
<TR>
|
||||
<TD> <A HREF="#-crossclosebitmap">-crossclosebitmap</A></TD>
|
||||
<TD> <A HREF="#-crosscloseimage">-crosscloseimage</A></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> <A HREF="#-crossopenbitmap">-crossopenbitmap</A></TD>
|
||||
<TD> <A HREF="#-crossopenimage">-crossopenimage</A></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> <A HREF="#-deltax">-deltax</A></TD>
|
||||
<TD> <A HREF="#-deltay">-deltay</A></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> <A HREF="#-dragenabled">-dragenabled</A></TD>
|
||||
<TD> <A HREF="#-dragendcmd">-dragendcmd</A></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> <A HREF="#-dragevent">-dragevent</A></TD>
|
||||
<TD> <A HREF="#-draginitcmd">-draginitcmd</A></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> <A HREF="#-dragtype">-dragtype</A></TD>
|
||||
<TD> <A HREF="#-dropcmd">-dropcmd</A></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> <A HREF="#-dropenabled">-dropenabled</A></TD>
|
||||
<TD> <A HREF="#-dropovercmd">-dropovercmd</A></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> <A HREF="#-dropovermode">-dropovermode</A></TD>
|
||||
<TD> <A HREF="#-droptypes">-droptypes</A></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> <A HREF="#-height">-height</A></TD>
|
||||
<TD> <A HREF="#-linesfill">-linesfill</A></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> <A HREF="#-linestipple">-linestipple</A></TD>
|
||||
<TD> <A HREF="#-opencmd">-opencmd</A></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> <A HREF="#-padx">-padx</A></TD>
|
||||
<TD> <A HREF="#-redraw">-redraw</A></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> <A HREF="#-selectcommand">-selectcommand</A></TD>
|
||||
<TD> <A HREF="#-selectfill">-selectfill</A></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> <A HREF="#-showlines">-showlines</A></TD>
|
||||
<TD> <A HREF="#-width">-width</A></TD>
|
||||
</TR>
|
||||
</TABLE></DD>
|
||||
</DL>
|
||||
|
||||
<DL>
|
||||
<DT><I><A HREF="#wc">WIDGET COMMAND</A></I></DT>
|
||||
<DD><I>pathName</I> <A HREF="#bindArea"><B>bindArea</B></A>
|
||||
<I>event</I>
|
||||
<I>script</I>
|
||||
</DD>
|
||||
<DD><I>pathName</I> <A HREF="#bindImage"><B>bindImage</B></A>
|
||||
<I>event</I>
|
||||
<I>script</I>
|
||||
</DD>
|
||||
<DD><I>pathName</I> <A HREF="#bindText"><B>bindText</B></A>
|
||||
<I>event</I>
|
||||
<I>script</I>
|
||||
</DD>
|
||||
<DD><I>pathName</I> <A HREF="#cget"><B>cget</B></A>
|
||||
<I>option</I>
|
||||
</DD>
|
||||
<DD><I>pathName</I> <A HREF="#closetree"><B>closetree</B></A>
|
||||
<I>node</I>
|
||||
</DD>
|
||||
<DD><I>pathName</I> <A HREF="#configure"><B>configure</B></A>
|
||||
?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
|
||||
</DD>
|
||||
<DD><I>pathName</I> <A HREF="#delete"><B>delete</B></A>
|
||||
?<I>arg...</I>?
|
||||
</DD>
|
||||
<DD><I>pathName</I> <A HREF="#edit"><B>edit</B></A>
|
||||
<I>node</I>
|
||||
<I>text</I>
|
||||
?<I>verifycmd</I>?
|
||||
?<I>clickres</I>?
|
||||
?<I>select</I>?
|
||||
</DD>
|
||||
<DD><I>pathName</I> <A HREF="#exists"><B>exists</B></A>
|
||||
<I>node</I>
|
||||
</DD>
|
||||
<DD><I>pathName</I> <A HREF="#find"><B>find</B></A>
|
||||
<I>findinfo</I>
|
||||
?<I>confine</I>?
|
||||
</DD>
|
||||
<DD><I>pathName</I> <A HREF="#index"><B>index</B></A>
|
||||
<I>node</I>
|
||||
</DD>
|
||||
<DD><I>pathName</I> <A HREF="#insert"><B>insert</B></A>
|
||||
<I>index</I>
|
||||
<I>parent</I>
|
||||
<I>node</I>
|
||||
?<I>option value...</I>?
|
||||
</DD>
|
||||
<DD><I>pathName</I> <A HREF="#itemcget"><B>itemcget</B></A>
|
||||
<I>node</I>
|
||||
<I>option</I>
|
||||
</DD>
|
||||
<DD><I>pathName</I> <A HREF="#itemconfigure"><B>itemconfigure</B></A>
|
||||
<I>node</I>
|
||||
?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
|
||||
</DD>
|
||||
<DD><I>pathName</I> <A HREF="#line"><B>line</B></A>
|
||||
<I>node</I>
|
||||
</DD>
|
||||
<DD><I>pathName</I> <A HREF="#move"><B>move</B></A>
|
||||
<I>parent</I>
|
||||
<I>node</I>
|
||||
<I>index</I>
|
||||
</DD>
|
||||
<DD><I>pathName</I> <A HREF="#nodes"><B>nodes</B></A>
|
||||
<I>node</I>
|
||||
?<I>first</I>?
|
||||
?<I>last</I>?
|
||||
</DD>
|
||||
<DD><I>pathName</I> <A HREF="#opentree"><B>opentree</B></A>
|
||||
<I>node</I>
|
||||
</DD>
|
||||
<DD><I>pathName</I> <A HREF="#parent"><B>parent</B></A>
|
||||
<I>node</I>
|
||||
</DD>
|
||||
<DD><I>pathName</I> <A HREF="#reorder"><B>reorder</B></A>
|
||||
<I>node</I>
|
||||
<I>neworder</I>
|
||||
</DD>
|
||||
<DD><I>pathName</I> <A HREF="#see"><B>see</B></A>
|
||||
<I>node</I>
|
||||
</DD>
|
||||
<DD><I>pathName</I> <A HREF="#selection"><B>selection</B></A>
|
||||
<I>cmd</I>
|
||||
?<I>arg...</I>?
|
||||
</DD>
|
||||
<DD><I>pathName</I> <A HREF="#toggle"><B>toggle</B></A>
|
||||
<I>node</I>
|
||||
</DD>
|
||||
<DD><I>pathName</I> <A HREF="#visible"><B>visible</B></A>
|
||||
<I>node</I>
|
||||
</DD>
|
||||
<DD><I>pathName</I> <A HREF="#xview"><B>xview</B></A>
|
||||
?<I>arg...</I>?
|
||||
</DD>
|
||||
<DD><I>pathName</I> <A HREF="#yview"><B>yview</B></A>
|
||||
?<I>arg...</I>?
|
||||
</DD>
|
||||
</DL>
|
||||
<BR><HR WIDTH="100%"><BR>
|
||||
<B><A NAME="descr"></A>DESCRIPTION</B><BR>
|
||||
<P>
|
||||
|
||||
<B>Tree</B> widget uses canvas to display a hierarchical list of items (called nodes).
|
||||
Each node is composed of a label with its own font and foreground attributes, and an optional
|
||||
image or window. Each node can have a list of subnodes, which can be collapsed or expanded.
|
||||
Each node is drawn in a single line, whose height is defined by the
|
||||
<B>deltay</B> option, so they must have at most this height.
|
||||
A node is uniquely identified by a string given at creation (by the
|
||||
<B>insert</B> command). The node named <I>root</I> is the root of
|
||||
the tree and is not drawn.
|
||||
The tree structure is directly maintained by the widget.
|
||||
|
||||
</P>
|
||||
<BR><HR WIDTH="50%"><BR>
|
||||
<B><A NAME="wso">WIDGET-SPECIFIC OPTIONS</A></B><BR>
|
||||
<DL><DT><A NAME="-closecmd"><B>-closecmd</B></A></DT>
|
||||
<DD>
|
||||
|
||||
Specifies a command to be called when user close a node. The
|
||||
closed node is appended to the command.
|
||||
|
||||
</DD>
|
||||
</DL>
|
||||
|
||||
<DL>
|
||||
<DT><A NAME="-crossfill"><B>-crossfill</B></A></DT>
|
||||
<DD>
|
||||
Specifies a foreground color for the cross bitmap.
|
||||
</DD>
|
||||
</DL>
|
||||
|
||||
<DL><DT><A NAME="-crossclosebitmap"><B>-crossclosebitmap</B></A></DT>
|
||||
<DD>
|
||||
Specifies a bitmap to be displayed in place of the standard cross
|
||||
when a node is closed.
|
||||
</DD>
|
||||
</DL>
|
||||
|
||||
<DL><DT><A NAME="-crosscloseimage"><B>-crosscloseimage</B></A></DT>
|
||||
<DD>
|
||||
Specifies an image to be displayed in place of the standard cross
|
||||
when a node is closed. Overrides the -crossclosebitmap option.
|
||||
</DD>
|
||||
</DL>
|
||||
|
||||
<DL><DT><A NAME="-crossopenbitmap"><B>-crossopenbitmap</B></A></DT>
|
||||
<DD>
|
||||
Specifies a bitmap to be displayed in place of the standard cross
|
||||
when a node is open.
|
||||
</DD>
|
||||
</DL>
|
||||
|
||||
<DL><DT><A NAME="-crossopenimage"><B>-crossopenimage</B></A></DT>
|
||||
<DD>
|
||||
Specifies an image to be displayed in place of the standard cross
|
||||
when a node is open. Overrides the -crossopenbitmap option.
|
||||
</DD>
|
||||
</DL>
|
||||
|
||||
<DL><DT><A NAME="-deltax"><B>-deltax</B></A></DT>
|
||||
<DD>
|
||||
|
||||
Specifies horizontal indentation between a node and its children.
|
||||
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="-deltay"><B>-deltay</B></A></DT>
|
||||
<DD>
|
||||
|
||||
Specifies vertical size of the nodes.
|
||||
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="-dragenabled"><B>-dragenabled</B></A></DT>
|
||||
<DD>
|
||||
A boolean specifying if drag is enabled.
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="-dragendcmd"><B>-dragendcmd</B></A></DT>
|
||||
<DD>
|
||||
|
||||
Specifies a command to be called when drag ended.
|
||||
<B>dragendcmd</B> must be a command conforming to the description of the
|
||||
option <B>dragendcmd</B> of <B>DragSite::<A HREF="DragSite.html#register">register</A></B>.
|
||||
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="-dragevent"><B>-dragevent</B></A></DT>
|
||||
<DD>
|
||||
|
||||
Specifies the number of the mouse button associated to the drag.
|
||||
Must be <B>1</B>, <B>2</B> or <B>3</B>.
|
||||
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="-draginitcmd"><B>-draginitcmd</B></A></DT>
|
||||
<DD>
|
||||
|
||||
Tree has a command wrapper for <I>drag-init</I> events. This command refused the drag
|
||||
if no node is designated. In other cases:
|
||||
<BR>If <B>draginitcmd</B> is empty, it returns:
|
||||
<UL>
|
||||
<LI>the value of option <B>dragtype</B> or <I>TREE_NODE</I> if empty as the data type,
|
||||
<LI><I>{copy move link}</I> as the operations,
|
||||
<LI>the node identifier as the data.
|
||||
</UL>
|
||||
If <B>draginitcmd</B> is not empty, it is called with the following arguments:
|
||||
<UL>
|
||||
<LI>the pathname of the tree,
|
||||
<LI>the identifier of the dragged node,
|
||||
<LI>the toplevel created to represent dragged data.
|
||||
</UL>
|
||||
and must return a value conforming to <B>draginitcmd</B> option described in
|
||||
<B>DragSite::<A HREF="DragSite.html#register">register</A></B>.
|
||||
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="-dragtype"><B>-dragtype</B></A></DT>
|
||||
<DD>
|
||||
|
||||
Specifies an alternate type of dragged object.
|
||||
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="-dropcmd"><B>-dropcmd</B></A></DT>
|
||||
<DD>
|
||||
|
||||
Tree has a command wrapper for <I>drop</I> events. This command stops auto scrolling
|
||||
and extract node and position.
|
||||
<BR>If <B>dropcmd</B> is not empty, it is called with the following arguments:
|
||||
<UL>
|
||||
<LI>the pathname of the tree,
|
||||
<LI>the pathname of the drag source,
|
||||
<LI>a list describing where the drop occurs. It can be:
|
||||
<UL>
|
||||
<LI><I>{</I><B>widget</B><I>}</I>,
|
||||
<LI><I>{</I><B>node</B> <I>node}</I> or
|
||||
<LI><I>{</I><B>position</B> <I>node index}</I>.
|
||||
</UL>
|
||||
<LI>the current operation,
|
||||
<LI>the data type,
|
||||
<LI>the data.
|
||||
</UL>
|
||||
|
||||
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="-dropenabled"><B>-dropenabled</B></A></DT>
|
||||
<DD>
|
||||
A boolean specifying if drop is enabled.
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="-dropovercmd"><B>-dropovercmd</B></A></DT>
|
||||
<DD>
|
||||
|
||||
Tree has a command wrapper for <I>drag-over</I> events. This command enables auto scrolling
|
||||
and position extraction during the <I>drag-over</I>.
|
||||
If <B>dropovercmd</B> is not empty, the command is called with the following aguments:
|
||||
<UL>
|
||||
<LI>the pathname of the tree,
|
||||
<LI>the pathname of the drag source,
|
||||
<LI>a list describing where the drop can occur, whose elements are:
|
||||
<UL>
|
||||
<LI>the string <I>widget</I> if <B>dropovertype</B> option contains <I>w</I>, else empty string.
|
||||
<LI>the targeted node if drag icon points a node and <B>dropovertype</B> option contains <I>n</I>, else empty string.
|
||||
<LI>a list containing a node and the position within the children of the node where drag
|
||||
icon points to if <B>dropovertype</B> option contains <I>p</I>, else empty string.
|
||||
<LI>optionally, the preferred method if drop can occur both inside a node and between two
|
||||
nodes. The value is <I>position</I> or <I>node</I>.
|
||||
</UL>
|
||||
<LI>the current operation,
|
||||
<LI>the data type,
|
||||
<LI>the data.
|
||||
</UL>
|
||||
The command must return a list with two elements:
|
||||
<UL>
|
||||
<LI>the drop status, conforming to those described in <B>dropovercmd</B> option of
|
||||
<B>DropSite::<A HREF="DropSite.html#register">register</A></B>,
|
||||
<LI>the choosen method: <I>widget</I>, <I>node</I> or <I>position</I>.
|
||||
</UL>
|
||||
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="-dropovermode"><B>-dropovermode</B></A></DT>
|
||||
<DD>
|
||||
|
||||
Specifies the type of <I>drop-over</I> interaction. Must be a combination of
|
||||
<B>w</B>, which specifies that drop can occurs everywhere on widget,
|
||||
<B>p</B>, which specifies that drop can occurs between two nodes,
|
||||
and <B>n</B>, which specifies that drop occurs inside nodes.
|
||||
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="-droptypes"><B>-droptypes</B></A></DT>
|
||||
<DD>
|
||||
|
||||
Specifies a list of accepted dropped object/operation.
|
||||
See option <B>droptypes</B> of
|
||||
<B>DropSite::<A HREF="DropSite.html#register">register</A></B>.
|
||||
for more infromation.
|
||||
|
||||
<BR>Default is <I>TREE_NODE</I> with operations <B>copy</B> and <B>move</B>.
|
||||
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="-height"><B>-height</B></A></DT>
|
||||
<DD>
|
||||
|
||||
Specifies the desired height for the tree in units of <B>deltay</B> pixels.
|
||||
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="-linesfill"><B>-linesfill</B></A></DT>
|
||||
<DD>
|
||||
|
||||
Specifies a foreground color for the lines between nodes.
|
||||
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="-linestipple"><B>-linestipple</B></A></DT>
|
||||
<DD>
|
||||
|
||||
Specifies a stipple bitmap for the lines between nodes.
|
||||
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="-opencmd"><B>-opencmd</B></A></DT>
|
||||
<DD>
|
||||
|
||||
Specifies a command to be called when the user opens a node. The name
|
||||
of the opened node is appended to the command.
|
||||
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="-padx"><B>-padx</B></A></DT>
|
||||
<DD>
|
||||
|
||||
Specifies distance between image or window and text of the nodes.
|
||||
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="-redraw"><B>-redraw</B></A></DT>
|
||||
<DD>
|
||||
|
||||
Specifies wether or not the tree should be redrawn when entering idle.
|
||||
Set it to false if you call <B>update</B> while modifying the tree.
|
||||
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="-selectcommand"><B>-selectcommand</B></A></DT>
|
||||
<DD>
|
||||
|
||||
Specifies a command to be called when the selection is changed. The
|
||||
path of the tree widget and the selected nodes are appended to the
|
||||
command.
|
||||
|
||||
</DD>
|
||||
</DL>
|
||||
|
||||
<DL><DT><A NAME="-selectfill"><B>-selectfill</B></A></DT>
|
||||
<DD>
|
||||
If true, the selection box will be drawn across the entire tree from
|
||||
left-to-right instead of just around the item text.
|
||||
</DD>
|
||||
</DL>
|
||||
|
||||
<DL><DT><A NAME="-showlines"><B>-showlines</B></A></DT>
|
||||
<DD>
|
||||
|
||||
Specifies whether or not lines should be drawn between nodes.
|
||||
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="-width"><B>-width</B></A></DT>
|
||||
<DD>
|
||||
|
||||
Specifies the desired width for the tree in units of 8 pixels.
|
||||
|
||||
</DD>
|
||||
</DL>
|
||||
<HR WIDTH="50%"><BR>
|
||||
|
||||
<B><A NAME="nodes">NODE NAMES</A></B><BR>
|
||||
<p>
|
||||
Certain special characters in node names are automatically substituted
|
||||
by the tree during operation. These characters are <b>& | ^ !</b>.
|
||||
They are all substituted with a <b>_</b> character. This is only to
|
||||
avoid errors because the characters are special to the tree widget.
|
||||
</p>
|
||||
|
||||
<B><A NAME="wc">WIDGET COMMAND</A></B><BR>
|
||||
<DL><DT><A NAME="bindArea"><I>pathName</I> <B>bindArea</B></A>
|
||||
<I>event</I>
|
||||
<I>script</I>
|
||||
</DT><DD>
|
||||
|
||||
This command associates a command to execute whenever the event
|
||||
sequence given by <I>event</I> occurs anywhere within the Tree area.
|
||||
</DD></DL>
|
||||
<DL><DT><A NAME="bindImage"><I>pathName</I> <B>bindImage</B></A>
|
||||
<I>event</I>
|
||||
<I>script</I>
|
||||
</DT><DD>
|
||||
|
||||
This command associates a command to execute whenever the event
|
||||
sequence given by <I>event</I> occurs on the image of a node.
|
||||
The node idenfier on which the event occurs is appended to the command and may be used to manipulate the tree (e.g. don't use <B>%W</B>).
|
||||
|
||||
<P>
|
||||
If <B>-selectfill</B> is given, an eventual binding of the background box by <B>bindText</B> is overwritten.
|
||||
</P>
|
||||
</DD></DL>
|
||||
<DL><DT><A NAME="bindText"><I>pathName</I> <B>bindText</B></A>
|
||||
<I>event</I>
|
||||
<I>script</I>
|
||||
</DT><DD>
|
||||
|
||||
This command associates a command to execute whenever the event
|
||||
sequence given by <I>event</I> occurs on the label of a node.
|
||||
The node idenfier on which the event occurs is appended to the command and may be used to manipulate the tree (e.g. don't use <B>%W</B>).
|
||||
|
||||
<P>
|
||||
If <B>-selectfill</B> is given, an eventual binding of the background box by <B>bindImage</B> is overwritten.
|
||||
</P>
|
||||
</DD></DL>
|
||||
<DL><DT><A NAME="cget"><I>pathName</I> <B>cget</B></A>
|
||||
<I>option</I>
|
||||
</DT><DD>
|
||||
|
||||
Returns the current value of the configuration option given by <I>option</I>.
|
||||
<I>Option</I> may have any of the values accepted by the creation command.
|
||||
</DD></DL>
|
||||
<DL><DT><A NAME="closetree"><I>pathName</I> <B>closetree</B></A> <I>node</I>
|
||||
?<I>recurse</I>?
|
||||
</DT><DD>
|
||||
|
||||
This command close all the subtree given by <I>node</I>. Recurse
|
||||
through the tree starting at <I>node</I> and set <B>open</B> option to 0
|
||||
depending on <I>recurse</I>. Default value of <I>recurse</I> is <I>true</I>.
|
||||
|
||||
</DD></DL>
|
||||
<DL><DT><A NAME="configure"><I>pathName</I> <B>configure</B></A>
|
||||
?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
|
||||
</DT><DD>
|
||||
|
||||
Query or modify the configuration options of the widget. If no <I>option</I> is
|
||||
specified, returns a list describing all of the available options for
|
||||
<I>pathName</I>. If <I>option</I> is specified with no <I>value</I>, then the
|
||||
command returns a list describing the one named <I>option</I> (this list will
|
||||
be identical to the corresponding sublist of the value returned if no
|
||||
<I>option</I> is specified). If one or more <I>option-value</I> pairs are
|
||||
specified, then the command modifies the given widget option(s) to have the
|
||||
given value(s); in this case the command returns an empty string.
|
||||
<I>Option</I> may have any of the values accepted by the creation command.
|
||||
Read-only options are not be modified.
|
||||
|
||||
</DD></DL>
|
||||
<DL><DT><A NAME="delete"><I>pathName</I> <B>delete</B></A>
|
||||
?<I>arg...</I>?
|
||||
</DT><DD>
|
||||
|
||||
Deletes all nodes (and children of them) in <I>arg</I>. <I>arg</I> can be a list
|
||||
of nodes or a list of list of nodes.
|
||||
To delete all the tree, do <I>$pathName delete [$pathName nodes root]</I>.
|
||||
|
||||
</DD></DL>
|
||||
<DL><DT><A NAME="edit"><I>pathName</I> <B>edit</B></A>
|
||||
<I>node</I>
|
||||
<I>text</I>
|
||||
?<I>verifycmd</I>?
|
||||
?<I>clickres</I>?
|
||||
?<I>select</I>?
|
||||
</DT><DD>
|
||||
|
||||
Provides a way for the user to edit in place the label of a node. This is
|
||||
possible only if <I>node</I> is visible (all its parents are open).
|
||||
<BR>The command takes the initial text as argument and does not modify the label of the
|
||||
edited node, but returns an empty string if edition is canceled, or the typed text
|
||||
if edition is accepted.
|
||||
<BR>When editing, the user can cancel by pressing Escape, or accept by pressing Return.
|
||||
<BR><I>clickres</I> specifies what to do if the user click outside the editable area.
|
||||
If <I>clickres</I> is 0 (the default), the edition is canceled.
|
||||
If <I>clickres</I> is 1, the edition is accepted.
|
||||
In all other case, the edition continues.
|
||||
<BR>If edition is accepted and <I>modifycmd</I> is not empty, then it is called with
|
||||
the new text as argument and must return 1 to accept the new text, 0 to refuse it
|
||||
and continue edition.
|
||||
<BR><I>select</I> specifies wether or not the initial text should be selected. Default is 1.
|
||||
|
||||
</DD></DL>
|
||||
<DL><DT><A NAME="exists"><I>pathName</I> <B>exists</B></A>
|
||||
<I>node</I>
|
||||
</DT><DD>
|
||||
|
||||
Returns whether or not <I>node</I> exists in the tree.
|
||||
|
||||
</DD></DL>
|
||||
<DL><DT><A NAME="find"><I>pathName</I> <B>find</B></A>
|
||||
<I>findinfo</I>
|
||||
?<I>confine</I>?
|
||||
</DT><DD>
|
||||
|
||||
<p>
|
||||
Returns the node given by the position <I>findinfo</I>.
|
||||
<I>findinfo</I> can take the form of a pixel position <I>@x,y</I> or
|
||||
of the line number of a currently visible Tree node. The first line
|
||||
of the Tree has the value of zero.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
If <I>confine</I> is non-empty, then confine <I>findinfo</I> to only
|
||||
match pixel positions for the area consumed by Tree labels, not just
|
||||
anywhere on their lines. (<I>confine</I> has no effect if
|
||||
<I>findinfo</I> is a line number.)
|
||||
</p>
|
||||
|
||||
</DD></DL>
|
||||
<DL><DT><A NAME="index"><I>pathName</I> <B>index</B></A>
|
||||
<I>node</I>
|
||||
</DT><DD>
|
||||
|
||||
Returns the position of <I>node</I> in its parent.
|
||||
|
||||
</DD></DL>
|
||||
<DL><DT><A NAME="insert"><I>pathName</I> <B>insert</B></A>
|
||||
<I>index</I>
|
||||
<I>parent</I>
|
||||
<I>node</I>
|
||||
?<I>option value...</I>?
|
||||
</DT><DD>
|
||||
|
||||
<p>
|
||||
Inserts a new node identified by <I>node</I> in the children list of
|
||||
<I>parent</I> at position <I>index</I>.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Any instance of <i>#auto</i> within the node name will be replaced by the
|
||||
number of the item in the order of insertion. The non-printable characters
|
||||
\1 to \5 are reserved for internal use and should not be present in node
|
||||
names.
|
||||
</p>
|
||||
|
||||
|
||||
<P>
|
||||
<DL><DT><A NAME="Node-anchor"><B>-anchor</B></A></DT>
|
||||
<DD>
|
||||
Specifies the anchor of the image or window of the node. Defaults to w.
|
||||
</DD>
|
||||
</DL>
|
||||
|
||||
<DL><DT><A NAME="Node-data"><B>-data</B></A></DT>
|
||||
<DD>
|
||||
|
||||
User data associated to the node.
|
||||
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="-deltax"><B>-deltax</B></A></DT>
|
||||
<DD>
|
||||
|
||||
Specifies the horizontal indentation of the node. If the value is -1, the
|
||||
node will be drawn with the deltax for the entire tree.
|
||||
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="Node-drawcross"><B>-drawcross</B></A></DT>
|
||||
<DD>
|
||||
|
||||
Specifies how the cross used to expand or collapse the children of a node
|
||||
should be drawn.
|
||||
Must be one of <B>auto</B>, <B>always</B> or <B>never</B>.
|
||||
<BR>If <B>auto</B>, the cross is drawn only if the node has children.
|
||||
If <B>always</B>, the cross is always drawn.
|
||||
If <B>never</B>, the cross is never drawn.
|
||||
To maintain compatibility with older versions of this widget,
|
||||
<B>allways</B> is a deprecated synonym to <B>always</B>.
|
||||
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="Node-fill"><B>-fill</B></A></DT>
|
||||
<DD>
|
||||
|
||||
Specifies the foreground color of the label of the node.
|
||||
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="Node-font"><B>-font</B></A></DT>
|
||||
<DD>
|
||||
|
||||
Specifies a font for the label of the node.
|
||||
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="-helpcmd"><B>-helpcmd</B></A></DT>
|
||||
<DD>
|
||||
|
||||
If specified, refers to a command to execute to get the help text to display.
|
||||
The command must return a string to display.
|
||||
If the command returns an empty string, no help is displayed.
|
||||
See also <A HREF="DynamicHelp.html">DynamicHelp</A>.
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="-helptext"><B>-helptext</B></A></DT>
|
||||
<DD>
|
||||
|
||||
Text for dynamic help.
|
||||
See also <A HREF="DynamicHelp.html">DynamicHelp</A>.
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="-helptype"><B>-helptype</B></A></DT>
|
||||
<DD>
|
||||
Type of dynamic help. Use <I>balloon</I> or <I>variable</I>.
|
||||
See also <A HREF="DynamicHelp.html">DynamicHelp</A>.
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="-helpvar"><B>-helpvar</B></A></DT>
|
||||
<DD>
|
||||
Variable to use when <B>helptype</B> option is <I>variable</I>.
|
||||
See also <A HREF="DynamicHelp.html">DynamicHelp</A>.
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="Node-image"><B>-image</B></A></DT>
|
||||
<DD>
|
||||
|
||||
Specifies an image to display at the left of the label of the node.
|
||||
<B>window</B> option override <B>image</B>.
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="Node-open"><B>-open</B></A></DT>
|
||||
<DD>
|
||||
|
||||
Specifies wether or not the children of the node should be drawn.
|
||||
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="-padx"><B>-padx</B></A></DT>
|
||||
<DD>
|
||||
|
||||
Specifies the distance between image or window and the text of the node. If
|
||||
the value is -1, the node will be drawn with the padx for the entire tree.
|
||||
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="Node-selectable"><B>-selectable</B></A></DT>
|
||||
<DD>
|
||||
|
||||
Specifies if the node can be selected or not.
|
||||
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="Node-text"><B>-text</B></A></DT>
|
||||
<DD>
|
||||
|
||||
Specifies the label of the node.
|
||||
|
||||
</DD>
|
||||
</DL>
|
||||
<DL><DT><A NAME="Node-window"><B>-window</B></A></DT>
|
||||
<DD>
|
||||
|
||||
Specifies a pathname to display at the left of the label of the node.
|
||||
<B>window</B> option override <B>image</B>.
|
||||
</DD>
|
||||
</DL>
|
||||
</DD></DL>
|
||||
<DL><DT><A NAME="itemcget"><I>pathName</I> <B>itemcget</B></A>
|
||||
<I>node</I>
|
||||
<I>option</I>
|
||||
</DT><DD>
|
||||
|
||||
Returns the current value of a configuration option for the item.
|
||||
<I>Option</I> may have any of the values accepted by the item creation command.
|
||||
|
||||
</DD></DL>
|
||||
<DL><DT><A NAME="itemconfigure"><I>pathName</I> <B>itemconfigure</B></A>
|
||||
<I>node</I>
|
||||
?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
|
||||
</DT><DD>
|
||||
|
||||
This command is similar to the <B>configure</B> command, except that it applies to the
|
||||
options for an individual item, whereas <B>configure</B> applies to the options for
|
||||
the widget as a whole. <B>Options</B> may have any of the values accepted by the
|
||||
item creation widget command. If options are specified, options are modified as indicated
|
||||
in the command and the command returns an empty string. If no options are specified,
|
||||
returns a list describing the current options for the item.
|
||||
Read-only options are not be modified.
|
||||
|
||||
</DD></DL>
|
||||
<DL><DT><A NAME="line"><I>pathName</I> <B>line</B></A>
|
||||
<I>node</I>
|
||||
</DT><DD>
|
||||
|
||||
<p>
|
||||
Returns the line number where <I>node</I> was drawn. If the node is
|
||||
not visible then return -1. The first line of the tree has the value
|
||||
of 0.
|
||||
</p>
|
||||
|
||||
</DD></DL>
|
||||
<DL><DT><A NAME="move"><I>pathName</I> <B>move</B></A>
|
||||
<I>parent</I>
|
||||
<I>node</I>
|
||||
<I>index</I>
|
||||
</DT><DD>
|
||||
|
||||
Moves <I>node</I> to the children list of <I>parent</I> at position <I>index</I>.
|
||||
<I>parent</I> can not be a descendant of <I>node</I>.
|
||||
|
||||
</DD></DL>
|
||||
<DL><DT><A NAME="nodes"><I>pathName</I> <B>nodes</B></A>
|
||||
<I>node</I>
|
||||
?<I>first</I>?
|
||||
?<I>last</I>?
|
||||
</DT><DD>
|
||||
|
||||
Returns parts of the children of <I>node</I>, following <I>first</I> and <I>last</I>.<BR>
|
||||
If <I>first</I> and <I>last</I> are omitted, returns the list of all children.
|
||||
If <I>first</I> is specified and <I>last</I> omitted, returns the child at index
|
||||
<I>first</I>, or an empty string if <I>first</I> refers to a non-existent element.
|
||||
If <I>first</I> and <I>last</I> are specified, the command returns a list whose elements
|
||||
are all of the children between <I>first</I> and <I>last</I>,
|
||||
inclusive. Both <I>first</I> and <I>last</I> may have any of the standard
|
||||
forms for indices.
|
||||
|
||||
</DD></DL>
|
||||
<DL><DT><A NAME="opentree"><I>pathName</I> <B>opentree</B></A> <I>node</I> ?<I>recurse</I>?
|
||||
|
||||
</DT><DD>
|
||||
|
||||
This command open all the subtree given by <I>node</I>. Recurse through the
|
||||
tree starting at <I>node</I> and set <B>open</B> option to 1 depending on value
|
||||
of <I>recurse</I>. Default value of <I>recurse</I> is <I>true</I>.
|
||||
|
||||
</DD></DL>
|
||||
<DL><DT><A NAME="parent"><I>pathName</I> <B>parent</B></A>
|
||||
<I>node</I>
|
||||
</DT><DD>
|
||||
|
||||
Returns the parent of <I>node</I>.
|
||||
|
||||
</DD></DL>
|
||||
<DL><DT><A NAME="reorder"><I>pathName</I> <B>reorder</B></A>
|
||||
<I>node</I>
|
||||
<I>neworder</I>
|
||||
</DT><DD>
|
||||
|
||||
Modifies the order of children of <I>node</I> given by <I>neworder</I>. Children of
|
||||
<I>node</I> that do not appear in <I>neworder</I> are no moved.
|
||||
|
||||
</DD></DL>
|
||||
<DL><DT><A NAME="see"><I>pathName</I> <B>see</B></A>
|
||||
<I>node</I>
|
||||
</DT><DD>
|
||||
|
||||
Arrange the scrolling area to make <I>node</I> visible.
|
||||
|
||||
</DD></DL>
|
||||
<DL><DT><A NAME="selection"><I>pathName</I> <B>selection</B></A>
|
||||
<I>cmd</I>
|
||||
?<I>arg...</I>?
|
||||
</DT><DD>
|
||||
|
||||
Modifies the list of selected nodes following <I>cmd</I>:
|
||||
<DL>
|
||||
<DT><B>add</B>
|
||||
<DD>Adds all nodes in <I>arg</I> to the selection.
|
||||
<DT><B>clear</B>
|
||||
<DD>Removes all nodes from the selection.
|
||||
<DT><B>get</B>
|
||||
<DD>Returns a list containing the indices of current selected nodes.
|
||||
<DT><B>includes</B>
|
||||
<DD>Tests if the specified node is selected. Returns true if the answer is yes, and false else.
|
||||
<DT><B>range</B>
|
||||
<DD>Sets the selection to all nodes between the two specified ones.
|
||||
<DT><B>remove</B>
|
||||
<DD>Removes all nodes in <I>arg</I> from the selection.
|
||||
<DT><B>set</B>
|
||||
<DD>Sets the selection to all nodes in <I>arg</I>.
|
||||
<DT><B>toggle</B>
|
||||
<DD>Toggles the selection status of all nodes in <I>arg</I>.
|
||||
</DL>
|
||||
|
||||
The subcommands <B>add</B>, <B>range</B>, and <B>set</B> silently
|
||||
ignore nodes which are declared unselectable. See the node option
|
||||
<a href="#Node-selectable">-selectable</a> to influence this.
|
||||
|
||||
</DD></DL>
|
||||
|
||||
</DD></DL>
|
||||
|
||||
<DL><DT><A NAME="toggle"><I>pathName</I> <B>toggle</B></A>
|
||||
<I>node</I>
|
||||
</DT><DD>
|
||||
Toggle the open/close status of the given <i>node</i>.
|
||||
</DD></DL>
|
||||
|
||||
<DL><DT><A NAME="visible"><I>pathName</I> <B>visible</B></A>
|
||||
<I>node</I>
|
||||
</DT><DD>
|
||||
|
||||
Returns whether or not <I>node</I> is visible (all its parents are open).
|
||||
|
||||
</DD></DL>
|
||||
<DL><DT><A NAME="xview"><I>pathName</I> <B>xview</B></A>
|
||||
?<I>arg...</I>?
|
||||
</DT><DD>
|
||||
|
||||
Standard command to enable horizontal scrolling of <I>pathName</I>.
|
||||
|
||||
</DD></DL>
|
||||
<DL><DT><A NAME="yview"><I>pathName</I> <B>yview</B></A>
|
||||
?<I>arg...</I>?
|
||||
</DT><DD>
|
||||
|
||||
Standard command to enable vertical scrolling of <I>pathName</I>.
|
||||
|
||||
</DD></DL>
|
||||
|
||||
<B><A NAME="nodes">BINDINGS</A></B><BR>
|
||||
|
||||
<p>
|
||||
A <b><<TreeSelect>></b> virtual event is generated any time the
|
||||
selection in the tree changes. This is the default behavior of an
|
||||
item in the tree, but it can be overridden with the bindText or
|
||||
bindImage command. If the button 1 binding is overridden, this event may
|
||||
not be generated.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
The tree has all the standard mouse wheel bindings when it has focus.
|
||||
</p>
|
||||
|
||||
</BODY></HTML>
|
505
R_portable/R/App/R-portable/Tcl/bin64/lib/bwidget-1.9.12/BWman/Widget.html
Executable file
@ -0,0 +1,505 @@
|
||||
<HTML>
|
||||
<HEAD><TITLE>Widget</TITLE></HEAD>
|
||||
<BODY BGCOLOR=white>
|
||||
<IMG SRC="constr.gif" WIDTH="40" HEIGHT="40"> Under construction ...<BR>
|
||||
<DL><DT><I><A HREF="#descr">NAME</A></I></DT>
|
||||
<DD><B>Widget</B>
|
||||
- The Widget base class
|
||||
</DD></DL>
|
||||
<DL>
|
||||
<DT><I><A HREF="#wc">COMMAND</A></I></DT>
|
||||
<DD>Widget::<A HREF="#addmap"><B>addmap</B></A>
|
||||
<I>class</I>
|
||||
<I>subclass</I>
|
||||
<I>subpath</I>
|
||||
<I>options</I>
|
||||
</DD>
|
||||
<DD>Widget::<A HREF="#bwinclude"><B>bwinclude</B></A>
|
||||
<I>class</I>
|
||||
<I>subclass</I>
|
||||
<I>subpath</I>
|
||||
?<I>arg...</I>?
|
||||
</DD>
|
||||
<DD>Widget::<A HREF="#cget"><B>cget</B></A>
|
||||
<I>path</I>
|
||||
<I>option</I>
|
||||
</DD>
|
||||
<DD>Widget::<A HREF="#configure"><B>configure</B></A>
|
||||
<I>path</I>
|
||||
<I>options</I>
|
||||
</DD>
|
||||
<DD>Widget::<A HREF="#create"><B>create</B></A>
|
||||
<I>class</I>
|
||||
<I>path</I>
|
||||
?<I>rename</I>?
|
||||
</DD>
|
||||
<DD>Widget::<A HREF="#declare"><B>declare</B></A>
|
||||
<I>class</I>
|
||||
<I>optlist</I>
|
||||
</DD>
|
||||
<DD>Widget::<A HREF="#define"><B>define</B></A>
|
||||
<I>class</I>
|
||||
<I>filename</I>
|
||||
?<I>class ...</I>?
|
||||
</DD>
|
||||
<DD>Widget::<A HREF="#destroy"><B>destroy</B></A>
|
||||
<I>path</I>
|
||||
</DD>
|
||||
<DD>Widget::<A HREF="#focusNext"><B>focusNext</B></A>
|
||||
<I>w</I>
|
||||
</DD>
|
||||
<DD>Widget::<A HREF="#focusOK"><B>focusOK</B></A>
|
||||
<I>w</I>
|
||||
</DD>
|
||||
<DD>Widget::<A HREF="#focusPrev"><B>focusPrev</B></A>
|
||||
<I>w</I>
|
||||
</DD>
|
||||
<DD>Widget::<A HREF="#generate-doc"><B>generate-doc</B></A>
|
||||
<I>dir</I>
|
||||
<I>widgetlist</I>
|
||||
</DD>
|
||||
<DD>Widget::<A HREF="#generate-widget-doc"><B>generate-widget-doc</B></A>
|
||||
<I>class</I>
|
||||
<I>iscmd</I>
|
||||
<I>file</I>
|
||||
</DD>
|
||||
<DD>Widget::<A HREF="#getoption"><B>getoption</B></A>
|
||||
<I>path</I>
|
||||
<I>option</I>
|
||||
</DD>
|
||||
<DD>Widget::<A HREF="#getVariable"><B>getVariable</B></A>
|
||||
<I>path</I>
|
||||
<I>varName</I>
|
||||
<I>?myVarName?</I>
|
||||
</DD>
|
||||
<DD>Widget::<A HREF="#hasChanged"><B>hasChanged</B></A>
|
||||
<I>path</I>
|
||||
<I>option</I>
|
||||
<I>pvalue</I>
|
||||
</DD>
|
||||
<DD>Widget::<A HREF="#init"><B>init</B></A>
|
||||
<I>class</I>
|
||||
<I>path</I>
|
||||
<I>options</I>
|
||||
</DD>
|
||||
<DD>Widget::<A HREF="#setoption"><B>setoption</B></A>
|
||||
<I>path</I>
|
||||
<I>option</I>
|
||||
<I>value</I>
|
||||
</DD>
|
||||
<DD>Widget::<A HREF="#subcget"><B>subcget</B></A>
|
||||
<I>path</I>
|
||||
<I>subwidget</I>
|
||||
</DD>
|
||||
<DD>Widget::<A HREF="#syncoptions"><B>syncoptions</B></A>
|
||||
<I>class</I>
|
||||
<I>subclass</I>
|
||||
<I>subpath</I>
|
||||
<I>options</I>
|
||||
</DD>
|
||||
<DD>Widget::<A HREF="#tkinclude"><B>tkinclude</B></A>
|
||||
<I>class</I>
|
||||
<I>tkwidget</I>
|
||||
<I>subpath</I>
|
||||
?<I>arg...</I>?
|
||||
</DD>
|
||||
</DL>
|
||||
<BR><HR WIDTH="100%"><BR>
|
||||
<B><A NAME="descr"></A>DESCRIPTION</B><BR>
|
||||
<P>
|
||||
|
||||
The <B>Widget</B> namespace handle data associated to all BWidget and provide commands
|
||||
to easily define BWidget.
|
||||
<BR>For commands can be used to define a BWidget:
|
||||
<B>tkinclude</B>, <B>bwinclude</B>, <B>declare</B>, <B>addmap</B> and <B>syncoptions</B>.
|
||||
Here is the definition of <A HREF="ComboBox.html">ComboBox</A> widget:
|
||||
<BR><BR>
|
||||
<CENTER>
|
||||
<TABLE BORDER=2 CELSPACING=2 WIDTH=80%>
|
||||
<TR><TD><PRE>
|
||||
namespace eval ComboBox {
|
||||
<FONT COLOR=red><I># We're using ArrowButton, Entry and LabelFrame</I></FONT>
|
||||
ArrowButton::use
|
||||
Entry::use
|
||||
LabelFrame::use
|
||||
|
||||
<FONT COLOR=red><I># Include resources of LabelFrame</I></FONT>
|
||||
Widget::bwinclude ComboBox LabelFrame .labf \
|
||||
rename {-text -label} \
|
||||
remove {-focus} \
|
||||
prefix {label -justify -width -anchor -height -font} \
|
||||
initialize {-relief sunken -borderwidth 2}
|
||||
|
||||
<FONT COLOR=red><I># Include resources of Entry</I></FONT>
|
||||
Widget::bwinclude ComboBox Entry .e \
|
||||
remove {-relief -bd -borderwidth -bg -fg} \
|
||||
rename {-foreground -entryfg -background -entrybg}
|
||||
|
||||
<FONT COLOR=red><I># Declare new resources</I></FONT>
|
||||
Widget::declare ComboBox {
|
||||
{-height TkResource 0 0 listbox}
|
||||
{-values String "" 0}
|
||||
{-modifycmd String "" 0}
|
||||
{-postcommand String "" 0}
|
||||
}
|
||||
|
||||
<FONT COLOR=red><I># Map resources to subwidget</I></FONT>
|
||||
Widget::addmap ComboBox "" :cmd {-background {}}
|
||||
Widget::addmap ComboBox ArrowButton .a \
|
||||
{-foreground {} -background {} -disabledforeground {} -state {}}
|
||||
|
||||
<FONT COLOR=red><I># Synchronize subwidget options</I></FONT>
|
||||
Widget::syncoptions ComboBox Entry .e {-text {}}
|
||||
Widget::syncoptions ComboBox LabelFrame .labf {-label -text -underline {}}
|
||||
|
||||
proc use {} {}
|
||||
}</PRE>
|
||||
</TD></TR>
|
||||
</TABLE></CENTER>
|
||||
|
||||
</P>
|
||||
<HR WIDTH="50%"><BR>
|
||||
<B><A NAME="wc">COMMAND</A></B><BR>
|
||||
<DL><DT><A NAME="addmap">Widget::<B>addmap</B></A>
|
||||
<I>class</I>
|
||||
<I>subclass</I>
|
||||
<I>subpath</I>
|
||||
<I>options</I>
|
||||
</DT><DD>
|
||||
|
||||
This command map some resources to subwidget.
|
||||
Mapped resources automatically configure subwidget when widget is configured.
|
||||
<UL>
|
||||
<LI><I>class</I> is the class of the new BWidget
|
||||
<LI><I>subclass</I> is the class the subwidget (BWidget class, e.g Entry, or empty for Tk widget)
|
||||
<LI><I>subpath</I> is the path of the subwidget
|
||||
<LI><I>options</I> is the list <I>{option realres ...}</I> of options to map to subwidget
|
||||
</UL>
|
||||
</DD></DL>
|
||||
<DL><DT><A NAME="bwinclude">Widget::<B>bwinclude</B></A>
|
||||
<I>class</I>
|
||||
<I>subclass</I>
|
||||
<I>subpath</I>
|
||||
?<I>arg...</I>?
|
||||
</DT><DD>
|
||||
|
||||
This command includes into a new BWidget the resources of another BWidget.
|
||||
Arguments are:
|
||||
<UL>
|
||||
<LI><I>class</I> class of the new widget
|
||||
<LI><I>subclass</I> class name of the BWidget to be included
|
||||
<LI><I>subpath</I> path of the widget to configure when BWidget is configured
|
||||
<LI><I>options</I> is:
|
||||
<UL>
|
||||
<LI><I><B>include</B> {option option ...}</I>
|
||||
<BR>list of options to include (all if not defined)
|
||||
<LI><I><B>remove</B> {option option ...}</I>
|
||||
<BR> list of options to remove
|
||||
<LI><I><B>rename</B> {option name option name ...}</I>
|
||||
<BR>list of options to rename
|
||||
<LI><I><B>prefix</B> {prefix option option ...}</I>
|
||||
<BR>pefix all <I>option</I> by <I>prefix</I>
|
||||
<LI><I><B>initialize</B> {option value option value ...}</I>
|
||||
<BR>default value of options
|
||||
<LI><I><B>readonly</B> {option value option value ...}</I>
|
||||
<BR>new readonly flag
|
||||
</UL></UL>
|
||||
</DD></DL>
|
||||
<DL><DT><A NAME="cget">Widget::<B>cget</B></A>
|
||||
<I>path</I>
|
||||
<I>option</I>
|
||||
</DT><DD>
|
||||
|
||||
Returns the value of <I>option</I> of BWidget <I>path</I>. <B>cget</B> tests the option
|
||||
existence and takes care of synchronization with subwidget.
|
||||
Typically called by the BWidget <B>cget</B> command.
|
||||
|
||||
</DD></DL>
|
||||
<DL><DT><A NAME="configure">Widget::<B>configure</B></A>
|
||||
<I>path</I>
|
||||
<I>options</I>
|
||||
</DT><DD>
|
||||
Description text
|
||||
</DD></DL>
|
||||
|
||||
<DL><DT><A NAME="create">Widget::<B>create</B></A>
|
||||
<I>class</I>
|
||||
<I>path</I>
|
||||
?<I>rename</I>?
|
||||
</DT><DD>
|
||||
The standard method for creating a BWidget. The real widget path
|
||||
is renamed to $path:cmd, and a new proc is created to replace the
|
||||
path which points to the BWidget's commands.
|
||||
|
||||
<p>
|
||||
If <i>rename</i> is false, the path will not be renamed, but the
|
||||
proc will still be created. This is useful when inheriting another
|
||||
BWidget who will already have renamed the widget.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
The command returns the widget path. This command is usually the
|
||||
last command executed in the ::create command for the widget.
|
||||
</p>
|
||||
</DD></DL>
|
||||
|
||||
<DL><DT><A NAME="declare">Widget::<B>declare</B></A>
|
||||
<I>class</I>
|
||||
<I>optlist</I>
|
||||
</DT><DD>
|
||||
|
||||
This command declare new resources for a BWidget.
|
||||
<UL>
|
||||
<LI><I>class</I> is class of the new widget
|
||||
<LI><I>options</I> is the list describing new options. Each new option is a list
|
||||
<B>{option type value ro ?args?}</B> where:
|
||||
<UL>
|
||||
<LI><I>option</I> is the name of the option
|
||||
<LI><I>type</I> is the type of the option
|
||||
<LI><I>value</I> is the default value of the option
|
||||
<LI><I>ro</I> is the readonly flag of the option
|
||||
<LI><I>args</I> depends on type
|
||||
</UL></UL>
|
||||
<BR>
|
||||
<I>type</I> can be:
|
||||
<BR>
|
||||
<DL>
|
||||
<DT><B>TkResource</B></DT>
|
||||
<DD>
|
||||
<I>value</I> of <I>option</I> denotes a resource of a Tk widget. <I>args</I> must be <I>class</I> or
|
||||
<I>{class realoption}</I>. <I>class</I> is the creation command of the Tk widget, e.g.
|
||||
<B>entry</B>.
|
||||
The second form must be used if <I>option</I> has not the same name in Tk widget,
|
||||
but <I>realoption</I>.
|
||||
<BR>If <I>value</I> is empty, it is initialized to the default value of the Tk widget.
|
||||
</DD>
|
||||
|
||||
<DT><B>BwResource</B></DT>
|
||||
<DD>
|
||||
<I>value</I> of <I>option</I> denotes a resource of a BWidget. <I>args</I> must be <I>class</I> or
|
||||
<I>{class realoption}</I>. <I>class</I> is the name of the namespace of the BWidget, e.g.
|
||||
<B>LabelFrame</B>.
|
||||
The second form must be used if <I>option</I> has not the same name in BWidget,
|
||||
but <I>realoption</I>.
|
||||
<BR>If <I>value</I> is empty, it is initialized to the default value of the BWidget.
|
||||
</DD>
|
||||
|
||||
<DT><B>Int</B></DT>
|
||||
<DD><I>value</I> of <I>option</I> is an integer.
|
||||
<I>args</I> can be <I>{?min? ?max?}</I> to force it to be in a range. The test is
|
||||
<I>[expr $option > $min] && [expr $option < $max]</I> so
|
||||
if args is <I>{0 10}</I>, value must be beetween 0 and 10 exclude,
|
||||
if <I>args</I> is <I>{=0 =10}</I> , value must be beetween 0 and 10 include.
|
||||
</DD>
|
||||
|
||||
<DT><B>Boolean</B></DT>
|
||||
<DD><I>value</I> of <I>option</I> is a boolean. True values can be <B>1</B>, <B>true</B> or <B>yes</B>.
|
||||
False values can be <B>0</B>, <B>false</B> or <B>no</B>. <B>Widget::cget</B> always return
|
||||
0 or 1.
|
||||
</DD>
|
||||
|
||||
<DT><B>Enum</B></DT>
|
||||
<DD>
|
||||
<I>value</I> of <I>option</I> is a element of a enumeration. <I>args</I> must be the list
|
||||
of enumeration, e.g. <I>{top left bottom right}</I>.
|
||||
</DD>
|
||||
|
||||
<DT><B>Flag</B></DT>
|
||||
<DD>
|
||||
<I>value</I> of <I>option</I> is a combination of a set of chars. <I>args</I> must be a
|
||||
string defining the set.
|
||||
</DD>
|
||||
|
||||
<DT><B>String</B></DT>
|
||||
<DD>
|
||||
<DD><I>value</I> of <I>option</I> is any uncontrolled string.
|
||||
</DD>
|
||||
|
||||
<DT><B>Synonym</B></DT>
|
||||
<DD>
|
||||
<DD><I>option</I> is a synonym of option <I>args</I>. <I>value</I> has no effect here.
|
||||
</DD>
|
||||
</DL>
|
||||
</DD></DL>
|
||||
|
||||
<DL><DT><A NAME="define">Widget::<B>define</B></A>
|
||||
<I>class</I>
|
||||
<I>filename</I>
|
||||
?<I>class ...</I>?
|
||||
</DT><DD>
|
||||
|
||||
<p>
|
||||
This command is used to define a new BWidget class. It is
|
||||
usually the first command executed in a new widget definition.
|
||||
</p>
|
||||
|
||||
<ul>
|
||||
<li><i>class</i> is the name of the new widget class.</li>
|
||||
<li><i>filename</i> is the name of the file (without extension) in the
|
||||
BWidget distribution that defines this class.</li>
|
||||
<li><i>?-classonly?</i> If present, the class is not setup.</li>
|
||||
<li><i>?-namespace ns?</i> The namespace where the widget's procedures live
|
||||
in; defaults to the class name.</li>
|
||||
</ul>
|
||||
|
||||
<p>
|
||||
Each class defined after the filename is a class that this widget
|
||||
depends on. The ::use command will be called for each of these
|
||||
classes after the new widget has been defined.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
If <i>-classonly</i> option is not given this command does several things to
|
||||
setup the new class. First, it creates an alias in the global namespace for
|
||||
the name of the class that points to the class's ::create subcommand.
|
||||
Second, it defines a ::use subcommand for the class which other classes can
|
||||
use to load this class on the fly. Lastly, it creates a default binding to
|
||||
the <Destroy> event for the class that calls Widget::destroy on the
|
||||
path. This is the default setup for almost all widgets in the BWidget
|
||||
package.
|
||||
</p>
|
||||
|
||||
</DD></DL>
|
||||
|
||||
<DL><DT><A NAME="destroy">Widget::<B>destroy</B></A>
|
||||
<I>path</I>
|
||||
</DT><DD>
|
||||
Description text
|
||||
</DD></DL>
|
||||
<DL><DT><A NAME="focusNext">Widget::<B>focusNext</B></A>
|
||||
<I>w</I>
|
||||
</DT><DD>
|
||||
Description text
|
||||
</DD></DL>
|
||||
<DL><DT><A NAME="focusOK">Widget::<B>focusOK</B></A>
|
||||
<I>w</I>
|
||||
</DT><DD>
|
||||
Description text
|
||||
</DD></DL>
|
||||
<DL><DT><A NAME="focusPrev">Widget::<B>focusPrev</B></A>
|
||||
<I>w</I>
|
||||
</DT><DD>
|
||||
Description text
|
||||
</DD></DL>
|
||||
<DL><DT><A NAME="generate-doc">Widget::<B>generate-doc</B></A>
|
||||
<I>dir</I>
|
||||
<I>widgetlist</I>
|
||||
</DT><DD>
|
||||
Description text
|
||||
</DD></DL>
|
||||
<DL><DT><A NAME="generate-widget-doc">Widget::<B>generate-widget-doc</B></A>
|
||||
<I>class</I>
|
||||
<I>iscmd</I>
|
||||
<I>file</I>
|
||||
</DT><DD>
|
||||
Description text
|
||||
</DD></DL>
|
||||
<DL><DT><A NAME="getoption">Widget::<B>getoption</B></A>
|
||||
<I>path</I>
|
||||
<I>option</I>
|
||||
</DT><DD>
|
||||
|
||||
Returns the value of <I>option</I> of BWidget <I>path</I>. This command does not test
|
||||
option existence, does not handle synonym and does not take care of synchronization with
|
||||
subwidget.
|
||||
|
||||
</DD></DL>
|
||||
<DL><DT><A NAME="getVariable">Widget::<B>getVariable</B></A>
|
||||
<I>path</I>
|
||||
<I>varName</I>
|
||||
<I>?myVarName?</I>
|
||||
</DT><DD>
|
||||
|
||||
<p>
|
||||
Make the variable <i>varName</i> relational to <i>path</i> accessible in
|
||||
the current procedure. The variable will be created in the widget namespace
|
||||
for <i>path</i> and can be used for storing widget-specific information.
|
||||
When <i>path</i> is destroyed, any variable accessed in this manner will be
|
||||
destroyed with it.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
If <i>myVarName</i> is specified, the variable will be accessible in the
|
||||
current procedure as that name.
|
||||
</p>
|
||||
|
||||
</DD></DL>
|
||||
<DL><DT><A NAME="hasChanged">Widget::<B>hasChanged</B></A>
|
||||
<I>path</I>
|
||||
<I>option</I>
|
||||
<I>pvalue</I>
|
||||
</DT><DD>
|
||||
Description text
|
||||
</DD></DL>
|
||||
<DL><DT><A NAME="init">Widget::<B>init</B></A>
|
||||
<I>class</I>
|
||||
<I>path</I>
|
||||
<I>options</I>
|
||||
</DT><DD>
|
||||
Description text
|
||||
</DD></DL>
|
||||
<DL><DT><A NAME="setoption">Widget::<B>setoption</B></A>
|
||||
<I>path</I>
|
||||
<I>option</I>
|
||||
<I>value</I>
|
||||
</DT><DD>
|
||||
|
||||
Set the value of <I>option</I> of BWidget <I>path</I> without option test, subwidget mapping,
|
||||
synonym handling and does not set the modification flag.
|
||||
|
||||
</DD></DL>
|
||||
<DL><DT><A NAME="subcget">Widget::<B>subcget</B></A>
|
||||
<I>path</I>
|
||||
<I>subwidget</I>
|
||||
</DT><DD>
|
||||
|
||||
Returns the list of all option/value of BWidget <I>path</I> that are mapped to <I>subwidget</I>.
|
||||
|
||||
</DD></DL>
|
||||
<DL><DT><A NAME="syncoptions">Widget::<B>syncoptions</B></A>
|
||||
<I>class</I>
|
||||
<I>subclass</I>
|
||||
<I>subpath</I>
|
||||
<I>options</I>
|
||||
</DT><DD>
|
||||
|
||||
This command synchronize options value of a subwidget.
|
||||
Used when an option of a subwidget is modified out of the BWidget <B>configure</B> command.
|
||||
<UL>
|
||||
<LI><I>class</I> is the class of the new BWidget
|
||||
<LI><I>subclass</I> is the class the subwidget (BWidget class, e.g Entry, or empty for Tk widget)
|
||||
<LI><I>subpath</I> is the path of the subwidget
|
||||
<LI><I>options</I> is the list <I>{option realres ...}</I> of options to synchronize
|
||||
with subwidget
|
||||
</UL>
|
||||
</DD></DL>
|
||||
<DL><DT><A NAME="tkinclude">Widget::<B>tkinclude</B></A>
|
||||
<I>class</I>
|
||||
<I>tkwidget</I>
|
||||
<I>subpath</I>
|
||||
?<I>arg...</I>?
|
||||
</DT><DD>
|
||||
|
||||
This command includes into a new BWidget the resources of a Tk widget.
|
||||
Arguments are:
|
||||
<UL>
|
||||
<LI><I>class</I> class of the new widget
|
||||
<LI><I>tkwidger</I> command name of the Tk widget to be included
|
||||
<LI><I>subpath</I> path of the widget to configure when BWidget is configured
|
||||
<LI><I>options</I> is:
|
||||
<UL>
|
||||
<LI><I><B>include</B> {option option ...}</I>
|
||||
<BR>list of options to include (all if not defined)
|
||||
<LI><I><B>remove</B> {option option ...}</I>
|
||||
<BR>list of options to remove
|
||||
<LI><I><B>rename</B> {option name option name ...}</I>
|
||||
<BR>list of options to rename
|
||||
<LI><I><B>prefix</B> {prefix option option ...}</I>
|
||||
<BR>pefix all <I>option</I> by <I>prefix</I>
|
||||
<LI><I><B>initialize</B> {option value option value ...}</I>
|
||||
<BR>default value of options
|
||||
<LI><I><B>readonly</B> {option value option value ...}</I>
|
||||
<BR>new readonly flag
|
||||
</UL></UL>
|
||||
</DD></DL>
|
||||
</BODY></HTML>
|
95
R_portable/R/App/R-portable/Tcl/bin64/lib/bwidget-1.9.12/BWman/contents.html
Executable file
@ -0,0 +1,95 @@
|
||||
<HTML><BODY BGCOLOR=white target=Manual>
|
||||
<BR><BR><DT><B>Simple Widgets</B>
|
||||
<DD><TABLE BORDER=0 CELLSPACING=0>
|
||||
<TR><TD><A HREF="Label.html">Label</A></TD>
|
||||
<TD>Label widget with <B>state</B> option, dynamic help and drag and drop facilities</TD></TR>
|
||||
<TR><TD><A HREF="Entry.html">Entry</A></TD>
|
||||
<TD>Entry widget with <B>state</B> option, dynamic help and drag and drop facilities</TD></TR>
|
||||
<TR><TD><A HREF="Button.html">Button</A></TD>
|
||||
<TD>Button widget with enhanced options</TD></TR>
|
||||
<TR><TD><A HREF="ArrowButton.html">ArrowButton</A></TD>
|
||||
<TD>Button widget with an arrow shape.</TD></TR>
|
||||
<TR><TD><A HREF="ProgressBar.html">ProgressBar</A></TD>
|
||||
<TD>Progress indicator widget</TD></TR>
|
||||
<TR><TD><A HREF="ScrollView.html">ScrollView</A></TD>
|
||||
<TD>Display the visible area of a scrolled window</TD></TR>
|
||||
<TR><TD><A HREF="Separator.html">Separator</A></TD>
|
||||
<TD>3D separator widget</TD></TR>
|
||||
</TABLE>
|
||||
<BR><BR><DT><B>Manager Widgets</B>
|
||||
<DD><TABLE BORDER=0 CELLSPACING=0>
|
||||
<TR><TD><A HREF="MainFrame.html">MainFrame</A></TD>
|
||||
<TD>Manage toplevel with menu, toolbar and statusbar </TD></TR>
|
||||
<TR><TD><A HREF="LabelFrame.html">LabelFrame</A></TD>
|
||||
<TD>Frame with a Label</TD></TR>
|
||||
<TR><TD><A HREF="TitleFrame.html">TitleFrame</A></TD>
|
||||
<TD>Frame with a title (consider Tk 8.4+ labelframe instead)</TD></TR>
|
||||
<TR><TD><A HREF="PanelFrame.html">PanelFrame</A></TD>
|
||||
<TD>Frame with a boxed title area</TD></TR>
|
||||
<TR><TD><A HREF="ScrolledWindow.html">ScrolledWindow</A></TD>
|
||||
<TD>Generic scrolled widget</TD></TR>
|
||||
<TR><TD><A HREF="ScrollableFrame.html">ScrollableFrame</A></TD>
|
||||
<TD>Scrollable frame containing widget</TD></TR>
|
||||
<TR><TD><A HREF="PanedWindow.html">PanedWindow</A></TD>
|
||||
<TD>Tiled layout manager widget (consider Tk 8.4+ panedwindow instead)</TD></TR>
|
||||
<TR><TD><A HREF="ButtonBox.html">ButtonBox</A></TD>
|
||||
<TD>Set of buttons with horizontal or vertical layout</TD></TR>
|
||||
<TR><TD><A HREF="PagesManager.html">PagesManager</A></TD>
|
||||
<TD>Pages manager widget</TD></TR>
|
||||
<TR><TD><A HREF="NoteBook.html">NoteBook</A></TD>
|
||||
<TD>Notebook manager widget</TD></TR>
|
||||
<TR><TD><A HREF="Dialog.html">Dialog</A></TD>
|
||||
<TD>Dialog abstraction with custom buttons</TD></TR>
|
||||
<TR><TD><A HREF="StatusBar.html">StatusBar</A></TD>
|
||||
<TD>Status bar widget with resize control</TD></TR>
|
||||
</TABLE>
|
||||
<BR><BR><DT><B>Composite Widgets</B>
|
||||
<DD><TABLE BORDER=0 CELLSPACING=0>
|
||||
<TR><TD><A HREF="LabelEntry.html">LabelEntry</A></TD>
|
||||
<TD>
|
||||
LabelFrame containing an Entry widget.
|
||||
</TD></TR>
|
||||
<TR><TD><A HREF="ComboBox.html">ComboBox</A></TD>
|
||||
<TD>ComboBox widget</TD></TR>
|
||||
<TR><TD><A HREF="SpinBox.html">SpinBox</A></TD>
|
||||
<TD>SpinBox widget (consider Tk 8.4+ spinbox instead)</TD></TR>
|
||||
<TR><TD><A HREF="Tree.html">Tree</A></TD>
|
||||
<TD>Tree widget</TD></TR>
|
||||
<TR><TD><A HREF="ListBox.html">ListBox</A></TD>
|
||||
<TD>ListBox widget</TD></TR>
|
||||
<TR><TD><A HREF="MessageDlg.html">MessageDlg</A></TD>
|
||||
<TD>Message dialog box</TD></TR>
|
||||
<TR><TD><A HREF="ProgressDlg.html">ProgressDlg</A></TD>
|
||||
<TD>Progress indicator dialog box</TD></TR>
|
||||
<TR><TD><A HREF="PasswdDlg.html">PasswdDlg</A></TD>
|
||||
<TD>Login/Password dialog box</TD></TR>
|
||||
<TR><TD><A HREF="SelectFont.html">SelectFont</A></TD>
|
||||
<TD>Font selection widget</TD></TR>
|
||||
<TR><TD><A HREF="SelectColor.html">SelectColor</A></TD>
|
||||
<TD>Color selection widget</TD></TR>
|
||||
</TABLE>
|
||||
<BR><BR><DT><B>Commands Classes</B>
|
||||
<DD><TABLE BORDER=0 CELLSPACING=0>
|
||||
<TR><TD><A HREF="Widget.html">Widget</A></TD>
|
||||
<TD>The Widget base class</TD></TR>
|
||||
<TR><TD><A HREF="DynamicHelp.html">DynamicHelp</A></TD>
|
||||
<TD>Provide help to Tk widget or BWidget</TD></TR>
|
||||
<TR><TD><A HREF="DragSite.html">DragSite</A></TD>
|
||||
<TD>Commands set for Drag facilities</TD></TR>
|
||||
<TR><TD><A HREF="DropSite.html">DropSite</A></TD>
|
||||
<TD>Commands set for Drop facilities</TD></TR>
|
||||
<TR><TD><A HREF="BWidget.html">BWidget</A></TD>
|
||||
<TD>Description text</TD></TR>
|
||||
</TABLE>
|
||||
</DD>
|
||||
|
||||
<BR><HR><BR><B>Load BWidget</B><BR><BR>
|
||||
|
||||
Possible load sequence:
|
||||
<pre>
|
||||
# If package msgcat is available, its locale is used for BWidget
|
||||
package require msgcat
|
||||
# load BWidget
|
||||
package require BWidget
|
||||
</pre>
|
||||
</BODY></HTML>
|
@ -0,0 +1,7 @@
|
||||
<HTML>
|
||||
<HEAD><TITLE>BWidget Manual Pages</TITLE></HEAD>
|
||||
<FRAMESET COLS="180,*" BORDER=0>
|
||||
<FRAME SRC=navtree.html NAME="Menu" SCROLLING=AUTO>
|
||||
<FRAME SRC=contents.html NAME="Manual" SCROLLING=AUTO>
|
||||
</FRAMESET>
|
||||
</HTML>
|
41
R_portable/R/App/R-portable/Tcl/bin64/lib/bwidget-1.9.12/BWman/navtree.html
Executable file
@ -0,0 +1,41 @@
|
||||
<HTML><BODY BGCOLOR=white>
|
||||
<FONT SIZE=1><STRONG><A HREF="contents.html" TARGET=Manual>Brief description</A></STRONG></FONT><BR>
|
||||
<FONT SIZE=1><STRONG>Simple Widgets</STRONG></FONT><BR>
|
||||
<FONT SIZE=1><A HREF="Label.html" TARGET=Manual>Label</A></FONT><BR>
|
||||
<FONT SIZE=1><A HREF="Entry.html" TARGET=Manual>Entry</A></FONT><BR>
|
||||
<FONT SIZE=1><A HREF="Button.html" TARGET=Manual>Button</A></FONT><BR>
|
||||
<FONT SIZE=1><A HREF="ArrowButton.html" TARGET=Manual>ArrowButton</A></FONT><BR>
|
||||
<FONT SIZE=1><A HREF="ProgressBar.html" TARGET=Manual>ProgressBar</A></FONT><BR>
|
||||
<FONT SIZE=1><A HREF="ScrollView.html" TARGET=Manual>ScrollView</A></FONT><BR>
|
||||
<FONT SIZE=1><A HREF="Separator.html" TARGET=Manual>Separator</A></FONT><BR>
|
||||
<FONT SIZE=1><STRONG>Manager Widgets</STRONG></FONT><BR>
|
||||
<FONT SIZE=1><A HREF="MainFrame.html" TARGET=Manual>MainFrame</A></FONT><BR>
|
||||
<FONT SIZE=1><A HREF="LabelFrame.html" TARGET=Manual>LabelFrame</A></FONT><BR>
|
||||
<FONT SIZE=1><A HREF="TitleFrame.html" TARGET=Manual>TitleFrame</A></FONT><BR>
|
||||
<FONT SIZE=1><A HREF="PanelFrame.html" TARGET=Manual>PanelFrame</A></FONT><BR>
|
||||
<FONT SIZE=1><A HREF="ScrolledWindow.html" TARGET=Manual>ScrolledWindow</A></FONT><BR>
|
||||
<FONT SIZE=1><A HREF="ScrollableFrame.html" TARGET=Manual>ScrollableFrame</A></FONT><BR>
|
||||
<FONT SIZE=1><A HREF="PanedWindow.html" TARGET=Manual>PanedWindow</A></FONT><BR>
|
||||
<FONT SIZE=1><A HREF="ButtonBox.html" TARGET=Manual>ButtonBox</A></FONT><BR>
|
||||
<FONT SIZE=1><A HREF="PagesManager.html" TARGET=Manual>PagesManager</A></FONT><BR>
|
||||
<FONT SIZE=1><A HREF="NoteBook.html" TARGET=Manual>NoteBook</A></FONT><BR>
|
||||
<FONT SIZE=1><A HREF="Dialog.html" TARGET=Manual>Dialog</A></FONT><BR>
|
||||
<FONT SIZE=1><A HREF="StatusBar.html" TARGET=Manual>StatusBar</A></FONT><BR>
|
||||
<FONT SIZE=1><STRONG>Composite Widgets</STRONG></FONT><BR>
|
||||
<FONT SIZE=1><A HREF="LabelEntry.html" TARGET=Manual>LabelEntry</A></FONT><BR>
|
||||
<FONT SIZE=1><A HREF="ComboBox.html" TARGET=Manual>ComboBox</A></FONT><BR>
|
||||
<FONT SIZE=1><A HREF="SpinBox.html" TARGET=Manual>SpinBox</A></FONT><BR>
|
||||
<FONT SIZE=1><A HREF="Tree.html" TARGET=Manual>Tree</A></FONT><BR>
|
||||
<FONT SIZE=1><A HREF="ListBox.html" TARGET=Manual>ListBox</A></FONT><BR>
|
||||
<FONT SIZE=1><A HREF="MessageDlg.html" TARGET=Manual>MessageDlg</A></FONT><BR>
|
||||
<FONT SIZE=1><A HREF="ProgressDlg.html" TARGET=Manual>ProgressDlg</A></FONT><BR>
|
||||
<FONT SIZE=1><A HREF="PasswdDlg.html" TARGET=Manual>PasswdDlg</A></FONT><BR>
|
||||
<FONT SIZE=1><A HREF="SelectFont.html" TARGET=Manual>SelectFont</A></FONT><BR>
|
||||
<FONT SIZE=1><A HREF="SelectColor.html" TARGET=Manual>SelectColor</A></FONT><BR>
|
||||
<FONT SIZE=1><STRONG>Commands Classes</STRONG></FONT><BR>
|
||||
<FONT SIZE=1><A HREF="Widget.html" TARGET=Manual>Widget</A></FONT><BR>
|
||||
<FONT SIZE=1><A HREF="DynamicHelp.html" TARGET=Manual>DynamicHelp</A></FONT><BR>
|
||||
<FONT SIZE=1><A HREF="DragSite.html" TARGET=Manual>DragSite</A></FONT><BR>
|
||||
<FONT SIZE=1><A HREF="DropSite.html" TARGET=Manual>DropSite</A></FONT><BR>
|
||||
<FONT SIZE=1><A HREF="BWidget.html" TARGET=Manual>BWidget</A></FONT><BR>
|
||||
</BODY></HTML>
|
458
R_portable/R/App/R-portable/Tcl/bin64/lib/bwidget-1.9.12/BWman/options.htm
Executable file
@ -0,0 +1,458 @@
|
||||
<HTML><HEAD><TITLE>Tk Built-In Commands - options manual page</TITLE></HEAD>
|
||||
<BODY BGCOLOR=white>
|
||||
<DL>
|
||||
<DD><A HREF="options.htm#M2" NAME="L2">NAME</A>
|
||||
<DL><DD>options - Standard options supported by widgets</DL>
|
||||
<DD><A HREF="options.htm#M3" NAME="L3">DESCRIPTION</A>
|
||||
<DL>
|
||||
<DD><A HREF="options.htm#M-activebackground" NAME="L4">-activebackground, activeBackground, Foreground</A>
|
||||
<DD><A HREF="options.htm#M-activeborderwidth" NAME="L5">-activeborderwidth, activeBorderWidth, BorderWidth</A>
|
||||
<DD><A HREF="options.htm#M-activeforeground" NAME="L6">-activeforeground, activeForeground, Background</A>
|
||||
<DD><A HREF="options.htm#M-anchor" NAME="L7">-anchor, anchor, Anchor</A>
|
||||
<DD><A HREF="options.htm#M-background" NAME="L8">-background or -bg, background, Background</A>
|
||||
<DD><A HREF="options.htm#M-bitmap" NAME="L9">-bitmap, bitmap, Bitmap</A>
|
||||
<DD><A HREF="options.htm#M-borderwidth" NAME="L10">-borderwidth or -bd, borderWidth, BorderWidth</A>
|
||||
<DD><A HREF="options.htm#M-cursor" NAME="L11">-cursor, cursor, Cursor</A>
|
||||
<DD><A HREF="options.htm#M-disabledbackground" NAME="L12">-disabledbackground, disabledBackground, DisabledBackground</A>
|
||||
<DD><A HREF="options.htm#M-disabledforeground" NAME="L12">-disabledforeground, disabledForeground, DisabledForeground</A>
|
||||
<DD><A HREF="options.htm#M-exportselection" NAME="L13">-exportselection, exportSelection, ExportSelection</A>
|
||||
<DD><A HREF="options.htm#M-font" NAME="L14">-font, font, Font</A>
|
||||
<DD><A HREF="options.htm#M-foreground" NAME="L15">-foreground or -fg, foreground, Foreground</A>
|
||||
<DD><A HREF="options.htm#M-highlightbackground" NAME="L16">-highlightbackground, highlightBackground, HighlightBackground</A>
|
||||
<DD><A HREF="options.htm#M-highlightcolor" NAME="L17">-highlightcolor, highlightColor, HighlightColor</A>
|
||||
<DD><A HREF="options.htm#M-highlightthickness" NAME="L18">-highlightthickness, highlightThickness, HighlightThickness</A>
|
||||
<DD><A HREF="options.htm#M-image" NAME="L19">-image, image, Image</A>
|
||||
<DD><A HREF="options.htm#M-insertbackground" NAME="L20">-insertbackground, insertBackground, Foreground</A>
|
||||
<DD><A HREF="options.htm#M-insertborderwidth" NAME="L21">-insertborderwidth, insertBorderWidth, BorderWidth</A>
|
||||
<DD><A HREF="options.htm#M-insertofftime" NAME="L22">-insertofftime, insertOffTime, OffTime</A>
|
||||
<DD><A HREF="options.htm#M-insertontime" NAME="L23">-insertontime, insertOnTime, OnTime</A>
|
||||
<DD><A HREF="options.htm#M-insertwidth" NAME="L24">-insertwidth, insertWidth, InsertWidth</A>
|
||||
<DD><A HREF="options.htm#M-jump" NAME="L25">-jump, jump, Jump</A>
|
||||
<DD><A HREF="options.htm#M-justify" NAME="L26">-justify, justify, Justify</A>
|
||||
<DD><A HREF="options.htm#M-orient" NAME="L27">-orient, orient, Orient</A>
|
||||
<DD><A HREF="options.htm#M-padx" NAME="L28">-padx, padX, Pad</A>
|
||||
<DD><A HREF="options.htm#M-pady" NAME="L29">-pady, padY, Pad</A>
|
||||
<DD><A HREF="options.htm#M-relief" NAME="L30">-relief, relief, Relief</A>
|
||||
<DD><A HREF="options.htm#M-repeatdelay" NAME="L31">-repeatdelay, repeatDelay, RepeatDelay</A>
|
||||
<DD><A HREF="options.htm#M-repeatinterval" NAME="L32">-repeatinterval, repeatInterval, RepeatInterval</A>
|
||||
<DD><A HREF="options.htm#M-selectbackground" NAME="L33">-selectbackground, selectBackground, Foreground</A>
|
||||
<DD><A HREF="options.htm#M-selectborderwidth" NAME="L34">-selectborderwidth, selectBorderWidth, BorderWidth</A>
|
||||
<DD><A HREF="options.htm#M-selectforeground" NAME="L35">-selectforeground, selectForeground, Background</A>
|
||||
<DD><A HREF="options.htm#M-setgrid" NAME="L36">-setgrid, setGrid, SetGrid</A>
|
||||
<DD><A HREF="options.htm#M-takefocus" NAME="L37">-takefocus, takeFocus, TakeFocus</A>
|
||||
<DD><A HREF="options.htm#M-text" NAME="L38">-text, text, Text</A>
|
||||
<DD><A HREF="options.htm#M-textvariable" NAME="L39">-textvariable, textVariable, Variable</A>
|
||||
<DD><A HREF="options.htm#M-troughcolor" NAME="L40">-troughcolor, troughColor, Background</A>
|
||||
<DD><A HREF="options.htm#M-underline" NAME="L41">-underline, underline, Underline</A>
|
||||
<DD><A HREF="options.htm#M-wraplength" NAME="L42">-wraplength, wrapLength, WrapLength</A>
|
||||
<DD><A HREF="options.htm#M-xscrollcommand" NAME="L43">-xscrollcommand, xScrollCommand, ScrollCommand</A>
|
||||
<DD><A HREF="options.htm#M-yscrollcommand" NAME="L44">-yscrollcommand, yScrollCommand, ScrollCommand</A>
|
||||
</DL>
|
||||
<DD><A HREF="options.htm#M4" NAME="L45">KEYWORDS</A>
|
||||
</DL><HR>
|
||||
<H3><A NAME="M2">NAME</A></H3>
|
||||
options - Standard options supported by widgets
|
||||
<H3><A NAME="M3">DESCRIPTION</A></H3>
|
||||
This manual entry describes the common configuration options supported
|
||||
by widgets in the Tk toolkit. Every widget does not necessarily support
|
||||
every option (see the manual entries for individual widgets for a list
|
||||
of the standard options supported by that widget), but if a widget does
|
||||
support an option with one of the names listed below, then the option
|
||||
has exactly the effect described below.
|
||||
<P>
|
||||
In the descriptions below, ``Command-Line Name'' refers to the
|
||||
switch used in class commands and <B>configure</B> widget commands to
|
||||
set this value. For example, if an option's command-line switch is
|
||||
<B>-foreground</B> and there exists a widget <B>.a.b.c</B>, then the
|
||||
command
|
||||
<PRE><B>.a.b.c configure -foreground black</B></PRE>
|
||||
may be used to specify the value <B>black</B> for the option in the
|
||||
the widget <B>.a.b.c</B>. Command-line switches may be abbreviated,
|
||||
as long as the abbreviation is unambiguous.
|
||||
``Database Name'' refers to the option's name in the option database (e.g.
|
||||
in .Xdefaults files). ``Database Class'' refers to the option's class value
|
||||
in the option database.
|
||||
<DL>
|
||||
<DT>Command-Line Name: <B><A NAME="M-activebackground">-activebackground</A></B>
|
||||
<DT>Database Name: <B>activeBackground</B>
|
||||
<DT>Database Class: <B>Foreground</B>
|
||||
<DD>Specifies background color to use when drawing active elements.
|
||||
An element (a widget or portion of a widget) is active if the
|
||||
mouse cursor is positioned over the element and pressing a mouse button
|
||||
will cause some action to occur.
|
||||
If strict Motif compliance has been requested by setting the
|
||||
<B>tk_strictMotif</B> variable, this option will normally be
|
||||
ignored; the normal background color will be used instead.
|
||||
For some elements on Windows and Macintosh systems, the active color
|
||||
will only be used while mouse button 1 is pressed over the element.
|
||||
<P><DT>Command-Line Name: <B><A NAME="M-activeborderwidth">-activeborderwidth</A></B>
|
||||
<DT>Database Name: <B>activeBorderWidth</B>
|
||||
<DT>Database Class: <B>BorderWidth</B>
|
||||
<DD>Specifies a non-negative value indicating
|
||||
the width of the 3-D border drawn around active elements. See above for
|
||||
definition of active elements.
|
||||
The value may have any of the forms acceptable to <B><A HREF="../TkLib/GetPixels.htm">Tk_GetPixels</A></B>.
|
||||
This option is typically only available in widgets displaying more
|
||||
than one element at a time (e.g. menus but not buttons).
|
||||
<P><DT>Command-Line Name: <B><A NAME="M-activeforeground">-activeforeground</A></B>
|
||||
<DT>Database Name: <B>activeForeground</B>
|
||||
<DT>Database Class: <B>Background</B>
|
||||
<DD>Specifies foreground color to use when drawing active elements.
|
||||
See above for definition of active elements.
|
||||
<P><DT>Command-Line Name: <B><A NAME="M-anchor">-anchor</A></B>
|
||||
<DT>Database Name: <B>anchor</B>
|
||||
<DT>Database Class: <B>Anchor</B>
|
||||
<DD>Specifies how the information in a widget (e.g. text or a bitmap)
|
||||
is to be displayed in the widget.
|
||||
Must be one of the values <B>n</B>, <B>ne</B>, <B>e</B>, <B>se</B>,
|
||||
<B>s</B>, <B>sw</B>, <B>w</B>, <B>nw</B>, or <B>center</B>.
|
||||
For example, <B>nw</B> means display the information such that its
|
||||
top-left corner is at the top-left corner of the widget.
|
||||
<P><DT>Command-Line Name: <B><A NAME="M-background">-background or -bg</A></B>
|
||||
<DT>Database Name: <B>background</B>
|
||||
<DT>Database Class: <B>Background</B>
|
||||
<DD>Specifies the normal background color to use when displaying the
|
||||
widget.
|
||||
<P><DT>Command-Line Name: <B><A NAME="M-bitmap">-bitmap</A></B>
|
||||
<DT>Database Name: <B>bitmap</B>
|
||||
<DT>Database Class: <B>Bitmap</B>
|
||||
<DD>Specifies a bitmap to display in the widget, in any of the forms
|
||||
acceptable to <B><A HREF="../TkLib/GetBitmap.htm">Tk_GetBitmap</A></B>.
|
||||
The exact way in which the bitmap is displayed may be affected by
|
||||
other options such as <B>anchor</B> or <B>justify</B>.
|
||||
Typically, if this option is specified then it overrides other
|
||||
options that specify a textual value to display in the widget;
|
||||
the <B>bitmap</B> option may be reset to an empty string to re-enable
|
||||
a text display.
|
||||
In widgets that support both <B>bitmap</B> and <B>image</B> options,
|
||||
<B>image</B> will usually override <B>bitmap</B>.
|
||||
<P><DT>Command-Line Name: <B><A NAME="M-borderwidth">-borderwidth or -bd</A></B>
|
||||
<DT>Database Name: <B>borderWidth</B>
|
||||
<DT>Database Class: <B>BorderWidth</B>
|
||||
<DD>Specifies a non-negative value indicating the width
|
||||
of the 3-D border to draw around the outside of the widget (if such a
|
||||
border is being drawn; the <B>relief</B> option typically determines
|
||||
this). The value may also be used when drawing 3-D effects in the
|
||||
interior of the widget.
|
||||
The value may have any of the forms acceptable to <B><A HREF="../TkLib/GetPixels.htm">Tk_GetPixels</A></B>.
|
||||
<P><DT>Command-Line Name: <B><A NAME="M-cursor">-cursor</A></B>
|
||||
<DT>Database Name: <B>cursor</B>
|
||||
<DT>Database Class: <B>Cursor</B>
|
||||
<DD>Specifies the mouse cursor to be used for the widget.
|
||||
The value may have any of the forms acceptable to <B><A HREF="../TkLib/GetCursor.htm">Tk_GetCursor</A></B>.
|
||||
<P><DT>Command-Line Name: <B><A NAME="M-disabledforeground">-disabledforeground</A></B>
|
||||
<P><DT>Command-Line Name: <B><A NAME="M-disabledbackground">-disabledbackground</A></B>
|
||||
<DT>Database Name: <B>disabledBackground</B>
|
||||
<DT>Database Class: <B>DisabledBackground</B>
|
||||
<DD>Specifies background color to use when drawing a disabled element.
|
||||
If the option is specified as an empty string (which is typically the
|
||||
case on monochrome displays), disabled elements are drawn with the
|
||||
normal background color but they are dimmed by drawing them
|
||||
with a stippled fill pattern.
|
||||
<DT>Database Name: <B>disabledForeground</B>
|
||||
<DT>Database Class: <B>DisabledForeground</B>
|
||||
<DD>Specifies foreground color to use when drawing a disabled element.
|
||||
If the option is specified as an empty string (which is typically the
|
||||
case on monochrome displays), disabled elements are drawn with the
|
||||
normal foreground color but they are dimmed by drawing them
|
||||
with a stippled fill pattern.
|
||||
<P><DT>Command-Line Name: <B><A NAME="M-exportselection">-exportselection</A></B>
|
||||
<DT>Database Name: <B>exportSelection</B>
|
||||
<DT>Database Class: <B>ExportSelection</B>
|
||||
<DD>Specifies whether or not a selection in the widget should also be
|
||||
the X selection.
|
||||
The value may have any of the forms accepted by <B><A HREF="../TclLib/GetInt.htm">Tcl_GetBoolean</A></B>,
|
||||
such as <B>true</B>, <B>false</B>, <B>0</B>, <B>1</B>, <B>yes</B>, or <B>no</B>.
|
||||
If the selection is exported, then selecting in the widget deselects
|
||||
the current X selection, selecting outside the widget deselects any
|
||||
widget selection, and the widget will respond to selection retrieval
|
||||
requests when it has a selection. The default is usually for widgets
|
||||
to export selections.
|
||||
<P><DT>Command-Line Name: <B><A NAME="M-font">-font</A></B>
|
||||
<DT>Database Name: <B><A HREF="../TkCmd/font.htm">font</A></B>
|
||||
<DT>Database Class: <B><A HREF="../TkCmd/font.htm">Font</A></B>
|
||||
<DD>Specifies the font to use when drawing text inside the widget.
|
||||
<P><DT>Command-Line Name: <B><A NAME="M-foreground">-foreground or -fg</A></B>
|
||||
<DT>Database Name: <B>foreground</B>
|
||||
<DT>Database Class: <B>Foreground</B>
|
||||
<DD>Specifies the normal foreground color to use when displaying the widget.
|
||||
<P><DT>Command-Line Name: <B><A NAME="M-highlightbackground">-highlightbackground</A></B>
|
||||
<DT>Database Name: <B>highlightBackground</B>
|
||||
<DT>Database Class: <B>HighlightBackground</B>
|
||||
<DD>Specifies the color to display in the traversal highlight region when
|
||||
the widget does not have the input focus.
|
||||
<P><DT>Command-Line Name: <B><A NAME="M-highlightcolor">-highlightcolor</A></B>
|
||||
<DT>Database Name: <B>highlightColor</B>
|
||||
<DT>Database Class: <B>HighlightColor</B>
|
||||
<DD>Specifies the color to use for the traversal highlight rectangle that is
|
||||
drawn around the widget when it has the input focus.
|
||||
<P><DT>Command-Line Name: <B><A NAME="M-highlightthickness">-highlightthickness</A></B>
|
||||
<DT>Database Name: <B>highlightThickness</B>
|
||||
<DT>Database Class: <B>HighlightThickness</B>
|
||||
<DD>Specifies a non-negative value indicating the width of the highlight
|
||||
rectangle to draw around the outside of the widget when it has the
|
||||
input focus.
|
||||
The value may have any of the forms acceptable to <B><A HREF="../TkLib/GetPixels.htm">Tk_GetPixels</A></B>.
|
||||
If the value is zero, no focus highlight is drawn around the widget.
|
||||
<P><DT>Command-Line Name: <B><A NAME="M-image">-image</A></B>
|
||||
<DT>Database Name: <B>image</B>
|
||||
<DT>Database Class: <B>Image</B>
|
||||
<DD>Specifies an image to display in the widget, which must have been
|
||||
created with the <B><A HREF="../TkCmd/image.htm">image create</A></B> command.
|
||||
Typically, if the <B>image</B> option is specified then it overrides other
|
||||
options that specify a bitmap or textual value to display in the widget;
|
||||
the <B>image</B> option may be reset to an empty string to re-enable
|
||||
a bitmap or text display.
|
||||
<P><DT>Command-Line Name: <B><A NAME="M-insertbackground">-insertbackground</A></B>
|
||||
<DT>Database Name: <B>insertBackground</B>
|
||||
<DT>Database Class: <B>Foreground</B>
|
||||
<DD>Specifies the color to use as background in the area covered by the
|
||||
insertion cursor. This color will normally override either the normal
|
||||
background for the widget (or the selection background if the insertion
|
||||
cursor happens to fall in the selection).
|
||||
<P><DT>Command-Line Name: <B><A NAME="M-insertborderwidth">-insertborderwidth</A></B>
|
||||
<DT>Database Name: <B>insertBorderWidth</B>
|
||||
<DT>Database Class: <B>BorderWidth</B>
|
||||
<DD>Specifies a non-negative value indicating the width
|
||||
of the 3-D border to draw around the insertion cursor.
|
||||
The value may have any of the forms acceptable to <B><A HREF="../TkLib/GetPixels.htm">Tk_GetPixels</A></B>.
|
||||
<P><DT>Command-Line Name: <B><A NAME="M-insertofftime">-insertofftime</A></B>
|
||||
<DT>Database Name: <B>insertOffTime</B>
|
||||
<DT>Database Class: <B>OffTime</B>
|
||||
<DD>Specifies a non-negative integer value indicating the number of
|
||||
milliseconds the insertion cursor should remain ``off'' in each blink cycle.
|
||||
If this option is zero then the cursor doesn't blink: it is on
|
||||
all the time.
|
||||
<P><DT>Command-Line Name: <B><A NAME="M-insertontime">-insertontime</A></B>
|
||||
<DT>Database Name: <B>insertOnTime</B>
|
||||
<DT>Database Class: <B>OnTime</B>
|
||||
<DD>Specifies a non-negative integer value indicating the number of
|
||||
milliseconds the insertion cursor should remain ``on'' in each blink cycle.
|
||||
<P><DT>Command-Line Name: <B><A NAME="M-insertwidth">-insertwidth</A></B>
|
||||
<DT>Database Name: <B>insertWidth</B>
|
||||
<DT>Database Class: <B>InsertWidth</B>
|
||||
<DD>Specifies a value indicating the total width of the insertion cursor.
|
||||
The value may have any of the forms acceptable to <B><A HREF="../TkLib/GetPixels.htm">Tk_GetPixels</A></B>.
|
||||
If a border has been specified for the insertion
|
||||
cursor (using the <B>insertBorderWidth</B> option), the border
|
||||
will be drawn inside the width specified by the <B>insertWidth</B>
|
||||
option.
|
||||
<P><DT>Command-Line Name: <B><A NAME="M-jump">-jump</A></B>
|
||||
<DT>Database Name: <B>jump</B>
|
||||
<DT>Database Class: <B>Jump</B>
|
||||
<DD>For widgets with a slider that can be dragged to adjust a value,
|
||||
such as scrollbars, this option determines when
|
||||
notifications are made about changes in the value.
|
||||
The option's value must be a boolean of the form accepted by
|
||||
<B><A HREF="../TclLib/GetInt.htm">Tcl_GetBoolean</A></B>.
|
||||
If the value is false, updates are made continuously as the
|
||||
slider is dragged.
|
||||
If the value is true, updates are delayed until the mouse button
|
||||
is released to end the drag; at that point a single notification
|
||||
is made (the value ``jumps'' rather than changing smoothly).
|
||||
<P><DT>Command-Line Name: <B><A NAME="M-justify">-justify</A></B>
|
||||
<DT>Database Name: <B>justify</B>
|
||||
<DT>Database Class: <B>Justify</B>
|
||||
<DD>When there are multiple lines of text displayed in a widget, this
|
||||
option determines how the lines line up with each other.
|
||||
Must be one of <B>left</B>, <B>center</B>, or <B>right</B>.
|
||||
<B>Left</B> means that the lines' left edges all line up, <B>center</B>
|
||||
means that the lines' centers are aligned, and <B>right</B> means
|
||||
that the lines' right edges line up.
|
||||
<P><DT>Command-Line Name: <B><A NAME="M-orient">-orient</A></B>
|
||||
<DT>Database Name: <B>orient</B>
|
||||
<DT>Database Class: <B>Orient</B>
|
||||
<DD>For widgets that can lay themselves out with either a horizontal
|
||||
or vertical orientation, such as scrollbars, this option specifies
|
||||
which orientation should be used. Must be either <B>horizontal</B>
|
||||
or <B>vertical</B> or an abbreviation of one of these.
|
||||
<P><DT>Command-Line Name: <B><A NAME="M-padx">-padx</A></B>
|
||||
<DT>Database Name: <B>padX</B>
|
||||
<DT>Database Class: <B>Pad</B>
|
||||
<DD>Specifies a non-negative value indicating how much extra space
|
||||
to request for the widget in the X-direction.
|
||||
The value may have any of the forms acceptable to <B><A HREF="../TkLib/GetPixels.htm">Tk_GetPixels</A></B>.
|
||||
When computing how large a window it needs, the widget will
|
||||
add this amount to the width it would normally need (as determined
|
||||
by the width of the things displayed in the widget); if the geometry
|
||||
manager can satisfy this request, the widget will end up with extra
|
||||
internal space to the left and/or right of what it displays inside.
|
||||
Most widgets only use this option for padding text: if they are
|
||||
displaying a bitmap or image, then they usually ignore padding
|
||||
options.
|
||||
<P><DT>Command-Line Name: <B><A NAME="M-pady">-pady</A></B>
|
||||
<DT>Database Name: <B>padY</B>
|
||||
<DT>Database Class: <B>Pad</B>
|
||||
<DD>Specifies a non-negative value indicating how much extra space
|
||||
to request for the widget in the Y-direction.
|
||||
The value may have any of the forms acceptable to <B><A HREF="../TkLib/GetPixels.htm">Tk_GetPixels</A></B>.
|
||||
When computing how large a window it needs, the widget will add
|
||||
this amount to the height it would normally need (as determined by
|
||||
the height of the things displayed in the widget); if the geometry
|
||||
manager can satisfy this request, the widget will end up with extra
|
||||
internal space above and/or below what it displays inside.
|
||||
Most widgets only use this option for padding text: if they are
|
||||
displaying a bitmap or image, then they usually ignore padding
|
||||
options.
|
||||
<P><DT>Command-Line Name: <B><A NAME="M-relief">-relief</A></B>
|
||||
<DT>Database Name: <B>relief</B>
|
||||
<DT>Database Class: <B>Relief</B>
|
||||
<DD>Specifies the 3-D effect desired for the widget. Acceptable
|
||||
values are <B>raised</B>, <B>sunken</B>, <B>flat</B>, <B>ridge</B>,
|
||||
<B>solid</B>, and <B>groove</B>.
|
||||
The value
|
||||
indicates how the interior of the widget should appear relative
|
||||
to its exterior; for example, <B>raised</B> means the interior of
|
||||
the widget should appear to protrude from the screen, relative to
|
||||
the exterior of the widget.
|
||||
<P><DT>Command-Line Name: <B><A NAME="M-repeatdelay">-repeatdelay</A></B>
|
||||
<DT>Database Name: <B>repeatDelay</B>
|
||||
<DT>Database Class: <B>RepeatDelay</B>
|
||||
<DD>Specifies the number of milliseconds a button or key must be held
|
||||
down before it begins to auto-repeat. Used, for example, on the
|
||||
up- and down-arrows in scrollbars.
|
||||
<P><DT>Command-Line Name: <B><A NAME="M-repeatinterval">-repeatinterval</A></B>
|
||||
<DT>Database Name: <B>repeatInterval</B>
|
||||
<DT>Database Class: <B>RepeatInterval</B>
|
||||
<DD>Used in conjunction with <B>repeatDelay</B>: once auto-repeat
|
||||
begins, this option determines the number of milliseconds between
|
||||
auto-repeats.
|
||||
<P><DT>Command-Line Name: <B><A NAME="M-selectbackground">-selectbackground</A></B>
|
||||
<DT>Database Name: <B>selectBackground</B>
|
||||
<DT>Database Class: <B>Foreground</B>
|
||||
<DD>Specifies the background color to use when displaying selected
|
||||
items.
|
||||
<P><DT>Command-Line Name: <B><A NAME="M-selectborderwidth">-selectborderwidth</A></B>
|
||||
<DT>Database Name: <B>selectBorderWidth</B>
|
||||
<DT>Database Class: <B>BorderWidth</B>
|
||||
<DD>Specifies a non-negative value indicating the width
|
||||
of the 3-D border to draw around selected items.
|
||||
The value may have any of the forms acceptable to <B><A HREF="../TkLib/GetPixels.htm">Tk_GetPixels</A></B>.
|
||||
<P><DT>Command-Line Name: <B><A NAME="M-selectforeground">-selectforeground</A></B>
|
||||
<DT>Database Name: <B>selectForeground</B>
|
||||
<DT>Database Class: <B>Background</B>
|
||||
<DD>Specifies the foreground color to use when displaying selected
|
||||
items.
|
||||
<P><DT>Command-Line Name: <B><A NAME="M-setgrid">-setgrid</A></B>
|
||||
<DT>Database Name: <B>setGrid</B>
|
||||
<DT>Database Class: <B>SetGrid</B>
|
||||
<DD>Specifies a boolean value that determines whether this widget controls the
|
||||
resizing grid for its top-level window.
|
||||
This option is typically used in text widgets, where the information
|
||||
in the widget has a natural size (the size of a character) and it makes
|
||||
sense for the window's dimensions to be integral numbers of these units.
|
||||
These natural window sizes form a grid.
|
||||
If the <B>setGrid</B> option is set to true then the widget will
|
||||
communicate with the window manager so that when the user interactively
|
||||
resizes the top-level window that contains the widget, the dimensions of
|
||||
the window will be displayed to the user in grid units and the window
|
||||
size will be constrained to integral numbers of grid units.
|
||||
See the section GRIDDED GEOMETRY MANAGEMENT in the <B><A HREF="../TkCmd/wm.htm">wm</A></B> manual
|
||||
entry for more details.
|
||||
<P><DT>Command-Line Name: <B><A NAME="M-takefocus">-takefocus</A></B>
|
||||
<DT>Database Name: <B>takeFocus</B>
|
||||
<DT>Database Class: <B>TakeFocus</B>
|
||||
<DD>Determines whether the window accepts the focus during keyboard
|
||||
traversal (e.g., Tab and Shift-Tab).
|
||||
Before setting the focus to a window, the traversal scripts
|
||||
consult the value of the <B>takeFocus</B> option.
|
||||
A value of <B>0</B> means that the window should be skipped entirely
|
||||
during keyboard traversal.
|
||||
<B>1</B> means that the window should receive the input
|
||||
focus as long as it is viewable (it and all of its ancestors are mapped).
|
||||
An empty value for the option means that the traversal scripts make
|
||||
the decision about whether or not to focus on the window: the current
|
||||
algorithm is to skip the window if it is
|
||||
disabled, if it has no key bindings, or if it is not viewable.
|
||||
If the value has any other form, then the traversal scripts take
|
||||
the value, append the name of the window to it (with a separator space),
|
||||
and evaluate the resulting string as a Tcl script.
|
||||
The script must return <B>0</B>, <B>1</B>, or an empty string: a
|
||||
<B>0</B> or <B>1</B> value specifies whether the window will receive
|
||||
the input focus, and an empty string results in the default decision
|
||||
described above.
|
||||
Note: this interpretation of the option is defined entirely by
|
||||
the Tcl scripts that implement traversal: the widget implementations
|
||||
ignore the option entirely, so you can change its meaning if you
|
||||
redefine the keyboard traversal scripts.
|
||||
<P><DT>Command-Line Name: <B><A NAME="M-text">-text</A></B>
|
||||
<DT>Database Name: <B><A HREF="../TkCmd/text.htm">text</A></B>
|
||||
<DT>Database Class: <B><A HREF="../TkCmd/text.htm">Text</A></B>
|
||||
<DD>Specifies a string to be displayed inside the widget. The way in which
|
||||
the string is displayed depends on the particular widget and may be
|
||||
determined by other options, such as <B>anchor</B> or <B>justify</B>.
|
||||
<P><DT>Command-Line Name: <B><A NAME="M-textvariable">-textvariable</A></B>
|
||||
<DT>Database Name: <B>textVariable</B>
|
||||
<DT>Database Class: <B><A HREF="../TclCmd/variable.htm">Variable</A></B>
|
||||
<DD>Specifies the name of a variable. The value of the variable is a text
|
||||
string to be displayed inside the widget; if the variable value changes
|
||||
then the widget will automatically update itself to reflect the new value.
|
||||
The way in which the string is displayed in the widget depends on the
|
||||
particular widget and may be determined by other options, such as
|
||||
<B>anchor</B> or <B>justify</B>.
|
||||
<P><DT>Command-Line Name: <B><A NAME="M-troughcolor">-troughcolor</A></B>
|
||||
<DT>Database Name: <B>troughColor</B>
|
||||
<DT>Database Class: <B>Background</B>
|
||||
<DD>Specifies the color to use for the rectangular trough areas
|
||||
in widgets such as scrollbars and scales.
|
||||
<P><DT>Command-Line Name: <B><A NAME="M-underline">-underline</A></B>
|
||||
<DT>Database Name: <B>underline</B>
|
||||
<DT>Database Class: <B>Underline</B>
|
||||
<DD>Specifies the integer index of a character to underline in the widget.
|
||||
This option is used by the default bindings to implement keyboard
|
||||
traversal for menu buttons and menu entries.
|
||||
0 corresponds to the first character of the text displayed in the
|
||||
widget, 1 to the next character, and so on.
|
||||
<P><DT>Command-Line Name: <B><A NAME="M-wraplength">-wraplength</A></B>
|
||||
<DT>Database Name: <B>wrapLength</B>
|
||||
<DT>Database Class: <B>WrapLength</B>
|
||||
<DD>For widgets that can perform word-wrapping, this option specifies
|
||||
the maximum line length.
|
||||
Lines that would exceed this length are wrapped onto the next line,
|
||||
so that no line is longer than the specified length.
|
||||
The value may be specified in any of the standard forms for
|
||||
screen distances.
|
||||
If this value is less than or equal to 0 then no wrapping is done: lines
|
||||
will break only at newline characters in the text.
|
||||
<P><DT>Command-Line Name: <B><A NAME="M-xscrollcommand">-xscrollcommand</A></B>
|
||||
<DT>Database Name: <B>xScrollCommand</B>
|
||||
<DT>Database Class: <B>ScrollCommand</B>
|
||||
<DD>Specifies the prefix for a command used to communicate with horizontal
|
||||
scrollbars.
|
||||
When the view in the widget's window changes (or
|
||||
whenever anything else occurs that could change the display in a
|
||||
scrollbar, such as a change in the total size of the widget's
|
||||
contents), the widget will
|
||||
generate a Tcl command by concatenating the scroll command and
|
||||
two numbers.
|
||||
Each of the numbers is a fraction between 0 and 1, which indicates
|
||||
a position in the document. 0 indicates the beginning of the document,
|
||||
1 indicates the end, .333 indicates a position one third the way through
|
||||
the document, and so on.
|
||||
The first fraction indicates the first information in the document
|
||||
that is visible in the window, and the second fraction indicates
|
||||
the information just after the last portion that is visible.
|
||||
The command is
|
||||
then passed to the Tcl interpreter for execution. Typically the
|
||||
<B>xScrollCommand</B> option consists of the path name of a scrollbar
|
||||
widget followed by ``set'', e.g. ``.x.scrollbar set'': this will cause
|
||||
the scrollbar to be updated whenever the view in the window changes.
|
||||
If this option is not specified, then no command will be executed.
|
||||
<P><DT>Command-Line Name: <B><A NAME="M-yscrollcommand">-yscrollcommand</A></B>
|
||||
<DT>Database Name: <B>yScrollCommand</B>
|
||||
<DT>Database Class: <B>ScrollCommand</B>
|
||||
<DD>Specifies the prefix for a command used to communicate with vertical
|
||||
scrollbars. This option is treated in the same way as the
|
||||
<B>xScrollCommand</B> option, except that it is used for vertical
|
||||
scrollbars and is provided by widgets that support vertical scrolling.
|
||||
See the description of <B>xScrollCommand</B> for details
|
||||
on how this option is used.
|
||||
|
||||
</DL>
|
||||
<H3><A NAME="M4">KEYWORDS</A></H3>
|
||||
<A href="../Keywords/C.htm#class">class</A>, <A href="../Keywords/N.htm#name">name</A>, <A href="../Keywords/S.htm#standard option">standard option</A>, <A href="../Keywords/S.htm#switch">switch</A>
|
||||
<HR><PRE>
|
||||
<A HREF="../copyright.htm">Copyright</A> © 1990-1994 The Regents of the University of California.
|
||||
<A HREF="../copyright.htm">Copyright</A> © 1994-1996 Sun Microsystems, Inc.
|
||||
<A HREF="../copyright.htm">Copyright</A> © 1995-1997 Roger E. Critchlow Jr.</PRE>
|
||||
</BODY></HTML>
|
266
R_portable/R/App/R-portable/Tcl/bin64/lib/bwidget-1.9.12/CHANGES.txt
Executable file
@ -0,0 +1,266 @@
|
||||
____________________________________________________________
|
||||
BWidget 1.2.1 (07/09/1999)
|
||||
|
||||
CHANGES FROM 1.2 TO 1.2.1
|
||||
|
||||
This version is the first patch of 1.2. It does not introduce
|
||||
incompatibilites.
|
||||
This patch include some new requested features, that I think
|
||||
can't wait for 1.3:
|
||||
- special menu handling (see MainFrame)
|
||||
- tabs bindings in NoteBook
|
||||
- label alignment of LabelFrame
|
||||
- -repeatdelay and -repeatinterval options on SpinBox
|
||||
|
||||
|
||||
* Entry
|
||||
- <Destroy> event added to tag BwDisabledEntry
|
||||
- fixed bug when -textvariable use a variable containing space
|
||||
|
||||
* MainFrame
|
||||
- fixed bug when -textvariable use a variable containing space
|
||||
- menubar entry creation modified to use the menuid as the
|
||||
subpathname to permit special menu (help, system, apple)
|
||||
|
||||
* LabelFrame
|
||||
- LabelFrame::align command added
|
||||
|
||||
* ScrollableFrame
|
||||
- fixed typo bug
|
||||
|
||||
* PagesManager
|
||||
- fixed bug of window size
|
||||
- 'pages' modified to optionally include first and last indices.
|
||||
('page' is still available but deprecated)
|
||||
|
||||
* NoteBook
|
||||
- new command 'bindtabs'
|
||||
- fixed bug in handling result of -leavecmd command
|
||||
- 'pages' modified to optionally include first and last indices.
|
||||
('page' is still available but deprecated)
|
||||
|
||||
* ComboBox
|
||||
- little border added around the popdown list, which appeared
|
||||
to have no border under windows when popped above a widget
|
||||
with the same background color.
|
||||
|
||||
* SpinBox
|
||||
- options -repeatdelay and -repeatinterval added.
|
||||
|
||||
* Tree
|
||||
- fixed strange behaviour when editing: 'selection range'
|
||||
replaced by 'selection from'/'selection to'
|
||||
- widget is redrawn if needed in 'edit' and 'see'
|
||||
- fixed bug in see
|
||||
- nodes modified to optionally include first and last indices.
|
||||
- _subdelete modified to iterative method
|
||||
|
||||
* ListBox
|
||||
- fixed strange behaviour when editing: 'selection range'
|
||||
replaced by 'selection from'/'selection to'
|
||||
- ListBox is redrawn if needed in 'edit' and 'see'
|
||||
- fixed bug in see
|
||||
- 'items' modified to optionally include first and last indices.
|
||||
('item' is still available but deprecated)
|
||||
|
||||
* SelectColor
|
||||
- fixed bug in call to GlobalVar::trace renamed GlobalVar::tracevar
|
||||
|
||||
* DragSite and DropSite
|
||||
- fixed bug introduced by new button event.
|
||||
|
||||
* DynamicHelp
|
||||
- restored version of 1.1, due to the bug under windows
|
||||
|
||||
* BWidget::place
|
||||
- fixed bug when x or y is 0.
|
||||
|
||||
* es.rc resource file included
|
||||
|
||||
|
||||
____________________________________________________________
|
||||
BWidget 1.2 (05/21/1999)
|
||||
|
||||
CHANGES FROM 1.1 TO 1.2
|
||||
|
||||
|
||||
* 4 new widget:
|
||||
- ScrollableFrame
|
||||
- ScrollView
|
||||
- PagesManager
|
||||
- PasswdDlg (contributed by Stephane Lavirotte)
|
||||
|
||||
* Widget:
|
||||
- Flag option type added
|
||||
- option resource database read while widget creation,
|
||||
not while widget class creation.
|
||||
- better handling of BWidget definition using another BWidget as a top pathname.
|
||||
|
||||
* MainFrame
|
||||
- more options included for ProgressBar
|
||||
(INCOMPATIBILITY: option -variable renamed -progressvar)
|
||||
- -menu option modified to have tags on entries and menu id on cascad menu
|
||||
(INCOMPATIBILITY of option -menu)
|
||||
- new command: getmenu
|
||||
- new command: setmenustate
|
||||
|
||||
* DropSite
|
||||
- operations completly reworked
|
||||
- option -droptypes modified (INCOMPATIBILITY)
|
||||
- return code of -dropovercmd modified
|
||||
bit 'ok' and bit 'recall' reverted
|
||||
(INCOMPATIBILITY in -dropovercmd command)
|
||||
- new command: setoperation
|
||||
|
||||
* DragSite:
|
||||
- Drag now initiates while <ButtonPress-x> followed by <Bx-Motion> of
|
||||
4 pixels, so it is possible to have a <ButtonPress-x> event and
|
||||
drag event on the same button.
|
||||
- -dragevent option modified: must be the number of the button: 1, 2 or 3
|
||||
Option is now defaulted to 1, but Entry widget keep it to 3.
|
||||
(INCOMPATIBILITY)
|
||||
- return result of -draginitcmd modified (INCOMPATIBILITY)
|
||||
|
||||
* ListBox:
|
||||
- edit command improved.
|
||||
new arguments: initial text, and command to verify the text before accept it.
|
||||
(INCOMPATIBILITY in call to edit)
|
||||
- Drag and Drop modified
|
||||
(INCOMPATIBILITY in -dropovercmd command)
|
||||
- new command: reorder
|
||||
|
||||
* Tree:
|
||||
- edit command improved.
|
||||
new arguments: initial text, and command to verify the text before accept it.
|
||||
(INCOMPATIBILITY in call to edit)
|
||||
- Drag and Drop modified
|
||||
(INCOMPATIBILITY in -dropovercmd command)
|
||||
- new command: reorder
|
||||
- new command: visible
|
||||
- less full-redraw
|
||||
|
||||
* NoteBook:
|
||||
- relief reworked
|
||||
- added option -leavecmd on pages
|
||||
- option -image implemented
|
||||
- new command: move
|
||||
- delete command now accept an optionnal argument specifying
|
||||
whether the frame of the page should be destroyed or not.
|
||||
If not, this frame is reused by insert command for the same page.
|
||||
|
||||
* Entry and LabelEntry:
|
||||
- direct access to entry command
|
||||
- bind command added on the entry subwidget
|
||||
|
||||
* ComboBox:
|
||||
- option -postcommand added
|
||||
- bind command added on the entry subwidget
|
||||
|
||||
* SpinBox:
|
||||
- bind command added on the entry subwidget
|
||||
- floating point fixed - work needed
|
||||
|
||||
* ProgressBar:
|
||||
- now can be incremental or not limited ('unknow-time' processing)
|
||||
|
||||
* Bitmap:
|
||||
- xpm image type added with use of xpm-to-image by Roger E. Critchlow Jr.
|
||||
|
||||
* Lots of focus problem solved
|
||||
|
||||
* ...and bugs corrected.
|
||||
|
||||
|
||||
INCOMPATIBILITIES
|
||||
|
||||
Incompatibilities are very localized, so we hope that it will
|
||||
not be painfull to upgrade to 1.2.
|
||||
|
||||
* MainFrame related imcompatibilities
|
||||
- Upgrade MainFrame -menu option and change -variable option
|
||||
by -progressvar.
|
||||
|
||||
* Drag and drop related imcompatibilities
|
||||
- Upgrade -dragevent option, and command associated to -draginitcmd
|
||||
and -dropovercmd.
|
||||
- Upgrade -dragendcmd/-dragovercmd command of Tree and ListBox widget
|
||||
|
||||
* Edition in Tree and ListBox
|
||||
- Verify arguments passed in call to edit command of
|
||||
Tree and ListBox
|
||||
|
||||
|
||||
____________________________________________________________
|
||||
BWidget 1.1 (03/12/1999)
|
||||
|
||||
CHANGES FROM 1.0 TO 1.1
|
||||
|
||||
WHAT'S NEW
|
||||
|
||||
The most important change in BWidget 1.1 is the support
|
||||
of tk path command, but the old syntax is always available.
|
||||
configure command now returns a valid configuration information list.
|
||||
|
||||
(I hope that) All submitted bugs have been corrected.
|
||||
|
||||
Following widget have been reworked:
|
||||
|
||||
* ListBox:
|
||||
- ListBox items have now a -indent option.
|
||||
- insert command modified to look more as a tk
|
||||
listbox insert command (see INCOMPATIBILITIES)
|
||||
- item command added to retreive one or more items
|
||||
|
||||
* Tree:
|
||||
- insert command modified to look more as a
|
||||
listbox insert command (see INCOMPATIBILITIES)
|
||||
|
||||
* LabelEntry:
|
||||
- -value and -variable options renamed to -text and -textvariable
|
||||
(see INCOMPATIBILITIES)
|
||||
|
||||
* SpinBox and ComboBox:
|
||||
- -value and -variable options renamed to -text and -textvariable
|
||||
(see INCOMPATIBILITIES)
|
||||
- New command getvalue and setvalue added to manipulate
|
||||
current value by index.
|
||||
|
||||
* NoteBook:
|
||||
- Pages have now an identifier.
|
||||
- insert command modififed (see INCOMPATIBILITIES)
|
||||
- page command added to retreive one or more pages
|
||||
- getframe command added
|
||||
|
||||
|
||||
INCOMPATIBILITIES (sorry for this)
|
||||
|
||||
* LabelEntry, SpinBox and ComboBox:
|
||||
- -value and -variable options renamed to -text and -textvariable
|
||||
|
||||
* Entry and LabelEntry:
|
||||
- setfocus doesn't exist anymore. Directly use tk command focus.
|
||||
|
||||
* NoteBook:
|
||||
- Pages have now an identifier, which modifies insert command:
|
||||
NoteBook::insert $nb index ?option value ...?
|
||||
is now
|
||||
$nb insert index page ?option value ...?
|
||||
|
||||
* Tree:
|
||||
- insert command modified:
|
||||
Tree::insert $nb $parent $node $index ?option value ...?
|
||||
becomes
|
||||
$tree insert $index $parent $node ?option value ...?
|
||||
|
||||
* ListBox:
|
||||
- insert command modified:
|
||||
ListBox::insert $list $item $index ?option value ...?
|
||||
becomes
|
||||
$list insert $index $item ?option value ...?
|
||||
|
||||
|
||||
____________________________________________________________
|
||||
BWidget 1.0 (02/19/1999)
|
||||
|
||||
First release.
|
||||
|
41
R_portable/R/App/R-portable/Tcl/bin64/lib/bwidget-1.9.12/LICENSE.txt
Executable file
@ -0,0 +1,41 @@
|
||||
BWidget ToolKit
|
||||
Copyright (c) 1998-1999 UNIFIX.
|
||||
Copyright (c) 2001-2002 ActiveState Corp.
|
||||
|
||||
The following terms apply to all files associated with the software
|
||||
unless explicitly disclaimed in individual files.
|
||||
|
||||
The authors hereby grant permission to use, copy, modify, distribute,
|
||||
and license this software and its documentation for any purpose, provided
|
||||
that existing copyright notices are retained in all copies and that this
|
||||
notice is included verbatim in any distributions. No written agreement,
|
||||
license, or royalty fee is required for any of the authorized uses.
|
||||
Modifications to this software may be copyrighted by their authors
|
||||
and need not follow the licensing terms described here, provided that
|
||||
the new terms are clearly indicated on the first page of each file where
|
||||
they apply.
|
||||
|
||||
IN NO EVENT SHALL THE AUTHORS OR DISTRIBUTORS BE LIABLE TO ANY PARTY
|
||||
FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
|
||||
ARISING OUT OF THE USE OF THIS SOFTWARE, ITS DOCUMENTATION, OR ANY
|
||||
DERIVATIVES THEREOF, EVEN IF THE AUTHORS HAVE BEEN ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
THE AUTHORS AND DISTRIBUTORS SPECIFICALLY DISCLAIM ANY WARRANTIES,
|
||||
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT. THIS SOFTWARE
|
||||
IS PROVIDED ON AN "AS IS" BASIS, AND THE AUTHORS AND DISTRIBUTORS HAVE
|
||||
NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR
|
||||
MODIFICATIONS.
|
||||
|
||||
GOVERNMENT USE: If you are acquiring this software on behalf of the
|
||||
U.S. government, the Government shall have only "Restricted Rights"
|
||||
in the software and related documentation as defined in the Federal
|
||||
Acquisition Regulations (FARs) in Clause 52.227.19 (c) (2). If you
|
||||
are acquiring the software on behalf of the Department of Defense, the
|
||||
software shall be classified as "Commercial Computer Software" and the
|
||||
Government shall have only "Restricted Rights" as defined in Clause
|
||||
252.227-7013 (c) (1) of DFARs. Notwithstanding the foregoing, the
|
||||
authors grant the U.S. Government and others acting in its behalf
|
||||
permission to use and distribute the software in accordance with the
|
||||
terms specified in this license.
|
127
R_portable/R/App/R-portable/Tcl/bin64/lib/bwidget-1.9.12/README.txt
Executable file
@ -0,0 +1,127 @@
|
||||
BWidget ToolKit 1.9.0 July 2009
|
||||
Copyright (c) 1998-1999 UNIFIX.
|
||||
Copyright (c) 2001-2002 ActiveState Corp.
|
||||
|
||||
See the file LICENSE.txt for license info (uses Tcl's BSD-style license).
|
||||
|
||||
--------------------------------------------------------------------------
|
||||
|
||||
WHAT IS BWIDGET ?
|
||||
|
||||
The BWidget Toolkit is a high-level Widget Set for Tcl/Tk built using
|
||||
native Tcl/Tk 8.x namespaces.
|
||||
|
||||
The BWidgets have a professional look&feel as in other well known
|
||||
Toolkits (Tix or Incr Widgets), but the concept is radically different
|
||||
because everything is pure Tcl/Tk. No platform dependencies, and no
|
||||
compiling required. The code is 100% Pure Tcl/Tk.
|
||||
|
||||
The BWidget library was originally developed by UNIFIX Online, and
|
||||
released under both the GNU Public License and the Tcl license.
|
||||
BWidget is now maintained as a community project, hosted by
|
||||
Sourceforge. Scores of fixes and enhancements have been added by
|
||||
community developers. See the ChangeLog file for details.
|
||||
|
||||
--------------------------------------------------------------------------
|
||||
|
||||
WIDGET LIST (1.9)
|
||||
|
||||
Simple Widgets
|
||||
Label Extended Label widget
|
||||
Entry Extended Entry widget
|
||||
Button Extended Button widget
|
||||
ArrowButton Button widget with an arrow shape.
|
||||
ProgressBar Progress indicator widget
|
||||
ScrollView Display the visible area of a scrolled window
|
||||
Separator 3D separator widget
|
||||
|
||||
Manager Widgets
|
||||
MainFrame Manage toplevel with menu, toolbar and statusbar
|
||||
LabelFrame Frame with a Label
|
||||
TitleFrame Frame with a title
|
||||
ScrolledWindow Generic scrolled widget
|
||||
ScrollableFrame Scrollable frame containing widget
|
||||
PanedWindow Tiled layout manager widget
|
||||
ButtonBox Set of buttons with horizontal or vertical layout
|
||||
PagesManager Pages manager widget
|
||||
NoteBook Notebook manager widget
|
||||
Dialog Dialog abstraction with custom buttons
|
||||
|
||||
Composite Widgets
|
||||
LabelEntry LabelFrame containing an Entry widget.
|
||||
ComboBox ComboBox widget
|
||||
SpinBox SpinBox widget
|
||||
Tree Tree widget
|
||||
ListBox ListBox widget
|
||||
MessageDlg Message dialog box
|
||||
ProgressDlg Progress indicator dialog box
|
||||
PasswdDlg Login/Password dialog box (contributed by Stephane Lavirotte)
|
||||
SelectFont Font selection widget
|
||||
SelectColor Color selection widget
|
||||
|
||||
Commands Classes
|
||||
Widget The Widget base class
|
||||
DynamicHelp Provide help to Tk widget or BWidget
|
||||
DragSite Commands set for Drag facilities
|
||||
DropSite Commands set for Drop facilities
|
||||
BWidget Utilities
|
||||
|
||||
--------------------------------------------------------------------------
|
||||
INSTALLATION AND USE
|
||||
|
||||
- On Unix Platform:
|
||||
Uncompress the file BWidget-<version>.tar.Z|gz
|
||||
|
||||
To use the BWidget:
|
||||
- If you have uncompressed the archive file under the Tcl Library Path
|
||||
directory, you only need to do:
|
||||
% package require BWidget
|
||||
- If not, you have to specify the BWidget installation path in auto_path
|
||||
global variable:
|
||||
% lappend auto_path <install_path>
|
||||
% package require BWidget
|
||||
|
||||
To launch the demo, you need to cd into the demo subdirectory:
|
||||
$ cd <install_path>/demo
|
||||
$ wish demo.tcl
|
||||
|
||||
- On Windows and others Platforms:
|
||||
Uncompress the file BWidget-<version>.zip
|
||||
|
||||
To use the BWidget:
|
||||
- If you uncompressed the archive file under the Tcl Library Path
|
||||
directory, you only need to do:
|
||||
% package require BWidget
|
||||
- If not, you have to specify the BWidget installation path in auto_path
|
||||
global variable:
|
||||
% lappend auto_path your_path
|
||||
% package require BWidget
|
||||
|
||||
To launch the demo :
|
||||
Double click on demo.tcl in the demo subdirectory
|
||||
|
||||
|
||||
Distribution contains these directories:
|
||||
|
||||
BWidget-<version> Root directory and BWidget Tcl sources
|
||||
BWman HTML manual pages
|
||||
images images used by BWidget
|
||||
lang Resources for language customization
|
||||
demo Demo sources
|
||||
tests BWidgets test suite
|
||||
|
||||
|
||||
--------------------------------------------------------------------------
|
||||
|
||||
DOCUMENTATION
|
||||
|
||||
HTML manual pages are available in the BWman subdirectory. Point to
|
||||
index.html for frame version with tree navigation, or to contents.html
|
||||
for no frame version.
|
||||
|
||||
--------------------------------------------------------------------------
|
||||
|
||||
CONTACTS
|
||||
|
||||
The BWidget toolkit is maintained on Sourceforge, at
|
||||
http://www.sourceforge.net/projects/tcllib/
|
551
R_portable/R/App/R-portable/Tcl/bin64/lib/bwidget-1.9.12/arrow.tcl
Executable file
@ -0,0 +1,551 @@
|
||||
# ------------------------------------------------------------------------------
|
||||
# arrow.tcl
|
||||
# This file is part of Unifix BWidget Toolkit
|
||||
# ------------------------------------------------------------------------------
|
||||
# Index of commands:
|
||||
# Public commands
|
||||
# - ArrowButton::create
|
||||
# - ArrowButton::configure
|
||||
# - ArrowButton::cget
|
||||
# - ArrowButton::invoke
|
||||
# Private commands (redraw commands)
|
||||
# - ArrowButton::_redraw
|
||||
# - ArrowButton::_redraw_state
|
||||
# - ArrowButton::_redraw_relief
|
||||
# - ArrowButton::_redraw_whole
|
||||
# Private commands (event bindings)
|
||||
# - ArrowButton::_destroy
|
||||
# - ArrowButton::_enter
|
||||
# - ArrowButton::_leave
|
||||
# - ArrowButton::_press
|
||||
# - ArrowButton::_release
|
||||
# - ArrowButton::_repeat
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
namespace eval ArrowButton {
|
||||
Widget::define ArrowButton arrow DynamicHelp
|
||||
|
||||
Widget::tkinclude ArrowButton button .c \
|
||||
include [list \
|
||||
-borderwidth -bd \
|
||||
-relief -highlightbackground \
|
||||
-highlightcolor -highlightthickness -takefocus]
|
||||
|
||||
Widget::declare ArrowButton [list \
|
||||
[list -type Enum button 0 [list arrow button]] \
|
||||
[list -dir Enum top 0 [list top bottom left right]] \
|
||||
[list -width Int 15 0 "%d >= 0"] \
|
||||
[list -height Int 15 0 "%d >= 0"] \
|
||||
[list -ipadx Int 0 0 "%d >= 0"] \
|
||||
[list -ipady Int 0 0 "%d >= 0"] \
|
||||
[list -clean Int 2 0 "%d >= 0 && %d <= 2"] \
|
||||
[list -activeforeground TkResource "" 0 button] \
|
||||
[list -activebackground TkResource "" 0 button] \
|
||||
[list -disabledforeground TkResource "" 0 button] \
|
||||
[list -foreground TkResource "" 0 button] \
|
||||
[list -background TkResource "" 0 button] \
|
||||
[list -state TkResource "" 0 button] \
|
||||
[list -troughcolor TkResource "" 0 scrollbar] \
|
||||
[list -arrowbd Int 1 0 "%d >= 0 && %d <= 2"] \
|
||||
[list -arrowrelief Enum raised 0 [list raised sunken]] \
|
||||
[list -command String "" 0] \
|
||||
[list -armcommand String "" 0] \
|
||||
[list -disarmcommand String "" 0] \
|
||||
[list -repeatdelay Int 0 0 "%d >= 0"] \
|
||||
[list -repeatinterval Int 0 0 "%d >= 0"] \
|
||||
[list -fg Synonym -foreground] \
|
||||
[list -bg Synonym -background] \
|
||||
]
|
||||
DynamicHelp::include ArrowButton balloon
|
||||
|
||||
bind BwArrowButtonC <Enter> {ArrowButton::_enter %W}
|
||||
bind BwArrowButtonC <Leave> {ArrowButton::_leave %W}
|
||||
bind BwArrowButtonC <ButtonPress-1> {ArrowButton::_press %W}
|
||||
bind BwArrowButtonC <ButtonRelease-1> {ArrowButton::_release %W}
|
||||
bind BwArrowButtonC <Key-space> {ArrowButton::invoke %W; break}
|
||||
bind BwArrowButtonC <Return> {ArrowButton::invoke %W; break}
|
||||
bind BwArrowButton <Configure> {ArrowButton::_redraw_whole %W %w %h}
|
||||
bind BwArrowButton <Destroy> {ArrowButton::_destroy %W}
|
||||
|
||||
variable _grab
|
||||
variable _moved
|
||||
|
||||
array set _grab {current "" pressed "" oldstate "normal" oldrelief ""}
|
||||
}
|
||||
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# Command ArrowButton::create
|
||||
# -----------------------------------------------------------------------------
|
||||
proc ArrowButton::create { path args } {
|
||||
# Initialize configuration mappings and parse arguments
|
||||
array set submaps [list ArrowButton [list ] .c [list ]]
|
||||
array set submaps [Widget::parseArgs ArrowButton $args]
|
||||
|
||||
# Create the class frame (so we can do the option db queries)
|
||||
frame $path -class ArrowButton -borderwidth 0 -highlightthickness 0
|
||||
Widget::initFromODB ArrowButton $path $submaps(ArrowButton)
|
||||
|
||||
# Create the canvas with the initial options
|
||||
eval [list canvas $path.c] $submaps(.c)
|
||||
|
||||
# Compute the width and height of the canvas from the width/height
|
||||
# of the ArrowButton and the borderwidth/hightlightthickness.
|
||||
set w [Widget::getMegawidgetOption $path -width]
|
||||
set h [Widget::getMegawidgetOption $path -height]
|
||||
set bd [Widget::cget $path -borderwidth]
|
||||
set ht [Widget::cget $path -highlightthickness]
|
||||
set pad [expr {2*($bd+$ht)}]
|
||||
|
||||
$path.c configure -width [expr {$w-$pad}] -height [expr {$h-$pad}]
|
||||
bindtags $path [list $path BwArrowButton [winfo toplevel $path] all]
|
||||
bindtags $path.c [list $path.c BwArrowButtonC [winfo toplevel $path.c] all]
|
||||
pack $path.c -expand yes -fill both
|
||||
|
||||
DynamicHelp::sethelp $path $path.c 1
|
||||
|
||||
set ::ArrowButton::_moved($path) 0
|
||||
|
||||
return [Widget::create ArrowButton $path]
|
||||
}
|
||||
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# Command ArrowButton::configure
|
||||
# -----------------------------------------------------------------------------
|
||||
proc ArrowButton::configure { path args } {
|
||||
set res [Widget::configure $path $args]
|
||||
|
||||
set ch1 [expr {[Widget::hasChanged $path -width w] |
|
||||
[Widget::hasChanged $path -height h] |
|
||||
[Widget::hasChanged $path -borderwidth bd] |
|
||||
[Widget::hasChanged $path -highlightthickness ht]}]
|
||||
set ch2 [expr {[Widget::hasChanged $path -type val] |
|
||||
[Widget::hasChanged $path -ipadx val] |
|
||||
[Widget::hasChanged $path -ipady val] |
|
||||
[Widget::hasChanged $path -arrowbd val] |
|
||||
[Widget::hasChanged $path -clean val] |
|
||||
[Widget::hasChanged $path -dir val]}]
|
||||
|
||||
if { $ch1 } {
|
||||
set pad [expr {2*($bd+$ht)}]
|
||||
$path.c configure \
|
||||
-width [expr {$w-$pad}] -height [expr {$h-$pad}] \
|
||||
-borderwidth $bd -highlightthickness $ht
|
||||
set ch2 1
|
||||
}
|
||||
if { $ch2 } {
|
||||
_redraw_whole $path [winfo width $path] [winfo height $path]
|
||||
} else {
|
||||
_redraw_relief $path
|
||||
_redraw_state $path
|
||||
}
|
||||
DynamicHelp::sethelp $path $path.c
|
||||
|
||||
return $res
|
||||
}
|
||||
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# Command ArrowButton::cget
|
||||
# -----------------------------------------------------------------------------
|
||||
proc ArrowButton::cget { path option } {
|
||||
return [Widget::cget $path $option]
|
||||
}
|
||||
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
# Command ArrowButton::invoke
|
||||
# ------------------------------------------------------------------------------
|
||||
proc ArrowButton::invoke { path } {
|
||||
if { ![string equal [winfo class $path] "ArrowButton"] } {
|
||||
set path [winfo parent $path]
|
||||
}
|
||||
if { ![string equal [Widget::getoption $path -state] "disabled"] } {
|
||||
set oldstate [Widget::getoption $path -state]
|
||||
if { [string equal [Widget::getoption $path -type] "button"] } {
|
||||
set oldrelief [Widget::getoption $path -relief]
|
||||
configure $path -state active -relief sunken
|
||||
} else {
|
||||
set oldrelief [Widget::getoption $path -arrowrelief]
|
||||
configure $path -state active -arrowrelief sunken
|
||||
}
|
||||
update idletasks
|
||||
if {[llength [set cmd [Widget::getoption $path -armcommand]]]} {
|
||||
uplevel \#0 $cmd
|
||||
}
|
||||
after 10
|
||||
if { [string equal [Widget::getoption $path -type] "button"] } {
|
||||
configure $path -state $oldstate -relief $oldrelief
|
||||
} else {
|
||||
configure $path -state $oldstate -arrowrelief $oldrelief
|
||||
}
|
||||
if {[llength [set cmd [Widget::getoption $path -disarmcommand]]]} {
|
||||
uplevel \#0 $cmd
|
||||
}
|
||||
if {[llength [set cmd [Widget::getoption $path -command]]]} {
|
||||
uplevel \#0 $cmd
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
# Command ArrowButton::_redraw
|
||||
# ------------------------------------------------------------------------------
|
||||
proc ArrowButton::_redraw { path width height } {
|
||||
variable _moved
|
||||
|
||||
set _moved($path) 0
|
||||
set type [Widget::getoption $path -type]
|
||||
set dir [Widget::getoption $path -dir]
|
||||
set bd [expr {[$path.c cget -borderwidth] + [$path.c cget -highlightthickness] + 1}]
|
||||
set clean [Widget::getoption $path -clean]
|
||||
if { [string equal $type "arrow"] } {
|
||||
if { [set id [$path.c find withtag rect]] == "" } {
|
||||
$path.c create rectangle $bd $bd [expr {$width-$bd-1}] [expr {$height-$bd-1}] -tags rect
|
||||
} else {
|
||||
$path.c coords $id $bd $bd [expr {$width-$bd-1}] [expr {$height-$bd-1}]
|
||||
}
|
||||
$path.c lower rect
|
||||
set arrbd [Widget::getoption $path -arrowbd]
|
||||
set bd [expr {$bd+$arrbd-1}]
|
||||
} else {
|
||||
$path.c delete rect
|
||||
}
|
||||
# w and h are max width and max height of arrow
|
||||
set w [expr {$width - 2*([Widget::getoption $path -ipadx]+$bd)}]
|
||||
set h [expr {$height - 2*([Widget::getoption $path -ipady]+$bd)}]
|
||||
|
||||
if { $w < 2 } {set w 2}
|
||||
if { $h < 2 } {set h 2}
|
||||
|
||||
if { $clean > 0 } {
|
||||
# arrange for base to be odd
|
||||
if { [string equal $dir "top"] || [string equal $dir "bottom"] } {
|
||||
if { !($w % 2) } {
|
||||
incr w -1
|
||||
}
|
||||
if { $clean == 2 } {
|
||||
# arrange for h = (w+1)/2
|
||||
set h2 [expr {($w+1)/2}]
|
||||
if { $h2 > $h } {
|
||||
set w [expr {2*$h-1}]
|
||||
} else {
|
||||
set h $h2
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if { !($h % 2) } {
|
||||
incr h -1
|
||||
}
|
||||
if { $clean == 2 } {
|
||||
# arrange for w = (h+1)/2
|
||||
set w2 [expr {($h+1)/2}]
|
||||
if { $w2 > $w } {
|
||||
set h [expr {2*$w-1}]
|
||||
} else {
|
||||
set w $w2
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
set x0 [expr {($width-$w)/2}]
|
||||
set y0 [expr {($height-$h)/2}]
|
||||
set x1 [expr {$x0+$w-1}]
|
||||
set y1 [expr {$y0+$h-1}]
|
||||
|
||||
switch $dir {
|
||||
top {
|
||||
set xd [expr {($x0+$x1)/2}]
|
||||
if { [set id [$path.c find withtag poly]] == "" } {
|
||||
$path.c create polygon $x0 $y1 $x1 $y1 $xd $y0 -tags poly
|
||||
} else {
|
||||
$path.c coords $id $x0 $y1 $x1 $y1 $xd $y0
|
||||
}
|
||||
if { [string equal $type "arrow"] } {
|
||||
if { [set id [$path.c find withtag bot]] == "" } {
|
||||
$path.c create line $x0 $y1 $x1 $y1 $xd $y0 -tags bot
|
||||
} else {
|
||||
$path.c coords $id $x0 $y1 $x1 $y1 $xd $y0
|
||||
}
|
||||
if { [set id [$path.c find withtag top]] == "" } {
|
||||
$path.c create line $x0 $y1 $xd $y0 -tags top
|
||||
} else {
|
||||
$path.c coords $id $x0 $y1 $xd $y0
|
||||
}
|
||||
$path.c itemconfigure top -width $arrbd
|
||||
$path.c itemconfigure bot -width $arrbd
|
||||
} else {
|
||||
$path.c delete top
|
||||
$path.c delete bot
|
||||
}
|
||||
}
|
||||
bottom {
|
||||
set xd [expr {($x0+$x1)/2}]
|
||||
if { [set id [$path.c find withtag poly]] == "" } {
|
||||
$path.c create polygon $x1 $y0 $x0 $y0 $xd $y1 -tags poly
|
||||
} else {
|
||||
$path.c coords $id $x1 $y0 $x0 $y0 $xd $y1
|
||||
}
|
||||
if { [string equal $type "arrow"] } {
|
||||
if { [set id [$path.c find withtag top]] == "" } {
|
||||
$path.c create line $x1 $y0 $x0 $y0 $xd $y1 -tags top
|
||||
} else {
|
||||
$path.c coords $id $x1 $y0 $x0 $y0 $xd $y1
|
||||
}
|
||||
if { [set id [$path.c find withtag bot]] == "" } {
|
||||
$path.c create line $x1 $y0 $xd $y1 -tags bot
|
||||
} else {
|
||||
$path.c coords $id $x1 $y0 $xd $y1
|
||||
}
|
||||
$path.c itemconfigure top -width $arrbd
|
||||
$path.c itemconfigure bot -width $arrbd
|
||||
} else {
|
||||
$path.c delete top
|
||||
$path.c delete bot
|
||||
}
|
||||
}
|
||||
left {
|
||||
set yd [expr {($y0+$y1)/2}]
|
||||
if { [set id [$path.c find withtag poly]] == "" } {
|
||||
$path.c create polygon $x1 $y0 $x1 $y1 $x0 $yd -tags poly
|
||||
} else {
|
||||
$path.c coords $id $x1 $y0 $x1 $y1 $x0 $yd
|
||||
}
|
||||
if { [string equal $type "arrow"] } {
|
||||
if { [set id [$path.c find withtag bot]] == "" } {
|
||||
$path.c create line $x1 $y0 $x1 $y1 $x0 $yd -tags bot
|
||||
} else {
|
||||
$path.c coords $id $x1 $y0 $x1 $y1 $x0 $yd
|
||||
}
|
||||
if { [set id [$path.c find withtag top]] == "" } {
|
||||
$path.c create line $x1 $y0 $x0 $yd -tags top
|
||||
} else {
|
||||
$path.c coords $id $x1 $y0 $x0 $yd
|
||||
}
|
||||
$path.c itemconfigure top -width $arrbd
|
||||
$path.c itemconfigure bot -width $arrbd
|
||||
} else {
|
||||
$path.c delete top
|
||||
$path.c delete bot
|
||||
}
|
||||
}
|
||||
right {
|
||||
set yd [expr {($y0+$y1)/2}]
|
||||
if { [set id [$path.c find withtag poly]] == "" } {
|
||||
$path.c create polygon $x0 $y1 $x0 $y0 $x1 $yd -tags poly
|
||||
} else {
|
||||
$path.c coords $id $x0 $y1 $x0 $y0 $x1 $yd
|
||||
}
|
||||
if { [string equal $type "arrow"] } {
|
||||
if { [set id [$path.c find withtag top]] == "" } {
|
||||
$path.c create line $x0 $y1 $x0 $y0 $x1 $yd -tags top
|
||||
} else {
|
||||
$path.c coords $id $x0 $y1 $x0 $y0 $x1 $yd
|
||||
}
|
||||
if { [set id [$path.c find withtag bot]] == "" } {
|
||||
$path.c create line $x0 $y1 $x1 $yd -tags bot
|
||||
} else {
|
||||
$path.c coords $id $x0 $y1 $x1 $yd
|
||||
}
|
||||
$path.c itemconfigure top -width $arrbd
|
||||
$path.c itemconfigure bot -width $arrbd
|
||||
} else {
|
||||
$path.c delete top
|
||||
$path.c delete bot
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
# Command ArrowButton::_redraw_state
|
||||
# ------------------------------------------------------------------------------
|
||||
proc ArrowButton::_redraw_state { path } {
|
||||
set state [Widget::getoption $path -state]
|
||||
if { [string equal [Widget::getoption $path -type] "button"] } {
|
||||
switch $state {
|
||||
normal {set bg -background; set fg -foreground}
|
||||
active {set bg -activebackground; set fg -activeforeground}
|
||||
disabled {set bg -background; set fg -disabledforeground}
|
||||
}
|
||||
set fg [Widget::getoption $path $fg]
|
||||
$path.c configure -background [Widget::getoption $path $bg]
|
||||
$path.c itemconfigure poly -fill $fg -outline $fg
|
||||
} else {
|
||||
switch $state {
|
||||
normal {set stipple ""; set bg [Widget::getoption $path -background] }
|
||||
active {set stipple ""; set bg [Widget::getoption $path -activebackground] }
|
||||
disabled {set stipple gray50; set bg black }
|
||||
}
|
||||
set thrc [Widget::getoption $path -troughcolor]
|
||||
$path.c configure -background [Widget::getoption $path -background]
|
||||
$path.c itemconfigure rect -fill $thrc -outline $thrc
|
||||
$path.c itemconfigure poly -fill $bg -outline $bg -stipple $stipple
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
# Command ArrowButton::_redraw_relief
|
||||
# ------------------------------------------------------------------------------
|
||||
proc ArrowButton::_redraw_relief { path } {
|
||||
variable _moved
|
||||
|
||||
if { [string equal [Widget::getoption $path -type] "button"] } {
|
||||
if { [string equal [Widget::getoption $path -relief] "sunken"] } {
|
||||
if { !$_moved($path) } {
|
||||
$path.c move poly 1 1
|
||||
set _moved($path) 1
|
||||
}
|
||||
} else {
|
||||
if { $_moved($path) } {
|
||||
$path.c move poly -1 -1
|
||||
set _moved($path) 0
|
||||
}
|
||||
}
|
||||
} else {
|
||||
set col3d [BWidget::get3dcolor $path [Widget::getoption $path -background]]
|
||||
switch [Widget::getoption $path -arrowrelief] {
|
||||
raised {set top [lindex $col3d 1]; set bot [lindex $col3d 0]}
|
||||
sunken {set top [lindex $col3d 0]; set bot [lindex $col3d 1]}
|
||||
}
|
||||
$path.c itemconfigure top -fill $top
|
||||
$path.c itemconfigure bot -fill $bot
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
# Command ArrowButton::_redraw_whole
|
||||
# ------------------------------------------------------------------------------
|
||||
proc ArrowButton::_redraw_whole { path width height } {
|
||||
_redraw $path $width $height
|
||||
_redraw_relief $path
|
||||
_redraw_state $path
|
||||
}
|
||||
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
# Command ArrowButton::_enter
|
||||
# ------------------------------------------------------------------------------
|
||||
proc ArrowButton::_enter { path } {
|
||||
variable _grab
|
||||
set path [winfo parent $path]
|
||||
set _grab(current) $path
|
||||
if { ![string equal [Widget::getoption $path -state] "disabled"] } {
|
||||
set _grab(oldstate) [Widget::getoption $path -state]
|
||||
configure $path -state active
|
||||
if { $_grab(pressed) == $path } {
|
||||
if { [string equal [Widget::getoption $path -type] "button"] } {
|
||||
set _grab(oldrelief) [Widget::getoption $path -relief]
|
||||
configure $path -relief sunken
|
||||
} else {
|
||||
set _grab(oldrelief) [Widget::getoption $path -arrowrelief]
|
||||
configure $path -arrowrelief sunken
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
# Command ArrowButton::_leave
|
||||
# ------------------------------------------------------------------------------
|
||||
proc ArrowButton::_leave { path } {
|
||||
variable _grab
|
||||
set path [winfo parent $path]
|
||||
set _grab(current) ""
|
||||
if { ![string equal [Widget::getoption $path -state] "disabled"] } {
|
||||
configure $path -state $_grab(oldstate)
|
||||
if { $_grab(pressed) == $path } {
|
||||
if { [string equal [Widget::getoption $path -type] "button"] } {
|
||||
configure $path -relief $_grab(oldrelief)
|
||||
} else {
|
||||
configure $path -arrowrelief $_grab(oldrelief)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
# Command ArrowButton::_press
|
||||
# ------------------------------------------------------------------------------
|
||||
proc ArrowButton::_press { path } {
|
||||
variable _grab
|
||||
set path [winfo parent $path]
|
||||
if { ![string equal [Widget::getoption $path -state] "disabled"] } {
|
||||
set _grab(pressed) $path
|
||||
if { [string equal [Widget::getoption $path -type] "button"] } {
|
||||
set _grab(oldrelief) [Widget::getoption $path -relief]
|
||||
configure $path -relief sunken
|
||||
} else {
|
||||
set _grab(oldrelief) [Widget::getoption $path -arrowrelief]
|
||||
configure $path -arrowrelief sunken
|
||||
}
|
||||
if {[llength [set cmd [Widget::getoption $path -armcommand]]]} {
|
||||
uplevel \#0 $cmd
|
||||
if { [set delay [Widget::getoption $path -repeatdelay]] > 0 ||
|
||||
[set delay [Widget::getoption $path -repeatinterval]] > 0 } {
|
||||
after $delay [list ArrowButton::_repeat $path]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
# Command ArrowButton::_release
|
||||
# ------------------------------------------------------------------------------
|
||||
proc ArrowButton::_release { path } {
|
||||
variable _grab
|
||||
set path [winfo parent $path]
|
||||
if { $_grab(pressed) == $path } {
|
||||
set _grab(pressed) ""
|
||||
if { [string equal [Widget::getoption $path -type] "button"] } {
|
||||
configure $path -relief $_grab(oldrelief)
|
||||
} else {
|
||||
configure $path -arrowrelief $_grab(oldrelief)
|
||||
}
|
||||
if {[llength [set cmd [Widget::getoption $path -disarmcommand]]]} {
|
||||
uplevel \#0 $cmd
|
||||
}
|
||||
if { $_grab(current) == $path &&
|
||||
![string equal [Widget::getoption $path -state] "disabled"] &&
|
||||
[llength [set cmd [Widget::getoption $path -command]]]} {
|
||||
uplevel \#0 $cmd
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
# Command ArrowButton::_repeat
|
||||
# ------------------------------------------------------------------------------
|
||||
proc ArrowButton::_repeat { path } {
|
||||
variable _grab
|
||||
if { $_grab(current) == $path && $_grab(pressed) == $path &&
|
||||
![string equal [Widget::getoption $path -state] "disabled"] &&
|
||||
[llength [set cmd [Widget::getoption $path -armcommand]]]} {
|
||||
uplevel \#0 $cmd
|
||||
}
|
||||
if { $_grab(pressed) == $path &&
|
||||
([set delay [Widget::getoption $path -repeatinterval]] > 0 ||
|
||||
[set delay [Widget::getoption $path -repeatdelay]] > 0) } {
|
||||
after $delay [list ArrowButton::_repeat $path]
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
# Command ArrowButton::_destroy
|
||||
# ------------------------------------------------------------------------------
|
||||
proc ArrowButton::_destroy { path } {
|
||||
variable _moved
|
||||
Widget::destroy $path
|
||||
unset _moved($path)
|
||||
}
|
94
R_portable/R/App/R-portable/Tcl/bin64/lib/bwidget-1.9.12/bitmap.tcl
Executable file
@ -0,0 +1,94 @@
|
||||
# ------------------------------------------------------------------------------
|
||||
# bitmap.tcl
|
||||
# This file is part of Unifix BWidget Toolkit
|
||||
# $Id: bitmap.tcl,v 1.4 2003/10/20 21:23:52 damonc Exp $
|
||||
# ------------------------------------------------------------------------------
|
||||
# Index of commands:
|
||||
# - Bitmap::get
|
||||
# - Bitmap::_init
|
||||
# ----------------------------------------------------------------------------
|
||||
namespace eval Bitmap {
|
||||
Widget::define Bitmap bitmap -classonly
|
||||
|
||||
variable path
|
||||
variable _bmp
|
||||
variable _types {
|
||||
photo .gif
|
||||
photo .ppm
|
||||
bitmap .xbm
|
||||
photo .xpm
|
||||
}
|
||||
|
||||
proc use {} {}
|
||||
}
|
||||
|
||||
|
||||
# ----------------------------------------------------------------------------
|
||||
# Command Bitmap::get
|
||||
# ----------------------------------------------------------------------------
|
||||
proc Bitmap::get { name } {
|
||||
variable path
|
||||
variable _bmp
|
||||
variable _types
|
||||
|
||||
if {[info exists _bmp($name)]} {
|
||||
return $_bmp($name)
|
||||
}
|
||||
|
||||
# --- Nom de fichier avec extension ---------------------------------
|
||||
set ext [file extension $name]
|
||||
if { $ext != "" } {
|
||||
if { ![info exists _bmp($ext)] } {
|
||||
error "$ext not supported"
|
||||
}
|
||||
|
||||
if { [file exists $name] } {
|
||||
if {[string equal $ext ".xpm"]} {
|
||||
set _bmp($name) [xpm-to-image $name]
|
||||
return $_bmp($name)
|
||||
}
|
||||
if {![catch {set _bmp($name) [image create $_bmp($ext) -file $name]}]} {
|
||||
return $_bmp($name)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
foreach dir $path {
|
||||
foreach {type ext} $_types {
|
||||
if { [file exists [file join $dir $name$ext]] } {
|
||||
if {[string equal $ext ".xpm"]} {
|
||||
set _bmp($name) [xpm-to-image [file join $dir $name$ext]]
|
||||
return $_bmp($name)
|
||||
} else {
|
||||
if {![catch {set _bmp($name) [image create $type -file [file join $dir $name$ext]]}]} {
|
||||
return $_bmp($name)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return -code error "$name not found"
|
||||
}
|
||||
|
||||
|
||||
# ----------------------------------------------------------------------------
|
||||
# Command Bitmap::_init
|
||||
# ----------------------------------------------------------------------------
|
||||
proc Bitmap::_init { } {
|
||||
global env
|
||||
variable path
|
||||
variable _bmp
|
||||
variable _types
|
||||
|
||||
set path [list "." [file join $::BWIDGET::LIBRARY images]]
|
||||
set supp [image types]
|
||||
foreach {type ext} $_types {
|
||||
if { [lsearch $supp $type] != -1} {
|
||||
set _bmp($ext) $type
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Bitmap::_init
|
397
R_portable/R/App/R-portable/Tcl/bin64/lib/bwidget-1.9.12/button.tcl
Executable file
@ -0,0 +1,397 @@
|
||||
# ----------------------------------------------------------------------------
|
||||
# button.tcl
|
||||
# This file is part of Unifix BWidget Toolkit
|
||||
# ----------------------------------------------------------------------------
|
||||
# Index of commands:
|
||||
# Public commands
|
||||
# - Button::create
|
||||
# - Button::configure
|
||||
# - Button::cget
|
||||
# - Button::invoke
|
||||
# Private commands (event bindings)
|
||||
# - Button::_destroy
|
||||
# - Button::_enter
|
||||
# - Button::_leave
|
||||
# - Button::_press
|
||||
# - Button::_release
|
||||
# - Button::_repeat
|
||||
# ----------------------------------------------------------------------------
|
||||
|
||||
namespace eval Button {
|
||||
Widget::define Button button DynamicHelp
|
||||
|
||||
set remove [list -command -relief -text -textvariable -underline -state]
|
||||
if {[info tclversion] > 8.3} {
|
||||
lappend remove -repeatdelay -repeatinterval
|
||||
}
|
||||
if {$::Widget::_theme} {
|
||||
lappend remove -activebackground -activeforeground -anchor -background\
|
||||
-bitmap -borderwidth -disabledforeground -font -foreground\
|
||||
-height -highlightbackground -highlightcolor -highlightthickness\
|
||||
-justify -overrelief -padx -pady -relief -wraplength
|
||||
}
|
||||
Widget::tkinclude Button button :cmd remove $remove
|
||||
|
||||
Widget::declare Button {
|
||||
{-name String "" 0}
|
||||
{-text String "" 0}
|
||||
{-textvariable String "" 0}
|
||||
{-underline Int -1 0 "%d >= -1"}
|
||||
{-armcommand String "" 0}
|
||||
{-disarmcommand String "" 0}
|
||||
{-command String "" 0}
|
||||
{-state TkResource "" 0 button}
|
||||
{-repeatdelay Int 0 0 "%d >= 0"}
|
||||
{-repeatinterval Int 0 0 "%d >= 0"}
|
||||
{-relief Enum raised 0 {raised sunken flat ridge solid groove link}}
|
||||
}
|
||||
|
||||
DynamicHelp::include Button balloon
|
||||
|
||||
variable _current ""
|
||||
variable _pressed ""
|
||||
|
||||
bind BwButton <Enter> {Button::_enter %W}
|
||||
bind BwButton <Leave> {Button::_leave %W}
|
||||
bind BwButton <ButtonPress-1> {Button::_press %W}
|
||||
bind BwButton <ButtonRelease-1> {Button::_release %W}
|
||||
bind BwButton <Key-space> {Button::invoke %W; break}
|
||||
bind BwButton <Return> {Button::invoke %W; break}
|
||||
bind BwButton <<Invoke>> {Button::invoke %W; break}
|
||||
bind BwButton <Destroy> {Widget::destroy %W}
|
||||
}
|
||||
|
||||
|
||||
# ----------------------------------------------------------------------------
|
||||
# Command Button::create
|
||||
# ----------------------------------------------------------------------------
|
||||
proc Button::create { path args } {
|
||||
array set maps [list Button {} :cmd {}]
|
||||
array set maps [Widget::parseArgs Button $args]
|
||||
if {$::Widget::_theme} {
|
||||
eval [concat [list ttk::button $path] $maps(:cmd)]
|
||||
} else {
|
||||
eval [concat [list button $path] $maps(:cmd)]
|
||||
}
|
||||
Widget::initFromODB Button $path $maps(Button)
|
||||
|
||||
# Do some extra configuration on the button
|
||||
set var [Widget::getMegawidgetOption $path -textvariable]
|
||||
set st [Widget::getMegawidgetOption $path -state]
|
||||
if { ![string length $var] } {
|
||||
set desc [BWidget::getname [Widget::getMegawidgetOption $path -name]]
|
||||
if { [llength $desc] } {
|
||||
set text [lindex $desc 0]
|
||||
set under [lindex $desc 1]
|
||||
Widget::configure $path [list -text $text]
|
||||
Widget::configure $path [list -underline $under]
|
||||
} else {
|
||||
set text [Widget::getMegawidgetOption $path -text]
|
||||
set under [Widget::getMegawidgetOption $path -underline]
|
||||
}
|
||||
} else {
|
||||
set under -1
|
||||
set text ""
|
||||
Widget::configure $path [list -underline $under]
|
||||
}
|
||||
|
||||
$path configure -text $text -underline $under \
|
||||
-textvariable $var -state $st
|
||||
# Map relief flat on Toolbutton for ttk
|
||||
set relief [Widget::getMegawidgetOption $path -relief]
|
||||
if {$::Widget::_theme} {
|
||||
if { [string equal $relief "link"] } {
|
||||
$path configure -style Toolbutton
|
||||
}
|
||||
} else {
|
||||
if { [string equal $relief "link"] } {
|
||||
set relief "flat"
|
||||
}
|
||||
$path configure -relief $relief
|
||||
}
|
||||
bindtags $path [list $path BwButton [winfo toplevel $path] all]
|
||||
|
||||
set accel1 [string tolower [string index $text $under]]
|
||||
set accel2 [string toupper $accel1]
|
||||
if { $accel1 != "" } {
|
||||
bind [winfo toplevel $path] <Alt-$accel1> [list Button::invoke $path]
|
||||
bind [winfo toplevel $path] <Alt-$accel2> [list Button::invoke $path]
|
||||
}
|
||||
|
||||
DynamicHelp::sethelp $path $path 1
|
||||
|
||||
return [Widget::create Button $path]
|
||||
}
|
||||
|
||||
|
||||
# ----------------------------------------------------------------------------
|
||||
# Command Button::configure
|
||||
# ----------------------------------------------------------------------------
|
||||
proc Button::configure { path args } {
|
||||
set oldunder [$path:cmd cget -underline]
|
||||
if { $oldunder != -1 } {
|
||||
set oldaccel1 [string tolower [string index [$path:cmd cget -text] $oldunder]]
|
||||
set oldaccel2 [string toupper $oldaccel1]
|
||||
} else {
|
||||
set oldaccel1 ""
|
||||
set oldaccel2 ""
|
||||
}
|
||||
set res [Widget::configure $path $args]
|
||||
|
||||
# Extract all the modified bits we're interested in
|
||||
foreach {cr cs cv cn ct cu} [Widget::hasChangedX $path \
|
||||
-relief -state -textvariable -name -text -underline] break
|
||||
if { $cr || $cs } {
|
||||
set relief [Widget::cget $path -relief]
|
||||
set state [Widget::cget $path -state]
|
||||
if { $::Widget::_theme} {
|
||||
if { [string equal $relief "link"] } {
|
||||
$path:cmd configure -style Toolbutton
|
||||
} else {
|
||||
$path:cmd configure -style ""
|
||||
}
|
||||
} else {
|
||||
if { [string equal $relief "link"] } {
|
||||
if { [string equal $state "active"] } {
|
||||
set relief "raised"
|
||||
} else {
|
||||
set relief "flat"
|
||||
}
|
||||
}
|
||||
$path:cmd configure -relief $relief
|
||||
}
|
||||
$path:cmd configure -state $state
|
||||
}
|
||||
|
||||
if { $cv || $cn || $ct || $cu } {
|
||||
set var [Widget::cget $path -textvariable]
|
||||
set text [Widget::cget $path -text]
|
||||
set under [Widget::cget $path -underline]
|
||||
if { ![string length $var] } {
|
||||
set desc [BWidget::getname [Widget::cget $path -name]]
|
||||
if { [llength $desc] } {
|
||||
set text [lindex $desc 0]
|
||||
set under [lindex $desc 1]
|
||||
}
|
||||
} else {
|
||||
set under -1
|
||||
set text ""
|
||||
}
|
||||
set top [winfo toplevel $path]
|
||||
if { $oldaccel1 != "" } {
|
||||
bind $top <Alt-$oldaccel1> {}
|
||||
bind $top <Alt-$oldaccel2> {}
|
||||
}
|
||||
set accel1 [string tolower [string index $text $under]]
|
||||
set accel2 [string toupper $accel1]
|
||||
if { $accel1 != "" } {
|
||||
bind $top <Alt-$accel1> [list Button::invoke $path]
|
||||
bind $top <Alt-$accel2> [list Button::invoke $path]
|
||||
}
|
||||
$path:cmd configure -text $text -underline $under -textvariable $var
|
||||
}
|
||||
DynamicHelp::sethelp $path $path
|
||||
|
||||
set res
|
||||
}
|
||||
|
||||
|
||||
# ----------------------------------------------------------------------------
|
||||
# Command Button::cget
|
||||
# ----------------------------------------------------------------------------
|
||||
proc Button::cget { path option } {
|
||||
Widget::cget $path $option
|
||||
}
|
||||
|
||||
|
||||
# ----------------------------------------------------------------------------
|
||||
# Command Button::identify
|
||||
# ----------------------------------------------------------------------------
|
||||
proc Button::identify { path args } {
|
||||
eval $path:cmd identify $args
|
||||
}
|
||||
|
||||
|
||||
# ----------------------------------------------------------------------------
|
||||
# Command Button::instate
|
||||
# ----------------------------------------------------------------------------
|
||||
proc Button::instate { path args } {
|
||||
eval $path:cmd instate $args
|
||||
}
|
||||
|
||||
|
||||
# ----------------------------------------------------------------------------
|
||||
# Command Button::state
|
||||
# ----------------------------------------------------------------------------
|
||||
proc Button::state { path args } {
|
||||
eval $path:cmd state $args
|
||||
}
|
||||
|
||||
|
||||
# ----------------------------------------------------------------------------
|
||||
# Command Button::invoke
|
||||
# ----------------------------------------------------------------------------
|
||||
proc Button::invoke { path } {
|
||||
if { ![string equal [$path:cmd cget -state] "disabled"] } {
|
||||
if { $::Widget::_theme} {
|
||||
$path:cmd configure -state active
|
||||
$path:cmd state pressed
|
||||
} else {
|
||||
$path:cmd configure -state active -relief sunken
|
||||
}
|
||||
update idletasks
|
||||
set cmd [Widget::getMegawidgetOption $path -armcommand]
|
||||
if { $cmd != "" } {
|
||||
uplevel \#0 $cmd
|
||||
}
|
||||
after 100
|
||||
$path:cmd configure -state [Widget::getMegawidgetOption $path -state]
|
||||
if { $::Widget::_theme} {
|
||||
$path:cmd state !pressed
|
||||
} else {
|
||||
set relief [Widget::getMegawidgetOption $path -relief]
|
||||
if { [string equal $relief "link"] } {
|
||||
set relief flat
|
||||
}
|
||||
$path:cmd configure -relief $relief
|
||||
}
|
||||
set cmd [Widget::getMegawidgetOption $path -disarmcommand]
|
||||
if { $cmd != "" } {
|
||||
uplevel \#0 $cmd
|
||||
}
|
||||
set cmd [Widget::getMegawidgetOption $path -command]
|
||||
if { $cmd != "" } {
|
||||
uplevel \#0 $cmd
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
# ----------------------------------------------------------------------------
|
||||
# Command Button::_enter
|
||||
# ----------------------------------------------------------------------------
|
||||
proc Button::_enter { path } {
|
||||
variable _current
|
||||
variable _pressed
|
||||
|
||||
set _current $path
|
||||
if { ![string equal [$path:cmd cget -state] "disabled"] } {
|
||||
$path:cmd configure -state active
|
||||
if { $::Widget::_theme } {
|
||||
# $path:cmd state active
|
||||
} else {
|
||||
if { $_pressed == $path } {
|
||||
$path:cmd configure -relief sunken
|
||||
} elseif { [string equal [Widget::cget $path -relief] "link"] } {
|
||||
$path:cmd configure -relief raised
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
# ----------------------------------------------------------------------------
|
||||
# Command Button::_leave
|
||||
# ----------------------------------------------------------------------------
|
||||
proc Button::_leave { path } {
|
||||
variable _current
|
||||
variable _pressed
|
||||
|
||||
set _current ""
|
||||
if { ![string equal [$path:cmd cget -state] "disabled"] } {
|
||||
$path:cmd configure -state [Widget::cget $path -state]
|
||||
if { $::Widget::_theme } {
|
||||
} else {
|
||||
set relief [Widget::cget $path -relief]
|
||||
if { $_pressed == $path } {
|
||||
if { [string equal $relief "link"] } {
|
||||
set relief raised
|
||||
}
|
||||
$path:cmd configure -relief $relief
|
||||
} elseif { [string equal $relief "link"] } {
|
||||
$path:cmd configure -relief flat
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
# ----------------------------------------------------------------------------
|
||||
# Command Button::_press
|
||||
# ----------------------------------------------------------------------------
|
||||
proc Button::_press { path } {
|
||||
variable _pressed
|
||||
|
||||
if { ![string equal [$path:cmd cget -state] "disabled"] } {
|
||||
set _pressed $path
|
||||
if { $::Widget::_theme} {
|
||||
ttk::clickToFocus $path
|
||||
$path state pressed
|
||||
} else {
|
||||
$path:cmd configure -relief sunken
|
||||
}
|
||||
set cmd [Widget::getMegawidgetOption $path -armcommand]
|
||||
if { $cmd != "" } {
|
||||
uplevel \#0 $cmd
|
||||
set repeatdelay [Widget::getMegawidgetOption $path -repeatdelay]
|
||||
set repeatint [Widget::getMegawidgetOption $path -repeatinterval]
|
||||
if { $repeatdelay > 0 } {
|
||||
after $repeatdelay "Button::_repeat $path"
|
||||
} elseif { $repeatint > 0 } {
|
||||
after $repeatint "Button::_repeat $path"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
# ----------------------------------------------------------------------------
|
||||
# Command Button::_release
|
||||
# ----------------------------------------------------------------------------
|
||||
proc Button::_release { path } {
|
||||
variable _current
|
||||
variable _pressed
|
||||
|
||||
if { $_pressed == $path } {
|
||||
set _pressed ""
|
||||
after cancel "Button::_repeat $path"
|
||||
if { $::Widget::_theme} {
|
||||
$path state !pressed
|
||||
} else {
|
||||
set relief [Widget::getMegawidgetOption $path -relief]
|
||||
if { [string equal $relief "link"] } {
|
||||
set relief raised
|
||||
}
|
||||
$path:cmd configure -relief $relief
|
||||
}
|
||||
set cmd [Widget::getMegawidgetOption $path -disarmcommand]
|
||||
if { $cmd != "" } {
|
||||
uplevel \#0 $cmd
|
||||
}
|
||||
if { $_current == $path &&
|
||||
![string equal [$path:cmd cget -state] "disabled"] && \
|
||||
[set cmd [Widget::getMegawidgetOption $path -command]] != "" } {
|
||||
uplevel \#0 $cmd
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
# ----------------------------------------------------------------------------
|
||||
# Command Button::_repeat
|
||||
# ----------------------------------------------------------------------------
|
||||
proc Button::_repeat { path } {
|
||||
variable _current
|
||||
variable _pressed
|
||||
|
||||
if { $_current == $path && $_pressed == $path &&
|
||||
![string equal [$path:cmd cget -state] "disabled"] &&
|
||||
[set cmd [Widget::getMegawidgetOption $path -armcommand]] != "" } {
|
||||
uplevel \#0 $cmd
|
||||
}
|
||||
if { $_pressed == $path &&
|
||||
([set delay [Widget::getMegawidgetOption $path -repeatinterval]] >0 ||
|
||||
[set delay [Widget::getMegawidgetOption $path -repeatdelay]] > 0) } {
|
||||
after $delay "Button::_repeat $path"
|
||||
}
|
||||
}
|
||||
|
419
R_portable/R/App/R-portable/Tcl/bin64/lib/bwidget-1.9.12/buttonbox.tcl
Executable file
@ -0,0 +1,419 @@
|
||||
# ----------------------------------------------------------------------------
|
||||
# buttonbox.tcl
|
||||
# This file is part of Unifix BWidget Toolkit
|
||||
# ----------------------------------------------------------------------------
|
||||
# Index of commands:
|
||||
# - ButtonBox::create
|
||||
# - ButtonBox::configure
|
||||
# - ButtonBox::cget
|
||||
# - ButtonBox::add
|
||||
# - ButtonBox::itemconfigure
|
||||
# - ButtonBox::itemcget
|
||||
# - ButtonBox::setfocus
|
||||
# - ButtonBox::invoke
|
||||
# - ButtonBox::index
|
||||
# - ButtonBox::_destroy
|
||||
# ----------------------------------------------------------------------------
|
||||
|
||||
namespace eval ButtonBox {
|
||||
Widget::define ButtonBox buttonbox Button
|
||||
|
||||
Widget::declare ButtonBox {
|
||||
{-background TkResource "" 0 frame}
|
||||
{-orient Enum horizontal 1 {horizontal vertical}}
|
||||
{-state Enum "normal" 0 {normal disabled}}
|
||||
{-homogeneous Boolean 1 1}
|
||||
{-spacing Int 10 0 "%d >= 0"}
|
||||
{-padx TkResource "" 0 button}
|
||||
{-pady TkResource "" 0 button}
|
||||
{-default Int -1 0 "%d >= -1"}
|
||||
{-bg Synonym -background}
|
||||
}
|
||||
|
||||
Widget::addmap ButtonBox "" :cmd {-background {}}
|
||||
|
||||
bind ButtonBox <Destroy> [list ButtonBox::_destroy %W]
|
||||
}
|
||||
|
||||
|
||||
# ----------------------------------------------------------------------------
|
||||
# Command ButtonBox::create
|
||||
# ----------------------------------------------------------------------------
|
||||
proc ButtonBox::create { path args } {
|
||||
Widget::init ButtonBox $path $args
|
||||
|
||||
variable $path
|
||||
upvar 0 $path data
|
||||
|
||||
eval [list frame $path] [Widget::subcget $path :cmd] \
|
||||
[list -class ButtonBox -takefocus 0 -highlightthickness 0]
|
||||
# For 8.4+ we don't want to inherit the padding
|
||||
catch {$path configure -padx 0 -pady 0}
|
||||
|
||||
set data(max) 0
|
||||
set data(nbuttons) 0
|
||||
set data(buttons) [list]
|
||||
set data(default) [Widget::getoption $path -default]
|
||||
|
||||
return [Widget::create ButtonBox $path]
|
||||
}
|
||||
|
||||
|
||||
# ----------------------------------------------------------------------------
|
||||
# Command ButtonBox::configure
|
||||
# ----------------------------------------------------------------------------
|
||||
proc ButtonBox::configure { path args } {
|
||||
variable $path
|
||||
upvar 0 $path data
|
||||
|
||||
set res [Widget::configure $path $args]
|
||||
|
||||
if { [Widget::hasChanged $path -default val] } {
|
||||
if { $data(default) != -1 && $val != -1 } {
|
||||
set but $path.b$data(default)
|
||||
if { [winfo exists $but] } {
|
||||
$but configure -default normal
|
||||
}
|
||||
set but $path.b$val
|
||||
if { [winfo exists $but] } {
|
||||
$but configure -default active
|
||||
}
|
||||
set data(default) $val
|
||||
} else {
|
||||
Widget::setoption $path -default $data(default)
|
||||
}
|
||||
}
|
||||
|
||||
if {[Widget::hasChanged $path -state val]} {
|
||||
foreach i $data(buttons) {
|
||||
$path.b$i configure -state $val
|
||||
}
|
||||
}
|
||||
|
||||
return $res
|
||||
}
|
||||
|
||||
|
||||
# ----------------------------------------------------------------------------
|
||||
# Command ButtonBox::cget
|
||||
# ----------------------------------------------------------------------------
|
||||
proc ButtonBox::cget { path option } {
|
||||
return [Widget::cget $path $option]
|
||||
}
|
||||
|
||||
|
||||
# ----------------------------------------------------------------------------
|
||||
# Command ButtonBox::add
|
||||
# ----------------------------------------------------------------------------
|
||||
proc ButtonBox::add { path args } {
|
||||
return [eval [linsert $args 0 insert $path end]]
|
||||
}
|
||||
|
||||
|
||||
proc ButtonBox::insert { path idx args } {
|
||||
variable $path
|
||||
upvar 0 $path data
|
||||
|
||||
set but $path.b$data(nbuttons)
|
||||
set spacing [Widget::getoption $path -spacing]
|
||||
|
||||
## Save the current spacing setting for this button. Buttons
|
||||
## appended to the end of the box have their spacing applied
|
||||
## to their left while all other have their spacing applied
|
||||
## to their right.
|
||||
if {$idx == "end"} {
|
||||
set data(spacing,$data(nbuttons)) [list left $spacing]
|
||||
lappend data(buttons) $data(nbuttons)
|
||||
} else {
|
||||
set data(spacing,$data(nbuttons)) [list right $spacing]
|
||||
set data(buttons) [linsert $data(buttons) $idx $data(nbuttons)]
|
||||
}
|
||||
|
||||
if { $data(nbuttons) == $data(default) } {
|
||||
set style active
|
||||
} elseif { $data(default) == -1 } {
|
||||
set style disabled
|
||||
} else {
|
||||
set style normal
|
||||
}
|
||||
|
||||
array set flags $args
|
||||
set tags ""
|
||||
if { [info exists flags(-tags)] } {
|
||||
set tags $flags(-tags)
|
||||
unset flags(-tags)
|
||||
set args [array get flags]
|
||||
}
|
||||
|
||||
if { $::Widget::_theme} {
|
||||
eval [list Button::create $but] \
|
||||
$args [list -default $style]
|
||||
} else {
|
||||
eval [list Button::create $but \
|
||||
-background [Widget::getoption $path -background]\
|
||||
-padx [Widget::getoption $path -padx] \
|
||||
-pady [Widget::getoption $path -pady]] \
|
||||
$args [list -default $style]
|
||||
}
|
||||
|
||||
# ericm@scriptics.com: set up tags, just like the menu items
|
||||
foreach tag $tags {
|
||||
lappend data(tags,$tag) $but
|
||||
if { ![info exists data(tagstate,$tag)] } {
|
||||
set data(tagstate,$tag) 0
|
||||
}
|
||||
}
|
||||
set data(buttontags,$but) $tags
|
||||
# ericm@scriptics.com
|
||||
|
||||
_redraw $path
|
||||
|
||||
incr data(nbuttons)
|
||||
|
||||
return $but
|
||||
}
|
||||
|
||||
|
||||
proc ButtonBox::delete { path idx } {
|
||||
variable $path
|
||||
upvar 0 $path data
|
||||
|
||||
set i [lindex $data(buttons) $idx]
|
||||
set data(buttons) [lreplace $data(buttons) $idx $idx]
|
||||
destroy $path.b$i
|
||||
}
|
||||
|
||||
|
||||
# ButtonBox::setbuttonstate --
|
||||
#
|
||||
# Set the state of a given button tag. If this makes any buttons
|
||||
# enable-able (ie, all of their tags are TRUE), enable them.
|
||||
#
|
||||
# Arguments:
|
||||
# path the button box widget name
|
||||
# tag the tag to modify
|
||||
# state the new state of $tag (0 or 1)
|
||||
#
|
||||
# Results:
|
||||
# None.
|
||||
|
||||
proc ButtonBox::setbuttonstate {path tag state} {
|
||||
variable $path
|
||||
upvar 0 $path data
|
||||
# First see if this is a real tag
|
||||
if { [info exists data(tagstate,$tag)] } {
|
||||
set data(tagstate,$tag) $state
|
||||
foreach but $data(tags,$tag) {
|
||||
set expression "1"
|
||||
foreach buttontag $data(buttontags,$but) {
|
||||
append expression " && $data(tagstate,$buttontag)"
|
||||
}
|
||||
if { [expr $expression] } {
|
||||
set state normal
|
||||
} else {
|
||||
set state disabled
|
||||
}
|
||||
$but configure -state $state
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
# ButtonBox::getbuttonstate --
|
||||
#
|
||||
# Retrieve the state of a given button tag.
|
||||
#
|
||||
# Arguments:
|
||||
# path the button box widget name
|
||||
# tag the tag to modify
|
||||
#
|
||||
# Results:
|
||||
# None.
|
||||
|
||||
proc ButtonBox::getbuttonstate {path tag} {
|
||||
variable $path
|
||||
upvar 0 $path data
|
||||
# First see if this is a real tag
|
||||
if { [info exists data(tagstate,$tag)] } {
|
||||
return $data(tagstate,$tag)
|
||||
} else {
|
||||
error "unknown tag $tag"
|
||||
}
|
||||
}
|
||||
|
||||
# ----------------------------------------------------------------------------
|
||||
# Command ButtonBox::itemconfigure
|
||||
# ----------------------------------------------------------------------------
|
||||
proc ButtonBox::itemconfigure { path index args } {
|
||||
if { [set idx [lsearch $args -default]] != -1 } {
|
||||
set args [lreplace $args $idx [expr {$idx+1}]]
|
||||
}
|
||||
return [eval [list Button::configure $path.b[index $path $index]] $args]
|
||||
}
|
||||
|
||||
|
||||
# ----------------------------------------------------------------------------
|
||||
# Command ButtonBox::itemcget
|
||||
# ----------------------------------------------------------------------------
|
||||
proc ButtonBox::itemcget { path index option } {
|
||||
return [Button::cget $path.b[index $path $index] $option]
|
||||
}
|
||||
|
||||
|
||||
# ----------------------------------------------------------------------------
|
||||
# Command ButtonBox::setfocus
|
||||
# ----------------------------------------------------------------------------
|
||||
proc ButtonBox::setfocus { path index } {
|
||||
set but $path.b[index $path $index]
|
||||
if { [winfo exists $but] } {
|
||||
focus $but
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
# ----------------------------------------------------------------------------
|
||||
# Command ButtonBox::invoke
|
||||
# ----------------------------------------------------------------------------
|
||||
proc ButtonBox::invoke { path index } {
|
||||
set but $path.b[index $path $index]
|
||||
if { [winfo exists $but] } {
|
||||
Button::invoke $but
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
# ----------------------------------------------------------------------------
|
||||
# Command ButtonBox::index
|
||||
# ----------------------------------------------------------------------------
|
||||
proc ButtonBox::index { path index } {
|
||||
variable $path
|
||||
upvar 0 $path data
|
||||
|
||||
set n [expr {$data(nbuttons) - 1}]
|
||||
|
||||
if {[string equal $index "default"]} {
|
||||
set res [Widget::getoption $path -default]
|
||||
} elseif {$index == "end" || $index == "last"} {
|
||||
set res $n
|
||||
} elseif {![string is integer -strict $index]} {
|
||||
## It's not an integer. Search the text of each button
|
||||
## in the box and return the index that matches.
|
||||
foreach i $data(buttons) {
|
||||
set w $path.b$i
|
||||
lappend text [$w cget -text]
|
||||
lappend names [$w cget -name]
|
||||
}
|
||||
set res [lsearch -exact [concat $names $text] $index]
|
||||
} else {
|
||||
set res $index
|
||||
if {$index > $n} { set res $n }
|
||||
}
|
||||
return $res
|
||||
}
|
||||
|
||||
|
||||
# ButtonBox::gettags --
|
||||
#
|
||||
# Return a list of all the tags on all the buttons in a buttonbox.
|
||||
#
|
||||
# Arguments:
|
||||
# path the buttonbox to query.
|
||||
#
|
||||
# Results:
|
||||
# taglist a list of tags on the buttons in the buttonbox
|
||||
|
||||
proc ButtonBox::gettags {path} {
|
||||
upvar ::ButtonBox::$path data
|
||||
set taglist {}
|
||||
foreach tag [array names data "tags,*"] {
|
||||
lappend taglist [string range $tag 5 end]
|
||||
}
|
||||
return $taglist
|
||||
}
|
||||
|
||||
|
||||
# ----------------------------------------------------------------------------
|
||||
# Command ButtonBox::_redraw
|
||||
# ----------------------------------------------------------------------------
|
||||
proc ButtonBox::_redraw { path } {
|
||||
variable $path
|
||||
upvar 0 $path data
|
||||
Widget::getVariable $path buttons
|
||||
|
||||
# For tk >= 8.4, -uniform gridding option is used.
|
||||
# Otherwise, there is the constraint, that button size may not change after
|
||||
# creation.
|
||||
set uniformAvailable [expr {0 <= [package vcompare [info patchlevel] 8.4.0]}]
|
||||
|
||||
## We re-grid the buttons from left-to-right. As we go through
|
||||
## each button, we check its spacing and which direction the
|
||||
## spacing applies to. Once spacing has been applied to an index,
|
||||
## it is not changed. This means spacing takes precedence from
|
||||
## left-to-right.
|
||||
|
||||
set idx 0
|
||||
set idxs [list]
|
||||
foreach i $data(buttons) {
|
||||
set dir [lindex $data(spacing,$i) 0]
|
||||
set spacing [lindex $data(spacing,$i) 1]
|
||||
set but $path.b$i
|
||||
if {[string equal [Widget::getoption $path -orient] "horizontal"]} {
|
||||
grid $but -column $idx -row 0 -sticky nsew
|
||||
if { [Widget::getoption $path -homogeneous] } {
|
||||
if {$uniformAvailable} {
|
||||
grid columnconfigure $path $idx -uniform koen -weight 1
|
||||
} else {
|
||||
set req [winfo reqwidth $but]
|
||||
if { $req > $data(max) } {
|
||||
grid columnconfigure $path [expr {2*$i}] -minsize $req
|
||||
set data(max) $req
|
||||
}
|
||||
grid columnconfigure $path $idx -weight 1
|
||||
}
|
||||
} else {
|
||||
grid columnconfigure $path $idx -weight 0
|
||||
}
|
||||
|
||||
set col [expr {$idx - 1}]
|
||||
if {[string equal $dir "right"]} { set col [expr {$idx + 1}] }
|
||||
if {$col > 0 && [lsearch $idxs $col] < 0} {
|
||||
lappend idxs $col
|
||||
grid columnconfigure $path $col -minsize $spacing
|
||||
}
|
||||
} else {
|
||||
grid $but -column 0 -row $idx -sticky nsew
|
||||
grid rowconfigure $path $idx -weight 0
|
||||
|
||||
set row [expr {$idx - 1}]
|
||||
if {[string equal $dir "right"]} { set row [expr {$idx + 1}] }
|
||||
if {$row > 0 && [lsearch $idxs $row] < 0} {
|
||||
lappend idxs $row
|
||||
grid rowconfigure $path $row -minsize $spacing
|
||||
}
|
||||
}
|
||||
incr idx 2
|
||||
}
|
||||
|
||||
if {!$uniformAvailable} {
|
||||
# Now that the maximum size has been calculated, go back through
|
||||
# and correctly set the size for homogeneous horizontal buttons.
|
||||
if { [string equal [Widget::getoption $path -orient] "horizontal"] && [Widget::getoption $path -homogeneous] } {
|
||||
set idx 0
|
||||
foreach i $data(buttons) {
|
||||
grid columnconfigure $path $idx -minsize $data(max)
|
||||
incr idx 2
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
# ----------------------------------------------------------------------------
|
||||
# Command ButtonBox::_destroy
|
||||
# ----------------------------------------------------------------------------
|
||||
proc ButtonBox::_destroy { path } {
|
||||
variable $path
|
||||
upvar 0 $path data
|
||||
Widget::destroy $path
|
||||
unset data
|
||||
}
|
918
R_portable/R/App/R-portable/Tcl/bin64/lib/bwidget-1.9.12/color.tcl
Executable file
@ -0,0 +1,918 @@
|
||||
namespace eval SelectColor {
|
||||
Widget::define SelectColor color Dialog
|
||||
|
||||
Widget::declare SelectColor {
|
||||
{-title String "Select a color" 0}
|
||||
{-parent String "" 0}
|
||||
{-command String "" 0}
|
||||
{-help Boolean 0 1}
|
||||
{-color TkResource "" 0 {label -background}}
|
||||
{-type Enum "dialog" 1 {dialog popup}}
|
||||
{-placement String "center" 1}
|
||||
{-background TkResource "" 0 {label -background}}
|
||||
}
|
||||
|
||||
variable _baseColors {
|
||||
\#0000ff \#00ff00 \#00ffff \#ff0000 \#ff00ff \#ffff00
|
||||
\#000099 \#009900 \#009999 \#990000 \#990099 \#999900
|
||||
\#000000 \#333333 \#666666 \#999999 \#cccccc \#ffffff
|
||||
}
|
||||
|
||||
variable _userColors {
|
||||
\#ffffff \#ffffff \#ffffff \#ffffff \#ffffff \#ffffff
|
||||
\#ffffff \#ffffff \#ffffff \#ffffff \#ffffff
|
||||
}
|
||||
|
||||
if {[string equal $::tcl_platform(platform) "unix"]} {
|
||||
set useTkDialogue 0
|
||||
} else {
|
||||
set useTkDialogue 1
|
||||
}
|
||||
|
||||
variable _selectype
|
||||
variable _selection
|
||||
variable _wcolor
|
||||
variable _image
|
||||
variable _hsv
|
||||
|
||||
variable _command
|
||||
variable _unsavedSelection
|
||||
variable _oldColor
|
||||
variable _entryColor
|
||||
variable _bgColor
|
||||
variable _fgColor
|
||||
variable _rounds
|
||||
}
|
||||
|
||||
proc SelectColor::create { path args } {
|
||||
Widget::init SelectColor $path $args
|
||||
|
||||
set type [Widget::cget $path -type]
|
||||
|
||||
switch -- [Widget::cget $path -type] {
|
||||
"dialog" {
|
||||
return [eval [list SelectColor::dialog $path] $args]
|
||||
}
|
||||
|
||||
"popup" {
|
||||
set list [list at center left right above below]
|
||||
set placement [Widget::cget $path -placement]
|
||||
set where [lindex $placement 0]
|
||||
|
||||
if {[lsearch $list $where] < 0} {
|
||||
return -code error \
|
||||
[BWidget::badOptionString placement $placement $list]
|
||||
}
|
||||
|
||||
## If they specified a parent and didn't pass a second argument
|
||||
## in the placement, set the placement relative to the parent.
|
||||
set parent [Widget::cget $path -parent]
|
||||
if {[string length $parent]} {
|
||||
if {[llength $placement] == 1} { lappend placement $parent }
|
||||
}
|
||||
return [eval [list SelectColor::menu $path $placement] $args]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
proc SelectColor::menu {path placement args} {
|
||||
variable _baseColors
|
||||
variable _userColors
|
||||
variable _wcolor
|
||||
variable _selectype
|
||||
variable _selection
|
||||
variable _command
|
||||
variable _bgColor
|
||||
variable _rounds
|
||||
|
||||
Widget::init SelectColor $path $args
|
||||
set top [toplevel $path]
|
||||
set parent [winfo toplevel [winfo parent $top]]
|
||||
wm withdraw $top
|
||||
wm transient $top $parent
|
||||
wm overrideredirect $top 1
|
||||
catch { wm attributes $top -topmost 1 }
|
||||
|
||||
set _command [Widget::cget $path -command]
|
||||
set _bgColor [Widget::cget $path -background]
|
||||
set _rounds {}
|
||||
|
||||
set frame [frame $top.frame \
|
||||
-highlightthickness 0 \
|
||||
-relief raised -borderwidth 2]
|
||||
set col 0
|
||||
set row 0
|
||||
set count 0
|
||||
set colors [concat $_baseColors $_userColors]
|
||||
foreach color $colors {
|
||||
set f [frame $frame.c$count \
|
||||
-highlightthickness 2 \
|
||||
-highlightcolor white \
|
||||
-relief solid -borderwidth 1 \
|
||||
-width 16 -height 16 -background $color]
|
||||
bind $f <1> "set SelectColor::_selection $count; break"
|
||||
bind $f <Enter> {focus %W}
|
||||
grid $f -column $col -row $row
|
||||
incr count
|
||||
if {[incr col] == 6 } {
|
||||
set col 0
|
||||
incr row
|
||||
}
|
||||
}
|
||||
set f [label $frame.c$count \
|
||||
-highlightthickness 2 \
|
||||
-highlightcolor white \
|
||||
-relief flat -borderwidth 0 \
|
||||
-width 16 -height 16 -image [Bitmap::get palette]]
|
||||
grid $f -column $col -row $row
|
||||
bind $f <1> "set SelectColor::_selection $count; break"
|
||||
bind $f <Enter> {focus %W}
|
||||
pack $frame
|
||||
|
||||
bind $top <1> {set SelectColor::_selection -1}
|
||||
bind $top <Escape> {set SelectColor::_selection -2}
|
||||
bind $top <FocusOut> [subst {if {"%W" == "$top"} \
|
||||
{set SelectColor::_selection -2}}]
|
||||
|
||||
# set background color for menu
|
||||
$f configure -bg $_bgColor
|
||||
$frame configure -bg $_bgColor
|
||||
foreach w [winfo children $frame] {
|
||||
$w configure -highlightcolor $_bgColor -highlightbackground $_bgColor
|
||||
}
|
||||
|
||||
eval [list BWidget::place $top 0 0] $placement
|
||||
|
||||
wm deiconify $top
|
||||
raise $top
|
||||
if {$::tcl_platform(platform) == "unix"} {
|
||||
tkwait visibility $top
|
||||
update
|
||||
}
|
||||
BWidget::SetFocusGrab $top $frame.c0
|
||||
|
||||
vwait SelectColor::_selection
|
||||
BWidget::RestoreFocusGrab $top $frame.c0 destroy
|
||||
Widget::destroy $top
|
||||
if {$_selection == $count} {
|
||||
array set opts {
|
||||
-parent -parent
|
||||
-title -title
|
||||
-color -initialcolor
|
||||
}
|
||||
if {[Widget::theme]} {
|
||||
set native 1
|
||||
set nativecmd [list tk_chooseColor -parent $parent]
|
||||
foreach {key val} $args {
|
||||
if {![info exists opts($key)]} {
|
||||
set native 0
|
||||
break
|
||||
}
|
||||
lappend nativecmd $opts($key) $val
|
||||
}
|
||||
if {$native} {
|
||||
# Call native dialog
|
||||
return [eval $nativecmd]
|
||||
}
|
||||
}
|
||||
# Call BWidget dialog
|
||||
return [eval [list dialog $path] $args]
|
||||
} else {
|
||||
# The user has either selected one of the palette colors, or has
|
||||
# cancelled. The full BWidget/native dialog was not called.
|
||||
# Unless the user has cancelled, pass the selected
|
||||
# color to _userCommand.
|
||||
set tmpCol [lindex $colors $_selection]
|
||||
if {[string equal $tmpCol ""]} {
|
||||
# User has cancelled - no need to call _userCommand.
|
||||
} else {
|
||||
_userCommand $tmpCol
|
||||
}
|
||||
return $tmpCol
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
proc SelectColor::_userCommand {color} {
|
||||
variable _command
|
||||
if {[string equal $_command {}]} {
|
||||
return
|
||||
}
|
||||
uplevel #0 $_command [list $color]
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
proc SelectColor::dialog {path args} {
|
||||
variable _baseColors
|
||||
variable _userColors
|
||||
variable _widget
|
||||
variable _selection
|
||||
variable _image
|
||||
variable _hsv
|
||||
variable _command
|
||||
variable _unsavedSelection
|
||||
variable _oldColor
|
||||
variable _entryColor
|
||||
variable _bgColor
|
||||
variable _fgColor
|
||||
variable _rounds
|
||||
|
||||
|
||||
Widget::init SelectColor $path:SelectColor $args
|
||||
set top [Dialog::create $path \
|
||||
-title [Widget::cget $path:SelectColor -title] \
|
||||
-parent [Widget::cget $path:SelectColor -parent] \
|
||||
-separator 0 -default 0 -cancel 1 -anchor e]
|
||||
wm resizable $top 0 0
|
||||
set dlgf [$top getframe]
|
||||
set fg [frame $dlgf.fg]
|
||||
set desc [list \
|
||||
base _baseColors "Base colors" \
|
||||
user _userColors "User colors"]
|
||||
|
||||
set help [Widget::cget $path:SelectColor -help]
|
||||
set _command [Widget::cget $path:SelectColor -command]
|
||||
set _bgColor [Widget::cget $path:SelectColor -background]
|
||||
set _rounds {}
|
||||
set mouseHelpText ""
|
||||
if {$help} {
|
||||
append mouseHelpText [subst -nocommands -novariables\
|
||||
[lindex [BWidget::getname mouseHelpText] 0]]
|
||||
}
|
||||
|
||||
set count 0
|
||||
foreach {type varcol defTitle} $desc {
|
||||
set col 0
|
||||
set lin 0
|
||||
set title [lindex [BWidget::getname "${type}Colors"] 0]
|
||||
if {![string length $title]} {
|
||||
set title $defTitle
|
||||
}
|
||||
set titf [TitleFrame $fg.$type -text $title]
|
||||
set subf [$titf getframe]
|
||||
foreach color [set $varcol] {
|
||||
set fround [frame $fg.round$count \
|
||||
-highlightthickness 1 \
|
||||
-relief sunken -borderwidth 2]
|
||||
set fcolor [frame $fg.color$count -width 16 -height 12 \
|
||||
-highlightthickness 0 \
|
||||
-relief flat -borderwidth 0 \
|
||||
-background $color]
|
||||
pack $fcolor -in $fround
|
||||
grid $fround -in $subf -row $lin -column $col -padx 1 -pady 1
|
||||
|
||||
bind $fround <ButtonPress-1> [list SelectColor::_select_rgb $count]
|
||||
bind $fcolor <ButtonPress-1> [list SelectColor::_select_rgb $count]
|
||||
|
||||
DynamicHelp::add $fround -text $mouseHelpText
|
||||
DynamicHelp::add $fcolor -text $mouseHelpText
|
||||
|
||||
bind $fround <Double-1> \
|
||||
"SelectColor::_select_rgb [list $count]; [list $top] invoke 0"
|
||||
bind $fcolor <Double-1> \
|
||||
"SelectColor::_select_rgb [list $count]; [list $top] invoke 0"
|
||||
|
||||
# Record list of $fround values in _rounds
|
||||
lappend _rounds $fround
|
||||
|
||||
incr count
|
||||
if {[incr col] == 6} {
|
||||
incr lin
|
||||
set col 0
|
||||
}
|
||||
}
|
||||
pack $titf -anchor w -pady 2
|
||||
}
|
||||
|
||||
# Record these colors for later use
|
||||
set _fgColor [$fg.round0 cget -highlightcolor]
|
||||
|
||||
# Add a TitleFrame $titf to wrap $fg.round and $fg.value
|
||||
set name [lindex [BWidget::getname yourSelection] 0]
|
||||
set titf [TitleFrame $fg.choice -text $name]
|
||||
set subf [$titf getframe]
|
||||
pack $titf -anchor w -pady 2 -expand yes -fill both
|
||||
|
||||
# Add an entry widget $fg.value for the #RRGGBB value
|
||||
if {$::tk_version > 8.4} {
|
||||
set fixedFont TkFixedFont
|
||||
} else {
|
||||
set fixedFont Courier
|
||||
}
|
||||
set subf2 $fg.vround
|
||||
frame $subf2 -highlightthickness 0 -relief sunken -borderwidth 2
|
||||
entry $fg.value -width 8 -relief sunken -bd 0 -highlightthickness 0 \
|
||||
-bg white -textvariable ::SelectColor::_entryColor -font $fixedFont
|
||||
pack $subf2 -in $subf -anchor w -side left
|
||||
pack $fg.value -in $subf2 -anchor w -side left
|
||||
|
||||
if {$help} {
|
||||
DynamicHelp::add $fg.value -text [subst -nocommands -novariables\
|
||||
[lindex [BWidget::getname keyboardHelpText] 0]]
|
||||
}
|
||||
|
||||
# Remove focus from the entry widget by clicking anywhere...
|
||||
bind $top <1> [list ::SelectColor::_CheckFocus %W]
|
||||
|
||||
# ... or by pressing Return/Escape.
|
||||
bind $fg.value <Return> [list ::SelectColor::_CheckFocus .]
|
||||
bind $fg.value <Escape> [list ::SelectColor::_CheckFocus .]
|
||||
bind $fg.value <Return> {+break}
|
||||
bind $fg.value <Escape> {+break}
|
||||
# Break so that the bindings to these events on the toplevel are not
|
||||
# executed.
|
||||
|
||||
# MODS - record the Tk window path for the entry widget.
|
||||
set _widget(en) $fg.value
|
||||
|
||||
set fround [frame $fg.round \
|
||||
-highlightthickness 0 \
|
||||
-relief sunken -borderwidth 2]
|
||||
set fcolor [frame $fg.color \
|
||||
-width 50 \
|
||||
-highlightthickness 0 \
|
||||
-relief flat -borderwidth 0]
|
||||
pack $fcolor -in $fround -fill y -expand yes
|
||||
pack $fround -in $subf -side right -anchor e -pady 2 -fill y -expand yes
|
||||
|
||||
# Add a TitleFrame $dlgf.fd to wrap the canvas selectors. The
|
||||
# labels are referenced by the DynamicHelp tooltip.
|
||||
set name [lindex [BWidget::getname colorSelectors] 0]
|
||||
set fd0 [TitleFrame $dlgf.fd -text $name]
|
||||
set fd [$fd0 getframe]
|
||||
set f1 [frame $fd.f1 -relief sunken -borderwidth 2]
|
||||
set f2 [frame $fd.f2 -relief sunken -borderwidth 2]
|
||||
set c1 [canvas $f1.c -width 200 -height 200 -bd 0 -highlightthickness 0]
|
||||
set c2 [canvas $f2.c -width 15 -height 200 -bd 0 -highlightthickness 0]
|
||||
|
||||
for {set val 0} {$val < 40} {incr val} {
|
||||
$c2 create rectangle 0 [expr {5*$val}] 15 [expr {5*$val+5}] -tags val[expr {39-$val}]
|
||||
}
|
||||
$c2 create polygon 0 0 10 5 0 10 -fill black -outline white -tags target
|
||||
|
||||
pack $c1 $c2
|
||||
pack $f1 $f2 -side left -padx 10 -anchor n
|
||||
|
||||
pack $fg $fd0 -side left -anchor n -fill y
|
||||
pack configure $fd0 -pady 2 -padx {4 0}
|
||||
|
||||
bind $c1 <ButtonPress-1> [list SelectColor::_select_hue_sat %x %y]
|
||||
bind $c1 <B1-Motion> [list SelectColor::_select_hue_sat %x %y]
|
||||
|
||||
bind $c2 <ButtonPress-1> [list SelectColor::_select_value %x %y]
|
||||
bind $c2 <B1-Motion> [list SelectColor::_select_value %x %y]
|
||||
|
||||
if {![info exists _image] || [catch {image type $_image}]} {
|
||||
set _image [image create photo -width 200 -height 200]
|
||||
for {set x 0} {$x < 200} {incr x 4} {
|
||||
for {set y 0} {$y < 200} {incr y 4} {
|
||||
$_image put \
|
||||
[eval [list format "\#%04x%04x%04x"] \
|
||||
[hsvToRgb [expr {$x/196.0}] [expr {(196-$y)/196.0}] 0.85]] \
|
||||
-to $x $y [expr {$x+4}] [expr {$y+4}]
|
||||
}
|
||||
}
|
||||
}
|
||||
$c1 create image 0 0 -anchor nw -image $_image
|
||||
$c1 create bitmap 0 0 \
|
||||
-bitmap @[file join $::BWIDGET::LIBRARY "images" "target.xbm"] \
|
||||
-anchor nw -tags target
|
||||
|
||||
set _selection -1
|
||||
set _widget(fcolor) $fg
|
||||
set _widget(chs) $c1
|
||||
set _widget(cv) $c2
|
||||
set rgb [winfo rgb $path [Widget::cget $path:SelectColor -color]]
|
||||
set _hsv [eval rgbToHsv $rgb]
|
||||
_set_rgb [eval [list format "\#%04x%04x%04x"] $rgb]
|
||||
_set_hue_sat [lindex $_hsv 0] [lindex $_hsv 1]
|
||||
_set_value [lindex $_hsv 2]
|
||||
|
||||
# Initialize _oldColor which is used to reset the color supplied to
|
||||
# _userCommand if the user cancels.
|
||||
set _oldColor [set _unsavedSelection]
|
||||
set tmp24 [::SelectColor::_24BitRgb $_oldColor]
|
||||
if {[_ValidateColorEntry forced $tmp24]} {
|
||||
set ::SelectColor::_entryColor $tmp24
|
||||
} else {
|
||||
# Value $tmp24 does not pass entry widget validation and if used
|
||||
# would disable validation. Use this default instead.
|
||||
set _entryColor #
|
||||
}
|
||||
|
||||
# Validate input to the entry field.
|
||||
# To avoid conflict with the entry -variable (_entryColor), do not set the
|
||||
# latter directly (because a failed validation will switch off subsequent
|
||||
# validations). Either call _SetEntryValue, or set _unsavedSelection which
|
||||
# triggers the trace.
|
||||
|
||||
$fg.value configure -validate all -validatecommand \
|
||||
[list SelectColor::_ValidateColorEntry %V %P]
|
||||
|
||||
# Trace _unsavedSelection
|
||||
# Subsequent modifications to _unsavedSelection will update the entry
|
||||
# widget, if the value is valid.
|
||||
# From now on, this is the only way that:
|
||||
# (1) ::SelectColor::_SetEntryValue is called
|
||||
# (2) ::SelectColor::_entryColor is modified (except by the user typing in
|
||||
# the entry widget)
|
||||
|
||||
trace add variable ::SelectColor::_unsavedSelection write ::SelectColor::_SetEntryValue
|
||||
|
||||
$top add -text [lindex [BWidget::getname ok] 0]
|
||||
$top add -text [lindex [BWidget::getname cancel] 0]
|
||||
|
||||
# Override background color
|
||||
ReColor $path $_bgColor
|
||||
|
||||
set res [$top draw]
|
||||
if {$res == 0} {
|
||||
set color [$fg.color cget -background]
|
||||
} else {
|
||||
# User has cancelled - call _userCommand to undo any changes made
|
||||
# in the caller.
|
||||
_userCommand $_oldColor
|
||||
set color ""
|
||||
}
|
||||
|
||||
trace remove variable ::SelectColor::_unsavedSelection write ::SelectColor::_SetEntryValue
|
||||
|
||||
destroy $top
|
||||
return $color
|
||||
}
|
||||
|
||||
|
||||
# ----------------------------------------------------------------------------
|
||||
# Command SelectColor::setbasecolor
|
||||
# ----------------------------------------------------------------------------
|
||||
# Exported command, to allow the caller to set the base colors of the palette.
|
||||
|
||||
proc SelectColor::setbasecolor { idx color } {
|
||||
variable _baseColors
|
||||
set _baseColors [lreplace $_baseColors $idx $idx $color]
|
||||
}
|
||||
|
||||
# ----------------------------------------------------------------------------
|
||||
# Command SelectColor::setcolor
|
||||
# ----------------------------------------------------------------------------
|
||||
|
||||
proc SelectColor::setcolor { idx color } {
|
||||
variable _userColors
|
||||
set _userColors [lreplace $_userColors $idx $idx $color]
|
||||
}
|
||||
|
||||
proc SelectColor::_select_rgb {count} {
|
||||
variable _baseColors
|
||||
variable _userColors
|
||||
variable _selection
|
||||
variable _widget
|
||||
variable _hsv
|
||||
variable _unsavedSelection
|
||||
variable _bgColor
|
||||
variable _fgColor
|
||||
|
||||
set frame $_widget(fcolor)
|
||||
|
||||
# Use highlight color instead of focus to identify the selected
|
||||
# palette color. Tab traversal of focus now works correctly.
|
||||
if {$_selection >= 0} {
|
||||
$frame.round$_selection configure \
|
||||
-relief sunken -highlightthickness 1 -borderwidth 2 \
|
||||
-highlightbackground $_bgColor
|
||||
}
|
||||
$frame.round$count configure \
|
||||
-relief flat -highlightthickness 2 -borderwidth 1 \
|
||||
-highlightbackground $_fgColor
|
||||
set _selection $count
|
||||
set bg [$frame.color$count cget -background]
|
||||
set user [expr {$_selection-[llength $_baseColors]}]
|
||||
if {$user >= 0 &&
|
||||
[string equal \
|
||||
[winfo rgb $frame.color$_selection $bg] \
|
||||
[winfo rgb $frame.color$_selection white]]} {
|
||||
set bg [$frame.color cget -bg]
|
||||
$frame.color$_selection configure -background $bg
|
||||
set _userColors [lreplace $_userColors $user $user $bg]
|
||||
} else {
|
||||
set _hsv [eval rgbToHsv [winfo rgb $frame.color$count $bg]]
|
||||
_set_hue_sat [lindex $_hsv 0] [lindex $_hsv 1]
|
||||
_set_value [lindex $_hsv 2]
|
||||
$frame.color configure -background $bg
|
||||
|
||||
# Display selected color in entry widget (via trace on
|
||||
# ::SelectColor::_unsavedSelection), and notify caller.
|
||||
set ::SelectColor::_unsavedSelection $bg
|
||||
_userCommand $bg
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
proc SelectColor::_set_rgb {rgb} {
|
||||
variable _selection
|
||||
variable _baseColors
|
||||
variable _userColors
|
||||
variable _widget
|
||||
variable _unsavedSelection
|
||||
|
||||
set frame $_widget(fcolor)
|
||||
$frame.color configure -background $rgb
|
||||
|
||||
# Display selected color in entry widget (via trace on
|
||||
# ::SelectColor::_unsavedSelection), and notify caller.
|
||||
set ::SelectColor::_unsavedSelection $rgb
|
||||
_userCommand $rgb
|
||||
set user [expr {$_selection-[llength $_baseColors]}]
|
||||
if {$user >= 0} {
|
||||
$frame.color$_selection configure -background $rgb
|
||||
set _userColors [lreplace $_userColors $user $user $rgb]
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
proc SelectColor::_select_hue_sat {x y} {
|
||||
variable _widget
|
||||
variable _hsv
|
||||
|
||||
if {$x < 0} {
|
||||
set x 0
|
||||
} elseif {$x > 200} {
|
||||
set x 200
|
||||
}
|
||||
if {$y < 0 } {
|
||||
set y 0
|
||||
} elseif {$y > 200} {
|
||||
set y 200
|
||||
}
|
||||
set hue [expr {$x/200.0}]
|
||||
set sat [expr {(200-$y)/200.0}]
|
||||
set _hsv [lreplace $_hsv 0 1 $hue $sat]
|
||||
$_widget(chs) coords target [expr {$x-9}] [expr {$y-9}]
|
||||
_draw_values $hue $sat
|
||||
_set_rgb [eval [list format "\#%04x%04x%04x"] [eval [list hsvToRgb] $_hsv]]
|
||||
}
|
||||
|
||||
|
||||
proc SelectColor::_set_hue_sat {hue sat} {
|
||||
variable _widget
|
||||
|
||||
set x [expr {$hue*200-9}]
|
||||
set y [expr {(1-$sat)*200-9}]
|
||||
$_widget(chs) coords target $x $y
|
||||
_draw_values $hue $sat
|
||||
}
|
||||
|
||||
|
||||
|
||||
proc SelectColor::_select_value {x y} {
|
||||
variable _widget
|
||||
variable _hsv
|
||||
|
||||
if {$y < 0} {
|
||||
set y 0
|
||||
} elseif {$y > 200} {
|
||||
set y 200
|
||||
}
|
||||
$_widget(cv) coords target 0 [expr {$y-5}] 10 $y 0 [expr {$y+5}]
|
||||
set _hsv [lreplace $_hsv 2 2 [expr {(200-$y)/200.0}]]
|
||||
_set_rgb [eval [list format "\#%04x%04x%04x"] [eval [list hsvToRgb] $_hsv]]
|
||||
}
|
||||
|
||||
|
||||
proc SelectColor::_draw_values {hue sat} {
|
||||
variable _widget
|
||||
|
||||
for {set val 0} {$val < 40} {incr val} {
|
||||
set l [hsvToRgb $hue $sat [expr {$val/39.0}]]
|
||||
set col [eval [list format "\#%04x%04x%04x"] $l]
|
||||
$_widget(cv) itemconfigure val$val -fill $col -outline $col
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
proc SelectColor::_set_value {value} {
|
||||
variable _widget
|
||||
|
||||
set y [expr {int((1-$value)*200)}]
|
||||
$_widget(cv) coords target 0 [expr {$y-5}] 10 $y 0 [expr {$y+5}]
|
||||
}
|
||||
|
||||
|
||||
# --
|
||||
# Taken from tk8.0/demos/tcolor.tcl
|
||||
# --
|
||||
# The procedure below converts an HSB value to RGB. It takes hue, saturation,
|
||||
# and value components (floating-point, 0-1.0) as arguments, and returns a
|
||||
# list containing RGB components (integers, 0-65535) as result. The code
|
||||
# here is a copy of the code on page 616 of "Fundamentals of Interactive
|
||||
# Computer Graphics" by Foley and Van Dam.
|
||||
|
||||
proc SelectColor::hsvToRgb {hue sat val} {
|
||||
set v [expr {round(65535.0*$val)}]
|
||||
if {$sat == 0} {
|
||||
return [list $v $v $v]
|
||||
} else {
|
||||
set hue [expr {$hue*6.0}]
|
||||
if {$hue >= 6.0} {
|
||||
set hue 0.0
|
||||
}
|
||||
set i [expr {int($hue)}]
|
||||
set f [expr {$hue-$i}]
|
||||
set p [expr {round(65535.0*$val*(1 - $sat))}]
|
||||
set q [expr {round(65535.0*$val*(1 - ($sat*$f)))}]
|
||||
set t [expr {round(65535.0*$val*(1 - ($sat*(1 - $f))))}]
|
||||
switch $i {
|
||||
0 {return [list $v $t $p]}
|
||||
1 {return [list $q $v $p]}
|
||||
2 {return [list $p $v $t]}
|
||||
3 {return [list $p $q $v]}
|
||||
4 {return [list $t $p $v]}
|
||||
5 {return [list $v $p $q]}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
# --
|
||||
# Taken from tk8.0/demos/tcolor.tcl
|
||||
# --
|
||||
# The procedure below converts an RGB value to HSB. It takes red, green,
|
||||
# and blue components (0-65535) as arguments, and returns a list containing
|
||||
# HSB components (floating-point, 0-1) as result. The code here is a copy
|
||||
# of the code on page 615 of "Fundamentals of Interactive Computer Graphics"
|
||||
# by Foley and Van Dam.
|
||||
|
||||
proc SelectColor::rgbToHsv {red green blue} {
|
||||
if {$red > $green} {
|
||||
set max $red.0
|
||||
set min $green.0
|
||||
} else {
|
||||
set max $green.0
|
||||
set min $red.0
|
||||
}
|
||||
if {$blue > $max} {
|
||||
set max $blue.0
|
||||
} else {
|
||||
if {$blue < $min} {
|
||||
set min $blue.0
|
||||
}
|
||||
}
|
||||
set range [expr {$max-$min}]
|
||||
if {$max == 0} {
|
||||
set sat 0
|
||||
} else {
|
||||
set sat [expr {($max-$min)/$max}]
|
||||
}
|
||||
if {$sat == 0} {
|
||||
set hue 0
|
||||
} else {
|
||||
set rc [expr {($max - $red)/$range}]
|
||||
set gc [expr {($max - $green)/$range}]
|
||||
set bc [expr {($max - $blue)/$range}]
|
||||
if {$red == $max} {
|
||||
set hue [expr {.166667*($bc - $gc)}]
|
||||
} else {
|
||||
if {$green == $max} {
|
||||
set hue [expr {.166667*(2 + $rc - $bc)}]
|
||||
} else {
|
||||
set hue [expr {.166667*(4 + $gc - $rc)}]
|
||||
}
|
||||
}
|
||||
if {$hue < 0.0} {
|
||||
set hue [expr {$hue + 1.0}]
|
||||
}
|
||||
}
|
||||
return [list $hue $sat [expr {$max/65535}]]
|
||||
}
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
# Command SelectColor::ReColor
|
||||
# ------------------------------------------------------------------------------
|
||||
# Command to change the background color for the dialog.
|
||||
#
|
||||
# FIXME Ideally this would be called by "$w configure -background $value".
|
||||
# Currently a "configure -background" command is passed to Dialog and Widget
|
||||
# but does not change SelectColor.
|
||||
# HaO: it might also be possible that this is controled by the option data base.
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
proc SelectColor::ReColor {path newColor} {
|
||||
variable _bgColor
|
||||
variable _rounds
|
||||
|
||||
set _bgColor $newColor
|
||||
|
||||
$path configure -bg $_bgColor
|
||||
|
||||
# Use the internal names of the dialog widget - it would be nicer to
|
||||
# use a colored dialog widget.
|
||||
foreach child {
|
||||
fd fd.f.f1 fd.f.f2
|
||||
fg fg.base fg.choice
|
||||
fg.user fg.round fg.vround
|
||||
} {
|
||||
$path.frame.$child configure -background $_bgColor
|
||||
}
|
||||
|
||||
# Special treatment for Aqua native buttons.
|
||||
# FIXME implement a general fix for BWidget Button/ButtonBox/Dialog
|
||||
if {[string equal [tk windowingsystem] "aqua"]} {
|
||||
$path.bbox.b0 configure -highlightbackground $_bgColor \
|
||||
-highlightthickness 0
|
||||
$path.bbox.b1 configure -highlightbackground $_bgColor \
|
||||
-highlightthickness 0
|
||||
} else {
|
||||
$path.bbox.b0 configure -bg $_bgColor -activebackground $_bgColor \
|
||||
-highlightbackground $_bgColor
|
||||
$path.bbox.b1 configure -bg $_bgColor -activebackground $_bgColor \
|
||||
-highlightbackground $_bgColor
|
||||
}
|
||||
|
||||
foreach fround $_rounds {
|
||||
$fround configure -highlightbackground $_bgColor -bg $_bgColor
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
# Command SelectColor::_24BitRgb
|
||||
# ------------------------------------------------------------------------------
|
||||
# Command to convert a hex 12n-bit RGB color to 24-bit, n > 0.
|
||||
# Convert anything else to {}.
|
||||
# Used to process the display in the entry widget.
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
proc SelectColor::_24BitRgb {col} {
|
||||
set lenny [string length $col]
|
||||
incr lenny -1
|
||||
|
||||
if { ($lenny % 3)
|
||||
|| ($lenny == 0)
|
||||
|| (![regexp {^#[a-fA-F0-9]*$} $col])
|
||||
} {
|
||||
# Not a multiple of 3, or not leading #, or nothing after #,
|
||||
# or non-HEX digits.
|
||||
return {}
|
||||
} elseif {$lenny == 3} {
|
||||
# 12-bit, pad to 24-bit
|
||||
set val $col
|
||||
set val [string replace $val 3 3 "[string index $val 3]0"]
|
||||
set val [string replace $val 2 2 "[string index $val 2]0"]
|
||||
set val [string replace $val 1 1 "[string index $val 1]0"]
|
||||
return $val
|
||||
} elseif {$lenny == 6} {
|
||||
# 24-bit, return unchanged
|
||||
return $col
|
||||
} else {
|
||||
# Truncate to 24-bit
|
||||
set delta [expr {$lenny / 3}]
|
||||
set delta2 [expr {$delta * 2}]
|
||||
set deltaP1 [incr delta]
|
||||
set deltaP2 [incr delta]
|
||||
set delta2P1 [incr delta2]
|
||||
set delta2P2 [incr delta2]
|
||||
set result #
|
||||
append result [string range $col 1 2]
|
||||
append result [string range $col $deltaP1 $deltaP2]
|
||||
append result [string range $col $delta2P1 $delta2P2]
|
||||
return $result
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
# Command SelectColor::_SetEntryValue
|
||||
# ------------------------------------------------------------------------------
|
||||
# Command to update the (hexadecimal color displayed in the) entry widget
|
||||
# when there is a change in the color currently selected in the GUI, which is
|
||||
# stored in _unsavedSelection.
|
||||
#
|
||||
# This command is called by a write trace on _unsavedSelection; if the
|
||||
# value of this variable is a valid color (i.e. "#" followed by 3N hex digits),
|
||||
# this command converts the value to 24 bits and sets ::SelectColor::_entryColor
|
||||
# to the result, thereby displaying it in the entry widget. Therefore,
|
||||
# when the user chooses a color by means other than the entry widget, this
|
||||
# command updates the entry widget.
|
||||
#
|
||||
# This command does not update the GUI when the user changes the value in the
|
||||
# entry widget: that is done instead by the -vcmd of the entry widget, which
|
||||
# is SelectColor::_ValidateColorEntry. When the user chooses a color by typing
|
||||
# in the entry widget, the command _ValidateColorEntry copies the value to
|
||||
# _unsavedSelection if a keystroke in the widget makes its contents 3N hex
|
||||
# digits long.
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
proc SelectColor::_SetEntryValue {argVarName var2 op} {
|
||||
variable _entryColor
|
||||
variable _unsavedSelection
|
||||
|
||||
if {[string equal $argVarName ::SelectColor::_unsavedSelection] &&
|
||||
[string equal $var2 {}] && [string equal $op "write"]} {
|
||||
# OK
|
||||
} else {
|
||||
# Unexpected call
|
||||
return -code error "Unexpected trace of variable\
|
||||
\"$argVarName\", \"$var2\", \"$op\""
|
||||
}
|
||||
|
||||
set col24bit [::SelectColor::_24BitRgb [set $argVarName]]
|
||||
|
||||
if {[_ValidateColorEntry forced $col24bit]} {
|
||||
set ::SelectColor::_entryColor $col24bit
|
||||
} else {
|
||||
# Value is invalid, and if written to _entryColor this would disable
|
||||
# validation.
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
# Command SelectColor::_CheckFocus
|
||||
# ------------------------------------------------------------------------------
|
||||
# This command is called with argument %W as a binding to <1> on the toplevel.
|
||||
# It is also called with argument {.}, by bindings on the entry widget to
|
||||
# <Escape>, <Return>.
|
||||
#
|
||||
# The command does something only if the entry widget has focus, and the
|
||||
# argument (the clicked window) is the Tk window path of somewhere else. Then,
|
||||
# the command removes focus from the entry widget to the default button.
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
proc SelectColor::_CheckFocus {w} {
|
||||
variable _widget
|
||||
|
||||
if { (! [string equal $w $_widget(en)]) &&
|
||||
([string equal [focus] $_widget(en)])} {
|
||||
set top [winfo toplevel $_widget(en)]
|
||||
$top setfocus default
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
# Command SelectColor::_ValidateColorEntry
|
||||
# ------------------------------------------------------------------------------
|
||||
# This command is the "-validate all -vcmd" of the entry widget.
|
||||
# It is also called by SelectColor::dialog and SelectColor::_SetEntryValue to
|
||||
# check values assigned to _entryColor.
|
||||
#
|
||||
# When the user chooses a color by typing in the entry widget, this command
|
||||
# copies the value to _unsavedSelection if a keystroke in the widget makes its
|
||||
# contents 3N hex digits long.
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
proc SelectColor::_ValidateColorEntry {percentV percentP} {
|
||||
variable _unsavedSelection
|
||||
|
||||
set result [regexp -- {^#[0-9a-fA-F]*$} $percentP]
|
||||
set lenny [string length $percentP]
|
||||
|
||||
if {$result} {
|
||||
if {[string equal $percentV "forced"]} {
|
||||
# Validation only. Don't want a loop.
|
||||
} elseif {[string equal $percentV "key"]} {
|
||||
# Copy to GUI if a valid color.
|
||||
if {($lenny - 1) % 3 || $lenny == 1} {
|
||||
# Not a valid color, which needs 3n+1 characters, n > 0
|
||||
} else {
|
||||
after idle [list SelectColor::_SetWithoutTrace $percentP]
|
||||
}
|
||||
} elseif {[string equal $percentV "focusout"]} {
|
||||
# If the color is valid it will already have been copied to the GUI
|
||||
# and to _userCommand by the "key" validation above.
|
||||
#
|
||||
# The code below only needs to reset the value in the entry widget.
|
||||
# Remove an invalid value, convert a valid one to 24-bit.
|
||||
# Ignore $percentP, just fire the trace on _unsavedSelection.
|
||||
set color $_unsavedSelection
|
||||
after idle [list set ::SelectColor::_unsavedSelection $color]
|
||||
}
|
||||
}
|
||||
|
||||
return $result
|
||||
}
|
||||
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
# Command SelectColor::_SetWithoutTrace
|
||||
# ------------------------------------------------------------------------------
|
||||
# This command sets _unsavedSelection (using _set_rgb) without firing the trace
|
||||
# that copies the value to _entryColor.
|
||||
# The command is called by SelectColor::_ValidateColorEntry to avoid a loop.
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
proc SelectColor::_SetWithoutTrace {value} {
|
||||
trace remove variable ::SelectColor::_unsavedSelection write ::SelectColor::_SetEntryValue
|
||||
_set_rgb $value
|
||||
set _hsv [eval rgbToHsv [winfo rgb . $value]]
|
||||
_set_hue_sat [lindex $_hsv 0] [lindex $_hsv 1]
|
||||
_set_value [lindex $_hsv 2]
|
||||
trace add variable ::SelectColor::_unsavedSelection write ::SelectColor::_SetEntryValue
|
||||
return
|
||||
}
|
955
R_portable/R/App/R-portable/Tcl/bin64/lib/bwidget-1.9.12/combobox.tcl
Executable file
@ -0,0 +1,955 @@
|
||||
# ----------------------------------------------------------------------------
|
||||
# combobox.tcl
|
||||
# This file is part of Unifix BWidget Toolkit
|
||||
# $Id: combobox.tcl,v 1.42.2.3 2012/04/02 09:53:41 oehhar Exp $
|
||||
# ----------------------------------------------------------------------------
|
||||
# Index of commands:
|
||||
# - ComboBox::create
|
||||
# - ComboBox::configure
|
||||
# - ComboBox::cget
|
||||
# - ComboBox::setvalue
|
||||
# - ComboBox::getvalue
|
||||
# - ComboBox::clearvalue
|
||||
# - ComboBox::getentry
|
||||
# - ComboBox::_create_popup
|
||||
# - ComboBox::_mapliste
|
||||
# - ComboBox::_unmapliste
|
||||
# - ComboBox::_select
|
||||
# - ComboBox::_modify_value
|
||||
# ----------------------------------------------------------------------------
|
||||
|
||||
# ComboBox uses the 8.3 -listvariable listbox option
|
||||
package require Tk 8.3
|
||||
|
||||
namespace eval ComboBox {
|
||||
Widget::define ComboBox combobox ArrowButton Entry ListBox
|
||||
|
||||
Widget::tkinclude ComboBox frame :cmd \
|
||||
include {-relief -borderwidth -bd -background} \
|
||||
initialize {-relief sunken -borderwidth 2}
|
||||
|
||||
if {[Widget::theme]} {
|
||||
Widget::bwinclude ComboBox Entry .e
|
||||
} else {
|
||||
Widget::bwinclude ComboBox Entry .e \
|
||||
remove {-relief -bd -borderwidth -bg} \
|
||||
rename {-background -entrybg}
|
||||
}
|
||||
|
||||
Widget::declare ComboBox {
|
||||
{-height TkResource 0 0 listbox}
|
||||
{-values String "" 0}
|
||||
{-images String "" 0}
|
||||
{-indents String "" 0}
|
||||
{-modifycmd String "" 0}
|
||||
{-postcommand String "" 0}
|
||||
{-expand Enum none 0 {none tab}}
|
||||
{-autocomplete Boolean 0 0}
|
||||
{-autopost Boolean 0 0}
|
||||
{-bwlistbox Boolean 0 0}
|
||||
{-listboxwidth Int 0 0}
|
||||
{-hottrack Boolean 0 0}
|
||||
}
|
||||
|
||||
if {[Widget::theme]} {
|
||||
Widget::addmap ComboBox ArrowButton .a {
|
||||
-background {} -state {}
|
||||
}
|
||||
} else {
|
||||
Widget::addmap ComboBox ArrowButton .a {
|
||||
-background {} -foreground {} -disabledforeground {} -state {}
|
||||
}
|
||||
}
|
||||
|
||||
::bind BwComboBox <FocusIn> [list after idle {BWidget::refocus %W %W.e}]
|
||||
::bind BwComboBox <Destroy> [list ComboBox::_destroy %W]
|
||||
|
||||
::bind ListBoxHotTrack <Motion> {
|
||||
%W selection clear 0 end
|
||||
%W activate @%x,%y
|
||||
%W selection set @%x,%y
|
||||
}
|
||||
|
||||
variable _index
|
||||
}
|
||||
|
||||
|
||||
# ComboBox::create --
|
||||
#
|
||||
# Create a combobox widget with the given options.
|
||||
#
|
||||
# Arguments:
|
||||
# path name of the new widget.
|
||||
# args optional arguments to the widget.
|
||||
#
|
||||
# Results:
|
||||
# path name of the new widget.
|
||||
|
||||
proc ComboBox::create { path args } {
|
||||
array set maps [list ComboBox {} :cmd {} .e {} .a {}]
|
||||
array set maps [Widget::parseArgs ComboBox $args]
|
||||
|
||||
eval [list frame $path] $maps(:cmd) \
|
||||
[list -highlightthickness 0 -takefocus 0 -class ComboBox]
|
||||
Widget::initFromODB ComboBox $path $maps(ComboBox)
|
||||
|
||||
bindtags $path [list $path BwComboBox [winfo toplevel $path] all]
|
||||
|
||||
if {[Widget::theme]} {
|
||||
set entry [eval [list Entry::create $path.e] $maps(.e) \
|
||||
[list -takefocus 1]]
|
||||
} else {
|
||||
set entry [eval [list Entry::create $path.e] $maps(.e) \
|
||||
[list -relief flat -borderwidth 0 -takefocus 1]]
|
||||
}
|
||||
|
||||
::bind $path.e <FocusOut> [list $path _focus_out]
|
||||
::bind $path <<TraverseIn>> [list $path _traverse_in]
|
||||
|
||||
if {[Widget::cget $path -autocomplete]} {
|
||||
::bind $path.e <KeyRelease> [list $path _auto_complete %K]
|
||||
}
|
||||
|
||||
if {[Widget::cget $path -autopost]} {
|
||||
::bind $path.e <KeyRelease> +[list $path _auto_post %K]
|
||||
} else {
|
||||
::bind $entry <Key-Up> [list ComboBox::_unmapliste $path]
|
||||
::bind $entry <Key-Down> [list ComboBox::_mapliste $path]
|
||||
}
|
||||
|
||||
if {[string equal [tk windowingsystem] "x11"]} {
|
||||
set ipadx 0
|
||||
set width 11
|
||||
} else {
|
||||
set ipadx 2
|
||||
set width 15
|
||||
}
|
||||
set height [winfo reqheight $entry]
|
||||
set arrow [eval [list ArrowButton::create $path.a] $maps(.a) \
|
||||
[list -width $width -height $height \
|
||||
-highlightthickness 0 -borderwidth 1 -takefocus 0 \
|
||||
-dir bottom -type button -ipadx $ipadx \
|
||||
-command [list ComboBox::_mapliste $path] \
|
||||
]]
|
||||
|
||||
pack $arrow -side right -fill y
|
||||
pack $entry -side left -fill both -expand yes
|
||||
|
||||
set editable [Widget::cget $path -editable]
|
||||
Entry::configure $path.e -editable $editable
|
||||
if {$editable} {
|
||||
::bind $entry <ButtonPress-1> [list ComboBox::_unmapliste $path]
|
||||
} else {
|
||||
::bind $entry <ButtonPress-1> [list ArrowButton::invoke $path.a]
|
||||
if { ![string equal [Widget::cget $path -state] "disabled"] } {
|
||||
Entry::configure $path.e -takefocus 1
|
||||
}
|
||||
}
|
||||
|
||||
::bind $path <ButtonPress-1> [list ComboBox::_unmapliste $path]
|
||||
::bind $entry <Control-Up> [list ComboBox::_modify_value $path previous]
|
||||
::bind $entry <Control-Down> [list ComboBox::_modify_value $path next]
|
||||
::bind $entry <Control-Prior> [list ComboBox::_modify_value $path first]
|
||||
::bind $entry <Control-Next> [list ComboBox::_modify_value $path last]
|
||||
|
||||
if {$editable} {
|
||||
set expand [Widget::cget $path -expand]
|
||||
if {[string equal "tab" $expand]} {
|
||||
# Expand entry value on Tab (from -values)
|
||||
::bind $entry <Tab> "[list ComboBox::_expand $path]; break"
|
||||
} elseif {[string equal "auto" $expand]} {
|
||||
# Expand entry value anytime (from -values)
|
||||
#::bind $entry <Key> "[list ComboBox::_expand $path]; break"
|
||||
}
|
||||
}
|
||||
|
||||
## If we have images, we have to use a BWidget ListBox.
|
||||
set bw [Widget::cget $path -bwlistbox]
|
||||
if {[llength [Widget::cget $path -images]]} {
|
||||
Widget::configure $path [list -bwlistbox 1]
|
||||
} else {
|
||||
Widget::configure $path [list -bwlistbox $bw]
|
||||
}
|
||||
|
||||
set ComboBox::_index($path) -1
|
||||
|
||||
return [Widget::create ComboBox $path]
|
||||
}
|
||||
|
||||
|
||||
# ComboBox::configure --
|
||||
#
|
||||
# Configure subcommand for ComboBox widgets. Works like regular
|
||||
# widget configure command.
|
||||
#
|
||||
# Arguments:
|
||||
# path Name of the ComboBox widget.
|
||||
# args Additional optional arguments:
|
||||
# ?-option?
|
||||
# ?-option value ...?
|
||||
#
|
||||
# Results:
|
||||
# Depends on arguments. If no arguments are given, returns a complete
|
||||
# list of configuration information. If one argument is given, returns
|
||||
# the configuration information for that option. If more than one
|
||||
# argument is given, returns nothing.
|
||||
|
||||
proc ComboBox::configure { path args } {
|
||||
set res [Widget::configure $path $args]
|
||||
set entry $path.e
|
||||
|
||||
|
||||
set list [list -images -values -bwlistbox -hottrack -autocomplete -autopost]
|
||||
foreach {ci cv cb ch cac cap} [eval [linsert $list 0 Widget::hasChangedX $path]] { break }
|
||||
|
||||
if { $ci } {
|
||||
set images [Widget::cget $path -images]
|
||||
if {[llength $images]} {
|
||||
Widget::configure $path [list -bwlistbox 1]
|
||||
} else {
|
||||
Widget::configure $path [list -bwlistbox 0]
|
||||
}
|
||||
}
|
||||
|
||||
## If autocomplete toggled, turn bindings on/off
|
||||
if { $cac } {
|
||||
if {[Widget::cget $path -autocomplete]} {
|
||||
::bind $entry <KeyRelease> +[list $path _auto_complete %K]
|
||||
} else {
|
||||
set bindings [split [::bind $entry <KeyRelease>] \n]
|
||||
if {[set idx [lsearch $bindings [list $path _auto_complete %K]]] != -1} {
|
||||
::bind $entry <KeyRelease> [join [lreplace $bindings $idx $idx] \n]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
## If autopost toggled, turn bindings on/off
|
||||
if { $cap } {
|
||||
if {[Widget::cget $path -autopost]} {
|
||||
::bind $entry <KeyRelease> +[list $path _auto_post %K]
|
||||
set bindings [split [::bind $entry <Key-Up>] \n]
|
||||
if {[set idx [lsearch $bindings [list ComboBox::_unmapliste $path]]] != -1} {
|
||||
::bind $entry <Key-Up> [join [lreplace $bindings $idx $idx] \n]
|
||||
}
|
||||
set bindings [split [::bind $entry <Key-Down>] \n]
|
||||
if {[set idx [lsearch $bindings [list ComboBox::_mapliste $path]]] != -1} {
|
||||
::bind $entry <Key-Down> [join [lreplace $bindings $idx $idx] \n]
|
||||
}
|
||||
} else {
|
||||
set bindings [split [::bind $entry <KeyRelease>] \n]
|
||||
if {[set idx [lsearch $bindings [list $path _auto_post %K]]] != -1} {
|
||||
::bind $entry <KeyRelease> [join [lreplace $bindings $idx $idx] \n]
|
||||
}
|
||||
::bind $entry <Key-Up> +[list ComboBox::_unmapliste $path]
|
||||
::bind $entry <Key-Down> +[list ComboBox::_mapliste $path]
|
||||
}
|
||||
}
|
||||
|
||||
set bw [Widget::cget $path -bwlistbox]
|
||||
|
||||
## If the images, bwlistbox, hottrack or values have changed,
|
||||
## destroy the shell so that it will re-create itself the next
|
||||
## time around.
|
||||
if { $ci || $cb || $ch || ($bw && $cv) } {
|
||||
destroy $path.shell
|
||||
}
|
||||
|
||||
set chgedit [Widget::hasChangedX $path -editable]
|
||||
if {$chgedit} {
|
||||
if {[Widget::cget $path -editable]} {
|
||||
::bind $entry <ButtonPress-1> [list ComboBox::_unmapliste $path]
|
||||
Entry::configure $entry -editable true
|
||||
} else {
|
||||
::bind $entry <ButtonPress-1> [list ArrowButton::invoke $path.a]
|
||||
Entry::configure $entry -editable false
|
||||
|
||||
# Make sure that non-editable comboboxes can still be tabbed to.
|
||||
|
||||
if { ![string equal [Widget::cget $path -state] "disabled"] } {
|
||||
Entry::configure $entry -takefocus 1
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if {$chgedit || [Widget::hasChangedX $path -expand]} {
|
||||
# Unset what we may have created.
|
||||
::bind $entry <Tab> {}
|
||||
if {[Widget::cget $path -editable]} {
|
||||
set expand [Widget::cget $path -expand]
|
||||
if {[string equal "tab" $expand]} {
|
||||
# Expand entry value on Tab (from -values)
|
||||
::bind $entry <Tab> "[list ComboBox::_expand $path]; break"
|
||||
} elseif {[string equal "auto" $expand]} {
|
||||
# Expand entry value anytime (from -values)
|
||||
#::bind $entry <Key> "[list ComboBox::_expand $path]; break"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
# if state changed to normal and -editable false, the edit must take focus
|
||||
if { [Widget::hasChangedX $path -state] \
|
||||
&& ![string equal [Widget::cget $path -state] "disabled"] \
|
||||
&& ![Widget::cget $path -editable] } {
|
||||
Entry::configure $entry -takefocus 1
|
||||
}
|
||||
|
||||
# if the dropdown listbox is shown, simply force the actual entry
|
||||
# colors into it. If it is not shown, the next time the dropdown
|
||||
# is shown it'll get the actual colors anyway
|
||||
if {[winfo exists $path.shell.listb]} {
|
||||
$path.shell.listb configure \
|
||||
-bg [_getbg $path] \
|
||||
-fg [_getfg $path]
|
||||
if {![Widget::theme]} {
|
||||
$path.shell.listb configure \
|
||||
-selectbackground [Widget::cget $path -selectbackground] \
|
||||
-selectforeground [Widget::cget $path -selectforeground]
|
||||
}
|
||||
}
|
||||
|
||||
return $res
|
||||
}
|
||||
|
||||
|
||||
# ----------------------------------------------------------------------------
|
||||
# Command ComboBox::cget
|
||||
# ----------------------------------------------------------------------------
|
||||
proc ComboBox::cget { path option } {
|
||||
return [Widget::cget $path $option]
|
||||
}
|
||||
|
||||
|
||||
# ----------------------------------------------------------------------------
|
||||
# Command ComboBox::setvalue
|
||||
# ----------------------------------------------------------------------------
|
||||
proc ComboBox::setvalue { path index } {
|
||||
variable _index
|
||||
|
||||
set values [Widget::getMegawidgetOption $path -values]
|
||||
set value [Entry::cget $path.e -text]
|
||||
switch -- $index {
|
||||
next {
|
||||
if { [set idx [lsearch -exact $values $value]] != -1 } {
|
||||
incr idx
|
||||
} else {
|
||||
set idx [lsearch -exact $values "$value*"]
|
||||
}
|
||||
}
|
||||
previous {
|
||||
if { [set idx [lsearch -exact $values $value]] != -1 } {
|
||||
incr idx -1
|
||||
} else {
|
||||
set idx [lsearch -exact $values "$value*"]
|
||||
}
|
||||
}
|
||||
first {
|
||||
set idx 0
|
||||
}
|
||||
last {
|
||||
set idx [expr {[llength $values]-1}]
|
||||
}
|
||||
default {
|
||||
if { [string index $index 0] == "@" } {
|
||||
set idx [string range $index 1 end]
|
||||
if { ![string is integer -strict $idx] } {
|
||||
return -code error "bad index \"$index\""
|
||||
}
|
||||
} else {
|
||||
return -code error "bad index \"$index\""
|
||||
}
|
||||
}
|
||||
}
|
||||
if { $idx >= 0 && $idx < [llength $values] } {
|
||||
set newval [lindex $values $idx]
|
||||
set _index($path) $idx
|
||||
Entry::configure $path.e -text $newval
|
||||
return 1
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
|
||||
proc ComboBox::icursor { path idx } {
|
||||
return [$path.e icursor $idx]
|
||||
}
|
||||
|
||||
|
||||
proc ComboBox::get { path } {
|
||||
return [$path.e get]
|
||||
}
|
||||
|
||||
|
||||
# ----------------------------------------------------------------------------
|
||||
# Command ComboBox::getvalue
|
||||
# ----------------------------------------------------------------------------
|
||||
proc ComboBox::getvalue { path } {
|
||||
variable _index
|
||||
set values [Widget::getMegawidgetOption $path -values]
|
||||
set value [Entry::cget $path.e -text]
|
||||
# Check if an index was saved by the last setvalue operation
|
||||
# If this index still matches it is returned
|
||||
# This is necessary for the case when values is not unique
|
||||
if { $_index($path) >= 0 \
|
||||
&& $_index($path) < [llength $values] \
|
||||
&& $value eq [lindex $values $_index($path)]} {
|
||||
return $_index($path)
|
||||
}
|
||||
|
||||
return [lsearch -exact $values $value]
|
||||
}
|
||||
|
||||
|
||||
proc ComboBox::getlistbox { path } {
|
||||
_create_popup $path
|
||||
return $path.shell.listb
|
||||
}
|
||||
|
||||
|
||||
# ----------------------------------------------------------------------------
|
||||
# Command ComboBox::post
|
||||
# ----------------------------------------------------------------------------
|
||||
proc ComboBox::post { path } {
|
||||
_mapliste $path
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
proc ComboBox::unpost { path } {
|
||||
_unmapliste $path
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
# ----------------------------------------------------------------------------
|
||||
# Command ComboBox::bind
|
||||
# ----------------------------------------------------------------------------
|
||||
proc ComboBox::bind { path args } {
|
||||
return [eval [list ::bind $path.e] $args]
|
||||
}
|
||||
|
||||
|
||||
proc ComboBox::insert { path idx args } {
|
||||
upvar #0 [Widget::varForOption $path -values] values
|
||||
|
||||
if {[Widget::cget $path -bwlistbox]} {
|
||||
set l [$path getlistbox]
|
||||
set i [eval [linsert $args 0 $l insert $idx #auto]]
|
||||
set text [$l itemcget $i -text]
|
||||
if {$idx == "end"} {
|
||||
lappend values $text
|
||||
} else {
|
||||
set values [linsert $values $idx $text]
|
||||
}
|
||||
} else {
|
||||
set values [eval [list linsert $values $idx] $args]
|
||||
}
|
||||
}
|
||||
|
||||
# ----------------------------------------------------------------------------
|
||||
# Command ComboBox::clearvalue
|
||||
# ----------------------------------------------------------------------------
|
||||
proc ComboBox::clearvalue { path } {
|
||||
Entry::configure $path.e -text ""
|
||||
}
|
||||
|
||||
# ----------------------------------------------------------------------------
|
||||
# Command ComboBox::getentry
|
||||
# ----------------------------------------------------------------------------
|
||||
proc ComboBox::getentry { path } {
|
||||
return $path.e
|
||||
}
|
||||
|
||||
proc ComboBox::_getfg {path} {
|
||||
# First try to retrieve option
|
||||
set fg [Widget::cget $path -foreground];
|
||||
if { 0 == [string length $fg] && [Widget::theme] } {
|
||||
# fall back to style settings when not configured for widget
|
||||
return [::ttk::style lookup TEntry -foreground];
|
||||
}
|
||||
return $fg;
|
||||
}
|
||||
proc ComboBox::_getbg {path} {
|
||||
if {[Widget::theme]} {
|
||||
# First try to retrieve option
|
||||
set bg [Widget::cget $path -background];
|
||||
if {0 == [string length $bg]} {
|
||||
# fall back to style settings when not configured for widget
|
||||
return [::ttk::style lookup TEntry -backround];
|
||||
}
|
||||
} else {
|
||||
# fetch the entrybg resource value
|
||||
set bg [Widget::cget $path -entrybg]
|
||||
}
|
||||
return $bg;
|
||||
}
|
||||
# ----------------------------------------------------------------------------
|
||||
# Command ComboBox::_create_popup
|
||||
# ----------------------------------------------------------------------------
|
||||
proc ComboBox::_create_popup { path } {
|
||||
set shell $path.shell
|
||||
|
||||
if {[winfo exists $shell]} { return }
|
||||
|
||||
set lval [Widget::cget $path -values]
|
||||
set h [Widget::cget $path -height]
|
||||
set bw [Widget::cget $path -bwlistbox]
|
||||
|
||||
if { $h <= 0 } {
|
||||
set len [llength $lval]
|
||||
if { $len < 3 } {
|
||||
set h 3
|
||||
} elseif { $len > 10 } {
|
||||
set h 10
|
||||
} else {
|
||||
set h $len
|
||||
}
|
||||
}
|
||||
|
||||
if {[string equal [tk windowingsystem] "x11"]} {
|
||||
set sbwidth 11
|
||||
} else {
|
||||
set sbwidth 15
|
||||
}
|
||||
|
||||
toplevel $shell -relief solid -bd 1
|
||||
wm withdraw $shell
|
||||
wm overrideredirect $shell 1
|
||||
# these commands cause the combobox to behave strangely on OS X
|
||||
if {! $Widget::_aqua } {
|
||||
update idle
|
||||
wm transient $shell [winfo toplevel $path]
|
||||
catch { wm attributes $shell -topmost 1 }
|
||||
}
|
||||
|
||||
set sw [ScrolledWindow $shell.sw -managed 1 -size $sbwidth -ipad 0]
|
||||
|
||||
if {$bw} {
|
||||
if {[Widget::theme]} {
|
||||
set listb [ListBox $shell.listb \
|
||||
-relief flat -borderwidth 0 -highlightthickness 0 \
|
||||
-selectmode single -selectfill 1 -autofocus 0 -height $h \
|
||||
-font [Widget::cget $path -font] \
|
||||
-bg [_getbg $path] \
|
||||
-fg [_getfg $path]]
|
||||
} else {
|
||||
set listb [ListBox $shell.listb \
|
||||
-relief flat -borderwidth 0 -highlightthickness 0 \
|
||||
-selectmode single -selectfill 1 -autofocus 0 -height $h \
|
||||
-font [Widget::cget $path -font] \
|
||||
-bg [_getbg $path] \
|
||||
-fg [_getfg $path] \
|
||||
-selectbackground [Widget::cget $path -selectbackground] \
|
||||
-selectforeground [Widget::cget $path -selectforeground]]
|
||||
}
|
||||
|
||||
set values [Widget::cget $path -values]
|
||||
set images [Widget::cget $path -images]
|
||||
foreach value $values image $images {
|
||||
$listb insert end #auto -text $value -image $image
|
||||
}
|
||||
$listb bindText <1> [list ComboBox::_select $path]
|
||||
$listb bindImage <1> [list ComboBox::_select $path]
|
||||
if {[Widget::cget $path -hottrack]} {
|
||||
$listb bindText <Enter> [list $listb selection set]
|
||||
$listb bindImage <Enter> [list $listb selection set]
|
||||
}
|
||||
} else {
|
||||
if {[Widget::theme]} {
|
||||
set listb [listbox $shell.listb \
|
||||
-relief flat -borderwidth 0 -highlightthickness 0 \
|
||||
-exportselection false \
|
||||
-font [Widget::cget $path -font] \
|
||||
-height $h \
|
||||
-bg [_getbg $path] \
|
||||
-fg [_getfg $path] \
|
||||
-listvariable [Widget::varForOption $path -values]]
|
||||
} else {
|
||||
set listb [listbox $shell.listb \
|
||||
-relief flat -borderwidth 0 -highlightthickness 0 \
|
||||
-exportselection false \
|
||||
-font [Widget::cget $path -font] \
|
||||
-height $h \
|
||||
-bg [_getbg $path] \
|
||||
-fg [_getfg $path] \
|
||||
-selectbackground [Widget::cget $path -selectbackground] \
|
||||
-selectforeground [Widget::cget $path -selectforeground] \
|
||||
-listvariable [Widget::varForOption $path -values]]
|
||||
}
|
||||
::bind $listb <ButtonRelease-1> [list ComboBox::_select $path @%x,%y]
|
||||
|
||||
if {[Widget::cget $path -hottrack]} {
|
||||
bindtags $listb [concat [bindtags $listb] ListBoxHotTrack]
|
||||
}
|
||||
}
|
||||
pack $sw -fill both -expand yes
|
||||
$sw setwidget $listb
|
||||
|
||||
::bind $listb <Return> "ComboBox::_select [list $path] \[$listb curselection\]"
|
||||
::bind $listb <Escape> [list ComboBox::_unmapliste $path]
|
||||
::bind $listb <FocusOut> [list ComboBox::_focus_out $path]
|
||||
}
|
||||
|
||||
|
||||
proc ComboBox::_recreate_popup { path } {
|
||||
variable background
|
||||
variable foreground
|
||||
|
||||
set shell $path.shell
|
||||
set lval [Widget::cget $path -values]
|
||||
set h [Widget::cget $path -height]
|
||||
set bw [Widget::cget $path -bwlistbox]
|
||||
|
||||
if { $h <= 0 } {
|
||||
set len [llength $lval]
|
||||
if { $len < 3 } {
|
||||
set h 3
|
||||
} elseif { $len > 10 } {
|
||||
set h 10
|
||||
} else {
|
||||
set h $len
|
||||
}
|
||||
}
|
||||
|
||||
if { [string equal [tk windowingsystem] "x11"] } {
|
||||
set sbwidth 11
|
||||
} else {
|
||||
set sbwidth 15
|
||||
}
|
||||
|
||||
_create_popup $path
|
||||
|
||||
if {![Widget::cget $path -editable]} {
|
||||
if {[info exists background]} {
|
||||
$path.e configure -bg $background
|
||||
$path.e configure -fg $foreground
|
||||
unset background
|
||||
unset foreground
|
||||
}
|
||||
}
|
||||
|
||||
set listb $shell.listb
|
||||
destroy $shell.sw
|
||||
set sw [ScrolledWindow $shell.sw -managed 1 -size $sbwidth -ipad 0]
|
||||
$listb configure \
|
||||
-height $h \
|
||||
-font [Widget::cget $path -font] \
|
||||
-bg [_getbg $path] \
|
||||
-fg [_getfg $path]
|
||||
if {![Widget::theme]} {
|
||||
$listb configure \
|
||||
-selectbackground [Widget::cget $path -selectbackground] \
|
||||
-selectforeground [Widget::cget $path -selectforeground]
|
||||
}
|
||||
pack $sw -fill both -expand yes
|
||||
$sw setwidget $listb
|
||||
raise $listb
|
||||
}
|
||||
|
||||
|
||||
# ----------------------------------------------------------------------------
|
||||
# Command ComboBox::_mapliste
|
||||
# ----------------------------------------------------------------------------
|
||||
proc ComboBox::_mapliste { path } {
|
||||
set listb $path.shell.listb
|
||||
if {[winfo exists $path.shell] &&
|
||||
[string equal [wm state $path.shell] "normal"]} {
|
||||
_unmapliste $path
|
||||
return
|
||||
}
|
||||
|
||||
if { [Widget::cget $path -state] == "disabled" } {
|
||||
return
|
||||
}
|
||||
if {[llength [set cmd [Widget::getMegawidgetOption $path -postcommand]]]} {
|
||||
uplevel \#0 $cmd
|
||||
}
|
||||
if { ![llength [Widget::getMegawidgetOption $path -values]] } {
|
||||
return
|
||||
}
|
||||
|
||||
_recreate_popup $path
|
||||
|
||||
ArrowButton::configure $path.a -relief sunken
|
||||
update
|
||||
|
||||
set bw [Widget::cget $path -bwlistbox]
|
||||
|
||||
$listb selection clear 0 end
|
||||
set values [Widget::getMegawidgetOption $path -values]
|
||||
set curval [Entry::cget $path.e -text]
|
||||
if { [set idx [lsearch -exact $values $curval]] != -1 ||
|
||||
[set idx [lsearch -exact $values "$curval*"]] != -1 } {
|
||||
if {$bw} {
|
||||
set idx [$listb items $idx]
|
||||
} else {
|
||||
$listb activate $idx
|
||||
}
|
||||
$listb selection set $idx
|
||||
$listb see $idx
|
||||
} else {
|
||||
set idx 0
|
||||
if {$bw} {
|
||||
set idx [$listb items 0]
|
||||
} else {
|
||||
$listb activate $idx
|
||||
}
|
||||
$listb selection set $idx
|
||||
$listb see $idx
|
||||
}
|
||||
|
||||
set width [Widget::cget $path -listboxwidth]
|
||||
if {!$width} { set width [winfo width $path] }
|
||||
BWidget::place $path.shell $width 0 below $path
|
||||
wm deiconify $path.shell
|
||||
raise $path.shell
|
||||
BWidget::focus set $listb
|
||||
if {! $Widget::_aqua } {
|
||||
BWidget::grab global $path
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
# ----------------------------------------------------------------------------
|
||||
# Command ComboBox::_unmapliste
|
||||
# ----------------------------------------------------------------------------
|
||||
proc ComboBox::_unmapliste { path {refocus 1} } {
|
||||
# On aqua, state is zoomed, otherwise normal
|
||||
if {[winfo exists $path.shell] && \
|
||||
( [string equal [wm state $path.shell] "normal"] ||
|
||||
[string equal [wm state $path.shell] "zoomed"] ) } {
|
||||
if {! $Widget::_aqua } {
|
||||
BWidget::grab release $path
|
||||
BWidget::focus release $path.shell.listb $refocus
|
||||
# Update now because otherwise [focus -force...] makes the app hang!
|
||||
if {$refocus} {
|
||||
update
|
||||
focus -force $path.e
|
||||
}
|
||||
}
|
||||
wm withdraw $path.shell
|
||||
ArrowButton::configure $path.a -relief raised
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
# ----------------------------------------------------------------------------
|
||||
# Command ComboBox::_select
|
||||
# ----------------------------------------------------------------------------
|
||||
proc ComboBox::_select { path index } {
|
||||
set index [$path.shell.listb index $index]
|
||||
_unmapliste $path
|
||||
if { $index != -1 } {
|
||||
if { [setvalue $path @$index] } {
|
||||
set cmd [Widget::getMegawidgetOption $path -modifycmd]
|
||||
if {[llength $cmd]} {
|
||||
uplevel \#0 $cmd
|
||||
}
|
||||
}
|
||||
}
|
||||
$path.e selection clear
|
||||
if {[$path.e cget -exportselection]} {
|
||||
$path.e selection range 0 end
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
# ----------------------------------------------------------------------------
|
||||
# Command ComboBox::_modify_value
|
||||
# ----------------------------------------------------------------------------
|
||||
proc ComboBox::_modify_value { path direction } {
|
||||
if {[setvalue $path $direction]
|
||||
&& [llength [set cmd [Widget::getMegawidgetOption $path -modifycmd]]]} {
|
||||
uplevel \#0 $cmd
|
||||
}
|
||||
}
|
||||
|
||||
# ----------------------------------------------------------------------------
|
||||
# Command ComboBox::_expand
|
||||
# ----------------------------------------------------------------------------
|
||||
proc ComboBox::_expand {path} {
|
||||
set values [Widget::getMegawidgetOption $path -values]
|
||||
if {![llength $values]} {
|
||||
bell
|
||||
return 0
|
||||
}
|
||||
|
||||
set found {}
|
||||
set curval [Entry::cget $path.e -text]
|
||||
set curlen [$path.e index insert]
|
||||
if {$curlen < [string length $curval]} {
|
||||
# we are somewhere in the middle of a string.
|
||||
# if the full value matches some string in the listbox,
|
||||
# reorder values to start matching after that string.
|
||||
set idx [lsearch -exact $values $curval]
|
||||
if {$idx >= 0} {
|
||||
set values [concat [lrange $values [expr {$idx+1}] end] \
|
||||
[lrange $values 0 $idx]]
|
||||
}
|
||||
}
|
||||
if {$curlen == 0} {
|
||||
set found $values
|
||||
} else {
|
||||
foreach val $values {
|
||||
if {[string equal -length $curlen $curval $val]} {
|
||||
lappend found $val
|
||||
}
|
||||
}
|
||||
}
|
||||
if {[llength $found]} {
|
||||
Entry::configure $path.e -text [lindex $found 0]
|
||||
if {[llength $found] > 1} {
|
||||
set best [_best_match $found [string range $curval 0 $curlen]]
|
||||
set blen [string length $best]
|
||||
$path.e icursor $blen
|
||||
$path.e selection range $blen end
|
||||
}
|
||||
} else {
|
||||
bell
|
||||
}
|
||||
return [llength $found]
|
||||
}
|
||||
|
||||
# best_match --
|
||||
# finds the best unique match in a list of names
|
||||
# The extra $e in this argument allows us to limit the innermost loop a
|
||||
# little further.
|
||||
# Arguments:
|
||||
# l list to find best unique match in
|
||||
# e currently best known unique match
|
||||
# Returns:
|
||||
# longest unique match in the list
|
||||
#
|
||||
proc ComboBox::_best_match {l {e {}}} {
|
||||
set ec [lindex $l 0]
|
||||
if {[llength $l]>1} {
|
||||
set e [string length $e]; incr e -1
|
||||
set ei [string length $ec]; incr ei -1
|
||||
foreach l $l {
|
||||
while {$ei>=$e && [string first $ec $l]} {
|
||||
set ec [string range $ec 0 [incr ei -1]]
|
||||
}
|
||||
}
|
||||
}
|
||||
return $ec
|
||||
}
|
||||
# possibly faster
|
||||
#proc match {string1 string2} {
|
||||
# set i 1
|
||||
# while {[string equal -length $i $string1 $string2]} { incr i }
|
||||
# return [string range $string1 0 [expr {$i-2}]]
|
||||
#}
|
||||
#proc matchlist {list} {
|
||||
# set list [lsort $list]
|
||||
# return [match [lindex $list 0] [lindex $list end]]
|
||||
#}
|
||||
|
||||
|
||||
# ----------------------------------------------------------------------------
|
||||
# Command ComboBox::_traverse_in
|
||||
# Called when widget receives keyboard focus due to keyboard traversal.
|
||||
# ----------------------------------------------------------------------------
|
||||
proc ComboBox::_traverse_in { path } {
|
||||
if {[$path.e selection present] != 1} {
|
||||
# Autohighlight the selection, but not if one existed
|
||||
$path.e selection range 0 end
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
# ----------------------------------------------------------------------------
|
||||
# Command ComboBox::_focus_out
|
||||
# ----------------------------------------------------------------------------
|
||||
proc ComboBox::_focus_out { path } {
|
||||
if {[string first $path [focus]] != 0} {
|
||||
# we lost focus to some other app or window, so remove the listbox
|
||||
return [_unmapliste $path 0]
|
||||
}
|
||||
}
|
||||
|
||||
proc ComboBox::_auto_complete { path key } {
|
||||
## Any key string with more than one character and is not entirely
|
||||
## lower-case is considered a function key and is thus ignored.
|
||||
if {[string length $key] > 1 && [string tolower $key] != $key} { return }
|
||||
|
||||
set text [string map [list {[} {\[} {]} {\]}] [$path.e get]]
|
||||
if {[string equal $text ""]} { return }
|
||||
set values [Widget::cget $path -values]
|
||||
set x [lsearch $values $text*]
|
||||
if {$x < 0} { return }
|
||||
|
||||
set idx [$path.e index insert]
|
||||
$path.e configure -text [lindex $values $x]
|
||||
$path.e icursor $idx
|
||||
$path.e select range insert end
|
||||
}
|
||||
|
||||
proc ComboBox::_auto_post { path key } {
|
||||
if {[string equal $key "Escape"] || [string equal $key "Return"]} {
|
||||
_unmapliste $path
|
||||
return
|
||||
}
|
||||
if {[catch {$path.shell.listb curselection} x] || $x == ""} {
|
||||
if {[string equal $key "Up"]} {
|
||||
_unmapliste $path
|
||||
return
|
||||
}
|
||||
set x -1
|
||||
}
|
||||
if {([string length $key] > 1 && [string tolower $key] != $key) && \
|
||||
[string equal $key "BackSpace"] != 0 && \
|
||||
[string equal $key "Up"] != 0 && \
|
||||
[string equal $key "Down"] != 0} {
|
||||
return
|
||||
}
|
||||
|
||||
# post the listbox
|
||||
_create_popup $path
|
||||
set width [Widget::cget $path -listboxwidth]
|
||||
if {!$width} { set width [winfo width $path] }
|
||||
BWidget::place $path.shell $width 0 below $path
|
||||
wm deiconify $path.shell
|
||||
BWidget::grab release $path
|
||||
BWidget::focus release $path.shell.listb 1
|
||||
focus -force $path.e
|
||||
|
||||
set values [Widget::cget $path -values]
|
||||
switch -- $key {
|
||||
Up {
|
||||
if {[incr x -1] < 0} {
|
||||
set x 0
|
||||
} else {
|
||||
Entry::configure $path.e -text [lindex $values $x]
|
||||
}
|
||||
}
|
||||
Down {
|
||||
if {[incr x] >= [llength $values]} {
|
||||
set x [expr {[llength $values] - 1}]
|
||||
} else {
|
||||
Entry::configure $path.e -text [lindex $values $x]
|
||||
}
|
||||
}
|
||||
default {
|
||||
# auto-select within the listbox the item closest to the entry's value
|
||||
set text [string map [list {[} {\[} {]} {\]}] [$path.e get]]
|
||||
if {[string equal $text ""]} {
|
||||
set x 0
|
||||
} else {
|
||||
set x [lsearch $values $text*]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if {$x >= 0} {
|
||||
$path.shell.listb selection clear 0 end
|
||||
$path.shell.listb selection set $x
|
||||
$path.shell.listb see $x
|
||||
}
|
||||
}
|
||||
# ------------------------------------------------------------------------------
|
||||
# Command ComboBox::_destroy
|
||||
# ------------------------------------------------------------------------------
|
||||
proc ComboBox::_destroy { path } {
|
||||
variable _index
|
||||
Widget::destroy $path
|
||||
unset _index($path)
|
||||
}
|
357
R_portable/R/App/R-portable/Tcl/bin64/lib/bwidget-1.9.12/dialog.tcl
Executable file
@ -0,0 +1,357 @@
|
||||
# ----------------------------------------------------------------------------
|
||||
# dialog.tcl
|
||||
# This file is part of Unifix BWidget Toolkit
|
||||
# $Id: dialog.tcl,v 1.15.2.1 2010/08/04 13:07:59 oehhar Exp $
|
||||
# ----------------------------------------------------------------------------
|
||||
# Index of commands:
|
||||
# - Dialog::create
|
||||
# - Dialog::configure
|
||||
# - Dialog::cget
|
||||
# - Dialog::getframe
|
||||
# - Dialog::add
|
||||
# - Dialog::itemconfigure
|
||||
# - Dialog::itemcget
|
||||
# - Dialog::invoke
|
||||
# - Dialog::setfocus
|
||||
# - Dialog::enddialog
|
||||
# - Dialog::draw
|
||||
# - Dialog::withdraw
|
||||
# - Dialog::_destroy
|
||||
# ----------------------------------------------------------------------------
|
||||
|
||||
# JDC: added -transient and -place flag
|
||||
|
||||
namespace eval Dialog {
|
||||
Widget::define Dialog dialog ButtonBox
|
||||
|
||||
Widget::bwinclude Dialog ButtonBox .bbox \
|
||||
remove {-orient} \
|
||||
initialize {-spacing 10 -padx 10}
|
||||
|
||||
Widget::declare Dialog {
|
||||
{-title String "" 0}
|
||||
{-geometry String "" 0}
|
||||
{-modal Enum local 0 {none local global}}
|
||||
{-bitmap TkResource "" 1 label}
|
||||
{-image TkResource "" 1 label}
|
||||
{-separator Boolean 0 1}
|
||||
{-cancel Int -1 0 "%d >= -1"}
|
||||
{-parent String "" 0}
|
||||
{-side Enum bottom 1 {bottom left top right}}
|
||||
{-anchor Enum c 1 {n e w s c}}
|
||||
{-class String Dialog 1}
|
||||
{-transient Boolean 1 1}
|
||||
{-place Enum center 0 {none center left right above below}}
|
||||
}
|
||||
|
||||
Widget::addmap Dialog "" :cmd {-background {}}
|
||||
Widget::addmap Dialog "" .frame {-background {}}
|
||||
|
||||
bind BwDialog <Destroy> [list Dialog::_destroy %W]
|
||||
|
||||
variable _widget
|
||||
}
|
||||
|
||||
|
||||
# ----------------------------------------------------------------------------
|
||||
# Command Dialog::create
|
||||
# ----------------------------------------------------------------------------
|
||||
proc Dialog::create { path args } {
|
||||
global tcl_platform
|
||||
variable _widget
|
||||
|
||||
array set maps [list Dialog {} .bbox {}]
|
||||
array set maps [Widget::parseArgs Dialog $args]
|
||||
|
||||
# Check to see if the -class flag was specified
|
||||
set dialogClass "Dialog"
|
||||
array set dialogArgs $maps(Dialog)
|
||||
if { [info exists dialogArgs(-class)] } {
|
||||
set dialogClass $dialogArgs(-class)
|
||||
}
|
||||
|
||||
if { [string equal $tcl_platform(platform) "unix"] } {
|
||||
set re raised
|
||||
set bd 1
|
||||
} else {
|
||||
set re flat
|
||||
set bd 0
|
||||
}
|
||||
toplevel $path -relief $re -borderwidth $bd -class $dialogClass
|
||||
wm withdraw $path
|
||||
|
||||
Widget::initFromODB Dialog $path $maps(Dialog)
|
||||
|
||||
bindtags $path [list $path BwDialog all]
|
||||
wm overrideredirect $path 1
|
||||
wm title $path [Widget::cget $path -title]
|
||||
set parent [Widget::cget $path -parent]
|
||||
if { ![winfo exists $parent] } {
|
||||
set parent [winfo parent $path]
|
||||
}
|
||||
# JDC: made transient optional
|
||||
if { [Widget::getoption $path -transient] } {
|
||||
wm transient $path [winfo toplevel $parent]
|
||||
}
|
||||
|
||||
set side [Widget::cget $path -side]
|
||||
if { [string equal $side "left"] || [string equal $side "right"] } {
|
||||
set orient vertical
|
||||
} else {
|
||||
set orient horizontal
|
||||
}
|
||||
|
||||
set bbox [eval [list ButtonBox::create $path.bbox] $maps(.bbox) \
|
||||
-orient $orient]
|
||||
set frame [frame $path.frame -relief flat -borderwidth 0]
|
||||
set bg [Widget::cget $path -background]
|
||||
$path configure -background $bg
|
||||
$frame configure -background $bg
|
||||
if { [set bitmap [Widget::getoption $path -image]] != "" } {
|
||||
set label [label $path.label -image $bitmap -background $bg]
|
||||
} elseif { [set bitmap [Widget::getoption $path -bitmap]] != "" } {
|
||||
set label [label $path.label -bitmap $bitmap -background $bg]
|
||||
}
|
||||
if { [Widget::getoption $path -separator] } {
|
||||
Separator::create $path.sep -orient $orient -background $bg
|
||||
}
|
||||
set _widget($path,realized) 0
|
||||
set _widget($path,nbut) 0
|
||||
|
||||
set cancel [Widget::getoption $path -cancel]
|
||||
bind $path <Escape> [list ButtonBox::invoke $path.bbox $cancel]
|
||||
if {$cancel != -1} {
|
||||
wm protocol $path WM_DELETE_WINDOW [list ButtonBox::invoke $path.bbox $cancel]
|
||||
}
|
||||
bind $path <Return> [list ButtonBox::invoke $path.bbox default]
|
||||
|
||||
return [Widget::create Dialog $path]
|
||||
}
|
||||
|
||||
|
||||
# ----------------------------------------------------------------------------
|
||||
# Command Dialog::configure
|
||||
# ----------------------------------------------------------------------------
|
||||
proc Dialog::configure { path args } {
|
||||
set res [Widget::configure $path $args]
|
||||
|
||||
if { [Widget::hasChanged $path -title title] } {
|
||||
wm title $path $title
|
||||
}
|
||||
if { [Widget::hasChanged $path -background bg] } {
|
||||
if { [winfo exists $path.label] } {
|
||||
$path.label configure -background $bg
|
||||
}
|
||||
if { [winfo exists $path.sep] } {
|
||||
Separator::configure $path.sep -background $bg
|
||||
}
|
||||
}
|
||||
if { [Widget::hasChanged $path -cancel cancel] } {
|
||||
bind $path <Escape> [list ButtonBox::invoke $path.bbox $cancel]
|
||||
if {$cancel == -1} {
|
||||
wm protocol $path WM_DELETE_WINDOW ""
|
||||
} else {
|
||||
wm protocol $path WM_DELETE_WINDOW [list ButtonBox::invoke $path.bbox $cancel]
|
||||
}
|
||||
}
|
||||
return $res
|
||||
}
|
||||
|
||||
|
||||
# ----------------------------------------------------------------------------
|
||||
# Command Dialog::cget
|
||||
# ----------------------------------------------------------------------------
|
||||
proc Dialog::cget { path option } {
|
||||
return [Widget::cget $path $option]
|
||||
}
|
||||
|
||||
|
||||
# ----------------------------------------------------------------------------
|
||||
# Command Dialog::getframe
|
||||
# ----------------------------------------------------------------------------
|
||||
proc Dialog::getframe { path } {
|
||||
return $path.frame
|
||||
}
|
||||
|
||||
|
||||
# ----------------------------------------------------------------------------
|
||||
# Command Dialog::add
|
||||
# ----------------------------------------------------------------------------
|
||||
proc Dialog::add { path args } {
|
||||
variable _widget
|
||||
|
||||
if {[string equal $::tcl_platform(platform) "windows"]
|
||||
&& $::tk_version >= 8.4} {
|
||||
set width -11
|
||||
} else {
|
||||
set width 8
|
||||
}
|
||||
set cmd [list ButtonBox::add $path.bbox -width $width \
|
||||
-command [list Dialog::enddialog $path $_widget($path,nbut)]]
|
||||
set res [eval $cmd $args]
|
||||
incr _widget($path,nbut)
|
||||
return $res
|
||||
}
|
||||
|
||||
|
||||
# ----------------------------------------------------------------------------
|
||||
# Command Dialog::itemconfigure
|
||||
# ----------------------------------------------------------------------------
|
||||
proc Dialog::itemconfigure { path index args } {
|
||||
return [eval [list ButtonBox::itemconfigure $path.bbox $index] $args]
|
||||
}
|
||||
|
||||
|
||||
# ----------------------------------------------------------------------------
|
||||
# Command Dialog::itemcget
|
||||
# ----------------------------------------------------------------------------
|
||||
proc Dialog::itemcget { path index option } {
|
||||
return [ButtonBox::itemcget $path.bbox $index $option]
|
||||
}
|
||||
|
||||
|
||||
# ----------------------------------------------------------------------------
|
||||
# Command Dialog::invoke
|
||||
# ----------------------------------------------------------------------------
|
||||
proc Dialog::invoke { path index } {
|
||||
ButtonBox::invoke $path.bbox $index
|
||||
}
|
||||
|
||||
|
||||
# ----------------------------------------------------------------------------
|
||||
# Command Dialog::setfocus
|
||||
# ----------------------------------------------------------------------------
|
||||
proc Dialog::setfocus { path index } {
|
||||
ButtonBox::setfocus $path.bbox $index
|
||||
}
|
||||
|
||||
|
||||
# ----------------------------------------------------------------------------
|
||||
# Command Dialog::enddialog
|
||||
# ----------------------------------------------------------------------------
|
||||
proc Dialog::enddialog { path result } {
|
||||
variable _widget
|
||||
|
||||
set _widget($path,result) $result
|
||||
}
|
||||
|
||||
|
||||
# ----------------------------------------------------------------------------
|
||||
# Command Dialog::draw
|
||||
# ----------------------------------------------------------------------------
|
||||
proc Dialog::draw { path {focus ""} {overrideredirect 0} {geometry ""}} {
|
||||
variable _widget
|
||||
|
||||
set parent [Widget::getoption $path -parent]
|
||||
if { !$_widget($path,realized) } {
|
||||
set _widget($path,realized) 1
|
||||
if { [llength [winfo children $path.bbox]] } {
|
||||
set side [Widget::getoption $path -side]
|
||||
if {[string equal $side "left"] || [string equal $side "right"]} {
|
||||
set pad -padx
|
||||
set fill y
|
||||
} else {
|
||||
set pad -pady
|
||||
set fill x
|
||||
}
|
||||
pack $path.bbox -side $side -padx 1m -pady 1m \
|
||||
-anchor [Widget::getoption $path -anchor]
|
||||
if { [winfo exists $path.sep] } {
|
||||
pack $path.sep -side $side -fill $fill $pad 2m
|
||||
}
|
||||
}
|
||||
if { [winfo exists $path.label] } {
|
||||
pack $path.label -side left -anchor n -padx 3m -pady 3m
|
||||
}
|
||||
pack $path.frame -padx 1m -pady 1m -fill both -expand yes
|
||||
}
|
||||
|
||||
set geom [Widget::getMegawidgetOption $path -geometry]
|
||||
if { $geom != "" } {
|
||||
wm geometry $path $geom
|
||||
}
|
||||
|
||||
if { [string equal $geometry ""] && ($geom == "") } {
|
||||
set place [Widget::getoption $path -place]
|
||||
if { ![string equal $place none] } {
|
||||
if { [winfo exists $parent] } {
|
||||
BWidget::place $path 0 0 $place $parent
|
||||
} else {
|
||||
BWidget::place $path 0 0 $place
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if { $geom != "" } {
|
||||
wm geometry $path $geom
|
||||
} else {
|
||||
wm geometry $path $geometry
|
||||
}
|
||||
}
|
||||
update idletasks
|
||||
wm overrideredirect $path $overrideredirect
|
||||
wm deiconify $path
|
||||
|
||||
# patch by Bastien Chevreux (bach@mwgdna.com)
|
||||
# As seen on Windows systems *sigh*
|
||||
# When the toplevel is withdrawn, the tkwait command will wait forever.
|
||||
# So, check that we are not withdrawn
|
||||
if {![winfo exists $parent] || \
|
||||
([wm state [winfo toplevel $parent]] != "withdrawn")} {
|
||||
tkwait visibility $path
|
||||
}
|
||||
BWidget::focus set $path
|
||||
if { [winfo exists $focus] } {
|
||||
focus -force $focus
|
||||
} else {
|
||||
ButtonBox::setfocus $path.bbox default
|
||||
}
|
||||
|
||||
if { [set grab [Widget::cget $path -modal]] != "none" } {
|
||||
BWidget::grab $grab $path
|
||||
if {[info exists _widget($path,result)]} {
|
||||
unset _widget($path,result)
|
||||
}
|
||||
tkwait variable Dialog::_widget($path,result)
|
||||
if { [info exists _widget($path,result)] } {
|
||||
set res $_widget($path,result)
|
||||
unset _widget($path,result)
|
||||
} else {
|
||||
set res -1
|
||||
}
|
||||
withdraw $path
|
||||
return $res
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
|
||||
# ----------------------------------------------------------------------------
|
||||
# Command Dialog::withdraw
|
||||
# ----------------------------------------------------------------------------
|
||||
proc Dialog::withdraw { path } {
|
||||
BWidget::grab release $path
|
||||
BWidget::focus release $path
|
||||
if { [winfo exists $path] } {
|
||||
wm withdraw $path
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
# ----------------------------------------------------------------------------
|
||||
# Command Dialog::_destroy
|
||||
# ----------------------------------------------------------------------------
|
||||
proc Dialog::_destroy { path } {
|
||||
variable _widget
|
||||
|
||||
Dialog::enddialog $path -1
|
||||
|
||||
BWidget::grab release $path
|
||||
BWidget::focus release $path
|
||||
if {[info exists _widget($path,result)]} {
|
||||
unset _widget($path,result)
|
||||
}
|
||||
unset _widget($path,realized)
|
||||
unset _widget($path,nbut)
|
||||
|
||||
Widget::destroy $path
|
||||
}
|
197
R_portable/R/App/R-portable/Tcl/bin64/lib/bwidget-1.9.12/dragsite.tcl
Executable file
@ -0,0 +1,197 @@
|
||||
# ------------------------------------------------------------------------------
|
||||
# dragsite.tcl
|
||||
# This file is part of Unifix BWidget Toolkit
|
||||
# $Id: dragsite.tcl,v 1.8 2003/10/20 21:23:52 damonc Exp $
|
||||
# ------------------------------------------------------------------------------
|
||||
# Index of commands:
|
||||
# - DragSite::include
|
||||
# - DragSite::setdrag
|
||||
# - DragSite::register
|
||||
# - DragSite::_begin_drag
|
||||
# - DragSite::_init_drag
|
||||
# - DragSite::_end_drag
|
||||
# - DragSite::_update_operation
|
||||
# ----------------------------------------------------------------------------
|
||||
|
||||
namespace eval DragSite {
|
||||
Widget::define DragSite dragsite -classonly
|
||||
|
||||
Widget::declare DragSite [list \
|
||||
[list -dragevent Enum 1 0 [list 1 2 3]] \
|
||||
[list -draginitcmd String "" 0] \
|
||||
[list -dragendcmd String "" 0] \
|
||||
]
|
||||
|
||||
variable _topw ".drag"
|
||||
variable _tabops
|
||||
variable _state
|
||||
variable _x0
|
||||
variable _y0
|
||||
|
||||
bind BwDrag1 <ButtonPress-1> {DragSite::_begin_drag press %W %s %X %Y}
|
||||
bind BwDrag1 <B1-Motion> {DragSite::_begin_drag motion %W %s %X %Y}
|
||||
bind BwDrag2 <ButtonPress-2> {DragSite::_begin_drag press %W %s %X %Y}
|
||||
bind BwDrag2 <B2-Motion> {DragSite::_begin_drag motion %W %s %X %Y}
|
||||
bind BwDrag3 <ButtonPress-3> {DragSite::_begin_drag press %W %s %X %Y}
|
||||
bind BwDrag3 <B3-Motion> {DragSite::_begin_drag motion %W %s %X %Y}
|
||||
|
||||
proc use {} {}
|
||||
}
|
||||
|
||||
|
||||
# ----------------------------------------------------------------------------
|
||||
# Command DragSite::include
|
||||
# ----------------------------------------------------------------------------
|
||||
proc DragSite::include { class type event } {
|
||||
set dragoptions [list \
|
||||
[list -dragenabled Boolean 0 0] \
|
||||
[list -draginitcmd String "" 0] \
|
||||
[list -dragendcmd String "" 0] \
|
||||
[list -dragtype String $type 0] \
|
||||
[list -dragevent Enum $event 0 [list 1 2 3]] \
|
||||
]
|
||||
Widget::declare $class $dragoptions
|
||||
}
|
||||
|
||||
|
||||
# ----------------------------------------------------------------------------
|
||||
# Command DragSite::setdrag
|
||||
# Widget interface to register
|
||||
# ----------------------------------------------------------------------------
|
||||
proc DragSite::setdrag { path subpath initcmd endcmd {force 0}} {
|
||||
set cen [Widget::hasChanged $path -dragenabled en]
|
||||
set cdragevt [Widget::hasChanged $path -dragevent dragevt]
|
||||
if { $en } {
|
||||
if { $force || $cen || $cdragevt } {
|
||||
register $subpath \
|
||||
-draginitcmd $initcmd \
|
||||
-dragendcmd $endcmd \
|
||||
-dragevent $dragevt
|
||||
}
|
||||
} else {
|
||||
register $subpath
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
# ----------------------------------------------------------------------------
|
||||
# Command DragSite::register
|
||||
# ----------------------------------------------------------------------------
|
||||
proc DragSite::register { path args } {
|
||||
upvar \#0 DragSite::$path drag
|
||||
|
||||
if { [info exists drag] } {
|
||||
bind $path $drag(evt) {}
|
||||
unset drag
|
||||
}
|
||||
Widget::init DragSite .drag$path $args
|
||||
set event [Widget::getMegawidgetOption .drag$path -dragevent]
|
||||
set initcmd [Widget::getMegawidgetOption .drag$path -draginitcmd]
|
||||
set endcmd [Widget::getMegawidgetOption .drag$path -dragendcmd]
|
||||
set tags [bindtags $path]
|
||||
set idx [lsearch $tags "BwDrag*"]
|
||||
Widget::destroy .drag$path
|
||||
if { $initcmd != "" } {
|
||||
if { $idx != -1 } {
|
||||
bindtags $path [lreplace $tags $idx $idx BwDrag$event]
|
||||
} else {
|
||||
bindtags $path [concat $tags BwDrag$event]
|
||||
}
|
||||
set drag(initcmd) $initcmd
|
||||
set drag(endcmd) $endcmd
|
||||
set drag(evt) $event
|
||||
} elseif { $idx != -1 } {
|
||||
bindtags $path [lreplace $tags $idx $idx]
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
# ----------------------------------------------------------------------------
|
||||
# Command DragSite::_begin_drag
|
||||
# ----------------------------------------------------------------------------
|
||||
proc DragSite::_begin_drag { event source state X Y } {
|
||||
variable _x0
|
||||
variable _y0
|
||||
variable _state
|
||||
|
||||
switch -- $event {
|
||||
press {
|
||||
set _x0 $X
|
||||
set _y0 $Y
|
||||
set _state "press"
|
||||
}
|
||||
motion {
|
||||
if { ![info exists _state] } {
|
||||
# This is just extra protection. There seem to be
|
||||
# rare cases where the motion comes before the press.
|
||||
return
|
||||
}
|
||||
if { [string equal $_state "press"] } {
|
||||
if { abs($_x0-$X) > 3 || abs($_y0-$Y) > 3 } {
|
||||
set _state "done"
|
||||
_init_drag $source $state $X $Y
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
# ----------------------------------------------------------------------------
|
||||
# Command DragSite::_init_drag
|
||||
# ----------------------------------------------------------------------------
|
||||
proc DragSite::_init_drag { source state X Y } {
|
||||
variable _topw
|
||||
upvar \#0 DragSite::$source drag
|
||||
|
||||
destroy $_topw
|
||||
toplevel $_topw
|
||||
wm withdraw $_topw
|
||||
wm overrideredirect $_topw 1
|
||||
|
||||
set info [uplevel \#0 $drag(initcmd) [list $source $X $Y .drag]]
|
||||
if { $info != "" } {
|
||||
set type [lindex $info 0]
|
||||
set ops [lindex $info 1]
|
||||
set data [lindex $info 2]
|
||||
|
||||
if { [winfo children $_topw] == "" } {
|
||||
if { [string equal $type "BITMAP"] || [string equal $type "IMAGE"] } {
|
||||
label $_topw.l -image [Bitmap::get dragicon] -relief flat -bd 0
|
||||
} else {
|
||||
label $_topw.l -image [Bitmap::get dragfile] -relief flat -bd 0
|
||||
}
|
||||
pack $_topw.l
|
||||
}
|
||||
wm geometry $_topw +[expr {$X+1}]+[expr {$Y+1}]
|
||||
wm deiconify $_topw
|
||||
if {[catch {tkwait visibility $_topw}]} {
|
||||
return
|
||||
}
|
||||
BWidget::grab set $_topw
|
||||
BWidget::focus set $_topw
|
||||
|
||||
bindtags $_topw [list $_topw DragTop]
|
||||
DropSite::_init_drag $_topw $drag(evt) $source $state $X $Y $type $ops $data
|
||||
} else {
|
||||
destroy $_topw
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
# ----------------------------------------------------------------------------
|
||||
# Command DragSite::_end_drag
|
||||
# ----------------------------------------------------------------------------
|
||||
proc DragSite::_end_drag { source target op type data result } {
|
||||
variable _topw
|
||||
upvar \#0 DragSite::$source drag
|
||||
|
||||
BWidget::grab release $_topw
|
||||
BWidget::focus release $_topw
|
||||
destroy $_topw
|
||||
if { $drag(endcmd) != "" } {
|
||||
uplevel \#0 $drag(endcmd) [list $source $target $op $type $data $result]
|
||||
}
|
||||
}
|
||||
|
||||
|
456
R_portable/R/App/R-portable/Tcl/bin64/lib/bwidget-1.9.12/dropsite.tcl
Executable file
@ -0,0 +1,456 @@
|
||||
# ------------------------------------------------------------------------------
|
||||
# dropsite.tcl
|
||||
# This file is part of Unifix BWidget Toolkit
|
||||
# $Id: dropsite.tcl,v 1.8 2009/06/30 16:17:37 oehhar Exp $
|
||||
# ------------------------------------------------------------------------------
|
||||
# Index of commands:
|
||||
# - DropSite::include
|
||||
# - DropSite::setdrop
|
||||
# - DropSite::register
|
||||
# - DropSite::setcursor
|
||||
# - DropSite::setoperation
|
||||
# - DropSite::_update_operation
|
||||
# - DropSite::_compute_operation
|
||||
# - DropSite::_draw_operation
|
||||
# - DropSite::_init_drag
|
||||
# - DropSite::_motion
|
||||
# - DropSite::_release
|
||||
# ----------------------------------------------------------------------------
|
||||
|
||||
|
||||
namespace eval DropSite {
|
||||
Widget::define DropSite dropsite -classonly
|
||||
|
||||
Widget::declare DropSite [list \
|
||||
[list -dropovercmd String "" 0] \
|
||||
[list -dropcmd String "" 0] \
|
||||
[list -droptypes String "" 0] \
|
||||
]
|
||||
|
||||
proc use {} {}
|
||||
|
||||
variable _top ".drag"
|
||||
variable _opw ".drag.\#op"
|
||||
variable _target ""
|
||||
variable _status 0
|
||||
variable _tabops
|
||||
variable _defops
|
||||
variable _source
|
||||
variable _type
|
||||
variable _data
|
||||
variable _evt
|
||||
# key win unix
|
||||
# shift 1 | 1 -> 1
|
||||
# control 4 | 4 -> 4
|
||||
# alt 8 | 16 -> 24
|
||||
# meta | 64 -> 88
|
||||
|
||||
array set _tabops {
|
||||
mod,none 0
|
||||
mod,shift 1
|
||||
mod,control 4
|
||||
mod,alt 24
|
||||
ops,copy 1
|
||||
ops,move 1
|
||||
ops,link 1
|
||||
}
|
||||
|
||||
if { $tcl_platform(platform) == "unix" } {
|
||||
set _tabops(mod,alt) 8
|
||||
} else {
|
||||
set _tabops(mod,alt) 16
|
||||
}
|
||||
array set _defops \
|
||||
[list \
|
||||
copy,mod shift \
|
||||
move,mod control \
|
||||
link,mod alt \
|
||||
copy,img @[file join $::BWIDGET::LIBRARY "images" "opcopy.xbm"] \
|
||||
move,img @[file join $::BWIDGET::LIBRARY "images" "opmove.xbm"] \
|
||||
link,img @[file join $::BWIDGET::LIBRARY "images" "oplink.xbm"]]
|
||||
|
||||
bind DragTop <KeyPress-Shift_L> {DropSite::_update_operation [expr %s | 1]}
|
||||
bind DragTop <KeyPress-Shift_R> {DropSite::_update_operation [expr %s | 1]}
|
||||
bind DragTop <KeyPress-Control_L> {DropSite::_update_operation [expr %s | 4]}
|
||||
bind DragTop <KeyPress-Control_R> {DropSite::_update_operation [expr %s | 4]}
|
||||
if { $tcl_platform(platform) == "unix" } {
|
||||
bind DragTop <KeyPress-Alt_L> {DropSite::_update_operation [expr %s | 8]}
|
||||
bind DragTop <KeyPress-Alt_R> {DropSite::_update_operation [expr %s | 8]}
|
||||
} else {
|
||||
bind DragTop <KeyPress-Alt_L> {DropSite::_update_operation [expr %s | 16]}
|
||||
bind DragTop <KeyPress-Alt_R> {DropSite::_update_operation [expr %s | 16]}
|
||||
}
|
||||
|
||||
bind DragTop <KeyRelease-Shift_L> {DropSite::_update_operation [expr %s & ~1]}
|
||||
bind DragTop <KeyRelease-Shift_R> {DropSite::_update_operation [expr %s & ~1]}
|
||||
bind DragTop <KeyRelease-Control_L> {DropSite::_update_operation [expr %s & ~4]}
|
||||
bind DragTop <KeyRelease-Control_R> {DropSite::_update_operation [expr %s & ~4]}
|
||||
if { $tcl_platform(platform) == "unix" } {
|
||||
bind DragTop <KeyRelease-Alt_L> {DropSite::_update_operation [expr %s & ~8]}
|
||||
bind DragTop <KeyRelease-Alt_R> {DropSite::_update_operation [expr %s & ~8]}
|
||||
} else {
|
||||
bind DragTop <KeyRelease-Alt_L> {DropSite::_update_operation [expr %s & ~16]}
|
||||
bind DragTop <KeyRelease-Alt_R> {DropSite::_update_operation [expr %s & ~16]}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
# ----------------------------------------------------------------------------
|
||||
# Command DropSite::include
|
||||
# ----------------------------------------------------------------------------
|
||||
proc DropSite::include { class types } {
|
||||
set dropoptions [list \
|
||||
[list -dropenabled Boolean 0 0] \
|
||||
[list -dropovercmd String "" 0] \
|
||||
[list -dropcmd String "" 0] \
|
||||
[list -droptypes String $types 0] \
|
||||
]
|
||||
Widget::declare $class $dropoptions
|
||||
}
|
||||
|
||||
|
||||
# ----------------------------------------------------------------------------
|
||||
# Command DropSite::setdrop
|
||||
# Widget interface to register
|
||||
# ----------------------------------------------------------------------------
|
||||
proc DropSite::setdrop { path subpath dropover drop {force 0}} {
|
||||
set cen [Widget::hasChanged $path -dropenabled en]
|
||||
set ctypes [Widget::hasChanged $path -droptypes types]
|
||||
if { $en } {
|
||||
if { $force || $cen || $ctypes } {
|
||||
register $subpath \
|
||||
-droptypes $types \
|
||||
-dropcmd $drop \
|
||||
-dropovercmd $dropover
|
||||
}
|
||||
} else {
|
||||
register $subpath
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
# ----------------------------------------------------------------------------
|
||||
# Command DropSite::register
|
||||
# ----------------------------------------------------------------------------
|
||||
proc DropSite::register { path args } {
|
||||
variable _tabops
|
||||
variable _defops
|
||||
upvar \#0 DropSite::$path drop
|
||||
|
||||
Widget::init DropSite .drop$path $args
|
||||
if { [info exists drop] } {
|
||||
unset drop
|
||||
}
|
||||
set dropcmd [Widget::getMegawidgetOption .drop$path -dropcmd]
|
||||
set types [Widget::getMegawidgetOption .drop$path -droptypes]
|
||||
set overcmd [Widget::getMegawidgetOption .drop$path -dropovercmd]
|
||||
Widget::destroy .drop$path
|
||||
if { $dropcmd != "" && $types != "" } {
|
||||
set drop(dropcmd) $dropcmd
|
||||
set drop(overcmd) $overcmd
|
||||
foreach {type ops} $types {
|
||||
set drop($type,ops) {}
|
||||
set masklist {}
|
||||
foreach {descop lmod} $ops {
|
||||
if { ![llength $descop] || [llength $descop] > 3 } {
|
||||
return -code error "invalid operation description \"$descop\""
|
||||
}
|
||||
foreach {subop baseop imgop} $descop {
|
||||
set subop [string trim $subop]
|
||||
if { ![string length $subop] } {
|
||||
return -code error "sub operation is empty"
|
||||
}
|
||||
if { ![string length $baseop] } {
|
||||
set baseop $subop
|
||||
}
|
||||
if { [info exists drop($type,ops,$subop)] } {
|
||||
return -code error "operation \"$subop\" already defined"
|
||||
}
|
||||
if { ![info exists _tabops(ops,$baseop)] } {
|
||||
return -code error "invalid base operation \"$baseop\""
|
||||
}
|
||||
if { ![string equal $subop $baseop] &&
|
||||
[info exists _tabops(ops,$subop)] } {
|
||||
return -code error "sub operation \"$subop\" is a base operation"
|
||||
}
|
||||
if { ![string length $imgop] } {
|
||||
set imgop $_defops($baseop,img)
|
||||
}
|
||||
}
|
||||
if { [string equal $lmod "program"] } {
|
||||
set drop($type,ops,$subop) $baseop
|
||||
set drop($type,img,$subop) $imgop
|
||||
} else {
|
||||
if { ![string length $lmod] } {
|
||||
set lmod $_defops($baseop,mod)
|
||||
}
|
||||
set mask 0
|
||||
foreach mod $lmod {
|
||||
if { ![info exists _tabops(mod,$mod)] } {
|
||||
return -code error "invalid modifier \"$mod\""
|
||||
}
|
||||
set mask [expr {$mask | $_tabops(mod,$mod)}]
|
||||
}
|
||||
if { ($mask == 0) != ([string equal $subop "default"]) } {
|
||||
return -code error "sub operation default can only be used with modifier \"none\""
|
||||
}
|
||||
set drop($type,mod,$mask) $subop
|
||||
set drop($type,ops,$subop) $baseop
|
||||
set drop($type,img,$subop) $imgop
|
||||
lappend masklist $mask
|
||||
}
|
||||
}
|
||||
if { ![info exists drop($type,mod,0)] } {
|
||||
set drop($type,mod,0) default
|
||||
set drop($type,ops,default) copy
|
||||
set drop($type,img,default) $_defops(copy,img)
|
||||
lappend masklist 0
|
||||
}
|
||||
set drop($type,ops,force) copy
|
||||
set drop($type,img,force) $_defops(copy,img)
|
||||
foreach mask [lsort -integer -decreasing $masklist] {
|
||||
lappend drop($type,ops) $mask $drop($type,mod,$mask)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
# ----------------------------------------------------------------------------
|
||||
# Command DropSite::setcursor
|
||||
# ----------------------------------------------------------------------------
|
||||
proc DropSite::setcursor { cursor } {
|
||||
catch {.drag configure -cursor $cursor}
|
||||
}
|
||||
|
||||
|
||||
# ----------------------------------------------------------------------------
|
||||
# Command DropSite::setoperation
|
||||
# ----------------------------------------------------------------------------
|
||||
proc DropSite::setoperation { op } {
|
||||
variable _curop
|
||||
variable _dragops
|
||||
variable _target
|
||||
variable _type
|
||||
upvar \#0 DropSite::$_target drop
|
||||
|
||||
if { [info exist drop($_type,ops,$op)] &&
|
||||
$_dragops($drop($_type,ops,$op)) } {
|
||||
set _curop $op
|
||||
} else {
|
||||
# force to a copy operation
|
||||
set _curop force
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
# ----------------------------------------------------------------------------
|
||||
# Command DropSite::_init_drag
|
||||
# ----------------------------------------------------------------------------
|
||||
proc DropSite::_init_drag { top evt source state X Y type ops data } {
|
||||
variable _top
|
||||
variable _source
|
||||
variable _type
|
||||
variable _data
|
||||
variable _target
|
||||
variable _status
|
||||
variable _state
|
||||
variable _dragops
|
||||
variable _opw
|
||||
variable _evt
|
||||
|
||||
if {[info exists _dragops]} {
|
||||
unset _dragops
|
||||
}
|
||||
array set _dragops {copy 1 move 0 link 0}
|
||||
foreach op $ops {
|
||||
set _dragops($op) 1
|
||||
}
|
||||
set _target ""
|
||||
set _status 0
|
||||
set _top $top
|
||||
set _source $source
|
||||
set _type $type
|
||||
set _data $data
|
||||
|
||||
label $_opw -relief flat -bd 0 -highlightthickness 0 \
|
||||
-foreground black -background white
|
||||
|
||||
bind $top <ButtonRelease-$evt> {DropSite::_release %X %Y}
|
||||
bind $top <B$evt-Motion> {DropSite::_motion %X %Y}
|
||||
bind $top <Motion> {DropSite::_release %X %Y}
|
||||
set _state $state
|
||||
set _evt $evt
|
||||
_motion $X $Y
|
||||
}
|
||||
|
||||
|
||||
# ----------------------------------------------------------------------------
|
||||
# Command DropSite::_update_operation
|
||||
# ----------------------------------------------------------------------------
|
||||
proc DropSite::_update_operation { state } {
|
||||
variable _top
|
||||
variable _status
|
||||
variable _state
|
||||
|
||||
if { $_status & 3 } {
|
||||
set _state $state
|
||||
_motion [winfo pointerx $_top] [winfo pointery $_top]
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
# ----------------------------------------------------------------------------
|
||||
# Command DropSite::_compute_operation
|
||||
# ----------------------------------------------------------------------------
|
||||
proc DropSite::_compute_operation { target state type } {
|
||||
variable _curop
|
||||
variable _dragops
|
||||
upvar \#0 DropSite::$target drop
|
||||
|
||||
foreach {mask op} $drop($type,ops) {
|
||||
if { ($state & $mask) == $mask } {
|
||||
if { $_dragops($drop($type,ops,$op)) } {
|
||||
set _curop $op
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
set _curop force
|
||||
}
|
||||
|
||||
|
||||
# ----------------------------------------------------------------------------
|
||||
# Command DropSite::_draw_operation
|
||||
# ----------------------------------------------------------------------------
|
||||
proc DropSite::_draw_operation { target type } {
|
||||
variable _opw
|
||||
variable _curop
|
||||
variable _dragops
|
||||
variable _tabops
|
||||
variable _status
|
||||
|
||||
upvar \#0 DropSite::$target drop
|
||||
|
||||
if { !($_status & 1) } {
|
||||
catch {place forget $_opw}
|
||||
return
|
||||
}
|
||||
|
||||
if { 0 } {
|
||||
if { ![info exist drop($type,ops,$_curop)] ||
|
||||
!$_dragops($drop($type,ops,$_curop)) } {
|
||||
# force to a copy operation
|
||||
set _curop copy
|
||||
catch {
|
||||
$_opw configure -bitmap $_tabops(img,copy)
|
||||
place $_opw -relx 1 -rely 1 -anchor se
|
||||
}
|
||||
}
|
||||
} elseif { [string equal $_curop "default"] } {
|
||||
catch {place forget $_opw}
|
||||
} else {
|
||||
catch {
|
||||
$_opw configure -bitmap $drop($type,img,$_curop)
|
||||
place $_opw -relx 1 -rely 1 -anchor se
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
# ----------------------------------------------------------------------------
|
||||
# Command DropSite::_motion
|
||||
# ----------------------------------------------------------------------------
|
||||
proc DropSite::_motion { X Y } {
|
||||
variable _top
|
||||
variable _target
|
||||
variable _status
|
||||
variable _state
|
||||
variable _curop
|
||||
variable _type
|
||||
variable _data
|
||||
variable _source
|
||||
variable _evt
|
||||
|
||||
set script [bind $_top <B$_evt-Motion>]
|
||||
bind $_top <B$_evt-Motion> {}
|
||||
bind $_top <Motion> {}
|
||||
wm geometry $_top "+[expr {$X+1}]+[expr {$Y+1}]"
|
||||
update
|
||||
if { ![winfo exists $_top] } {
|
||||
return
|
||||
}
|
||||
set path [winfo containing $X $Y]
|
||||
if { ![string equal $path $_target] } {
|
||||
# path != current target
|
||||
if { $_status & 2 } {
|
||||
# current target is valid and has recall status
|
||||
# generate leave event
|
||||
upvar \#0 DropSite::$_target drop
|
||||
uplevel \#0 $drop(overcmd) [list $_target $_source leave $X $Y $_curop $_type $_data]
|
||||
}
|
||||
set _target $path
|
||||
upvar \#0 DropSite::$_target drop
|
||||
if { [info exists drop($_type,ops)] } {
|
||||
# path is a valid target
|
||||
_compute_operation $_target $_state $_type
|
||||
if { $drop(overcmd) != "" } {
|
||||
set arg [list $_target $_source enter $X $Y $_curop $_type $_data]
|
||||
set _status [uplevel \#0 $drop(overcmd) $arg]
|
||||
} else {
|
||||
set _status 1
|
||||
catch {$_top configure -cursor based_arrow_down}
|
||||
}
|
||||
_draw_operation $_target $_type
|
||||
update
|
||||
catch {
|
||||
bind $_top <B$_evt-Motion> {DropSite::_motion %X %Y}
|
||||
bind $_top <Motion> {DropSite::_release %X %Y}
|
||||
}
|
||||
return
|
||||
} else {
|
||||
set _status 0
|
||||
catch {$_top configure -cursor dot}
|
||||
_draw_operation "" ""
|
||||
}
|
||||
} elseif { $_status & 2 } {
|
||||
upvar \#0 DropSite::$_target drop
|
||||
_compute_operation $_target $_state $_type
|
||||
set arg [list $_target $_source motion $X $Y $_curop $_type $_data]
|
||||
set _status [uplevel \#0 $drop(overcmd) $arg]
|
||||
_draw_operation $_target $_type
|
||||
}
|
||||
update
|
||||
catch {
|
||||
bind $_top <B$_evt-Motion> {DropSite::_motion %X %Y}
|
||||
bind $_top <Motion> {DropSite::_release %X %Y}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
# ----------------------------------------------------------------------------
|
||||
# Command DropSite::_release
|
||||
# ----------------------------------------------------------------------------
|
||||
proc DropSite::_release { X Y } {
|
||||
variable _target
|
||||
variable _status
|
||||
variable _curop
|
||||
variable _source
|
||||
variable _type
|
||||
variable _data
|
||||
|
||||
if { $_status & 1 } {
|
||||
upvar \#0 DropSite::$_target drop
|
||||
|
||||
set res [uplevel \#0 $drop(dropcmd) [list $_target $_source $X $Y $_curop $_type $_data]]
|
||||
DragSite::_end_drag $_source $_target $drop($_type,ops,$_curop) $_type $_data $res
|
||||
} else {
|
||||
if { $_status & 2 } {
|
||||
# notify leave event
|
||||
upvar \#0 DropSite::$_target drop
|
||||
uplevel \#0 $drop(overcmd) [list $_target $_source leave $X $Y $_curop $_type $_data]
|
||||
}
|
||||
DragSite::_end_drag $_source "" "" $_type $_data 0
|
||||
}
|
||||
}
|
796
R_portable/R/App/R-portable/Tcl/bin64/lib/bwidget-1.9.12/dynhelp.tcl
Executable file
@ -0,0 +1,796 @@
|
||||
# ----------------------------------------------------------------------------
|
||||
# dynhelp.tcl
|
||||
# This file is part of Unifix BWidget Toolkit
|
||||
# $Id: dynhelp.tcl,v 1.20.2.1 2009/08/12 07:20:21 oehhar Exp $
|
||||
# ----------------------------------------------------------------------------
|
||||
# Index of commands:
|
||||
# - DynamicHelp::configure
|
||||
# - DynamicHelp::include
|
||||
# - DynamicHelp::sethelp
|
||||
# - DynamicHelp::register
|
||||
# - DynamicHelp::_motion_balloon
|
||||
# - DynamicHelp::_motion_info
|
||||
# - DynamicHelp::_leave_info
|
||||
# - DynamicHelp::_menu_info
|
||||
# - DynamicHelp::_show_help
|
||||
# - DynamicHelp::_init
|
||||
# ----------------------------------------------------------------------------
|
||||
|
||||
namespace eval DynamicHelp {
|
||||
Widget::define DynamicHelp dynhelp -classonly
|
||||
|
||||
if {$::tcl_version >= 8.5} {
|
||||
set fontdefault TkTooltipFont
|
||||
} elseif {$Widget::_aqua} {
|
||||
set fontdefault {helvetica 11}
|
||||
} else {
|
||||
set fontdefault {helvetica 8}
|
||||
}
|
||||
|
||||
Widget::declare DynamicHelp [list\
|
||||
{-foreground TkResource black 0 label}\
|
||||
{-topbackground TkResource black 0 {label -foreground}}\
|
||||
{-background TkResource "#FFFFC0" 0 label}\
|
||||
{-borderwidth TkResource 1 0 label}\
|
||||
{-justify TkResource left 0 label}\
|
||||
[list -font TkResource $fontdefault 0 label]\
|
||||
{-delay Int 600 0 "%d >= 100 & %d <= 2000"}\
|
||||
{-state Enum "normal" 0 {normal disabled}}\
|
||||
{-padx TkResource 1 0 label}\
|
||||
{-pady TkResource 1 0 label}\
|
||||
{-bd Synonym -borderwidth}\
|
||||
{-bg Synonym -background}\
|
||||
{-fg Synonym -foreground}\
|
||||
{-topbg Synonym -topbackground}\
|
||||
]
|
||||
|
||||
proc use {} {}
|
||||
|
||||
variable _registered
|
||||
variable _canvases
|
||||
variable _texts
|
||||
|
||||
variable _top ".help_shell"
|
||||
variable _id ""
|
||||
variable _delay 600
|
||||
variable _current_balloon ""
|
||||
variable _current_variable ""
|
||||
variable _saved
|
||||
|
||||
Widget::init DynamicHelp $_top {}
|
||||
|
||||
bind BwHelpBalloon <Enter> {DynamicHelp::_motion_balloon enter %W %X %Y}
|
||||
bind BwHelpBalloon <Motion> {DynamicHelp::_motion_balloon motion %W %X %Y}
|
||||
bind BwHelpBalloon <Leave> {DynamicHelp::_motion_balloon leave %W %X %Y}
|
||||
bind BwHelpBalloon <Button> {DynamicHelp::_motion_balloon button %W %X %Y}
|
||||
bind BwHelpBalloon <Destroy> {DynamicHelp::_unset_help %W}
|
||||
|
||||
bind BwHelpVariable <Enter> {DynamicHelp::_motion_info %W}
|
||||
bind BwHelpVariable <Leave> {DynamicHelp::_leave_info %W}
|
||||
bind BwHelpVariable <Destroy> {DynamicHelp::_unset_help %W}
|
||||
|
||||
bind BwHelpMenu <<MenuSelect>> {DynamicHelp::_menu_info select %W}
|
||||
bind BwHelpMenu <Unmap> {DynamicHelp::_menu_info unmap %W}
|
||||
bind BwHelpMenu <Destroy> {DynamicHelp::_unset_help %W}
|
||||
}
|
||||
|
||||
|
||||
# ----------------------------------------------------------------------------
|
||||
# Command DynamicHelp::configure
|
||||
# ----------------------------------------------------------------------------
|
||||
proc DynamicHelp::configure { args } {
|
||||
variable _top
|
||||
variable _delay
|
||||
|
||||
set res [Widget::configure $_top $args]
|
||||
if { [Widget::hasChanged $_top -delay val] } {
|
||||
set _delay $val
|
||||
}
|
||||
|
||||
return $res
|
||||
}
|
||||
|
||||
|
||||
# ----------------------------------------------------------------------------
|
||||
# Command DynamicHelp::include
|
||||
# ----------------------------------------------------------------------------
|
||||
proc DynamicHelp::include { class type } {
|
||||
set helpoptions [list \
|
||||
[list -helptext String "" 0] \
|
||||
[list -helpvar String "" 0] \
|
||||
[list -helpcmd String "" 0] \
|
||||
[list -helptype Enum $type 0 [list balloon variable]] \
|
||||
]
|
||||
Widget::declare $class $helpoptions
|
||||
}
|
||||
|
||||
|
||||
# ----------------------------------------------------------------------------
|
||||
# Command DynamicHelp::sethelp
|
||||
# ----------------------------------------------------------------------------
|
||||
proc DynamicHelp::sethelp { path subpath {force 0}} {
|
||||
foreach {ctype ctext cvar} [Widget::hasChangedX $path \
|
||||
-helptype -helptext -helpvar] break
|
||||
if { $force || $ctype || $ctext || $cvar } {
|
||||
set htype [Widget::cget $path -helptype]
|
||||
switch -- $htype {
|
||||
balloon {
|
||||
return [register $subpath balloon \
|
||||
[Widget::cget $path -helptext]]
|
||||
}
|
||||
variable {
|
||||
return [register $subpath variable \
|
||||
[Widget::cget $path -helpvar] \
|
||||
[Widget::cget $path -helptext]]
|
||||
}
|
||||
}
|
||||
return [register $subpath $htype]
|
||||
}
|
||||
}
|
||||
|
||||
# ----------------------------------------------------------------------------
|
||||
# Command DynamicHelp::register
|
||||
#
|
||||
# DynamicHelp::register path balloon ?itemOrTag? text
|
||||
# DynamicHelp::register path variable ?itemOrTag? text varName
|
||||
# DynamicHelp::register path menu varName
|
||||
# DynamicHelp::register path menuentry index text
|
||||
# ----------------------------------------------------------------------------
|
||||
proc DynamicHelp::register { path type args } {
|
||||
variable _registered
|
||||
|
||||
set len [llength $args]
|
||||
if {$type == "balloon" && $len > 1} {
|
||||
switch -exact -- [winfo class $path] {
|
||||
"Canvas" { set type canvasBalloon }
|
||||
"Text" -
|
||||
"Ctext" { set type textBalloon }
|
||||
}
|
||||
}
|
||||
if {$type == "variable" && $len > 2} {
|
||||
switch -exact -- [winfo class $path] {
|
||||
"Canvas" { set type canvasVariable }
|
||||
"Text" -
|
||||
"Ctext" { set type textVariable }
|
||||
}
|
||||
}
|
||||
|
||||
if { ![winfo exists $path] } {
|
||||
_unset_help $path
|
||||
return 0
|
||||
}
|
||||
|
||||
switch $type {
|
||||
balloon {
|
||||
set text [lindex $args 0]
|
||||
if {$text == ""} {
|
||||
if {[info exists _registered($path,balloon)]} {
|
||||
unset _registered($path,balloon)
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
_add_balloon $path $text
|
||||
}
|
||||
|
||||
canvasBalloon {
|
||||
set tagOrItem [lindex $args 0]
|
||||
set text [lindex $args 1]
|
||||
if {$text == ""} {
|
||||
if {[info exists _registered($path,$tagOrItem,balloon)]} {
|
||||
unset _registered($path,$tagOrItem,balloon)
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
_add_canvas_balloon $path $text $tagOrItem
|
||||
}
|
||||
|
||||
textBalloon {
|
||||
set tagOrItem [lindex $args 0]
|
||||
set text [lindex $args 1]
|
||||
if {$text == ""} {
|
||||
if {[info exists _registered($path,$tagOrItem,balloon)]} {
|
||||
unset _registered($path,$tagOrItem,balloon)
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
_add_text_balloon $path $text $tagOrItem
|
||||
}
|
||||
|
||||
variable {
|
||||
set var [lindex $args 0]
|
||||
set text [lindex $args 1]
|
||||
if {$text == "" || $var == ""} {
|
||||
if {[info exists _registered($path,variable)]} {
|
||||
unset _registered($path,variable)
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
_add_variable $path $text $var
|
||||
}
|
||||
|
||||
canvasVariable {
|
||||
set tagOrItem [lindex $args 0]
|
||||
set var [lindex $args 1]
|
||||
set text [lindex $args 2]
|
||||
if {$text == "" || $var == ""} {
|
||||
if {[info exists _registered($path,$tagOrItem,variable)]} {
|
||||
unset _registered($path,$tagOrItem,variable)
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
_add_canvas_variable $path $text $var $tagOrItem
|
||||
}
|
||||
|
||||
textVariable {
|
||||
set tagOrItem [lindex $args 0]
|
||||
set var [lindex $args 1]
|
||||
set text [lindex $args 2]
|
||||
if {$text == "" || $var == ""} {
|
||||
if {[info exists _registered($path,$tagOrItem,variable)]} {
|
||||
unset _registered($path,$tagOrItem,variable)
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
_add_text_variable $path $text $var $tagOrItem
|
||||
}
|
||||
|
||||
menu {
|
||||
set var [lindex $args 0]
|
||||
if {$var == ""} {
|
||||
set cpath [BWidget::clonename $path]
|
||||
if {[winfo exists $cpath]} { set path $cpath }
|
||||
if {[info exists _registered($path)]} {
|
||||
unset _registered($path)
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
_add_menu $path $var
|
||||
}
|
||||
|
||||
menuentry {
|
||||
set cpath [BWidget::clonename $path]
|
||||
if { [winfo exists $cpath] } { set path $cpath }
|
||||
if {![info exists _registered($path)]} { return 0 }
|
||||
|
||||
set text [lindex $args 1]
|
||||
set index [lindex $args 0]
|
||||
if {$text == "" || $index == ""} {
|
||||
set idx [lsearch $_registered($path) [list $index *]]
|
||||
set _registered($path) [lreplace $_registered($path) $idx $idx]
|
||||
return 0
|
||||
}
|
||||
|
||||
_add_menuentry $path $text $index
|
||||
}
|
||||
|
||||
default {
|
||||
_unset_help $path
|
||||
return 0
|
||||
}
|
||||
}
|
||||
|
||||
return 1
|
||||
}
|
||||
|
||||
|
||||
proc DynamicHelp::add { path args } {
|
||||
variable _registered
|
||||
|
||||
array set data {
|
||||
-type balloon
|
||||
-text ""
|
||||
-item ""
|
||||
-index -1
|
||||
-command ""
|
||||
-variable ""
|
||||
}
|
||||
if {[winfo exists $path] && [winfo class $path] == "Menu"} {
|
||||
set data(-type) menu
|
||||
}
|
||||
array set data $args
|
||||
|
||||
set item $path
|
||||
|
||||
switch -- $data(-type) {
|
||||
"balloon" {
|
||||
if {$data(-item) != ""} {
|
||||
switch -exact -- [winfo class $path] {
|
||||
"Canvas" {
|
||||
_add_canvas_balloon $path $data(-text) $data(-item)
|
||||
set item $path,$data(-item)
|
||||
}
|
||||
"Text" -
|
||||
"Ctext" {
|
||||
_add_text_balloon $path $data(-text) $data(-item)
|
||||
set item $path,$data(-item)
|
||||
}
|
||||
default {
|
||||
_add_balloon $path $data(-text)
|
||||
}
|
||||
}
|
||||
} else {
|
||||
_add_balloon $path $data(-text)
|
||||
}
|
||||
|
||||
if {$data(-variable) != ""} {
|
||||
set _registered($item,balloonVar) $data(-variable)
|
||||
}
|
||||
}
|
||||
|
||||
"variable" {
|
||||
set var $data(-variable)
|
||||
if {$data(-item) != ""} {
|
||||
switch -exact -- [winfo class $path] {
|
||||
"Canvas" {
|
||||
_add_canvas_variable $path $data(-text) $var $data(-item)
|
||||
set item $path,$data(-item)
|
||||
}
|
||||
"Text" -
|
||||
"Ctext" {
|
||||
_add_text_variable $path $data(-text) $var $data(-item)
|
||||
set item $path,$data(-item)
|
||||
}
|
||||
default {
|
||||
_add_variable $path $data(-text) $var
|
||||
}
|
||||
}
|
||||
} else {
|
||||
_add_variable $path $data(-text) $var
|
||||
}
|
||||
}
|
||||
|
||||
"menu" {
|
||||
if {$data(-index) != -1} {
|
||||
set cpath [BWidget::clonename $path]
|
||||
if { [winfo exists $cpath] } { set path $cpath }
|
||||
if {![info exists _registered($path)]} { return 0 }
|
||||
_add_menuentry $path $data(-text) $data(-index)
|
||||
set item $path,$data(-index)
|
||||
} else {
|
||||
_add_menu $path $data(-variable)
|
||||
}
|
||||
}
|
||||
|
||||
default {
|
||||
return 0
|
||||
}
|
||||
}
|
||||
|
||||
if {$data(-command) != ""} {set _registered($item,command) $data(-command)}
|
||||
|
||||
return 1
|
||||
}
|
||||
|
||||
|
||||
proc DynamicHelp::delete { path } {
|
||||
_unset_help $path
|
||||
}
|
||||
|
||||
|
||||
proc DynamicHelp::_add_bind_tag { path tag } {
|
||||
set evt [bindtags $path]
|
||||
set idx [lsearch $evt $tag]
|
||||
set evt [lreplace $evt $idx $idx]
|
||||
lappend evt $tag
|
||||
bindtags $path $evt
|
||||
}
|
||||
|
||||
|
||||
proc DynamicHelp::_add_balloon { path text } {
|
||||
variable _registered
|
||||
set _registered($path,balloon) $text
|
||||
_add_bind_tag $path BwHelpBalloon
|
||||
}
|
||||
|
||||
|
||||
proc DynamicHelp::_add_canvas_balloon { path text tagOrItem } {
|
||||
variable _canvases
|
||||
variable _registered
|
||||
|
||||
set _registered($path,$tagOrItem,balloon) $text
|
||||
|
||||
if {![info exists _canvases($path,balloon)]} {
|
||||
## This canvas doesn't have the bindings yet.
|
||||
|
||||
_add_bind_tag $path BwHelpBalloon
|
||||
|
||||
$path bind BwHelpBalloon <Enter> \
|
||||
{DynamicHelp::_motion_balloon enter %W %X %Y 1}
|
||||
$path bind BwHelpBalloon <Motion> \
|
||||
{DynamicHelp::_motion_balloon motion %W %X %Y 1}
|
||||
$path bind BwHelpBalloon <Leave> \
|
||||
{DynamicHelp::_motion_balloon leave %W %X %Y 1}
|
||||
$path bind BwHelpBalloon <Button> \
|
||||
{DynamicHelp::_motion_balloon button %W %X %Y 1}
|
||||
|
||||
set _canvases($path,balloon) 1
|
||||
}
|
||||
|
||||
$path addtag BwHelpBalloon withtag $tagOrItem
|
||||
}
|
||||
|
||||
|
||||
proc DynamicHelp::_add_text_balloon { path text tagOrItem } {
|
||||
variable _texts
|
||||
variable _registered
|
||||
|
||||
set _registered($path,$tagOrItem,balloon) $text
|
||||
|
||||
if { ![info exists _texts($path,$tagOrItem,balloon)] } {
|
||||
$path tag bind $tagOrItem <Enter> \
|
||||
[list DynamicHelp::_motion_balloon enter $path %X %Y 0 1]
|
||||
$path tag bind $tagOrItem <Motion> \
|
||||
[list DynamicHelp::_motion_balloon motion $path %X %Y 0 1]
|
||||
$path tag bind $tagOrItem <Leave> \
|
||||
[list DynamicHelp::_motion_balloon leave $path %X %Y 0 1]
|
||||
$path tag bind $tagOrItem <Button> \
|
||||
[list DynamicHelp::_motion_balloon button $path %X %Y 0 1]
|
||||
|
||||
set _texts($path,$tagOrItem,balloon) 1
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
proc DynamicHelp::_add_variable { path text varName } {
|
||||
variable _registered
|
||||
set _registered($path,variable) [list $varName $text]
|
||||
_add_bind_tag $path BwHelpVariable
|
||||
}
|
||||
|
||||
|
||||
proc DynamicHelp::_add_canvas_variable { path text varName tagOrItem } {
|
||||
variable _canvases
|
||||
variable _registered
|
||||
|
||||
set _registered($path,$tagOrItem,variable) [list $varName $text]
|
||||
|
||||
if {![info exists _canvases($path,variable)]} {
|
||||
## This canvas doesn't have the bindings yet.
|
||||
|
||||
_add_bind_tag $path BwHelpVariable
|
||||
|
||||
$path bind BwHelpVariable <Enter> \
|
||||
{DynamicHelp::_motion_info %W 1}
|
||||
$path bind BwHelpVariable <Motion> \
|
||||
{DynamicHelp::_motion_info %W 1}
|
||||
$path bind BwHelpVariable <Leave> \
|
||||
{DynamicHelp::_leave_info %W 1}
|
||||
|
||||
set _canvases($path,variable) 1
|
||||
}
|
||||
|
||||
$path addtag BwHelpVariable withtag $tagOrItem
|
||||
}
|
||||
|
||||
|
||||
proc DynamicHelp::_add_text_variable { path text varName tagOrItem } {
|
||||
variable _texts
|
||||
variable _registered
|
||||
|
||||
set _registered($path,$tagOrItem,variable) [list $varName $text]
|
||||
|
||||
if {![info exists _texts($path,$tagOrItem,variable)]} {
|
||||
|
||||
$path tag bind $tagOrItem <Enter> \
|
||||
[list DynamicHelp::_motion_info $path 0 1]
|
||||
$path tag bind $tagOrItem <Motion> \
|
||||
[list DynamicHelp::_motion_info $path 0 1]
|
||||
$path tag bind $tagOrItem <Leave> \
|
||||
[list DynamicHelp::_leave_info $path 0 1]
|
||||
|
||||
set _texts($path,$tagOrItem,variable) 1
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
proc DynamicHelp::_add_menu { path varName } {
|
||||
variable _registered
|
||||
|
||||
set cpath [BWidget::clonename $path]
|
||||
if { [winfo exists $cpath] } { set path $cpath }
|
||||
|
||||
set _registered($path) [list $varName]
|
||||
_add_bind_tag $path BwHelpMenu
|
||||
}
|
||||
|
||||
|
||||
proc DynamicHelp::_add_menuentry { path text index } {
|
||||
variable _registered
|
||||
|
||||
set idx [lsearch $_registered($path) [list $index *]]
|
||||
set list [list $index $text]
|
||||
if { $idx == -1 } {
|
||||
lappend _registered($path) $list
|
||||
} else {
|
||||
set _registered($path) \
|
||||
[lreplace $_registered($path) $idx $idx $list]
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
# ----------------------------------------------------------------------------
|
||||
# Command DynamicHelp::_motion_balloon
|
||||
# ----------------------------------------------------------------------------
|
||||
proc DynamicHelp::_motion_balloon { type path x y {isCanvasItem 0} {isTextItem 0} } {
|
||||
variable _top
|
||||
variable _id
|
||||
variable _delay
|
||||
variable _current_balloon
|
||||
|
||||
set w $path
|
||||
if {$isCanvasItem} {
|
||||
set path [_get_canvas_path $path balloon]
|
||||
} elseif {$isTextItem} {
|
||||
set path [_get_text_path $path balloon]
|
||||
}
|
||||
|
||||
if { $_current_balloon != $path && $type == "enter" } {
|
||||
set _current_balloon $path
|
||||
set type "motion"
|
||||
destroy $_top
|
||||
}
|
||||
if { $_current_balloon == $path } {
|
||||
if { $_id != "" } {
|
||||
after cancel $_id
|
||||
set _id ""
|
||||
}
|
||||
if { $type == "motion" } {
|
||||
if { ![winfo exists $_top] } {
|
||||
set cmd [list DynamicHelp::_show_help $path $w $x $y]
|
||||
set _id [after $_delay $cmd]
|
||||
}
|
||||
# Bug 923942 proposes to destroy on motion to remove dynhelp on motion.
|
||||
# this might be an optional behaviour in future versions
|
||||
} else {
|
||||
destroy $_top
|
||||
set _current_balloon ""
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
# ----------------------------------------------------------------------------
|
||||
# Command DynamicHelp::_motion_info
|
||||
# ----------------------------------------------------------------------------
|
||||
proc DynamicHelp::_motion_info { path {isCanvasItem 0} {isTextItem 0} } {
|
||||
variable _saved
|
||||
variable _registered
|
||||
variable _current_variable
|
||||
|
||||
if {$isCanvasItem} {
|
||||
set path [_get_canvas_path $path variable]
|
||||
} elseif {$isTextItem} {
|
||||
set path [_get_text_path $path variable]
|
||||
}
|
||||
|
||||
if { $_current_variable != $path
|
||||
&& [info exists _registered($path,variable)] } {
|
||||
|
||||
set varName [lindex $_registered($path,variable) 0]
|
||||
if {![info exists _saved]} { set _saved [GlobalVar::getvar $varName] }
|
||||
set string [lindex $_registered($path,variable) 1]
|
||||
if {[info exists _registered($path,command)]} {
|
||||
set string [uplevel #0 $_registered($path,command)]
|
||||
}
|
||||
GlobalVar::setvar $varName $string
|
||||
set _current_variable $path
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
# ----------------------------------------------------------------------------
|
||||
# Command DynamicHelp::_leave_info
|
||||
# Leave event may be called twice (in case of pointer grab)
|
||||
# ----------------------------------------------------------------------------
|
||||
proc DynamicHelp::_leave_info { path {isCanvasItem 0} {isTextItem 0} } {
|
||||
variable _saved
|
||||
variable _registered
|
||||
variable _current_variable
|
||||
|
||||
if {$isCanvasItem} {
|
||||
set path [_get_canvas_path $path variable]
|
||||
} elseif {$isTextItem} {
|
||||
set path [_get_text_path $path variable]
|
||||
}
|
||||
|
||||
if { [string equal $_current_variable $path] \
|
||||
&& [info exists _registered($path,variable)] } {
|
||||
set varName [lindex $_registered($path,variable) 0]
|
||||
GlobalVar::setvar $varName $_saved
|
||||
unset _saved
|
||||
set _current_variable ""
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
# ----------------------------------------------------------------------------
|
||||
# Command DynamicHelp::_menu_info
|
||||
# ----------------------------------------------------------------------------
|
||||
# We have to check for unmap event on Unix. On Windows, unmap
|
||||
# is not delivered, but <<MenuSelect>> is triggered appropriately when menu
|
||||
# is unmapped.
|
||||
proc DynamicHelp::_menu_info { event path } {
|
||||
variable _registered
|
||||
|
||||
if { [info exists _registered($path)] } {
|
||||
set index [$path index active]
|
||||
set varName [lindex $_registered($path) 0]
|
||||
if { ![string equal $event "unmap"] &&
|
||||
![string equal $index "none"] &&
|
||||
[set idx [lsearch $_registered($path) [list $index *]]] != -1 } {
|
||||
set string [lindex [lindex $_registered($path) $idx] 1]
|
||||
if {[info exists _registered($path,$index,command)]} {
|
||||
set string [uplevel #0 $_registered($path,$index,command)]
|
||||
}
|
||||
GlobalVar::setvar $varName $string
|
||||
} else {
|
||||
GlobalVar::setvar $varName ""
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
# ----------------------------------------------------------------------------
|
||||
# Command DynamicHelp::_show_help
|
||||
# ----------------------------------------------------------------------------
|
||||
proc DynamicHelp::_show_help { path w x y } {
|
||||
variable _top
|
||||
variable _registered
|
||||
variable _id
|
||||
variable _delay
|
||||
|
||||
if { [Widget::getoption $_top -state] == "disabled" } { return }
|
||||
|
||||
if { [info exists _registered($path,balloon)] } {
|
||||
destroy $_top
|
||||
|
||||
set string $_registered($path,balloon)
|
||||
|
||||
if {[info exists _registered($path,balloonVar)]} {
|
||||
upvar #0 $_registered($path,balloonVar) var
|
||||
if {[info exists var]} { set string $var }
|
||||
}
|
||||
|
||||
if {[info exists _registered($path,command)]} {
|
||||
set string [uplevel #0 $_registered($path,command)]
|
||||
}
|
||||
|
||||
if {$string == ""} { return }
|
||||
|
||||
toplevel $_top -relief flat \
|
||||
-bg [Widget::getoption $_top -topbackground] \
|
||||
-bd [Widget::getoption $_top -borderwidth] \
|
||||
-screen [winfo screen $w]
|
||||
|
||||
wm withdraw $_top
|
||||
if { $Widget::_aqua } {
|
||||
::tk::unsupported::MacWindowStyle style $_top help none
|
||||
} else {
|
||||
wm overrideredirect $_top 1
|
||||
}
|
||||
|
||||
catch { wm attributes $_top -topmost 1 }
|
||||
|
||||
label $_top.label -text $string \
|
||||
-relief flat -bd 0 -highlightthickness 0 \
|
||||
-padx [Widget::getoption $_top -padx] \
|
||||
-pady [Widget::getoption $_top -pady] \
|
||||
-foreground [Widget::getoption $_top -foreground] \
|
||||
-background [Widget::getoption $_top -background] \
|
||||
-font [Widget::getoption $_top -font] \
|
||||
-justify [Widget::getoption $_top -justify]
|
||||
|
||||
|
||||
pack $_top.label -side left
|
||||
update idletasks
|
||||
|
||||
if {![winfo exists $_top]} {return}
|
||||
|
||||
set scrwidth [winfo vrootwidth .]
|
||||
set scrheight [winfo vrootheight .]
|
||||
set width [winfo reqwidth $_top]
|
||||
set height [winfo reqheight $_top]
|
||||
|
||||
# On windows multi screen configurations, the virtual screen may start
|
||||
# at negative positions.
|
||||
set scrrootx [winfo vrootx .]
|
||||
set scrrooty [winfo vrooty .]
|
||||
|
||||
# Increment the required size by the deplacement from the passed point
|
||||
incr width 8
|
||||
incr height 12
|
||||
|
||||
# Put at the right border if going over it
|
||||
if { $x+$width > $scrrootx+$scrwidth } {
|
||||
set x [expr {$scrwidth + $scrrootx - $width + 8}]
|
||||
} else {
|
||||
incr x 8
|
||||
}
|
||||
# Put above widget if below is no space
|
||||
if { $y+$height > $scrrooty+$scrheight } {
|
||||
set y [expr {$y - $height}]
|
||||
} else {
|
||||
incr y 12
|
||||
}
|
||||
|
||||
wm geometry $_top "+$x+$y"
|
||||
update idletasks
|
||||
|
||||
if {![winfo exists $_top]} { return }
|
||||
wm deiconify $_top
|
||||
raise $_top
|
||||
# Sometimes the tooltip does not occur under
|
||||
# gnome/metacity on ubuntu.
|
||||
after 5;
|
||||
}
|
||||
}
|
||||
|
||||
# ----------------------------------------------------------------------------
|
||||
# Command DynamicHelp::_unset_help
|
||||
# ----------------------------------------------------------------------------
|
||||
proc DynamicHelp::_unset_help { path } {
|
||||
variable _canvases
|
||||
variable _texts
|
||||
variable _registered
|
||||
variable _top
|
||||
variable _current_balloon
|
||||
|
||||
if {[info exists _registered($path)]} { unset _registered($path) }
|
||||
if {[winfo exists $path]} {
|
||||
set cpath [BWidget::clonename $path]
|
||||
if {[info exists _registered($cpath)]} { unset _registered($cpath) }
|
||||
}
|
||||
array unset _canvases $path,*
|
||||
array unset _texts $path,*
|
||||
array unset _registered $path,*
|
||||
if {[string equal $path $_current_balloon]} {destroy $_top}
|
||||
}
|
||||
|
||||
# ----------------------------------------------------------------------------
|
||||
# Command DynamicHelp::_get_canvas_path
|
||||
# ----------------------------------------------------------------------------
|
||||
proc DynamicHelp::_get_canvas_path { path type {item ""} } {
|
||||
variable _registered
|
||||
|
||||
if {$item == ""} { set item [$path find withtag current] }
|
||||
|
||||
## Check the tags related to this item for the one that
|
||||
## represents our text. If we have text specific to this
|
||||
## item or for 'all' items, they override any other tags.
|
||||
eval [list lappend tags $item all] [$path itemcget $item -tags]
|
||||
foreach tag $tags {
|
||||
set check $path,$tag
|
||||
if {![info exists _registered($check,$type)]} { continue }
|
||||
return $check
|
||||
}
|
||||
|
||||
return $path
|
||||
}
|
||||
|
||||
# ----------------------------------------------------------------------------
|
||||
# Command DynamicHelp::_get_text_path
|
||||
# ----------------------------------------------------------------------------
|
||||
proc DynamicHelp::_get_text_path { path type {item ""} } {
|
||||
variable _registered
|
||||
|
||||
if {$item == ""} { set item [$path tag names current] }
|
||||
|
||||
## Check the tags related to this item for the one that
|
||||
## represents our text. If we have text specific to this
|
||||
## item or for 'all' items, they override any other tags.
|
||||
eval [list lappend tags $item all] $item
|
||||
foreach tag $tags {
|
||||
set check $path,$tag
|
||||
if {![info exists _registered($check,$type)]} { continue }
|
||||
return $check
|
||||
}
|
||||
|
||||
return $path
|
||||
}
|
525
R_portable/R/App/R-portable/Tcl/bin64/lib/bwidget-1.9.12/entry.tcl
Executable file
@ -0,0 +1,525 @@
|
||||
# ------------------------------------------------------------------------------
|
||||
# entry.tcl
|
||||
# This file is part of Unifix BWidget Toolkit
|
||||
# $Id: entry.tcl,v 1.22.2.2 2012/04/02 09:53:41 oehhar Exp $
|
||||
# ------------------------------------------------------------------------------
|
||||
# Index of commands:
|
||||
# - Entry::create
|
||||
# - Entry::configure
|
||||
# - Entry::cget
|
||||
# - Entry::_destroy
|
||||
# - Entry::_init_drag_cmd
|
||||
# - Entry::_end_drag_cmd
|
||||
# - Entry::_drop_cmd
|
||||
# - Entry::_over_cmd
|
||||
# - Entry::_auto_scroll
|
||||
# - Entry::_scroll
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
namespace eval Entry {
|
||||
Widget::define Entry entry DragSite DropSite DynamicHelp
|
||||
|
||||
# Note: -textvariable is pulled off of the tk entry and put onto the
|
||||
# BW Entry so that we avoid the TkResource test for it, which screws up
|
||||
# the existance/non-existance bits of the -textvariable.
|
||||
if {[Widget::theme]} {
|
||||
Widget::tkinclude Entry ttk::entry :cmd \
|
||||
remove { -state -textvariable }
|
||||
} else {
|
||||
Widget::tkinclude Entry entry :cmd \
|
||||
remove { -state -background -foreground -textvariable
|
||||
-disabledforeground -disabledbackground }
|
||||
}
|
||||
|
||||
set declare [list \
|
||||
[list -state Enum normal 0 [list normal disabled]] \
|
||||
[list -text String "" 0] \
|
||||
[list -textvariable String "" 0] \
|
||||
[list -editable Boolean 1 0] \
|
||||
[list -command String "" 0] \
|
||||
]
|
||||
if {![Widget::theme]} {
|
||||
lappend declare \
|
||||
[list -background TkResource "" 0 entry] \
|
||||
[list -foreground TkResource "" 0 entry] \
|
||||
[list -relief TkResource "" 0 entry] \
|
||||
[list -borderwidth TkResource "" 0 entry] \
|
||||
[list -fg Synonym -foreground] \
|
||||
[list -bg Synonym -background] \
|
||||
[list -bd Synonym -borderwidth]
|
||||
|
||||
if {![package vsatisfies [package provide Tk] 8.4]} {
|
||||
## If we're not running version 8.4 or higher, get our
|
||||
## disabled resources from the button widget.
|
||||
lappend declare [list -disabledforeground TkResource "" 0 button]
|
||||
lappend declare [list -disabledbackground TkResource "" 0 \
|
||||
{button -background}]
|
||||
} else {
|
||||
lappend declare [list -disabledforeground TkResource "" 0 entry]
|
||||
lappend declare [list -disabledbackground TkResource "" 0 entry]
|
||||
}
|
||||
}
|
||||
|
||||
Widget::declare Entry $declare
|
||||
Widget::addmap Entry "" :cmd { -textvariable {} }
|
||||
|
||||
DynamicHelp::include Entry balloon
|
||||
DragSite::include Entry "" 3
|
||||
DropSite::include Entry {
|
||||
TEXT {move {}}
|
||||
FGCOLOR {move {}}
|
||||
BGCOLOR {move {}}
|
||||
COLOR {move {}}
|
||||
}
|
||||
|
||||
if {[Widget::theme]} {
|
||||
foreach event [bind TEntry] {
|
||||
bind BwEntry $event [bind TEntry $event]
|
||||
}
|
||||
} else {
|
||||
foreach event [bind Entry] {
|
||||
bind BwEntry $event [bind Entry $event]
|
||||
}
|
||||
}
|
||||
|
||||
# Copy is kind of a special event. It should be enabled when the
|
||||
# widget is editable but not disabled, and not when the widget is disabled.
|
||||
# To make this a bit easier to manage, we will handle it separately.
|
||||
|
||||
bind BwEntry <<Copy>> {}
|
||||
bind BwEditableEntry <<Copy>> [bind Entry <<Copy>>]
|
||||
|
||||
bind BwEntry <Return> [list Entry::invoke %W]
|
||||
bind BwEntry <Destroy> [list Entry::_destroy %W]
|
||||
bind BwDisabledEntry <Destroy> [list Entry::_destroy %W]
|
||||
}
|
||||
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
# Command Entry::create
|
||||
# ------------------------------------------------------------------------------
|
||||
proc Entry::create { path args } {
|
||||
variable $path
|
||||
upvar 0 $path data
|
||||
|
||||
array set maps [list Entry {} :cmd {}]
|
||||
array set maps [Widget::parseArgs Entry $args]
|
||||
|
||||
set data(afterid) ""
|
||||
if {[Widget::theme]} {
|
||||
eval [list ttk::entry $path] $maps(:cmd)
|
||||
} else {
|
||||
eval [list entry $path] $maps(:cmd)
|
||||
}
|
||||
Widget::initFromODB Entry $path $maps(Entry)
|
||||
set state [Widget::getMegawidgetOption $path -state]
|
||||
set editable [Widget::getMegawidgetOption $path -editable]
|
||||
set text [Widget::getMegawidgetOption $path -text]
|
||||
if { $editable && [string equal $state "normal"] } {
|
||||
bindtags $path [list $path BwEntry [winfo toplevel $path] all]
|
||||
if {[Widget::theme]} {
|
||||
$path configure -takefocus 1
|
||||
} else {
|
||||
$path configure -takefocus 1 -insertontime 600
|
||||
}
|
||||
} else {
|
||||
bindtags $path [list $path BwDisabledEntry [winfo toplevel $path] all]
|
||||
if {[Widget::theme]} {
|
||||
$path configure -takefocus 0
|
||||
} else {
|
||||
$path configure -takefocus 0 -insertontime 0
|
||||
}
|
||||
}
|
||||
if { $editable == 0 } {
|
||||
$path configure -cursor left_ptr
|
||||
}
|
||||
if { [string equal $state "disabled"] } {
|
||||
if {[Widget::theme]} {
|
||||
$path state disabled
|
||||
} else {
|
||||
$path configure \
|
||||
-foreground [Widget::getMegawidgetOption $path -disabledforeground] \
|
||||
-background [Widget::getMegawidgetOption $path -disabledbackground]
|
||||
}
|
||||
} else {
|
||||
if {![Widget::theme]} {
|
||||
$path configure \
|
||||
-foreground [Widget::getMegawidgetOption $path -foreground] \
|
||||
-background [Widget::getMegawidgetOption $path -background]
|
||||
}
|
||||
bindtags $path [linsert [bindtags $path] 2 BwEditableEntry]
|
||||
}
|
||||
if { [string length $text] } {
|
||||
set varName [$path cget -textvariable]
|
||||
if { ![string equal $varName ""] } {
|
||||
uplevel \#0 [list set $varName [Widget::cget $path -text]]
|
||||
} else {
|
||||
set validateState [$path cget -validate]
|
||||
$path configure -validate none
|
||||
$path delete 0 end
|
||||
$path configure -validate $validateState
|
||||
$path insert 0 [Widget::getMegawidgetOption $path -text]
|
||||
}
|
||||
}
|
||||
|
||||
DragSite::setdrag $path $path Entry::_init_drag_cmd Entry::_end_drag_cmd 1
|
||||
DropSite::setdrop $path $path Entry::_over_cmd Entry::_drop_cmd 1
|
||||
DynamicHelp::sethelp $path $path 1
|
||||
|
||||
Widget::create Entry $path
|
||||
proc ::$path { cmd args } \
|
||||
"return \[Entry::_path_command [list $path] \$cmd \$args\]"
|
||||
return $path
|
||||
}
|
||||
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
# Command Entry::configure
|
||||
# ------------------------------------------------------------------------------
|
||||
proc Entry::configure { path args } {
|
||||
# Cheat by setting the -text value to the current contents of the entry
|
||||
# This might be better hidden behind a function in ::Widget.
|
||||
set Widget::Entry::${path}:opt(-text) [$path:cmd get]
|
||||
|
||||
set res [Widget::configure $path $args]
|
||||
|
||||
# Extract the modified bits that we are interested in.
|
||||
if {[Widget::theme]} {
|
||||
set vars [list chstate cheditable chtext]
|
||||
set opts [list -state -editable -text]
|
||||
} else {
|
||||
set vars [list chstate cheditable chfg chdfg chbg chdbg chtext]
|
||||
set opts [list -state -editable -foreground -disabledforeground \
|
||||
-background -disabledbackground -text]
|
||||
}
|
||||
foreach $vars [eval [linsert $opts 0 Widget::hasChangedX $path]] { break }
|
||||
|
||||
if { $chstate || $cheditable } {
|
||||
set state [Widget::getMegawidgetOption $path -state]
|
||||
set editable [Widget::getMegawidgetOption $path -editable]
|
||||
set btags [bindtags $path]
|
||||
if { $editable && [string equal $state "normal"] } {
|
||||
set idx [lsearch $btags BwDisabledEntry]
|
||||
if { $idx != -1 } {
|
||||
bindtags $path [lreplace $btags $idx $idx BwEntry]
|
||||
}
|
||||
if {[Widget::theme]} {
|
||||
$path:cmd configure -takefocus 1
|
||||
} else {
|
||||
$path:cmd configure -takefocus 1 -insertontime 600
|
||||
}
|
||||
} else {
|
||||
set idx [lsearch $btags BwEntry]
|
||||
if { $idx != -1 } {
|
||||
bindtags $path [lreplace $btags $idx $idx BwDisabledEntry]
|
||||
}
|
||||
if {[Widget::theme]} {
|
||||
$path:cmd configure -takefocus 0
|
||||
} else {
|
||||
$path:cmd configure -takefocus 0 -insertontime 0
|
||||
}
|
||||
if { [string equal [focus] $path] } {
|
||||
focus .
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if { [Widget::theme] && $chstate } {
|
||||
set state [Widget::getMegawidgetOption $path -state]
|
||||
if { [string equal $state "disabled"] } {
|
||||
$path:cmd state disabled
|
||||
} else {
|
||||
$path:cmd state !disabled
|
||||
}
|
||||
}
|
||||
if { ![Widget::theme] && ($chstate || $chfg || $chdfg || $chbg || $chdbg) } {
|
||||
set state [Widget::getMegawidgetOption $path -state]
|
||||
if { [string equal $state "disabled"] } {
|
||||
$path:cmd configure \
|
||||
-fg [Widget::cget $path -disabledforeground] \
|
||||
-bg [Widget::cget $path -disabledbackground]
|
||||
} else {
|
||||
$path:cmd configure \
|
||||
-fg [Widget::cget $path -foreground] \
|
||||
-bg [Widget::cget $path -background]
|
||||
}
|
||||
}
|
||||
if { $chstate } {
|
||||
if { [string equal $state "disabled"] } {
|
||||
set idx [lsearch -exact [bindtags $path] BwEditableEntry]
|
||||
if { $idx != -1 } {
|
||||
bindtags $path [lreplace [bindtags $path] $idx $idx]
|
||||
}
|
||||
} else {
|
||||
set idx [expr {[lsearch [bindtags $path] Bw*Entry] + 1}]
|
||||
bindtags $path [linsert [bindtags $path] $idx BwEditableEntry]
|
||||
}
|
||||
}
|
||||
|
||||
if { $cheditable } {
|
||||
if { $editable } {
|
||||
$path:cmd configure -cursor xterm
|
||||
} else {
|
||||
$path:cmd configure -cursor left_ptr
|
||||
}
|
||||
}
|
||||
|
||||
if { $chtext } {
|
||||
# Oh my lordee-ba-goordee
|
||||
# Do some magic to prevent multiple validation command firings.
|
||||
# If there is a textvariable, set that to the right value; if not,
|
||||
# disable validation, delete the old text, enable, then set the text.
|
||||
set varName [$path:cmd cget -textvariable]
|
||||
if { ![string equal $varName ""] } {
|
||||
uplevel \#0 [list set $varName \
|
||||
[Widget::getMegawidgetOption $path -text]]
|
||||
} else {
|
||||
set validateState [$path:cmd cget -validate]
|
||||
$path:cmd configure -validate none
|
||||
$path:cmd delete 0 end
|
||||
$path:cmd configure -validate $validateState
|
||||
$path:cmd insert 0 [Widget::getMegawidgetOption $path -text]
|
||||
}
|
||||
}
|
||||
|
||||
DragSite::setdrag $path $path Entry::_init_drag_cmd Entry::_end_drag_cmd
|
||||
DropSite::setdrop $path $path Entry::_over_cmd Entry::_drop_cmd
|
||||
DynamicHelp::sethelp $path $path
|
||||
|
||||
return $res
|
||||
}
|
||||
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
# Command Entry::cget
|
||||
# ------------------------------------------------------------------------------
|
||||
proc Entry::cget { path option } {
|
||||
if { [string equal "-text" $option] } {
|
||||
return [$path:cmd get]
|
||||
}
|
||||
Widget::cget $path $option
|
||||
}
|
||||
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
# Command Entry::invoke
|
||||
# ------------------------------------------------------------------------------
|
||||
proc Entry::invoke { path } {
|
||||
if {[llength [set cmd [Widget::getMegawidgetOption $path -command]]]} {
|
||||
uplevel \#0 $cmd
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
# Command Entry::_path_command
|
||||
# ------------------------------------------------------------------------------
|
||||
proc Entry::_path_command { path cmd larg } {
|
||||
switch -exact -- $cmd {
|
||||
configure - cget - invoke {
|
||||
return [eval [linsert $larg 0 Entry::$cmd $path]]
|
||||
}
|
||||
default {
|
||||
return [uplevel 2 [linsert $larg 0 $path:cmd $cmd]]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
# Command Entry::_init_drag_cmd
|
||||
# ------------------------------------------------------------------------------
|
||||
proc Entry::_init_drag_cmd { path X Y top } {
|
||||
variable $path
|
||||
upvar 0 $path data
|
||||
|
||||
if {[llength [set cmd [Widget::getoption $path -draginitcmd]]]} {
|
||||
return [uplevel \#0 $cmd [list $path $X $Y $top]]
|
||||
}
|
||||
set type [Widget::getoption $path -dragtype]
|
||||
if { $type == "" } {
|
||||
set type "TEXT"
|
||||
}
|
||||
if { [set drag [$path get]] != "" } {
|
||||
if { [$path:cmd selection present] } {
|
||||
set idx [$path:cmd index @[expr {$X-[winfo rootx $path]}]]
|
||||
set sel0 [$path:cmd index sel.first]
|
||||
set sel1 [expr {[$path:cmd index sel.last]-1}]
|
||||
if { $idx >= $sel0 && $idx <= $sel1 } {
|
||||
set drag [string range $drag $sel0 $sel1]
|
||||
set data(dragstart) $sel0
|
||||
set data(dragend) [expr {$sel1+1}]
|
||||
if { ![Widget::getoption $path -editable] ||
|
||||
[Widget::getoption $path -state] == "disabled" } {
|
||||
return [list $type {copy} $drag]
|
||||
} else {
|
||||
return [list $type {copy move} $drag]
|
||||
}
|
||||
}
|
||||
} else {
|
||||
set data(dragstart) 0
|
||||
set data(dragend) end
|
||||
if { ![Widget::getoption $path -editable] ||
|
||||
[Widget::getoption $path -state] == "disabled" } {
|
||||
return [list $type {copy} $drag]
|
||||
} else {
|
||||
return [list $type {copy move} $drag]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
# Command Entry::_end_drag_cmd
|
||||
# ------------------------------------------------------------------------------
|
||||
proc Entry::_end_drag_cmd { path target op type dnddata result } {
|
||||
variable $path
|
||||
upvar 0 $path data
|
||||
|
||||
if {[llength [set cmd [Widget::getoption $path -dragendcmd]]]} {
|
||||
return [uplevel \#0 $cmd [list $path $target $op $type $dnddata $result]]
|
||||
}
|
||||
if { $result && $op == "move" && $path != $target } {
|
||||
$path:cmd delete $data(dragstart) $data(dragend)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
# Command Entry::_drop_cmd
|
||||
# ------------------------------------------------------------------------------
|
||||
proc Entry::_drop_cmd { path source X Y op type dnddata } {
|
||||
variable $path
|
||||
upvar 0 $path data
|
||||
|
||||
if { $data(afterid) != "" } {
|
||||
after cancel $data(afterid)
|
||||
set data(afterid) ""
|
||||
}
|
||||
if {[llength [set cmd [Widget::getoption $path -dropcmd]]]} {
|
||||
set idx [$path:cmd index @[expr {$X-[winfo rootx $path]}]]
|
||||
return [uplevel \#0 $cmd [list $path $source $idx $op $type $dnddata]]
|
||||
}
|
||||
if { $type == "COLOR" || $type == "FGCOLOR" } {
|
||||
configure $path -foreground $dnddata
|
||||
} elseif { $type == "BGCOLOR" } {
|
||||
configure $path -background $dnddata
|
||||
} else {
|
||||
$path:cmd icursor @[expr {$X-[winfo rootx $path]}]
|
||||
if { $op == "move" && $path == $source } {
|
||||
$path:cmd delete $data(dragstart) $data(dragend)
|
||||
}
|
||||
set sel0 [$path index insert]
|
||||
$path:cmd insert insert $dnddata
|
||||
set sel1 [$path index insert]
|
||||
$path:cmd selection range $sel0 $sel1
|
||||
}
|
||||
return 1
|
||||
}
|
||||
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
# Command Entry::_over_cmd
|
||||
# ------------------------------------------------------------------------------
|
||||
proc Entry::_over_cmd { path source event X Y op type dnddata } {
|
||||
variable $path
|
||||
upvar 0 $path data
|
||||
|
||||
set x [expr {$X-[winfo rootx $path]}]
|
||||
if { [string equal $event "leave"] } {
|
||||
if { [string length $data(afterid)] } {
|
||||
after cancel $data(afterid)
|
||||
set data(afterid) ""
|
||||
}
|
||||
} elseif { [_auto_scroll $path $x] } {
|
||||
return 2
|
||||
}
|
||||
|
||||
if {[llength [set cmd [Widget::getoption $path -dropovercmd]]]} {
|
||||
set x [expr {$X-[winfo rootx $path]}]
|
||||
set idx [$path:cmd index @$x]
|
||||
set res [uplevel \#0 $cmd [list $path $source $event $idx $op $type $dnddata]]
|
||||
return $res
|
||||
}
|
||||
|
||||
if { [string equal $type "COLOR"] ||
|
||||
[string equal $type "FGCOLOR"] ||
|
||||
[string equal $type "BGCOLOR"] } {
|
||||
DropSite::setcursor based_arrow_down
|
||||
return 1
|
||||
}
|
||||
if { [Widget::getoption $path -editable]
|
||||
&& [string equal [Widget::getoption $path -state] "normal"] } {
|
||||
if { ![string equal $event "leave"] } {
|
||||
$path:cmd selection clear
|
||||
$path:cmd icursor @$x
|
||||
DropSite::setcursor based_arrow_down
|
||||
return 3
|
||||
}
|
||||
}
|
||||
DropSite::setcursor dot
|
||||
return 0
|
||||
}
|
||||
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
# Command Entry::_auto_scroll
|
||||
# ------------------------------------------------------------------------------
|
||||
proc Entry::_auto_scroll { path x } {
|
||||
variable $path
|
||||
upvar 0 $path data
|
||||
|
||||
set xmax [winfo width $path]
|
||||
if { $x <= 10 && [$path:cmd index @0] > 0 } {
|
||||
if { $data(afterid) == "" } {
|
||||
set data(afterid) [after 100 [list Entry::_scroll $path -1 $x $xmax]]
|
||||
DropSite::setcursor sb_left_arrow
|
||||
}
|
||||
return 1
|
||||
} else {
|
||||
if { $x >= $xmax-10 && [$path:cmd index @$xmax] < [$path:cmd index end] } {
|
||||
if { $data(afterid) == "" } {
|
||||
set data(afterid) [after 100 [list Entry::_scroll $path 1 $x $xmax]]
|
||||
DropSite::setcursor sb_right_arrow
|
||||
}
|
||||
return 1
|
||||
} else {
|
||||
if { $data(afterid) != "" } {
|
||||
after cancel $data(afterid)
|
||||
set data(afterid) ""
|
||||
}
|
||||
}
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
# Command Entry::_scroll
|
||||
# ------------------------------------------------------------------------------
|
||||
proc Entry::_scroll { path dir x xmax } {
|
||||
variable $path
|
||||
upvar 0 $path data
|
||||
|
||||
$path:cmd xview scroll $dir units
|
||||
$path:cmd icursor @$x
|
||||
if { ($dir == -1 && [$path:cmd index @0] > 0) ||
|
||||
($dir == 1 && [$path:cmd index @$xmax] < [$path:cmd index end]) } {
|
||||
set data(afterid) [after 100 [list Entry::_scroll $path $dir $x $xmax]]
|
||||
} else {
|
||||
set data(afterid) ""
|
||||
DropSite::setcursor dot
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
# Command Entry::_destroy
|
||||
# ------------------------------------------------------------------------------
|
||||
proc Entry::_destroy { path } {
|
||||
variable $path
|
||||
upvar 0 $path data
|
||||
Widget::destroy $path
|
||||
unset data
|
||||
}
|
571
R_portable/R/App/R-portable/Tcl/bin64/lib/bwidget-1.9.12/font.tcl
Executable file
@ -0,0 +1,571 @@
|
||||
# ----------------------------------------------------------------------------
|
||||
# font.tcl
|
||||
# This file is part of Unifix BWidget Toolkit
|
||||
# ----------------------------------------------------------------------------
|
||||
# Index of commands:
|
||||
# - SelectFont::create
|
||||
# - SelectFont::configure
|
||||
# - SelectFont::cget
|
||||
# - SelectFont::_draw
|
||||
# - SelectFont::_destroy
|
||||
# - SelectFont::_modstyle
|
||||
# - SelectFont::_update
|
||||
# - SelectFont::_getfont
|
||||
# - SelectFont::_init
|
||||
# ----------------------------------------------------------------------------
|
||||
|
||||
namespace eval SelectFont {
|
||||
Widget::define SelectFont font Dialog LabelFrame ScrolledWindow
|
||||
|
||||
Widget::declare SelectFont {
|
||||
{-title String "Font selection" 0}
|
||||
{-parent String "" 0}
|
||||
{-background TkResource "" 0 frame}
|
||||
|
||||
{-type Enum dialog 0 {dialog toolbar}}
|
||||
{-font TkResource "" 0 label}
|
||||
{-initialcolor String "" 0}
|
||||
{-families String "all" 1}
|
||||
{-querysystem Boolean 1 0}
|
||||
{-nosizes Boolean 0 1}
|
||||
{-styles String "bold italic underline overstrike" 1}
|
||||
{-command String "" 0}
|
||||
{-sampletext String "Sample Text" 0}
|
||||
{-bg Synonym -background}
|
||||
}
|
||||
|
||||
variable _families
|
||||
variable _styleOff
|
||||
array set _styleOff [list bold normal italic roman]
|
||||
variable _sizes {4 5 6 7 8 9 10 11 12 13 14 15 16 \
|
||||
17 18 19 20 21 22 23 24}
|
||||
|
||||
# Set up preset lists of fonts, so the user can avoid the painfully slow
|
||||
# loadfont process if desired.
|
||||
if { [string equal $::tcl_platform(platform) "windows"] } {
|
||||
set presetVariable [list \
|
||||
7x14 \
|
||||
Arial \
|
||||
{Arial Narrow} \
|
||||
{Lucida Sans} \
|
||||
{MS Sans Serif} \
|
||||
{MS Serif} \
|
||||
{Times New Roman} \
|
||||
]
|
||||
set presetFixed [list \
|
||||
6x13 \
|
||||
{Courier New} \
|
||||
FixedSys \
|
||||
Terminal \
|
||||
]
|
||||
set presetAll [list \
|
||||
6x13 \
|
||||
7x14 \
|
||||
Arial \
|
||||
{Arial Narrow} \
|
||||
{Courier New} \
|
||||
FixedSys \
|
||||
{Lucida Sans} \
|
||||
{MS Sans Serif} \
|
||||
{MS Serif} \
|
||||
Terminal \
|
||||
{Times New Roman} \
|
||||
]
|
||||
} else {
|
||||
set presetVariable [list \
|
||||
helvetica \
|
||||
lucida \
|
||||
lucidabright \
|
||||
{times new roman} \
|
||||
]
|
||||
set presetFixed [list \
|
||||
courier \
|
||||
fixed \
|
||||
{lucida typewriter} \
|
||||
screen \
|
||||
serif \
|
||||
terminal \
|
||||
]
|
||||
set presetAll [list \
|
||||
courier \
|
||||
fixed \
|
||||
helvetica \
|
||||
lucida \
|
||||
lucidabright \
|
||||
{lucida typewriter} \
|
||||
screen \
|
||||
serif \
|
||||
terminal \
|
||||
{times new roman} \
|
||||
]
|
||||
}
|
||||
array set _families [list \
|
||||
presetvariable $presetVariable \
|
||||
presetfixed $presetFixed \
|
||||
presetall $presetAll \
|
||||
]
|
||||
|
||||
variable _widget
|
||||
}
|
||||
|
||||
|
||||
# ----------------------------------------------------------------------------
|
||||
# Command SelectFont::create
|
||||
# ----------------------------------------------------------------------------
|
||||
proc SelectFont::create { path args } {
|
||||
variable _families
|
||||
variable _sizes
|
||||
variable $path
|
||||
upvar 0 $path data
|
||||
|
||||
# Initialize the internal rep of the widget options
|
||||
Widget::init SelectFont "$path#SelectFont" $args
|
||||
|
||||
if { [Widget::getoption "$path#SelectFont" -querysystem] } {
|
||||
loadfont [Widget::getoption "$path#SelectFont" -families]
|
||||
}
|
||||
|
||||
set bg [Widget::getoption "$path#SelectFont" -background]
|
||||
set _styles [Widget::getoption "$path#SelectFont" -styles]
|
||||
if { [Widget::getoption "$path#SelectFont" -type] == "dialog" } {
|
||||
Dialog::create $path -modal local -anchor e -default 0 -cancel 1 \
|
||||
-background $bg \
|
||||
-title [Widget::getoption "$path#SelectFont" -title] \
|
||||
-parent [Widget::getoption "$path#SelectFont" -parent]
|
||||
|
||||
set frame [Dialog::getframe $path]
|
||||
set topf [frame $frame.topf -relief flat -borderwidth 0 -background $bg]
|
||||
|
||||
set labf1 [LabelFrame::create $topf.labf1 -text "Font" -name font \
|
||||
-side top -anchor w -relief flat -background $bg]
|
||||
set sw [ScrolledWindow::create [LabelFrame::getframe $labf1].sw \
|
||||
-background $bg]
|
||||
set lbf [listbox $sw.lb \
|
||||
-height 5 -width 25 -exportselection false -selectmode browse]
|
||||
ScrolledWindow::setwidget $sw $lbf
|
||||
LabelFrame::configure $labf1 -focus $lbf
|
||||
if { [Widget::getoption "$path#SelectFont" -querysystem] } {
|
||||
set fam [Widget::getoption "$path#SelectFont" -families]
|
||||
} else {
|
||||
set fam "preset"
|
||||
append fam [Widget::getoption "$path#SelectFont" -families]
|
||||
}
|
||||
eval [list $lbf insert end] $_families($fam)
|
||||
set script "set [list SelectFont::${path}(family)] \[%W curselection\];\
|
||||
SelectFont::_update [list $path]"
|
||||
bind $lbf <ButtonRelease-1> $script
|
||||
bind $lbf <space> $script
|
||||
bind $lbf <1> [list focus %W]
|
||||
bind $lbf <Up> $script
|
||||
bind $lbf <Down> $script
|
||||
pack $sw -fill both -expand yes
|
||||
|
||||
set labf2 [LabelFrame::create $topf.labf2 -text "Size" -name size \
|
||||
-side top -anchor w -relief flat -background $bg]
|
||||
set sw [ScrolledWindow::create [LabelFrame::getframe $labf2].sw \
|
||||
-scrollbar vertical -background $bg]
|
||||
set lbs [listbox $sw.lb \
|
||||
-height 5 -width 6 -exportselection false -selectmode browse]
|
||||
ScrolledWindow::setwidget $sw $lbs
|
||||
LabelFrame::configure $labf2 -focus $lbs
|
||||
eval [list $lbs insert end] $_sizes
|
||||
set script "set [list SelectFont::${path}(size)] \[%W curselection\];\
|
||||
SelectFont::_update [list $path]"
|
||||
bind $lbs <ButtonRelease-1> $script
|
||||
bind $lbs <space> $script
|
||||
bind $lbs <1> [list focus %W]
|
||||
bind $lbs <Up> $script
|
||||
bind $lbs <Down> $script
|
||||
pack $sw -fill both -expand yes
|
||||
|
||||
set labf3 [LabelFrame::create $topf.labf3 -text "Style" -name style \
|
||||
-side top -anchor w -relief sunken -bd 1 -background $bg]
|
||||
set subf [LabelFrame::getframe $labf3]
|
||||
foreach st $_styles {
|
||||
set name [lindex [BWidget::getname $st] 0]
|
||||
if { $name == "" } {
|
||||
set name [string toupper $name 0]
|
||||
}
|
||||
checkbutton $subf.$st -text $name \
|
||||
-variable SelectFont::$path\($st\) \
|
||||
-background $bg \
|
||||
-command [list SelectFont::_update $path]
|
||||
bind $subf.$st <Return> break
|
||||
pack $subf.$st -anchor w
|
||||
}
|
||||
LabelFrame::configure $labf3 -focus $subf.[lindex $_styles 0]
|
||||
|
||||
pack $labf1 -side left -anchor n -fill both -expand yes
|
||||
if { ![Widget::getoption "$path#SelectFont" -nosizes] } {
|
||||
pack $labf2 -side left -anchor n -fill both -expand yes -padx 8
|
||||
}
|
||||
pack $labf3 -side left -anchor n -fill both -expand yes
|
||||
|
||||
set botf [frame $frame.botf -width 100 -height 50 \
|
||||
-bg white -bd 0 -relief flat \
|
||||
-highlightthickness 1 -takefocus 0 \
|
||||
-highlightbackground black \
|
||||
-highlightcolor black]
|
||||
|
||||
set lab [label $botf.label \
|
||||
-background white -foreground black \
|
||||
-borderwidth 0 -takefocus 0 -highlightthickness 0 \
|
||||
-text [Widget::getoption "$path#SelectFont" -sampletext]]
|
||||
place $lab -relx 0.5 -rely 0.5 -anchor c
|
||||
|
||||
pack $topf -pady 4 -fill both -expand yes
|
||||
|
||||
if { [Widget::getoption "$path#SelectFont" -initialcolor] != ""} {
|
||||
set thecolor [Widget::getoption "$path#SelectFont" -initialcolor]
|
||||
set colf [frame $frame.colf]
|
||||
|
||||
set frc [frame $colf.frame -width 50 -height 20 -bg $thecolor -bd 0 -relief flat\
|
||||
-highlightthickness 1 -takefocus 0 \
|
||||
-highlightbackground black \
|
||||
-highlightcolor black]
|
||||
|
||||
set script "set [list SelectFont::${path}(fontcolor)] \[tk_chooseColor -parent $colf.button -initialcolor \[set [list SelectFont::${path}(fontcolor)]\]\];\
|
||||
SelectFont::_update [list $path]"
|
||||
|
||||
set name [lindex [BWidget::getname colorPicker] 0]
|
||||
if { $name == "" } {
|
||||
set name "Color..."
|
||||
}
|
||||
set but [button $colf.button -command $script \
|
||||
-text $name]
|
||||
|
||||
$lab configure -foreground $thecolor
|
||||
$frc configure -bg $thecolor
|
||||
|
||||
pack $but -side left
|
||||
pack $frc -side left -padx 5
|
||||
|
||||
set data(frc) $frc
|
||||
set data(fontcolor) $thecolor
|
||||
|
||||
pack $colf -pady 4 -fill x -expand true
|
||||
|
||||
} else {
|
||||
set data(fontcolor) -1
|
||||
}
|
||||
pack $botf -pady 4 -fill x
|
||||
|
||||
Dialog::add $path -name ok
|
||||
Dialog::add $path -name cancel
|
||||
|
||||
set data(label) $lab
|
||||
set data(lbf) $lbf
|
||||
set data(lbs) $lbs
|
||||
|
||||
_getfont $path
|
||||
|
||||
Widget::create SelectFont $path 0
|
||||
|
||||
return [_draw $path]
|
||||
} else {
|
||||
if { [Widget::getoption "$path#SelectFont" -querysystem] } {
|
||||
set fams [Widget::getoption "$path#SelectFont" -families]
|
||||
} else {
|
||||
set fams "preset"
|
||||
append fams [Widget::getoption "$path#SelectFont" -families]
|
||||
}
|
||||
if {[Widget::theme]} {
|
||||
ttk::frame $path
|
||||
set lbf [ttk::combobox $path.font \
|
||||
-takefocus 0 -exportselection 0 \
|
||||
-values $_families($fams) \
|
||||
-textvariable SelectFont::${path}(family) \
|
||||
-state readonly]
|
||||
set lbs [ttk::combobox $path.size \
|
||||
-takefocus 0 -exportselection 0 \
|
||||
-width 4 \
|
||||
-values $_sizes \
|
||||
-textvariable SelectFont::${path}(size) \
|
||||
-state readonly]
|
||||
bind $lbf <<ComboboxSelected>> [list SelectFont::_update $path]
|
||||
bind $lbs <<ComboboxSelected>> [list SelectFont::_update $path]
|
||||
ttk::style configure BWSlim.Toolbutton -padding 0
|
||||
} else {
|
||||
frame $path -background $bg
|
||||
set lbf [ComboBox::create $path.font \
|
||||
-highlightthickness 0 -takefocus 0 -background $bg \
|
||||
-values $_families($fams) \
|
||||
-textvariable SelectFont::$path\(family\) \
|
||||
-editable 0 \
|
||||
-modifycmd [list SelectFont::_update $path]]
|
||||
set lbs [ComboBox::create $path.size \
|
||||
-highlightthickness 0 -takefocus 0 -background $bg \
|
||||
-width 4 \
|
||||
-values $_sizes \
|
||||
-textvariable SelectFont::$path\(size\) \
|
||||
-editable 0 \
|
||||
-modifycmd [list SelectFont::_update $path]]
|
||||
}
|
||||
bind $path <Destroy> [list SelectFont::_destroy $path]
|
||||
pack $lbf -side left -anchor w
|
||||
pack $lbs -side left -anchor w -padx 4
|
||||
foreach st $_styles {
|
||||
if {[Widget::theme]} {
|
||||
ttk::checkbutton $path.$st -takefocus 0 \
|
||||
-style BWSlim.Toolbutton \
|
||||
-image [Bitmap::get $st] \
|
||||
-variable SelectFont::${path}($st) \
|
||||
-command [list SelectFont::_update $path]
|
||||
} else {
|
||||
button $path.$st \
|
||||
-highlightthickness 0 -takefocus 0 -padx 0 -pady 0 \
|
||||
-background $bg \
|
||||
-image [Bitmap::get $st] \
|
||||
-command [list SelectFont::_modstyle $path $st]
|
||||
}
|
||||
pack $path.$st -side left -anchor w
|
||||
}
|
||||
set data(label) ""
|
||||
set data(lbf) $lbf
|
||||
set data(lbs) $lbs
|
||||
_getfont $path
|
||||
|
||||
return [Widget::create SelectFont $path]
|
||||
}
|
||||
|
||||
return $path
|
||||
}
|
||||
|
||||
|
||||
# ----------------------------------------------------------------------------
|
||||
# Command SelectFont::configure
|
||||
# ----------------------------------------------------------------------------
|
||||
proc SelectFont::configure { path args } {
|
||||
set _styles [Widget::getoption "$path#SelectFont" -styles]
|
||||
|
||||
set res [Widget::configure "$path#SelectFont" $args]
|
||||
|
||||
if { [Widget::hasChanged "$path#SelectFont" -font font] } {
|
||||
_getfont $path
|
||||
}
|
||||
if { [Widget::hasChanged "$path#SelectFont" -background bg] } {
|
||||
switch -- [Widget::getoption "$path#SelectFont" -type] {
|
||||
dialog {
|
||||
Dialog::configure $path -background $bg
|
||||
set topf [Dialog::getframe $path].topf
|
||||
$topf configure -background $bg
|
||||
foreach labf {labf1 labf2} {
|
||||
LabelFrame::configure $topf.$labf -background $bg
|
||||
set subf [LabelFrame::getframe $topf.$labf]
|
||||
ScrolledWindow::configure $subf.sw -background $bg
|
||||
$subf.sw.lb configure -background $bg
|
||||
}
|
||||
LabelFrame::configure $topf.labf3 -background $bg
|
||||
set subf [LabelFrame::getframe $topf.labf3]
|
||||
foreach w [winfo children $subf] {
|
||||
$w configure -background $bg
|
||||
}
|
||||
}
|
||||
toolbar {
|
||||
$path configure -background $bg
|
||||
ComboBox::configure $path.font -background $bg
|
||||
ComboBox::configure $path.size -background $bg
|
||||
foreach st $_styles {
|
||||
$path.$st configure -background $bg
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return $res
|
||||
}
|
||||
|
||||
|
||||
# ----------------------------------------------------------------------------
|
||||
# Command SelectFont::cget
|
||||
# ----------------------------------------------------------------------------
|
||||
proc SelectFont::cget { path option } {
|
||||
return [Widget::cget "$path#SelectFont" $option]
|
||||
}
|
||||
|
||||
|
||||
# ----------------------------------------------------------------------------
|
||||
# Command SelectFont::loadfont
|
||||
# ----------------------------------------------------------------------------
|
||||
proc SelectFont::loadfont {{which all}} {
|
||||
variable _families
|
||||
|
||||
# initialize families
|
||||
if {![info exists _families(all)]} {
|
||||
set _families(all) [lsort -dictionary [font families]]
|
||||
}
|
||||
if {[regexp {fixed|variable} $which] \
|
||||
&& ![info exists _families($which)]} {
|
||||
# initialize families
|
||||
set _families(fixed) {}
|
||||
set _families(variable) {}
|
||||
foreach family $_families(all) {
|
||||
if { [font metrics [list $family] -fixed] } {
|
||||
lappend _families(fixed) $family
|
||||
} else {
|
||||
lappend _families(variable) $family
|
||||
}
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
# ----------------------------------------------------------------------------
|
||||
# Command SelectFont::_draw
|
||||
# ----------------------------------------------------------------------------
|
||||
proc SelectFont::_draw { path } {
|
||||
variable $path
|
||||
upvar 0 $path data
|
||||
|
||||
$data(lbf) selection clear 0 end
|
||||
$data(lbf) selection set $data(family)
|
||||
$data(lbf) activate $data(family)
|
||||
$data(lbf) see $data(family)
|
||||
$data(lbs) selection clear 0 end
|
||||
$data(lbs) selection set $data(size)
|
||||
$data(lbs) activate $data(size)
|
||||
$data(lbs) see $data(size)
|
||||
_update $path
|
||||
|
||||
if { [Dialog::draw $path] == 0 } {
|
||||
set result [Widget::getoption "$path#SelectFont" -font]
|
||||
set color $data(fontcolor)
|
||||
|
||||
if { $color == "" } {
|
||||
set color #000000
|
||||
}
|
||||
|
||||
} else {
|
||||
set result ""
|
||||
if {$data(fontcolor) == -1} {
|
||||
set color -1
|
||||
} else {
|
||||
set color ""
|
||||
}
|
||||
}
|
||||
unset data
|
||||
Widget::destroy "$path#SelectFont"
|
||||
destroy $path
|
||||
if { $color != -1 } {
|
||||
return [list $result $color]
|
||||
} else {
|
||||
return $result
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
# ----------------------------------------------------------------------------
|
||||
# Command SelectFont::_modstyle
|
||||
# ----------------------------------------------------------------------------
|
||||
proc SelectFont::_modstyle { path style } {
|
||||
variable $path
|
||||
upvar 0 $path data
|
||||
|
||||
$path.$style configure -relief [expr {$data($style) ? "raised" : "sunken"}]
|
||||
set data($style) [expr {!$data($style)}]
|
||||
_update $path
|
||||
}
|
||||
|
||||
|
||||
# ----------------------------------------------------------------------------
|
||||
# Command SelectFont::_update
|
||||
# ----------------------------------------------------------------------------
|
||||
proc SelectFont::_update { path } {
|
||||
variable _families
|
||||
variable _sizes
|
||||
variable _styleOff
|
||||
variable $path
|
||||
upvar 0 $path data
|
||||
|
||||
set type [Widget::getoption "$path#SelectFont" -type]
|
||||
set _styles [Widget::getoption "$path#SelectFont" -styles]
|
||||
if { [Widget::getoption "$path#SelectFont" -querysystem] } {
|
||||
set fams [Widget::getoption "$path#SelectFont" -families]
|
||||
} else {
|
||||
set fams "preset"
|
||||
append fams [Widget::getoption "$path#SelectFont" -families]
|
||||
}
|
||||
if { $type == "dialog" } {
|
||||
set curs [$path:cmd cget -cursor]
|
||||
$path:cmd configure -cursor watch
|
||||
}
|
||||
if { [Widget::getoption "$path#SelectFont" -type] == "dialog" } {
|
||||
set font [list [lindex $_families($fams) $data(family)] \
|
||||
[lindex $_sizes $data(size)]]
|
||||
} else {
|
||||
set font [list $data(family) $data(size)]
|
||||
}
|
||||
foreach st $_styles {
|
||||
if { $data($st) } {
|
||||
lappend font $st
|
||||
} elseif {[info exists _styleOff($st)]} {
|
||||
# This adds the default bold/italic value to a font
|
||||
#lappend font $_styleOff($st)
|
||||
}
|
||||
}
|
||||
Widget::setoption "$path#SelectFont" -font $font
|
||||
if { $type == "dialog" } {
|
||||
$data(label) configure -font $font
|
||||
$path:cmd configure -cursor $curs
|
||||
if { ($data(fontcolor) != "") && ($data(fontcolor) != -1) } {
|
||||
$data(label) configure -foreground $data(fontcolor)
|
||||
$data(frc) configure -bg $data(fontcolor)
|
||||
} elseif { $data(fontcolor) == "" } {
|
||||
#If no color is selected, restore previous one
|
||||
set data(fontcolor) [$data(label) cget -foreground]
|
||||
|
||||
}
|
||||
} elseif { [set cmd [Widget::getoption "$path#SelectFont" -command]] != "" } {
|
||||
uplevel \#0 $cmd
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
# ----------------------------------------------------------------------------
|
||||
# Command SelectFont::_getfont
|
||||
# ----------------------------------------------------------------------------
|
||||
proc SelectFont::_getfont { path } {
|
||||
variable _families
|
||||
variable _sizes
|
||||
variable $path
|
||||
upvar 0 $path data
|
||||
|
||||
array set font [font actual [Widget::getoption "$path#SelectFont" -font]]
|
||||
set data(bold) [expr {![string equal $font(-weight) "normal"]}]
|
||||
set data(italic) [expr {![string equal $font(-slant) "roman"]}]
|
||||
set data(underline) $font(-underline)
|
||||
set data(overstrike) $font(-overstrike)
|
||||
set _styles [Widget::getoption "$path#SelectFont" -styles]
|
||||
if { [Widget::getoption "$path#SelectFont" -querysystem] } {
|
||||
set fams [Widget::getoption "$path#SelectFont" -families]
|
||||
} else {
|
||||
set fams "preset"
|
||||
append fams [Widget::getoption "$path#SelectFont" -families]
|
||||
}
|
||||
if { [Widget::getoption "$path#SelectFont" -type] == "dialog" } {
|
||||
set idxf [lsearch $_families($fams) $font(-family)]
|
||||
set idxs [lsearch $_sizes $font(-size)]
|
||||
set data(family) [expr {$idxf >= 0 ? $idxf : 0}]
|
||||
set data(size) [expr {$idxs >= 0 ? $idxs : 0}]
|
||||
} else {
|
||||
set data(family) $font(-family)
|
||||
set data(size) $font(-size)
|
||||
if {![Widget::theme]} {
|
||||
foreach st $_styles {
|
||||
$path.$st configure \
|
||||
-relief [expr {$data($st) ? "sunken":"raised"}]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
# ----------------------------------------------------------------------------
|
||||
# Command SelectFont::_destroy
|
||||
# ----------------------------------------------------------------------------
|
||||
proc SelectFont::_destroy { path } {
|
||||
variable $path
|
||||
upvar 0 $path data
|
||||
unset data
|
||||
Widget::destroy "$path#SelectFont"
|
||||
}
|
BIN
R_portable/R/App/R-portable/Tcl/bin64/lib/bwidget-1.9.12/images/bold.gif
Executable file
After Width: | Height: | Size: 118 B |
BIN
R_portable/R/App/R-portable/Tcl/bin64/lib/bwidget-1.9.12/images/copy.gif
Executable file
After Width: | Height: | Size: 145 B |
BIN
R_portable/R/App/R-portable/Tcl/bin64/lib/bwidget-1.9.12/images/cut.gif
Executable file
After Width: | Height: | Size: 130 B |
BIN
R_portable/R/App/R-portable/Tcl/bin64/lib/bwidget-1.9.12/images/dragfile.gif
Executable file
After Width: | Height: | Size: 949 B |
BIN
R_portable/R/App/R-portable/Tcl/bin64/lib/bwidget-1.9.12/images/dragicon.gif
Executable file
After Width: | Height: | Size: 1012 B |
BIN
R_portable/R/App/R-portable/Tcl/bin64/lib/bwidget-1.9.12/images/error.gif
Executable file
After Width: | Height: | Size: 259 B |
BIN
R_portable/R/App/R-portable/Tcl/bin64/lib/bwidget-1.9.12/images/file.gif
Executable file
After Width: | Height: | Size: 860 B |
BIN
R_portable/R/App/R-portable/Tcl/bin64/lib/bwidget-1.9.12/images/folder.gif
Executable file
After Width: | Height: | Size: 139 B |
BIN
R_portable/R/App/R-portable/Tcl/bin64/lib/bwidget-1.9.12/images/hourglass.gif
Executable file
After Width: | Height: | Size: 211 B |
BIN
R_portable/R/App/R-portable/Tcl/bin64/lib/bwidget-1.9.12/images/info.gif
Executable file
After Width: | Height: | Size: 256 B |
BIN
R_portable/R/App/R-portable/Tcl/bin64/lib/bwidget-1.9.12/images/italic.gif
Executable file
After Width: | Height: | Size: 111 B |
@ -0,0 +1,5 @@
|
||||
#define minus_width 9
|
||||
#define minus_height 9
|
||||
static char minus_bits[] = {
|
||||
0xff,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x7d,0x01,0x01,0x01,0x01,0x01,0x01,
|
||||
0x01,0xff,0x01};
|
BIN
R_portable/R/App/R-portable/Tcl/bin64/lib/bwidget-1.9.12/images/new.gif
Executable file
After Width: | Height: | Size: 131 B |
@ -0,0 +1,5 @@
|
||||
#define opcopy_width 11
|
||||
#define opcopy_height 11
|
||||
static char opcopy_bits[] = {
|
||||
0xff,0xff,0x01,0xfc,0x21,0xfc,0x21,0xfc,0x21,0xfc,0xfd,0xfd,0x21,0xfc,0x21,
|
||||
0xfc,0x21,0xfc,0x01,0xfc,0xff,0xff};
|
BIN
R_portable/R/App/R-portable/Tcl/bin64/lib/bwidget-1.9.12/images/open.gif
Executable file
After Width: | Height: | Size: 139 B |
BIN
R_portable/R/App/R-portable/Tcl/bin64/lib/bwidget-1.9.12/images/openfold.gif
Executable file
After Width: | Height: | Size: 146 B |
@ -0,0 +1,5 @@
|
||||
#define oplink_width 11
|
||||
#define oplink_height 11
|
||||
static char oplink_bits[] = {
|
||||
0xff,0xff,0x01,0xfc,0xf1,0xfc,0xe1,0xfc,0xf1,0xfc,0xb9,0xfc,0x19,0xfc,0x09,
|
||||
0xfc,0x11,0xfc,0x01,0xfc,0xff,0xff};
|
@ -0,0 +1,5 @@
|
||||
#define opmove_width 11
|
||||
#define opmove_height 11
|
||||
static char opmove_bits[] = {
|
||||
0xff,0xff,0x01,0xfc,0x01,0xfc,0x51,0xfc,0x89,0xfc,0xfd,0xfd,0x89,0xfc,0x51,
|
||||
0xfc,0x01,0xfc,0x01,0xfc,0xff,0xff};
|
BIN
R_portable/R/App/R-portable/Tcl/bin64/lib/bwidget-1.9.12/images/overstrike.gif
Executable file
After Width: | Height: | Size: 119 B |
BIN
R_portable/R/App/R-portable/Tcl/bin64/lib/bwidget-1.9.12/images/palette.gif
Executable file
After Width: | Height: | Size: 151 B |
BIN
R_portable/R/App/R-portable/Tcl/bin64/lib/bwidget-1.9.12/images/passwd.gif
Executable file
After Width: | Height: | Size: 481 B |
BIN
R_portable/R/App/R-portable/Tcl/bin64/lib/bwidget-1.9.12/images/paste.gif
Executable file
After Width: | Height: | Size: 159 B |
5
R_portable/R/App/R-portable/Tcl/bin64/lib/bwidget-1.9.12/images/plus.xbm
Executable file
@ -0,0 +1,5 @@
|
||||
#define plus_width 9
|
||||
#define plus_height 9
|
||||
static char plus_bits[] = {
|
||||
0xff,0x01,0x01,0x01,0x11,0x01,0x11,0x01,0x7d,0x01,0x11,0x01,0x11,0x01,0x01,
|
||||
0x01,0xff,0x01};
|
BIN
R_portable/R/App/R-portable/Tcl/bin64/lib/bwidget-1.9.12/images/print.gif
Executable file
After Width: | Height: | Size: 140 B |
BIN
R_portable/R/App/R-portable/Tcl/bin64/lib/bwidget-1.9.12/images/question.gif
Executable file
After Width: | Height: | Size: 265 B |
BIN
R_portable/R/App/R-portable/Tcl/bin64/lib/bwidget-1.9.12/images/redo.gif
Executable file
After Width: | Height: | Size: 70 B |
BIN
R_portable/R/App/R-portable/Tcl/bin64/lib/bwidget-1.9.12/images/save.gif
Executable file
After Width: | Height: | Size: 138 B |
@ -0,0 +1,9 @@
|
||||
#define target_width 24
|
||||
#define target_height 24
|
||||
static unsigned char target_bits[] = {
|
||||
0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x07, 0x00, 0x00, 0x07, 0x00,
|
||||
0x00, 0x07, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x3e, 0xe0, 0x03, 0x3e, 0xe0, 0x03, 0x3e, 0xe0, 0x03, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x07, 0x00, 0x00, 0x07, 0x00,
|
||||
0x00, 0x07, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
|
BIN
R_portable/R/App/R-portable/Tcl/bin64/lib/bwidget-1.9.12/images/underline.gif
Executable file
After Width: | Height: | Size: 119 B |
BIN
R_portable/R/App/R-portable/Tcl/bin64/lib/bwidget-1.9.12/images/undo.gif
Executable file
After Width: | Height: | Size: 115 B |
BIN
R_portable/R/App/R-portable/Tcl/bin64/lib/bwidget-1.9.12/images/warning.gif
Executable file
After Width: | Height: | Size: 254 B |
55
R_portable/R/App/R-portable/Tcl/bin64/lib/bwidget-1.9.12/init.tcl
Executable file
@ -0,0 +1,55 @@
|
||||
namespace eval Widget {}
|
||||
proc Widget::_opt_defaults {{prio widgetDefault}} {
|
||||
if {$::tcl_version >= 8.4} {
|
||||
set plat [tk windowingsystem]
|
||||
} else {
|
||||
set plat $::tcl_platform(platform)
|
||||
}
|
||||
switch -exact $plat {
|
||||
"aqua" {
|
||||
}
|
||||
"win32" -
|
||||
"windows" {
|
||||
#option add *Listbox.background SystemWindow $prio
|
||||
option add *ListBox.background SystemWindow $prio
|
||||
#option add *Button.padY 0 $prio
|
||||
option add *ButtonBox.padY 0 $prio
|
||||
option add *Dialog.padY 0 $prio
|
||||
option add *Dialog.anchor e $prio
|
||||
}
|
||||
"x11" -
|
||||
default {
|
||||
option add *Scrollbar.width 12 $prio
|
||||
option add *Scrollbar.borderWidth 1 $prio
|
||||
option add *Dialog.separator 1 $prio
|
||||
option add *MainFrame.relief raised $prio
|
||||
option add *MainFrame.separator none $prio
|
||||
}
|
||||
}
|
||||
}
|
||||
Widget::_opt_defaults
|
||||
|
||||
# Try to load lang file corresponding to current msgcat locale
|
||||
proc Widget::_opt_lang {} {
|
||||
if {0 != [llength [info commands ::msgcat::mcpreferences]]} {
|
||||
set langs [::msgcat::mcpreferences]
|
||||
}
|
||||
lappend langs en
|
||||
|
||||
foreach lang $langs {
|
||||
set l [file join $::BWIDGET::LIBRARY "lang" "$lang.rc"]
|
||||
if {(![catch {file readable $l} result]) && ($result)} {
|
||||
option read $l
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
Widget::_opt_lang
|
||||
|
||||
## Add a TraverseIn binding to standard Tk widgets to handle some of
|
||||
## the BWidget-specific things we do.
|
||||
bind Entry <<TraverseIn>> { %W selection range 0 end; %W icursor end }
|
||||
bind Spinbox <<TraverseIn>> { %W selection range 0 end; %W icursor end }
|
||||
|
||||
bind all <Key-Tab> { Widget::traverseTo [Widget::focusNext %W] }
|
||||
bind all <<PrevWindow>> { Widget::traverseTo [Widget::focusPrev %W] }
|
327
R_portable/R/App/R-portable/Tcl/bin64/lib/bwidget-1.9.12/label.tcl
Executable file
@ -0,0 +1,327 @@
|
||||
# ------------------------------------------------------------------------------
|
||||
# label.tcl
|
||||
# This file is part of Unifix BWidget Toolkit
|
||||
# $Id: label.tcl,v 1.10.2.3 2011/04/26 08:24:28 oehhar Exp $
|
||||
# ------------------------------------------------------------------------------
|
||||
# Index of commands:
|
||||
# - Label::create
|
||||
# - Label::configure
|
||||
# - Label::cget
|
||||
# - Label::setfocus
|
||||
# - Label::_drag_cmd
|
||||
# - Label::_drop_cmd
|
||||
# - Label::_over_cmd
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
namespace eval Label {
|
||||
Widget::define Label label DragSite DropSite DynamicHelp
|
||||
|
||||
if {$::Widget::_theme} {
|
||||
Widget::tkinclude Label label .l \
|
||||
remove { -foreground -text -textvariable -underline -state}
|
||||
} else {
|
||||
Widget::tkinclude Label label .l \
|
||||
remove { -foreground -text -textvariable -underline }
|
||||
}
|
||||
|
||||
Widget::declare Label {
|
||||
{-name String "" 0}
|
||||
{-text String "" 0}
|
||||
{-textvariable String "" 0}
|
||||
{-underline Int -1 0 "%d >= -1"}
|
||||
{-focus String "" 0}
|
||||
{-foreground TkResource "" 0 label}
|
||||
{-disabledforeground TkResource "" 0 button}
|
||||
{-state Enum normal 0 {normal disabled}}
|
||||
|
||||
{-fg Synonym -foreground}
|
||||
}
|
||||
|
||||
DynamicHelp::include Label balloon
|
||||
DragSite::include Label "" 1
|
||||
DropSite::include Label {
|
||||
TEXT {move {}}
|
||||
IMAGE {move {}}
|
||||
BITMAP {move {}}
|
||||
FGCOLOR {move {}}
|
||||
BGCOLOR {move {}}
|
||||
COLOR {move {}}
|
||||
}
|
||||
|
||||
bind BwLabel <FocusIn> [list Label::setfocus %W]
|
||||
bind BwLabel <Destroy> [list Label::_destroy %W]
|
||||
}
|
||||
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
# Command Label::create
|
||||
# ------------------------------------------------------------------------------
|
||||
proc Label::create { path args } {
|
||||
array set maps [list Label {} .l {}]
|
||||
array set maps [Widget::parseArgs Label $args]
|
||||
frame $path -class Label -borderwidth 0 -highlightthickness 0 -relief flat -padx 0 -pady 0
|
||||
Widget::initFromODB Label $path $maps(Label)
|
||||
|
||||
if {$::Widget::_theme} {
|
||||
eval [list ttk::label $path.l] $maps(.l)
|
||||
} else {
|
||||
eval [list label $path.l] $maps(.l)
|
||||
}
|
||||
|
||||
if {$::Widget::_theme} {
|
||||
if { [Widget::cget $path -state] != "normal" } {
|
||||
$path.l state disabled
|
||||
}
|
||||
} else {
|
||||
if { [Widget::cget $path -state] == "normal" } {
|
||||
set fg [Widget::cget $path -foreground]
|
||||
} else {
|
||||
set fg [Widget::cget $path -disabledforeground]
|
||||
}
|
||||
$path.l configure -foreground $fg
|
||||
}
|
||||
|
||||
set var [Widget::cget $path -textvariable]
|
||||
if { $var == "" &&
|
||||
[Widget::cget $path -image] == "" &&
|
||||
($::Widget::_theme || [Widget::cget $path -bitmap] == "")} {
|
||||
set desc [BWidget::getname [Widget::cget $path -name]]
|
||||
if { $desc != "" } {
|
||||
set text [lindex $desc 0]
|
||||
set under [lindex $desc 1]
|
||||
} else {
|
||||
set text [Widget::cget $path -text]
|
||||
set under [Widget::cget $path -underline]
|
||||
}
|
||||
} else {
|
||||
set under -1
|
||||
set text ""
|
||||
}
|
||||
|
||||
$path.l configure -text $text -textvariable $var \
|
||||
-underline $under
|
||||
|
||||
set accel [string tolower [string index $text $under]]
|
||||
if { $accel != "" } {
|
||||
bind [winfo toplevel $path] <Alt-$accel> "Label::setfocus $path"
|
||||
}
|
||||
|
||||
bindtags $path [list BwLabel [winfo toplevel $path] all]
|
||||
bindtags $path.l [list $path.l $path Label [winfo toplevel $path] all]
|
||||
pack $path.l -expand yes -fill both
|
||||
|
||||
set dragendcmd [Widget::cget $path -dragendcmd]
|
||||
DragSite::setdrag $path $path.l Label::_init_drag_cmd $dragendcmd 1
|
||||
DropSite::setdrop $path $path.l Label::_over_cmd Label::_drop_cmd 1
|
||||
DynamicHelp::sethelp $path $path.l 1
|
||||
|
||||
return [Widget::create Label $path]
|
||||
}
|
||||
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
# Command Label::configure
|
||||
# ------------------------------------------------------------------------------
|
||||
proc Label::configure { path args } {
|
||||
set oldunder [$path.l cget -underline]
|
||||
if { $oldunder != -1 } {
|
||||
set oldaccel [string tolower [string index [$path.l cget -text] $oldunder]]
|
||||
} else {
|
||||
set oldaccel ""
|
||||
}
|
||||
set res [Widget::configure $path $args]
|
||||
|
||||
set cfg [Widget::hasChanged $path -foreground fg]
|
||||
set cst [Widget::hasChanged $path -state state]
|
||||
|
||||
if {$::Widget::_theme} {
|
||||
if { $cfg } {
|
||||
$path.l configure -foreground $fg
|
||||
}
|
||||
if { $cst } {
|
||||
if { $state == "normal" } {
|
||||
$path.l state !disabled
|
||||
} else {
|
||||
$path.l state disabled
|
||||
}
|
||||
}
|
||||
} else {
|
||||
set cdfg [Widget::hasChanged $path -disabledforeground dfg]
|
||||
if { $cst || $cfg || $cdfg } {
|
||||
if { $state == "normal" } {
|
||||
$path.l configure -fg $fg
|
||||
} else {
|
||||
$path.l configure -fg $dfg
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
set cv [Widget::hasChanged $path -textvariable var]
|
||||
set cb [Widget::hasChanged $path -image img]
|
||||
if {$::Widget::_theme} {
|
||||
set ci 0
|
||||
set bmp ""
|
||||
} else {
|
||||
set ci [Widget::hasChanged $path -bitmap bmp]
|
||||
}
|
||||
set cn [Widget::hasChanged $path -name name]
|
||||
set ct [Widget::hasChanged $path -text text]
|
||||
set cu [Widget::hasChanged $path -underline under]
|
||||
|
||||
if { $cv || $cb || $ci || $cn || $ct || $cu } {
|
||||
if { $var == "" && $img == "" && $bmp == "" } {
|
||||
set desc [BWidget::getname $name]
|
||||
if { $desc != "" } {
|
||||
set text [lindex $desc 0]
|
||||
set under [lindex $desc 1]
|
||||
}
|
||||
} else {
|
||||
set under -1
|
||||
set text ""
|
||||
}
|
||||
set top [winfo toplevel $path]
|
||||
if { $oldaccel != "" } {
|
||||
bind $top <Alt-$oldaccel> {}
|
||||
}
|
||||
set accel [string tolower [string index $text $under]]
|
||||
if { $accel != "" } {
|
||||
bind $top <Alt-$accel> [list Label::setfocus $path]
|
||||
}
|
||||
$path.l configure -text $text -underline $under -textvariable $var
|
||||
}
|
||||
|
||||
set force [Widget::hasChanged $path -dragendcmd dragend]
|
||||
DragSite::setdrag $path $path.l Label::_init_drag_cmd $dragend $force
|
||||
DropSite::setdrop $path $path.l Label::_over_cmd Label::_drop_cmd
|
||||
DynamicHelp::sethelp $path $path.l
|
||||
|
||||
return $res
|
||||
}
|
||||
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
# Command Label::cget
|
||||
# ------------------------------------------------------------------------------
|
||||
proc Label::cget { path option } {
|
||||
return [Widget::cget $path $option]
|
||||
}
|
||||
|
||||
|
||||
# ----------------------------------------------------------------------------
|
||||
# Command Label::identify
|
||||
# ----------------------------------------------------------------------------
|
||||
proc Label::identify { path args } {
|
||||
eval $path.l identify $args
|
||||
}
|
||||
|
||||
|
||||
# ----------------------------------------------------------------------------
|
||||
# Command Label::instate
|
||||
# ----------------------------------------------------------------------------
|
||||
proc Label::instate { path args } {
|
||||
eval $path.l instate $args
|
||||
}
|
||||
|
||||
|
||||
# ----------------------------------------------------------------------------
|
||||
# Command Label::state
|
||||
# ----------------------------------------------------------------------------
|
||||
proc Label::state { path args } {
|
||||
eval $path.l state $args
|
||||
}
|
||||
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
# Command Label::setfocus
|
||||
# ------------------------------------------------------------------------------
|
||||
proc Label::setfocus { path } {
|
||||
if { [string equal [Widget::cget $path -state] "normal"] } {
|
||||
set w [Widget::cget $path -focus]
|
||||
if { [winfo exists $w] && [Widget::focusOK $w] } {
|
||||
focus $w
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
# Command Label::_init_drag_cmd
|
||||
# ------------------------------------------------------------------------------
|
||||
proc Label::_init_drag_cmd { path X Y top } {
|
||||
set path [winfo parent $path]
|
||||
if { [set cmd [Widget::cget $path -draginitcmd]] != "" } {
|
||||
return [uplevel \#0 $cmd [list $path $X $Y $top]]
|
||||
}
|
||||
if { [set data [$path.l cget -image]] != "" } {
|
||||
set type "IMAGE"
|
||||
pack [label $top.l -image $data]
|
||||
} elseif { [set data [$path.l cget -bitmap]] != "" } {
|
||||
set type "BITMAP"
|
||||
pack [label $top.l -bitmap $data]
|
||||
} else {
|
||||
set data [$path.l cget -text]
|
||||
set type "TEXT"
|
||||
}
|
||||
set usertype [Widget::getoption $path -dragtype]
|
||||
if { $usertype != "" } {
|
||||
set type $usertype
|
||||
}
|
||||
return [list $type {copy} $data]
|
||||
}
|
||||
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
# Command Label::_drop_cmd
|
||||
# ------------------------------------------------------------------------------
|
||||
proc Label::_drop_cmd { path source X Y op type data } {
|
||||
set path [winfo parent $path]
|
||||
if { [set cmd [Widget::cget $path -dropcmd]] != "" } {
|
||||
return [uplevel \#0 $cmd [list $path $source $X $Y $op $type $data]]
|
||||
}
|
||||
if { $type == "COLOR" || $type == "FGCOLOR" } {
|
||||
configure $path -foreground $data
|
||||
} elseif { $type == "BGCOLOR" } {
|
||||
configure $path -background $data
|
||||
} else {
|
||||
set text ""
|
||||
set image ""
|
||||
set bitmap ""
|
||||
switch -- $type {
|
||||
IMAGE {set image $data}
|
||||
BITMAP {set bitmap $data}
|
||||
default {
|
||||
set text $data
|
||||
if { [set var [$path.l cget -textvariable]] != "" } {
|
||||
configure $path -image "" -bitmap ""
|
||||
GlobalVar::setvar $var $data
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
configure $path -text $text -image $image -bitmap $bitmap
|
||||
}
|
||||
return 1
|
||||
}
|
||||
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
# Command Label::_over_cmd
|
||||
# ------------------------------------------------------------------------------
|
||||
proc Label::_over_cmd { path source event X Y op type data } {
|
||||
set path [winfo parent $path]
|
||||
if { [set cmd [Widget::cget $path -dropovercmd]] != "" } {
|
||||
return [uplevel \#0 $cmd [list $path $source $event $X $Y $op $type $data]]
|
||||
}
|
||||
if { [Widget::getoption $path -state] == "normal" ||
|
||||
$type == "COLOR" || $type == "FGCOLOR" || $type == "BGCOLOR" } {
|
||||
DropSite::setcursor based_arrow_down
|
||||
return 1
|
||||
}
|
||||
DropSite::setcursor dot
|
||||
return 0
|
||||
}
|
||||
|
||||
|
||||
proc Label::_destroy { path } {
|
||||
Widget::destroy $path
|
||||
}
|