Handbook
Glossary
Pane gadgets
Factor handbook
»
UI framework
»
Building user interfaces
»
Pre-made UI gadgets
Prev:
Popup menus
Next:
Presentation gadgets
The
ui
.
gadgets
.
panes
vocabulary implements panes, which display formatted text.
pane
<pane>
( -- pane )
<pane-control>
( model quot -- pane )
Panes are written to by creating a special output stream:
pane-stream
<pane-stream>
( pane -- pane-stream )
In addition to the stream output words (
Stream protocol
), pane streams can have gadgets written to them:
write-gadget
( gadget stream -- )
print-gadget
( gadget stream -- )
gadget.
( gadget -- )
The
gadget.
word is useful for interactive debugging of gadgets in the listener.
There are a few combinators for working with panes:
with-pane
( pane quot -- )
make-pane
( quot -- gadget )