SourceSearchContext
Object Hierarchy:
Description:
[ CCode ( type_id = "gtk_source_search_context_get_type ()" ) ]
[ GIR ( name = "SearchContext" ) ]
public class SourceSearchContext : Object
[ GIR ( name = "SearchContext" ) ]
public class SourceSearchContext : Object
Namespace: Gtk
Package: gtksourceview-3.0
Content:
Properties:
- public SourceBuffer buffer { get; construct; }
The SourceBuffer associated to the search context.
- public bool highlight { get; set construct; }
Highlight the search occurrences.
- public SourceStyle match_style { get; set construct; }
A SourceStyle, or
null
for theme's scheme default style. - public int occurrences_count { get; }
The total number of search occurrences.
- public Error? regex_error { owned get; }
If the regex search pattern doesn't follow all the rules, this property will be set.
- public SourceSearchSettings settings { get; set construct; }
The SourceSearchSettings associated to the search context.
Creation methods:
- public SourceSearchContext (SourceBuffer buffer, SourceSearchSettings? settings)
Creates a new search context, associated with
buffer
, and customized withsettings
.
Methods:
- public bool backward (TextIter iter, out TextIter match_start, out TextIter match_end)
Synchronous backward search.
- public bool backward2 (TextIter iter, out TextIter match_start, out TextIter match_end, out bool has_wrapped_around)
Synchronous backward search.
- public async bool backward_async (TextIter iter, Cancellable? cancellable, out TextIter match_start, out TextIter match_end) throws Error
The asynchronous version of backward2.
- public bool backward_finish2 (AsyncResult result, out TextIter match_start, out TextIter match_end, out bool has_wrapped_around) throws Error
Finishes a backward search started with backward_async.
- public bool forward (TextIter iter, out TextIter match_start, out TextIter match_end)
Synchronous forward search.
- public bool forward2 (TextIter iter, out TextIter match_start, out TextIter match_end, out bool has_wrapped_around)
Synchronous forward search.
- public async bool forward_async (TextIter iter, Cancellable? cancellable, out TextIter match_start, out TextIter match_end) throws Error
The asynchronous version of forward2.
- public bool forward_finish2 (AsyncResult result, out TextIter match_start, out TextIter match_end, out bool has_wrapped_around) throws Error
Finishes a forward search started with forward_async.
- public unowned SourceBuffer get_buffer ()
- public bool get_highlight ()
- public unowned SourceStyle get_match_style ()
- public int get_occurrence_position (TextIter match_start, TextIter match_end)
Gets the position of a search occurrence.
- public int get_occurrences_count ()
Gets the total number of search occurrences.
- public Error? get_regex_error ()
Regular expression patterns must follow certain rules.
- public unowned SourceSearchSettings get_settings ()
- public bool replace (TextIter match_start, TextIter match_end, string replace, int replace_length) throws Error
Replaces a search match by another text.
- public bool replace2 (TextIter match_start, TextIter match_end, string replace, int replace_length) throws Error
Replaces a search match by another text.
- public uint replace_all (string replace, int replace_length) throws Error
Replaces all search matches by another text.
- public void set_highlight (bool highlight)
Enables or disables the search occurrences highlighting.
- public void set_match_style (SourceStyle? match_style)
Set the style to apply on search matches.
- public void set_settings (SourceSearchSettings? settings)
Associate a SourceSearchSettings with the search context.
Inherited Members:
All known members inherited from class GLib.Object