|
|
@ -3337,6 +3337,20 @@ utils
|
|
|
|
|
|
|
|
|
|
|
|
Exactly like ``erase_sorted_key``, but if field is specified, takes the key from ``item[field]``.
|
|
|
|
Exactly like ``erase_sorted_key``, but if field is specified, takes the key from ``item[field]``.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
* ``utils.search_text(text,search_tokens)``
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Returns true if all the search tokens are found within ``text``. The text and
|
|
|
|
|
|
|
|
search tokens are normalized to lower case and special characters (e.g. ``A``
|
|
|
|
|
|
|
|
with a circle on it) are converted to their "basic" forms (e.g. ``a``).
|
|
|
|
|
|
|
|
``search_tokens`` can be a string or a table of strings. If it is a string,
|
|
|
|
|
|
|
|
it is split into space-separated tokens before matching. The search tokens
|
|
|
|
|
|
|
|
are treated literally, so any special regular expression characters do not
|
|
|
|
|
|
|
|
need to be escaped. If ``utils.FILTER_FULL_TEXT`` is ``true``, then the
|
|
|
|
|
|
|
|
search tokens can match any part of ``text``. If it is ``false``, then the
|
|
|
|
|
|
|
|
matches must happen at the beginning of words within ``text``. You can change
|
|
|
|
|
|
|
|
the value of ``utils.FILTER_FULL_TEXT`` in `gui/control-panel` on the
|
|
|
|
|
|
|
|
"Preferences" tab.
|
|
|
|
|
|
|
|
|
|
|
|
* ``utils.call_with_string(obj,methodname,...)``
|
|
|
|
* ``utils.call_with_string(obj,methodname,...)``
|
|
|
|
|
|
|
|
|
|
|
|
Allocates a temporary string object, calls ``obj:method(tmp,...)``, and
|
|
|
|
Allocates a temporary string object, calls ``obj:method(tmp,...)``, and
|
|
|
@ -5291,12 +5305,11 @@ FilteredList class
|
|
|
|
------------------
|
|
|
|
------------------
|
|
|
|
|
|
|
|
|
|
|
|
This widget combines List, EditField and Label into a combo-box like
|
|
|
|
This widget combines List, EditField and Label into a combo-box like
|
|
|
|
construction that allows filtering the list by subwords of its items.
|
|
|
|
construction that allows filtering the list.
|
|
|
|
|
|
|
|
|
|
|
|
In addition to passing through all attributes supported by List, it
|
|
|
|
In addition to passing through all attributes supported by List, it
|
|
|
|
supports:
|
|
|
|
supports:
|
|
|
|
|
|
|
|
|
|
|
|
:case_sensitive: If ``true``, matching is case sensitive. Defaults to ``false``.
|
|
|
|
|
|
|
|
:edit_pen: If specified, used instead of ``cursor_pen`` for the edit field.
|
|
|
|
:edit_pen: If specified, used instead of ``cursor_pen`` for the edit field.
|
|
|
|
:edit_below: If true, the edit field is placed below the list instead of above.
|
|
|
|
:edit_below: If true, the edit field is placed below the list instead of above.
|
|
|
|
:edit_key: If specified, the edit field is disabled until this key is pressed.
|
|
|
|
:edit_key: If specified, the edit field is disabled until this key is pressed.
|
|
|
@ -5345,9 +5358,9 @@ Filter behavior:
|
|
|
|
|
|
|
|
|
|
|
|
By default, the filter matches substrings that start at the beginning of a word
|
|
|
|
By default, the filter matches substrings that start at the beginning of a word
|
|
|
|
(or after any punctuation). You can instead configure filters to match any
|
|
|
|
(or after any punctuation). You can instead configure filters to match any
|
|
|
|
substring with a command like::
|
|
|
|
substring across the full text with a command like::
|
|
|
|
|
|
|
|
|
|
|
|
:lua require('gui.widgets').FILTER_FULL_TEXT=true
|
|
|
|
:lua require('utils').FILTER_FULL_TEXT=true
|
|
|
|
|
|
|
|
|
|
|
|
TabBar class
|
|
|
|
TabBar class
|
|
|
|
------------
|
|
|
|
------------
|
|
|
|