GETENV: check for proper UTF-8.
[gnumeric.git] / src / wbc-gtk.h
blob0c3d4603509e2e57a51ac4a657b7077b5de7f9a0
1 /* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
2 #ifndef _GNM_WBC_GTK_H_
3 # define _GNM_WBC_GTK_H_
5 #include "gnumeric.h"
6 #include "gnumeric-fwd.h"
7 #include "workbook-control.h"
8 #include "widgets/gnumeric-expr-entry.h"
10 #include <gtk/gtk.h>
12 G_BEGIN_DECLS
14 #define GNM_WBC_GTK_TYPE (wbc_gtk_get_type ())
15 #define WBC_GTK(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GNM_WBC_GTK_TYPE, WBCGtk))
16 #define GNM_IS_WBC_GTK(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GNM_WBC_GTK_TYPE))
18 GType wbc_gtk_get_type (void);
19 WBCGtk *wbc_gtk_new (WorkbookView *optional_view,
20 Workbook *optional_wb,
21 GdkScreen *optional_screen,
22 gchar *optional_geometry);
24 GtkWindow *wbcg_toplevel (WBCGtk *wbcg);
25 void wbcg_set_transient (WBCGtk *wbcg,
26 GtkWindow *window);
27 SheetControlGUI *wbcg_get_nth_scg (WBCGtk *wbcg, int i);
28 SheetControlGUI *wbcg_cur_scg (WBCGtk *wbcg);
29 Sheet *wbcg_cur_sheet (WBCGtk *wbcg);
30 Sheet *wbcg_focus_cur_scg (WBCGtk *wbcg);
31 int wbcg_get_n_scg (WBCGtk const *wbcg);
33 gboolean wbcg_rangesel_possible (WBCGtk const *wbcg);
34 gboolean wbcg_is_editing (WBCGtk const *wbcg);
35 void wbcg_set_status_text (WBCGtk *wbcg,
36 char const *text);
37 void wbcg_toggle_visibility (WBCGtk *wbcg,
38 GtkToggleAction *action);
39 void wbcg_copy_toolbar_visibility (WBCGtk *new_wbcg,
40 WBCGtk *wbcg);
42 void wbcg_set_end_mode (WBCGtk *wbcg, gboolean flag);
44 PangoFontDescription *wbcg_get_font_desc (WBCGtk *wbcg);
46 WBCGtk *wbcg_find_for_workbook (Workbook *wb,
47 WBCGtk *candidate,
48 GdkScreen *pref_screen,
49 GdkDisplay *pref_display);
51 typedef enum {
52 WBC_EDIT_REJECT = 0,
53 WBC_EDIT_ACCEPT, /* assign content to current edit pos */
54 WBC_EDIT_ACCEPT_WO_AC, /* assign content to current edit pos not */
55 /* autocorrecting*/
56 WBC_EDIT_ACCEPT_RANGE, /* assign content to first range in selection */
57 WBC_EDIT_ACCEPT_ARRAY /* assign content as an array to the first range in selection */
58 } WBCEditResult;
60 gboolean wbcg_edit_finish (WBCGtk *wbcg, WBCEditResult result,
61 gboolean *showed_dialog);
62 gboolean wbcg_edit_start (WBCGtk *wbcg,
63 gboolean blankp, gboolean cursorp);
65 void wbcg_insert_object (WBCGtk *wbcg, SheetObject *so);
66 void wbcg_insert_object_clear (WBCGtk *wbcg);
68 void wbc_gtk_detach_guru (WBCGtk *wbcg);
69 void wbc_gtk_attach_guru (WBCGtk *wbcg, GtkWidget *guru);
70 void wbc_gtk_attach_guru_with_unfocused_rs (WBCGtk *wbcg, GtkWidget *guru,
71 GnmExprEntry *gee);
72 GtkWidget *wbc_gtk_get_guru (WBCGtk const *wbcg);
74 void wbcg_auto_complete_destroy (WBCGtk *wbcg);
75 char const *wbcg_edit_get_display_text (WBCGtk *wbcg);
76 void wbcg_edit_add_markup (WBCGtk *wbcg, PangoAttribute *attr);
77 PangoAttrList *wbcg_edit_get_markup (WBCGtk *wbcg, gboolean full);
79 GtkEntry *wbcg_get_entry (WBCGtk const *wbcg);
80 GnmExprEntry *wbcg_get_entry_logical (WBCGtk const *wbcg);
81 GtkWidget *wbcg_get_entry_underlying (WBCGtk const *wbcg);
82 void wbcg_set_entry (WBCGtk *wbc,
83 GnmExprEntry *new_entry);
84 gboolean wbcg_entry_has_logical (WBCGtk const *wbcg);
86 void wbcg_focus_current_cell_indicator (WBCGtk const *wbcg);
88 G_END_DECLS
90 #endif /* _GNM_WBC_GTK_H_ */