/ gwcomboboxcategories.h / Functions / Description

Functions



gw_combo_box_categories_create

Creates the GUI component
GtkHBox * gw_combo_box_categories_create ( GtkWindow *w, gchar *title, struct catalog_file_info *catalog_info);
This function creates and displays the categories combo box.
If title is null, no label are displayed.


Parameters
w the main application window
title the combo box title
catalog_info the catalog information data structure

Result: a pointer to this combo box.
Returns NULL when an error occured.
.


gw_combo_box_categories_load

Loads the list of catalog categories.
gint gw_combo_box_categories_load ( GtkHBox *cbc);
This function loads the list of catalog categories in the categories combo box.


Parameters
cbc the categories combo box

Result: an error code.
Returns 0 when it's done.
Returns -1 when an error occured.
.


gw_combo_box_categories_set_catalog_info

Sets the new catalog information.
gint gw_combo_box_categories_set_catalog_info ( GtkHBox *cbc, struct catalog_file_info *catalog_info);
This function sets the new catalog information for categories list.


Parameters
cbc the categories combo box to set catalog information
catalog_info the catalog information data structure

Result: an error code.
Returns 0 when it's done.
Returns -1 when an error occured.
.


gw_combo_box_categories_set_selected_category

Sets the selected category.
gint gw_combo_box_categories_set_selected_category ( GtkHBox *cbc, struct category *category);
This function sets the selected category in the combo box with the category information data structure.


Parameters
cbc the categories combo box to set selected category
category the category information data structure

Result: an error code.
Returns 0 when it's done.
Returns -1 when an error occured.
.


gw_combo_box_categories_set_selected_category_name

Sets the selected category.
gint gw_combo_box_categories_set_selected_category_name ( GtkHBox *cbc, gchar *name);
This function sets the selected category in the combo box with the category name.


Parameters
cbc the categories combo box to set selected category
name the name of the selected category

Result: an error code.
Returns 0 when it's done.
Returns -1 when an error occured.
.


gw_combo_box_categories_get_selected_category

Gets the selected category.
struct category * gw_combo_box_categories_get_selected_category ( GtkHBox *cbc);
This function gets the selected category in the combo box.


Parameters
cbc the categories combo box to get selected category

Result: pointer to data structure of the selected category.
Returns NULL when an error occured.
.


gw_combo_box_categories_get_selected_category_name

Gets the selected category name.
gchar * gw_combo_box_categories_get_selected_category_name ( GtkHBox *cbc);
This function gets the selected category name in the combo box.
It's a new allocated string and must free with g_free().


Parameters
cbc the categories combo box to get selected category

Result: the name of the selected category.
Returns NULL when an error occured.
.


gw_combo_box_categories_get_combo

Gets the combo.
GtkCombo * gw_combo_box_categories_get_combo ( GtkHBox *cbc);
This function gets the categories combo of categories combo box.


Parameters
cbc the categories combo to get categories combo box

Result: pointer to the combo.
Returns NULL when an error occured.
.


gw_combo_box_categories_get_catalog_info

Gets the catalog information.
struct catalog_file_info * gw_combo_box_categories_get_catalog_info ( GtkHBox *cbc);
This function gets the catalog information data structure of categories combo box.


Parameters
cbc the categories combo box to get catalog information

Result: pointer to catalog information data structure.
Returns NULL when an error occured.
.


gw_combo_box_categories_get_categories

Gets the categories list.
GList * gw_combo_box_categories_get_categories ( GtkHBox *cbc);
This function gets the categories list of categories combo box.


Parameters
cbc the categories combo box to get categories list

Result: pointer to categories list.
Returns NULL when an error occured.
.