gtksource.search_context
Module for [SearchContext] class
Types 3
Methods
SearchContextGidBuilder builder() static nothrowGet builder for [gtksource.search_context.SearchContext] Returns: New builder objectgtksource.buffer.Buffer buffer() @property nothrowGet `buffer` property. Returns: The #GtkSourceBuffer associated to the search context.bool highlight() @property nothrowGet `highlight` property. Returns: Highlight the search occurrences.void highlight(bool propval) @property nothrowSet `highlight` property. Params: propval = Highlight the search occurrences.gtksource.style.Style matchStyle() @property nothrowGet `matchStyle` property. Returns: A #GtkSourceStyle, or null for theme's scheme default style.void matchStyle(gtksource.style.Style propval) @property nothrowSet `matchStyle` property. Params: propval = A #GtkSourceStyle, or null for theme's scheme default style.int occurrencesCount() @property nothrowGet `occurrencesCount` property. Returns: The total number of search occurrences. If the search is disabled, the value is 0. If the buffer is not already fully scanned, the value is -1.void * regexError() @property nothrowGet `regexError` property. Returns: If the regex search pattern doesn't follow all the rules, this #GError property will be set. If the pattern is valid, the value is null.gtksource.search_settings.SearchSettings settings() @property nothrowGet `settings` property. Returns: The #GtkSourceSearchSettings associated to the search context.bool backward(gtk.text_iter.TextIter iter, out gtk.text_iter.TextIter matchStart, out gtk.text_iter.TextIter matchEnd, out bool hasWrappedAround) nothrowSynchronous backward search. It is recommended to use the asynchronous functions instead, to not block the user interface. However, if you are sure that the buffer is small, this function is more c...void backwardAsync(gtk.text_iter.TextIter iter, gio.cancellable.Cancellable cancellable = null, gio.types.AsyncReadyCallback callback = null) nothrowThe asynchronous version of [gtksource.search_context.SearchContext.backward].bool backwardFinish(gio.async_result.AsyncResult result, out gtk.text_iter.TextIter matchStart, out gtk.text_iter.TextIter matchEnd, out bool hasWrappedAround)Finishes a backward search started with [gtksource.search_context.SearchContext.backwardAsync].bool forward(gtk.text_iter.TextIter iter, out gtk.text_iter.TextIter matchStart, out gtk.text_iter.TextIter matchEnd, out bool hasWrappedAround) nothrowSynchronous forward search. It is recommended to use the asynchronous functions instead, to not block the user interface. However, if you are sure that the buffer is small, this function is more co...void forwardAsync(gtk.text_iter.TextIter iter, gio.cancellable.Cancellable cancellable = null, gio.types.AsyncReadyCallback callback = null) nothrowThe asynchronous version of [gtksource.search_context.SearchContext.forward].bool forwardFinish(gio.async_result.AsyncResult result, out gtk.text_iter.TextIter matchStart, out gtk.text_iter.TextIter matchEnd, out bool hasWrappedAround)Finishes a forward search started with [gtksource.search_context.SearchContext.forwardAsync].gtksource.buffer.Buffer getBuffer() nothrowbool getHighlight() nothrowgtksource.style.Style getMatchStyle() nothrowint getOccurrencePosition(gtk.text_iter.TextIter matchStart, gtk.text_iter.TextIter matchEnd) nothrowGets the position of a search occurrence. If the buffer is not already fully scanned, the position may be unknown, and -1 is returned. If 0 is returned, it means that this part of the buffer has al...int getOccurrencesCount() nothrowGets the total number of search occurrences. If the buffer is not already fully scanned, the total number of occurrences is unknown, and -1 is returned. Returns: the total number of search occurren...glib.error.ErrorWrap getRegexError() nothrowRegular expression patterns must follow certain rules. If #GtkSourceSearchSettings:search-text breaks a rule, the error can be retrieved with this function. The error domain is #G_REGEX_ERROR.bool replace(gtk.text_iter.TextIter matchStart, gtk.text_iter.TextIter matchEnd, string replace)Replaces a search match by another text. If match_start and match_end doesn't correspond to a search match, false is returned.uint replaceAll(string replace)Replaces all search matches by another text. It is a synchronous function, so it can block the user interface.void setMatchStyle(gtksource.style.Style matchStyle = null) nothrowSet the style to apply on search matches. If match_style is null, default theme's scheme 'match-style' will be used. To enable or disable the search highlighting, use [gtksource.search_context.Sear...Constructors
this(gtksource.buffer.Buffer buffer, gtksource.search_settings.SearchSettings settings = null)Creates a new search context, associated with buffer, and customized with settings. If settings is null, a new #GtkSourceSearchSettings object will be created, that you can retrieve with [gtksource...Fluent builder implementation template for gtksource.search_context.SearchContext
Methods
T buffer(gtksource.buffer.Buffer propval) nothrowSet `buffer` property. Params: propval = The #GtkSourceBuffer associated to the search context. Returns: Builder instance for fluent chainingT highlight(bool propval) nothrowSet `highlight` property. Params: propval = Highlight the search occurrences. Returns: Builder instance for fluent chainingT matchStyle(gtksource.style.Style propval) nothrowSet `matchStyle` property. Params: propval = A #GtkSourceStyle, or null for theme's scheme default style. Returns: Builder instance for fluent chainingT settings(gtksource.search_settings.SearchSettings propval) nothrowSet `settings` property. Params: propval = The #GtkSourceSearchSettings associated to the search context.Fluent builder for gtksource.search_context.SearchContext
Methods