]> git.sur5r.net Git - glabels/blob - glabels2/src/prefs.h
Restructured template module to ultimately support multiple layouts and markups.
[glabels] / glabels2 / src / prefs.h
1 /*
2  *  (GLABELS) Label and Business Card Creation program for GNOME
3  *
4  *  prefs.h:  Application preferences module header file
5  *
6  *  Copyright (C) 2001-2002  Jim Evins <evins@snaught.com>.
7  *
8  *  This program is free software; you can redistribute it and/or modify
9  *  it under the terms of the GNU General Public License as published by
10  *  the Free Software Foundation; either version 2 of the License, or
11  *  (at your option) any later version.
12  *
13  *  This program is distributed in the hope that it will be useful,
14  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
15  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16  *  GNU General Public License for more details.
17  *
18  *  You should have received a copy of the GNU General Public License
19  *  along with this program; if not, write to the Free Software
20  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
21  */
22 #ifndef __PREFS_H__
23 #define __PREFS_H__
24
25 #include <gtk/gtk.h>
26 #include <libgnomeprint/gnome-font.h>
27
28 typedef struct _glPreferences glPreferences;
29
30 typedef enum {
31         GL_TOOLBAR_SYSTEM = 0,
32         GL_TOOLBAR_ICONS,
33         GL_TOOLBAR_ICONS_AND_TEXT
34 } glToolbarSetting;
35
36 typedef enum {
37         GL_PREFS_UNITS_PTS,
38         GL_PREFS_UNITS_INCHES,
39         GL_PREFS_UNITS_MM,
40 } glPrefsUnits;
41
42 struct _glPreferences
43 {
44         /* Units */
45         glPrefsUnits    units;
46
47         /* Page size */
48         gchar           *default_page_size;
49
50         /* Text properties */
51         gchar            *default_font_family;
52         gdouble          default_font_size;
53         GnomeFontWeight  default_font_weight;
54         gboolean         default_font_italic_flag;
55         guint            default_text_color;
56         GtkJustification default_text_alignment;
57         
58         /* Line properties */
59         gdouble          default_line_width;
60         guint            default_line_color;
61         
62         /* Fill properties */
63         guint            default_fill_color;
64
65         /* User Interface/Main Toolbar */
66         gboolean                main_toolbar_visible;
67         glToolbarSetting        main_toolbar_buttons_style; 
68         gboolean                main_toolbar_view_tooltips;
69
70         /* User Interface/Drawing Toolbar */
71         gboolean                drawing_toolbar_visible;
72         glToolbarSetting        drawing_toolbar_buttons_style; 
73         gboolean                drawing_toolbar_view_tooltips;
74
75         /* User Interface/MDI Mode */
76         gint            mdi_mode;
77         gint            mdi_tabs_position; /* Tabs position in mdi notebook */
78
79         /* Recent files */
80         gint            max_recents;
81 };
82
83 extern glPreferences *gl_prefs;
84
85 extern void gl_prefs_save_settings (void);
86 extern void gl_prefs_load_settings (void);
87 extern void gl_prefs_init (void);
88
89 extern const gchar *gl_prefs_get_page_size (void);
90 extern glPrefsUnits gl_prefs_get_units (void);
91 extern const gchar *gl_prefs_get_units_string (void);
92 extern gdouble gl_prefs_get_units_per_point (void);
93 extern gdouble gl_prefs_get_units_step_size (void);
94 extern gint gl_prefs_get_units_precision (void);
95
96 #endif /* __PREFS_H__ */
97