Update ui.tools.listener docs
parent
75e8c793d7
commit
a98d59d93c
|
@ -133,7 +133,7 @@ CONSTANT: completion-popup-offset { -4 0 }
|
|||
[ [ 2drop find-world ] [ 2nip ] [ completion-popup-loc ] 3tri ] 3bi
|
||||
show-glass ;
|
||||
|
||||
: word-completion-popup ( interactor -- )
|
||||
: code-completion-popup ( interactor -- )
|
||||
dup vocab-completion?
|
||||
[ vocabs-matching ] [ words-matching ] ? '[ [ { } ] _ if-empty ]
|
||||
one-word-elt show-completion-popup ;
|
||||
|
|
|
@ -9,26 +9,18 @@ $nl
|
|||
$nl
|
||||
"Interactors implement the " { $link stream-readln } ", " { $link stream-read } " and " { $link read-quot } " generic words." } ;
|
||||
|
||||
ARTICLE: "ui-listener-completion" "Word and vocabulary completion"
|
||||
"The listener is great"
|
||||
;
|
||||
|
||||
ARTICLE: "ui-listener" "UI listener"
|
||||
"The graphical listener is based around the terminal listener (" { $link "listener" } ") and adds the following features:"
|
||||
{ $list
|
||||
"Input history"
|
||||
{ "Completion (see " { $link "ui-listener-completion" } ")" }
|
||||
{ "Clickable presentations (see " { $link "ui-presentations" } ")" }
|
||||
}
|
||||
"The graphical listener is based around the terminal listener (" { $link "listener" } ") and adds an input history, and word and vocabulary completion."
|
||||
{ $command-map listener-gadget "toolbar" }
|
||||
{ $command-map listener-gadget "scrolling" }
|
||||
{ $command-map listener-gadget "multi-touch" }
|
||||
{ $command-map interactor "completion" }
|
||||
{ $command-map interactor "interactor" }
|
||||
{ $command-map source-editor "word" }
|
||||
{ $command-map interactor "quotation" }
|
||||
{ $command-map listener-gadget "scrolling" }
|
||||
{ $command-map listener-gadget "multi-touch" }
|
||||
{ $heading "Editing commands" }
|
||||
"The text editing commands are standard; see " { $link "gadgets-editors" } "."
|
||||
{ $heading "Implementation" }
|
||||
"Listeners are instances of " { $link listener-gadget } ". The listener consists of an output area (instance of " { $link pane } ") and an input area (instance of " { $link interactor } ")." ;
|
||||
"Listeners are instances of " { $link listener-gadget } ". The listener consists of an output area (instance of " { $link pane } ") and an input area (instance of " { $link interactor } "). Clickable presentations can also be printed to the listener; see " { $link "ui-presentations" } "." ;
|
||||
|
||||
ABOUT: "ui-listener"
|
|
@ -340,7 +340,7 @@ interactor "interactor" f {
|
|||
} define-command-map
|
||||
|
||||
interactor "completion" f {
|
||||
{ T{ key-down f f "TAB" } word-completion-popup }
|
||||
{ T{ key-down f f "TAB" } code-completion-popup }
|
||||
{ T{ key-down f { C+ } "p" } recall-previous }
|
||||
{ T{ key-down f { C+ } "n" } recall-next }
|
||||
{ T{ key-down f { C+ } "r" } history-completion-popup }
|
||||
|
|
Loading…
Reference in New Issue