![]() |
![]() |
![]() |
Netbook Toolkit Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy | Implemented Interfaces | Properties |
NbtkItemView; NbtkWidget* nbtk_item_view_new (void); void nbtk_item_view_set_model (NbtkItemView *item_view, ClutterModel *model); ClutterModel* nbtk_item_view_get_model (NbtkItemView *item_view); void nbtk_item_view_set_item_type (NbtkItemView *item_view, GType item_type); GType nbtk_item_view_get_item_type (NbtkItemView *item_view); void nbtk_item_view_add_attribute (NbtkItemView *item_view, const gchar *attribute, gint column); void nbtk_item_view_freeze (NbtkItemView *item_view); void nbtk_item_view_thaw (NbtkItemView *item_view); void nbtk_item_view_set_factory (NbtkItemView *item_view, NbtkItemFactory *factory);
GObject +----GInitiallyUnowned +----ClutterActor +----NbtkWidget +----NbtkGrid +----NbtkItemView
NbtkItemView implements ClutterContainer, NbtkScrollable, ClutterScriptable and NbtkStylable.
NbtkItemView is a flow 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 NbtkItemFactory.
Data is set on the children by mapping columns in the model to object properties on the children.
typedef struct _NbtkItemView NbtkItemView;
The contents of the this structure are private and should only be accessed through the public API.
NbtkWidget* nbtk_item_view_new (void);
Create a new NbtkItemView
Returns : |
a newly allocated NbtkItemView |
void nbtk_item_view_set_model (NbtkItemView *item_view, ClutterModel *model);
Set the model used by the NbtkItemView
|
An NbtkItemView |
|
A ClutterModel |
ClutterModel* nbtk_item_view_get_model (NbtkItemView *item_view);
Get the model currently used by the NbtkItemView
|
An NbtkItemView |
Returns : |
the current ClutterModel |
void nbtk_item_view_set_item_type (NbtkItemView *item_view, GType item_type);
Set the item type used to create items representing each row in the model
|
An NbtkItemView |
|
A GType |
GType nbtk_item_view_get_item_type (NbtkItemView *item_view);
Get the item type currently being used to create items
|
An NbtkItemView |
Returns : |
a GType |
void nbtk_item_view_add_attribute (NbtkItemView *item_view, const gchar *attribute, gint column);
Adds an attribute mapping between the current model and the objects from the cell renderer.
|
An NbtkItemView |
|
Name of the attribute |
|
Column number |
void nbtk_item_view_freeze (NbtkItemView *item_view);
Freeze the view. This means that the view will not act on changes to the
model until it is thawed. Call nbtk_item_view_thaw()
to thaw the view
|
An NbtkItemView |
void nbtk_item_view_thaw (NbtkItemView *item_view);
Thaw the view. This means that the view will now act on changes to the model.
|
An NbtkItemView |
void nbtk_item_view_set_factory (NbtkItemView *item_view, NbtkItemFactory *factory);
|
|
|