sheet-control.h 1.76 KB
Newer Older
1 2 3
/* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
#ifndef _GNM_SHEET_CONTROL_H_
# define _GNM_SHEET_CONTROL_H_
4 5

#include "gnumeric.h"
Jody Goldberg's avatar
Jody Goldberg committed
6
#include <glib-object.h>
7

8 9
G_BEGIN_DECLS

10
#define SHEET_CONTROL_TYPE	(sheet_control_get_type ())
Jody Goldberg's avatar
Jody Goldberg committed
11 12
#define SHEET_CONTROL(obj)	(G_TYPE_CHECK_INSTANCE_CAST ((obj), SHEET_CONTROL_TYPE, SheetControl))
#define IS_SHEET_CONTROL(o)	(G_TYPE_CHECK_INSTANCE_TYPE ((o), SHEET_CONTROL_TYPE))
13

14
/* Lifecycle */
Jody Goldberg's avatar
Jody Goldberg committed
15
GType sheet_control_get_type	(void);
16
SheetView	*sc_view	(SheetControl const *sc);
17
Sheet		*sc_sheet	(SheetControl const *sc);
18
WorkbookControl *sc_wbc		(SheetControl const *sc);
19 20 21 22 23 24 25

/**
 * NOTE:
 * The GUI layer accesses the SheetControlGUI methods directly without
 * calling the virtual. Change this if the base class becomes something
 * more than a passthrough.
 */
26
void sc_resize			(SheetControl *sc, gboolean force_scroll);
27
void sc_redraw_all		(SheetControl *sc, gboolean headers);
Jody Goldberg's avatar
Jody Goldberg committed
28
void sc_redraw_range		(SheetControl *sc, GnmRange const *r);
29 30
void sc_redraw_headers		(SheetControl *sc,
				 gboolean const col, gboolean const row,
Jody Goldberg's avatar
Jody Goldberg committed
31
				 GnmRange const * r /* optional == NULL */);
32 33 34 35
void sc_ant			(SheetControl *sc);
void sc_unant			(SheetControl *sc);

void sc_scrollbar_config	(SheetControl const *sc);
36 37 38

void sc_mode_edit		(SheetControl *sc);

Jody Goldberg's avatar
Jody Goldberg committed
39
void sc_set_top_left		(SheetControl *sc, int col, int row);
40
void sc_recompute_visible_region(SheetControl *sc, gboolean full_recompute);
Jody Goldberg's avatar
Jody Goldberg committed
41
void sc_make_cell_visible	(SheetControl *sc, int col, int row,
42
				 gboolean couple_panes);
43

Jody Goldberg's avatar
Jody Goldberg committed
44
void sc_cursor_bound		(SheetControl *sc, GnmRange const *r);
45
void sc_set_panes		(SheetControl *sc);
46
void sc_object_create_view	(SheetControl *sc, SheetObject *so);
47
void sc_scale_changed		(SheetControl *sc);
48

49 50 51
G_END_DECLS

#endif /* _GNM_SHEET_CONTROL_H_ */