StringList
Object Hierarchy:
Gtk.StringList
Gtk.StringList
Gtk.StringList
GLib.Object
GLib.Object
GLib.Object->Gtk.StringList
GLib.ListModel
GLib.ListModel
GLib.ListModel->Gtk.StringList
Gtk.Buildable
Gtk.Buildable
Gtk.Buildable->Gtk.StringList
Description:
[
CCode ( type_id =
"gtk_string_list_get_type ()" ) ]
public class StringList :
Object ,
ListModel ,
Buildable
`GtkStringList` is a list model that wraps an array of strings.
The objects in the model have a "string" property.
`GtkStringList` is well-suited for any place where you would typically use a `char*[]`, but need a list model.
GtkStringList as GtkBuildable
The `GtkStringList` implementation of the `GtkBuildable` interface supports adding items directly using the <items> element and
specifying <item> elements for each item. Each <item> element supports the regular translation attributes “translatable”,
“context” and “comments”.
Here is a UI definition fragment specifying a `GtkStringList`
```xml <object class="GtkStringList"> <items> <item translatable="yes">Factory</item> <item
translatable="yes">Home</item> <item translatable="yes">Subway</item> </items> </object> ```
Content:
Creation methods:
Methods:
public void append (string str)
Appends string
to this .
public unowned string ? get_string (uint position)
Gets the string that is at position
in
this .
public void remove (uint position)
Removes the string at position
from
this .
public void splice (uint position, uint n_removals, string []? additions)
Changes this by removing
n_removals
strings and adding additions
to it.
public void take (owned string str)
Adds string
to self at the end, and takes ownership of
it.
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
All known members inherited from interface GLib.ListModel
All known members inherited from interface Gtk.Buildable