]> git.sur5r.net Git - glabels/blob - glabels2/src/mdi-child.h
Initial revision
[glabels] / glabels2 / src / mdi-child.h
1 /*
2  *  (GLABELS) Label and Business Card Creation program for GNOME
3  *
4  *  mdi-child.h:  gLabels MDI child module header file
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 /*
24  * This file is based on gedit-mdi-child.h from gedit2:
25  *
26  * Copyright (C) 1998, 1999 Alex Roberts, Evan Lawrence
27  * Copyright (C) 2000, 2001 Chema Celorio, Paolo Maggi 
28  * Copyright (C) 2002  Paolo Maggi 
29  *
30  */
31 #ifndef __MDI_CHILD_H__
32 #define __MDI_CHILD_H__
33
34 #include <bonobo-mdi.h>
35
36 #include "label.h"
37
38 #define GL_TYPE_MDI_CHILD       (gl_mdi_child_get_type ())
39 #define GL_MDI_CHILD(o)         (GTK_CHECK_CAST ((o), GL_TYPE_MDI_CHILD, glMDIChild))
40 #define GL_MDI_CHILD_CLASS(klass)       (GTK_CHECK_CLASS_CAST ((klass), GL_TYPE_MDI_CHILD, \
41                                         glMDIChildClass))
42 #define GL_IS_MDI_CHILD(o)              (GTK_CHECK_TYPE ((o), GL_TYPE_MDI_CHILD))
43 #define GL_IS_MDI_CHILD_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GL_TYPE_MDI_CHILD))
44 #define GL_MDI_CHILD_GET_CLASS(o)    (GTK_CHECK_GET_CLASS ((o), GL_TYPE_MDI_CHILD, glMdiChildClass))
45
46
47 typedef struct _glMDIChild        glMDIChild;
48 typedef struct _glMDIChildClass   glMDIChildClass;
49
50 typedef struct _glMDIChildPrivate glMDIChildPrivate;
51
52 struct _glMDIChild
53 {
54         BonoboMDIChild child;
55         
56         glLabel* label;
57         glMDIChildPrivate *priv;
58 };
59
60 struct _glMDIChildClass
61 {
62         BonoboMDIChildClass parent_class;
63
64         /* MDI child state changed */
65         void (*state_changed)           (glMDIChild *child);
66
67         void (*undo_redo_state_changed) (glMDIChild *child);
68 };
69
70
71 GtkType         gl_mdi_child_get_type   (void) G_GNUC_CONST;
72
73 glMDIChild*     gl_mdi_child_new        (const gchar *tmplt_name,
74                                          gboolean rotate_flag);
75
76 glMDIChild*     gl_mdi_child_new_with_uri (const gchar *uri, GError **error);
77
78 #endif /* __MDI_CHILD_H__ */
79