GtkSource.SearchSettings¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
class |
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
Properties¶
Name |
Type |
Flags |
Short Description |
---|---|---|---|
r/w/c |
Search at word boundaries |
||
r/w/c |
Case sensitive |
||
r/w/c |
Whether to search by regular expression |
||
r/w/c |
The text to search |
||
r/w/c |
Wrap around |
Signals¶
- Inherited:
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
---|---|---|---|
parent |
r |
Class Details¶
- class GtkSource.SearchSettings(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
- classmethod new()¶
- Returns:
a new search settings object.
- Return type:
Creates a new search settings object.
New in version 3.10.
- get_at_word_boundaries()¶
- Returns:
whether to search at word boundaries.
- Return type:
New in version 3.10.
- get_case_sensitive()¶
- Returns:
whether the search is case sensitive.
- Return type:
New in version 3.10.
- get_regex_enabled()¶
- Returns:
whether to search by regular expressions.
- Return type:
New in version 3.10.
- get_search_text()¶
-
Gets the text to search. The return value must not be freed.
You may be interested to call
GtkSource.utils_escape_search_text
() after this function.New in version 3.10.
- get_wrap_around()¶
- Returns:
whether to wrap around the search.
- Return type:
New in version 3.10.
- set_at_word_boundaries(at_word_boundaries)¶
- Parameters:
at_word_boundaries (
bool
) – the setting.
Change whether the search is done at word boundaries. If at_word_boundaries is
True
, a search match must start and end a word. The match can span multiple words. See alsoGtk.TextIter.starts_word
() andGtk.TextIter.ends_word
().New in version 3.10.
- set_case_sensitive(case_sensitive)¶
- Parameters:
case_sensitive (
bool
) – the setting.
Enables or disables the case sensitivity for the search.
New in version 3.10.
- set_regex_enabled(regex_enabled)¶
- Parameters:
regex_enabled (
bool
) – the setting.
Enables or disables whether to search by regular expressions. If enabled, the
GtkSource.SearchSettings
:search-text
property contains the pattern of the regular expression.GtkSource.SearchContext
usesGLib.Regex
when regex search is enabled. See the Regular expression syntax page in the GLib reference manual.New in version 3.10.
- set_search_text(search_text)¶
- Parameters:
search_text (
str
orNone
) – the nul-terminated text to search, orNone
to disable the search.
Sets the text to search. If search_text is
None
or is empty, the search will be disabled. A copy of search_text will be made, so you can safely free search_text after a call to this function.You may be interested to call
GtkSource.utils_unescape_search_text
() before this function.New in version 3.10.
- set_wrap_around(wrap_around)¶
- Parameters:
wrap_around (
bool
) – the setting.
Enables or disables the wrap around search. If wrap_around is
True
, the forward search continues at the beginning of the buffer if no search occurrences are found. Similarly, the backward search continues to search at the end of the buffer.New in version 3.10.
Property Details¶
- GtkSource.SearchSettings.props.at_word_boundaries¶
-
If
True
, a search match must start and end a word. The match can span multiple words.New in version 3.10.
- GtkSource.SearchSettings.props.case_sensitive¶
-
Whether the search is case sensitive.
New in version 3.10.
- GtkSource.SearchSettings.props.regex_enabled¶
-
Search by regular expressions with
GtkSource.SearchSettings
:search-text
as the pattern.New in version 3.10.
- GtkSource.SearchSettings.props.search_text¶
-
A search string, or
None
if the search is disabled. If the regular expression search is enabled,GtkSource.SearchSettings
:search-text
is the pattern.New in version 3.10.
- GtkSource.SearchSettings.props.wrap_around¶
-
For a forward search, continue at the beginning of the buffer if no search occurrence is found. For a backward search, continue at the end of the buffer.
New in version 3.10.