Compilation: fix warning.
[gnumeric.git] / src / sheet-style.h
blob8d88671993a30c49294a763cfbb6481ff5a8ea79
1 /* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
2 #ifndef _GNM_SHEET_STYLE_H_
3 # define _GNM_SHEET_STYLE_H_
5 #include "gnumeric.h"
7 G_BEGIN_DECLS
9 struct _GnmStyleRegion {
10 GnmRange range; /* must be 1st */
11 GnmStyle *style;
14 struct _GnmStyleRow {
15 gboolean hide_grid;
16 int row, start_col, end_col;
17 Sheet const *sheet;
18 GnmStyle const **styles;
19 GnmBorder const **top;
20 GnmBorder const **bottom;
21 GnmBorder const **vertical;
24 GnmStyle *sheet_style_default (Sheet const *sheet);
25 GnmStyle const *sheet_style_get (Sheet const *sheet, int col, int row);
26 GnmStyle *sheet_style_find (Sheet const *sheet, GnmStyle *st);
27 void sheet_style_get_row (Sheet const *sheet, GnmStyleRow *sr);
28 GnmStyle **sheet_style_get_row2 (Sheet const *sheet, int row);
29 void sheet_style_apply_border (Sheet *sheet, GnmRange const *range,
30 GnmBorder **borders);
31 void sheet_style_apply_range (Sheet *sheet, GnmRange const *range,
32 GnmStyle *pstyle);
33 void sheet_style_set_range (Sheet *sheet, GnmRange const *range,
34 GnmStyle *style);
35 void sheet_style_apply_col (Sheet *sheet, int col,
36 GnmStyle *style);
37 void sheet_style_apply_row (Sheet *sheet, int row,
38 GnmStyle *style);
39 void sheet_style_set_pos (Sheet *sheet, int col, int row,
40 GnmStyle *style);
41 void sheet_style_apply_pos (Sheet *sheet, int col, int row,
42 GnmStyle *style);
44 void sheet_style_insdel_colrow (GnmExprRelocateInfo const *rinfo);
45 void sheet_style_relocate (GnmExprRelocateInfo const *rinfo);
46 unsigned int sheet_style_find_conflicts (Sheet const *sheet, GnmRange const *r,
47 GnmStyle **style, GnmBorder **borders);
48 void sheet_style_get_extent (Sheet const *sheet, GnmRange *r);
49 void sheet_style_get_nondefault_extent (Sheet const *sheet, GnmRange *extent,
50 const GnmRange *src, GnmStyle **col_defaults);
51 guint8 * sheet_style_get_nondefault_rows (Sheet const *sheet,
52 GnmStyle **col_defaults);
54 gboolean sheet_style_is_default (Sheet const *sheet, const GnmRange *r, GnmStyle **col_defaults);
55 void style_row_init (GnmBorder const * * *prev_vert,
56 GnmStyleRow *sr, GnmStyleRow *next_sr,
57 int start_col, int end_col,
58 gpointer mem, gboolean hide_grid);
59 GnmHLink *sheet_style_region_contains_link (Sheet const *sheet, GnmRange const *r);
60 void sheet_style_foreach (Sheet const *sheet,
61 GFunc func,
62 gpointer user_data);
63 void sheet_style_range_foreach (Sheet const *sheet, GnmRange const *r,
64 GHFunc func,
65 gpointer user_data);
67 GnmStyle **sheet_style_most_common (Sheet const *sheet, gboolean is_col);
69 void sheet_style_init (Sheet *sheet);
70 void sheet_style_resize (Sheet *sheet, int cols, int rows);
71 void sheet_style_shutdown (Sheet *sheet);
73 void sheet_style_set_auto_pattern_color (Sheet *sheet,
74 GnmColor *grid_color);
75 GnmColor *sheet_style_get_auto_pattern_color (Sheet const *sheet);
76 void sheet_style_update_grid_color (Sheet const *sheet);
78 GnmStyle const *style_list_get_style (GnmStyleList const *l, int col, int row);
79 void style_list_free (GnmStyleList *l);
80 GnmStyleList *sheet_style_get_range (Sheet const *sheet, GnmRange const *r);
82 typedef gboolean (*sheet_style_set_list_cb_t) (GnmRange *range,
83 Sheet const *sheet,
84 gpointer data);
85 GnmSpanCalcFlags sheet_style_set_list (Sheet *sheet,
86 GnmCellPos const *corner,
87 GnmStyleList const *l,
88 sheet_style_set_list_cb_t range_modify,
89 gpointer data);
91 GnmStyleList *sheet_style_collect_conditions (Sheet const *sheet,
92 GnmRange const *r);
93 GnmStyleList *sheet_style_collect_hlinks (Sheet const *sheet,
94 GnmRange const *r);
95 GnmStyleList *sheet_style_collect_validations (Sheet const *sheet,
96 GnmRange const *r);
98 GType gnm_style_region_get_type (void); /* boxed type */
99 GnmStyleRegion *gnm_style_region_new (GnmRange const *range, GnmStyle *style);
100 void gnm_style_region_free (GnmStyleRegion *sr);
103 /* For internal use only */
104 void sheet_style_unlink (Sheet *sheet, GnmStyle *st);
106 void sheet_style_optimize (Sheet *sheet);
108 void sheet_style_clear_style_dependents (Sheet *sheet, GnmRange const *r);
110 G_END_DECLS
112 #endif /* _GNM_SHEET_STYLE_H_ */