1 #ifndef _GNM_WBC_GTK_IMPL_H_
2 # define _GNM_WBC_GTK_IMPL_H_
6 #include <workbook-control-priv.h>
8 #include <widgets/gnm-expr-entry.h>
9 #include <widgets/gnm-notebook.h>
11 #include <goffice/goffice.h>
22 /* The area that contains the sheet and the sheet tabs. */
23 GtkWidget
*notebook_area
;
25 /* The notebook that contains the sheets. */
26 GtkNotebook
*snotebook
;
28 /* The notebook that contains the sheet tabs. */
29 GnmNotebook
*bnotebook
;
31 /* The GtkPaned that contains the sheet tabs and the status area. */
34 GtkWidget
*progress_bar
;
37 GnmExprEntry
*entry
; /* The real edit line */
38 GnmExprEntry
*temp_entry
; /* A tmp overlay eg from a guru */
40 gulong signal_changed
, signal_insert
, signal_delete
;
41 gulong signal_cursor_pos
, signal_selection_bound
;
42 PangoAttrList
*cell_attrs
; /* Attrs from cell format. */
43 PangoAttrList
*markup
; /* just the markup */
44 PangoAttrList
*full_content
; /* cell_attrs+markup */
45 PangoAttrList
*cur_fmt
; /* attrs for new text (depends on position) */
48 /* While editing these should be visible */
49 GtkWidget
*ok_button
, *cancel_button
;
51 /* While not editing these should be visible */
52 GtkWidget
*func_button
;
55 gboolean inside_editing
;
58 GnmComplete
*auto_complete
;
59 gboolean auto_completing
;
60 char *auto_complete_text
;
62 /* Used to detect if the user has backspaced, so we turn off auto-complete */
65 /* Keep track of whether the last key pressed was END, so end-mode works */
66 gboolean last_key_was_end
;
68 SheetControlGUI
*rangesel
;
71 GtkWidget
*auto_expr_label
;
72 GtkWidget
*status_text
;
74 /* Widgets whose visibility should be copied. */
75 GHashTable
*visibility_widgets
;
77 gboolean is_fullscreen
;
78 GOUndo
*undo_for_fullscreen
;
79 GSList
*hide_for_fullscreen
;
82 GtkWidget
*selection_descriptor
; /* A GtkEntry */
85 gboolean autosave_prompt
;
89 PangoFontDescription
*font_desc
;
91 SheetControlGUI
*active_scg
;
92 gulong sig_view_changed
;
93 gulong sig_auto_expr_text
, sig_auto_expr_attrs
;
94 gulong sig_show_horizontal_scrollbar
, sig_show_vertical_scrollbar
;
95 gulong sig_show_notebook_tabs
;
96 gulong sig_sheet_order
, sig_notify_uri
, sig_notify_dirty
;
99 /**********************************************/
100 GtkWidget
*status_area
;
102 GtkActionGroup
*permanent_actions
, *actions
, *font_actions
,
103 *data_only_actions
, *semi_permanent_actions
;
105 GtkActionGroup
*actions
;
107 } file_history
, toolbar
, windows
, templates
;
109 guint template_loader_handler
;
111 GOActionComboStack
*undo_haction
, *redo_haction
;
112 GtkAction
*undo_vaction
, *redo_vaction
;
113 GOActionComboColor
*fore_color
, *back_color
;
114 GtkAction
*font_name_haction
, *font_name_vaction
;
115 GOActionComboText
*zoom_haction
;
116 GtkAction
*zoom_vaction
;
117 GOActionComboPixmaps
*borders
, *halignment
, *valignment
;
119 GtkToggleAction
*bold
, *italic
, *underline
, *d_underline
,
120 *sl_underline
, *dl_underline
;
121 GtkToggleAction
*superscript
, *subscript
, *strikethrough
;
124 GtkToggleAction
*left
, *center
, *right
, *center_across_selection
;
127 GtkToggleAction
*top
, *center
, *bottom
;
130 GtkWidget
*menu_zone
, *toolbar_zones
[4];
131 GHashTable
*custom_uis
;
133 guint idle_update_style_feedback
;
135 /* When editing a cell: the cell (may be NULL) */
136 GnmCell
*editing_cell
;
137 Sheet
*editing_sheet
;
140 SheetObject
*new_object
; /* A newly created object that has yet to be realized */
142 char *preferred_geometry
;
146 WorkbookControlClass base
;
149 void (*markup_changed
) (WBCGtk
const *wbcg
);
152 #define GNM_RESPONSE_SAVE_ALL -1000
153 #define GNM_RESPONSE_DISCARD_ALL -1001
155 /* Protected functions */
156 gboolean
wbc_gtk_close (WBCGtk
*wbcg
);
157 void wbcg_insert_sheet (GtkWidget
*ignored
, WBCGtk
*wbcg
);
158 void wbcg_append_sheet (GtkWidget
*ignored
, WBCGtk
*wbcg
);
159 void wbcg_clone_sheet (GtkWidget
*ignored
, WBCGtk
*wbcg
);
161 void wbc_gtk_init_editline (WBCGtk
*wbcg
);
162 void wbc_gtk_init_actions (WBCGtk
*wbcg
);
163 void wbc_gtk_markup_changer (WBCGtk
*wbcg
);
165 void wbcg_font_action_set_font_desc (GtkAction
*act
, PangoFontDescription
*desc
);
167 gboolean
wbc_gtk_load_templates (WBCGtk
*gtk
);
169 GtkAction
*wbcg_find_action (WBCGtk
*wbcg
, const char *name
);
171 G_MODULE_EXPORT
void set_uifilename (char const *name
, GtkActionEntry
const *actions
, int nb
);
175 #endif /* _GNM_WBC_GTK_IMPL_H_ */