]> git.sur5r.net Git - glabels/blob - glabels2/src/view-object.h
View_highlight is now a full-fledged object that tracks its corresponding label objec...
[glabels] / glabels2 / src / view-object.h
1 /*
2  *  (GLABELS) Label and Business Card Creation program for GNOME
3  *
4  *  view_object.h:  GLabels canvas item wrapper widget
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 __VIEW_OBJECT_H__
24 #define __VIEW_OBJECT_H__
25
26 #include <glib-object.h>
27 #include <gnome.h>
28 #include "label-object.h"
29
30 #define GL_TYPE_VIEW_OBJECT            (gl_view_object_get_type ())
31 #define GL_VIEW_OBJECT(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), GL_TYPE_VIEW_OBJECT, glViewObject))
32 #define GL_VIEW_OBJECT_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), GL_TYPE_VIEW_OBJECT, glViewObjectClass))
33 #define GL_IS_VIEW_OBJECT(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GL_TYPE_VIEW_OBJECT))
34 #define GL_IS_VIEW_OBJECT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GL_TYPE_VIEW_OBJECT))
35
36 typedef struct _glViewObject          glViewObject;
37 typedef struct _glViewObjectClass     glViewObjectClass;
38
39 typedef struct _glViewObjectPrivate   glViewObjectPrivate;
40
41
42 #include "view.h"
43 #include "view-highlight.h"
44
45 struct _glViewObject {
46         GObject              parent_object;
47
48         glViewObjectPrivate  *private;
49 };
50
51 struct _glViewObjectClass {
52         GObjectClass         parent_class;
53 };
54
55
56 typedef GtkWidget * (*glViewObjectDlgConstructor)(glViewObject *);
57 #define GL_VIEW_OBJECT_DLG_CONSTRUCTOR(f) ((glViewObjectDlgConstructor) (f))
58
59 G_BEGIN_DECLS
60
61 GType            gl_view_object_get_type          (void);
62
63 GObject         *gl_view_object_new               (void);
64
65
66 void             gl_view_object_set_view          (glViewObject         *view_object,
67                                                    glView               *view);
68
69 void             gl_view_object_set_object        (glViewObject         *view_object,
70                                                    glLabelObject        *object,
71                                                    glViewHighlightStyle  style);
72
73 void             gl_view_object_set_dlg_constructor (glViewObject       *view_object,
74                                              glViewObjectDlgConstructor  dlg_constructor);
75
76 glView          *gl_view_object_get_view          (glViewObject         *view_object);
77
78 glLabelObject   *gl_view_object_get_object        (glViewObject         *view_object);
79
80 GnomeCanvasItem *gl_view_object_get_group         (glViewObject         *view_object);
81
82 GnomeCanvasItem *gl_view_object_item_new          (glViewObject         *view_object,
83                                                    GType                 type,
84                                                    const gchar          *first_arg_name,
85                                                    ...);
86
87 GtkMenu         *gl_view_object_get_menu          (glViewObject         *view_object);
88
89 void             gl_view_object_show_highlight    (glViewObject         *view_object);
90
91 void             gl_view_object_hide_highlight    (glViewObject         *view_object);
92
93 void             gl_view_object_show_dialog       (glViewObject         *view_object);
94
95 void             gl_view_object_select            (glViewObject         *view_object);
96
97 G_END_DECLS
98
99 #endif /* __VIEW_OBJECT_H__ */