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-%d-%d-coord.%d.0", g, this_proj -> coord -> geolist[g][0][j], 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-%d-p.%d.0", g, this_proj -> coord -> geolist[g][0][j], 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};
555 GtkWidget * coord =
create_scroll (box, -1, -1, GTK_SHADOW_NONE);
556 gtk_widget_set_hexpand (coord, TRUE);
557 gtk_widget_set_vexpand (coord, TRUE);
559 if (geo > 3 && ! poly)
561 n = (geo == 9) ? 11 : 10;
562 gtk_widget_set_size_request (coord, -1, 475);
566 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);
570 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);
581 gtk_widget_set_size_request (wb, 350, -1);
583 for (i=0; i<5-2*l-geo/9; i++)
589 else if (i == 0 && geo > 3)
593 else if (i > 0 && geo > 3 && ! poly)
597 else if (i == 1 && poly)
609 m = (geo < 2) ? this_proj -> nspec : 1;
610 if ((geo < 2 || (geo == 9 && view -> chain_max) || (geo > 3 && geo < 9 && view -> ring_max[geo-4])) && this_proj -> coord -> totcoord[geo] > 0)
612 for (i=0; i < m; i++)
616 for (j=0 ; j < this_proj -> coord -> ntg[geo][i]; j++)
618 if (
add_geo(poly, this_proj, geo, i, j))
620 str = g_strdup_printf (
" <b>%s</b>", this_proj ->
chemistry ->
label[i]);
627 for (j=0 ; j < this_proj -> coord -> ntg[geo][i]; j++, k++)
629 if (
add_geo(poly, this_proj, geo, i, j))
632 gtk_widget_set_size_request (wb, 350, -1);
636 str = g_strdup_printf (
"%d", this_proj -> coord -> geolist[geo][i][j]);
644 str = g_strdup_printf (
"%d atoms", this_proj -> coord -> geolist[geo][i][j]);
650 but =
create_hscale (0.0, 1.0, 0.01, view -> anim -> last ->
img -> spcolor[geo][i][j].alpha, GTK_POS_LEFT, 3, 160,
655 ColRGBA col = view -> anim -> last ->
img -> spcolor[geo][i][j];
659 if (poly || geo != 9)
add_box_child_start (GTK_ORIENTATION_HORIZONTAL, wb, but, FALSE, FALSE, 5);
691G_MODULE_EXPORT
void on_select_frag_mol (GtkCellRendererToggle * cell_renderer, gchar * string_path, gpointer data)
698 GtkTreePath *
path = gtk_tree_path_new_from_string (string_path);
699 g = (dat ->
b < 30) ? 2 : 3;
700 if (gtk_cell_renderer_toggle_get_active(cell_renderer))
708 gtk_tree_model_get_iter (GTK_TREE_MODEL(coord -> frag_mol_model[g-2]), & iter,
path);
709 act = dat ->
b - 10*g;
710 gtk_list_store_set (coord -> frag_mol_model[g-2], & iter, act, v, -1);
711 gtk_tree_model_get (GTK_TREE_MODEL(coord -> frag_mol_model[g-2]), & iter, 0, & i, -1);
741 cairo_surface_t * surface;
742 surface = cairo_image_surface_create (CAIRO_FORMAT_ARGB32, 70, 50);
743 cairo_t * cr = cairo_create (surface);
747 cairo_surface_destroy (surface);
749 gtk_list_store_set (store, & iter, 2,
pix, -1);
763 GtkTreeIter id_level;
764 GtkTreeIter new_level;
769 GtkListStore * store = (GtkListStore *) coord -> frag_mol_model[geo-2];
770 GtkTreeModel * mod = GTK_TREE_MODEL(coord -> frag_mol_model[geo-2]);
771 valid = gtk_tree_model_get_iter_first(mod, & id_level);
774 gtk_tree_model_get (mod, & id_level, 0, & i, -1);
787 valid = gtk_tree_model_iter_next(mod, & id_level);
795 gtk_list_store_append (store, & id_level);
796 gtk_list_store_set (store, & id_level, 0, gid,
797 1, this_proj -> modelgl -> anim -> last ->
img -> show_coord[geo][gid-1],
803 gtk_list_store_insert_before (store, & new_level, & id_level);
804 gtk_list_store_set (store, & new_level, 0, gid,
805 1, this_proj -> modelgl -> anim -> last ->
img -> show_coord[geo][gid-1],
827 if (response_id == GTK_RESPONSE_OK)
829 g = (dat ->
b < 30) ? 2 : 3;
831 gtk_tree_model_get (GTK_TREE_MODEL(
opengl_project -> modelgl -> coord_win -> frag_mol_model[g-2]), & fm_iter, 0, & i, -1);
853 g = (dat ->
b < 30) ? 2 : 3;
855 gtk_tree_model_get_iter (GTK_TREE_MODEL(
opengl_project -> modelgl -> coord_win -> frag_mol_model[g-2]), & iter,
path);
857 gtk_tree_model_get (GTK_TREE_MODEL(coord -> frag_mol_model[g-2]), & iter, 0, & i, -1);
858 gchar *
ctitle[2] = {
"Fragment",
"Molecule"};
859 gchar * str = g_strdup_printf (
"%s N°%d color",
ctitle[g-2], i);
860 GtkWidget * widg = gtk_color_chooser_dialog_new (str, GTK_WINDOW(coord -> win));
880 g_object_get (column,
"title", & title, NULL, NULL);
881 if (g_strcmp0(title,
"Color") == 0)
898 GtkTreeViewColumn * frag_mol_col[7];
899 GtkCellRenderer * frag_mol_cell[7];
900 gchar *
ctitle[5]={
"Id.",
"Show",
"Color",
"Label",
"Pick"};
901 gchar * ctype[5]={
"text",
"active",
"pixbuf",
"active",
"active"};
902 GType
col_type[5]={G_TYPE_INT, G_TYPE_BOOLEAN, G_TYPE_OBJECT, G_TYPE_BOOLEAN, G_TYPE_BOOLEAN};
904 coord -> frag_mol_model[geo-2] = gtk_list_store_newv (5,
col_type);
905 GtkWidget * frag_mol_tree = gtk_tree_view_new_with_model (GTK_TREE_MODEL(coord -> frag_mol_model[geo-2]));
910 frag_mol_cell[i] = gtk_cell_renderer_text_new ();
914 frag_mol_cell[i] = gtk_cell_renderer_pixbuf_new ();
918 frag_mol_cell[i] = gtk_cell_renderer_toggle_new ();
919 g_signal_connect (G_OBJECT(frag_mol_cell[i]),
"toggled", G_CALLBACK(
on_select_frag_mol), & this_proj -> modelgl ->
colorp[geo*10+i][0]);
921 gtk_cell_renderer_set_fixed_size (frag_mol_cell[i], 70, 25);
922 frag_mol_col[i] = gtk_tree_view_column_new_with_attributes (
ctitle[i], frag_mol_cell[i], ctype[i], i, NULL);
923 gtk_tree_view_append_column(GTK_TREE_VIEW(frag_mol_tree), frag_mol_col[i]);
924 gtk_tree_view_column_set_alignment (frag_mol_col[i], 0.5);
926 g_object_set (frag_mol_tree,
"activate-on-single-click", TRUE, NULL, NULL);
928 return frag_mol_tree;
946 if (v > 0 && v <= this_proj -> coord -> totcoord[g])
967 gchar * obj[2] = {
"fragment",
"molecule"};
968 gchar * str = g_strdup_printf (
"Too many <b>%ss</b> in your model !\n"
969 " It is impossible to display the entire list ...\n"
970 "... instead you can look for %s(s) 'manually':\n", obj[geo-2], obj[geo-2]);
973 gchar * search_item[2]={
"Fragment ID:",
"Molecule ID:"};
982 str = g_strdup_printf (
"in [%d - %d]", 1, this_proj -> coord -> totcoord[geo]);
988 return frag_mol_search;
1004 int scol[5] = {70, 70, 65, 40, 40};
1005 gchar *
col[5] = {
"<b>Id</b>",
"<b>Color</b>",
"<b>Show</b>",
"<b>Label</b>",
"<b>Pick</b>"};
1008 GtkWidget * fragmol =
create_scroll (box, -1, -1, GTK_SHADOW_NONE);
1009 gtk_widget_set_hexpand (fragmol, TRUE);
1010 gtk_widget_set_vexpand (fragmol, TRUE);
1012 i = this_proj -> coord -> totcoord[geo];
1022 gtk_widget_set_size_request (wb, 350, -1);
1031 gtk_widget_set_size_request (wb, 300, -1);
1034 str = g_strdup_printf (
"N°%d", j+1);
1037 ColRGBA col = view -> anim -> last ->
img -> spcolor[geo][0][j];
1070 int i = gtk_combo_box_get_active (box);
1071 int j = view -> cmap[i];
1073 gchar * variant = g_strdup_printf (
"set-amap.%d.0", j);
1074 g_action_group_activate_action ((GActionGroup *)view -> action_group,
"set-amap", g_variant_new_string((
const gchar *)variant));
1078 gtk_check_menu_item_set_active ((GtkCheckMenuItem *)view -> color_styles[j], TRUE);
1093 int i = gtk_combo_box_get_active (box);
1096 gchar * variant = g_strdup_printf (
"set-pmap.%d.0", j);
1097 g_action_group_activate_action ((GActionGroup *)view -> action_group,
"set-pmap", g_variant_new_string((
const gchar *)variant));
1101 gtk_check_menu_item_set_active ((GtkCheckMenuItem *)view -> color_styles[j], TRUE);
1129 view -> anim -> last ->
img ->
cloned_poly = gtk_check_button_get_active (Button);
1130 g_action_group_activate_action ((GActionGroup *)view -> action_group,
"set-cloned-poly.0.0", NULL);
1136 gtk_check_menu_item_set_active ((GtkCheckMenuItem *)view -> ogl_clones[5], gtk_toggle_button_get_active (Button));
1154 GtkWidget *
lab = gtk_label_new (
"<b>Atom(s) and bond(s) color map:</b>");
1155 gtk_label_set_use_markup (GTK_LABEL(
lab), 1);
1164 if (i == 1 || i == 2)
1166 view -> cmap[j] = i;
1172 view -> cmap[j] = i;
1176 else if (i == 6 && view -> custom_map != NULL)
1178 view -> cmap[j] = i;
1182 else if (i == 0 || (i == 3 && view -> adv_bonding[0]) || (i == 4 && view -> adv_bonding[1]))
1184 view -> cmap[j] = i;
1192 if (view -> anim -> last ->
img -> color_map[0] == view -> cmap[k])
1198 gtk_combo_box_set_active (GTK_COMBO_BOX(
color_box), l);
1204 lab = gtk_label_new (
"<b>Polyhedra color map:</b>");
1205 gtk_label_set_use_markup (GTK_LABEL(
lab), 1);
1213 if (i == 1 || i == 2)
1217 else if (i == 0 || (i == 3 && view -> adv_bonding[0]) || (i == 4 && view -> adv_bonding[1]))
1225 else if (i == 6 && view -> custom_map != NULL)
1233 if (view -> anim -> last ->
img -> color_map[1] == view -> cmap[k])
1239 gtk_combo_box_set_active (GTK_COMBO_BOX(
color_box), l);
1245 "using the PBC even if the clones are not shown:</b>", -1, -1, 0.5, 0.5),
1254 "The clones are the replica of the atoms linked by PBC.", -1, -1, 0.5, 0.5),
1271 g_free (view -> coord_win);
1272 view -> coord_win = NULL;
1312 gchar * str = g_strdup_printf (
"Environments configuration - %s",
get_project_by_id(view ->
proj)->name);
1313 GtkWidget * win =
create_win (str, view -> win, FALSE, FALSE);
1315 char * rings_short[5] = {
"AR",
"KR",
"GR",
"PR",
"SR"};
1318 gtk_widget_set_size_request (win, 625, 600);
1319 view -> coord_win -> notebook = gtk_notebook_new ();
1320 gtk_notebook_set_scrollable (GTK_NOTEBOOK(view -> coord_win -> notebook), TRUE);
1321 gtk_notebook_set_tab_pos (GTK_NOTEBOOK(view -> coord_win -> notebook), GTK_POS_LEFT);
1323 gtk_widget_set_size_request (view -> coord_win -> notebook, 600, 550);
1325 gtk_notebook_append_page (GTK_NOTEBOOK(view -> coord_win -> notebook),
param_tab (view), gtk_label_new (
"Parameters"));
1326 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));
1327 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));
1334 if (view -> ring_max[i])
1336 str = g_strdup_printf (
"%s ring(s) <b>[%s]</b>",
rings_type[i], rings_short[i]);
1337 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));
1342 if (view ->
chains && view -> chain_max)
1344 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));
1346 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));
1347 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));
1352 if (view -> ring_max[i])
1354 str = g_strdup_printf (
"Polyhedra from <b>%s</b>", rings_short[i]);
1355 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));
1361 if (view -> adv_bonding[0])
1363 gtk_notebook_append_page (GTK_NOTEBOOK(view -> coord_win -> notebook),
fragmol_tab (view, 2),
markup_label (
"Fragment(s)", -1, -1, 0.0, 0.5));
1365 if (view -> adv_bonding[1])
1367 gtk_notebook_append_page (GTK_NOTEBOOK(view -> coord_win -> notebook),
fragmol_tab (view, 3),
markup_label (
"Molecule(s)", -1, -1, 0.0, 0.5));
1374 if (view -> ring_max[i])
1376 str = g_strdup_printf (
"Isolated ring(s) from <b>%s</b>", rings_short[i]);
1377 gtk_notebook_append_page (GTK_NOTEBOOK(view -> coord_win -> notebook),
rings_tab (view, i),
markup_label(str, -1, -1, 0.0, 0.5));
1383 if (view ->
chains && view -> chain_max)
1385 gtk_notebook_append_page (GTK_NOTEBOOK(view -> coord_win -> notebook),
chains_tab (view),
markup_label(
"Isolated chain(s)", -1, -1, 0.0, 0.5));
1394 gtk_notebook_set_current_page (GTK_NOTEBOOK (view -> coord_win -> notebook), page);
1410 if (geo == 30)
return 0;
1413 i = (geo < 2) ? 3 : 0;
1418 if (view -> ring_max[j]) i ++;
1421 i = (geo < 2) ? i + geo : 4 + 2*i;
1432 if (view -> ring_max[j]) i ++;
1437 i = 2*(i+2) + geo - 1;
1444 if (view -> ring_max[j])
1446 if (geo == 4 + j)
break;
1474 if (view -> coord_win == NULL)
1476 view -> coord_win = g_malloc0 (
sizeof*view -> coord_win);
1479 else if (GTK_IS_WIDGET(view -> coord_win -> win))
1482 gtk_notebook_set_current_page (GTK_NOTEBOOK (view -> coord_win -> notebook), page);
1486 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]
double string_to_double(gpointer string)
convert string to double
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