Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

MyTable Class Reference

Inheritance diagram for MyTable:

Inheritance graph
[legend]
Collaboration diagram for MyTable:

Collaboration graph
[legend]
List of all members.

Detailed Description

MyTable - OO wrapper for tktable. Some time aggo Jeffrey Hobbs, the maintainer of tktable, discontinued the 00 wrapper for this marvelous widget. So here is my version of it. Its main purpose is to delegate calls from MyTable to the embedded table component.

There are some value addons that have been done ontop, that is

Definition at line 29 of file mytable.tcl.

Public Member Functions

 activate (TclList args)
 childsite ()
 clear (TclList args)
 cols (TclNumber value=10)
 curselection (TclList args)
 delete (TclList args)
 erase (CellSpec fromCell, CellSpec toCell)
 getCell (TclList args)
 hscrollmode (TclRef value=static)
 hset (TclList args)
 icursor (TclList args)
 index (TclList args)
 insert (TclList args)
 MyTable (TclList args)
 outerborderwidth (TclNumber value=2)
 outerrelief (TclRef value=sunk)
 print ()
 rows (TclNumber value=20)
 see (TclList args)
 selbackground (TclRef value=gray50)
 selection (TclList args)
 selforeground (TclRef value=yellow)
 setCell (TclList args)
 sortRows (TclNumber index, TclList args)
 spans (TclList args)
 state (TclRef value=disabled)
 tag (TclList args)
 troughcolor (TclRef value=gray)
 vscrollmode (TclRef value=static)
 vset (TclList args)
 width (TclList args)
 xview (TclList args)
 yview (TclList args)

Private Member Functions

 colorize (TclNumber num)
 resize ()

Private Attributes

TclRef _myArray


Constructor & Destructor Documentation

MyTable::MyTable TclList  args  ) 
 

constructor

Definition at line 83 of file mytable.tcl.


Member Function Documentation

MyTable::activate TclList  args  ) 
 

delegate the activate command to the table

Definition at line 343 of file mytable.tcl.

MyTable::childsite  ) 
 

retrieve the table component.

Returns:
the widget path to the tktable
Definition at line 268 of file mytable.tcl.

MyTable::clear TclList  args  ) 
 

clear

Definition at line 260 of file mytable.tcl.

MyTable::colorize TclNumber  num  )  [private]
 

rowtag callback of the table. This method is called whenever the tktable component needs a tag for a table row. Definition at line 210 of file mytable.tcl.

MyTable::cols TclNumber  value = 10  ) 
 

option -cols. configure the number of cols of the table Definition at line 486 of file mytable.tcl.

MyTable::curselection TclList  args  ) 
 

delegate the curselection command to the table

Definition at line 364 of file mytable.tcl.

MyTable::delete TclList  args  ) 
 

delegate the delete command to the table

Definition at line 329 of file mytable.tcl.

MyTable::erase CellSpec  fromCell,
CellSpec  toCell
 

erase table cells. This method clears the content between two cell specifications by directly manipulating the _myArray. A cell specification has the format "row,col", where row and col are integers.

Parameters:
fromCell the cell which is the first to be cleared
toCell the cell which is the last to be cleared
Definition at line 234 of file mytable.tcl.

MyTable::getCell TclList  args  ) 
 

get a value of a table-cell

Definition at line 336 of file mytable.tcl.

MyTable::hscrollmode TclRef  value = static  ) 
 

option -hscrollmode. Enable/disable display and mode of horizontal scrollbar. Definition at line 442 of file mytable.tcl.

References error().

MyTable::hset TclList  args  ) 
 

delegate the set command to the horizontal scrollbar.

Definition at line 181 of file mytable.tcl.

MyTable::icursor TclList  args  ) 
 

delegate the icursor command to the table

Definition at line 350 of file mytable.tcl.

MyTable::index TclList  args  ) 
 

delegate the index command to the table

Definition at line 315 of file mytable.tcl.

MyTable::insert TclList  args  ) 
 

delegate the insert command to the table

Definition at line 322 of file mytable.tcl.

MyTable::print  ) 
 

print the stored data. This simply calls parray on the _myArray variable. Definition at line 222 of file mytable.tcl.

MyTable::resize  )  [private]
 

propagate table resizing to the scrollbars.

Definition at line 188 of file mytable.tcl.

MyTable::rows TclNumber  value = 20  ) 
 

option -rows. configure the number of rows of the table Definition at line 477 of file mytable.tcl.

MyTable::selbackground TclRef  value = gray50  ) 
 

option -selbackground. set the color of the selected row Definition at line 468 of file mytable.tcl.

MyTable::selection TclList  args  ) 
 

delegate the selection command to the table.

Definition at line 289 of file mytable.tcl.

MyTable::selforeground TclRef  value = yellow  ) 
 

option -selforeground. set the color of the selected row Definition at line 459 of file mytable.tcl.

MyTable::setCell TclList  args  ) 
 

delegate the set command to the table

Definition at line 296 of file mytable.tcl.

MyTable::sortRows TclNumber  index,
TclList  args
 

sort the table rows in the given column. This method sorts the table along the column given by the parameter index. The sorting itself is the done by a lsort command

Parameters:
index the column which along which the table is sorted
args the arguments for the lsort command
Definition at line 375 of file mytable.tcl.

MyTable::spans TclList  args  ) 
 

delegate the spans command to the table

Definition at line 357 of file mytable.tcl.

MyTable::tag TclList  args  ) 
 

delegate the tag command to the table

Definition at line 275 of file mytable.tcl.

MyTable::troughcolor TclRef  value = gray  ) 
 

option -troughcolor. set the troughcolor of the scollbars Definition at line 416 of file mytable.tcl.

MyTable::vscrollmode TclRef  value = static  ) 
 

option -vscrollmode. Enable/disable display and mode of vertical scrollbar. Definition at line 425 of file mytable.tcl.

References error().

MyTable::vset TclList  args  ) 
 

delegate the set command to the vertical scrollbar.

Definition at line 174 of file mytable.tcl.

MyTable::width TclList  args  ) 
 

delegate the width command to the table

Definition at line 308 of file mytable.tcl.

MyTable::xview TclList  args  ) 
 

xview.

Definition at line 159 of file mytable.tcl.

MyTable::yview TclList  args  ) 
 

yview

Definition at line 166 of file mytable.tcl.


Member Data Documentation

TclRef MyTable::_myArray [private]
 

storage for the table content.

Definition at line 77 of file mytable.tcl.


The documentation for this class was generated from the following file:
XCDG 0.95 (20 Oct 2004)