]> git.sur5r.net Git - glabels/blob - glabels2/src/prefs.h
Initial revision
[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 <libgnomeprint/gnome-font.h>
26
27 typedef struct _glPreferences glPreferences;
28
29 typedef enum {
30         GL_TOOLBAR_SYSTEM = 0,
31         GL_TOOLBAR_ICONS,
32         GL_TOOLBAR_ICONS_AND_TEXT
33 } glToolbarSetting;
34
35 typedef enum {
36         GL_PREFS_UNITS_PTS,
37         GL_PREFS_UNITS_INCHES,
38         GL_PREFS_UNITS_MM,
39 } glPrefsUnits;
40
41 struct _glPreferences
42 {
43         /* Units */
44         glPrefsUnits    units;
45
46         /* Page size */
47         gchar           *default_page_size;
48
49         /* Text properties */
50         gchar            *default_font_family;
51         gdouble          default_font_size;
52         GnomeFontWeight  default_font_weight;
53         gboolean         default_font_italic_flag;
54         guint            default_text_color;
55         GtkJustification default_text_alignment;
56         
57         /* Line properties */
58         gdouble          default_line_width;
59         guint            default_line_color;
60         
61         /* Fill properties */
62         guint            default_fill_color;
63
64         /* User Interface/Toolbar */
65         gboolean                toolbar_visible;
66         glToolbarSetting        toolbar_buttons_style; 
67         gboolean                toolbar_view_tooltips;
68
69         /* User Interface/MDI Mode */
70         gint            mdi_mode;
71         gint            mdi_tabs_position; /* Tabs position in mdi notebook */
72
73         /* Recent files */
74         gint            max_recents;
75 };
76
77 extern glPreferences *gl_prefs;
78
79 extern void gl_prefs_save_settings (void);
80 extern void gl_prefs_load_settings (void);
81 extern void gl_prefs_init (void);
82
83 extern const gchar *gl_prefs_get_page_size (void);
84 extern glPrefsUnits gl_prefs_get_units (void);
85 extern const gchar *gl_prefs_get_units_string (void);
86 extern gdouble gl_prefs_get_units_per_point (void);
87 extern gdouble gl_prefs_get_units_step_size (void);
88 extern gint gl_prefs_get_units_precision (void);
89
90 #endif /* __PREFS_H__ */
91