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 gtksource.completion_provider.CompletionProvider. There can be for example a provider to complete words (see gtksource.completion_words.CompletionWords), another provider for the completion of function names, etc. To add a provider, call gtksource.completion.Completion.addProvider.
The gtksource.completion_proposal.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 gtksource.view.View object is associated with a gtksource.completion.Completion instance. This instance can be obtained with gtksource.view.View.getCompletion. The gtksource.view.View class contains also the gtksource.view.View.showCompletion signal.
A same gtksource.completion_provider.CompletionProvider object can be used for several gtksource.completion.Completion's.
CompletionGidBuilder builder() static nothrowGet builder for [gtksource.completion.Completion] Returns: New builder objectgtk.text_view.TextView buffer() @property nothrowGet `buffer` property. Returns: The #GtkTextBuffer for the #GtkSourceCompletion:view. This is a convenience property for providers.uint pageSize() @property nothrowGet `pageSize` property. Returns: The number of rows to display to the user before scrolling.void pageSize(uint propval) @property nothrowSet `pageSize` property. Params: propval = The number of rows to display to the user before scrolling.bool rememberInfoVisibility() @property nothrowGet `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) @property nothrowSet `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() @property nothrowGet `selectOnShow` property. Returns: Determines whether the first proposal should be selected when the completion is first shown.void selectOnShow(bool propval) @property nothrowSet `selectOnShow` property. Params: propval = Determines whether the first proposal should be selected when the completion is first shown.bool showIcons() @property nothrowGet `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) @property nothrowSet `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() @property nothrowGet `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) static nothrowThis will add `<b>` tags around matched characters in haystack based on casefold_query.bool fuzzyMatch(string haystack, string casefoldNeedle, out uint priority) static nothrowThis helper function can do a fuzzy match for you giving a haystack and casefolded needle.void addProvider(gtksource.completion_provider.CompletionProvider provider) nothrowAdds a [gtksource.completion_provider.CompletionProvider] to the list of providers to be queried for completion results.void blockInteractive() nothrowgtksource.buffer.Buffer getBuffer() nothrowGets the connected [gtksource.view.View]'s [gtksource.buffer.Buffer] Returns: A #GtkSourceBufferuint getPageSize() nothrowgtksource.view.View getView() nothrowGets the [gtksource.view.View] that owns the [gtksource.completion.Completion]. Returns: A #GtkSourceViewvoid removeProvider(gtksource.completion_provider.CompletionProvider provider) nothrowRemoves a [gtksource.completion_provider.CompletionProvider] previously added with [gtksource.completion.Completion.addProvider].void setPageSize(uint pageSize) nothrowvoid unblockInteractive() nothrowgulong 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) nothrowConnect 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) nothrowConnect 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) nothrowConnect 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) nothrowConnect to `Show` signal.Fluent builder implementation template for gtksource.completion.Completion
T pageSize(uint propval) nothrowSet `pageSize` property. Params: propval = The number of rows to display to the user before scrolling. Returns: Builder instance for fluent chainingT rememberInfoVisibility(bool propval) nothrowSet `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) nothrowSet `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) nothrowSet `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) nothrowSet `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