ide-source-snippet: gnome-builder Reference Manual

## ide-source-snippet ide-source-snippet |

## Functions

IdeSourceSnippet * | ide_source_snippet_new ()
IdeSourceSnippet * | ide_source_snippet_copy ()
const gchar * | ide_source_snippet_get_trigger ()
void | ide_source_snippet_set_trigger ()
const gchar * | ide_source_snippet_get_language ()
void | ide_source_snippet_set_language ()
const gchar * | ide_source_snippet_get_description ()
void | ide_source_snippet_set_description ()
void | ide_source_snippet_add_chunk ()
guint | ide_source_snippet_get_n_chunks ()
gint | ide_source_snippet_get_tab_stop ()
IdeSourceSnippetChunk * | ide_source_snippet_get_nth_chunk ()
void | ide_source_snippet_get_chunk_range ()
GtkTextMark * | ide_source_snippet_get_mark_begin ()
GtkTextMark * | ide_source_snippet_get_mark_end ()
IdeSourceSnippetContext * | ide_source_snippet_get_context ()
const gchar * | ide_source_snippet_get_snippet_text ()
void | ide_source_snippet_set_snippet_text ()

## Properties

GtkTextBuffer * | buffer | Read
gchar * | description | Read / Write
gchar * | language | Read / Write
GtkTextMark * | mark-begin | Read
GtkTextMark * | mark-end | Read
gchar * | snippet-text | Read / Write
gint | tab-stop | Read
gchar * | trigger | Read / Write

## Types and Values

#define | IDE_TYPE_SOURCE_SNIPPET
| IdeSourceSnippet

## Object Hierarchy

        GObject
        ╰── IdeSourceSnippet

## Description

## Functions

### ide_source_snippet_new ()

    IdeSourceSnippet *
    ide_source_snippet_new (const gchar *trigger,
                            const gchar *language);

### ide_source_snippet_copy ()

    IdeSourceSnippet *
    ide_source_snippet_copy (IdeSourceSnippet *snippet);

#### Returns

An IdeSourceSnippet.

[transfer full]

### ide_source_snippet_get_trigger ()

    const gchar *
    ide_source_snippet_get_trigger (IdeSourceSnippet *snippet);

### ide_source_snippet_set_trigger ()

    void
    ide_source_snippet_set_trigger (IdeSourceSnippet *snippet,
                                    const gchar *trigger);

### ide_source_snippet_get_language ()

    const gchar *
    ide_source_snippet_get_language (IdeSourceSnippet *snippet);

### ide_source_snippet_set_language ()

    void
    ide_source_snippet_set_language (IdeSourceSnippet *snippet,
                                     const gchar *language);

### ide_source_snippet_get_description ()

    const gchar *
    ide_source_snippet_get_description (IdeSourceSnippet *snippet);

### ide_source_snippet_set_description ()

    void
    ide_source_snippet_set_description (IdeSourceSnippet *snippet,
                                        const gchar *description);

### ide_source_snippet_add_chunk ()

    void
    ide_source_snippet_add_chunk (IdeSourceSnippet *snippet,
                                  IdeSourceSnippetChunk *chunk);

### ide_source_snippet_get_n_chunks ()

    guint
    ide_source_snippet_get_n_chunks (IdeSourceSnippet *snippet);

### ide_source_snippet_get_tab_stop ()

    gint
    ide_source_snippet_get_tab_stop (IdeSourceSnippet *snippet);

### ide_source_snippet_get_nth_chunk ()

    IdeSourceSnippetChunk *
    ide_source_snippet_get_nth_chunk (IdeSourceSnippet *snippet,
                                      guint n);

#### Returns

.

[transfer none]

### ide_source_snippet_get_chunk_range ()

    void
    ide_source_snippet_get_chunk_range (IdeSourceSnippet *snippet,
                                        IdeSourceSnippetChunk *chunk,
                                        GtkTextIter *begin,
                                        GtkTextIter *end);

### ide_source_snippet_get_mark_begin ()

    GtkTextMark *
    ide_source_snippet_get_mark_begin (IdeSourceSnippet *snippet);

#### Returns

.

[transfer none]

### ide_source_snippet_get_mark_end ()

    GtkTextMark *
    ide_source_snippet_get_mark_end (IdeSourceSnippet *snippet);

#### Returns

.

[transfer none]

### ide_source_snippet_get_context ()

    IdeSourceSnippetContext *
    ide_source_snippet_get_context (IdeSourceSnippet *snippet);

#### Returns

.

[transfer none]

### ide_source_snippet_get_snippet_text ()

    const gchar *
    ide_source_snippet_get_snippet_text (IdeSourceSnippet *snippet);

### ide_source_snippet_set_snippet_text ()

    void
    ide_source_snippet_set_snippet_text (IdeSourceSnippet *snippet,
                                         const gchar *snippet_text);

## Types and Values

### IDE_TYPE_SOURCE_SNIPPET

    #define IDE_TYPE_SOURCE_SNIPPET (ide_source_snippet_get_type())

### IdeSourceSnippet

    typedef struct _IdeSourceSnippet IdeSourceSnippet;

## Property Details

### The `“buffer”` property

      “buffer”                   GtkTextBuffer *

The GtkTextBuffer for the snippet.

Flags: Read

### The `“description”` property

      “description”              gchar *

The description for the snippet.

Flags: Read / Write

Default value: NULL

### The `“language”` property

      “language”                 gchar *

The language for the snippet.

Flags: Read / Write

Default value: NULL

### The `“mark-begin”` property

      “mark-begin”               GtkTextMark *

The beginning text mark.

Flags: Read

### The `“mark-end”` property

      “mark-end”                 GtkTextMark *

The ending text mark.

Flags: Read

### The `“snippet-text”` property

      “snippet-text”             gchar *

The entire snippet text from the source file.

Flags: Read / Write

Default value: NULL

### The `“tab-stop”` property

      “tab-stop”                 gint

The current tab stop.

Flags: Read

Allowed values: >= -1

Default value: -1

### The `“trigger”` property

      “trigger”                  gchar *

The trigger for the snippet.

Flags: Read / Write

Default value: NULL