Etk
Main Page Object Hierarchy Data Structures Related Pages
Etk

etk_combobox.h File Reference


Detailed Description


Data Structures

struct  Etk_Combobox_Item
 [Widget] A combobox's item made up of a button that shows a popup-menu when it is clicked, allowing the user to choose an item from a list More...
struct  Etk_Combobox
 [Widget] A combobox is a widget More...

Defines

#define ETK_COMBOBOX_TYPE   (etk_combobox_type_get())
#define ETK_COMBOBOX(obj)   (ETK_OBJECT_CAST((obj), ETK_COMBOBOX_TYPE, Etk_Combobox))
#define ETK_IS_COMBOBOX(obj)   (ETK_OBJECT_CHECK_TYPE((obj), ETK_COMBOBOX_TYPE))
#define ETK_COMBOBOX_ITEM_TYPE   (etk_combobox_item_type_get())
#define ETK_COMBOBOX_ITEM(obj)   (ETK_OBJECT_CAST((obj), ETK_COMBOBOX_ITEM_TYPE, Etk_Combobox_Item))
#define ETK_IS_COMBOBOX_ITEM(obj)   (ETK_OBJECT_CHECK_TYPE((obj), ETK_COMBOBOX_ITEM_TYPE))

Enumerations

enum  Etk_Combobox_Column_Type {
  ETK_COMBOBOX_LABEL,
  ETK_COMBOBOX_IMAGE,
  ETK_COMBOBOX_OTHER
}
 The different types of widgets that can be contained by a combobox's column. More...
enum  Etk_Combobox_Fill_Policy
 Indicates how a widget of a combobox-column should fill and expand. More...

Functions

Etk_Widget * etk_combobox_new (void)
 Creates a new combobox, with no column.
Etk_Widget * etk_combobox_new_default (void)
 Creates a new combobox, made up of a unique column containing a label, and already built (no need to call etk_combobox_build()).
void etk_combobox_items_height_set (Etk_Combobox *combobox, int items_height)
 Set the height of the combobox's items. The default height is 24, the minimum is 12.
int etk_combobox_items_height_get (Etk_Combobox *combobox)
 Gets the height of the combobox's items.
void etk_combobox_column_add (Etk_Combobox *combobox, Etk_Combobox_Column_Type col_type, int width, Etk_Combobox_Fill_Policy fill_policy, float align)
 Adds a column to the combobox. The combobox should not be already be built.
void etk_combobox_build (Etk_Combobox *combobox)
 Builds the combobox: you have to build a combobox after you have added all the columns to it and before you start adding items. Items can not be added if the combobox is not built.
Etk_Combobox_Item * etk_combobox_item_prepend (Etk_Combobox *combobox,...)
 Inserts a new item at the start of the combobox.
Etk_Combobox_Item * etk_combobox_item_prepend_empty (Etk_Combobox *combobox)
 Inserts a new empty item at the start of the combobox.
Etk_Combobox_Item * etk_combobox_item_append (Etk_Combobox *combobox,...)
 Inserts a new item at the end of the combobox.
Etk_Combobox_Item * etk_combobox_item_append_empty (Etk_Combobox *combobox)
 Inserts a new empty item at the end of the combobox.
Etk_Combobox_Item * etk_combobox_item_insert (Etk_Combobox *combobox, Etk_Combobox_Item *after,...)
 Inserts a new item after an existing item of the combobox.
Etk_Combobox_Item * etk_combobox_item_insert_valist (Etk_Combobox *combobox, Etk_Combobox_Item *after, va_list args)
 Inserts a new item after an existing item of the combobox.
Etk_Combobox_Item * etk_combobox_item_insert_empty (Etk_Combobox *combobox, Etk_Combobox_Item *after)
 Inserts a new empty item after an existing item of the combobox.
void etk_combobox_item_remove (Etk_Combobox_Item *item)
 Removes an item from the combobox. The item will be freed and should not be used anymore.
void etk_combobox_clear (Etk_Combobox *combobox)
 Removes all the items of the combobox. All the items will be freed and should not be used anymore.
void etk_combobox_fields_set (Etk_Combobox *combobox,...)
 Sets the values of the cells of the combobox.
void etk_combobox_fields_set_valist (Etk_Combobox *combobox, va_list args)
 Sets the values of the cells of the combobox.
void etk_combobox_item_fields_set (Etk_Combobox_Item *item,...)
 Sets the values of the cells of the combobox item.
void etk_combobox_item_fields_set_valist (Etk_Combobox_Item *item, va_list args)
 Sets the values of the cells of the combobox item. The current widgets of item will be destroyed.
void etk_combobox_item_field_set (Etk_Combobox_Item *item, int column, void *value)
 Sets the value of the one column of the combobox item. The current widgets of item will be destroyed.
void etk_combobox_item_fields_get (Etk_Combobox_Item *item,...)
 Gets the values of the cells of the combobox item.
void etk_combobox_item_fields_get_valist (Etk_Combobox_Item *item, va_list args)
 Gets the values of the cells of the combobox item.
void * etk_combobox_item_field_get (Etk_Combobox_Item *item, int column)
 Gets the value of the cell of a column of the combobox item.
void etk_combobox_item_data_set (Etk_Combobox_Item *item, void *data)
 Sets the data associated to the combobox item.
void etk_combobox_item_data_set_full (Etk_Combobox_Item *item, void *data, void(*free_cb)(void *data))
 Sets the data associated to the combobox item.
void * etk_combobox_item_data_get (Etk_Combobox_Item *item)
 Gets the data associated to the combobox item.
void etk_combobox_active_item_set (Etk_Combobox *combobox, Etk_Combobox_Item *item)
 Sets the active item of the combobox.
Etk_Combobox_Item * etk_combobox_active_item_get (Etk_Combobox *combobox)
 Gets the active item of the combobox.
int etk_combobox_active_item_num_get (Etk_Combobox *combobox)
 Gets the index of the current active item of the combobox.
Etk_Combobox_Item * etk_combobox_first_item_get (Etk_Combobox *combobox)
 Gets the first item of a combobox.
Etk_Combobox_Item * etk_combobox_last_item_get (Etk_Combobox *combobox)
 Gets the last item of a combobox.
Etk_Combobox_Item * etk_combobox_item_prev_get (Etk_Combobox_Item *item)
 Gets the item previous to the given combobox item.
Etk_Combobox_Item * etk_combobox_item_next_get (Etk_Combobox_Item *item)
 Gets the item next to the given combobox item.
Etk_Combobox_Item * etk_combobox_nth_item_get (Etk_Combobox *combobox, int index)
 Gets the nth item of the combobox.
Etk_Combobox * etk_combobox_item_combobox_get (Etk_Combobox_Item *item)
 Gets the combobox containing the given item.