1 /*
2  * e-tree-view-frame.h
3  *
4  * This program is free software; you can redistribute it and/or modify it
5  * under the terms of the GNU Lesser General Public License as published by
6  * the Free Software Foundation.
7  *
8  * This program is distributed in the hope that it will be useful, but
9  * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
10  * or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
11  * for more details.
12  *
13  * You should have received a copy of the GNU Lesser General Public License
14  * along with this program; if not, see <http://www.gnu.org/licenses/>.
15  *
16  */
17 
18 #if !defined (__E_UTIL_H_INSIDE__) && !defined (LIBEUTIL_COMPILATION)
19 #error "Only <e-util/e-util.h> should be included directly."
20 #endif
21 
22 #ifndef E_TREE_VIEW_FRAME_H
23 #define E_TREE_VIEW_FRAME_H
24 
25 #include <gtk/gtk.h>
26 
27 /* Standard GObject macros */
28 #define E_TYPE_TREE_VIEW_FRAME \
29 	(e_tree_view_frame_get_type ())
30 #define E_TREE_VIEW_FRAME(obj) \
31 	(G_TYPE_CHECK_INSTANCE_CAST \
32 	((obj), E_TYPE_TREE_VIEW_FRAME, ETreeViewFrame))
33 #define E_TREE_VIEW_FRAME_CLASS(cls) \
34 	(G_TYPE_CHECK_CLASS_CAST \
35 	((cls), E_TYPE_TREE_VIEW_FRAME, ETreeViewFrameClass))
36 #define E_IS_TREE_VIEW_FRAME(obj) \
37 	(G_TYPE_CHECK_INSTANCE_TYPE \
38 	((obj), E_TYPE_TREE_VIEW_FRAME))
39 #define E_IS_TREE_VIEW_FRAME_CLASS(cls) \
40 	(G_TYPE_CHECK_CLASS_TYPE \
41 	((cls), E_TYPE_TREE_VIEW_FRAME))
42 #define E_TREE_VIEW_FRAME_GET_CLASS(obj) \
43 	(G_TYPE_INSTANCE_GET_CLASS \
44 	((obj), E_TYPE_TREE_VIEW_FRAME, ETreeViewFrameClass))
45 
46 #define E_TREE_VIEW_FRAME_ACTION_ADD		"e-tree-view-frame-add"
47 #define E_TREE_VIEW_FRAME_ACTION_REMOVE		"e-tree-view-frame-remove"
48 #define E_TREE_VIEW_FRAME_ACTION_MOVE_TOP	"e-tree-view-frame-move-top"
49 #define E_TREE_VIEW_FRAME_ACTION_MOVE_UP	"e-tree-view-frame-move-up"
50 #define E_TREE_VIEW_FRAME_ACTION_MOVE_DOWN	"e-tree-view-frame-move-down"
51 #define E_TREE_VIEW_FRAME_ACTION_MOVE_BOTTOM	"e-tree-view-frame-move-bottom"
52 #define E_TREE_VIEW_FRAME_ACTION_SELECT_ALL	"e-tree-view-frame-select-all"
53 
54 G_BEGIN_DECLS
55 
56 typedef struct _ETreeViewFrame ETreeViewFrame;
57 typedef struct _ETreeViewFrameClass ETreeViewFrameClass;
58 typedef struct _ETreeViewFramePrivate ETreeViewFramePrivate;
59 
60 /**
61  * ETreeViewFrame:
62  *
63  * Contains only private data that should be read and manipulated using the
64  * functions below.
65  **/
66 struct _ETreeViewFrame {
67 	GtkBox parent;
68 	ETreeViewFramePrivate *priv;
69 };
70 
71 struct _ETreeViewFrameClass {
72 	GtkBoxClass parent_class;
73 
74 	/* Signals */
75 	gboolean	(*toolbar_action_activate)
76 					(ETreeViewFrame *tree_view_frame,
77 					 GtkAction *action);
78 	void		(*update_toolbar_actions)
79 					(ETreeViewFrame *tree_view_frame);
80 };
81 
82 GType		e_tree_view_frame_get_type
83 					(void) G_GNUC_CONST;
84 GtkWidget *	e_tree_view_frame_new	(void);
85 GtkTreeView *	e_tree_view_frame_get_tree_view
86 					(ETreeViewFrame *tree_view_frame);
87 void		e_tree_view_frame_set_tree_view
88 					(ETreeViewFrame *tree_view_frame,
89 					 GtkTreeView *tree_view);
90 gboolean	e_tree_view_frame_get_toolbar_visible
91 					(ETreeViewFrame *tree_view_frame);
92 void		e_tree_view_frame_set_toolbar_visible
93 					(ETreeViewFrame *tree_view_frame,
94 					 gboolean toolbar_visible);
95 GtkPolicyType	e_tree_view_frame_get_hscrollbar_policy
96 					(ETreeViewFrame *tree_view_frame);
97 void		e_tree_view_frame_set_hscrollbar_policy
98 					(ETreeViewFrame *tree_view_frame,
99 					 GtkPolicyType hscrollbar_policy);
100 GtkPolicyType	e_tree_view_frame_get_vscrollbar_policy
101 					(ETreeViewFrame *tree_view_frame);
102 void		e_tree_view_frame_set_vscrollbar_policy
103 					(ETreeViewFrame *tree_view_frame,
104 					 GtkPolicyType vscrollbar_policy);
105 void		e_tree_view_frame_insert_toolbar_action
106 					(ETreeViewFrame *tree_view_frame,
107 					 GtkAction *action,
108 					 gint position);
109 GtkAction *	e_tree_view_frame_lookup_toolbar_action
110 					(ETreeViewFrame *tree_view_frame,
111 					 const gchar *action_name);
112 void		e_tree_view_frame_update_toolbar_actions
113 					(ETreeViewFrame *tree_view_frame);
114 
115 G_END_DECLS
116 
117 #endif /* E_TREE_VIEW_FRAME_H */
118 
119