OssoABookGroupModel

OssoABookGroupModel — GtkTreeModel listing OssoABookGroup objects.

Synopsis




            OssoABookGroupModel;
enum        OssoABookGroupModelColumn;
OssoABookGroupModel* osso_abook_group_model_new
                                            (void);
void        osso_abook_group_model_add_group
                                            (OssoABookGroupModel *model,
                                             OssoABookGroup *group);
void        osso_abook_group_model_remove_group
                                            (OssoABookGroupModel *model,
                                             OssoABookGroup *group);
gboolean    osso_abook_group_model_get_iter (OssoABookGroupModel *model,
                                             OssoABookGroup *group,
                                             GtkTreeIter *iter);


Object Hierarchy


  GObject
   +----GtkListStore
         +----OssoABookGroupModel

Implemented Interfaces

OssoABookGroupModel implements GtkTreeModel, GtkTreeDragSource, GtkTreeDragDest and GtkTreeSortable.

Description

The OssoABookGroupModel is a model that lists user-defined groups (see OssoABookManualGroup). Additional groups can be added using the osso_abook_group_model_add_group() method.

Details

OssoABookGroupModel

typedef struct _OssoABookGroupModel OssoABookGroupModel;

There are no public fields in OssoABookGroupModel.


enum OssoABookGroupModelColumn

typedef enum {
        OSSO_ABOOK_GROUP_MODEL_COL_GROUP = 0 /* OssoABookGroup *  */
} OssoABookGroupModelColumn;

The data columns of the model. Data cell data can be retreived using gtk_tree_model_get().

OSSO_ABOOK_GROUP_MODEL_COL_GROUP The column containing OssoABookGroup objects.

osso_abook_group_model_new ()

OssoABookGroupModel* osso_abook_group_model_new
                                            (void);

Creates a new OssoABookGroupModel object.

Returns : A new OssoABookGroupModel object.

osso_abook_group_model_add_group ()

void        osso_abook_group_model_add_group
                                            (OssoABookGroupModel *model,
                                             OssoABookGroup *group);

Adds group to model. This is used for special groups only. Use OssoABookManualGroupManager to manage manual groups.

model : An OssoABookGroupModel
group : An OssoABookGroup to be added to the model

osso_abook_group_model_remove_group ()

void        osso_abook_group_model_remove_group
                                            (OssoABookGroupModel *model,
                                             OssoABookGroup *group);

Removes group from model. Do not remove OssoABookManualGroup groups from the model, if they have been automatically added. Use OssoABookManualGroupManager to manage manual groups.

model : An OssoABookGroupModel
group : An OssoABookGroup to removed from the model

osso_abook_group_model_get_iter ()

gboolean    osso_abook_group_model_get_iter (OssoABookGroupModel *model,
                                             OssoABookGroup *group,
                                             GtkTreeIter *iter);

Retreives the GtkTreeIter associated with group, and stores it in iter.

model : An OssoABookGroupModel
group : An OssoABookGroup
iter : A GtkTreeIter. Can be NULL.
Returns : TRUE if group was included in model, FALSE otherwise.

See Also

OssoABookGroup, OssoABookManualGroup, OssoABookGroupView, OssoABookGroupSelector, OssoABookManualGroupManager