Top | ![]() |
![]() |
![]() |
![]() |
IdeSnippet * | ide_snippet_new () |
IdeSnippet * | ide_snippet_copy () |
const gchar * | ide_snippet_get_trigger () |
void | ide_snippet_set_trigger () |
const gchar * | ide_snippet_get_language () |
void | ide_snippet_set_language () |
const gchar * | ide_snippet_get_description () |
void | ide_snippet_set_description () |
void | ide_snippet_add_chunk () |
guint | ide_snippet_get_n_chunks () |
gint | ide_snippet_get_tab_stop () |
IdeSnippetChunk * | ide_snippet_get_nth_chunk () |
void | ide_snippet_get_chunk_range () |
IdeSnippetContext * | ide_snippet_get_context () |
gchar * | ide_snippet_get_full_text () |
void | ide_snippet_replace_current_chunk_text () |
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 |
IdeSnippet * ide_snippet_new (const gchar *trigger
,const gchar *language
);
Creates a new IdeSnippet
Since: 3.32
IdeSnippet *
ide_snippet_copy (IdeSnippet *self
);
Does a deep copy of the snippet.
Since: 3.32
const gchar *
ide_snippet_get_trigger (IdeSnippet *self
);
Gets the trigger for the source snippet
Since: 3.32
void ide_snippet_set_trigger (IdeSnippet *self
,const gchar *trigger
);
Sets the trigger for the snippet.
Since: 3.32
const gchar *
ide_snippet_get_language (IdeSnippet *self
);
Gets the language used for the source snippet.
The language identifier matches the “id” property.
Since: 3.32
void ide_snippet_set_language (IdeSnippet *self
,const gchar *language
);
Sets the language identifier for the snippet.
This should match the “id” identifier.
Since: 3.32
const gchar *
ide_snippet_get_description (IdeSnippet *self
);
Gets the description for the snippet.
Since: 3.32
void ide_snippet_set_description (IdeSnippet *self
,const gchar *description
);
Sets the description for the snippet.
Since: 3.32
guint
ide_snippet_get_n_chunks (IdeSnippet *self
);
Gets the number of chunks in the snippet. Not all chunks are editable.
Since: 3.32
gint
ide_snippet_get_tab_stop (IdeSnippet *self
);
Gets the current tab stop for the snippet. This is changed as the user Tab's through the edit points.
Since: 3.32
IdeSnippetChunk * ide_snippet_get_nth_chunk (IdeSnippet *self
,guint n
);
Gets the chunk at n
.
Since: 3.32
void ide_snippet_get_chunk_range (IdeSnippet *self
,IdeSnippetChunk *chunk
,GtkTextIter *begin
,GtkTextIter *end
);
IdeSnippetContext *
ide_snippet_get_context (IdeSnippet *self
);
Get's the context used for expanding the snippet.
Since: 3.32
gchar *
ide_snippet_get_full_text (IdeSnippet *self
);
Gets the contents of the snippet as currently edited by the user.
a newly allocated string containing the full contents of all the snippet chunks.
[transfer full]
Since: 3.32
void ide_snippet_replace_current_chunk_text (IdeSnippet *self
,const gchar *new_text
);
This replaces the current chunk (if any) to contain the contents of
new_text
.
This function is primarily useful to the IdeSourceView as it updates content as the user types.
Since: 3.32
“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