Trait sourceview4::prelude::SearchSettingsExt
source · pub trait SearchSettingsExt: IsA<SearchSettings> + Sealed + 'static {
Show 15 methods
// Provided methods
fn is_at_word_boundaries(&self) -> bool { ... }
fn is_case_sensitive(&self) -> bool { ... }
fn is_regex_enabled(&self) -> bool { ... }
fn search_text(&self) -> Option<GString> { ... }
fn wraps_around(&self) -> bool { ... }
fn set_at_word_boundaries(&self, at_word_boundaries: bool) { ... }
fn set_case_sensitive(&self, case_sensitive: bool) { ... }
fn set_regex_enabled(&self, regex_enabled: bool) { ... }
fn set_search_text(&self, search_text: Option<&str>) { ... }
fn set_wrap_around(&self, wrap_around: bool) { ... }
fn connect_at_word_boundaries_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId { ... }
fn connect_case_sensitive_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId { ... }
fn connect_regex_enabled_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId { ... }
fn connect_search_text_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId { ... }
fn connect_wrap_around_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId { ... }
}
Expand description
Provided Methods§
sourcefn is_at_word_boundaries(&self) -> bool
fn is_at_word_boundaries(&self) -> bool
Returns
whether to search at word boundaries.
sourcefn is_case_sensitive(&self) -> bool
fn is_case_sensitive(&self) -> bool
Returns
whether the search is case sensitive.
sourcefn is_regex_enabled(&self) -> bool
fn is_regex_enabled(&self) -> bool
Returns
whether to search by regular expressions.
sourcefn search_text(&self) -> Option<GString>
fn search_text(&self) -> Option<GString>
sourcefn wraps_around(&self) -> bool
fn wraps_around(&self) -> bool
Returns
whether to wrap around the search.
sourcefn set_at_word_boundaries(&self, at_word_boundaries: bool)
fn set_at_word_boundaries(&self, at_word_boundaries: bool)
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 also gtk::TextIter::starts_word()
and
gtk::TextIter::ends_word()
.
at_word_boundaries
the setting.
sourcefn set_case_sensitive(&self, case_sensitive: bool)
fn set_case_sensitive(&self, case_sensitive: bool)
sourcefn set_regex_enabled(&self, regex_enabled: bool)
fn set_regex_enabled(&self, regex_enabled: bool)
Enables or disables whether to search by regular expressions.
If enabled, the search-text
property contains the
pattern of the regular expression.
SearchContext
uses GRegex
when regex search is enabled. See the
Regular expression syntax
page in the GLib reference manual.
regex_enabled
the setting.
sourcefn set_search_text(&self, search_text: Option<&str>)
fn set_search_text(&self, search_text: Option<&str>)
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 gtk_source_utils_unescape_search_text()
before
this function.
search_text
the nul-terminated text to search, or None
to disable the search.
sourcefn set_wrap_around(&self, wrap_around: bool)
fn set_wrap_around(&self, wrap_around: bool)
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.
wrap_around
the setting.