1 /*
2  * Copyright (C) 2009 - 2011 Vivien Malerba <malerba@gnome-db.org>
3  * Copyright (C) 2011 Murray Cumming <murrayc@murrayc.com>
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Lesser General Public
7  * License as published by the Free Software Foundation; either
8  * version 2 of the License, or (at your option) any later version.
9  *
10  * This library 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 GNU
13  * Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public
16  * License along with this library; if not, write to the
17  * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
18  * Boston, MA  02110-1301, USA.
19  */
20 
21 #ifndef __GDAUI_DATA_PROXY_INFO__
22 #define __GDAUI_DATA_PROXY_INFO__
23 
24 #include <gtk/gtk.h>
25 #include <libgda/gda-decl.h>
26 #include <libgda-ui/gdaui-decl.h>
27 
28 G_BEGIN_DECLS
29 
30 #define GDAUI_TYPE_DATA_PROXY_INFO          (gdaui_data_proxy_info_get_type())
31 #define GDAUI_DATA_PROXY_INFO(obj)          G_TYPE_CHECK_INSTANCE_CAST (obj, gdaui_data_proxy_info_get_type(), GdauiDataProxyInfo)
32 #define GDAUI_DATA_PROXY_INFO_CLASS(klass)  G_TYPE_CHECK_CLASS_CAST (klass, gdaui_data_proxy_info_get_type (), GdauiDataProxyInfoClass)
33 #define GDAUI_IS_DATA_PROXY_INFO(obj)       G_TYPE_CHECK_INSTANCE_TYPE (obj, gdaui_data_proxy_info_get_type ())
34 
35 
36 typedef struct _GdauiDataProxyInfo      GdauiDataProxyInfo;
37 typedef struct _GdauiDataProxyInfoClass GdauiDataProxyInfoClass;
38 typedef struct _GdauiDataProxyInfoPriv  GdauiDataProxyInfoPriv;
39 
40 /**
41  * GdauiDataProxyInfoFlag:
42  * @GDAUI_DATA_PROXY_INFO_NONE:
43  * @GDAUI_DATA_PROXY_INFO_CURRENT_ROW:
44  * @GDAUI_DATA_PROXY_INFO_ROW_MODIFY_BUTTONS:
45  * @GDAUI_DATA_PROXY_INFO_ROW_MOVE_BUTTONS:
46  * @GDAUI_DATA_PROXY_INFO_CHUNCK_CHANGE_BUTTONS:
47  * @GDAUI_DATA_PROXY_INFO_NO_FILTER:
48  */
49 typedef enum
50 {
51 	GDAUI_DATA_PROXY_INFO_NONE = 0,
52 	GDAUI_DATA_PROXY_INFO_CURRENT_ROW    = 1 << 0,
53 	GDAUI_DATA_PROXY_INFO_ROW_MODIFY_BUTTONS = 1 << 2,
54 	GDAUI_DATA_PROXY_INFO_ROW_MOVE_BUTTONS = 1 << 3,
55 	GDAUI_DATA_PROXY_INFO_CHUNCK_CHANGE_BUTTONS = 1 << 4,
56 	GDAUI_DATA_PROXY_INFO_NO_FILTER = 1 << 5
57 } GdauiDataProxyInfoFlag;
58 
59 /* struct for the object's data */
60 struct _GdauiDataProxyInfo
61 {
62 	GtkBox                 object;
63 
64 	GdauiDataProxyInfoPriv *priv;
65 };
66 
67 /* struct for the object's class */
68 struct _GdauiDataProxyInfoClass
69 {
70 	GtkBoxClass            parent_class;
71 };
72 
73 /**
74  * SECTION:gdaui-data-proxy-info
75  * @short_description: Shows information &amp; actions about a #GdauiDataProxy widget
76  * @title: GdauiDataProxyInfo
77  * @stability: Stable
78  * @Image: vi-info.png
79  * @see_also:
80  *
81  * The #GdauiDataProxyInfo widget is a container widget which, depending on how it is configured:
82  * <itemizedlist>
83  *   <listitem><para>proposes action buttons to change the currently displayed row, add new row, ...</para></listitem>
84  *   <listitem><para>displays information about the number of rows in a #GdauiDataProxy</para></listitem>
85  * </itemizedlist>
86  */
87 
88 GType             gdaui_data_proxy_info_get_type (void) G_GNUC_CONST;
89 GtkWidget        *gdaui_data_proxy_info_new      (GdauiDataProxy *data_proxy, GdauiDataProxyInfoFlag flags);
90 
91 G_END_DECLS
92 
93 #endif
94 
95 
96 
97