Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
wjoye committed Oct 27, 2016
1 parent 5ddcdb0 commit 1429721
Show file tree
Hide file tree
Showing 49 changed files with 39,583 additions and 0 deletions.
1,705 changes: 1,705 additions & 0 deletions ChangeLog

Large diffs are not rendered by default.

453 changes: 453 additions & 0 deletions Makefile.in

Large diffs are not rendered by default.

488 changes: 488 additions & 0 deletions Makefile.in.old

Large diffs are not rendered by default.

20 changes: 20 additions & 0 deletions README.blt
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
If tkTable is used at the same time as BLT then there are two name
conflicts to be aware of.

BLT also has a table.n man page. TkTable's man page will still be
available as tkTable.n.

BLT also has a "table" command. The table command of the last
extension loaded will be in effect. If you need to use both table
commands then eval "rename table blttable" after loading blt and
before loading tkTable, or perhaps "rename table tkTable" if you
load the tkTable extension first.

In general this shouldn't be a problem as long as you load tkTable
last. The BLT "table" command facilities have been subsumed by the
Tk "grid" command (available in Tk4.1+), so the BLT table should
only be used in legacy code.

Alternatively, if you want both or have another "table" command,
then change the TBL_COMMAND macro in the makefile before compiling,
and it tkTable will define your named command for the table widget.
149 changes: 149 additions & 0 deletions README.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,149 @@
/*
* Conceptually based on Tk3 table widget by Roland King ([email protected])
*
* see ChangeLog file for details
*
* current maintainer: jeff at hobbs org
*
* Copyright 1997-2002, Jeffrey Hobbs ([email protected])
*/

*************************************
The Tk Table Widget Version 2.0+
*************************************

INTRODUCTION

TkTable is a table/matrix widget extension to tk/tcl.
The basic features of the widget are:

* multi-line cells
* support for embedded windows (one per cell)
* row & column spanning
* variable width columns / height rows (interactively resizable)
* row and column titles
* multiple data sources ((Tcl array || Tcl command) &| internal caching)
* supports standard Tk reliefs, fonts, colors, etc.
* x/y scrollbar support
* 'tag' styles per row, column or cell to change visual appearance
* in-cell editing - returns value back to data source
* support for disabled (read-only) tables or cells (via tags)
* multiple selection modes, with "active" cell
* multiple drawing modes to get optimal performance for larger tables
* optional 'flashes' when things update
* cell validation support
* Works everywhere Tk does (including Windows and Mac!)
* Unicode support (Tk8.1+)

FINDING THE WIDGET

0. The newest version is most likely found at:
http://tktable.sourceforge.net/
http://www.purl.org/net/hobbs/tcl/capp/

BUILDING AND INSTALLING THE WIDGET

1. Uncompress and unpack the distribution

ON UNIX and OS X:
gzip -cd Tktable<version>.tar.gz | tar xf -

ON WINDOWS:
use something like WinZip to unpack the archive.

ON MACINTOSH:
use StuffIt Expander to unstuff the archive.

This will create a subdirectory tkTable<version> with all the files in it.

2. Configure

ON UNIX and OS X:
cd Tktable<version>
./configure

tkTable uses information left in tkConfig.sh when you built tk. This
file will be found in $exec_prefix/lib/. You might set the --prefix and
--exec-prefix options of configure if you don't want the default
(/usr/local). If building on multiple unix platforms, the following is
recommended to isolate build conflicts:
mkdir <builddir>/<platform>
cd !$
/path/to/Tktable<version>/configure

ON WINDOWS:

Version 2.8 added support for building in the cygwin environment on
Windows based on TEA (http://www.tcl.tk/doc/tea/). You can retrieve
cygwin from:
http://sources.redhat.com/cygwin/

Inside the cygwin environment, you build the same as on Unix.

Otherwise, hack makefile.vc until it works and compile. It has problems
executing wish from a path with a space in it, but the DLL builds just
fine. A DLL should be available where you found this archive.

3. Make and Install

ON UNIX< OS X or WINDOWS (with cygwin):
make
make test (OPTIONAL)
make demo (OPTIONAL)
make install

ON WINDOWS (makefile.vc):
nmake -f makefile.vc
nmake -f makefile.vc test (OPTIONAL)
nmake -f makefile.vc install

tkTable is built to comply to the latest tcl package conventions.
There is also a specific "make static" for those who need it.

4. Use it

Start a regular wish interpreter, 'load' the library, and use the table.
There are a few test scripts in the demos directory which you can source.

5. Read the documentation

There is a Unix manpage and HTML translation provided in the doc/
subdirectory. These describe the table widget's features and commands
in depth. If something is confusing, just to try it out.

6. Python users

There is a library/tktable.py wrapper for use with Python/Tkinter.

THINGS TO WATCH OUT FOR

Packing
The table tries not to allocate huge chunks of screen real estate if
you ask it for a lot of rows and columns. You can always stretch out
the frame or explicitly tell it how big it can be. If you want to
stretch the table, remember to pack it with fill both and expand on,
or with grid, give it -sticky news and configure the grid row and column
for some weighting.

Array
The array elements for the table are of the form array(2,3) etc. Make
sure there are no spaces around the ','. Negative indices are allowed.

Editing
If you can't edit, remember that the focus model in tk is explicit, so
you need to click on the table or give it the focus command. Just
having a selected cell is not the same thing as being able to edit.
You also need the editing cursor. If you can't get the cursor, make
sure that you actually have a variable assigned to the table, and that
the "state" of the cell is not disabled.

COMMENTS, BUGS, etc.

* Please can you send comments and bug reports to the current maintainer
and their best will be done to address them. A mailing list for
tktable discussion is [email protected].

* If you find a bug, a short piece of Tcl that exercises it would be very
useful, or even better, compile with debugging and specify where it
crashed in that short piece of Tcl. Use the SourceForge site to check
for known bugs or submit new ones.
63 changes: 63 additions & 0 deletions TODO.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
## TODO LIST
##
## updated 1 June 1999, jeff at hobbs org
##
## Any information in here may be out of date. For up-to-date info see:
## http://tktable.sourceforge.net/
##

These are recommendations, not all of the same priority, and not
all necessarily will be implemented. If you see something you
feel is important, email me and say so. Very democratic.

* some sort of textbbox command that will return the size of the
text in a cell, to allow for perfect cell sizing.

* anchor title areas in different parts of the screen

* -rowstretchmode fill ignores initial # of rows, or config requests for more.
* interpret 0 rows/cols to be FILL
* add -colstretchmode fill
* scratch stretchmode "fill" in favor of "dynamic" which would monitor
the max extent of row/col (difficult)

* fix selection routines to properly handle title area movement

* support smooth scrolling of rows/cols

* add ability to index by tagname
* overhaul tag mechanism (include way to query for tags on a cell, add
priority)

* add internal sort procedures
pathName sort -row {the list of rows we want to sort | all}
-col {the list of cols we use for sorting}
-master row,col
-command _command_to_use_
-type {for each column specifies the type of sort:
ascii | dictionary | integer | real }
-order {for each column specify the order of sort:
increasing | decreasing | none }

* row/column swap (maybe only in terms of visual remapping)

= BBBB U U GGG SSS
== B B U U G S
==- B BB U U G GGG SSS
== B B U U G G S
= BBBB UUU GGGG SSS

MINOR:

Windows: With "-colstretchmode last", the scrollbar behaves oddly in
handling the space for the last cell properly when moving the
main part of the scrollbar with the mouse. This seems to be
that even though the scrollbar receives the "set 0.6xxx 1",
the scrollbar immediately jumps back to what the mouse says,
although this isn't a problem in X...

Windows: when moving windows in "Show Window While Dragging" mode,
the column titles don't refresh properly.

Windows: When using bitmaps in cells, they occasionally don't redraw
correctly. The work-around is to use -drawmode slow.
9 changes: 9 additions & 0 deletions aclocal.m4
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#
# Include the TEA standard macro set
#

builtin(include,tclconfig/tcl.m4)

#
# Add here whatever m4 macros you want to define for your package
#
Loading

0 comments on commit 1429721

Please sign in to comment.