IdeSnippetChunk: Builder SDK Reference

## IdeSnippetChunk IdeSnippetChunk — An chunk of text within the source snippet |

## Functions

IdeSnippetChunk * | ide_snippet_chunk_new ()
IdeSnippetChunk * | ide_snippet_chunk_copy ()
IdeSnippetContext * | ide_snippet_chunk_get_context ()
void | ide_snippet_chunk_set_context ()
const gchar * | ide_snippet_chunk_get_spec ()
void | ide_snippet_chunk_set_spec ()
gint | ide_snippet_chunk_get_tab_stop ()
void | ide_snippet_chunk_set_tab_stop ()
const gchar * | ide_snippet_chunk_get_text ()
void | ide_snippet_chunk_set_text ()
gboolean | ide_snippet_chunk_get_text_set ()
void | ide_snippet_chunk_set_text_set ()

## Properties

IdeSnippetContext * | context | Read / Write
gchar * | spec | Read / Write
gint | tab-stop | Read / Write
gchar * | text | Read / Write
gboolean | text-set | Read / Write

## Types and Values

#define | IDE_TYPE_SNIPPET_CHUNK
| IdeSnippetChunk

## Object Hierarchy

        GObject
        ╰── IdeSnippetChunk

## Description

The IdeSnippetChunk represents a single chunk of text that may or may not be an edit point within the snippet. Chunks that are an edit point (also called a tab stop) have the “tab-stop” property set.

## Functions

### ide_snippet_chunk_new ()

    IdeSnippetChunk *
    ide_snippet_chunk_new (void);

### ide_snippet_chunk_copy ()

    IdeSnippetChunk *
    ide_snippet_chunk_copy (IdeSnippetChunk *chunk);

Copies the source snippet.

#### Returns

An IdeSnippetChunk.

[transfer full]

### ide_snippet_chunk_get_context ()

    IdeSnippetContext *
    ide_snippet_chunk_get_context (IdeSnippetChunk *chunk);

Gets the context for the snippet insertion.

#### Returns

An IdeSnippetContext.

[transfer none]

### ide_snippet_chunk_set_context ()

    void
    ide_snippet_chunk_set_context (IdeSnippetChunk *chunk,
                                   IdeSnippetContext *context);

### ide_snippet_chunk_get_spec ()

    const gchar *
    ide_snippet_chunk_get_spec (IdeSnippetChunk *chunk);

### ide_snippet_chunk_set_spec ()

    void
    ide_snippet_chunk_set_spec (IdeSnippetChunk *chunk,
                                const gchar *spec);

### ide_snippet_chunk_get_tab_stop ()

    gint
    ide_snippet_chunk_get_tab_stop (IdeSnippetChunk *chunk);

### ide_snippet_chunk_set_tab_stop ()

    void
    ide_snippet_chunk_set_tab_stop (IdeSnippetChunk *chunk,
                                    gint tab_stop);

### ide_snippet_chunk_get_text ()

    const gchar *
    ide_snippet_chunk_get_text (IdeSnippetChunk *chunk);

### ide_snippet_chunk_set_text ()

    void
    ide_snippet_chunk_set_text (IdeSnippetChunk *chunk,
                                const gchar *text);

### ide_snippet_chunk_get_text_set ()

    gboolean
    ide_snippet_chunk_get_text_set (IdeSnippetChunk *chunk);

### ide_snippet_chunk_set_text_set ()

    void
    ide_snippet_chunk_set_text_set (IdeSnippetChunk *chunk,
                                    gboolean text_set);

## Types and Values

### IDE_TYPE_SNIPPET_CHUNK

    #define IDE_TYPE_SNIPPET_CHUNK (ide_snippet_chunk_get_type())

### IdeSnippetChunk

    typedef struct _IdeSnippetChunk IdeSnippetChunk;

## Property Details

### The `“context”` property

      “context”                  IdeSnippetContext *

The snippet context.

Flags: Read / Write

### The `“spec”` property

      “spec”                     gchar *

The specification to expand using the context.

Flags: Read / Write

Default value: NULL

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

      “tab-stop”                 gint

The tab stop for the chunk.

Flags: Read / Write

Allowed values: >= -1

Default value: -1

### The `“text”` property

      “text”                     gchar *

The text for the chunk.

Flags: Read / Write

Default value: NULL

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

      “text-set”                 gboolean

If the text property has been manually set.

Flags: Read / Write

Default value: FALSE