1 #ifndef _GNM_WORKBOOK_CONTROL_PRIV_H_
2 # define _GNM_WORKBOOK_CONTROL_PRIV_H_
4 #include <workbook-control.h>
5 #include <goffice/goffice.h>
9 struct _WorkbookControl
{
12 WorkbookView
*wb_view
;
14 gulong clipboard_changed_signal
;
17 GODocControlClass base
;
19 /* Create a new control of the same form */
20 WorkbookControl
*(*control_new
) (WorkbookControl
*wbc
, WorkbookView
*wbv
, Workbook
*wb
,
22 void (*init_state
) (WorkbookControl
*wbc
);
24 /* Actions on the workbook UI */
25 void (*style_feedback
) (WorkbookControl
*wbc
, GnmStyle
const *changes
);
26 void (*edit_line_set
) (WorkbookControl
*wbc
, char const *text
);
27 void (*edit_finish
) (WorkbookControl
*wbc
, gboolean accept
);
28 void (*selection_descr_set
) (WorkbookControl
*wbc
, char const *text
);
29 void (*update_action_sensitivity
) (WorkbookControl
*wbc
);
30 struct _WbcSheetManager
{
31 void (*add
) (WorkbookControl
*wbc
, SheetView
*sv
);
32 void (*remove
) (WorkbookControl
*wbc
, Sheet
*sheet
);
33 void (*focus
) (WorkbookControl
*wbc
, Sheet
*sheet
);
34 void (*remove_all
) (WorkbookControl
*wbc
);
37 void (*truncate
)(WorkbookControl
*wbc
, int n
, gboolean is_undo
);
38 void (*pop
) (WorkbookControl
*wbc
, gboolean is_undo
);
39 void (*push
) (WorkbookControl
*wbc
, gboolean is_undo
,
40 char const *text
, gpointer key
);
41 void (*labels
) (WorkbookControl
*wbc
,
42 char const *undo
, char const *redo
);
44 struct _WbcMenuState
{
45 void (*update
) (WorkbookControl
*wbc
, int flags
);
48 gboolean (*claim_selection
) (WorkbookControl
*wbc
);
49 void (*paste_from_selection
) (WorkbookControl
*wbc
,
50 GnmPasteTarget
const *pt
);
51 int (*validation_msg
) (WorkbookControl
*wbc
, ValidationStyle v
,
52 char const *title
, char const *msg
);
53 } WorkbookControlClass
;
55 #define GNM_WBC_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), GNM_WBC_TYPE, WorkbookControlClass))
59 #endif /* _GNM_WORKBOOK_CONTROL_PRIV_H_ */