1 #ifndef _GNM_FORMAT_TEMPLATE_H_
2 # define _GNM_FORMAT_TEMPLATE_H_
9 * FORMAT TEMPLATE RULES
12 * Almer S. Tigelaar <almer1@dds.nl>
13 * Jody Goldberg <jody@gnome.org>
15 * ----------------------------------------------------------------------------
18 * 1. These can only be positive and indicate the number of
19 * columns from the side (see gravity)
21 * 1. This is the side to count offset from,
22 * gravity (for rows : +1=top, -1=bottom; for cols : +1=left, -1=right).
26 * 1. The number of cols/rows from the offset, if this is <=0 than this is
27 * relative to the 'far side' otherwise it is relative to the offset.
31 * 1. The direction to repeat in, this can be either horizontal
34 * 1. When repeat >= 0, we will repeat
35 * repeat times, if it is something else (preferably -1) we
36 * simply repeat _indefinitely_ in vertical or horizontal directions.
38 * 1. When skip is 0 or smaller than 0 we don't skip
39 * any rows or cols in between applications.
41 * 1. Can be 0 or greater. Specifies the number of rows to at least
42 * not but a repetetive style calculated from the far side.
46 int offset
; /* Offset (top/left) */
47 int offset_gravity
; /* Gravity +1 means relative to top/left, -1 relative to bottom/right */
48 int size
; /* Dimensions (These form the bottom right coordinates) */
51 /* WARNING : do not change these or persistence will break */
54 FREQ_DIRECTION_HORIZONTAL
,
55 FREQ_DIRECTION_VERTICAL
58 /* A collection of categories of the same name from different paths */
62 /* translatable via gettext in the std message domain */
71 /* translatable via gettext in the std message domain */
77 GnmFTCategory
*category
;
78 GSList
*members
; /* the actual TemplateMembers */
81 /* translatable via gettext in the std message domain */
100 /* pre-calculate styles */
102 gboolean invalidate_hash
;
108 GnmFTColRowInfo row
; /* Row info */
109 GnmFTColRowInfo col
; /* Col info */
111 /* Frequency (How many times to repeat) and in which
112 * direction and when to stop.
114 GnmFTFreqDirection direction
;
119 GnmStyle
*mstyle
; /* Style to apply */
123 * Functions for GnmFT
125 GType
gnm_ft_get_type (void);
126 void gnm_ft_free (GnmFT
*ft
);
127 GnmFT
*gnm_ft_clone (GnmFT
const *ft
);
128 GnmFT
*gnm_ft_new_from_file (char const *filename
,
129 GOCmdContext
*context
);
131 gint
gnm_ft_compare_name (gconstpointer a
, gconstpointer b
);
133 GnmStyle
*gnm_ft_get_style (GnmFT
*ft
, int row
, int col
);
134 void gnm_ft_apply_to_sheet_regions (GnmFT
*ft
, Sheet
*sheet
, GSList
*regions
);
135 gboolean
gnm_ft_check_valid (GnmFT
*ft
, GSList
*regions
,
140 #endif /* _GNM_FORMAT_TEMPLATE_H_ */