2 * (GLABELS) Label and Business Card Creation program for GNOME
4 * template.h: template module header file
6 * Copyright (C) 2001-2002 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
23 #ifndef __TEMPLATE_H__
24 #define __TEMPLATE_H__
26 #include <libgnome/libgnome.h>
31 * Template Label Structure
34 GL_TEMPLATE_STYLE_RECT,
35 GL_TEMPLATE_STYLE_ROUND,
37 } glTemplateLabelStyle;
40 glTemplateLabelStyle style;
41 GList *layouts; /* List of glTemplateLayouts */
42 GList *markups; /* List of glTemplateMarkups */
43 } glTemplateLabelParent;
46 glTemplateLabelParent parent;
48 gdouble w, h, r; /* Dimensions */
49 } glTemplateLabelRect;
52 glTemplateLabelParent parent;
54 gdouble r; /* Dimensions */
55 } glTemplateLabelRound;
58 glTemplateLabelParent parent;
60 gdouble r1, r2, w, h; /* Dimensions, w&h are for business card CDs */
64 glTemplateLabelStyle style;
65 glTemplateLabelParent any;
66 glTemplateLabelRect rect;
67 glTemplateLabelRound round;
76 GL_TEMPLATE_MARKUP_MARGIN,
77 GL_TEMPLATE_MARKUP_LINE,
78 } glTemplateMarkupType;
81 /* NOTE: These fields are common to all union members. */
82 glTemplateMarkupType type;
83 } glTemplateMarkupParent;
86 glTemplateMarkupParent parent;
89 } glTemplateMarkupMargin;
92 glTemplateMarkupParent parent;
94 gdouble x1, y1, x2, y2;
95 } glTemplateMarkupLine;
98 glTemplateMarkupType type;
99 glTemplateMarkupParent any;
100 glTemplateMarkupMargin margin;
101 glTemplateMarkupLine line;
110 gdouble x0, y0, dx, dy;
124 glTemplateLabel label;
138 void gl_template_init (void);
140 GList *gl_template_get_name_list (const gchar *page_size);
141 void gl_template_free_name_list (GList **names);
143 glTemplate *gl_template_from_name (const gchar *name);
145 gchar *gl_template_get_name_with_desc (const glTemplate *template);
147 glTemplate *gl_template_dup (const glTemplate *orig);
148 void gl_template_free (glTemplate **template);
150 gchar *gl_template_get_label_size_desc (const glTemplate *template);
151 void gl_template_get_label_size (const glTemplate *template,
155 gint gl_template_get_n_labels (const glTemplate *template);
156 glTemplateOrigin *gl_template_get_origins (const glTemplate *template);
157 gchar *gl_template_get_layout_desc (const glTemplate *template);
159 glTemplateLayout *gl_template_layout_new (gdouble nx,
166 glTemplateMarkup *gl_template_markup_margin_new (gdouble size);
167 glTemplateMarkup *gl_template_markup_line_new (gdouble x1,