Many additional Tk widgets have been developed as pure Tcl code and are available to Tcl programmers to dynamically load when they are required. Rexx/Tk extensions fulfil a similar role. Rather than building these additional widgets into the base Rexx/Tk with the overhead of the required Tcl code, each widget can be built into a seperate external Rexx function package and loaded by the Rexx programmer if required using the same mechanism as any external function package.
Because the Rexx/Tk extensions are required to run in the same Tcl interpreter as the base Rexx/Tk functions, a mechanism is required to pass the details used by the base Rexx/Tk package to the Rexx/Tk extensions. To achieve this, the base Rexx/Tk package provides a function; TkGetBaseData(), to return a value that is passed to the Rexx/Tk extension package's LoadFuncs function. eg.
/* Load the base Rexx/Tk package */ Call RxFuncAdd 'TkLoadFuncs','rexxtk','TkLoadFuncs' If TkLoadFuncs() \= 0 Then exit /* Load the Rexx/Tk Tree Extension */ Call RxFuncAdd 'TkTreeLoadFuncs','rexxtktree','TkTreeLoadFuncs' If TkTreeLoadFuncs(TkGetBaseData()) \= 0 Then exitThe value returned from TkGetBaseData() is in fact a pointer to memory, so it should not be altered in any way.
Rexx/Tk comes with a number of extension packages. They are described below.
This set of functions is used for the creation and manipulation of tree widgets. It is based heavily on the Tcl Tree widget created by D. Richard Hipp which is Copyright © 1997,1998 D. Richard Hipp.
To use it you must load the rexxtktree external function package and call TkTreeLoadFuncs function.
Rexx/Tk Tree Function | Tree widget command |
TkTree(pathName [,options...]) | Tree:create |
TkTreeAddNode(pathName, name [,options...]) | Tree:newitem |
TkTreeClose(pathName, name) | Tree:close |
TkTreeDNode(pathName, name) | Tree:delitem |
TkTreeGetLabel(pathName, x, y) | Tree:labelat |
TkTreeGetSelection(pathName) | Tree:getselection |
TkTreeOpen(pathName, name) | Tree:open |
TkTreeSetSelection(pathName, label) | Tree:setselection |
TkTreeLoadFuncs(basedata) | N/A |
TkTreeDropFuncs() | N/A |
Items marked with * are base Rexx/Tk functions that can be used with Rexx/Tk extensions. |
This set of functions is used for the creation and manipulation of combobox widgets. It is based heavily on the Combobox widget created by Bryan Oakley which is Copyright © Bryan Oakley.
To use it you must load the rexxtkcombobox external function package.
Rexx/Tk Combobox Function | Combobox widget command |
---|---|
TkCombobox(pathName [,options...]) | combobox::combobox |
*TkBbox(pathName, index) | combobox bbox |
TkComboboxICursor(pathName, index) | combobox icursor |
TkComboboxListDelete(pathName, first [,last]) | combobox list delete |
TkComboboxListGet(pathName, first [,last]) | combobox list get |
TkComboboxListIndex(pathName, index) | combobox list index |
TkComboboxListInsert(pathName, index [,args...]) | combobox list insert |
TkComboboxListSize(pathName) | combobox list size |
TkComboboxSelect(pathName, index) | combobox select |
TkComboboxSubwidget(pathName [name]) | combobox subwidget |
*TkConfig(pathName [,options...]) | combobox configure |
*TkCurselection(pathName) | combobox curselection |
*TkDelete(pathName, first [,last]) | combobox delete |
*TkGet(pathName) | combobox get |
*TkIndex(pathName, index) | combobox index |
*TkInsert(pathName, index, string) | combobox insert |
*TkScan(pathName [,args...]) | combobox scan |
*TkSelection(pathName [,args...]) | combobox selection |
TkComboboxLoadFuncs(basedata) | N/A |
TkComboboxDropFuncs() | N/A |
Items marked with * are base Rexx/Tk functions that can be used with Rexx/Tk extensions. |
This set of functions is used for the creation and manipulation of multi-column listbox widgets. It is based heavily on the MCListbox widget created by Bryan Oakley which is Copyright © Bryan Oakley.
To use it you must load the rexxtkmclistbox external function package.
Rexx/Tk MCListbox Function | MCListbox widget command |
TkMCListbox(pathName [,options...]) | mclistbox::mclistbox |
*TkActivate(pathName, index) | mclistbox activate | *TkBbox(pathName [,arg...]) | mclistbox bbox |
*TkCget(pathName [,arg...] ) | mclistbox cget |
*TkConfig(pathName [,options...]) | mclistbox configure |
*TkCurSelection(pathName [,arg...] ) | mclistbox curselection |
*TkDelete(pathName, start, end) | mclistbox delete |
*TkGet(pathName) | mclistbox get |
*TkIndex(pathName arg) | mclistbox index |
*TkInsert(pathName [,arg...]) | mclistbox insert |
TkMCListboxColumnAdd(pathName, name [,options...]) | mclistbox column add |
TkMCListboxColumnCget(pathName, name ,option) | mclistbox column cget |
TkMCListboxColumnConfig(pathName, name [,options...]) | mclistbox column configure |
TkMCListboxColumnDelete(pathName, name) | mclistbox column delete |
TkMCListboxColumnNames(pathName) | mclistbox column names |
TkMCListboxColumnNearest(pathName,x) | mclistbox column nearest |
TkMCListboxLabelBind(pathName,name,sequence,[*|+]command) | mclistbox label bind |
*TkNearest(pathName, xOry) | mclistbox nearest |
*TkScan(pathName [,args...]) | mclistbox scan |
*TkSee(pathName ???[,options...]) | mclistbox see |
*TkSelection(pathName [,args...]) | mclistbox selection |
*TkXView(pathName [,arg...]) | mclistbox xview |
*TkYView(pathName [,arg...]) | mclistbox yview |
TkMCListboxLoadFuncs(basedata) | N/A |
TkMCListboxDropFuncs() | N/A |
Items marked with * are base Rexx/Tk functions that can be used with Rexx/Tk extensions. |
Copyright (C) 2000 Mark HesslingThis library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library 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 Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.