Table of Contents

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

constructArguments ConstructArgument[]

SnippetContext(CreationData)

[Obsolete("This constructor is a workaround to keep legacy APIs alive. Do not use it.")]
protected SnippetContext(CreationData data)

Parameters

data CreationData

SnippetContext(SnippetContextHandle)

protected SnippetContext(SnippetContextHandle handle)

Parameters

handle SnippetContextHandle

Fields

ChangedSignal

Signal Descriptor for OnChanged.

public static readonly Signal<SnippetContext> ChangedSignal

Field Value

Signal<SnippetContext>

Methods

ClearVariables()

public void ClearVariables()

Expand(string)

public string Expand(string input)

Parameters

input string

Returns

string

GetGType()

public static Type GetGType()

Returns

Type

GetVariable(string)

public string? GetVariable(string key)

Parameters

key string

Returns

string

New()

public static SnippetContext New()

Returns

SnippetContext

NewFromPointer(nint, bool)

Creates a new managed SnippetContext instance for a given pointer.

public static SnippetContext NewFromPointer(nint ptr, bool ownsHandle)

Parameters

ptr nint
ownsHandle bool

Returns

SnippetContext

NewWithProperties(ConstructArgument[])

Creates a new SnippetContext and sets the properties specified by the construct arguments.

public static SnippetContext NewWithProperties(ConstructArgument[] constructArguments)

Parameters

constructArguments ConstructArgument[]

The properties to set.

Returns

SnippetContext

SetConstant(string, string)

public void SetConstant(string key, string value)

Parameters

key string
value string

SetLinePrefix(string)

public void SetLinePrefix(string linePrefix)

Parameters

linePrefix string

SetTabWidth(int)

public void SetTabWidth(int tabWidth)

Parameters

tabWidth int

SetUseSpaces(bool)

public void SetUseSpaces(bool useSpaces)

Parameters

useSpaces bool

SetVariable(string, string)

public void SetVariable(string key, string value)

Parameters

key string
value string

Events

OnChanged

public event SignalHandler<SnippetContext> OnChanged

Event Type

SignalHandler<SnippetContext>