1 #ifndef _GNM_STYLE_H_
2 # define _GNM_STYLE_H_
3 
4 #include <gnumeric.h>
5 #include <libgnumeric.h>
6 #include <pango/pango-context.h>
7 
8 G_BEGIN_DECLS
9 
10 #define DEFAULT_FONT "Sans"
11 #define DEFAULT_SIZE 10.0
12 
13 /* Alignment definitions */
14 /* Do not change these flags they are used as keys in the 1.0.x xml format.  */
15 typedef enum {
16 	GNM_HALIGN_GENERAL =  0x01,
17 	GNM_HALIGN_LEFT    =  0x02,
18 	GNM_HALIGN_RIGHT   =  0x04,
19 	GNM_HALIGN_CENTER  =  0x08,
20 	GNM_HALIGN_FILL    =  0x10,
21 	GNM_HALIGN_JUSTIFY =  0x20,
22 	GNM_HALIGN_CENTER_ACROSS_SELECTION =  0x40,
23 	GNM_HALIGN_DISTRIBUTED = 0x80
24 } GnmHAlign;
25 
26 typedef enum {
27 	GNM_VALIGN_TOP     = 1,
28 	GNM_VALIGN_BOTTOM  = 2,
29 	GNM_VALIGN_CENTER  = 4,
30 	GNM_VALIGN_JUSTIFY = 8,
31 	GNM_VALIGN_DISTRIBUTED = 16
32 } GnmVAlign;
33 
34 typedef enum {
35 	UNDERLINE_NONE   = 0,
36 	UNDERLINE_SINGLE = 1,
37 	UNDERLINE_DOUBLE = 2,
38 	UNDERLINE_SINGLE_LOW = 3,
39 	UNDERLINE_DOUBLE_LOW = 4
40 } GnmUnderline;
41 
42 typedef enum {
43 	GNM_TEXT_DIR_RTL	= -1,
44 	GNM_TEXT_DIR_CONTEXT	=  0,
45 	GNM_TEXT_DIR_LTR	=  1
46 } GnmTextDir;
47 
48 #include <mstyle.h>
49 
50 GType gnm_align_h_get_type (void);
51 #define GNM_ALIGN_H_TYPE (gnm_align_h_get_type ())
52 
53 GType gnm_align_v_get_type (void);
54 #define GNM_ALIGN_V_TYPE (gnm_align_v_get_type ())
55 
56 GnmSpanCalcFlags gnm_style_required_spanflags (GnmStyle const *style);
57 GnmHAlign	 gnm_style_default_halign     (GnmStyle const *style,
58 					       GnmCell const *c);
59 PangoUnderline   gnm_translate_underline_to_pango (GnmUnderline ul);
60 GnmUnderline   gnm_translate_underline_from_pango (PangoUnderline pul);
61 
62 G_END_DECLS
63 
64 #endif /* _GNM_STYLE_H_ */
65