1 /*
2  * xed-window-private.h
3  * This file is part of xed
4  *
5  * Copyright (C) 2005 - Paolo Maggi
6  *
7  * This program is free software; you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation; either version 2 of the License, or
10  * (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANWINDOWILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program; if not, write to the Free Software
19  * Foundation, Inc., 51 Franklin St, Fifth Floor,
20  * Boston, MA 02110-1301, USA.
21  */
22 
23 /*
24  * Modified by the xed Team, 2005. See the AUTHORS file for a
25  * list of people on the xed Team.
26  * See the ChangeLog files for a list of changes.
27  *
28  * $Id$
29  */
30 
31 #ifndef __XED_WINDOW_PRIVATE_H__
32 #define __XED_WINDOW_PRIVATE_H__
33 
34 #include <libpeas/peas-extension-set.h>
35 #include <libxapp/xapp-favorites.h>
36 
37 #include "xed/xed-window.h"
38 #include "xed-message-bus.h"
39 #include "xed-settings.h"
40 
41 G_BEGIN_DECLS
42 
43 /* WindowPrivate is in a separate .h so that we can access it from xed-commands */
44 
45 struct _XedWindowPrivate
46 {
47     GSettings *editor_settings;
48     GSettings *ui_settings;
49     GSettings *window_settings;
50 
51     GtkWidget *notebook;
52 
53     GtkWidget *side_panel;
54     GtkWidget *bottom_panel;
55 
56     GtkWidget *hpaned;
57     GtkWidget *vpaned;
58 
59     GtkWidget *tab_width_button;
60     GtkWidget *tab_width_menu;
61     GtkWidget *tab_width_item;
62     GtkWidget *language_button;
63     GtkWidget *language_popover;
64     GtkWidget *show_side_pane_button;
65     GtkWidget *show_bottom_pane_button;
66     GtkWidget *bottom_pane_button_revealer;
67 
68     XedMessageBus    *message_bus;
69     PeasExtensionSet *extensions;
70 
71     /* Widgets for fullscreen mode */
72     GtkWidget *fullscreen_controls;
73     GtkWidget *fullscreen_overlay;
74     GtkWidget *fullscreen_eventbox;
75     GtkWidget *fullscreen_revealer;
76 
77     /* statusbar and context ids for statusbar messages */
78     GtkWidget *statusbar;
79     GtkWidget *searchbar;
80     guint      generic_message_cid;
81     guint      tip_message_cid;
82     guint      tab_width_id;
83     guint      spaces_instead_of_tabs_id;
84     guint      language_changed_id;
85     guint      use_word_wrap_id;
86     guint      show_overview_map_id;
87 
88     /* Menus & Toolbars */
89     GtkUIManager   *manager;
90     GtkActionGroup *action_group;
91     GtkActionGroup *always_sensitive_action_group;
92     GtkActionGroup *close_action_group;
93     GtkActionGroup *quit_action_group;
94     GtkActionGroup *panes_action_group;
95     GtkActionGroup *documents_list_action_group;
96     guint           documents_list_menu_ui_id;
97     GtkWidget      *toolbar;
98     GtkWidget      *menubar;
99 
100     /* recent files */
101     GtkActionGroup *recents_action_group;
102     guint           recents_menu_ui_id;
103     gulong          recents_handler_id;
104 
105     GtkActionGroup *favorites_action_group;
106     guint           favorites_menu_ui_id;
107     gulong          favorites_handler_id;
108 
109     XedTab *active_tab;
110     gint    num_tabs;
111 
112     gint num_tabs_with_error;
113 
114     gint            width;
115     gint            height;
116     GdkWindowState  window_state;
117 
118     guint inhibition_cookie;
119 
120     gint side_panel_size;
121     gint bottom_panel_size;
122 
123     XedWindowState state;
124 
125     gint bottom_panel_item_removed_handler_id;
126 
127     GtkWindowGroup *window_group;
128 
129     GFile *default_location;
130 
131     gboolean removing_tabs : 1;
132     gboolean dispose_has_run : 1;
133 };
134 
135 G_END_DECLS
136 
137 #endif  /* __XED_WINDOW_PRIVATE_H__  */
138