3
* Copyright (C) 2004 Vivien Malerba
5
* This program is free software; you can redistribute it and/or
6
* modify it under the terms of the GNU General Public License as
7
* published by the Free Software Foundation; either version 2 of the
8
* License, or (at your option) any later version.
10
* This program is distributed in the hope that it will be useful,
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
* GNU General Public License for more details.
15
* You should have received a copy of the GNU General Public License
16
* along with this program; if not, write to the Free Software
17
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
22
#ifndef __MG_CUSTOM_LAYOUT_H_
23
#define __MG_CUSTOM_LAYOUT_H_
28
#include <libgda/libgda.h>
29
#include <glade/glade.h>
30
#include "mg-work-matrix.h"
34
#define MG_CUSTOM_LAYOUT_TYPE (mg_custom_layout_get_type())
35
#define MG_CUSTOM_LAYOUT(obj) G_TYPE_CHECK_INSTANCE_CAST (obj, mg_custom_layout_get_type(), MgCustomLayout)
36
#define MG_CUSTOM_LAYOUT_CLASS(klass) G_TYPE_CHECK_CLASS_CAST (klass, mg_custom_layout_get_type (), MgCustomLayoutClass)
37
#define IS_MG_CUSTOM_LAYOUT(obj) G_TYPE_CHECK_INSTANCE_TYPE (obj, mg_custom_layout_get_type ())
40
MG_CUSTOM_LAYOUT_LAYOUT,
41
MG_CUSTOM_LAYOUT_GRID,
42
MG_CUSTOM_LAYOUT_FORM,
43
MG_CUSTOM_LAYOUT_MATRIX
48
MgCustomLayoutType type;
50
/* contents of the layout */
52
/* sub layouts, for MG_CUSTOM_LAYOUT_LAYOUT */
54
GSList *children; /* list of MgCustomLayout objects, DON'T FREE */
55
GSList *connects; /* list of MgCustomLayoutConnect structures, DON'T FREE */
59
/* for all the MgWork* widgets */
64
/* For MgWorkMatrix only */
66
MgTarget *cols_target;
67
MgTarget *rows_target;
68
MgWorkMatrixType view_type;
74
MgCustomLayout *src_layout;
76
MgCustomLayout *dest_layout;
78
} MgCustomLayoutConnect;
82
MG_CUSTOM_LAYOUT_XML_SAVE_ERROR,
83
MG_CUSTOM_LAYOUT_XML_LOAD_ERROR,
84
MG_CUSTOM_LAYOUT_GLADEXML_ERROR,
85
MG_CUSTOM_LAYOUT_DATA_ERROR
89
extern GQuark mg_custom_layout_error_quark (void);
90
#define MG_CUSTOM_LAYOUT_ERROR mg_custom_layout_error_quark ()
92
/* struct for the object's data */
93
struct _MgCustomLayout
96
MgCustomLayoutPrivate *priv;
99
/* struct for the object's class */
100
struct _MgCustomLayoutClass
105
guint mg_custom_layout_get_type (void);
106
GObject *mg_custom_layout_new (MgConf *conf);
107
MgCustomLayoutType mg_custom_layout_get_layout_type (MgCustomLayout *layout);
108
MgCustomLayoutData *mg_custom_layout_get_data (MgCustomLayout *layout, GError **error);
109
void mg_custom_layout_data_free (MgCustomLayoutData *data);
110
GladeXML *mg_custom_layout_get_glade_instance (MgCustomLayout *layout,
111
GtkWidget **root_widget, GHashTable **box_widgets,
113
GtkWidget *mg_custom_layout_get_widget (MgCustomLayout *layout, GError **error);
115
MgContext *mg_custom_layout_get_exec_context (MgCustomLayout *layout);
116
MgContext *mg_custom_layout_get_data_context (MgCustomLayout *layout);