3 * Copyright (C) 2001-2009 Jim Evins <evins@snaught.com>.
5 * This file is part of gLabels.
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.
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.
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/>.
21 #ifndef __PREFS_MODEL_H__
22 #define __PREFS_MODEL_H__
24 #include <glib-object.h>
25 #include <gconf/gconf-client.h>
26 #include <pango/pango.h>
27 #include <libglabels/libglabels.h>
32 GL_TOOLBAR_SYSTEM = 0,
34 GL_TOOLBAR_ICONS_AND_TEXT
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))
45 typedef struct _glPrefsModel glPrefsModel;
46 typedef struct _glPrefsModelClass glPrefsModelClass;
48 typedef struct _glPrefsModelPrivate glPrefsModelPrivate;
51 struct _glPrefsModel {
54 GConfClient *gconf_client;
60 gchar *default_page_size;
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;
72 gdouble default_line_width;
73 guint default_line_color;
76 guint default_fill_color;
78 /* User Interface/Main Toolbar */
79 gboolean main_toolbar_visible;
80 glToolbarSetting main_toolbar_buttons_style;
82 /* User Interface/Drawing Toolbar */
83 gboolean drawing_toolbar_visible;
85 /* User Interface/Property Toolbar */
86 gboolean property_toolbar_visible;
89 gboolean grid_visible;
90 gboolean markup_visible;
95 /* Recent templates */
96 GSList *recent_templates;
97 gint max_recent_templates;
100 struct _glPrefsModelClass {
101 GObjectClass parent_class;
103 void (*changed) (glPrefsModel *prefs_model, gpointer user_data);
107 GType gl_prefs_model_get_type (void) G_GNUC_CONST;
109 glPrefsModel *gl_prefs_model_new (void);
111 void gl_prefs_model_save_settings (glPrefsModel *prefs_model);
113 void gl_prefs_model_load_settings (glPrefsModel *prefs_model);
117 #endif /* __PREFS_MODEL_H__ */
122 * Local Variables: -- emacs
124 * c-basic-offset: 8 -- emacs
125 * tab-width: 8 -- emacs
126 * indent-tabs-mode: nil -- emacs