00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00036 #ifndef __GNC_MAIN_WINDOW_H
00037 #define __GNC_MAIN_WINDOW_H
00038
00039 #include <gtk/gtk.h>
00040 #include "gnc-plugin-page.h"
00041
00042
00043 #define GNC_TYPE_MAIN_WINDOW (gnc_main_window_get_type ())
00044 #define GNC_MAIN_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GNC_TYPE_MAIN_WINDOW, GncMainWindow))
00045 #define GNC_MAIN_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GNC_TYPE_MAIN_WINDOW, GncMainWindowClass))
00046 #define GNC_IS_MAIN_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GNC_TYPE_MAIN_WINDOW))
00047 #define GNC_IS_MAIN_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GNC_TYPE_MAIN_WINDOW))
00048 #define GNC_MAIN_WINDOW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GNC_TYPE_MAIN_WINDOW, GncMainWindowClass))
00049
00050 #define PLUGIN_PAGE_IMMUTABLE "page-immutable"
00051
00052
00053
00055 typedef struct GncMainWindow {
00056 GtkWindow gtk_window;
00057 GtkUIManager *ui_merge;
00059 } GncMainWindow;
00060
00062 typedef struct {
00063 GtkWindowClass gtk_window;
00066
00067 void (*page_added) (GncMainWindow *window,
00068 GncPluginPage *page);
00069 void (*page_changed) (GncMainWindow *window,
00070 GncPluginPage *page);
00071 } GncMainWindowClass;
00072
00073 typedef struct {
00074 GncMainWindow *window;
00075 gpointer data;
00076 } GncMainWindowActionData;
00077
00078 typedef void (*GncMainWindowFunc) (GncMainWindow *window, GncPluginPage *page);
00079 typedef void (*GncMainWindowPageFunc) (GncPluginPage *page, gpointer user_data);
00080
00081
00082
00087 GType gnc_main_window_get_type (void);
00088
00089
00094 GncMainWindow *gnc_main_window_new (void);
00095
00096
00102 void gnc_main_window_display_page (GncPluginPage *page);
00103
00104
00117 void gnc_main_window_open_page (GncMainWindow *window,
00118 GncPluginPage *page);
00119
00120
00128 void gnc_main_window_close_page (GncPluginPage *page);
00129
00130
00131
00132
00133
00134
00135
00136
00137
00138 void gnc_main_window_foreach_page (GncMainWindowPageFunc fn,
00139 gpointer user_data);
00140
00141
00156 GncPluginPage *gnc_main_window_get_current_page (GncMainWindow *window);
00157
00158
00159 void
00160 main_window_update_page_name (GncPluginPage *page,
00161 const gchar *name_in);
00162
00181 void gnc_main_window_manual_merge_actions (GncMainWindow *window,
00182 const gchar *group_name,
00183 GtkActionGroup *group,
00184 guint merge_id);
00185
00186
00211 void gnc_main_window_merge_actions (GncMainWindow *window,
00212 const gchar *group_name,
00213 GtkActionEntry *entries,
00214 guint n_entries,
00215 const gchar *filename,
00216 gpointer user_data);
00217
00218
00230 void gnc_main_window_unmerge_actions (GncMainWindow *window,
00231 const gchar *group_name);
00232
00233
00244 void gnc_main_window_actions_updated (GncMainWindow *window);
00245
00246
00260 GtkActionGroup *gnc_main_window_get_action_group (GncMainWindow *window,
00261 const gchar *group_name);
00262
00263
00270 void gnc_main_window_set_progressbar_window( GncMainWindow *window );
00271
00272
00290 gboolean gnc_main_window_button_press_cb (GtkWidget *whatever,
00291 GdkEventButton *event,
00292 GncPluginPage *page);
00293
00298 void gnc_main_window_restore_all_windows(const GKeyFile *keyfile);
00299
00304 void gnc_main_window_save_all_windows(GKeyFile *keyfile);
00305
00308 void gnc_main_window_restore_default_state(void);
00309
00328 void
00329 gnc_gtk_action_group_set_translation_domain (GtkActionGroup *action_group,
00330 const gchar *domain);
00331
00332
00342 gboolean gnc_main_window_finish_pending (GncMainWindow *window);
00343
00344
00355 gboolean gnc_main_window_all_finish_pending (void);
00356
00365 void gnc_main_window_all_action_set_sensitive (const gchar *action_name, gboolean sensitive);
00366
00370 void gnc_main_window_show_all_windows(void);
00371
00372 #endif
00373