157extern G_MODULE_EXPORT
void render_gl_image (GtkWidget * widg, gpointer data);
158extern G_MODULE_EXPORT
void coord_properties (GtkWidget * widg, gpointer data);
169extern GSimpleActionGroup * view_pop_actions;
171extern GtkWidget * color_palette (
glwin * view,
int ideo,
int spec,
int geo);
200 return (view -> atom_win -> visible || view -> selection_mode ==
NSELECTION-1) ? 1 : 0;
232 if (! view -> fullscreen)
234 gtk_window_fullscreen (GTK_WINDOW(view -> win));
236 view -> fullscreen = TRUE;
240 gtk_window_unfullscreen (GTK_WINDOW(view -> win));
242 view -> fullscreen = FALSE;
262 if (g_strcmp0 (_(
text_styles[i]), str) == 0)
return i;
285 g_free (this_search);
287 if (this_proj -> modelgl -> atom_win)
289 if (! this_proj -> modelgl -> atom_win -> visible)
291 if (! this_proj -> modelgl -> cell_win || ! this_proj -> modelgl -> cell_win -> slab_passivate)
293 g_free (this_proj -> modelgl -> atom_win);
294 this_proj -> modelgl -> atom_win = NULL;
319 i = GPOINTER_TO_INT(data);
356 else if (
sel -> a == 2)
377 selat = selat -> next;
393 const gchar * act = g_action_get_name(G_ACTION(
action));
397 if (strstr(act,
"set-mol-ins"))
399 act_end = g_strdup_printf (
"%c%c", act[k-4], act[k-3]);
400 for (i=0;
mol[i].type ||
mol[i].object; i++)
404 str = (i < 10) ? g_strdup_printf (
".%d", i) : g_strdup_printf (
"%d", i);
405 if (g_strcmp0(str, act_end) == 0)
409 if (i == 9 || i == 13 || i == 16 || i == 17)
411 return g_strdup_printf (
"%s", _(
mol[i].
object));
415 return g_strdup_printf (
"%s",
mol[i].
object);
424 if (strstr(act,
"set-ifp"))
426 act_end = g_strdup_printf (
"%c%c%c%c", act[k-6], act[k-5], act[k-4], act[k-3]);
433 str = g_strdup_printf (
"-%d.%d", j, i);
434 if (g_strcmp0(str, act_end) == 0)
476 gboolean replace = TRUE;
499 lab = g_strdup_printf (
"%s", gtk_menu_item_get_label (GTK_MENU_ITEM(widg)));
504 lab = g_strdup_printf (_(
"Copied Data"));
513 i = GPOINTER_TO_INT(data);
550 else if (
sel -> a == 2)
573 selat = selat -> next;
597 selat = selat -> next;
617 str = g_strdup_printf (_(
"No atoms to be removed !"));
621 str = g_strdup_printf (_(
"%d atom(s) removed !"), i);
681 str = g_strdup_printf (_(
"%d atom(s) removed !\n%d atom(s) inserted !"), i, j);
707G_MODULE_EXPORT
void add_object (GSimpleAction *
action, GVariant * parameter, gpointer data)
717G_MODULE_EXPORT
void add_object (GtkWidget * widg, gpointer data)
735 lab = g_strdup_printf (
"%s", gtk_menu_item_get_label (GTK_MENU_ITEM(widg)));
740 lab = g_strdup_printf (_(
"Copied Data"));
752 for (i=0; i<
object ->
atoms; i++)
754 object -> at_list[i].x +=
opengl_project -> modelgl -> insert_coords.x +
object -> dim*ul.
a;
755 object -> at_list[i].y +=
opengl_project -> modelgl -> insert_coords.y +
object -> dim*ul.
b;
756 object -> at_list[i].z +=
opengl_project -> modelgl -> insert_coords.z +
object -> dim*ul.
c;
789G_MODULE_EXPORT
void to_add_object (GSimpleAction *
action, GVariant * parameter, gpointer data)
851G_MODULE_EXPORT
void copy_this_atom (GSimpleAction *
action, GVariant * parameter, gpointer data)
876 i = GPOINTER_TO_INT(data);
898 for (i=0; i<2; i++)
if (this_proj -> modelgl -> adv_bonding[i]) k ++;
901 numc[i] =
allocint (this_proj -> coord -> totcoord[i]);
902 numv[i] =
allocint (this_proj -> coord -> totcoord[i]);
905 numg[i] =
allocint (this_proj -> nspec);
906 for (j=1; j<this_proj -> nspec; j++)
908 numg[i][j] = this_proj -> coord -> ntg[i][j-1] + numg[i][j-1];
912 for (i=0; i<this_proj -> steps; i++)
914 for (j=0; j<this_proj -> natomes; j++)
916 for (l=0; l<2; l++)
if (this_proj ->
atoms[i][j].show[l]) num[l][this_proj ->
atoms[i][j].sp] ++;
919 m = this_proj ->
atoms[i][j].coord[l];
920 if (l < 2 && this_proj ->
atoms[i][j].sp > 0) m += numg[l][this_proj ->
atoms[i][j].sp];
922 if (this_proj ->
atoms[i][j].show[0]) numv[l][m] ++;
927 gboolean update_bar = FALSE;
931 for (j=0; j<this_proj -> nspec; j++)
935 if (num[i][j] == this_proj ->
chemistry -> nsps[j]*this_proj -> steps)
938 if (! this_proj -> modelgl -> anim -> last ->
img -> show_atom[i][j]) update_bar = TRUE;
941 gtk_check_menu_item_set_active ((GtkCheckMenuItem *)this_proj -> modelgl -> ogl_spec[i][j], TRUE);
943 this_proj -> modelgl -> anim -> last ->
img -> show_atom[i][j] = TRUE;
946 else if (this_proj -> modelgl -> anim -> last ->
img -> show_atom[i][j])
952 gtk_check_menu_item_set_active ((GtkCheckMenuItem *)this_proj -> modelgl -> ogl_spec[i][j], FALSE);
954 this_proj -> modelgl -> anim -> last ->
img -> show_atom[i][j] = FALSE;
963 for (j=0; j<this_proj -> coord -> totcoord[i]; j++)
967 if (numc[i][j] == numv[i][j])
970 if (! this_proj -> modelgl -> anim -> last ->
img -> show_coord[i][j]) update_bar = TRUE;
973 for (l=0; l<2; l++) gtk_check_menu_item_set_active ((GtkCheckMenuItem *)this_proj -> modelgl -> ogl_geom[l][i][j], TRUE);
976 this_proj -> modelgl -> anim -> last ->
img -> show_coord[i][j] = TRUE;
978 else if (this_proj -> modelgl -> anim -> last ->
img -> show_coord[i][j])
984 for (l=0; l<2; l++) gtk_check_menu_item_set_active ((GtkCheckMenuItem *)this_proj -> modelgl -> ogl_geom[l][i][j], FALSE);
986 this_proj -> modelgl -> anim -> last ->
img -> show_coord[i][j] = FALSE;
992 for (j=0; j<this_proj -> coord -> totcoord[i]; j++)
996 this_proj -> modelgl -> anim -> last ->
img -> show_coord[i][j] = TRUE;
998 else if (this_proj -> modelgl -> anim -> last ->
img -> show_coord[i][j])
1000 this_proj -> modelgl -> anim -> last ->
img -> show_coord[i][j] = FALSE;
1005 for (i=0; i<2; i++) g_free (num[i]);
1011 if (i < 2) g_free (numg[i]);
1014 if (update_bar) update_menu_bar (this_proj -> modelgl);
1042 int id = GPOINTER_TO_INT (data);
1063 int * naid =
allocint (this_proj -> nspec);
1064 int * nlid =
allocint (this_proj -> nspec);
1065 start = (types == 0 || types == 2) ? 0 : 1;
1066 end = (types == 1 || types == 2) ? 2 : 1;
1069 gboolean update_bar = FALSE;
1071 for (h=start; h<end; h++)
1073 for (i=0; i<this_proj -> nspec; i++) naid[i] = nlid[i] = 0;
1074 for (i=0; i<this_proj -> steps; i++)
1076 for (j=0; j<this_proj -> natomes; j++)
1078 k = this_proj ->
atoms[i][j].sp;
1080 if (this_proj ->
atoms[i][j].label[h]) nlid[k] ++;
1083 if (h==types || (h == 0 && types == 2)) l = 0;
1084 for (i=0; i<this_proj -> nspec; i++)
1087 if (nlid[i] == naid[i])
1090 if (! this_proj -> modelgl -> anim -> last ->
img -> show_label[h][i]) update_bar = TRUE;
1092 if (! gtk_check_menu_item_get_active ((GtkCheckMenuItem *)this_proj -> modelgl -> ogl_lab[h][i]))
1094 gtk_check_menu_item_set_active ((GtkCheckMenuItem *)this_proj -> modelgl -> ogl_lab[h][i], 1);
1097 this_proj -> modelgl -> anim -> last ->
img -> show_label[h][i] = TRUE;
1105 if (this_proj -> modelgl -> anim -> last ->
img -> show_label[h][i]) update_bar = TRUE;
1107 if (gtk_check_menu_item_get_active ((GtkCheckMenuItem *)this_proj -> modelgl -> ogl_lab[h][i]))
1109 gtk_check_menu_item_set_active ((GtkCheckMenuItem *)this_proj -> modelgl -> ogl_lab[h][i], 0);
1113 this_proj -> modelgl -> anim -> last ->
img -> show_label[h][i] = FALSE;
1115 if (h==types || (h == 0 && types == 2)) l += nlid[i];
1122 if (update_bar) update_menu_bar (this_proj -> modelgl);
1151 int id = GPOINTER_TO_INT (data);
1199 int h, i, j, k, l, m;
1200 int id = GPOINTER_TO_INT (data);
1279 int id = GPOINTER_TO_INT (data);
1283 j =
get_style ((
char *)gtk_menu_item_get_label (GTK_MENU_ITEM(widg)));
1364G_MODULE_EXPORT
void copy_the_atoms (GSimpleAction *
action, GVariant * parameter, gpointer data)
1645 k =
get_style ((
char *)gtk_menu_item_get_label (GTK_MENU_ITEM(widg)));
1734G_MODULE_EXPORT
void copy_the_coord (GSimpleAction *
action, GVariant * parameter, gpointer data)
1885 else if (
sel -> a < 4)
1960 else if (
sel -> a < 4)
1994 int shader[1] = {
SELEC};
2035 l =
get_style ((
char *)gtk_menu_item_get_label (GTK_MENU_ITEM(widg)));
2048 else if (
sel -> a < 4)
2082 int * pos_sp, * specs;
2093 tmp = selection -> first;
2095 for (i=0; i<selection -> selected; i++)
2097 specs[tmp -> sp] ++;
2098 if (pos_sp[tmp -> sp] < 0)
2101 pos_sp[tmp -> sp] = j;
2103 if (tmp -> next != NULL) tmp = tmp -> next;
2106 for (i=0; i<
opengl_project -> nspec; i++)
if (specs[i] > 0) nspec ++;
2152 tmp = selection -> first;
2155 tmp = selection -> first;
2172 if (tmp -> next != NULL) tmp = tmp -> next;
2216 selected = g_malloc0(
sizeof*selected);
2232 if (selected -> first)
2240 tmp_a = selected -> first;
2254 if (selected -> first)
2262 tmp_a = selected -> first;
2282G_MODULE_EXPORT
void edit_coord (GSimpleAction *
action, GVariant * parameter, gpointer data)
2301 selected = g_malloc0(
sizeof*selected);
2322 if (selected -> first)
2330 tmp_a = selected -> first;
2332 selected -> selected ++;
2349G_MODULE_EXPORT
void edit_atoms (GSimpleAction *
action, GVariant * parameter, gpointer data)
2366 selected = g_malloc0(
sizeof*selected);
2372 if (selected -> first)
2380 tmp_a = selected -> first;
2382 selected -> selected ++;
2412 int i = GPOINTER_TO_INT(data);
2415 g_debug (
"Action for All= %d", i);
2626 i = GPOINTER_TO_INT(data);
2783 int g, h, i, j, k, l, m, n, o;
2784 int mid = GPOINTER_TO_INT(data);
2788 gboolean eqtc, eqpc;
2809 eqtc = ((l ==
atoid[0][0].b && m ==
btoid.a) || (l ==
btoid.a && m ==
atoid[0][0].b)) ? TRUE : FALSE;
2810 eqpc = ((n ==
atoid[0][1].b && o ==
btoid.b) || (n ==
btoid.b && o ==
atoid[0][1].b)) ? TRUE : FALSE;
2814 eqtc = ((l ==
atoid[0][0].b && m ==
btoid.a) || (l ==
btoid.a && m ==
atoid[0][0].b)) ? TRUE : FALSE;
2815 eqpc = ((n ==
atoid[0][1].b && o ==
btoid.b) || (n ==
btoid.b && o ==
atoid[0][1].b)) ? TRUE : FALSE;
2976 GMenu * menu = g_menu_new ();
2978 gchar * word, * name, * str;
2979 gchar * eact = g_strdup_printf (
"mol-ins-%s-%d", act, aid);
2981 for (i=0;
mol[
i].type ||
mol[
i].object;
i++)
2985 menus = g_menu_new ();
2990 if (i == 9 || i == 13 || i == 16 || i == 17)
2992 append_opengl_item (view, menus, _(
mol[i].
object), eact, 1, i, NULL,
IMG_NONE, NULL, FALSE, handler, data, FALSE, FALSE, FALSE, TRUE);
2996 append_opengl_item (view, menus,
mol[i].
object, eact, 1, i, NULL,
IMG_NONE, NULL, FALSE, handler, data, FALSE, FALSE, FALSE, TRUE);
3002 gboolean doit = FALSE;
3014 GMenu * menup = g_menu_new ();
3016 eact = g_strdup_printf (
"ifp-%s-%d", act, aid);
3022 menups = g_menu_new ();
3025 word = g_strdup_printf (_(
"%s in %s"), _(
action_atoms[j]), name);
3026 str = g_strdup_printf (
"%s-%d", eact, j);
3027 append_opengl_item (view, menups, word, str, 1, i, NULL,
IMG_NONE, NULL, FALSE, handler, data, FALSE, FALSE, FALSE, TRUE);
3032 g_object_unref (menups);
3038 g_object_unref (menup);
3040 eact = g_strdup_printf (
"cp-%s-%d", act, aid);
3041 append_opengl_item (view, menu, _(
"Copied Data"), eact, 1, 0,
"<CTRL>V",
IMG_NONE, NULL, FALSE, G_CALLBACK(
add_object), data, FALSE, FALSE, FALSE, (
copied_object) ? TRUE : FALSE);
3059 GMenu * menu = g_menu_new ();
3060 gchar * actc = g_strdup_printf (
"%s-%d", act, aid);
3066 append_opengl_item (view, menu, _(
text_styles[i]), actc, i, i, NULL,
IMG_NONE, NULL, FALSE, handler, data, FALSE, FALSE, FALSE, TRUE);
3070 GMenu * menuf = g_menu_new ();
3073 append_opengl_item (view, menuf, _(
text_filled[j]), actc, j+
OGL_STYLES, j+
OGL_STYLES, NULL,
IMG_NONE, NULL, FALSE, handler, data, FALSE, FALSE, FALSE, TRUE);
3093 GtkWidget * menu = gtk_menu_new ();
3094 gtk_menu_item_set_submenu ((GtkMenuItem *)item, menu);
3100 gtk3_menu_item (menu, _(
text_styles[i]),
IMG_NONE, NULL, handler, data, FALSE, 0, 0, FALSE, FALSE, FALSE);
3105 gtk_menu_shell_append ((GtkMenuShell *)menu, widg);
3106 GtkWidget * menuf = gtk_menu_new ();
3107 gtk_menu_item_set_submenu ((GtkMenuItem *)widg, menuf);
3110 gtk3_menu_item (menuf, _(
text_filled[j]),
IMG_NONE, NULL, handler, data, FALSE, 0, 0, FALSE, FALSE, FALSE);
3127 GtkWidget * menu = gtk_menu_new ();
3128 GtkWidget * smenu, * pmenu;
3129 GtkWidget * titem, * sitem;
3130 gchar * word, * name;
3131 gtk_menu_item_set_submenu ((GtkMenuItem *)item, menu);
3134 for (i=0;
mol[i].type ||
mol[i].object; i++)
3136 if (
mol[i].type != NULL)
3139 gtk_menu_shell_append ((GtkMenuShell *)menu, titem);
3140 smenu = gtk_menu_new ();
3141 gtk_menu_item_set_submenu ((GtkMenuItem *)titem, smenu);
3143 if (
mol[i].
object != NULL)
3145 if (i == 9 || i == 13 || i == 16 || i == 17)
3147 gtk3_menu_item (smenu, _(
mol[i].
object),
IMG_NONE, NULL, handler, data, FALSE, 0, 0, FALSE, FALSE, FALSE);
3151 gtk3_menu_item (smenu,
mol[i].
object,
IMG_NONE, NULL, handler, data, FALSE, 0, 0, FALSE, FALSE, FALSE);
3156 gboolean doit = FALSE;
3169 gtk_menu_shell_append ((GtkMenuShell *)menu, titem);
3170 smenu = gtk_menu_new ();
3171 gtk_menu_item_set_submenu ((GtkMenuItem *)titem, smenu);
3181 gtk_menu_shell_append ((GtkMenuShell *)smenu, sitem);
3182 pmenu = gtk_menu_new ();
3183 gtk_menu_item_set_submenu ((GtkMenuItem *)sitem, pmenu);
3186 word = g_strdup_printf (_(
"%s in %s"), _(
action_atoms[j]), name);
3187 gtk3_menu_item (pmenu, word,
IMG_NONE, NULL, handler, data, FALSE, 0, 0, FALSE, FALSE, FALSE);
3194 GtkWidget * pastem =
gtk3_menu_item (menu, _(
"Copied Data"),
IMG_NONE, NULL, G_CALLBACK(
add_object), data, TRUE, GDK_KEY_v, GDK_CONTROL_MASK, FALSE, FALSE, FALSE);
3217void create_selection_item (GMenu * menu,
glwin * view, gchar * str, gchar * act,
int aid,
int mid,
int gid,
int cid,
int aoc, GCallback handler, gpointer data)
3219 gchar * actc = g_strdup_printf (
"%s-%d", act, aid);
3271 for (i=0; i < gid; i++)
3287 gtk_menu_item_set_submenu ((GtkMenuItem *)sel_item,
color_box(view, j+cid, k, cid));
3302 append_opengl_item (view, menu, str, actc, 1, 0, NULL,
IMG_NONE, NULL, FALSE, handler, data, FALSE, FALSE, FALSE, TRUE);
3304 g_signal_connect (G_OBJECT (sel_item),
"activate", handler, data);
3314gchar *
snsab[2][2]={{
i18n(
"All Non-Selected Atom(s)/Bond(s)"),
i18n(
"All Selected Atom(s)/Bond(s)")},
3315 {
i18n(
"All Non-Labelled Atom(s)/Bond(s)"),
i18n(
"All Labelled Atom(s)/Bond(s)")}};
3333GMenu *
selection_menu (
int aid,
glwin * view,
int ati,
int bti,
int aoc,
int mid, GCallback handler_a, GCallback handler_b, GCallback handler_c)
3349GtkWidget *
selection_menu (
glwin * view,
int ati,
int bti,
int aoc,
int mid, GCallback handler_a, GCallback handler_b, GCallback handler_c)
3352 int p = view ->
proj;
3353 int s = view -> anim -> last ->
img ->
step;
3360 GMenu * menu = g_menu_new ();
3363 GtkWidget * menu = gtk_menu_new ();
3366 spa = this_proj ->
atoms[s][ati].sp;
3367 if (bti > -1) spb = this_proj ->
atoms[s][bti].sp;
3368 if (bti < 0 && (((mid == 5 || mid == 6) && this_proj ->
atoms[s][ati].show[aoc])
3372 str = g_strdup_printf (_(
"This Atom: %s<sub>%d</sub>"),
exact_name(this_proj ->
chemistry -> label[spa]), ati+1);
3384 strb = g_strdup_printf (
"act-%d-%d", aid, mid);
3385 append_opengl_item (view, menu, str, strb, 1, 0, NULL,
IMG_NONE, NULL, FALSE, handler_a, GINT_TO_POINTER(ati), FALSE, FALSE, FALSE, TRUE);
3390 gtk_menu_shell_append ((GtkMenuShell *)menu,
sel);
3401 g_signal_connect (G_OBJECT (
sel),
"activate", handler_a, GINT_TO_POINTER(ati));
3405 else if (bti > -1 && mid != 4 && mid != 7)
3407 str = g_strdup_printf (_(
"This Bond: %s<sub>%d</sub> - %s<sub>%d</sub>"),
3421 strb = g_strdup_printf (
"act-%d-%d", aid, mid);
3422 append_opengl_item (view, menu, str, strb, 1, 0, NULL,
IMG_NONE, NULL, FALSE, G_CALLBACK(
select_action_for_this_bond), GINT_TO_POINTER(mid), FALSE, FALSE, FALSE, TRUE);
3439 gtk_menu_shell_append ((GtkMenuShell *)menu,
sel);
3453 else if ((mid > 1 && mid < 4) && j==1)
3472 strb = g_strdup_printf (
"act-all-%d-%d", aid, mid+k);
3473 append_opengl_item (view, menu, _(
snsab[j][i]), strb, 1, 0, NULL,
IMG_NONE, NULL, FALSE, G_CALLBACK(
select_action_for_all), GINT_TO_POINTER(mid+k), FALSE, FALSE, FALSE, TRUE);
3490 gtk_menu_shell_append ((GtkMenuShell *)menu,
sel);
3498 if (this_proj -> modelgl -> adv_bonding[i])
3500 j = this_proj ->
atoms[s][ati].coord[2+i];
3501 str = (! i) ? g_strdup_printf (_(
"Fragment N°:\t<b>%d</b>"), j+1) : g_strdup_printf (_(
"Molecule N°:\t<b>%d</b>"), j+1);
3503 create_selection_item (menu, view, str, (! i) ?
"afm" :
"amo", aid, mid, 2+i, j, aoc, handler_b, &
atoid[mid][2+i]);
3505 gtk_menu_shell_append ((GtkMenuShell *)menu,
create_selection_item (view, str, mid, 2+i, j, aoc, handler_b, &
atoid[mid][2+i]));
3512 if (this_proj ->
atoms[s][ati].coord[0] > -1)
3514 i = this_proj ->
atoms[s][ati].coord[0];
3515 str = g_strdup_printf (_(
"All %s Atoms <b>%d</b> Fold"),
exact_name(this_proj ->
chemistry -> label[spa]), this_proj -> coord -> geolist[0][spa][i]);
3517 create_selection_item (menu, view, str,
"atc", aid, mid, 0, i, aoc, handler_b, &
atoid[mid][0]);
3523 if (this_proj ->
atoms[s][ati].coord[1] > -1)
3525 i = this_proj ->
atoms[s][ati].coord[1];
3526 str = g_strdup_printf (_(
"All <b>%s</b> Coordinations"),
env_name (this_proj, i, spa, 1, NULL));
3528 create_selection_item (menu, view, str,
"apc", aid, mid, 1, i, aoc, handler_b, &
atoid[mid][1]);
3536 str = g_strdup_printf (_(
"All <b>%s</b> Atoms"),
exact_name(this_proj ->
chemistry -> label[spa]));
3540 str = g_strdup_printf (_(
"All <b>%s*</b> Clones"),
exact_name(this_proj ->
chemistry -> label[spa]));
3543 create_selection_item (menu, view, str,
"asp", aid, mid, 0, -1, aoc, handler_c, &
atoid[mid][2]);
3551 if (this_proj ->
atoms[s][ati].coord[0] > -1 && this_proj ->
atoms[s][bti].coord[0] > -1)
3553 i = this_proj ->
atoms[s][ati].coord[0];
3554 j = this_proj ->
atoms[s][bti].coord[0];
3555 str = g_strdup_printf (_(
"All %s <b>%d</b> - %s <b>%d</b> Bonds"),
3556 exact_name(this_proj ->
chemistry -> label[spa]), this_proj -> coord -> geolist[0][spa][i],
3557 exact_name(this_proj ->
chemistry -> label[spb]), this_proj -> coord -> geolist[0][spb][j]);
3559 create_selection_item (menu, view, str,
"atcb", aid, mid, -1, -1, aoc, G_CALLBACK(
select_action_for_all_bonds), GINT_TO_POINTER(mid+
CONTEXTACT));
3565 if (this_proj ->
atoms[s][ati].coord[1] > -1 && this_proj ->
atoms[s][bti].coord[1] > -1)
3567 i = this_proj ->
atoms[s][ati].coord[1];
3568 j = this_proj ->
atoms[s][bti].coord[1];
3569 str = g_strdup_printf (_(
"All <b>%s</b> - <b>%s</b> Bonds"),
env_name (this_proj, i, spa, 1, NULL),
env_name (this_proj, j, spb, 1, NULL));
3571 create_selection_item (menu, view, str,
"apcb", aid, mid, -1, -1, aoc, G_CALLBACK(
select_action_for_all_bonds), GINT_TO_POINTER(mid+2*
CONTEXTACT));
3579 create_selection_item (menu, view, str,
"acb", aid, mid, -1, -1, aoc, G_CALLBACK(
select_action_for_all_bonds), GINT_TO_POINTER(mid));
3585 if (mid > 3 && mid < 6)
3587 gchar * mat[2]={
i18n(
"All Hidden Atom(s)/Bond(s)"),
i18n(
"All Visible Atom(s)/Bond(s)")};
3589 strb = g_strdup_printf (
"all-hv-%d-%d", aid, mid);
3590 append_opengl_item (view, menu, _(mat[mid%2]), strb, 1, 0, NULL,
IMG_NONE, NULL, FALSE, G_CALLBACK(
select_action_for_all), GINT_TO_POINTER(mid+2*
CONTEXTACT), FALSE, FALSE, FALSE, TRUE);
3593 gtk3_menu_item (menu, _(mat[mid%2]),
IMG_NONE, NULL, G_CALLBACK(
select_action_for_all), GINT_TO_POINTER(mid+2*
CONTEXTACT), FALSE, 0, 0, FALSE, FALSE, FALSE);
3614void analyze_popup_attach_color_palettes (
glwin * view, GtkWidget * menu,
int ato,
int spc,
int totc,
int parc,
int frag,
int mol)
3628 if (! gtk_popover_menu_add_child ((GtkPopoverMenu *)menu, color_palette (view, ato*this_proj -> nspec+spc, -1, -1),
"set-asp-7.7"))
3630 g_debug (
"Color palette error: species in selection - custom= set-asp-7.7");
3634 for (j=0;
j<spc;
j++)
3636 i += this_proj -> coord -> ntg[0][
j];
3638 if (! gtk_popover_menu_add_child ((GtkPopoverMenu *)menu, color_palette (view, 2*this_proj -> nspec+i, -1, -1),
"set-atc-7.7"))
3640 g_debug (
"Color palette error: total coordination in selection - custom= set-atc-7.7");
3643 i = this_proj -> coord -> totcoord[0];
3644 for (j=0;
j<spc;
j++)
3646 i += this_proj -> coord -> ntg[1][
j];
3648 if (! gtk_popover_menu_add_child ((GtkPopoverMenu *)menu, color_palette (view, 2*this_proj -> nspec+i, -1, -1),
"set-apc-7.7"))
3650 g_debug (
"Color palette error: partial coordination in selection - custom= set-apc-7.7");
3652 if (view -> adv_bonding[0])
3655 i = 2*this_proj -> nspec + this_proj -> coord -> totcoord[0] + this_proj -> coord -> totcoord[1] + frag;
3656 if (! gtk_popover_menu_add_child ((GtkPopoverMenu *)menu, color_palette (view, i, 2, 0),
"set-afm-7.7"))
3658 g_debug (
"Color palette error: fragment in selection - custom= set-afm-7.7");
3661 if (view -> adv_bonding[1])
3664 i = 2*this_proj -> nspec + this_proj -> coord -> totcoord[0] + this_proj -> coord -> totcoord[1] + this_proj -> coord -> totcoord[2] +
mol;
3665 if (! gtk_popover_menu_add_child ((GtkPopoverMenu *)menu, color_palette (view, i, 3, 0),
"set-amo-7.7"))
3667 g_debug (
"Color palette error: fragment in selection - custom= set-amo-7.7");
3689 int p = view ->
proj;
3690 int s = view -> anim -> last ->
img ->
step;
3692 gchar * str, * strp;
3701 i18n(
"Edit as New Project"),
3718 if (view_pop_actions) g_object_unref (view_pop_actions);
3719 view_pop_actions = g_simple_action_group_new ();
3720 GMenu * gmenu = g_menu_new ();
3722 GtkWidget * menu = gtk_menu_new ();
3726 g_debug (
"POP_SEL:: spe= %d, ati= %d, bti= %d, aoc= %d", spe, ati, bti, aoc);
3738 if (
is_selected != spe) g_debug (
"Something is wrong in popup");
3747 atoid[i][j].c = ((i-2*(i/2)) == 0 ? 1 : 0);
3762 str = g_strdup_printf (
"%s<sub>%d</sub> - %s<sub>%d</sub>",
3767 str = g_strdup_printf (
"%s<sub>%d</sub> - %s<sub>%d</sub>",
3772 strp = g_strdup_printf (
"<b>%s \t d= %.3f Ã… (%s)</b>", str,
dist.length, _(
"PBC"));
3776 strp = g_strdup_printf (
"<b>%s \t d= %.3f Ã…</b>", str,
dist.length);
3779 append_opengl_item (view, gmenu, strp,
"w-dist", 1, 0, NULL,
IMG_NONE, NULL, FALSE, NULL, NULL, FALSE, FALSE, FALSE, TRUE);
3782 gtk_menu_shell_append ((GtkMenuShell *)menu,
sel);
3787 if (view -> adv_bonding[i])
3790 str = (! i) ? g_strdup_printf (_(
"Fragment N°:\t<b>%d</b>"), j) : g_strdup_printf (_(
"Molecule N°:\t<b>%d</b>"), j);
3792 append_opengl_item (view, gmenu, str,
"w-dist-fm", 1, 0, NULL,
IMG_NONE, NULL, FALSE, NULL, NULL, FALSE, FALSE, FALSE, TRUE);
3795 gtk_menu_shell_append ((GtkMenuShell *)menu,
sel);
3812 append_opengl_item (view, gmenu, str,
"w-ac", 1, 0, NULL,
IMG_NONE, NULL, FALSE, NULL, NULL, FALSE, FALSE, FALSE, TRUE);
3815 gtk_menu_shell_append ((GtkMenuShell *)menu,
sel);
3818 str = g_strdup_printf (
"\tx : <b>%f</b>\n\ty : <b>%f</b>\n\tz : <b>%f</b>",
3821 append_opengl_item (view, gmenu, str,
"xyz", 1, 0, NULL,
IMG_NONE, NULL, FALSE, NULL, NULL, FALSE, FALSE, FALSE, TRUE);
3824 gtk_menu_shell_append ((GtkMenuShell *)menu,
sel);
3832 append_opengl_item (view, gmenu, str,
"w-tc", 1, 0, NULL,
IMG_NONE, NULL, FALSE, NULL, NULL, FALSE, FALSE, FALSE, TRUE);
3835 gtk_menu_shell_append ((GtkMenuShell *)menu,
sel);
3841 append_opengl_item (view, gmenu, str,
"w-pc", 1, 0, NULL,
IMG_NONE, NULL, FALSE, NULL, NULL, FALSE, FALSE, FALSE, TRUE);
3844 gtk_menu_shell_append ((GtkMenuShell *)menu,
sel);
3850 if (view -> adv_bonding[i])
3853 str = (! i) ? g_strdup_printf (_(
"Fragment N°:\t<b>%d</b>"), j) : g_strdup_printf (_(
"Molecule N°:\t<b>%d</b>"), j);
3855 append_opengl_item (view, gmenu, str,
"w-fm", 1, 0, NULL,
IMG_NONE, NULL, FALSE, NULL, NULL, FALSE, FALSE, FALSE, TRUE);
3858 gtk_menu_shell_append ((GtkMenuShell *)menu,
sel);
3878 GMenu * menua = g_menu_new ();
3879 g_menu_append_section (gmenu, NULL, (GMenuModel *)menua);
3898 for (i=0; i<12; i++)
3901 if (i < 9 && view -> mode ==
EDITION) go = FALSE;
3902 if ((i > 8 && i < 11) && view -> mode ==
ANALYZE) go = FALSE;
3903 if (i == 0 && view -> anim -> last ->
img -> selected[mmod] -> selected ==
opengl_project -> natomes) go = FALSE;
3904 if (i == 1 && view -> anim -> last ->
img -> selected[mmod] -> selected == 0) go = FALSE;
3906 if (i == 3 && view -> labelled == 0) go = FALSE;
3907 if (bti > -1 && i == 7) go = FALSE;
3908 j = (i == 8 && view -> mode ==
ANALYZE) ? 11 : (i == 11 && view -> mode ==
ANALYZE) ? 8 : i;
3912 append_submenu (menua, _(menu_names[j]),
selection_menu (i, view, ati, bti, aoc, j, handlers[j][0], handlers[j][1], handlers[j][2]));
3915 TRUE,
selection_menu (view, ati, bti, aoc, j, handlers[j][0], handlers[j][1], handlers[j][2])));
3920 GtkWidget * menu = gtk_popover_menu_new_from_model_full ((GMenuModel *)gmenu, GTK_POPOVER_MENU_NESTED);
3924 gtk_widget_set_parent (menu, view -> win);
3925 str = g_strdup_printf (
"gl-%d", view -> action_id);
3926 gtk_widget_insert_action_group (menu, str, G_ACTION_GROUP(view_pop_actions));
3929 i += (view -> adv_bonding[0] && bti < 0) ? 30 : 0;
3930 i += (view -> adv_bonding[1] && bti < 0) ? 30 : 0;
3931 if (bti > -1) i -= (view -> mode ==
ANALYZE) ? 70 : 50;
3932 gtk_widget_set_size_request (menu, -1, i);
3949G_MODULE_EXPORT
void reset_coords (GSimpleAction *
action, GVariant * parameter, gpointer data)
3966 view -> create_shaders[
MEASU] = TRUE;
3967 view -> create_shaders[
PICKS] = TRUE;
3982G_MODULE_EXPORT
void turn_rebuild (GSimpleAction *
action, GVariant * parameter, gpointer data)
3998 view -> rebuild[dat -> b][0] = ! view -> rebuild[dat -> b][0];
3999 view -> rebuild[dat -> b][1] = view -> rebuild[dat -> b][0];
4000 update_menu_bar (view);
4002 view -> rebuild[dat -> b][0] = gtk_check_menu_item_get_active ((GtkCheckMenuItem *)widg);
4003 view -> rebuild[dat -> b][1] = view -> rebuild[dat -> b][0];
4004 if (widg != view -> rbuild[dat -> b])
4006 gtk_check_menu_item_set_active ((GtkCheckMenuItem *)view -> rbuild[dat -> b], view -> rebuild[dat -> b][0]);
4023 ask_yes_no (_(
"Center crystal atom(s)"), _(
"Are you sure, this can affect the visual representation of the unit cell ?"), GTK_MESSAGE_QUESTION, view -> win);
4035GMenu * tools_section (
glwin * view)
4037 GMenu * menu = g_menu_new ();
4049GMenu * anim_section (
glwin * view)
4051 GMenu * menu = g_menu_new ();
4064void analyze_menu_attach_color_palettes (
glwin * view, GtkWidget * menu)
4082 if (! gtk_popover_menu_add_child ((GtkPopoverMenu *)menu, color_palette (view, -1, -1, -1),
"set-box-color.0"))
4084 g_debug (
"Color palette error: box - custom= set-box-color.0");
4089 for (j=0;
j<this_proj -> nspec;
j++)
4091 str = g_strdup_printf (
"set-%s.%d", (! i) ?
"atom-color" :
"clone-color", j);
4092 if (! gtk_popover_menu_add_child ((GtkPopoverMenu *)menu, color_palette (view, i*this_proj -> nspec+j, -1, -1), (
const gchar *)str))
4094 g_debug (
"Color palette error: %s - %d - custom= %s", (! i) ?
"atom-color" :
"clone-color", j+1, str);
4102 if (this_proj -> coord -> ntg[i])
4104 for (j=0;
j<this_proj -> nspec;
j++)
4106 for (k=0;
k<this_proj -> coord -> ntg[
i][
j];
k++)
4111 m += this_proj -> coord -> ntg[
i][
l];
4115 env =
env_name (this_proj, k, j, 1, NULL);
4116 str = g_strdup_printf (
"set-%s-c.%d",
exact_name (env), m);
4121 str = g_strdup_printf (
"set-%d-c.%d", this_proj -> coord -> geolist[i][j][k], m);
4123 m += (
i) ? this_proj -> coord -> totcoord[0] : 0;
4124 if (! gtk_popover_menu_add_child ((GtkPopoverMenu *)menu, color_palette (view, 2*this_proj -> nspec+m, -1, -1), (
const gchar *)str))
4126 g_debug (
"Color palette error: %s - spec= %d - coord= %d, custom= %s", (! i) ?
"total-coord" :
"partial-coord", j+1, k+1, str);
4136 for (j=0;
j<this_proj -> coord -> totcoord[
i];
j++)
4138 str = g_strdup_printf (
"set-%s-%d", (i == 2) ?
"fcol" :
"mcol", j);
4139 k = 2*this_proj -> nspec + this_proj -> coord -> totcoord[0] + this_proj -> coord -> totcoord[1] +
j;
4140 if (i == 3)
k += this_proj -> coord -> totcoord[2];
4141 if (! gtk_popover_menu_add_child ((GtkPopoverMenu *)menu, color_palette (view, k, i, 0), (
const gchar *)str))
4143 g_debug (
"Color palette error: %s - %d, custom= %s", (i == 2) ?
"fragment" :
"molecule", j+1, str);
4151 for (j=0;
j<this_proj -> coord -> totcoord[
i];
j++)
4153 str = g_strdup_printf (
"set-rcol-%d-%d", i, j);
4154 if (! gtk_popover_menu_add_child ((GtkPopoverMenu *)menu, color_palette (view, -3, i-4, 0), (
const gchar *)str))
4156 g_debug (
"Color palette error: rings - %d - %d, custom= %s", i, j+1, str);
4162 if (! gtk_popover_menu_add_child ((GtkPopoverMenu *)menu, color_palette (view, -2, -1, -1),
"set-back-color.0"))
4164 g_debug (
"Color palette error: background - custom= set-back-color.0");
4183 if (view_pop_actions) g_object_unref (view_pop_actions);
4184 view_pop_actions = g_simple_action_group_new ();
4185 GMenu * gmenu = g_menu_new ();
4194 g_menu_append_section (gmenu, NULL, (GMenuModel *)tools_section(view));
4195 g_menu_append_section (gmenu, NULL, (GMenuModel *)
menu_view(view, 1));
4196 g_menu_append_section (gmenu, NULL, (GMenuModel *)anim_section(view));
4200 g_menu_append_section (gmenu, NULL, (GMenuModel *)tools_section(view));
4203 append_opengl_item (view, gmenu, _(
"Reset Motion"),
"res-mot", 1, 0, NULL,
IMG_STOCK,
MEDIA_LOOP, FALSE, G_CALLBACK(
reset_coords), view, FALSE, FALSE, FALSE, TRUE);
4205 g_menu_append_section (gmenu, NULL, (GMenuModel*)
menu_reset(view, 1));
4206 g_menu_append_section (gmenu, NULL, (GMenuModel*)
menu_fullscreen(view, 1));
4207 g_menu_append_section (gmenu, NULL, (GMenuModel*)
menu_shortcuts(view, 1));
4209 menu = gtk_popover_menu_new_from_model_full ((GMenuModel *)gmenu, GTK_POPOVER_MENU_NESTED);
4210 if (view -> mode ==
ANALYZE) analyze_menu_attach_color_palettes (view, menu);
4212 gtk_popover_present ((GtkPopover *)menu);
4213 gchar * str = g_strdup_printf (
"gl-%d", view -> action_id);
4214 gtk_widget_insert_action_group (menu, str, G_ACTION_GROUP(view_pop_actions));
4216 gtk_widget_set_parent (menu, view -> win);
4217 gtk_widget_set_size_request (menu, -1, (view -> mode ==
ANALYZE) ? 742 : 242);
4220 menu = gtk_menu_new ();
4224 menu_items_opengl (menu, view, 1);
4231 gtk_menu_shell_append ((GtkMenuShell *)menu,
menu_box_axis (view, 1, 0));
4233 gtk_menu_shell_append ((GtkMenuShell *)menu,
menu_coord (view, 1));
4239 gtk3_menu_item (menu, _(
"Advanced"),
IMG_NONE, NULL, G_CALLBACK(
coord_properties), (gpointer)& view ->
colorp[30][0], TRUE, GDK_KEY_e, GDK_CONTROL_MASK, FALSE, FALSE, FALSE);
4247 gtk_menu_shell_append ((GtkMenuShell *)menu,
menu_anim (view, 1));
4252 gtk_menu_item_set_submenu ((GtkMenuItem *)item,
menu_tools(view, 1));
4253 gtk_menu_shell_append ((GtkMenuShell *)menu, item);
4258 gtk_menu_shell_append ((GtkMenuShell *)menu, item);
4263 gtk3_menu_item (menu, _(
"Extract/Rebuild on Motion"),
IMG_STOCK, (gpointer)
ECUT, G_CALLBACK(
turn_rebuild), & view ->
colorp[0][0], FALSE, 0, 0, TRUE, FALSE, view -> rebuild[0][0]);
4264 gtk3_menu_item (menu, _(
"Extract/Rebuild on Copy"),
IMG_STOCK, (gpointer)
ECUT, G_CALLBACK(
turn_rebuild), & view ->
colorp[1][0], FALSE, 0, 0, TRUE, FALSE, view -> rebuild[1][0]);
4266 gtk3_menu_item (menu, _(
"Reset Motion"),
IMG_STOCK, (gpointer)
MEDIA_LOOP, G_CALLBACK(
reset_coords), (gpointer)view, FALSE, 0, 0, FALSE, FALSE, FALSE);
4269 gtk3_menu_item (menu, _(
"Reset View"),
IMG_STOCK, (gpointer)
FITBEST, G_CALLBACK(
to_reset_view), (gpointer)view, FALSE, 0, 0, FALSE, FALSE, FALSE);
4270 gtk3_menu_item (menu, _(
"Center Molecule"),
IMG_STOCK, (gpointer)
FITBEST, G_CALLBACK(
to_center_this_molecule), (gpointer)view, FALSE, 0, 0, FALSE, FALSE, FALSE);
4272 if (! view -> fullscreen)
4274 gtk3_menu_item (menu, _(
"Fullscreen"),
IMG_STOCK, (gpointer)
FULLSCREEN, G_CALLBACK(
set_full_screen), (gpointer)view, TRUE, GDK_KEY_f, GDK_CONTROL_MASK, FALSE, FALSE, FALSE);
4278 gtk3_menu_item (menu, _(
"Exit Fullscreen"),
IMG_STOCK, (gpointer)
FULLSCREEN, G_CALLBACK(
set_full_screen), (gpointer)view, TRUE, GDK_KEY_Escape, 0, FALSE, FALSE, FALSE);
4281 gtk3_menu_item (menu, _(
"Shortcuts"),
IMG_NONE, NULL, G_CALLBACK(
view_shortcuts), (gpointer)view, FALSE, 0, 0, FALSE, FALSE, FALSE);
void prepare_atom_edition(gpointer data, gboolean visible)
prepare atom edition
void clean_other_window_after_edit(project *this_proj)
update other windows after model edition if required
Function declarations for the mode edition window.
atomic_object * create_object_from_selection(project *this_proj)
create object from atom selection
atom_search * remove_search
void init_coordinates(project *this_proj, int status, gboolean win, gboolean init)
preserve atomic coordinates
int get_selected_object_id(gboolean visible, int p, gchar *str, atom_search *asearch)
get the id of the object selected (in contextual menu, or in combo box)
tint ulam_coord(glwin *view)
shift insertion position for object not to have overlapping objects for multiple/repeated insertions
atomic_object * duplicate_atomic_object(atomic_object *old_obj)
duplicate an insert object
void to_insert_in_project(int stat, int orig, project *this_proj, atom_search *asearch, gboolean visible)
to insert object in project
void allocate_todo(atom_search *asearch, int tsize)
allocate the selection list data buffer
Binding to the Fortran90 subroutines.
Callback declarations for main window.
atom_search * insert_search
G_MODULE_EXPORT void cut_this_slab(GtkButton *but, gpointer data)
cut this slab callback
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
Structure definitions for color management Function declarations for color management.
G_MODULE_EXPORT void window_color_coord(GtkWidget *widg, gpointer data)
create a window to select a color callback GTK3
G_MODULE_EXPORT void to_run_atom_color_window(GtkWidget *widg, gpointer data)
to run atom color selection window callback GTK3
void process_selected_atom(project *this_proj, glwin *view, int id, int ac, int se, int pi)
process selected atom
atom_in_selection * tmp_a
void init_default_shaders(glwin *view)
re-initialize the default OpenGL shaders
distance distance_3d(cell_info *cell, int mdstep, atom *at, atom *bt)
distance between atom a and b in 3D
int ** allocdint(int xal, int yal)
allocate an int ** pointer
int * allocint(int val)
allocate an int * pointer
double string_to_double(gpointer string)
convert string to double
Global variable declarations Global convenience function declarations Global data structure defin...
GtkWidget * create_menu_item_from_widget(GtkWidget *widg, gboolean check, gboolean radio, gboolean status)
GtkWidget * gtk3_menu_item(GtkWidget *menu, gchar *name, int icon_format, gpointer item_icon, GCallback handler, gpointer data, gboolean accel, guint key, GdkModifierType mod, gboolean check, gboolean radio, gboolean status)
chemical_data * active_chem
void opengl_project_changed(int id)
change the OpenGL project
void pop_menu_at_pointer(GtkWidget *widg, GdkEvent *event)
popup a menu at pointer location
G_MODULE_EXPORT void select_unselect_this_atom(GtkWidget *widg, gpointer data)
select / unselect this atom callback GTK3
void append_submenu(GMenu *menu, const gchar *label, GMenu *submenu)
append a GMenuItem with a subenu to a GMenu, and use markup for the GMenuItem
G_MODULE_EXPORT void label_unlabel_coord(GtkWidget *widg, gpointer data)
label / unlabel a type of coordination callback GTK3
G_MODULE_EXPORT void show_hide_this_atom(GtkWidget *widg, gpointer data)
show / hide this atom callback GTK3
G_MODULE_EXPORT void label_unlabel_atoms(GtkWidget *widg, gpointer data)
label / unlabel a type of atom(s) callback GTK3
GtkWidget * markup_label(gchar *text, int dimx, int dimy, float ax, float ay)
create a GtkLabel with pango markup
void widget_set_sensitive(GtkWidget *widg, gboolean sensitive)
Set sensitivity for a GtkWidget, ensuring it is a GtkWidget.
G_MODULE_EXPORT void select_unselect_atoms(GtkWidget *widg, gpointer data)
select / unselect a type of atom(s) callback GTK3
GtkWidget * create_menu_item(gboolean add_mnemo, gchar *action)
G_MODULE_EXPORT void select_unselect_coord(GtkWidget *widg, gpointer data)
select / unselect a type of coordination callback GTK3
G_MODULE_EXPORT void show_hide_the_coord(GtkWidget *widg, gpointer data)
show / hide a type of coordination callback GTK3
void hide_the_widgets(GtkWidget *widg)
hide GtkWidget
G_MODULE_EXPORT void replace_the_atoms(GtkWidget *widg, gpointer data)
replace selected atom(s) callback GTK3
void add_menu_separator(GtkWidget *menu)
GtkWidget * menu_item_new_with_submenu(gchar *name, gboolean active, GtkWidget *sub_menu)
G_MODULE_EXPORT void label_unlabel_this_atom(GtkWidget *widg, gpointer data)
label / unlabel this atom callback GTK3
atomic_object * copied_object
void show_the_widgets(GtkWidget *widg)
show GtkWidget
project * get_project_by_id(int p)
get project pointer using id number
G_MODULE_EXPORT void remove_the_atoms(GtkWidget *widg, gpointer data)
remove selected atom(s) callback GTK3
void update(glwin *view)
update the rendering of the OpenGL window
void center_this_molecule(glwin *view)
center atomic coordinates around (0,0,0) and refresh shaders
Variable declarations related to the OpenGL window Function declarations related to the OpenGL wind...
G_MODULE_EXPORT void to_center_this_molecule(GtkWidget *widg, gpointer data)
center this molecule menu item callback GTK4
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 ?
void update_all_menus(glwin *view, int nats)
update all menus of the OpenGL window
void update_all_selections(glwin *view, int pi)
update the selection data: bonds, angles and dihedrals
void save_all_selections(glwin *view, int pi)
save all selection data
char * text_filled[FILLED_STYLES]
shaders
The different types of shaders in the atomes program.
char * text_styles[OGL_STYLES]
G_MODULE_EXPORT void coord_properties(GtkWidget *widg, gpointer data)
create the environments configuration window
G_MODULE_EXPORT void set_full_screen(GtkWidget *widg, gpointer data)
set full screen callback GTK3
G_MODULE_EXPORT void add_object(GtkWidget *widg, gpointer data)
add object call back GTK3
G_MODULE_EXPORT void copy_the_atoms(GtkWidget *widg, gpointer data)
copy selected atom(s) callback GTK3
G_MODULE_EXPORT void view_shortcuts(GtkWidget *widg, gpointer data)
OpenGL window shortcuts callback GTK3.
G_MODULE_EXPORT void to_reset_view(GtkWidget *widg, gpointer data)
reset view callback - GTK3
void set_this_style(glwin *view, int style)
set general style for atom(s) and bond(s)
Function declarations for the creation of the OpenGL window.
void append_opengl_item(glwin *view, GMenu *menu, const gchar *name, gchar *key, int mpop, int item_id, gchar *accel, int image_format, gpointer icon, gboolean custom, GCallback handler, gpointer data, gboolean check, gboolean status, gboolean radio, gboolean sensitive)
void init_project(gboolean alloc_box)
initialize a new project
void show_info(char *information, int val, GtkWidget *win)
add / show information message to widget
gchar * env_name(project *this_proj, int g, int s, int f, GtkTextBuffer *buffer)
output the name of a coordination sphere
gboolean ask_yes_no(gchar *title, gchar *text, int type, GtkWidget *widg)
ask yes or no for something: prepare dialog
gchar * exact_name(gchar *name)
short cut to print string without spaces
Messaging function declarations.
GMenu * menu_anim(glwin *view, int popm)
create the 'Animate' submenu elements
GMenu * menu_atoms(glwin *view, int popm, int at)
create the 'Atom(s)' submenu elements
GMenu * menu_bonds(glwin *view, int popm, int at)
create the 'Bond(s)' submenu GTK4
GMenuItem * menu_box_axis(glwin *view, int popm, int ab)
create the 'Model -> Box' and 'View -> Axis' submenus GTK4
GMenu * menu_clones(glwin *view, int popm)
create the 'Clone(s)' submenu GTK4
GMenu * menu_coord(glwin *view, int popm)
create the 'Coordination' submenu GTK4
GMenu * menu_rings(glwin *view, int popm)
create the 'Ring(s)' submenu GTK4
GMenu * add_menu_coord(glwin *view, int popm, int id)
create a coordination type submenu
GMenu * color_item(glwin *view, gchar *act, int popm, int id, GCallback handler, gpointer data)
create a submenu to attach a color palette
G_MODULE_EXPORT void turn_rebuild(GtkWidget *widg, gpointer data)
rebuild menu items callback GTK3
GMenu * extract_section(glwin *view, int popm)
create the 'Extract/Rebuild' menu items GTK4
GMenu * menu_poly(glwin *view, int popm)
create the 'Chemistry -> Polyehdra' submenu - GTK4
GMenu * menu_fullscreen(glwin *view, int popm)
create the 'Fullscreen' menu item - GTK4
GMenu * menu_reset(glwin *view, int popm)
create the reset menu items - GTK4
GMenu * menu_view(glwin *view, int popm)
create the 'View' submenu - GTK4
void alloc_proj_data(project *this_proj, int cid)
allocate data
Function declarations for reading atomes project file Function declarations for saving atomes proje...
void update_analysis_availability(project *this_proj)
update analysis availability for a target projet
void active_project_changed(int id)
change the active project
void add_project_to_workspace()
add project(s) to the workspace tree
Function declarations for workspace managment.