/ gwcategorieseditbox.h / Functions / Description

Functions



gw_categories_edit_box_create

Creates the GUI component
GtkWindow * gw_categories_edit_box_create ( GtkWindow *window, struct catalog_file_info *catalog_info);
This function creates and displays the categories managment window.
This window is modal.

Parameters
window the main application window
catalog_info the catalog information data structure

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


gw_categories_edit_box_load_categories_list

Loads the list of catalog categories.
gint gw_categories_edit_box_load_categories_list ( GtkWindow *w);
This function loads the list of catalog categories in the categories managment window.


Parameters
w the categories managment window

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


gw_categories_edit_box_update_click

Allows to edit properties of the selected category.
gint gw_categories_edit_box_update_click ( GtkWidget *bt, GtkWindow *w);
This function allows to edit properties of the selected category.
This function call when the user click on update button.


Parameters
w the categories managment window

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


gw_categories_edit_box_remove_click

Removes the selected category from catalog.
gint gw_categories_edit_box_remove_click ( GtkWidget *bt, GtkWindow *w);
This function removes the selected category from catalog.
This function call when the user click on remove button.


Parameters
w the categories managment window

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


gw_categories_edit_box_add_update_click

Adds or Updates the current edited category.
gint gw_categories_edit_box_add_update_click ( GtkWidget *bt, GtkWindow *w);
This function adds or updates the current edited category.
This function call when the user click on add/update button.
Adds when the button state is add and updates when the button state is update.


Parameters
w the categories managment window

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


gw_categories_edit_box_list_select_row

Updates the editing category properties.
gboolean gw_categories_edit_box_list_select_row ( GtkCList *list, gint line, gint column, GdkEvent *event, GtkWindow *w);
This function updates the editing category properties. Clears all field in category properties.
This function call when the user select one item in the category list.


Parameters
list the categories list
line the current line
column the current column
event the event that call the function
w the categories managment window

Result: Return TRUE when it's done.
Returns FALSE when an error occured.
.


gw_categories_edit_box_set_category_name

Sets category name.
gint gw_categories_edit_box_set_category_name ( GtkWindow *w, gchar *category_name);
This function sets the category name in the edit category properties.


Parameters
w the categories managment window

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


gw_categories_edit_box_set_category_description

Sets category description.
gint gw_categories_edit_box_set_category_description ( GtkWindow *w, gchar *category_description);
This function sets the category description in the edit category properties.


Parameters
w the categories managment window

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


gw_categories_edit_box_set_add_state

Sets Add/Update button in Add mode.
gint gw_categories_edit_box_set_add_state ( GtkWindow *w);
This function sets in "Add mode" the add/update button.


Parameters
w the categories managment window

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


gw_categories_edit_box_set_update_state

Sets Add/Update button in Update mode.
gint gw_categories_edit_box_set_update_state ( GtkWindow *w);
This function sets in "Update mode" the add/update button.


Parameters
w the categories managment window

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


gw_categories_edit_box_add_category

Adds a category to the categories list.
gint gw_categories_edit_box_add_category ( GtkWindow *w, struct category *category);
This function adds a category to the categories list.
If category is null adds the current edited category.


Parameters
w the categories managment window
category the category data structure to add

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


gw_categories_edit_box_update_category

Updates a category to the catagories list.
gint gw_categories_edit_box_update_category ( GtkWindow *w);
This function updates a category to the categories list.


Parameters
w the categories managment window

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


gw_categories_edit_box_remove_category

Removes from categories list the selected category.
gint gw_categories_edit_box_remove_category ( GtkWindow *w);
This function removes the selected category from categories list.


Parameters
w the categories managment window

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


gw_categories_edit_box_get_main_window

Gets the main window
GtkWindow * gw_categories_edit_box_get_main_window ( GtkWindow *w);
This function gets the main application window.


Parameters
w the categories managment window

Result: a pointer to the main window.
Returns NULL when an error occured.
.


gw_categories_edit_box_get_update_category_button

Gets the update category button
GtkButton * gw_categories_edit_box_get_update_category_button ( GtkWindow *w);
This function gets the update category button.


Parameters
w the categories managment window

Result: a pointer to the update category button.
Returns NULL when an error occured..


gw_categories_edit_box_get_remove_category_button

Gets the remove category button
GtkButton * gw_categories_edit_box_get_remove_category_button ( GtkWindow *w);
This function gets the remove category button.


Parameters
w the categories managment window

Result: a pointer to the remove category button.
Returns NULL when an error occured..


gw_categories_edit_box_get_add_update_category_button

Gets the add/update category button
GtkButton * gw_categories_edit_box_get_add_update_category_button ( GtkWindow *w);
This function gets the add/update category button.


Parameters
w the categories managment window

Result: a pointer to the add/update category button.
Returns NULL when an error occured..


gw_categories_edit_box_get_catalog_info

Gets the catalog information
struct catalog_file_info * gw_categories_edit_box_get_catalog_info ( GtkWindow *w);
This function gets the catalog information data structure.


Parameters
w the categories managment window

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


gw_categories_edit_box_get_categories_list

Gets the categories list.
GList * gw_categories_edit_box_get_categories_list ( GtkWindow *w);
This function gets the categories list.


Parameters
w the categories managment window

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


gw_categories_edit_box_get_category

Gets the selected category.
struct category * gw_categories_edit_box_get_category ( GtkWindow *w);
This function gets the selected category.


Parameters
w the categories managment window

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


gw_categories_edit_box_get_category_name

Gets current edited category name.
gchar * gw_categories_edit_box_get_category_name ( GtkWindow *w);
This function gets the current edited category name. It's a new allocated string and must be freed with g_free().


Parameters
w the categories managment window

Result: the current edited name.
Returns NULL when an error occured..


gw_categories_edit_box_get_category_description

Gets current edited category description.
gchar * gw_categories_edit_box_get_category_description ( GtkWindow *w);
This function gets the current edited category description. It's a new allocated string and must be freed with g_free().


Parameters
w the categories managment window

Result: the current edited description.
Returns NULL when an error occured..


gw_categories_edit_box_get_isadd_state

Checks if Add/Update button is in "Add mode".
gboolean gw_categories_edit_box_get_isadd_state ( GtkWindow *w);
This function checks if add/upadte button is in "Add mode".


Parameters
w the categories managment window

Result: Returns TRUE if it is in "Add mode".
Returns FALSE when an error occured..


gw_categories_edit_box_get_isupdate_state

Checks if Add/Update button is in "Update mode".
gboolean gw_categories_edit_box_get_isupdate_state ( GtkWindow *w);
This function checks if add/upadte button is in "Upadte mode".


Parameters
w the categories managment window

Result: Returns TRUE if it is in "Update mode".
Returns FALSE when an error occured..


gw_categories_edit_box_category_name_changed

Updates the add/update button when the category name changed.
gboolean gw_categories_edit_box_category_name_changed ( GtkWidget *entry, GtkWindow *w);
This function updates the add/update button when the category name changed.


Parameters
w the categories edit box window

Result: an error code.
Returns always FALSE at this time..


gw_categories_edit_box_category_description_changed

Updates the add/update button when the category description changed.
gboolean gw_categories_edit_box_category_description_changed ( GtkWidget *entry, GtkWindow *w);
This function updates the add/update button when the category description changed.


Parameters
w the categories edit box window

Result: an error code.
Returns always FALSE at this time..