1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*- */
4 * (GLABELS) Label and Business Card Creation program for GNOME
6 * prefs-model.h: Application preferences model module header file
8 * Copyright (C) 2001-2003 Jim Evins <evins@snaught.com>.
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2 of the License, or
13 * (at your option) any later version.
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
20 * You should have received a copy of the GNU General Public License
21 * along with this program; if not, write to the Free Software
22 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
24 #ifndef __PREFS_MODEL_H__
25 #define __PREFS_MODEL_H__
27 #include <glib-object.h>
28 #include <gconf/gconf-client.h>
29 #include <pango/pango.h>
30 #include <libglabels/enums.h>
35 GL_TOOLBAR_SYSTEM = 0,
37 GL_TOOLBAR_ICONS_AND_TEXT
40 #define GL_TYPE_PREFS_MODEL (gl_prefs_model_get_type ())
41 #define GL_PREFS_MODEL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GL_TYPE_PREFS_MODEL, glPrefsModel))
42 #define GL_PREFS_MODEL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GL_TYPE_PREFS_MODEL, glPrefsModelClass))
43 #define GL_IS_PREFS_MODEL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GL_TYPE_PREFS_MODEL))
44 #define GL_IS_PREFS_MODEL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GL_TYPE_PREFS_MODEL))
45 #define GL_PREFS_MODEL_GET_CLASS(object) (G_TYPE_INSTANCE_GET_CLASS ((object), GL_TYPE_PREFS_MODEL, glPrefsModelClass))
48 typedef struct _glPrefsModel glPrefsModel;
49 typedef struct _glPrefsModelClass glPrefsModelClass;
51 typedef struct _glPrefsModelPrivate glPrefsModelPrivate;
54 struct _glPrefsModel {
57 GConfClient *gconf_client;
63 gchar *default_page_size;
66 gchar *default_font_family;
67 gdouble default_font_size;
68 PangoWeight default_font_weight;
69 gboolean default_font_italic_flag;
70 guint default_text_color;
71 PangoAlignment default_text_alignment;
72 gdouble default_text_line_spacing;
75 gdouble default_line_width;
76 guint default_line_color;
79 guint default_fill_color;
81 /* User Interface/Main Toolbar */
82 gboolean main_toolbar_visible;
83 glToolbarSetting main_toolbar_buttons_style;
84 gboolean main_toolbar_view_tooltips;
86 /* User Interface/Drawing Toolbar */
87 gboolean drawing_toolbar_visible;
88 gboolean drawing_toolbar_view_tooltips;
90 /* User Interface/Property Toolbar */
91 gboolean property_toolbar_visible;
92 gboolean property_toolbar_view_tooltips;
95 gboolean grid_visible;
96 gboolean markup_visible;
101 /* Recent templates */
102 GSList *recent_templates;
103 gint max_recent_templates;
106 struct _glPrefsModelClass {
107 GObjectClass parent_class;
109 void (*changed) (glPrefsModel *prefs_model, gpointer user_data);
113 GType gl_prefs_model_get_type (void) G_GNUC_CONST;
115 glPrefsModel *gl_prefs_model_new (void);
117 void gl_prefs_model_save_settings (glPrefsModel *prefs_model);
119 void gl_prefs_model_load_settings (glPrefsModel *prefs_model);
123 #endif /* __PREFS_MODEL_H__ */