| << Prev | - Up - | Next >> |
TkTools
The TkTools.error class extends TkTools.dialog.
tkInit
tkInit(title:+TitleTcl<= 'Error'
master:+MasterTcl<= NoArg
aspect:+AspectI<= 250
text:+TextTcl)
Initialise the widget object and create a new error dialog.
+AspectI 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.
The TkTools.dialog class extends Tk.frame.
tkInit tkInit(title:+TitleTcl
master:+WidgetO<= NoArg
root:+Root<= master
buttons:+ButtonsL
pack:+PackB<= true
focus:+FocusI<= 0
bg:+BackgroundA<= NoArg
default:+DefaultI<= 0
delete:+DeleteAction<= NoArg)
Initialise the widget object and create a new dialog. This widget needs at least two informations: the title and a list of buttons. Each element of the button list is of the form: LabelTcl # nullary procedure. Two examples are:
'close' # tkClose
'nothing'# proc {$} skip end
A master widget is specified by +WidgetO. Depending on +Root the widget will be placed in relation to the master like following:
master The dialog will be placed in the upper left corner within the master widget.
master#XOff#YOff The dialog will be placed in the upper left corner of the master widget plus the xoffset and yoffset.
pointer The dialog will be placed on the current pointer position.
X#Y User defined position.
If you want to use a focus then you describe by +FocusI the button that gets the focus. By +DefaultI you set the default button.
tkPack tkPack
Pack the dialog.
tkClose tkClose
Close the dialog.
The TkTools.textframe class extends Tk.frame and has only one method.
tkInit tkInit(parent:+WidgetO
'class':+ClassTcl<= unit
text:+TextTcl
font:+FontO<= DefaultFont)
Initialise the widget object and create a new textframe.
The TkTools.notebook class extends Tk.canvas.
tkInit tkInit(parent:+WidgetO
font:+FontO<= DefaultFont)
Initialise the widget object and create a new notebook.
add add(+NoteO)
Add a new note.
remove remove(+NoteO)
Remove a note.
toTop toTop(+NoteO)
Bring note +NoteO to the top.
getTop getTop(?NoteO)
Return the top note.
The TkTools.note class extends Tk.frame.
tkInit tkInit(parent:+WidgetO
text:+TextTcl)
Initialise the widget object and create a new note. The note packs itself, thus you should avoid sending packaging commands, otherwise the system hangs.
toTop toTop()
This is an empty method. If yo want any action to be performed you have to derive the TkTools.note class and to overwrite the toTop method.
The TkTools.scale class extends Tk.frame.
init init(parent:+WidgetO
width:+WidthI
values:+ValuesL
initpos:+PosI)
Initialise the widget object and create a new scale.The field +ValuesL describes all possible values, whereby the initial value is described by position +PosI.
drawTicks drawTicks()
Draw.
get get(?ValueI)
Get the current value.
The TkTools.numberentry class extends Tk.frame.
tkInit tkInit(parent:+WidgetO
min:+MinI<= unit
max:+MaxI<= unit
val:+ValI<= MinI
font:+FontO<= DefaultFont
width:+WidthI<= 6
action:+ActionP<= DummyAction
returnaction:+RetActP<= unit)
Initialise the widget object and create a new number entry. The number entry contains all values within +MinI and +MaxI, and shows initially the value +ValI. Allthough it is possible to set +ValI less than +MinI you should not do it.
By +ActionP you define an unary procedure that is each time invoked, when alter the value of the number entry. Furthermore you may set a return procedure, that is invoked when you press Return.
tkAction tkAction(+ActionP<= unit)
Set a new action procedure.
tkSet tkSet(+ValI)
Set a new value.
tkGet tkGet(?ValI)
Get value.
enter enter(+B)
Hm. I see no difference.
The function
{TkTools.images+L?+R}
takes a list of URLs as input and returns a record of images, where the fields are atoms derived naturally from the URLs.
First the basename of the URL is computed by taking the last fragment of the URL (that is, 'wp.gif' for example). The extension (the part following the period, 'gif' for example), determines the type and format of the image. The part of the basename that precedes the period yields the feature.
| << Prev | - Up - | Next >> |