Handbook
Glossary
gadget-selection ( gadget -- string/f )
Factor handbook
»
UI framework
»
Building user interfaces
»
Pre-made UI gadgets
»
Editor gadgets
»
The caret and mark
Prev:
gadget-selection? ( gadget -- ? )
Next:
remove-selection ( editor -- )
Vocabulary
ui
.
gadgets
Inputs
gadget
a
gadget
Outputs
string/f
a
string
or
f
Generic word contract
Outputs the gadget's text selection, or
f
if nothing is selected.
Definition
IN:
ui.gadgets
GENERIC:
gadget-selection
( gadget -- string/f )
Methods
USING:
accessors
documents
kernel
ui.gadgets
ui.gadgets.editors
ui.gadgets.editors.private
;
M:
editor
gadget-selection
[
selection-start/end
]
[
model>>
]
bi
doc-range
;
USING:
kernel
ui.gadgets
;
M:
gadget
gadget-selection
drop
f
;
USING:
ui.gadgets
ui.gadgets.panes
ui.gadgets.panes.private
;
M:
pane
gadget-selection
selected-subtree
gadget-text
;