Class Snippet
- Namespace
- GtkSource
- Assembly
- GtkSource-5.dll
public class Snippet : Object, IDisposable, GTypeProvider, InstanceFactory
- Inheritance
-
Snippet
- Implements
-
- Inherited Members
-
Constructors
Snippet(params ConstructArgument[])
public Snippet(params ConstructArgument[] constructArguments)
Parameters
constructArguments ConstructArgument[]
Snippet(SnippetHandle)
public Snippet(SnippetHandle handle)
Parameters
handle SnippetHandle
Fields
BufferPropertyDefinition
public static readonly Property<TextBuffer?, Snippet> BufferPropertyDefinition
Field Value
- Property<TextBuffer, Snippet>
DescriptionPropertyDefinition
public static readonly Property<string?, Snippet> DescriptionPropertyDefinition
Field Value
- Property<string, Snippet>
FocusPositionPropertyDefinition
public static readonly Property<int, Snippet> FocusPositionPropertyDefinition
Field Value
- Property<int, Snippet>
LanguageIdPropertyDefinition
public static readonly Property<string?, Snippet> LanguageIdPropertyDefinition
Field Value
- Property<string, Snippet>
NamePropertyDefinition
public static readonly Property<string?, Snippet> NamePropertyDefinition
Field Value
- Property<string, Snippet>
TriggerPropertyDefinition
public static readonly Property<string?, Snippet> TriggerPropertyDefinition
Field Value
- Property<string, Snippet>
Properties
Buffer
public TextBuffer? Buffer { get; }
Property Value
- TextBuffer
Description
public string? Description { get; set; }
Property Value
- string
FocusPosition
public int FocusPosition { get; }
Property Value
- int
LanguageId
public string? LanguageId { get; set; }
Property Value
- string
Name
public string? Name { get; set; }
Property Value
- string
Trigger
public string? Trigger { get; set; }
Property Value
- string
Methods
AddChunk(SnippetChunk)
public void AddChunk(SnippetChunk chunk)
Parameters
chunk SnippetChunk
Copy()
Returns
- Snippet
GetContext()
public SnippetContext? GetContext()
Returns
- SnippetContext
GetDescription()
public string GetDescription()
Returns
- string
GetFocusPosition()
public int GetFocusPosition()
Returns
- int
GetGType()
public static Type GetGType()
Returns
- Type
GetLanguageId()
public string GetLanguageId()
Returns
- string
GetNChunks()
Returns
- uint
GetName()
Returns
- string
GetNthChunk(uint)
public SnippetChunk GetNthChunk(uint nth)
Parameters
nth uint
Returns
- SnippetChunk
GetTrigger()
public string? GetTrigger()
Returns
- string
New(string?, string?)
public static Snippet New(string? trigger, string? languageId)
Parameters
trigger string
languageId string
Returns
- Snippet
NewParsed(string)
[Version("5.6")]
public static Snippet NewParsed(string text)
Parameters
text string
Returns
- Snippet
SetDescription(string)
public void SetDescription(string description)
Parameters
description string
SetLanguageId(string)
public void SetLanguageId(string languageId)
Parameters
languageId string
SetName(string)
public void SetName(string name)
Parameters
name string
SetTrigger(string)
public void SetTrigger(string trigger)
Parameters
trigger string