Move plugin init code
[gnumeric.git] / src / undo.h
blob1e59b53cb49bcd6f35512fcf8ee7a943e9ebc53b
1 #ifndef _GNM_UNDO_H_
2 #define _GNM_UNDO_H_
4 #include <gnumeric.h>
5 #include <sheet.h>
6 #include <colrow.h>
7 #include <sheet-filter.h>
8 #include <goffice/goffice.h>
9 #include <glib-object.h>
11 G_BEGIN_DECLS
13 /* ------------------------------------------------------------------------- */
15 #define GNM_TYPE_UNDO_COLROW_RESTORE_STATE_GROUP (gnm_undo_colrow_restore_state_group_get_type ())
16 #define GNM_UNDO_COLROW_RESTORE_STATE_GROUP(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GNM_TYPE_UNDO_COLROW_RESTORE_STATE_GROUP, GnmUndoColrowRestoreStateGroup))
17 #define GNM_IS_UNDO_COLROW_RESTORE_STATE_GROUP(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GNM_TYPE_UNDO_COLROW_RESTORE_STATE_GROUP))
19 GType gnm_undo_colrow_restore_state_group_get_type (void);
21 typedef struct _GnmUndoColrowRestoreStateGroup GnmUndoColrowRestoreStateGroup;
22 typedef struct _GnmUndoColrowRestoreStateGroupClass GnmUndoColrowRestoreStateGroupClass;
24 struct _GnmUndoColrowRestoreStateGroup {
25 GOUndo base;
26 Sheet *sheet;
27 gboolean is_cols;
28 ColRowIndexList *selection;
29 ColRowStateGroup *saved_state;
32 struct _GnmUndoColrowRestoreStateGroupClass {
33 GOUndoClass base;
36 GOUndo *gnm_undo_colrow_restore_state_group_new (Sheet *sheet, gboolean is_cols,
37 ColRowIndexList *selection,
38 ColRowStateGroup *saved_state);
40 /* ------------------------------------------------------------------------- */
42 #define GNM_TYPE_UNDO_COLROW_SET_SIZES (gnm_undo_colrow_set_sizes_get_type ())
43 #define GNM_UNDO_COLROW_SET_SIZES(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GNM_TYPE_UNDO_COLROW_SET_SIZES, GnmUndoColrowSetSizes))
44 #define GNM_IS_UNDO_COLROW_SET_SIZES(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GNM_TYPE_UNDO_COLROW_SET_SIZES))
46 GType gnm_undo_colrow_set_sizes_get_type (void);
48 typedef struct _GnmUndoColrowSetSizes GnmUndoColrowSetSizes;
49 typedef struct _GnmUndoColrowSetSizesClass GnmUndoColrowSetSizesClass;
51 struct _GnmUndoColrowSetSizes {
52 GOUndo base;
53 Sheet *sheet;
54 gboolean is_cols;
55 ColRowIndexList *selection;
56 int new_size, from, to;
59 struct _GnmUndoColrowSetSizesClass {
60 GOUndoClass base;
63 GOUndo *gnm_undo_colrow_set_sizes_new (Sheet *sheet, gboolean is_cols,
64 ColRowIndexList *selection,
65 int new_size, GnmRange const *r);
67 /* ------------------------------------------------------------------------- */
69 #define GNM_TYPE_UNDO_FILTER_SET_CONDITION (gnm_undo_filter_set_condition_get_type ())
70 #define GNM_UNDO_FILTER_SET_CONDITION(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GNM_TYPE_UNDO_FILTER_SET_CONDITION, GnmUndoFilterSetCondition))
71 #define GNM_IS_UNDO_FILTER_SET_CONDITION(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GNM_TYPE_UNDO_FILTER_SET_CONDITION))
73 GType gnm_undo_filter_set_condition_get_type (void);
75 typedef struct _GnmUndoFilterSetCondition GnmUndoFilterSetCondition;
76 typedef struct _GnmUndoFilterSetConditionClass GnmUndoFilterSetConditionClass;
78 struct _GnmUndoFilterSetCondition {
79 GOUndo base;
80 GnmFilter *filter;
81 unsigned i;
82 GnmFilterCondition *cond;
85 struct _GnmUndoFilterSetConditionClass {
86 GOUndoClass base;
89 GOUndo *gnm_undo_filter_set_condition_new (GnmFilter *filter, unsigned i,
90 GnmFilterCondition *cond,
91 gboolean retrieve_from_filter);
93 /* ------------------------------------------------------------------------- */
96 G_END_DECLS
98 #endif /* _GNM_UNDO_H_ */