BtObjectListModel

BtObjectListModel — data model class for some widgets

Functions

Types and Values

Object Hierarchy

    GObject
    ╰── BtObjectListModel

Implemented Interfaces

BtObjectListModel implements GtkTreeModel.

Includes

#include "bt-edit.h"

Description

Allows to bind gobject properties to model columns. Does not copy the data and thus keeps the widget always up-to-date.

Functions

bt_object_list_model_insert ()

void
bt_object_list_model_insert (BtObjectListModel *model,
                             GObject *object,
                             gint position);

Insert a new row to the model . The object has to have the same type as given to bt_object_list_model_new().

Parameters

model

the model

 

object

the object to insert

 

position

the position of the new row

 

bt_object_list_model_append ()

void
bt_object_list_model_append (BtObjectListModel *model,
                             GObject *object);

Append a new row to the model . The object has to have the same type as given to bt_object_list_model_new().

Parameters

model

the model

 

object

the object to append

 

bt_object_list_model_get_object ()

GObject *
bt_object_list_model_get_object (BtObjectListModel *model,
                                 GtkTreeIter *iter);

The the GObject for the iter.

Parameters

model

the model

 

iter

the iter

 

bt_object_list_model_new ()

BtObjectListModel *
bt_object_list_model_new (gint n_columns,
                          GType object_type,
                          ...);

Creates a list model mapping object properties to model columns.

Parameters

n_columns

number of columns

 

object_type

the GType of the objects in the model

 

...

property names for the columns

 

Returns

the model.

Types and Values

struct BtObjectListModel

struct BtObjectListModel;

Data model for GtkTreeView or GtkComboBox.