About
Maintaining different versions for an application in text and graphic
modes is costly and problematic. AbsTK is a free Python toolkit for
interface building, which abstracts away the visual elements and allows
one to develop applications which execute both in textual and
graphical
environments.
It currently supports the Unix console through ncurses and X11 through Qt,
and is released under the GNU GPL.
AbsTK is used in the GoboLinux
Installer.
Download
- AbsTK 0.1 - first public release (May 13th 2004).
API
The AbsTK API is designed to be very minimalistic, and abstract
away most issues related to the actual display of data, while allowing
the development of fully programmable interfaces through a simplified
callback system. Have a glimpse of the very simple programming interface:
class Wizard:
__init__(self, name)
showMessageBox(self, message, buttons = ['Ok, Cancel'])
start(self)
addScreen(self, screen)
setValue(self, field, value)
getValue(self, field)
setEnabled(self, field, enabled)
isEnabled(self, field)
clear(self, newName = '')
class Screen:
__init__(self, title = "")
setTitle(self,title)
setValue(self, fieldName, newValue)
getValue(self, fieldName)
addImage(self, fileName)
addLabel (self, fieldName = '', label = '',
defaultValue = '',
toolTip = '')
addBoolean (self, fieldName = '', label = '',
defaultValue = 0,
toolTip = '', callBack = None)
addPassword (self, fieldName = '', label = '',
defaultValue = '',
toolTip = '', callBack = None)
addLineEdit (self, fieldName = '', label = '',
defaultValue = '',
toolTip = '', callBack = None)
addMultiLineEdit(self, fieldName = '', label = '',
defaultValue = '',
toolTip = '', callBack = None)
addButton (self, fieldName = '', label = '',
defaultValue = '',
toolTip = '', callBack = None)
addList (self, fieldName = '', label = '',
defaultValueTuple = ([],''),
toolTip = '', callBack = None)
addBoxList (self, fieldName = '', label = '',
defaultValueTuple = ([],''),
toolTip = '', callBack = None)
addRadioList (self, fieldName = '', label = '',
defaultValueTuple = ([],''),
toolTip = '', callBack = None)
addCheckList (self, fieldName = '', label = '',
defaultValueTuple = ([],[]),
toolTip = '', callBack = None)
Authors
AbsTK was created by
Hisham Muhammad and
André Detsch.
|