1 #ifndef NAVIGATION_H
2 #define NAVIGATION_H
3 
4 #include <gtk/gtk.h>
5 
6 typedef enum 	_GsbAccountNotebookPages	GsbAccountNotebookPages;
7 typedef enum 	_GsbGeneralNotebookPages	GsbGeneralNotebookPages;
8 typedef struct	_GsbGuiNavigationPage		GsbGuiNavigationPage;
9 enum _GsbGeneralNotebookPages
10 {
11     GSB_HOME_PAGE,
12     GSB_ACCOUNT_PAGE,
13     GSB_SCHEDULER_PAGE,
14     GSB_PAYEES_PAGE,
15     GSB_SIMULATOR_PAGE,
16     GSB_CATEGORIES_PAGE,
17     GSB_BUDGETARY_LINES_PAGE,
18     GSB_REPORTS_PAGE,
19     /** FIXME (later) : define an api so that plugin register here itself.  */
20     GSB_AQBANKING_PAGE
21 };
22 
23 enum _GsbAccountNotebookPages
24 {
25     GSB_TRANSACTIONS_PAGE,
26     GSB_ESTIMATE_PAGE,
27     GSB_HISTORICAL_PAGE,
28     GSB_FINANCE_PAGE,
29     GSB_PROPERTIES_PAGE
30 };
31 
32 /** \struct describe a page
33  * */
34 struct _GsbGuiNavigationPage
35 {
36     gint ordre;
37     gint type_page;     /* GSB_GENERAL_NOTEBOOK_PAGES */
38 };
39 
40 /* START_INCLUDE_H */
41 /* END_INCLUDE_H */
42 
43 
44 /* START_DECLARATION */
45 void 			gsb_gui_navigation_add_account 					(gint account_number,
46 																 gboolean switch_to_account);
47 void 			gsb_gui_navigation_add_report 					(gint report_number);
48 gboolean 		gsb_gui_navigation_change_account 				(gint new_account);
49 gboolean 		gsb_gui_navigation_check_scroll 				(GtkWidget *tree_view,
50 																 GdkEvent *ev,
51 																 gpointer user_data);
52 void 			gsb_gui_navigation_create_account_list 			(GtkTreeModel *model);
53 GtkWidget *		gsb_gui_navigation_create_navigation_pane 		(void);
54 void			gsb_gui_navigation_create_report_list			(GtkTreeModel *model);
55 gboolean 		gsb_gui_navigation_drag_data_received 			(GtkTreeDragDest *drag_dest,
56 																 GtkTreePath *dest_path,
57 																 GtkSelectionData *selection_data);
58 void 			gsb_gui_navigation_free_pages_list 				(void);
59 gint			gsb_gui_navigation_get_current_account 			(void);
60 gint 			gsb_gui_navigation_get_current_page 			(void);
61 gint 			gsb_gui_navigation_get_current_report 			(void);
62 gint 			gsb_gui_navigation_get_last_account 			(void);
63 GtkTreeModel *	gsb_gui_navigation_get_model 					(void);
64 GQueue *		gsb_gui_navigation_get_pages_list 				(void);
65 GtkWidget *		gsb_gui_navigation_get_tree_view 				(void);
66 void 			gsb_gui_navigation_init_pages_list 				(void);
67 void 			gsb_gui_navigation_init_tree_view				(void);
68 void 			gsb_gui_navigation_remove_account 				(gint account_number);
69 void 			gsb_gui_navigation_remove_report 				(gint report_number);
70 gboolean 		gsb_gui_navigation_select_line 					(GtkTreeSelection *selection,
71 																 GtkTreeModel *model);
72 gboolean 		gsb_gui_navigation_select_next 					(void);
73 gboolean 		gsb_gui_navigation_select_prev 					(void);
74 gboolean 		gsb_gui_navigation_set_page_list_order 			(const gchar *order_list);
75 gboolean 		gsb_gui_navigation_set_selection 				(gint page,
76 																 gint account_number,
77 																 gint report_number);
78 void 			gsb_gui_navigation_update_account 				(gint account_number);
79 void 			gsb_gui_navigation_update_account_label 		(gint account_number);
80 void 			gsb_gui_navigation_update_home_page 			(void);
81 void 			gsb_gui_navigation_update_home_page_from_theme	(void);
82 void			gsb_gui_navigation_update_localisation			(gint type_maj);
83 void 			gsb_gui_navigation_update_report 				(gint report_number) ;
84 void 			gsb_gui_navigation_update_statement_label 		(gint account_number);
85 gboolean 		gsb_gui_navigation_row_drop_possible 			(GtkTreeDragDest *drag_dest,
86 																 GtkTreePath *dest_path,
87 																 GtkSelectionData *selection_data);
88 gulong 			gsb_gui_navigation_tree_view_selection_changed 	(void);
89 
90 void 			gsb_gui_navigation_select_reports_page			(void);
91 
92 /* END_DECLARATION */
93 
94 #endif
95