MxComboBox

MxComboBox — combo box actor

Synopsis

                    MxComboBox;
ClutterActor *      mx_combo_box_new                    (void);
void                mx_combo_box_insert_text            (MxComboBox *box,
                                                         gint position,
                                                         const gchar *text);
void                mx_combo_box_append_text            (MxComboBox *box,
                                                         const gchar *text);
void                mx_combo_box_prepend_text           (MxComboBox *box,
                                                         const gchar *text);
void                mx_combo_box_remove_text            (MxComboBox *box,
                                                         gint position);
void                mx_combo_box_set_title              (MxComboBox *box,
                                                         const gchar *title);
const gchar*        mx_combo_box_get_title              (MxComboBox *box);
void                mx_combo_box_set_index              (MxComboBox *box,
                                                         gint index);
const gint          mx_combo_box_get_index              (MxComboBox *box);

Object Hierarchy

  GObject
   +----GInitiallyUnowned
         +----ClutterActor
               +----MxWidget
                     +----MxComboBox

Implemented Interfaces

MxComboBox implements ClutterScriptable and MxStylable.

Properties

  "index"                    gint                  : Read / Write
  "title"                    gchar*                : Read / Write

Description

MxComboBox combines a button with a popup menu to allow the user to select an option from a list.

Details

MxComboBox

typedef struct _MxComboBox MxComboBox;

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


mx_combo_box_new ()

ClutterActor *      mx_combo_box_new                    (void);

Create a new MxComboBox

Returns :

a newly allocated MxComboBox

mx_combo_box_insert_text ()

void                mx_combo_box_insert_text            (MxComboBox *box,
                                                         gint position,
                                                         const gchar *text);

Insert an item into the combo box list.

box :

A MxComboBox

position :

zero indexed position to insert the item at

text :

name of the item

mx_combo_box_append_text ()

void                mx_combo_box_append_text            (MxComboBox *box,
                                                         const gchar *text);

Append an item to the combo box list

box :

A MxComboBox

text :

name of the item

mx_combo_box_prepend_text ()

void                mx_combo_box_prepend_text           (MxComboBox *box,
                                                         const gchar *text);

Prepend an item to the combo box list

box :

A MxComboBox

text :

name of the item

mx_combo_box_remove_text ()

void                mx_combo_box_remove_text            (MxComboBox *box,
                                                         gint position);

Remove the item at position

box :

A MxComboBox

position :

position of the item to remove

mx_combo_box_set_title ()

void                mx_combo_box_set_title              (MxComboBox *box,
                                                         const gchar *title);

Set the text displayed in the combo box

box :

A MxComboBox

title :

text to display

mx_combo_box_get_title ()

const gchar*        mx_combo_box_get_title              (MxComboBox *box);

Get the text displayed in the combo box

box :

A MxComboBox

Returns :

the text string, owned by the combo box

mx_combo_box_set_index ()

void                mx_combo_box_set_index              (MxComboBox *box,
                                                         gint index);

Set the currenet combo box text from the item at index in the list.

box :

A MxComboBox

index :

the index of the list item to set

mx_combo_box_get_index ()

const gint          mx_combo_box_get_index              (MxComboBox *box);

Get the index of the last item selected

box :

A MxComboBox

Returns :

const gint

Property Details

The "index" property

  "index"                    gint                  : Read / Write

Index of the selected item, or -1 if no item is selected.

Allowed values: >= -1

Default value: -1


The "title" property

  "title"                    gchar*                : Read / Write

Text currently displayed in the combo box button.

Default value: ""