MxListView

MxListView — a box layout driven by a model.

Functions

Properties

GObject * factory Read / Write
GType * item-type Read / Write
ClutterModel * model Read / Write

Types and Values

Object Hierarchy

    GObject
    ╰── GInitiallyUnowned
        ╰── ClutterActor
            ╰── MxWidget
                ╰── MxBoxLayout
                    ╰── MxListView

Implemented Interfaces

MxListView implements ClutterContainer, ClutterScriptable, ClutterAnimatable, AtkImplementorIface, MxStylable, MxScrollable and MxFocusable.

Description

MxListView 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 MxItemFactory.

Data is set on the children by mapping columns in the model to object properties on the children.

Functions

mx_list_view_new ()

ClutterActor *
mx_list_view_new (void);

Create a new MxListView

Returns

a newly allocated MxListView


mx_list_view_set_model ()

void
mx_list_view_set_model (MxListView *list_view,
                        ClutterModel *model);

Set the model used by the MxListView

Parameters

list_view

An MxListView

 

model

A ClutterModel

 

mx_list_view_get_model ()

ClutterModel *
mx_list_view_get_model (MxListView *list_view);

Get the model currently used by the MxListView

Parameters

list_view

An MxListView

 

Returns

the current ClutterModel.

[transfer none]


mx_list_view_set_item_type ()

void
mx_list_view_set_item_type (MxListView *list_view,
                            GType item_type);

Set the item type used to create items representing each row in the model

Parameters

list_view

An MxListView

 

item_type

A GType

 

mx_list_view_get_item_type ()

GType
mx_list_view_get_item_type (MxListView *list_view);

Get the item type currently being used to create items

Parameters

list_view

An MxListView

 

Returns

a GType


mx_list_view_add_attribute ()

void
mx_list_view_add_attribute (MxListView *list_view,
                            const gchar *attribute,
                            gint column);

Adds an attribute mapping between the current model and the objects from the cell renderer.

Parameters

list_view

An MxListView

 

attribute

Name of the attribute

 

column

Column number

 

mx_list_view_freeze ()

void
mx_list_view_freeze (MxListView *list_view);

Freeze the view. This means that the view will not act on changes to the model until it is thawed. Call mx_list_view_thaw to thaw the view.

Parameters

list_view

An MxListView

 

mx_list_view_thaw ()

void
mx_list_view_thaw (MxListView *list_view);

Thaw the view. This means that the view will now act on changes to the model.

Parameters

list_view

An MxListView

 

mx_list_view_set_factory ()

void
mx_list_view_set_factory (MxListView *list_view,
                          MxItemFactory *factory);

Sets factory to be the factory used for creating new list items

Parameters

list_view

A MxListView

 

factory

A MxItemFactory.

[allow-none]

mx_list_view_get_factory ()

MxItemFactory *
mx_list_view_get_factory (MxListView *list_view);

Gets the MxItemFactory used for creating new list items.

Parameters

list_view

A MxListView

 

Returns

A MxItemFactory.

[transfer none]

Types and Values

MxListView

typedef struct _MxListView MxListView;

The contents of the this structure are private and should only be accessed through the public API.


MxListViewClass

typedef struct {
  MxBoxLayoutClass parent_class;

  /* padding for future expansion */
  void (*_padding_0) (void);
  void (*_padding_1) (void);
  void (*_padding_2) (void);
  void (*_padding_3) (void);
  void (*_padding_4) (void);
} MxListViewClass;

Property Details

The “factory” property

  “factory”                  GObject *

The MxItemFactory used for creating new items.

Flags: Read / Write


The “item-type” property

  “item-type”                GType *

The GType to use as the items in the view. Must be a subclass of ClutterActor.

Flags: Read / Write

Allowed values: ClutterActor


The “model” property

  “model”                    ClutterModel *

The model for the item view.

Flags: Read / Write