]> git.sur5r.net Git - glabels/blob - glabels2/src/wdgt-text-props.h
Initial revision
[glabels] / glabels2 / src / wdgt-text-props.h
1 /*
2  *  (GLABELS) Label and Business Card Creation program for GNOME
3  *
4  *  wdgt_text_props.h:  text properties widget 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
23 #ifndef __WDGT_TEXT_PROPS_H__
24 #define __WDGT_TEXT_PROPS_H__
25
26 #include <gtk/gtk.h>
27 #include <libgnomeprint/gnome-font.h>
28 #include "label.h"
29
30 #define GL_TYPE_WDGT_TEXT_PROPS (gl_wdgt_text_props_get_type ())
31 #define GL_WDGT_TEXT_PROPS(obj) \
32         (GTK_CHECK_CAST((obj), GL_TYPE_WDGT_TEXT_PROPS, glWdgtTextProps ))
33 #define GL_WDGT_TEXT_PROPS_CLASS(klass) \
34         (GTK_CHECK_CLASS_CAST ((klass), GL_TYPE_WDGT_TEXT_PROPS, glWdgtTextPropsClass))
35 #define GL_IS_WDGT_TEXT_PROPS(obj) \
36         (GTK_CHECK_TYPE ((obj), GL_TYPE_WDGT_TEXT_PROPS))
37 #define GL_IS_WDGT_TEXT_PROPS_CLASS(klass) \
38         (GTK_CHECK_CLASS_TYPE ((klass), GL_TYPE_WDGT_TEXT_PROPS))
39
40 typedef struct _glWdgtTextProps glWdgtTextProps;
41 typedef struct _glWdgtTextPropsClass glWdgtTextPropsClass;
42
43 struct _glWdgtTextProps {
44         GtkVBox parent_widget;
45
46         GtkWidget *font_family_entry;
47         GtkWidget *font_size_spin;
48         GtkWidget *font_b_button;
49         GtkWidget *font_i_button;
50
51         GtkWidget *color_picker;
52
53         GtkWidget *left_button, *right_button, *center_button;
54 };
55
56 struct _glWdgtTextPropsClass {
57         GtkVBoxClass parent_class;
58
59         void (*changed) (glWdgtTextProps * text, gpointer user_data);
60 };
61
62 extern guint gl_wdgt_text_props_get_type (void);
63
64 extern GtkWidget *gl_wdgt_text_props_new (gchar * label);
65
66 extern void gl_wdgt_text_props_get_params (glWdgtTextProps * text,
67                                            gchar ** font_family,
68                                            gdouble * font_size,
69                                            GnomeFontWeight * font_weight,
70                                            gboolean * font_italic_flag,
71                                            guint * color,
72                                            GtkJustification * just);
73
74 extern void gl_wdgt_text_props_set_params (glWdgtTextProps * text,
75                                            gchar * font_family,
76                                            gdouble font_size,
77                                            GnomeFontWeight font_weight,
78                                            gboolean font_italic_flag,
79                                            guint color,
80                                            GtkJustification just);
81
82 #endif