gtksource.completion
Module for [Completion] class
Types 3
Main Completion Object.
The completion system helps the user when they writes some text, such as words, command names, functions, and suchlike. Proposals can be shown, to complete the text the user is writing. Each proposal can contain an additional piece of information (for example documentation), that is displayed when the "Details" button is clicked.
Proposals are created via a iface@CompletionProvider. There can be for example a provider to complete words (see class@CompletionWords), another provider for the completion of function names, etc. To add a provider, call [gtksource.completion.Completion.addProvider].
The iface@CompletionProposal interface represents a proposal.
If a proposal contains extra information (see [gtksource.types.CompletionColumn.Details]), it will be displayed in a supplemental details window, which appears when the "Details" button is clicked.
Each class@View object is associated with a class@Completion instance. This instance can be obtained with [gtksource.view.View.getCompletion]. The class@View class contains also the signal@View::show-completion signal.
A same iface@CompletionProvider object can be used for several [gtksource.completion.Completion]'s.
Completion self()Returns `this`, for use in `with` statements.CompletionGidBuilder builder()Get builder for [gtksource.completion.Completion] Returns: New builder objectgtk.text_view.TextView buffer() @propertyGet `buffer` property. Returns: The #GtkTextBuffer for the #GtkSourceCompletion:view. This is a convenience property for providers.uint pageSize() @propertyGet `pageSize` property. Returns: The number of rows to display to the user before scrolling.void pageSize(uint propval) @propertySet `pageSize` property. Params: propval = The number of rows to display to the user before scrolling.bool rememberInfoVisibility() @propertyGet `rememberInfoVisibility` property. Returns: Determines whether the visibility of the info window should be saved when the completion is hidden, and restored when the completion is shown again.void rememberInfoVisibility(bool propval) @propertySet `rememberInfoVisibility` property. Params: propval = Determines whether the visibility of the info window should be saved when the completion is hidden, and restored when the completion is show...bool selectOnShow() @propertyGet `selectOnShow` property. Returns: Determines whether the first proposal should be selected when the completion is first shown.void selectOnShow(bool propval) @propertySet `selectOnShow` property. Params: propval = Determines whether the first proposal should be selected when the completion is first shown.bool showIcons() @propertyGet `showIcons` property. Returns: The "show-icons" property denotes if icons should be displayed within the list of completions presented to the user.void showIcons(bool propval) @propertySet `showIcons` property. Params: propval = The "show-icons" property denotes if icons should be displayed within the list of completions presented to the user.gtksource.view.View view() @propertyGet `view` property. Returns: The "view" property is the #GtkTextView for which this #GtkSourceCompletion is providing completion features.pango.attr_list.AttrList fuzzyHighlight(string haystack, string casefoldQuery)This will add `<b>` tags around matched characters in haystack based on casefold_query.bool fuzzyMatch(string haystack, string casefoldNeedle, out uint priority)This helper function can do a fuzzy match for you giving a haystack and casefolded needle.void addProvider(gtksource.completion_provider.CompletionProvider provider)Adds a `ifaceCompletionProvider` to the list of providers to be queried for completion results.void blockInteractive()gtksource.buffer.Buffer getBuffer()Gets the connected `classView`'s `classBuffer` Returns: A #GtkSourceBufferuint getPageSize()gtksource.view.View getView()Gets the `classView` that owns the `classCompletion`. Returns: A #GtkSourceViewvoid hide()Emits the "hide" signal.void removeProvider(gtksource.completion_provider.CompletionProvider provider)Removes a `ifaceCompletionProvider` previously added with [gtksource.completion.Completion.addProvider].void setPageSize(uint pageSize)void show()Emits the "show" signal.void unblockInteractive()gulong connectHide(T)(T callback, Flag!"After" after = No.After) if (isCallable!T
&& is(ReturnType!T == void)
&& (Parameters!T.length < 1 || (ParameterStorageClassTuple!T[0] == ParameterStorageClass.none && is(Parameters!T[0] : gtksource.completion.Completion)))
&& Parameters!T.length < 2)Connect to `Hide` signal.gulong connectProviderAdded(T)(T callback, Flag!"After" after = No.After) if (isCallable!T
&& is(ReturnType!T == void)
&& (Parameters!T.length < 1 || (ParameterStorageClassTuple!T[0] == ParameterStorageClass.none && is(Parameters!T[0] : gtksource.completion_provider.CompletionProvider)))
&& (Parameters!T.length < 2 || (ParameterStorageClassTuple!T[1] == ParameterStorageClass.none && is(Parameters!T[1] : gtksource.completion.Completion)))
&& Parameters!T.length < 3)Connect to `ProviderAdded` signal.gulong connectProviderRemoved(T)(T callback, Flag!"After" after = No.After) if (isCallable!T
&& is(ReturnType!T == void)
&& (Parameters!T.length < 1 || (ParameterStorageClassTuple!T[0] == ParameterStorageClass.none && is(Parameters!T[0] : gtksource.completion_provider.CompletionProvider)))
&& (Parameters!T.length < 2 || (ParameterStorageClassTuple!T[1] == ParameterStorageClass.none && is(Parameters!T[1] : gtksource.completion.Completion)))
&& Parameters!T.length < 3)Connect to `ProviderRemoved` signal.gulong connectShow(T)(T callback, Flag!"After" after = No.After) if (isCallable!T
&& is(ReturnType!T == void)
&& (Parameters!T.length < 1 || (ParameterStorageClassTuple!T[0] == ParameterStorageClass.none && is(Parameters!T[0] : gtksource.completion.Completion)))
&& Parameters!T.length < 2)Connect to `Show` signal.T pageSize(uint propval)Set `pageSize` property. Params: propval = The number of rows to display to the user before scrolling. Returns: Builder instance for fluent chainingT rememberInfoVisibility(bool propval)Set `rememberInfoVisibility` property. Params: propval = Determines whether the visibility of the info window should be saved when the completion is hidden, and restored when the completion is show...T selectOnShow(bool propval)Set `selectOnShow` property. Params: propval = Determines whether the first proposal should be selected when the completion is first shown. Returns: Builder instance for fluent chainingT showIcons(bool propval)Set `showIcons` property. Params: propval = The "show-icons" property denotes if icons should be displayed within the list of completions presented to the user. Returns: Builder instance for fluent...T view(gtksource.view.View propval)Set `view` property. Params: propval = The "view" property is the #GtkTextView for which this #GtkSourceCompletion is providing completion features. Returns: Builder instance for fluent chainingFluent builder for [gtksource.completion.Completion]