gtk.ListStore.ListStore Class Reference

Inheritance diagram for gtk.ListStore.ListStore:

gtk.TreeModel.TreeModel List of all members.

Public Member Functions

GtkListStoregetListStoreStruct ()
 this (GtkListStore *gtkListStore)
 Sets our main struct and passes it to the parent class.
 this (GType[] types)
 Non-vararg creation function.
TreeIter createIter ()
 Creates a top level iteractor.
void set (TreeIter iter, int[] columns, char *[] values)
 sets the values for one row
void set (TreeIter iter, int[] columns, char[][] values)
void setValue (TreeIter iter, int column, char[] value)
void setValue (TreeIter iter, int column, int value)
 this (int nColumns,...)
 Creates a new list store as with n_columns columns each of the types passed in.
 this (int nColumns, GType *types)
 Non-vararg creation function.
void setColumnTypes (int nColumns, GType *types)
 This function is meant primarily for GObjects that inherit from GtkListStore, and should only be used when constructing a new GtkListStore.
void setValist (TreeIter iter, void *varArgs)
 See gtk_list_store_set(); this version takes a va_list for use by language bindings.
void setValue (TreeIter iter, int column, Value value)
 Sets the data in the cell specified by iter and column.
int remove (TreeIter iter)
 Removes the given row from the list store.
void insert (TreeIter iter, int position)
 Creates a new row at position.
void insertBefore (TreeIter iter, TreeIter sibling)
 Inserts a new row before sibling.
void insertAfter (TreeIter iter, TreeIter sibling)
 Inserts a new row after sibling.
void insertWithValues (TreeIter iter, int position,...)
 Creates a new row at position.
void insertWithValuesv (TreeIter iter, int position, int *columns, Value values, int nValues)
 A variant of gtk_list_store_insert_with_values() which takes the columns and values as two arrays, instead of varargs.
void prepend (TreeIter iter)
 Prepends a new row to list_store.
void append (TreeIter iter)
 Appends a new row to list_store.
void clear ()
 Removes all rows from the list store.
int iterIsValid (TreeIter iter)
 Warning This function is slow.
void reorder (int *newOrder)
 Reorders store to follow the order indicated by new_order.
void swap (TreeIter a, TreeIter b)
 Swaps a and b in store.
void moveBefore (TreeIter iter, TreeIter position)
 Moves iter in store to the position before position.
void moveAfter (TreeIter iter, TreeIter position)
 Moves iter in store to the position after position.

Protected Member Functions

void * getStruct ()
 the main Gtk struct as a void*

Protected Attributes

GtkListStoregtkListStore
 the main Gtk struct

Constructor & Destructor Documentation

gtk.ListStore.ListStore.this ( GtkListStore gtkListStore  ) 

Sets our main struct and passes it to the parent class.

gtk.ListStore.ListStore.this ( GType[]  types  ) 

Non-vararg creation function.

Used primarily by language bindings. n_columns: number of columns in the list store types: an array of GType types for the columns, from first to last Returns: a new GtkListStore

gtk.ListStore.ListStore.this ( int  nColumns,
  ... 
)

Creates a new list store as with n_columns columns each of the types passed in.

Note that only types derived from standard GObject fundamental types are supported. As an example, gtk_tree_store_new (3, G_TYPE_INT, G_TYPE_STRING, GDK_TYPE_PIXBUF); will create a new GtkListStore with three columns, of type int, string and GdkPixbuf respectively. n_columns: number of columns in the list store ...: all GType types for the columns, from first to last Returns: a new GtkListStore

gtk.ListStore.ListStore.this ( int  nColumns,
GType types 
)

Non-vararg creation function.

Used primarily by language bindings. n_columns: number of columns in the list store types: an array of GType types for the columns, from first to last Returns: a new GtkListStore


Member Function Documentation

void gtk.ListStore.ListStore.append ( TreeIter  iter  ) 

Appends 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 gtk_list_store_set() or gtk_list_store_set_value(). list_store: A GtkListStore iter: An unset GtkTreeIter to set to the appended row

void gtk.ListStore.ListStore.clear (  ) 

Removes all rows from the list store.

list_store: a GtkListStore.

TreeIter gtk.ListStore.ListStore.createIter (  ) 

Creates a top level iteractor.

I don't think lists have but the top level iteractor

GtkListStore* gtk.ListStore.ListStore.getListStoreStruct (  ) 

void* gtk.ListStore.ListStore.getStruct (  )  [protected]

the main Gtk struct as a void*

Reimplemented from gtk.TreeModel.TreeModel.

void gtk.ListStore.ListStore.insert ( TreeIter  iter,
int  position 
)

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 empty after this function is called. To fill in values, you need to call gtk_list_store_set() or gtk_list_store_set_value(). list_store: A GtkListStore iter: An unset GtkTreeIter to set to the new row position: position to insert the new row

void gtk.ListStore.ListStore.insertAfter ( TreeIter  iter,
TreeIter  sibling 
)

Inserts a new row after sibling.

If sibling is NULL, 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 gtk_list_store_set() or gtk_list_store_set_value(). list_store: A GtkListStore iter: An unset GtkTreeIter to set to the new row sibling: A valid GtkTreeIter, or NULL

void gtk.ListStore.ListStore.insertBefore ( TreeIter  iter,
TreeIter  sibling 
)

Inserts a new row before sibling.

If sibling is NULL, 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 after this function is called. To fill in values, you need to call gtk_list_store_set() or gtk_list_store_set_value(). list_store: A GtkListStore iter: An unset GtkTreeIter to set to the new row sibling: A valid GtkTreeIter, or NULL

void gtk.ListStore.ListStore.insertWithValues ( TreeIter  iter,
int  position,
  ... 
)

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. Calling gtk_list_store_insert_with_values(list_store, iter, position...) has the same effect as calling gtk_list_store_insert (list_store, iter, position); gtk_list_store_set (list_store, iter, ...); with the difference that the former will only emit a row_inserted signal, while the latter will emit row_inserted, row_changed and, if the list store is sorted, rows_reordered. Since emitting the rows_reordered signal repeatedly can affect the performance of the program, gtk_list_store_insert_with_values() should generally be preferred when inserting rows in a sorted list store. list_store: A GtkListStore iter: An unset GtkTreeIter to set to the new row, or NULL. position: position to insert the new row ...: pairs of column number and value, terminated with -1 Since 2.6

void gtk.ListStore.ListStore.insertWithValuesv ( TreeIter  iter,
int  position,
int columns,
Value  values,
int  nValues 
)

A variant of gtk_list_store_insert_with_values() which takes the columns and values as two arrays, instead of varargs.

This function is mainly intended for language-bindings. list_store: A GtkListStore iter: An unset GtkTreeIter to set to the new row, or NULL. position: position to insert the new row columns: an array of column numbers values: an array of GValues n_values: the length of the columns and values arrays Since 2.6

int gtk.ListStore.ListStore.iterIsValid ( TreeIter  iter  ) 

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 GtkListStore. list_store: A GtkListStore. iter: A GtkTreeIter. Returns: TRUE if the iter is valid, FALSE if the iter is invalid. Since 2.2

void gtk.ListStore.ListStore.moveAfter ( TreeIter  iter,
TreeIter  position 
)

Moves iter in store to the position after position.

Note that this function only works with unsorted stores. If position is NULL, iter will be moved to the start of the list. store: A GtkListStore. iter: A GtkTreeIter. position: A GtkTreeIter or NULL. Since 2.2 See Also GtkTreeModel, GtkTreeStore

void gtk.ListStore.ListStore.moveBefore ( TreeIter  iter,
TreeIter  position 
)

Moves iter in store to the position before position.

Note that this function only works with unsorted stores. If position is NULL, iter will be moved to the end of the list. store: A GtkListStore. iter: A GtkTreeIter. position: A GtkTreeIter, or NULL. Since 2.2

void gtk.ListStore.ListStore.prepend ( TreeIter  iter  ) 

Prepends 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 gtk_list_store_set() or gtk_list_store_set_value(). list_store: A GtkListStore iter: An unset GtkTreeIter to set to the prepend row

int gtk.ListStore.ListStore.remove ( TreeIter  iter  ) 

Removes 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. list_store: A GtkListStore iter: A valid GtkTreeIter Returns: TRUE if iter is valid, FALSE if not.

void gtk.ListStore.ListStore.reorder ( int newOrder  ) 

Reorders store to follow the order indicated by new_order.

Note that this function only works with unsorted stores. store: A GtkListStore. new_order: 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. Since 2.2

void gtk.ListStore.ListStore.set ( TreeIter  iter,
int[]  columns,
char  values[][] 
)

void gtk.ListStore.ListStore.set ( TreeIter  iter,
int[]  columns,
char *[]  values 
)

sets the values for one row

Parameters:
iter the row iteractor
columns an arrays with the columns to set
values an arrays with the values

void gtk.ListStore.ListStore.setColumnTypes ( int  nColumns,
GType types 
)

This function is meant primarily for GObjects that inherit from GtkListStore, and should only be used when constructing a new GtkListStore.

It will not function after a row has been added, or a method on the GtkTreeModel interface is called. list_store: A GtkListStore n_columns: Number of columns for the list store types: An array length n of GTypes

void gtk.ListStore.ListStore.setValist ( TreeIter  iter,
void *  varArgs 
)

See gtk_list_store_set(); this version takes a va_list for use by language bindings.

list_store: A GtkListStore iter: A valid GtkTreeIter for the row being modified var_args: va_list of column/value pairs

void gtk.ListStore.ListStore.setValue ( TreeIter  iter,
int  column,
Value  value 
)

Sets the data in the cell specified by iter and column.

The type of value must be convertible to the type of the column. list_store: A GtkListStore iter: A valid GtkTreeIter for the row being modified column: column number to modify value: new value for the cell

void gtk.ListStore.ListStore.setValue ( TreeIter  iter,
int  column,
int  value 
)

void gtk.ListStore.ListStore.setValue ( TreeIter  iter,
int  column,
char[]  value 
)

void gtk.ListStore.ListStore.swap ( TreeIter  a,
TreeIter  b 
)

Swaps a and b in store.

Note that this function only works with unsorted stores. store: A GtkListStore. a: A GtkTreeIter. b: Another GtkTreeIter. Since 2.2


Member Data Documentation

GtkListStore* gtk.ListStore.ListStore.gtkListStore [protected]

the main Gtk struct


SourceForge.net Logo DSource.org Logo digitalmars.com Logo