]> git.sur5r.net Git - glabels/blob - src/prefs-model.h
Removed non-existent filenames from po/POTFILES.in
[glabels] / src / prefs-model.h
1 /*
2  *  prefs-model.h
3  *  Copyright (C) 2001-2009  Jim Evins <evins@snaught.com>.
4  *
5  *  This file is part of gLabels.
6  *
7  *  gLabels is free software: you can redistribute it and/or modify
8  *  it under the terms of the GNU General Public License as published by
9  *  the Free Software Foundation, either version 3 of the License, or
10  *  (at your option) any later version.
11  *
12  *  gLabels is distributed in the hope that it will be useful,
13  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
14  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15  *  GNU General Public License for more details.
16  *
17  *  You should have received a copy of the GNU General Public License
18  *  along with gLabels.  If not, see <http://www.gnu.org/licenses/>.
19  */
20
21 #ifndef __PREFS_MODEL_H__
22 #define __PREFS_MODEL_H__
23
24 #include <glib-object.h>
25 #include <gconf/gconf-client.h>
26 #include <pango/pango.h>
27 #include <libglabels/libglabels.h>
28
29 G_BEGIN_DECLS
30
31 typedef enum {
32         GL_TOOLBAR_SYSTEM = 0,
33         GL_TOOLBAR_ICONS,
34         GL_TOOLBAR_ICONS_AND_TEXT
35 } glToolbarSetting;
36
37 #define GL_TYPE_PREFS_MODEL              (gl_prefs_model_get_type ())
38 #define GL_PREFS_MODEL(obj)              (G_TYPE_CHECK_INSTANCE_CAST ((obj), GL_TYPE_PREFS_MODEL, glPrefsModel))
39 #define GL_PREFS_MODEL_CLASS(klass)      (G_TYPE_CHECK_CLASS_CAST ((klass), GL_TYPE_PREFS_MODEL, glPrefsModelClass))
40 #define GL_IS_PREFS_MODEL(obj)           (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GL_TYPE_PREFS_MODEL))
41 #define GL_IS_PREFS_MODEL_CLASS(klass)   (G_TYPE_CHECK_CLASS_TYPE ((klass), GL_TYPE_PREFS_MODEL))
42 #define GL_PREFS_MODEL_GET_CLASS(object) (G_TYPE_INSTANCE_GET_CLASS ((object), GL_TYPE_PREFS_MODEL, glPrefsModelClass))
43
44
45 typedef struct _glPrefsModel          glPrefsModel;
46 typedef struct _glPrefsModelClass     glPrefsModelClass;
47
48 typedef struct _glPrefsModelPrivate   glPrefsModelPrivate;
49
50
51 struct _glPrefsModel {
52         GObject          *object;
53
54         GConfClient      *gconf_client;
55
56         /* Units */
57         lglUnitsType      units;
58
59         /* Page size */
60         gchar            *default_page_size;
61
62         /* Text properties */
63         gchar            *default_font_family;
64         gdouble           default_font_size;
65         PangoWeight       default_font_weight;
66         gboolean          default_font_italic_flag;
67         guint             default_text_color;
68         PangoAlignment    default_text_alignment;
69         gdouble           default_text_line_spacing;
70         
71         /* Line properties */
72         gdouble           default_line_width;
73         guint             default_line_color;
74         
75         /* Fill properties */
76         guint             default_fill_color;
77
78         /* User Interface/Main Toolbar */
79         gboolean          main_toolbar_visible;
80         glToolbarSetting  main_toolbar_buttons_style; 
81
82         /* User Interface/Drawing Toolbar */
83         gboolean          drawing_toolbar_visible;
84
85         /* User Interface/Property Toolbar */
86         gboolean          property_toolbar_visible;
87
88         /* View properties */
89         gboolean          grid_visible;
90         gboolean          markup_visible;
91
92         /* Recent files */
93         gint              max_recents;
94
95         /* Recent templates */
96         GSList           *recent_templates;
97         gint              max_recent_templates;
98 };
99
100 struct _glPrefsModelClass {
101         GObjectClass     parent_class;
102
103         void (*changed)          (glPrefsModel *prefs_model, gpointer user_data);
104 };
105
106
107 GType         gl_prefs_model_get_type            (void) G_GNUC_CONST;
108
109 glPrefsModel *gl_prefs_model_new                 (void);
110
111 void          gl_prefs_model_save_settings       (glPrefsModel   *prefs_model);
112
113 void          gl_prefs_model_load_settings       (glPrefsModel   *prefs_model);
114
115 G_END_DECLS
116
117 #endif /* __PREFS_MODEL_H__ */
118
119
120
121 /*
122  * Local Variables:       -- emacs
123  * mode: C                -- emacs
124  * c-basic-offset: 8      -- emacs
125  * tab-width: 8           -- emacs
126  * indent-tabs-mode: nil  -- emacs
127  * End:                   -- emacs
128  */