1 #ifndef GSB_SCHEDULER_LIST_H
2 #define GSB_SCHEDULER_LIST_H
3 
4 #include <gtk/gtk.h>
5 
6 enum
7 {
8     COL_NB_DATE = 0,
9     COL_NB_ACCOUNT,
10     COL_NB_PARTY,
11     COL_NB_FREQUENCY,
12     COL_NB_MODE,
13     COL_NB_NOTES,
14     COL_NB_AMOUNT,
15 
16     SCHEDULER_COL_NB_BACKGROUND,		    /*< color of the background */
17     SCHEDULER_COL_NB_SAVE_BACKGROUND,		/*< when selection, save of the normal color of background */
18     SCHEDULER_COL_NB_AMOUNT_COLOR, 		    /*< color of the amount */
19     SCHEDULER_COL_NB_TRANSACTION_NUMBER,
20     SCHEDULER_COL_NB_FONT,			        /*< PangoFontDescription if used */
21     SCHEDULER_COL_NB_VIRTUAL_TRANSACTION,	/*< to 1 if it's a calculated scheduled transaction (for longer view), so, cannot edit */
22     SCHEDULER_COL_NB_TEXT_COLOR,            /*< color of the text */
23 
24     SCHEDULER_COL_NB_TOTAL
25 };
26 
27 
28 /* number of visible columns */
29 #define SCHEDULER_COL_VISIBLE_COLUMNS 7
30 
31 /* define the columns in the store
32  * as the data are filled above, the number here
33  * begin at NB_COLS_SCHEDULER */
34 
35 
36 enum SchedulerPeriodicity
37 {
38     SCHEDULER_PERIODICITY_ONCE_VIEW = 0,
39     SCHEDULER_PERIODICITY_WEEK_VIEW,
40     SCHEDULER_PERIODICITY_MONTH_VIEW,
41     SCHEDULER_PERIODICITY_TWO_MONTHS_VIEW,
42     SCHEDULER_PERIODICITY_TRIMESTER_VIEW,
43     SCHEDULER_PERIODICITY_YEAR_VIEW,
44     SCHEDULER_PERIODICITY_CUSTOM_VIEW,
45     SCHEDULER_PERIODICITY_NB_CHOICES
46 };
47 
48 
49 enum PeriodicityUnits
50 {
51     PERIODICITY_DAYS,
52     PERIODICITY_WEEKS,
53     PERIODICITY_MONTHS,
54     PERIODICITY_YEARS
55 };
56 
57 
58 /* START_INCLUDE_H */
59 /* END_INCLUDE_H */
60 
61 
62 /* START_DECLARATION */
63 void 		gsb_gui_scheduler_toolbar_set_style 						(gint toolbar_style);
64 gboolean 	gsb_scheduler_list_append_new_scheduled 					(gint scheduled_number,
65 																		 GDate *end_date);
66 gboolean 	gsb_scheduler_list_clone_selected_scheduled 				(GtkWidget *menu_item,
67 																		 gint *scheduled_number);
68 GtkWidget *	gsb_scheduler_list_create_list 								(void);
69 gboolean 	gsb_scheduler_list_delete_scheduled_transaction 			(gint scheduled_number,
70 																		 gboolean show_warning);
71 gboolean 	gsb_scheduler_list_delete_scheduled_transaction_by_menu		(GtkWidget *button,
72 																		 gpointer null);
73 gboolean 	gsb_scheduler_list_edit_transaction 						(gint scheduled_number);
74 gboolean 	gsb_scheduler_list_execute_transaction 						(gint scheduled_number);
75 gboolean 	gsb_scheduler_list_fill_list 								(GtkWidget *tree_view);
76 void 		gsb_scheduler_list_free_variables 							(void);
77 gint 		gsb_scheduler_list_get_current_scheduled_number 			(void);
78 GDate *		gsb_scheduler_list_get_end_date_scheduled_showed 			(void);
79 gchar *		gsb_scheduler_list_get_largeur_col_treeview_to_string		(void);
80 GSList *	gsb_scheduler_list_get_scheduled_transactions_taken			(void);
81 GSList *	gsb_scheduler_list_get_scheduled_transactions_to_take		(void);
82 GtkWidget *	gsb_scheduler_list_get_toolbar 								(void);
83 GtkWidget *	gsb_scheduler_list_get_tree_view 							(void);
84 void 		gsb_scheduler_list_init_tab_width_col_treeview				(const gchar *description);
85 void 		gsb_scheduler_list_init_variables 							(void);
86 gboolean 	gsb_scheduler_list_redraw 									(void);
87 gboolean 	gsb_scheduler_list_remove_transaction_from_list 			(gint scheduled_number);
88 gboolean 	gsb_scheduler_list_select 									(gint scheduled_number);
89 gboolean 	gsb_scheduler_list_set_background_color 					(GtkWidget *tree_view);
90 void		gsb_scheduler_list_set_current_tree_view_width				(gint new_tree_view_width);
91 gboolean 	gsb_scheduler_list_set_largeur_col 							(void);
92 gboolean 	gsb_scheduler_list_update_transaction_in_list 				(gint scheduled_number);
93 void		gsb_scheduler_list_update_tree_view							(GtkWidget *tree_view);
94 /* END_DECLARATION */
95 
96 #endif
97