Top | ![]() |
![]() |
![]() |
![]() |
GtkTextBuffer * | buffer | Read |
gchar * | description | Read / Write |
gchar * | language | Read / Write |
GtkTextMark * | mark-begin | Read |
GtkTextMark * | mark-end | Read |
gint | tab-stop | Read |
gchar * | trigger | Read / Write |
The IdeSourceSnippet represents a single snippet that may be inserted into the IdeSourceView.
IdeSourceSnippet * ide_source_snippet_new (const gchar *trigger
,const gchar *language
);
Creates a new IdeSourceSnippet
IdeSourceSnippet *
ide_source_snippet_copy (IdeSourceSnippet *self
);
Does a deep copy of the snippet.
const gchar *
ide_source_snippet_get_trigger (IdeSourceSnippet *self
);
Gets the trigger for the source snippet
void ide_source_snippet_set_trigger (IdeSourceSnippet *self
,const gchar *trigger
);
Sets the trigger for the snippet.
const gchar *
ide_source_snippet_get_language (IdeSourceSnippet *self
);
Gets the language used for the source snippet.
The language identifier matches the “id” property.
void ide_source_snippet_set_language (IdeSourceSnippet *self
,const gchar *language
);
Sets the language identifier for the snippet.
This should match the “id” identifier.
const gchar *
ide_source_snippet_get_description (IdeSourceSnippet *self
);
Gets the description for the snippet.
void ide_source_snippet_set_description (IdeSourceSnippet *self
,const gchar *description
);
Sets the description for the snippet.
void ide_source_snippet_add_chunk (IdeSourceSnippet *self
,IdeSourceSnippetChunk *chunk
);
guint
ide_source_snippet_get_n_chunks (IdeSourceSnippet *self
);
Gets the number of chunks in the snippet. Not all chunks are editable.
gint
ide_source_snippet_get_tab_stop (IdeSourceSnippet *self
);
Gets the current tab stop for the snippet. This is changed as the user Tab's through the edit points.
IdeSourceSnippetChunk * ide_source_snippet_get_nth_chunk (IdeSourceSnippet *self
,guint n
);
Gets the chunk at n
.
void ide_source_snippet_get_chunk_range (IdeSourceSnippet *self
,IdeSourceSnippetChunk *chunk
,GtkTextIter *begin
,GtkTextIter *end
);
IdeSourceSnippetContext *
ide_source_snippet_get_context (IdeSourceSnippet *self
);
Get's the context used for expanding the snippet.
“description”
property“description” gchar *
The description for the snippet.
Flags: Read / Write
Default value: NULL
“language”
property“language” gchar *
The language for the snippet.
Flags: Read / Write
Default value: NULL
“tab-stop”
property“tab-stop” gint
The current tab stop.
Flags: Read
Allowed values: >= -1
Default value: -1
“trigger”
property“trigger” gchar *
The trigger for the snippet.
Flags: Read / Write
Default value: NULL