Class SnippetContext
- Namespace
- GtkSource
- Assembly
- GtkSource-5.dll
public class SnippetContext : Object, IDisposable, NativeObject, GTypeProvider, InstanceFactory
- Inheritance
-
SnippetContext
- Implements
- Inherited Members
Constructors
SnippetContext(params ConstructArgument[])
[Obsolete("Regular C# constructors on native classes will be removed in a future version. Please see the linked documentation for more details. It contains scenarios and possible solutions to prepare for the upcoming changes.", DiagnosticId = "GirCore1007", UrlFormat = "https://gircore.github.io/docs/integration/diagnostic/1007.html")]
public SnippetContext(params ConstructArgument[] constructArguments)
Parameters
constructArgumentsConstructArgument[]
SnippetContext(CreationData)
[Obsolete("This constructor is a workaround to keep legacy APIs alive. Do not use it.")]
protected SnippetContext(CreationData data)
Parameters
dataCreationData
SnippetContext(SnippetContextHandle)
protected SnippetContext(SnippetContextHandle handle)
Parameters
handleSnippetContextHandle
Fields
ChangedSignal
Signal Descriptor for OnChanged.
public static readonly Signal<SnippetContext> ChangedSignal
Field Value
Methods
ClearVariables()
public void ClearVariables()
Expand(string)
public string Expand(string input)
Parameters
inputstring
Returns
GetGType()
public static Type GetGType()
Returns
GetVariable(string)
public string? GetVariable(string key)
Parameters
keystring
Returns
New()
public static SnippetContext New()
Returns
NewFromPointer(nint, bool)
Creates a new managed SnippetContext instance for a given pointer.
public static SnippetContext NewFromPointer(nint ptr, bool ownsHandle)
Parameters
Returns
NewWithProperties(ConstructArgument[])
Creates a new SnippetContext and sets the properties specified by the construct arguments.
public static SnippetContext NewWithProperties(ConstructArgument[] constructArguments)
Parameters
constructArgumentsConstructArgument[]The properties to set.
Returns
SetConstant(string, string)
public void SetConstant(string key, string value)
Parameters
SetLinePrefix(string)
public void SetLinePrefix(string linePrefix)
Parameters
linePrefixstring
SetTabWidth(int)
public void SetTabWidth(int tabWidth)
Parameters
tabWidthint
SetUseSpaces(bool)
public void SetUseSpaces(bool useSpaces)
Parameters
useSpacesbool
SetVariable(string, string)
public void SetVariable(string key, string value)
Parameters
Events
OnChanged
public event SignalHandler<SnippetContext> OnChanged