]> git.sur5r.net Git - glabels/blob - src/mini-preview.h
Imported Upstream version 3.0.0
[glabels] / src / mini-preview.h
1 /*
2  *  mini-preview.h
3  *  Copyright (C) 2001-2009  Jim Evins <evins@snaught.com>.
4  *
5  *  This file is part of gLabels.
6  *
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.
11  *
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.
16  *
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/>.
19  */
20
21 #ifndef __MINI_PREVIEW_H__
22 #define __MINI_PREVIEW_H__
23
24 #include <gtk/gtk.h>
25 #include "label.h"
26
27
28 G_BEGIN_DECLS
29
30 #define GL_TYPE_MINI_PREVIEW (gl_mini_preview_get_type ())
31 #define GL_MINI_PREVIEW(obj) \
32         (G_TYPE_CHECK_INSTANCE_CAST((obj), GL_TYPE_MINI_PREVIEW, glMiniPreview ))
33 #define GL_MINI_PREVIEW_CLASS(klass) \
34         (G_TYPE_CHECK_CLASS_CAST ((klass), GL_TYPE_MINI_PREVIEW, glMiniPreviewClass))
35 #define GL_IS_MINI_PREVIEW(obj) \
36         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GL_TYPE_MINI_PREVIEW))
37 #define GL_IS_MINI_PREVIEW_CLASS(klass) \
38         (G_TYPE_CHECK_CLASS_TYPE ((klass), GL_TYPE_MINI_PREVIEW))
39
40
41 typedef struct _glMiniPreview        glMiniPreview;
42 typedef struct _glMiniPreviewPrivate glMiniPreviewPrivate;
43 typedef struct _glMiniPreviewClass   glMiniPreviewClass;
44
45 struct _glMiniPreview {
46         GtkEventBox           parent;
47
48         glMiniPreviewPrivate *priv;
49 };
50
51 struct _glMiniPreviewClass {
52         GtkEventBoxClass      parent_class;
53
54         void (*clicked)  (glMiniPreview *this,
55                           gint           index,
56                           gpointer       user_data);
57
58         void (*pressed)  (glMiniPreview *this,
59                           gint           index1,
60                           gint           index2,
61                           gpointer       user_data);
62
63         void (*released) (glMiniPreview *this,
64                           gint           index1,
65                           gint           index2,
66                           gpointer       user_data);
67
68 };
69
70
71 GType      gl_mini_preview_get_type            (void) G_GNUC_CONST;
72
73 GtkWidget *gl_mini_preview_new                 (gint               height,
74                                                 gint               width);
75
76 void       gl_mini_preview_set_by_name         (glMiniPreview     *this,
77                                                 const gchar       *name);
78
79 void       gl_mini_preview_set_template        (glMiniPreview     *this,
80                                                 const lglTemplate *template);
81
82 void       gl_mini_preview_highlight_range     (glMiniPreview     *this,
83                                                 gint               first_label,
84                                                 gint               last_label);
85
86 void       gl_mini_preview_set_draw_arrow      (glMiniPreview     *this,
87                                                 gboolean           draw_arrow_flag);
88
89 void       gl_mini_preview_set_rotate          (glMiniPreview     *this,
90                                                 gboolean           rotate_flag);
91
92
93 /*
94  * If label is set, the preview will be rich.
95  */
96 void       gl_mini_preview_set_label           (glMiniPreview     *this,
97                                                 glLabel           *label);
98
99 void       gl_mini_preview_set_page            (glMiniPreview     *this,
100                                                 gint               n_sheets);
101 void       gl_mini_preview_set_n_sheets        (glMiniPreview     *this,
102                                                 gint               n_sheets);
103 void       gl_mini_preview_set_n_copies        (glMiniPreview     *this,
104                                                 gint               n_copies);
105 void       gl_mini_preview_set_first           (glMiniPreview     *this,
106                                                 gint               first);
107 void       gl_mini_preview_set_last            (glMiniPreview     *this,
108                                                 gint               last);
109 void       gl_mini_preview_set_collate_flag    (glMiniPreview     *this,
110                                                 gboolean           collate_flag);
111 void       gl_mini_preview_set_outline_flag    (glMiniPreview     *this,
112                                                 gboolean           outline_flag);
113 void       gl_mini_preview_set_reverse_flag    (glMiniPreview     *this,
114                                                 gboolean           reverse_flag);
115 void       gl_mini_preview_set_crop_marks_flag (glMiniPreview     *this,
116                                                 gboolean           crop_marks_flag);
117
118
119 G_END_DECLS
120
121 #endif
122
123
124
125 /*
126  * Local Variables:       -- emacs
127  * mode: C                -- emacs
128  * c-basic-offset: 8      -- emacs
129  * tab-width: 8           -- emacs
130  * indent-tabs-mode: nil  -- emacs
131  * End:                   -- emacs
132  */