Class

Gtk.StringList

Description [src]

final class Gtk.StringList : GObject.Object {
  /* No available fields */
}

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 element and specifying elements for each item. Each element supports the regular translation attributes “translatable”, “context” and “comments”.

Here is a UI definition fragment specifying a GtkStringList

<object class="GtkStringList">
  <items>
    <item translatable="yes">Factory</item>
    <item translatable="yes">Home</item>
    <item translatable="yes">Subway</item>
  </items>
</object>

Hierarchy

hierarchy this GtkStringList implements_0 GListModel this--implements_0 implements_1 GtkBuildable this--implements_1 ancestor_0 GObject ancestor_0--this

Ancestors

  • GObject

Implements

Constructors

gtk_string_list_new

Creates a new GtkStringList with the given strings.

Instance methods

gtk_string_list_append

Appends string to self.

gtk_string_list_get_string

Gets the string that is at position in self.

gtk_string_list_remove

Removes the string at position from self.

gtk_string_list_splice

Changes self by removing n_removals strings and adding additions to it.

gtk_string_list_take

Adds string to self at the end, and takes ownership of it.

Methods inherited from GtkBuildable (1)
gtk_buildable_get_buildable_id

Gets the ID of the buildable object.

Class structure

struct GtkStringListClass {
  GObjectClass parent_class;
  
}
Class members
parent_class
GObjectClass
  No description available.