![]() |
You. Forth. Simplicity. |
reload node | edit | recent changes | front page
The Windows and Generic ports of RetroForth provide support for using external libraries. One of the first significant uses of this functionality was to provide bindings for GTK+.
The primary focus of our bindings at this time is to allow creation of form-based applications quickly and easily. The primary bindings are complete, but much work on them remains to be done.
For you enjoyment, a few screenshots:
init
Initialize the GTK+ environment
To create a window:
window: name
To set the title:
name " title" setTitle
To create a button:
" initial label" button: name-of-button
To obtain the label of a button:
name-of-button button.getText
To set the label of a button:
name-of-button " new label" button.setText
To create a label:
" initial text" label: label-name
To change the text of a label:
label-name " text" label.setText
hbox-fixed:
vbox-fixed:
hbox:
vbox:
hButtonBox:
vButtonBox:
scrolled:
Single Line Text Entry
To create a text entry field:
entry: name
To change the text of a field:
name " text" entry.setText
To get the text in a field:
name entry.getText
To set the width of the field:
name #chars entry.setWidth
To set the maximum length of a field:
name #chars entry.setMaxLength
For a multi-line entry box, use textbox instead of entry