gtksource.snippet_context

Module for [SnippetContext] class

Types 3

Context for expanding gtksource.snippet_chunk.SnippetChunk.

This class is currently used primary as a hashtable. However, the longer term goal is to have it hold onto a GjsContext as well as other languages so that gtksource.snippet_chunk.SnippetChunk can expand themselves by executing script within the context.

The gtksource.snippet.Snippet will build the context and then expand each of the chunks during the insertion/edit phase.

Methods
GType _getGType() static nothrow
GType _gType() @property nothrow
SnippetContext self() nothrowReturns `this`, for use in `with` statements.
SnippetContextGidBuilder builder() static nothrowGet builder for [gtksource.snippet_context.SnippetContext] Returns: New builder object
void clearVariables() nothrowRemoves all variables from the context.
string expand(string input) nothrow
string getVariable(string key) nothrowGets the current value for a variable named key.
void setConstant(string key, string value) nothrowSets a constatnt within the context.
void setLinePrefix(string linePrefix) nothrow
void setTabWidth(int tabWidth) nothrow
void setUseSpaces(bool useSpaces) nothrow
void setVariable(string key, string value) nothrowSets a variable within the context.
gulong connectChanged(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.snippet_context.SnippetContext))) && Parameters!T.length < 2) nothrowConnect to `Changed` signal.
Constructors
this(void * ptr, Flag!"Take" take)
this()Creates a new #GtkSourceSnippetContext.
Methods
SnippetContext build() nothrowCreate object from builder. Returns: New object