Handbook
Glossary
gadget-selection? ( gadget -- ? )
Factor handbook
»
UI framework
»
Building user interfaces
»
Pre-made UI gadgets
»
Editor gadgets
»
The caret and mark
Prev:
mark>caret ( editor -- )
Next:
gadget-selection ( gadget -- string/f )
Vocabulary
ui
.
gadgets
Inputs
gadget
a
gadget
Outputs
?
a
boolean
Generic word contract
Outputs if the gadget has an active text selection; if so, the selected text can be obtained with a call to
gadget-selection
.
Definition
IN:
ui.gadgets
GENERIC:
gadget-selection?
( gadget -- ? )
Methods
USING:
kernel
ui.gadgets
ui.gadgets.editors
ui.gadgets.editors.private
;
M:
editor
gadget-selection?
selection-start/end
=
not
;
USING:
kernel
ui.gadgets
;
M:
gadget
gadget-selection?
drop
f
;
USING:
kernel
ui.gadgets
ui.gadgets.panes
ui.gadgets.panes.private
;
M:
pane
gadget-selection?
pane-caret&mark
and
;