2 * (GLABELS) Label and Business Card Creation program for GNOME
4 * object-editor.h: object properties editor module header file
6 * Copyright (C) 2003 Jim Evins <evins@snaught.com>.
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.
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.
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
22 #ifndef __OBJECT_EDITOR_H__
23 #define __OBJECT_EDITOR_H__
26 #include "text-node.h"
29 #include <gtk/gtkenums.h>
30 #include <libgnomeprint/gnome-font.h>
35 GL_OBJECT_EDITOR_EMPTY = 1,
36 GL_OBJECT_EDITOR_POSITION_PAGE,
37 GL_OBJECT_EDITOR_SIZE_PAGE,
38 GL_OBJECT_EDITOR_SIZE_IMAGE_PAGE,
39 GL_OBJECT_EDITOR_SIZE_LINE_PAGE,
40 GL_OBJECT_EDITOR_FILL_PAGE,
41 GL_OBJECT_EDITOR_LINE_PAGE,
42 GL_OBJECT_EDITOR_IMAGE_PAGE,
43 GL_OBJECT_EDITOR_TEXT_PAGE,
44 GL_OBJECT_EDITOR_EDIT_PAGE,
45 GL_OBJECT_EDITOR_BC_PAGE,
46 GL_OBJECT_EDITOR_DATA_PAGE,
47 } glObjectEditorOption;
49 #define GL_TYPE_OBJECT_EDITOR (gl_object_editor_get_type ())
50 #define GL_OBJECT_EDITOR(obj) (GTK_CHECK_CAST ((obj), GL_TYPE_OBJECT_EDITOR, glObjectEditor))
51 #define GL_OBJECT_EDITOR_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GL_TYPE_OBJECT_EDITOR, glObjectEditorClass))
52 #define GL_IS_OBJECT_EDITOR(obj) (GTK_CHECK_TYPE ((obj), GL_TYPE_OBJECT_EDITOR))
53 #define GL_IS_OBJECT_EDITOR_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GL_TYPE_OBJECT_EDITOR))
54 #define GL_OBJECT_EDITOR_GET_CLASS(obj) (GTK_CHECK_GET_CLASS ((obj), GL_TYPE_OBJECT_EDITOR, glObjectEditorClass))
57 typedef struct _glObjectEditor glObjectEditor;
58 typedef struct _glObjectEditorClass glObjectEditorClass;
60 typedef struct _glObjectEditorPrivate glObjectEditorPrivate;
62 struct _glObjectEditor
64 GtkVBox parent_instance;
66 glObjectEditorPrivate *priv;
70 struct _glObjectEditorClass
72 GtkVBoxClass parent_class;
74 void (*changed) (glObjectEditor *editor, gpointer user_data);
75 void (*size_changed) (glObjectEditor *editor, gpointer user_data);
81 GtkType gl_object_editor_get_type (void) G_GNUC_CONST;
83 GtkWidget *gl_object_editor_new (gchar *image,
85 glObjectEditorOption first_option, ...);
87 void gl_object_editor_set_key_names (glObjectEditor *editor,
94 void gl_object_editor_set_position (glObjectEditor *editor,
98 void gl_object_editor_set_max_position (glObjectEditor *editor,
102 void gl_object_editor_get_position (glObjectEditor *editor,
109 void gl_object_editor_set_size (glObjectEditor *editor,
113 void gl_object_editor_set_max_size (glObjectEditor *editor,
117 void gl_object_editor_set_base_size (glObjectEditor *editor,
121 void gl_object_editor_get_size (glObjectEditor *editor,
129 void gl_object_editor_set_lsize (glObjectEditor *editor,
133 void gl_object_editor_set_max_lsize (glObjectEditor *editor,
137 void gl_object_editor_get_lsize (glObjectEditor *editor,
145 void gl_object_editor_set_fill_color (glObjectEditor *editor,
148 guint gl_object_editor_get_fill_color (glObjectEditor *editor);
154 void gl_object_editor_set_line_color (glObjectEditor *editor,
157 guint gl_object_editor_get_line_color (glObjectEditor *editor);
159 void gl_object_editor_set_line_width (glObjectEditor *editor,
162 gdouble gl_object_editor_get_line_width (glObjectEditor *editor);
168 void gl_object_editor_set_image (glObjectEditor *editor,
170 glTextNode *text_node);
172 glTextNode *gl_object_editor_get_image (glObjectEditor *editor);
178 void gl_object_editor_set_font_family (glObjectEditor *editor,
179 const gchar *font_family);
181 gchar *gl_object_editor_get_font_family (glObjectEditor *editor);
183 void gl_object_editor_set_font_size (glObjectEditor *editor,
186 gdouble gl_object_editor_get_font_size (glObjectEditor *editor);
188 void gl_object_editor_set_font_weight (glObjectEditor *editor,
189 GnomeFontWeight font_weight);
191 GnomeFontWeight gl_object_editor_get_font_weight (glObjectEditor *editor);
193 void gl_object_editor_set_font_italic_flag (glObjectEditor *editor,
194 gboolean font_italic_flag);
196 gboolean gl_object_editor_get_font_italic_flag (glObjectEditor *editor);
198 void gl_object_editor_set_text_alignment (glObjectEditor *editor,
199 GtkJustification text_alignment);
201 GtkJustification gl_object_editor_get_text_alignment (glObjectEditor *editor);
203 void gl_object_editor_set_text_line_spacing (glObjectEditor *editor,
204 gdouble text_line_spacing);
206 gdouble gl_object_editor_get_text_line_spacing (glObjectEditor *editor);
208 void gl_object_editor_set_text_color (glObjectEditor *editor,
211 guint gl_object_editor_get_text_color (glObjectEditor *editor);
213 void gl_object_editor_set_text_auto_shrink (glObjectEditor *editor,
214 gboolean auto_shrink);
216 gboolean gl_object_editor_get_text_auto_shrink (glObjectEditor *editor);
222 void gl_object_editor_set_text_buffer (glObjectEditor *editor,
223 GtkTextBuffer *buffer);
228 void gl_object_editor_set_bc_style (glObjectEditor *editor,
231 gboolean checksum_flag);
233 void gl_object_editor_get_bc_style (glObjectEditor *editor,
236 gboolean *checksum_flag);
238 void gl_object_editor_set_bc_color (glObjectEditor *editor,
241 guint gl_object_editor_get_bc_color (glObjectEditor *editor);
247 void gl_object_editor_set_data (glObjectEditor *editor,
249 glTextNode *text_node);
251 glTextNode *gl_object_editor_get_data (glObjectEditor *editor);