Snippet
Object Hierarchy:
GtkSource.Snippet
GtkSource.Snippet
GtkSource.Snippet
GLib.Object
GLib.Object
GLib.Object->GtkSource.Snippet
Description:
[ CCode ( type_id = "gtk_source_snippet_get_type ()" ) ]public class Snippet : Object
Quick insertion code snippets.
The `GtkSourceSnippet` represents a series of chunks that can quickly be inserted into the [class@View].
Snippets are defined in XML files which are loaded by the [class@SnippetManager]. Alternatively, applications can create snippets on
demand and insert them into the [class@View] using [[email protected] _snippet].
Snippet chunks can reference other snippet chunks as well as post-process the values from other chunks such as capitalization.
Content:
Properties:
Creation methods:
Methods:
public void add_chunk (SnippetChunk chunk)
Appends chunk
to the this
.
public Snippet copy ()
Does a deep copy of the snippet.
public unowned SnippetContext ? get_context ()
Gets the context used for expanding the snippet.
public unowned string get_description ()
Gets the description for the snippet.
public int get_focus_position ()
Gets the current focus for the snippet.
public unowned string get_language_id ()
Gets the language-id used for the source snippet.
public uint get_n_chunks ()
Gets the number of chunks in the snippet.
public unowned string get_name ()
Gets the name for the snippet.
public unowned SnippetChunk get_nth_chunk (uint nth)
Gets the chunk at nth
.
public unowned string ? get_trigger ()
Gets the trigger for the source snippet.
public void set_description (string description)
Sets the description for the snippet.
public void set_language_id (string language_id)
Sets the language identifier for the snippet.
public void set_name (string name)
Sets the name for the snippet.
public void set_trigger (string trigger)
Sets the trigger for the snippet.
Inherited Members:
All known members inherited from class GLib.Object
@get
@new
@ref
@set
add_toggle_ref
add_weak_pointer
bind_property
connect
constructed
disconnect
dispose
dup_data
dup_qdata
force_floating
freeze_notify
get_class
get_data
get_property
get_qdata
get_type
getv
interface_find_property
interface_install_property
interface_list_properties
is_floating
new_valist
new_with_properties
newv
notify
notify_property
ref_count
ref_sink
remove_toggle_ref
remove_weak_pointer
replace_data
replace_qdata
set_data
set_data_full
set_property
set_qdata
set_qdata_full
set_valist
setv
steal_data
steal_qdata
thaw_notify
unref
watch_closure
weak_ref
weak_unref