## Documentation

Table of Contents
Class Inheritance Tree
Widget Screenshots
Package groups

## Index

Package: List_Store

- Goto spec source

# Description

    package Gtk.List_Store is

This package implements a specific model to store your data in. Each item in the list will correspond to one line in the tree view. Multiple columns can be displayed for each line.

Binding from C File version 2.8.17

# Packages

### Implements_Tree_Sortable (new Glib.Types.Implements)

    package Implements_Tree_Sortable is new Glib.Types.Implements
         (Gtk.Tree_Sortable.Gtk_Tree_Sortable,
          Gtk_List_Store_Record,
          Gtk_List_Store);

### Implements_Drag_Source (new Glib.Types.Implements)

    package Implements_Drag_Source is new Glib.Types.Implements
         (Gtk.Tree_Dnd.Gtk_Tree_Drag_Source,
          Gtk_List_Store_Record,
          Gtk_List_Store);

### Implements_Drag_Dest (new Glib.Types.Implements)

    package Implements_Drag_Dest is new Glib.Types.Implements
         (Gtk.Tree_Dnd.Gtk_Tree_Drag_Dest,
          Gtk_List_Store_Record,
          Gtk_List_Store);

# Classes

### Gtk_List_Store_Record

- Goto declaration in source

    type Gtk_List_Store_Record is
         new Gtk.Tree_Model.Gtk_Tree_Model_Record with null record;

#### Ancestors:

Gtk.Tree_Model.Gtk_Tree_Model_Record
Glib.Object.GObject_Record

#### Primitive operations:

Append

- To API doc
- To spec

Clear

- To API doc
- To spec

Glib.Object.Deallocate

- To API doc
- To spec

(Inherited)
Glib.Object.Get_Type

- To API doc
- To spec

(Inherited)
Glib.Object.Notify

- To API doc
- To spec

(Inherited)
Glib.Object.Ref

- To API doc
- To spec

(Inherited)
Glib.Object.Ref_Sink

- To API doc
- To spec

(Inherited)
Glib.Object.Unref

- To API doc
- To spec

(Inherited)
Gtk.Tree_Model.Children

- To API doc
- To spec

(Inherited)
Gtk.Tree_Model.Foreach

- To API doc
- To spec

(Inherited)
Gtk.Tree_Model.Get_Address

- To API doc
- To spec

(Inherited)
Gtk.Tree_Model.Get_Boolean

- To API doc
- To spec

(Inherited)
Gtk.Tree_Model.Get_C_Proxy

- To API doc
- To spec

(Inherited)
Gtk.Tree_Model.Get_Column_Type

- To API doc
- To spec

(Inherited)
Gtk.Tree_Model.Get_Flags

- To API doc
- To spec

(Inherited)
Gtk.Tree_Model.Get_Int

- To API doc
- To spec

(Inherited)
Gtk.Tree_Model.Get_Iter

- To API doc
- To spec

(Inherited)
Gtk.Tree_Model.Get_Iter_First

- To API doc
- To spec

(Inherited)
Gtk.Tree_Model.Get_Iter_From_String

- To API doc
- To spec

(Inherited)
Gtk.Tree_Model.Get_N_Columns

- To API doc
- To spec

(Inherited)
Gtk.Tree_Model.Get_Object

- To API doc
- To spec

(Inherited)
Gtk.Tree_Model.Get_Path

- To API doc
- To spec

(Inherited)
Gtk.Tree_Model.Get_String

- To API doc
- To spec

(Inherited)
Gtk.Tree_Model.Get_String_From_Iter

- To API doc
- To spec

(Inherited)
Gtk.Tree_Model.Get_Value

- To API doc
- To spec

(Inherited)
Gtk.Tree_Model.Gtk_New

- To API doc
- To spec

(Inherited)
Gtk.Tree_Model.Has_Child

- To API doc
- To spec

(Inherited)
Gtk.Tree_Model.N_Children

- To API doc
- To spec

(Inherited)
Gtk.Tree_Model.Next

- To API doc
- To spec

(Inherited)
Gtk.Tree_Model.Nth_Child

- To API doc
- To spec

(Inherited)
Gtk.Tree_Model.Parent

- To API doc
- To spec

(Inherited)
Gtk.Tree_Model.Ref_Node

- To API doc
- To spec

(Inherited)
Gtk.Tree_Model.Unref_Node

- To API doc
- To spec

(Inherited)
Insert

- To API doc
- To spec

Insert_After

- To API doc
- To spec

Insert_Before

- To API doc
- To spec

Insert_With_Valuesv

- To API doc
- To spec

Iter_Is_Valid

- To API doc
- To spec

Move_After

- To API doc
- To spec

Move_Before

- To API doc
- To spec

Prepend

- To API doc
- To spec

Remove

- To API doc
- To spec

Reorder

- To API doc
- To spec

Set

- To API doc
- To spec

Set

- To API doc
- To spec

Set

- To API doc
- To spec

Set

- To API doc
- To spec

Set_Column_Types

- To API doc
- To spec

Set_Value

- To API doc
- To spec

Swap

- To API doc
- To spec

# Types

### Gtk_List_Store

- Goto declaration in source

    type Gtk_List_Store is access all Gtk_List_Store_Record'Class;

# Subprograms & Entries

### Gtk_New

- Goto spec in source

    procedure Gtk_New (List_Store: out Gtk_List_Store;Types: GType_Array);

Creates a new list store using Types to fill the columns.

### Initialize

- Goto spec in source

    procedure Initialize (List_Store: access Gtk_List_Store_Record'Class;Types: GType_Array);

Internal initialization function. See the section "Creating your own widgets" in the documentation.

### Get_Type

- Goto spec in source
- Goto body in source

    function Get_Type return Gtk.Gtk_Type;

Return the internal value associated with this widget.

### Set_Column_Types

- Goto spec in source

    procedure Set_Column_Types (List_Store: access Gtk_List_Store_Record;Types: GType_Array);

### Set_Value

- Goto spec in source

    procedure Set_Value (List_Store: access Gtk_List_Store_Record;Iter: Gtk.Tree_Model.Gtk_Tree_Iter;Column: Gint;Value: Glib.Values.GValue);

Set the data in the cell specified by Iter and Column. The type of Value must be convertible to the type of the column.

### Set

- Goto spec in source

    procedure Set (Tree_Store: access Gtk_List_Store_Record;Iter: Gtk.Tree_Model.Gtk_Tree_Iter;Column: Gint;Value: UTF8_String);

Same as above, for an UTF8 string.

### Set

- Goto spec in source

    procedure Set (Tree_Store: access Gtk_List_Store_Record;Iter: Gtk.Tree_Model.Gtk_Tree_Iter;Column: Gint;Value: Gint);

Same as above, for a Gint.

### Set

- Goto spec in source

    procedure Set (Tree_Store: access Gtk_List_Store_Record;Iter: Gtk.Tree_Model.Gtk_Tree_Iter;Column: Gint;Value: Gdk.Pixbuf.Gdk_Pixbuf);

Same as above for a pixbuf

### Set

- Goto spec in source

    procedure Set (Tree_Store: access Gtk_List_Store_Record;Iter: Gtk.Tree_Model.Gtk_Tree_Iter;Column: Gint;Value: Boolean);

Same as above for a boolean

### Remove

- Goto spec in source

    procedure Remove (List_Store: access Gtk_List_Store_Record;Iter: in out Gtk.Tree_Model.Gtk_Tree_Iter);

Remove the given row from the list store. After being removed, Iter is set to be the next valid row, or invalidated if it pointed to the last row in List_Store.

### Insert

- Goto spec in source

    procedure Insert (List_Store: access Gtk_List_Store_Record;Iter: in out Gtk.Tree_Model.Gtk_Tree_Iter;Position: Gint);

Create a new row at Position. Iter will be changed to point to this new row. If Position is larger than the number of rows on the list, then the new row will be appended to the list. The row will be empty before this function is called. To fill in values, you need to call Set_Value.

### Insert_Before

- Goto spec in source

    procedure Insert_Before (List_Store: access Gtk_List_Store_Record;Iter: in out Gtk.Tree_Model.Gtk_Tree_Iter;Sibling: Gtk.Tree_Model.Gtk_Tree_Iter);

Insert a new row before Sibling. If Sibling is Null_Iter, then the row will be appended to the end of the list. Iter will be changed to point to this new row. The row will be empty before this function is called. To fill in values, you need to call Set_Value.

### Insert_After

- Goto spec in source

    procedure Insert_After (List_Store: access Gtk_List_Store_Record;Iter: in out Gtk.Tree_Model.Gtk_Tree_Iter;Sibling: Gtk.Tree_Model.Gtk_Tree_Iter);

Insert a new row after Sibling. If Sibling is Null_Iter, then the row will be prepended to the beginning of the list. Iter will be changed to point to this new row. The row will be empty after this function is called. To fill in values, you need to call Set_Value.

### Insert_With_Valuesv

- Goto spec in source

    procedure Insert_With_Valuesv (List_Store: access Gtk_List_Store_Record;Iter: in out Gtk.Tree_Model.Gtk_Tree_Iter;Position: Glib.Gint;Columns: Glib.Gint_Array;Values: Glib.Values.GValue_Array);

Creates a new row at Position. Iter will be changed to point to this new row. If Position is larger than the number of rows on the list, then the new row will be appended to the list. The row will be filled with the values given to this function. Using this function is more efficient that calling Insert and then Set for each column, since that will not emit the rows_reordered signal when the model is sorted.

### Prepend

- Goto spec in source

    procedure Prepend (List_Store: access Gtk_List_Store_Record;Iter: in out Gtk.Tree_Model.Gtk_Tree_Iter);

Prepend a new row to List_Store. Iter will be changed to point to this new row. The row will be empty after this function is called. To fill in values, you need to call Set_Value.

### Append

- Goto spec in source

    procedure Append (List_Store: access Gtk_List_Store_Record;Iter: in out Gtk.Tree_Model.Gtk_Tree_Iter);

Append a new row to List_Store. Iter will be changed to point to this new row. The row will be empty after this function is called. To fill in values, you need to call Set_Value.

### Clear

- Goto spec in source

    procedure Clear (List_Store: access Gtk_List_Store_Record);

Remove all the rows in List_Store.

### Iter_Is_Valid

- Goto spec in source

    function Iter_Is_Valid (List_Store: access Gtk_List_Store_Record;Iter: Gtk.Tree_Model.Gtk_Tree_Iter) return Boolean;

WARNING: This function is slow. Only use it for debugging and/or testing purposes. Checks if the given iter is a valid iter for List_Store.

### Move_After

- Goto spec in source

    procedure Move_After (Store: access Gtk_List_Store_Record;Iter: Gtk.Tree_Model.Gtk_Tree_Iter;Position: Gtk.Tree_Model.Gtk_Tree_Iter);

Moves the row pointed to by Iter to the position after Position. Note that this function only works with unsorted stores. If Position is Null_Iter, Iter will be moved to the start of the list.

### Move_Before

- Goto spec in source

    procedure Move_Before (Store: access Gtk_List_Store_Record;Iter: Gtk.Tree_Model.Gtk_Tree_Iter;Position: Gtk.Tree_Model.Gtk_Tree_Iter);

Moves the row pointed to by Iter to the position before Position. Note that this function only works with unsorted stores. If Position is Null_Iter, Iter will be moved to the end of the list.

### Reorder

- Goto spec in source

    procedure Reorder (Store: access Gtk_List_Store_Record;New_Order: Glib.Gint_Array);

Reorders Store to follow the order indicated by New_order. Note that this function only works with unsorted stores. New_Order is an array of integers mapping the new position of each child to its old position before the re-ordering, i.e. New_Order[newpos] = oldpos

### Swap

- Goto spec in source

    procedure Swap (Store: access Gtk_List_Store_Record;A: Gtk.Tree_Model.Gtk_Tree_Iter;B: Gtk.Tree_Model.Gtk_Tree_Iter);

Swaps the rwos pointed to by A and B. Note that this function only works with unsorted stores.

### +

- Goto spec in source

    function "+" (Model: access Gtk_List_Store_Record'Class) return Gtk.Tree_Sortable.Gtk_Tree_Sortable renames Implements_Tree_Sortable.To_Interface;

### -

- Goto spec in source

    function "-" (Sortable: Gtk.Tree_Sortable.Gtk_Tree_Sortable) return Gtk_List_Store renames Implements_Tree_Sortable.To_Object;

Converts to and from the Gtk_Tree_Sortable interface

### +

- Goto spec in source

    function "+" (Model: access Gtk_List_Store_Record'Class) return Gtk.Tree_Dnd.Gtk_Tree_Drag_Source renames Implements_Drag_Source.To_Interface;

### -

- Goto spec in source

    function "-" (Drag_Source: Gtk.Tree_Dnd.Gtk_Tree_Drag_Source) return Gtk_List_Store renames Implements_Drag_Source.To_Object;

Converts to and from the Gtk_Tree_Drag_Source interface

### +

- Goto spec in source

    function "+" (Model: access Gtk_List_Store_Record'Class) return Gtk.Tree_Dnd.Gtk_Tree_Drag_Dest renames Implements_Drag_Dest.To_Interface;

### -

- Goto spec in source

    function "-" (Drag_Dest: Gtk.Tree_Dnd.Gtk_Tree_Drag_Dest) return Gtk_List_Store renames Implements_Drag_Dest.To_Object;

Converts to and from the Gtk_Tree_Drag_Source interface