83extern cairo_surface_t *
col_surface (
double r,
double g,
double b,
int x,
int y);
84extern G_MODULE_EXPORT
void set_color_map (GtkWidget * widg, gpointer data);
85extern G_MODULE_EXPORT
void cloned_poly (GtkWidget * widg, gpointer data);
128 g_debug (
"Toggle show/hide coord:: s= %d, g= %d, c= %d", s, g,
c);
135 j += this_proj -> coord -> ntg[g][i];
148 if (k != this_proj -> modelgl -> anim -> last ->
img -> show_coord[g][j])
163 str = g_strdup_printf (
"%d", this_proj -> coord -> geolist[g][s][
c]);
165 name = g_strdup_printf (
"set-%s-s.%d.0", str, j);
168 else if (g > 1 && g < 4)
170 name = g_strdup_printf (
"set-%s-%d.%d.0", (g == 2) ?
"frag" :
"mol",
c+1,
c);
172 else if (g > 3 && g < 9)
174 name = g_strdup_printf (
"set-rshow-%d.%d.0", this_proj -> coord -> geolist[g][0][
c], j);
176 g_action_group_activate_action ((GActionGroup *)this_proj -> modelgl -> action_group, (
const gchar *)name, NULL);
179 gtk_check_menu_item_set_active ((GtkCheckMenuItem *)this_proj -> modelgl -> ogl_geom[0][g][j], k);
223 pointer.
a = the_data ->
d;
224 pointer.
b = the_data ->
c;
232 g_debug (
"Toggle label/unlabel coord:: s= %d, g= %d, c= %d, selec_sp= %d", pointer.
a, pointer.
b, pointer.
c,
selected_aspec);
266 pointer.
a = the_data ->
d;
267 pointer.
b = the_data ->
c;
275 g_debug (
"Toggle select/unselect coord:: s= %d, g= %d, c= %d, selec_sp= %d", pointer.
a, pointer.
b, pointer.
c,
selected_aspec);
319 j += this_proj -> coord -> ntg[g][i];
323 k = gtk_check_button_get_active (widg);
324 if (k != this_proj -> modelgl -> anim -> last ->
img -> show_poly[g][j])
336 str = g_strdup_printf (
"%d", this_proj -> coord -> geolist[g][s][
c]);
338 name = g_strdup_printf (
"set-%s-%d-p.%d.0", str, g, j);
341 else if (g > 3 && g < 9)
343 name = g_strdup_printf (
"set-%d-p.%d.0", this_proj -> coord -> geolist[g][0][
c], j);
345 g_action_group_activate_action ((GActionGroup *)this_proj -> modelgl -> action_group, (
const gchar *)name, NULL);
350 k = gtk_toggle_button_get_active (widg);
353 gtk_check_menu_item_set_active ((GtkCheckMenuItem *)this_proj -> modelgl -> ogl_poly[0][g][j], k);
355 this_proj -> modelgl -> anim -> last ->
img -> show_poly[g][j] = k;
358 update (this_proj -> modelgl);
380 update (this_proj -> modelgl);
403 update (this_proj -> modelgl);
423 this_proj -> modelgl -> anim -> last ->
img -> spcolor[g][s][
c].alpha = v;
426 update (this_proj -> modelgl);
439G_MODULE_EXPORT gboolean
scroll_set_poly_alpha (GtkRange * range, GtkScrollType scroll, gdouble value, gpointer data)
475 if (this_proj -> coord -> geolist[g][i][j] != -1)
490 if (this_proj -> coord -> geolist[g][i][j])
504 if (this_proj -> coord -> geolist[g][i][j] > 2)
517 for (l=0; l<this_proj -> nspec; l++)
519 m += this_proj -> coord -> partial_geo[i][j][l];
544 int i, j, k, l, m, n;
545 int p = view ->
proj;
549 gchar *
col[15] = {
" ",
"<b>Color</b>",
"<b>Show</b>",
"<b>Label</b>",
"<b>Pick</b>",
"<b>Alpha</b>",
550 "<b>Color <sup>*</sup></b>",
"<b>Show <sup>**</sup></b>",
"<b>Label <sup>**</sup></b>",
"<b>Pick <sup>**</sup></b>",
551 "<b>Ring(s) size</b>",
552 "<b>Chain(s) size</b>",
"<b>Show <sup>*</sup></b>",
"<b>Label <sup>*</sup></b>",
"<b>Pick <sup>*</sup></b>"};
553 int scol[15] = {100, 70, 65, 40, 40, 150, 70, 75, 55, 55, 100, 100, 60, 50, 55};
556 GtkWidget * coord =
create_scroll (box, -1, -1, GTK_SHADOW_NONE);
557 gtk_widget_set_hexpand (coord, TRUE);
558 gtk_widget_set_vexpand (coord, TRUE);
560 if (geo > 3 && ! poly)
562 n = (geo == 9) ? 11 : 10;
563 gtk_widget_set_size_request (coord, -1, 475);
567 add_box_child_start (GTK_ORIENTATION_VERTICAL, box,
markup_label(
"** affect all atoms that belong to ring(s) of this size", -1, -1, 0.0, 0.5), FALSE, FALSE, 0);
571 add_box_child_start (GTK_ORIENTATION_VERTICAL, box,
markup_label(
"* affect all atoms that belong to chain(s) of this size", -1, -1, 0.0, 0.5), FALSE, FALSE, 0);
582 gtk_widget_set_size_request (wb, 350, -1);
584 for (i=0; i<5-2*l-geo/9; i++)
590 else if (i == 0 && geo > 3)
594 else if (i > 0 && geo > 3 && ! poly)
598 else if (i == 1 && poly)
610 m = (geo < 2) ? this_proj -> nspec : 1;
611 if ((geo < 2 || (geo == 9 && view -> chain_max) || (geo > 3 && geo < 9 && view -> ring_max[geo-4])) && this_proj -> coord -> totcoord[geo] > 0)
613 for (i=0; i < m; i++)
617 for (j=0 ; j < this_proj -> coord -> ntg[geo][i]; j++)
619 if (
add_geo(poly, this_proj, geo, i, j))
621 str = g_strdup_printf (
" <b>%s</b>", this_proj ->
chemistry ->
label[i]);
628 for (j=0 ; j < this_proj -> coord -> ntg[geo][i]; j++, k++)
630 if (
add_geo(poly, this_proj, geo, i, j))
633 gtk_widget_set_size_request (wb, 350, -1);
637 str = g_strdup_printf (
"%d", this_proj -> coord -> geolist[geo][i][j]);
645 str = g_strdup_printf (
"%d atoms", this_proj -> coord -> geolist[geo][i][j]);
651 but =
create_hscale (0.0, 1.0, 0.01, view -> anim -> last ->
img -> spcolor[geo][i][j].alpha, GTK_POS_LEFT, 3, 160,
656 ColRGBA col = view -> anim -> last ->
img -> spcolor[geo][i][j];
660 if (poly || geo != 9)
add_box_child_start (GTK_ORIENTATION_HORIZONTAL, wb, but, FALSE, FALSE, 5);
692G_MODULE_EXPORT
void on_select_frag_mol (GtkCellRendererToggle * cell_renderer, gchar * string_path, gpointer data)
699 GtkTreePath *
path = gtk_tree_path_new_from_string (string_path);
700 g = (dat ->
b < 30) ? 2 : 3;
701 if (gtk_cell_renderer_toggle_get_active(cell_renderer))
709 gtk_tree_model_get_iter (GTK_TREE_MODEL(coord -> frag_mol_model[g-2]), & iter,
path);
710 act = dat ->
b - 10*g;
711 gtk_list_store_set (coord -> frag_mol_model[g-2], & iter, act, v, -1);
712 gtk_tree_model_get (GTK_TREE_MODEL(coord -> frag_mol_model[g-2]), & iter, 0, & i, -1);
742 cairo_surface_t * surface;
743 surface = cairo_image_surface_create (CAIRO_FORMAT_ARGB32, 70, 50);
744 cairo_t * cr = cairo_create (surface);
748 cairo_surface_destroy (surface);
750 gtk_list_store_set (store, & iter, 2,
pix, -1);
764 GtkTreeIter id_level;
765 GtkTreeIter new_level;
770 GtkListStore * store = (GtkListStore *) coord -> frag_mol_model[geo-2];
771 GtkTreeModel * mod = GTK_TREE_MODEL(coord -> frag_mol_model[geo-2]);
772 valid = gtk_tree_model_get_iter_first(mod, & id_level);
775 gtk_tree_model_get (mod, & id_level, 0, & i, -1);
788 valid = gtk_tree_model_iter_next(mod, & id_level);
796 gtk_list_store_append (store, & id_level);
797 gtk_list_store_set (store, & id_level, 0, gid,
798 1, this_proj -> modelgl -> anim -> last ->
img -> show_coord[geo][gid-1],
804 gtk_list_store_insert_before (store, & new_level, & id_level);
805 gtk_list_store_set (store, & new_level, 0, gid,
806 1, this_proj -> modelgl -> anim -> last ->
img -> show_coord[geo][gid-1],
828 if (response_id == GTK_RESPONSE_OK)
830 g = (dat ->
b < 30) ? 2 : 3;
832 gtk_tree_model_get (GTK_TREE_MODEL(
opengl_project -> modelgl -> coord_win -> frag_mol_model[g-2]), & fm_iter, 0, & i, -1);
854 g = (dat ->
b < 30) ? 2 : 3;
856 gtk_tree_model_get_iter (GTK_TREE_MODEL(
opengl_project -> modelgl -> coord_win -> frag_mol_model[g-2]), & iter,
path);
858 gtk_tree_model_get (GTK_TREE_MODEL(coord -> frag_mol_model[g-2]), & iter, 0, & i, -1);
859 gchar *
ctitle[2] = {
"Fragment",
"Molecule"};
860 gchar * str = g_strdup_printf (
"%s N°%d color",
ctitle[g-2], i);
861 GtkWidget * widg = gtk_color_chooser_dialog_new (str, GTK_WINDOW(coord -> win));
881 g_object_get (column,
"title", & title, NULL, NULL);
882 if (g_strcmp0(title,
"Color") == 0)
899 GtkTreeViewColumn * frag_mol_col[7];
900 GtkCellRenderer * frag_mol_cell[7];
901 gchar *
ctitle[5]={
"Id.",
"Show",
"Color",
"Label",
"Pick"};
902 gchar * ctype[5]={
"text",
"active",
"pixbuf",
"active",
"active"};
903 GType
col_type[5]={G_TYPE_INT, G_TYPE_BOOLEAN, G_TYPE_OBJECT, G_TYPE_BOOLEAN, G_TYPE_BOOLEAN};
905 coord -> frag_mol_model[geo-2] = gtk_list_store_newv (5,
col_type);
906 GtkWidget * frag_mol_tree = gtk_tree_view_new_with_model (GTK_TREE_MODEL(coord -> frag_mol_model[geo-2]));
911 frag_mol_cell[i] = gtk_cell_renderer_text_new ();
915 frag_mol_cell[i] = gtk_cell_renderer_pixbuf_new ();
919 frag_mol_cell[i] = gtk_cell_renderer_toggle_new ();
920 g_signal_connect (G_OBJECT(frag_mol_cell[i]),
"toggled", G_CALLBACK(
on_select_frag_mol), & this_proj -> modelgl ->
colorp[geo*10+i][0]);
922 gtk_cell_renderer_set_fixed_size (frag_mol_cell[i], 70, 25);
923 frag_mol_col[i] = gtk_tree_view_column_new_with_attributes (
ctitle[i], frag_mol_cell[i], ctype[i], i, NULL);
924 gtk_tree_view_append_column(GTK_TREE_VIEW(frag_mol_tree), frag_mol_col[i]);
925 gtk_tree_view_column_set_alignment (frag_mol_col[i], 0.5);
927 g_object_set (frag_mol_tree,
"activate-on-single-click", TRUE, NULL, NULL);
929 return frag_mol_tree;
944 int v = (int)atof(m);
947 if (v > 0 && v <= this_proj -> coord -> totcoord[g])
968 gchar * obj[2] = {
"fragment",
"molecule"};
969 gchar * str = g_strdup_printf (
"Too many <b>%ss</b> in your model !\n"
970 " It is impossible to display the entire list ...\n"
971 "... instead you can look for %s(s) 'manually':\n", obj[geo-2], obj[geo-2]);
974 gchar * search_item[2]={
"Fragment ID:",
"Molecule ID:"};
983 str = g_strdup_printf (
"in [%d - %d]", 1, this_proj -> coord -> totcoord[geo]);
989 return frag_mol_search;
1005 int scol[5] = {70, 70, 65, 40, 40};
1006 gchar *
col[5] = {
"<b>Id</b>",
"<b>Color</b>",
"<b>Show</b>",
"<b>Label</b>",
"<b>Pick</b>"};
1009 GtkWidget * fragmol =
create_scroll (box, -1, -1, GTK_SHADOW_NONE);
1010 gtk_widget_set_hexpand (fragmol, TRUE);
1011 gtk_widget_set_vexpand (fragmol, TRUE);
1013 i = this_proj -> coord -> totcoord[geo];
1023 gtk_widget_set_size_request (wb, 350, -1);
1032 gtk_widget_set_size_request (wb, 300, -1);
1035 str = g_strdup_printf (
"N°%d", j+1);
1038 ColRGBA col = view -> anim -> last ->
img -> spcolor[geo][0][j];
1071 int i = gtk_combo_box_get_active (box);
1072 int j = view -> cmap[i];
1074 gchar * variant = g_strdup_printf (
"set-amap.%d.0", j);
1075 g_action_group_activate_action ((GActionGroup *)view -> action_group,
"set-amap", g_variant_new_string((
const gchar *)variant));
1079 gtk_check_menu_item_set_active ((GtkCheckMenuItem *)view -> color_styles[j], TRUE);
1094 int i = gtk_combo_box_get_active (box);
1097 gchar * variant = g_strdup_printf (
"set-pmap.%d.0", j);
1098 g_action_group_activate_action ((GActionGroup *)view -> action_group,
"set-pmap", g_variant_new_string((
const gchar *)variant));
1102 gtk_check_menu_item_set_active ((GtkCheckMenuItem *)view -> color_styles[j], TRUE);
1130 view -> anim -> last ->
img ->
cloned_poly = gtk_check_button_get_active (Button);
1131 g_action_group_activate_action ((GActionGroup *)view -> action_group,
"set-cloned-poly.0.0", NULL);
1137 gtk_check_menu_item_set_active ((GtkCheckMenuItem *)view -> ogl_clones[5], gtk_toggle_button_get_active (Button));
1155 GtkWidget *
lab = gtk_label_new (
"<b>Atom(s) and bond(s) color map:</b>");
1156 gtk_label_set_use_markup (GTK_LABEL(
lab), 1);
1165 if (i == 1 || i == 2)
1167 view -> cmap[j] = i;
1173 view -> cmap[j] = i;
1177 else if (i == 6 && view -> custom_map != NULL)
1179 view -> cmap[j] = i;
1183 else if (i == 0 || (i == 3 && view -> adv_bonding[0]) || (i == 4 && view -> adv_bonding[1]))
1185 view -> cmap[j] = i;
1193 if (view -> anim -> last ->
img -> color_map[0] == view -> cmap[k])
1199 gtk_combo_box_set_active (GTK_COMBO_BOX(
color_box), l);
1205 lab = gtk_label_new (
"<b>Polyhedra color map:</b>");
1206 gtk_label_set_use_markup (GTK_LABEL(
lab), 1);
1214 if (i == 1 || i == 2)
1218 else if (i == 0 || (i == 3 && view -> adv_bonding[0]) || (i == 4 && view -> adv_bonding[1]))
1226 else if (i == 6 && view -> custom_map != NULL)
1234 if (view -> anim -> last ->
img -> color_map[1] == view -> cmap[k])
1240 gtk_combo_box_set_active (GTK_COMBO_BOX(
color_box), l);
1246 "using the PBC even if the clones are not shown:</b>", -1, -1, 0.5, 0.5),
1255 "The clones are the replica of the atoms linked by PBC.", -1, -1, 0.5, 0.5),
1272 g_free (view -> coord_win);
1273 view -> coord_win = NULL;
1313 gchar * str = g_strdup_printf (
"Environments configuration - %s",
get_project_by_id(view ->
proj)->name);
1314 GtkWidget * win =
create_win (str, view -> win, FALSE, FALSE);
1316 char * rings_short[5] = {
"AR",
"KR",
"GR",
"PR",
"SR"};
1319 gtk_widget_set_size_request (win, 625, 600);
1320 view -> coord_win -> notebook = gtk_notebook_new ();
1321 gtk_notebook_set_scrollable (GTK_NOTEBOOK(view -> coord_win -> notebook), TRUE);
1322 gtk_notebook_set_tab_pos (GTK_NOTEBOOK(view -> coord_win -> notebook), GTK_POS_LEFT);
1323 gtk_widget_show (view -> coord_win -> notebook);
1324 gtk_widget_set_size_request (view -> coord_win -> notebook, 600, 550);
1326 gtk_notebook_append_page (GTK_NOTEBOOK(view -> coord_win -> notebook),
param_tab (view), gtk_label_new (
"Parameters"));
1327 gtk_notebook_append_page (GTK_NOTEBOOK(view -> coord_win -> notebook),
coord_tab (view, 0, 0),
markup_label(
"Total coordination(s) <b>[TC]</b>", -1, -1, 0.0, 0.5));
1328 gtk_notebook_append_page (GTK_NOTEBOOK(view -> coord_win -> notebook),
coord_tab (view, 1, 0),
markup_label(
"Partial coordination(s) <b>[PC]</b>", -1, -1, 0.0, 0.5));
1337 if (view -> ring_max[i])
1341 str = g_strdup_printf (
"%s ring(s) <b>[%s]</b>",
rings_type[i], rings_short[i]);
1342 gtk_notebook_append_page (GTK_NOTEBOOK(view -> coord_win -> notebook),
coord_tab (view, i+4, 0),
markup_label(str, -1, -1, 0.0, 0.5));
1347 if (view ->
chains && view -> chain_max)
1350 gtk_notebook_append_page (GTK_NOTEBOOK(view -> coord_win -> notebook),
coord_tab (view, 9, 0),
markup_label(
"Chain(s)", -1, -1, 0.0, 0.5));
1354 gtk_notebook_append_page (GTK_NOTEBOOK(view -> coord_win -> notebook),
coord_tab (view, 0, 1),
markup_label(
"Polyhedra from <b>TC</b>", -1, -1, 0.0, 0.5));
1356 gtk_notebook_append_page (GTK_NOTEBOOK(view -> coord_win -> notebook),
coord_tab (view, 1, 1),
markup_label(
"Polyhedra from <b>PC</b>", -1, -1, 0.0, 0.5));
1361 if (view -> ring_max[i])
1364 str = g_strdup_printf (
"Polyhedra from <b>%s</b>", rings_short[i]);
1365 gtk_notebook_append_page (GTK_NOTEBOOK(view -> coord_win -> notebook),
coord_tab (view, i+4, 1),
markup_label(str, -1, -1, 0.0, 0.5));
1371 if (view -> adv_bonding[0])
1374 gtk_notebook_append_page (GTK_NOTEBOOK(view -> coord_win -> notebook),
fragmol_tab (view, 2),
markup_label (
"Fragment(s)", -1, -1, 0.0, 0.5));
1376 if (view -> adv_bonding[1])
1379 gtk_notebook_append_page (GTK_NOTEBOOK(view -> coord_win -> notebook),
fragmol_tab (view, 3),
markup_label (
"Molecule(s)", -1, -1, 0.0, 0.5));
1386 if (view -> ring_max[i])
1389 str = g_strdup_printf (
"Isolated ring(s) from <b>%s</b>", rings_short[i]);
1390 gtk_notebook_append_page (GTK_NOTEBOOK(view -> coord_win -> notebook),
rings_tab (view, i),
markup_label(str, -1, -1, 0.0, 0.5));
1396 if (view ->
chains && view -> chain_max)
1399 gtk_notebook_append_page (GTK_NOTEBOOK(view -> coord_win -> notebook),
chains_tab (view),
markup_label(
"Isolated chain(s)", -1, -1, 0.0, 0.5));
1408 gtk_notebook_set_current_page (GTK_NOTEBOOK (view -> coord_win -> notebook), page);
1424 if (geo == 30)
return 0;
1427 i = (geo < 2) ? 3 : 0;
1432 if (view -> ring_max[j]) i ++;
1435 i = (geo < 2) ? i + geo : 4 + 2*i;
1446 if (view -> ring_max[j]) i ++;
1451 i = 2*(i+2) + geo - 1;
1458 if (view -> ring_max[j])
1460 if (geo == 4 + j)
break;
1488 if (view -> coord_win == NULL)
1490 view -> coord_win = g_malloc0 (
sizeof*view -> coord_win);
1493 else if (GTK_IS_WIDGET(view -> coord_win -> win))
1495 gtk_widget_show (view -> coord_win -> win);
1496 gtk_notebook_set_current_page (GTK_NOTEBOOK (view -> coord_win -> notebook), page);
1500 show_warning (
"Error impossible to display the coordination window !", view -> win);
Binding to the Fortran90 subroutines.
integer(kind=c_int) function bonding(scf, sbf, adv, bdist, bmin, delt_ij, sfil)
integer function chains()
integer(kind=c_int) function chemistry()
GtkWidget * color_box(glwin *view, int ideo, int spec, int geo)
create the color palette pointers and menus GTK3 version
void label(cairo_t *cr, double val, int axe, int p, project *this_proj)
draw axis label
void init_default_shaders(glwin *view)
re-initialize the default OpenGL shaders
gchar * ctitle[MAXDATA][12]
GType col_type[MAXDATA][12]
Global variable declarations Global convenience function declarations Global data structure defin...
GdkPixbuf * convert_to_pixbuf(cairo_surface_t *surf)
convert cairo surface to GdkPixbuf
void run_this_gtk_dialog(GtkWidget *dial, GCallback handler, gpointer data)
run a GTK (3 and 4) basic GtkDialog
GtkWidget * create_entry(GCallback handler, int dim, int cdim, gboolean key_release, gpointer data)
Create a GtkEntry.
GtkWidget * create_scroll(GtkWidget *box, int dimx, int dimy, int shadow)
create a scroll window
void set_color_chooser_color(GtkWidget *color_win, ColRGBA col)
set the color of a color selection window
GtkWidget * create_win(gchar *str, GtkWidget *parent, gboolean modal, gboolean resiz)
create a new GtkWindow
ColRGBA get_window_color(GtkWidget *color_win)
get the ColRGBA color from a color selection window
const gchar * entry_get_text(GtkEntry *entry)
get the text in a GtkEntry
void opengl_project_changed(int id)
change the OpenGL project
void add_gtk_close_event(GtkWidget *widg, GCallback handler, gpointer data)
add a close event signal and callback to a GtkWidget
GtkWidget * check_button(gchar *text, int dimx, int dimy, gboolean state, GCallback handler, gpointer data)
create a check button
G_MODULE_EXPORT void label_unlabel_coord(GtkWidget *widg, gpointer data)
label / unlabel a type of coordination callback GTK3
GtkWidget * create_button(gchar *text, int image_format, gchar *image, int dimx, int dimy, int relief, GCallback handler, gpointer data)
create a simple button
GtkWidget * create_combo()
create a GtkCombox widget, note deprecated in GTK4
GtkWidget * markup_label(gchar *text, int dimx, int dimy, float ax, float ay)
void add_box_child_start(int orientation, GtkWidget *widg, GtkWidget *child, gboolean expand, gboolean fill, int padding)
Add a GtkWidget in a GtkBox at the initial position.
ColRGBA get_button_color(GtkColorChooser *colob)
get the ColRGBA color from a GtkColorChooser button
void widget_set_sensitive(GtkWidget *widg, gboolean sensitive)
Set sensitivity for a GtkWidget, ensuring it is a GtkWidget.
void destroy_this_dialog(GtkDialog *dialog)
destroy a GtkDialog
GtkWidget * create_hbox(int spacing)
create a GtkBox with horizontal orientation
void gtk_label_align(GtkWidget *lab, float ax, float ay)
set text alignment in a GtkLabel
void combo_text_append(GtkWidget *combo, gchar *text)
append text in GtkComboBox widget
GtkWidget * destroy_this_widget(GtkWidget *widg)
destroy a GtkWidget
GtkWidget * color_button(ColRGBA col, gboolean alpha, int dimx, int dimy, GCallback handler, gpointer data)
create a color selection button
G_MODULE_EXPORT void select_unselect_coord(GtkWidget *widg, gpointer data)
select / unselect a type of coordination callback GTK3
GtkWidget * create_hscale(float min, float max, float delta, float val, int pos, int round, int size, GCallback handler, GCallback scroll_handler, gpointer data)
create an horizontal scale GtkWidget
void add_box_child_end(GtkWidget *widg, GtkWidget *child, gboolean expand, gboolean fill, int padding)
Add a GtkWidget in a GtkBox at the end position.
void update_entry_text(GtkEntry *entry, gchar *text)
update the content of a GtkEntry as string
G_MODULE_EXPORT void show_hide_the_coord(GtkWidget *widg, gpointer data)
show / hide a type of coordination callback GTK3
void add_container_child(int type, GtkWidget *widg, GtkWidget *child)
Add a GtkWidget into another GtkWidget.
GtkWidget * create_vbox(int spacing)
create a GtkBox with vertical orientation
void show_the_widgets(GtkWidget *widg)
show GtkWidget
project * get_project_by_id(int p)
get project pointer using id number
void update(glwin *view)
update the rendering of the OpenGL window
Variable declarations related to the OpenGL window Function declarations related to the OpenGL wind...
void re_create_md_shaders(int nshaders, int shaders[nshaders], project *this_proj)
re-initialize some MD dependent OpenGL shaders
gboolean is_coord_in_menu(int id, project *this_proj)
is this coordination in a menu ?
shaders
The different types of shaders in the atomes program.
Function declarations for the creation of the OpenGL window.
void show_warning(char *warning, GtkWidget *win)
show warning
gchar * env_name(project *this_proj, int g, int s, int f, GtkTextBuffer *buffer)
ouput the name of a coordination sphere
gchar * exact_name(gchar *name)
short cut to print string without spaces
Messaging function declarations.
void add_this_frag_mol_to_search_tree(project *this_proj, int geo, int gid)
add fragment or molecule in the search tree
char * text_maps[ATOM_MAPS]
G_MODULE_EXPORT gboolean close_event_coord(GtkWidget *widg, GdkEvent *event, gpointer data)
environments configuration window close event callback GTK3
G_MODULE_EXPORT void toggled_select_unselect_coord(GtkToggleButton *widg, gpointer data)
toggle select / unselect coordination callback GTK3
G_MODULE_EXPORT void coord_properties(GtkWidget *widg, gpointer data)
create the environments configuration window
G_MODULE_EXPORT void cloned_poly(GtkWidget *widg, gpointer data)
cloned polyehdra callback - GTK3
GtkWidget * fragmol_tab(glwin *view, int geo)
create fragment(s) or molecule(s) tab
G_MODULE_EXPORT void to_set_this_frag_mol_color(GtkTreeView *tree_view, GtkTreePath *path, GtkTreeViewColumn *column, gpointer data)
set fragment/molecule color tree view callback
G_MODULE_EXPORT void set_poly_color_map_box(GtkComboBox *box, gpointer data)
change polyhedra color map
G_MODULE_EXPORT void set_color_frag_mol(GtkColorChooser *colob, gpointer data)
set fragment or molecule color
GtkWidget * create_frag_mol_tree(project *this_proj, int geo)
create the fragment(s) / molecule(s) search tree store
GtkWidget * coord_tab(glwin *view, int geo, int poly)
create coordination(s) and polyhedra tab
GtkWidget * param_tab(glwin *view)
environments configuration window parameters tab
G_MODULE_EXPORT void run_set_this_frag_mol_color(GtkDialog *win, gint response_id, gpointer data)
set fragment / molecule color - running the dialog
G_MODULE_EXPORT void toggled_label_unlabel_coord(GtkToggleButton *widg, gpointer data)
toggle label / unlabel coordination callback GTK3
G_MODULE_EXPORT void set_color_coord(GtkColorChooser *colob, gpointer data)
set coordination color
void set_frag_mol_cell_background(GtkListStore *store, GtkTreeIter iter, ColRGBA col)
set tree store cell background color
cairo_surface_t * col_surface(double r, double g, double b, int x, int y)
create a cairo sufrace painted with the appropriate color
G_MODULE_EXPORT void update_frag_mol_search(GtkEntry *res, gpointer data)
update the fragment(s) / molecule(s) search widget
G_MODULE_EXPORT void on_select_frag_mol(GtkCellRendererToggle *cell_renderer, gchar *string_path, gpointer data)
tree store action on cell selection
GtkWidget * create_frag_mol_search(project *this_proj, int geo)
create the frgament(s)/molecule(s) search widget
void poly_alpha_has_changed(gpointer data, GLfloat v)
change polyhedra opacity
GtkWidget * chains_tab(glwin *view)
create the chain(s) tab for the advanced environments window
GtkWidget * advanced_coord_properties(glwin *view, int page)
create the environments configuration window
G_MODULE_EXPORT void close_coord(GtkButton *but, gpointer data)
environments configuration window close button
void set_this_frag_mol_color(gpointer data, GtkTreePath *path)
set fragment / molecule color - creating the dialog
G_MODULE_EXPORT gboolean scroll_set_poly_alpha(GtkRange *range, GtkScrollType scroll, gdouble value, gpointer data)
set polyhedra opacity - scroll callback
G_MODULE_EXPORT void toggled_show_hide_poly(GtkToggleButton *widg, gpointer data)
toggle show / hide polyhedra callback GTK3
GtkWidget * rings_tab(glwin *view, int g)
create the ring(s) tab for the advanced environments window
G_MODULE_EXPORT void set_color_map(GtkWidget *widg, gpointer data)
set color map callback
G_MODULE_EXPORT void toggled_show_hide_coord(GtkToggleButton *widg, gpointer data)
toggle show / hide coordination callback GTK3
int get_page_from_geo_coord(glwin *view, int geo, int coord)
find the proper page to display in the notebook
G_MODULE_EXPORT void set_poly_alpha(GtkRange *range, gpointer data)
set polyhedra opacity - range callback
gboolean add_geo(int poly, project *this_proj, int g, int i, int j)
test add this geometry data to the tree store or not ?
G_MODULE_EXPORT void on_cloned_poly_toggled(GtkToggleButton *Button, gpointer data)
toggle show / hide cloned polyhedra callback GTK3
G_MODULE_EXPORT void set_atom_color_map_box(GtkComboBox *box, gpointer data)
change atom color map