]> git.sur5r.net Git - glabels/blob - glabels2/src/view-box.h
2009-09-22 Jim Evins <evins@snaught.com>
[glabels] / glabels2 / src / view-box.h
1 /*
2  *  view-box.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 __VIEW_BOX_H__
22 #define __VIEW_BOX_H__
23
24 #include "view-object.h"
25 #include "label-box.h"
26
27 G_BEGIN_DECLS
28
29
30 #define GL_TYPE_VIEW_BOX            (gl_view_box_get_type ())
31 #define GL_VIEW_BOX(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), GL_TYPE_VIEW_BOX, glViewBox))
32 #define GL_VIEW_BOX_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), GL_TYPE_VIEW_BOX, glViewBoxClass))
33 #define GL_IS_VIEW_BOX(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GL_TYPE_VIEW_BOX))
34 #define GL_IS_VIEW_BOX_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GL_TYPE_VIEW_BOX))
35
36 typedef struct _glViewBox          glViewBox;
37 typedef struct _glViewBoxClass     glViewBoxClass;
38
39 typedef struct _glViewBoxPrivate   glViewBoxPrivate;
40
41 struct _glViewBox {
42         glViewObject          parent_object;
43
44         glViewBoxPrivate     *priv;
45 };
46
47 struct _glViewBoxClass {
48         glViewObjectClass     parent_class;
49 };
50
51
52 GType          gl_view_box_get_type (void) G_GNUC_CONST;
53
54 glViewObject  *gl_view_box_new      (glLabelBox *object,
55                                      glView     *view);
56
57
58 /* cursor for creating box objects */
59 GdkCursor *gl_view_box_get_create_cursor (void);
60
61 /* Object creation handlers. */
62 void       gl_view_box_create_button_press_event   (glView *view,
63                                                     gdouble x,
64                                                     gdouble y);
65
66 void       gl_view_box_create_motion_event         (glView *view,
67                                                     gdouble x,
68                                                     gdouble y);
69
70 void       gl_view_box_create_button_release_event (glView *view,
71                                                     gdouble x,
72                                                     gdouble y);
73
74
75 G_END_DECLS
76
77 #endif /* __VIEW_BOX_H__ */
78
79
80
81 /*
82  * Local Variables:       -- emacs
83  * mode: C                -- emacs
84  * c-basic-offset: 8      -- emacs
85  * tab-width: 8           -- emacs
86  * indent-tabs-mode: nil  -- emacs
87  * End:                   -- emacs
88  */