Main Page Widgets Namespaces Book

# Gtk::ListStore Class Reference
[TreeView Classes]

Inheritance diagram for Gtk::ListStore:

[legend]
List of all members.

## Detailed Description

Thist is a list model for use with a Gtk::TreeView widget.

It implements the Gtk::TreeModel interface, and also implements the Gtk::TreeSortable interface so you can sort the list using the view. Finally, it also implements the tree drag and drop interfaces.

## Public Member Functions
virtual | ~ListStore ()
GtkListStore* | gobj ()
| Provides access to the underlying C GObject.
const GtkListStore* | gobj () const
| Provides access to the underlying C GObject.
GtkListStore* | gobj_copy ()
iterator | erase (const iterator& iter)
iterator | insert (const iterator& iter)
iterator | prepend ()
iterator | append ()
void | iter_swap (const iterator& a, const iterator& b)
| Swaps a and b in store .
void | move (const iterator& source, const iterator& destination)
| Moves source to the position at destination.
void | reorder (const Glib::ArrayHandle<int>& new_order)
| Reorders the list store to follow the order indicated by new_order.
void | clear ()
| Removes all rows from the list store.
bool | iter_is_valid (const iterator& iter) const
| WARNING: This function is slow.
## Static Public Member Functions
Glib::RefPtr<ListStore> | create (const TreeModelColumnRecord& columns)
## Protected Member Functions
| ListStore (const TreeModelColumnRecord& columns)
virtual void | set_value_impl (const iterator& row, int column, const Glib::ValueBase& value)
## Related Functions
(Note that these are not member functions.)
Glib::RefPtr<Gtk::ListStore> | wrap (GtkListStore* object, bool take_copy=false)

## Constructor & Destructor Documentation

virtual Gtk::ListStore::~ListStore | ( |  | ) | `[virtual]`

Gtk::ListStore::ListStore | ( | const TreeModelColumnRecord& | columns | ) | `[explicit, protected]`

## Member Function Documentation

iterator Gtk::ListStore::append | ( |  | ) |

void Gtk::ListStore::clear | ( |  | ) |

| Removes all rows from the list store.

Glib::RefPtr<ListStore> Gtk::ListStore::create | ( | const TreeModelColumnRecord& | columns | ) | `[static]`

iterator Gtk::ListStore::erase | ( | const iterator& | iter | ) |

const GtkListStore* Gtk::ListStore::gobj | ( |  | ) | const`[inline]`

| Provides access to the underlying C GObject. Reimplemented from Gtk::TreeDragDest.

GtkListStore* Gtk::ListStore::gobj | ( |  | ) | `[inline]`

| Provides access to the underlying C GObject. Reimplemented from Gtk::TreeDragDest.

GtkListStore* Gtk::ListStore::gobj_copy | ( |  | ) |

iterator Gtk::ListStore::insert | ( | const iterator& | iter | ) |

bool Gtk::ListStore::iter_is_valid | ( | const iterator& | iter | ) | const

  | WARNING: This function is slow. Only use it for debugging and/or testing purposes. Checks if the given iter is a valid iter for this Gtk::ListStore. Parameters:
  iter | A Gtk::TreeIter.
Returns: `true` if the iter is valid, `false` if the iter is invalid. Since: 2.2.

void Gtk::ListStore::iter_swap | ( | const iterator& | a,
|  | const iterator& | b
| ) |

  | Swaps a and b in store . Note that this function only works with unsorted stores. Since: 2.2 Parameters:
  a | A Gtk::TreeIter.
  b | Another Gtk::TreeIter.

void Gtk::ListStore::move | ( | const iterator& | source,
|  | const iterator& | destination
| ) |

  | Moves source to the position at destination. Note that this function only works with unsorted stores. Parameters:
  source | The row that should be moved.
  destination | The position to move to.

iterator Gtk::ListStore::prepend | ( |  | ) |

void Gtk::ListStore::reorder | ( | const Glib::ArrayHandle<int>& | new_order | ) |

| Reorders the list store to follow the order indicated by new_order. Note that this function only works with unsorted stores.

virtual void Gtk::ListStore::set_value_impl | ( | const iterator& | row,
|  | int | column,
|  | const Glib::ValueBase& | value
| ) | `[protected, virtual]`

| Reimplemented from Gtk::TreeModel.

## Friends And Related Function Documentation

Glib::RefPtr<Gtk::ListStore> wrap | ( | GtkListStore* | object,
|  | bool | take_copy = false
| ) | `[related]`

The documentation for this class was generated from the following file:

- liststore.h