| Did you know ... | Search Documentation: |
| Send methods |
->size<-dict
that is not empty. Note that typing in a list_browser searches for an
item.->typed).
Incremental search is normally canceled when the pointer leaves the
window and when the user hits ESC or Control-G.|chain]->event
and may be used to keep track of selection changes in the list_browser
object. If action is set, the selection will
be cleared and then set to the argument dict_item
object. Action toggle will toggle the status of the
argument dict_item, while clear will empty the selection.
Redefinition of this method may be used to keep track of the
selection. See also list_browser->select_message
and list_browser->open_message.
->clear
to the
list_browser<-dict.->compute’s
the list_browser<-image
and list_browser<-scroll_bar. Initialises list_browser<-start_cell
to speed up redraw.<-key_binding
when the user hits return to confirm searching for an item.
->event
and succeed if this succeeds.->typed
to realise incremental search.<-popup,
open the popup using @_popup_gesture.<-selection
using list_browser->change_selection
and, If appropriate, execute one of the messages
list_browser <-open_messagedouble-click list_browser <-select_messageleft-click list_browser <-select_middle_messagemiddle-click
<-label’start
with the list_browser<-current_search and
extends the search string to the common prefix of the matching items. In
other words, it will extend the search string to the next choice-point.->insert_self),
this method extends the current -search_string to the next choice-point
(see list_browser->extend_prefix).
Otherwise list_browser->next
is invoked to advance to the next item requesting the keyboard in the
same device.<-search_string to
the current item. Useful when the user is searching for an item that
starts as the current. See also
list_browser->extend_prefix.<-image
and list_browser<-scroll_bar.<-height.size
is used. The size is interpreted in character units.<-label->advance).
See also
text_item->next.->multiple_selection: @off)
and the selection is in the visible part of the browser, the selected
object is taken as the start of the search. Otherwise, the top of the
visible page is choosen.
list_browser->previous_line
simply negates the argument before calling
list_browser->next_line.
See also list_browser->scroll_to.
->scroll_toDefaults: By default scrolls to the last item.
->normalise<-member is
selected.<-show_label-size
->_size<->style
= name using the attributes from the given style
object.
Suppose one has a list_browser that visualises a lexicon and we want the present all items that also appear in a glossary on the same domain in bold-face. This may be achieved using:
show_lexicon :-
new(B, browser('Lexicon')),
send(B, style, glossary, style(bold := @on)),
( lexicon(Item),
send(B, append, new(D, dict_item(Item))),
( glossary(Item)
-> send(D, style, glossary)
; true
),
fail
; true
),
send(B, open).
->tab_stops.
This feature may be used for multi-column tables and is especially useful when the items in the browser are displayed in a proportional font. The following example displays a database of persons where each person has a unique id and a name. The database is in the predicate person/2.
?- new(B, browser('Persons')),
send(B, tab_stops, vector(200)),
forall(person(Id, Name),
send(B, append,
dict_item(Id, string('%s\t%s',
Id, Name)))),
send(B, open).
|event_id<-key_binding. list_browser<-key_binding
is filled in list_browser->initialise
with an empty sub-keybinding of the default key_binding named list_browser
from @key_bindings.
The default key_binding object implements incremental search. See also class key_binding and class editor.
<-dict
from the list_browser
object and then invokes
device->unlink.
Bugs: Implicitely created dict objects generally will not be garbage collected as a dict has internal references.
<-width