1 /* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
2 #ifndef _GNM_WORKBOOK_CONTROL_PRIV_H_
3 # define _GNM_WORKBOOK_CONTROL_PRIV_H_
5 #include "workbook-control.h"
6 #include <goffice/goffice.h>
10 struct _WorkbookControl
{
13 WorkbookView
*wb_view
;
15 gulong clipboard_changed_signal
;
18 GODocControlClass base
;
20 /* Create a new control of the same form */
21 WorkbookControl
*(*control_new
) (WorkbookControl
*wbc
, WorkbookView
*wbv
, Workbook
*wb
,
23 void (*init_state
) (WorkbookControl
*wbc
);
25 /* Actions on the workbook UI */
26 void (*style_feedback
) (WorkbookControl
*wbc
, GnmStyle
const *changes
);
27 void (*edit_line_set
) (WorkbookControl
*wbc
, char const *text
);
28 void (*edit_finish
) (WorkbookControl
*wbc
, gboolean accept
);
29 void (*selection_descr_set
) (WorkbookControl
*wbc
, char const *text
);
30 void (*update_action_sensitivity
) (WorkbookControl
*wbc
);
31 struct _WbcSheetManager
{
32 void (*add
) (WorkbookControl
*wbc
, SheetView
*sv
);
33 void (*remove
) (WorkbookControl
*wbc
, Sheet
*sheet
);
34 void (*focus
) (WorkbookControl
*wbc
, Sheet
*sheet
);
35 void (*remove_all
) (WorkbookControl
*wbc
);
38 void (*truncate
)(WorkbookControl
*wbc
, int n
, gboolean is_undo
);
39 void (*pop
) (WorkbookControl
*wbc
, gboolean is_undo
);
40 void (*push
) (WorkbookControl
*wbc
, gboolean is_undo
,
41 char const *text
, gpointer key
);
42 void (*labels
) (WorkbookControl
*wbc
,
43 char const *undo
, char const *redo
);
45 struct _WbcMenuState
{
46 void (*update
) (WorkbookControl
*wbc
, int flags
);
49 gboolean (*claim_selection
) (WorkbookControl
*wbc
);
50 void (*paste_from_selection
) (WorkbookControl
*wbc
,
51 GnmPasteTarget
const *pt
);
52 int (*validation_msg
) (WorkbookControl
*wbc
, ValidationStyle v
,
53 char const *title
, char const *msg
);
54 } WorkbookControlClass
;
56 #define GNM_WBC_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), GNM_WBC_TYPE, WorkbookControlClass))
60 #endif /* _GNM_WORKBOOK_CONTROL_PRIV_H_ */