1 /*   EXTRAITS DE LA LICENCE
2 	Copyright CEA, contributeurs : Luc BILLARD et Damien
3 	CALISTE, laboratoire L_Sim, (2001-2005)
4 
5 	Adresse mèl :
6 	BILLARD, non joignable par mèl ;
7 	CALISTE, damien P caliste AT cea P fr.
8 
9 	Ce logiciel est un programme informatique servant à visualiser des
10 	structures atomiques dans un rendu pseudo-3D.
11 
12 	Ce logiciel est régi par la licence CeCILL soumise au droit français et
13 	respectant les principes de diffusion des logiciels libres. Vous pouvez
14 	utiliser, modifier et/ou redistribuer ce programme sous les conditions
15 	de la licence CeCILL telle que diffusée par le CEA, le CNRS et l'INRIA
16 	sur le site "http://www.cecill.info".
17 
18 	Le fait que vous puissiez accéder à cet en-tête signifie que vous avez
19 	pris connaissance de la licence CeCILL, et que vous en avez accepté les
20 	termes (cf. le fichier Documentation/licence.fr.txt fourni avec ce logiciel).
21 */
22 
23 /*   LICENCE SUM UP
24 	Copyright CEA, contributors : Luc BILLARD et Damien
25 	CALISTE, laboratoire L_Sim, (2001-2005)
26 
27 	E-mail address:
28 	BILLARD, not reachable any more ;
29 	CALISTE, damien P caliste AT cea P fr.
30 
31 	This software is a computer program whose purpose is to visualize atomic
32 	configurations in 3D.
33 
34 	This software is governed by the CeCILL  license under French law and
35 	abiding by the rules of distribution of free software.  You can  use,
36 	modify and/ or redistribute the software under the terms of the CeCILL
37 	license as circulated by CEA, CNRS and INRIA at the following URL
38 	"http://www.cecill.info".
39 
40 	The fact that you are presently reading this means that you have had
41 	knowledge of the CeCILL license and that you accept its terms. You can
42 	find a copy of this licence shipped with this software at Documentation/licence.en.txt.
43 */
44 
45 #ifndef GTK_TOOLPANELWIDGET_H
46 #define GTK_TOOLPANELWIDGET_H
47 
48 #include <glib.h>
49 #include <gtk/gtk.h>
50 
51 #include <openGLFunctions/view.h>
52 #include <visu_data.h>
53 
54 G_BEGIN_DECLS
55 /**
56  * VISU_TYPE_UI_PANEL:
57  *
58  * Return the associated #GType to the VisuUiPanel objects.
59  */
60 #define VISU_TYPE_UI_PANEL         (visu_ui_panel_get_type ())
61 /**
62  * VISU_UI_PANEL:
63  * @obj: the widget to cast.
64  *
65  * Cast the given object to a #VisuUiPanel object.
66  */
67 #define VISU_UI_PANEL(obj)         (G_TYPE_CHECK_INSTANCE_CAST ((obj), VISU_TYPE_UI_PANEL, VisuUiPanel))
68 /**
69  * VISU_UI_PANEL_CLASS:
70  * @klass: the class to cast.
71  *
72  * Cast the given class to a #VisuUiPanelClass object.
73  */
74 #define VISU_UI_PANEL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VISU_TYPE_UI_PANEL, VisuUiPanelClass))
75 /**
76  * VISU_IS_UI_PANEL:
77  * @obj: the object to test.
78  *
79  * Return if the given object is a valid #VisuUiPanel object.
80  */
81 #define VISU_IS_UI_PANEL(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VISU_TYPE_UI_PANEL))
82 /**
83  * VISU_IS_UI_PANEL_CLASS:
84  * @klass: the class to test.
85  *
86  * Return if the given class is a valid #VisuUiPanelClass class.
87  */
88 #define VISU_IS_UI_PANEL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VISU_TYPE_UI_PANEL))
89 
90 typedef struct _VisuUiPanel VisuUiPanel;
91 typedef struct _VisuUiPanelClass VisuUiPanelClass;
92 
93 GType visu_ui_panel_get_type(void);
94 
95 typedef struct _VisuUiDockWindow VisuUiDockWindow;
96 
97 GType visu_ui_dock_window_get_type(void);
98 /**
99  * VISU_TYPE_UI_DOCK_WINDOW:
100  *
101  * The type of #VisuUiDockWindow objects.
102  */
103 #define VISU_TYPE_UI_DOCK_WINDOW (visu_ui_dock_window_get_type())
104 
105 GtkWidget* visu_ui_panel_new(gchar *id, gchar* name, gchar *tabName);
106 GtkWidget* visu_ui_panel_newWithIconFromPath(gchar *id, gchar* name, gchar *tabName,
107                                              const gchar* iconPath);
108 GtkWidget* visu_ui_panel_newWithIconFromIconName(gchar *id, gchar* name, gchar *tabName,
109                                                  const gchar* icon);
110 
111 GtkWidget*        visu_ui_panel_getHeaderWidget   (VisuUiPanel *visu_ui_panel);
112 const gchar*      visu_ui_panel_getLabel          (VisuUiPanel *visu_ui_panel);
113 const gchar*      visu_ui_panel_getId             (VisuUiPanel *visu_ui_panel);
114 GtkWindow*        visu_ui_panel_getContainerWindow(VisuUiPanel *visu_ui_panel);
115 VisuUiDockWindow* visu_ui_panel_getContainer      (VisuUiPanel *visu_ui_panel);
116 const gchar*      visu_ui_panel_getContainerId    (VisuUiPanel *visu_ui_panel);
117 VisuData*         visu_ui_panel_getData           (VisuUiPanel *visu_ui_panel);
118 VisuBoxed*        visu_ui_panel_getFocused        (VisuUiPanel *visu_ui_panel);
119 VisuGlView*       visu_ui_panel_getView           (VisuUiPanel *visu_ui_panel);
120 gboolean          visu_ui_panel_getVisible        (VisuUiPanel *visu_ui_panel);
121 
122 void visu_ui_panel_setDockable   (VisuUiPanel *visu_ui_panel, gboolean value);
123 void visu_ui_panel_setContainer  (VisuUiPanel *visu_ui_panel, VisuUiDockWindow *window);
124 void visu_ui_panel_setContainerId(VisuUiPanel *visu_ui_panel, const gchar *id);
125 
126 void visu_ui_panel_attach(VisuUiPanel *visu_ui_panel, VisuUiDockWindow *dock);
127 void visu_ui_panel_detach(VisuUiPanel *visu_ui_panel);
128 
129 /* Associated variables and methods. */
130 GtkWidget* visu_ui_dock_window_getContainer(VisuUiDockWindow *dock);
131 GtkWidget* visu_ui_dock_window_getNotebook(VisuUiDockWindow *dock);
132 GtkWidget* visu_ui_dock_window_getWindow(VisuUiDockWindow *dock);
133 void       visu_ui_dock_window_getCharacteristics(VisuUiDockWindow *dock,
134                                                   gchar **id, gboolean *visibility,
135                                                   gint *x, gint *y,
136                                                   gint *width, gint *height);
137 void       visu_ui_dock_window_setSize(VisuUiDockWindow *dock,
138                                              guint width, guint height);
139 void       visu_ui_dock_window_setPosition(VisuUiDockWindow *dock,
140                                                  guint x, guint y);
141 void       visu_ui_dock_window_setVisibility(VisuUiDockWindow *dock,
142                                                    gboolean visible);
143 
144 /* Class methods. */
145 void              visu_ui_panel_class_setCurrent(VisuData *dataObj, VisuGlView *view);
146 void              visu_ui_panel_class_setHeaderVisibility(gboolean status);
147 gboolean          visu_ui_panel_class_getHeaderVisibility();
148 VisuUiDockWindow* visu_ui_panel_class_getCommandPanel(void);
149 VisuUiDockWindow* visu_ui_panel_class_getDockById(const gchar *id);
150 GList*            visu_ui_panel_class_getAllPanels(void);
151 GList*            visu_ui_panel_class_getAllWindows(void);
152 VisuUiPanel*      visu_ui_panel_class_getPanelById(const gchar *id);
153 
154 G_END_DECLS
155 
156 #endif
157