workbook-control.h 2.68 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11
#ifndef GNUMERIC_WORKBOOK_CONTROL_H
#define GNUMERIC_WORKBOOK_CONTROL_H

#include "gnumeric.h"
#include <gtk/gtkobject.h>

#define WORKBOOK_CONTROL_TYPE     (workbook_control_get_type ())
#define WORKBOOK_CONTROL(obj)     (GTK_CHECK_CAST ((obj), WORKBOOK_CONTROL_TYPE, WorkbookControl))
#define IS_WORKBOOK_CONTROL(o)	  (GTK_CHECK_TYPE ((o), WORKBOOK_CONTROL_TYPE))

GtkType workbook_control_get_type    (void);
Jody Goldberg's avatar
Jody Goldberg committed
12
void 	workbook_control_set_view    (WorkbookControl *wbc,
Jody Goldberg's avatar
Jody Goldberg committed
13 14 15 16 17 18 19
				      WorkbookView *optional_view,
				      Workbook *optional_wb);
void    workbook_control_sheets_init (WorkbookControl *wbc);

/* Create a new control of the same form */
WorkbookControl *wb_control_wrapper_new (WorkbookControl *wbc,
					 WorkbookView *wbv, Workbook *wb);
20 21 22

void wb_control_title_set	     (WorkbookControl *wbc, char const *title);
void wb_control_prefs_update	     (WorkbookControl *wbc);
Jody Goldberg's avatar
Jody Goldberg committed
23
void wb_control_format_feedback	     (WorkbookControl *wbc);
24 25
void wb_control_zoom_feedback	     (WorkbookControl *wbc);
void wb_control_edit_line_set        (WorkbookControl *wbc, char const *text);
Jody Goldberg's avatar
Jody Goldberg committed
26
void wb_control_selection_descr_set  (WorkbookControl *wbc, char const *text);
Jody Goldberg's avatar
Jody Goldberg committed
27
void wb_control_auto_expr_value	     (WorkbookControl *wbc);
Jody Goldberg's avatar
Jody Goldberg committed
28

Jody Goldberg's avatar
Jody Goldberg committed
29 30
void wb_control_sheet_add	     (WorkbookControl *wbc, Sheet *sheet);
void wb_control_sheet_remove	     (WorkbookControl *wbc, Sheet *sheet);
Jody Goldberg's avatar
Jody Goldberg committed
31 32
void wb_control_sheet_rename	     (WorkbookControl *wbc, Sheet *sheet);
void wb_control_sheet_focus	     (WorkbookControl *wbc, Sheet *sheet);
Jody Goldberg's avatar
Jody Goldberg committed
33 34
void wb_control_sheet_move	     (WorkbookControl *wbc, Sheet *sheet,
				      int new_pos);
Jody Goldberg's avatar
Jody Goldberg committed
35
void wb_control_sheet_remove_all     (WorkbookControl *wbc);
36 37

void wb_control_undo_redo_clear	     (WorkbookControl *wbc, gboolean is_undo);
38
void wb_control_undo_redo_truncate   (WorkbookControl *wbc, int n, gboolean is_undo);
39 40 41 42 43 44
void wb_control_undo_redo_pop	     (WorkbookControl *wbc, gboolean is_undo);
void wb_control_undo_redo_push	     (WorkbookControl *wbc,
				      char const *text, gboolean is_undo);
void wb_control_undo_redo_labels     (WorkbookControl *wbc,
				      char const *undo, char const *redo);

45 46
void wb_control_insert_cols_rows_enable (WorkbookControl *wbc, Sheet *sheet);
void wb_control_paste_special_enable (WorkbookControl *wbc, Sheet *sheet);
Almer S. Tigelaar's avatar
Almer S. Tigelaar committed
47

48 49
void wb_control_paste_from_selection (WorkbookControl *wbc,
				      PasteTarget const *pt, guint32 time);
50
gboolean wb_control_claim_selection  (WorkbookControl *wbc);
Jody Goldberg's avatar
Jody Goldberg committed
51 52

WorkbookView *wb_control_view		(WorkbookControl *wbc);
53 54 55
Workbook     *wb_control_workbook	(WorkbookControl *wbc);
Sheet        *wb_control_cur_sheet	(WorkbookControl *wbc);

Jody Goldberg's avatar
Jody Goldberg committed
56
gboolean      workbook_parse_and_jump   (WorkbookControl *wbc, const char *text);
57 58

#endif /* GNUMERIC_WORKBOOK_CONTROL_H */