![]() |
![]() |
![]() |
Netbook Toolkit Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy | Implemented Interfaces | Properties |
NbtkListView; NbtkWidget* nbtk_list_view_new (void); void nbtk_list_view_set_model (NbtkListView *list_view, ClutterModel *model); ClutterModel* nbtk_list_view_get_model (NbtkListView *list_view); void nbtk_list_view_set_item_type (NbtkListView *list_view, GType item_type); GType nbtk_list_view_get_item_type (NbtkListView *list_view); void nbtk_list_view_add_attribute (NbtkListView *list_view, const gchar *attribute, gint column); void nbtk_list_view_freeze (NbtkListView *list_view); void nbtk_list_view_thaw (NbtkListView *list_view); void nbtk_list_view_set_factory (NbtkListView *list_view, NbtkItemFactory *factory);
GObject +----GInitiallyUnowned +----ClutterActor +----NbtkWidget +----NbtkBoxLayout +----NbtkListView
NbtkListView implements ClutterContainer, NbtkScrollable, ClutterScriptable and NbtkStylable.
NbtkListView is a box layout container driven by a ClutterModel. Children are created for each row in the model, either by creating actors from the supplied ClutterActor derived type, or from a NbtkItemFactor.
Data is set on the children by mapping columns in the model to object properties on the children.
typedef struct _NbtkListView NbtkListView;
The contents of the this structure are private and should only be accessed through the public API.
NbtkWidget* nbtk_list_view_new (void);
Create a new NbtkListView
Returns : |
a newly allocated NbtkListView |
void nbtk_list_view_set_model (NbtkListView *list_view, ClutterModel *model);
Set the model used by the NbtkListView
|
An NbtkListView |
|
A ClutterModel |
ClutterModel* nbtk_list_view_get_model (NbtkListView *list_view);
Get the model currently used by the NbtkListView
|
An NbtkListView |
Returns : |
the current ClutterModel |
void nbtk_list_view_set_item_type (NbtkListView *list_view, GType item_type);
Set the item type used to create items representing each row in the model
|
An NbtkListView |
|
A GType |
GType nbtk_list_view_get_item_type (NbtkListView *list_view);
Get the item type currently being used to create items
|
An NbtkListView |
Returns : |
a GType |
void nbtk_list_view_add_attribute (NbtkListView *list_view, const gchar *attribute, gint column);
Adds an attribute mapping between the current model and the objects from the cell renderer.
|
An NbtkListView |
|
Name of the attribute |
|
Column number |
void nbtk_list_view_freeze (NbtkListView *list_view);
Freeze the view. This means that the view will not act on changes to the
model until it is thawed. Call nbtk_list_view_thaw()
to thaw the view
|
An NbtkListView |
void nbtk_list_view_thaw (NbtkListView *list_view);
Thaw the view. This means that the view will now act on changes to the model.
|
An NbtkListView |
"item-type"
property"item-type" GType* : Read / Write
The GType to use as the items in the view. Must be a subclass of ClutterActor.