atomes 1.1.14
atomes: an atomic scale modeling tool box
Loading...
Searching...
No Matches
m_coord.c
Go to the documentation of this file.
1/* This file is part of the 'atomes' software
2
3'atomes' is free software: you can redistribute it and/or modify it under the terms
4of the GNU Affero General Public License as published by the Free Software Foundation,
5either version 3 of the License, or (at your option) any later version.
6
7'atomes' is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
8without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
9See the GNU General Public License for more details.
10
11You should have received a copy of the GNU Affero General Public License along with 'atomes'.
12If not, see <https://www.gnu.org/licenses/>
13
14Copyright (C) 2022-2024 by CNRS and University of Strasbourg */
15
22/*
23* This file: 'm_coord.c'
24*
25* Contains:
26*
27
28 - The functions to create the 'Chemistry -> Coordination' submenu
29
30*
31* List of functions:
32
33 gboolean is_coord_in_menu (int id, project * this_proj);
34
35 void detach_frag_mol_menu (glwin * view, int id, int jd);
36
37 G_MODULE_EXPORT void show_hide_coord (GSimpleAction * action, GVariant * parameter, gpointer data);
38 G_MODULE_EXPORT void show_hide_coord (GtkWidget * widg, gpointer data);
39 G_MODULE_EXPORT void to_coord_properties (GSimpleAction * action, GVariant * parameter, gpointer data);
40
41 GtkWidget * add_menu_coord (glwin * view, int id, int jd);
42 GtkWidget * menu_coord (glwin * view, int id);
43 GtkWidget * menu_rings (glwin * view, int id);
44
45 GMenu * color_item (glwin * view, gchar * act, int popm, int id, GCallback handler, gpointer data);
46 GMenu * menu_show_coord (glwin * view, int popm, int id, int mid);
47 GMenu * menu_show_frag_mol (glwin * view, int popm, int id, int mid);
48 GMenu * menu_show_rings (glwin * view, int popm, int id, int mid);
49 GMenu * add_menu_coord (glwin * view, int popm, int id);
50 GMenu * menu_coord (glwin * view, int popm);
51 GMenu * menu_rings (glwin * view, int popm);
52
53*/
54
55#include "global.h"
56#include "interface.h"
57#include "glview.h"
58#include "glwindow.h"
59
60extern G_MODULE_EXPORT void coord_properties (GtkWidget * widg, gpointer data);
61#ifdef GTK4
62extern G_MODULE_EXPORT void window_color_coord (GSimpleAction * action, GVariant * parameter, gpointer data);
63extern GtkWidget * color_palette (glwin * view, int ideo, int spec, int geo);
64#endif
65
74gboolean is_coord_in_menu (int id, project * this_proj)
75{
76 if (((id == 2 || id == 3) && this_proj -> coord -> totcoord[id] <= COORD_MAX_MENU) || id < 2 || id > 3)
77 {
78 return TRUE;
79 }
80 else
81 {
82 return FALSE;
83 }
84}
85
86#ifdef GTK4
96G_MODULE_EXPORT void show_hide_coord (GSimpleAction * action, GVariant * parameter, gpointer data)
97#else
106G_MODULE_EXPORT void show_hide_coord (GtkWidget * widg, gpointer data)
107#endif
108{
109 qint * cid = (qint *)data;
110 int i, j, k;
111 int c, g, s;
112 gboolean doit = TRUE;
113 gboolean show;
114 project * this_proj = get_project_by_id(cid -> a);
115 s = cid -> b;
116 c = cid -> c;
117 g = cid -> d;
118 j = 0;
119 if (g < 2)
120 {
121 for (i=0; i<s; i++)
122 {
123 j += this_proj -> coord -> ntg[g][i];
124 }
125 }
126 j += c;
127#ifdef GTK3
128 show = (widg) ? gtk_check_menu_item_get_active ((GtkCheckMenuItem *)widg) : this_proj -> modelgl -> anim -> last -> img -> show_coord[g][j];
129#else
130 GVariant * state;
131 if (action)
132 {
133 state = g_action_get_state (G_ACTION (action));
134 show = ! g_variant_get_boolean (state);
135 const gchar * coord = g_action_get_name ((GAction *)action);
136 int lgt = strlen (coord);
137 gchar * name = g_strdup_printf ("%c%c", coord[lgt-2], coord[lgt-1]);
138 if (g_strcmp0(name, ".1") == 0)
139 {
140 name = g_strdup_printf ("%.*s.0", lgt-2, coord);
141 g_action_group_activate_action ((GActionGroup *)this_proj -> modelgl -> action_group, (const gchar *)name, NULL);
142 g_free (name);
143 doit = FALSE;
144 }
145 }
146 else
147 {
148 show = this_proj -> modelgl -> anim -> last -> img -> show_coord[g][j];
149 }
150#endif
151#ifdef DEBUG
152 g_debug ("SHOW_HIDE_COORD:: p= %d, s= %d, c= %d, g= %d, show= %d", this_proj -> id, s, c, g, show);
153#endif
154
155#ifdef GTK3
156 // GTK3 Menu Action To Check
157 if (is_coord_in_menu(g, this_proj))
158 {
159 for (i=0; i<2; i++)
160 {
161 if (widg != this_proj -> modelgl -> ogl_geom[i][g][j])
162 {
163 if (GTK_IS_WIDGET(this_proj -> modelgl -> ogl_geom[i][g][j]))
164 {
165 if (gtk_check_menu_item_get_active ((GtkCheckMenuItem *)this_proj -> modelgl -> ogl_geom[i][g][j]) != show)
166 {
167 gtk_check_menu_item_set_active ((GtkCheckMenuItem *)this_proj -> modelgl -> ogl_geom[i][g][j], show);
168 }
169 }
170 }
171 }
172 }
173#endif
174 if (doit)
175 {
176 this_proj -> modelgl -> anim -> last -> img -> show_coord[g][j] = show;
177 for (i=0; i<this_proj -> steps; i++)
178 {
179 for (j=0; j<this_proj -> natomes; j++)
180 {
181 if (g < 2)
182 {
183 if (this_proj -> atoms[i][j].sp == s && this_proj -> atoms[i][j].coord[g] == c)
184 {
185 this_proj -> atoms[i][j].show[0] = this_proj -> atoms[i][j].show[1] = show;
186 }
187 }
188 else if (g < 4)
189 {
190 if (this_proj -> atoms[i][j].coord[g] == c)
191 {
192 this_proj -> atoms[i][j].show[0] = this_proj -> atoms[i][j].show[1] = show;
193 }
194 }
195 else if (g < 9)
196 {
197 k = this_proj -> coord -> geolist[g][0][c] - 1;
198 if (this_proj -> atoms[i][j].rings[s][k] != NULL)
199 {
200 if (this_proj -> atoms[i][j].rings[s][k][0])
201 {
202 this_proj -> atoms[i][j].show[0] = this_proj -> atoms[i][j].show[1] = show;
203 }
204 }
205 }
206 else
207 {
208 k = this_proj -> coord -> geolist[g][0][c] - 1;
209 if (this_proj -> atoms[i][j].chain[k] != NULL)
210 {
211 if (this_proj -> atoms[i][j].chain[k][0])
212 {
213 this_proj -> atoms[i][j].show[0] = this_proj -> atoms[i][j].show[1] = show;
214 }
215 }
216 }
217 }
218 }
219 init_default_shaders (this_proj -> modelgl);
220#ifdef GTK4
221 if (action)
222 {
223 g_action_change_state (G_ACTION (action), g_variant_new_boolean (show));
224 g_variant_unref (state);
225 }
226#endif
227 }
228}
229
230#ifdef GTK3
240void detach_frag_mol_menu (glwin * view, int id, int jd)
241{
242 GtkWidget * widg;
243 if (view -> oglmc[id][jd] != NULL)
244 {
245 if (view -> oglmc[id][jd][0] != NULL)
246 {
247 if (GTK_IS_WIDGET(view -> oglmc[id][jd][0]))
248 {
249 widg = gtk_menu_get_attach_widget (GTK_MENU(view -> oglmc[id][jd][0]));
250 if (GTK_IS_WIDGET(widg))
251 {
252 g_object_ref (view -> oglmc[id][jd][0]);
253 gtk_menu_detach (GTK_MENU(view -> oglmc[id][jd][0]));
254 }
255 }
256 }
257 }
258 if (view -> oglmv[id][jd] != NULL)
259 {
260 if (view -> oglmv[id][jd][0] != NULL)
261 {
262 if (GTK_IS_WIDGET(view -> oglmv[id][jd][0]))
263 {
264 widg = gtk_menu_get_attach_widget (GTK_MENU(view -> oglmv[id][jd][0]));
265 if (GTK_IS_WIDGET(widg))
266 {
267 g_object_ref (view -> oglmv[id][jd][0]);
268 gtk_menu_detach (GTK_MENU(view -> oglmv[id][jd][0]));
269 }
270 }
271 }
272 }
273}
274
284GtkWidget * add_menu_coord (glwin * view, int id, int jd)
285{
286 int i, j;
287 GtkWidget * widg;
288 GtkWidget * menucts;
289 project * this_proj = get_project_by_id (view -> proj);
290 GtkWidget * menuct = gtk_menu_new ();
291 if (is_coord_in_menu(jd, this_proj))
292 {
293 if (jd == 2 || jd == 3) detach_frag_mol_menu(view, id, jd);
294 GtkWidget * colt = create_menu_item (TRUE, "_Show/Hide");
295 gtk_menu_shell_append ((GtkMenuShell *)menuct, colt);
296 if (jd < 2 || jd > 3)
297 {
298 menucts = gtk_menu_new ();
299 gtk_menu_item_set_submenu ((GtkMenuItem *)colt, menucts);
300 if (jd > 3)
301 {
302 if (jd == 9)
303 {
304 colt = create_menu_item (FALSE, "Atoms in chain(s) of size");
305 }
306 else
307 {
308 colt = create_menu_item (FALSE, "Atoms in ring(s) of size");
309 }
310 gtk_menu_shell_append ((GtkMenuShell *)menucts, colt);
311 menucts = gtk_menu_new ();
312 gtk_menu_item_set_submenu ((GtkMenuItem *)colt, menucts);
313 }
314 j = (jd < 2) ? this_proj -> nspec : this_proj -> coord -> totcoord[jd];
315 for (i=0; i<j; i++)
316 {
317 if (jd < 2)
318 {
319 if (view -> oglmv[id][jd])
320 {
321 if (GTK_IS_WIDGET(view -> oglmv[id][jd][i]))
322 {
323 widg = gtk_widget_get_parent (view -> oglmv[id][jd][i]);
324 if (GTK_IS_WIDGET(widg))
325 {
326 g_object_ref (view -> oglmv[id][jd][i]);
327 gtk_container_remove (GTK_CONTAINER(widg), view -> oglmv[id][jd][i]);
328 }
329 gtk_menu_shell_append ((GtkMenuShell *)menucts, view -> oglmv[id][jd][i]);
330 }
331 }
332 }
333 else
334 {
335 if (view -> ogl_geom[id][jd])
336 {
337 if (GTK_IS_WIDGET(view -> ogl_geom[id][jd][i]))
338 {
339 widg = gtk_widget_get_parent (view -> ogl_geom[id][jd][i]);
340 if (GTK_IS_WIDGET(widg))
341 {
342 g_object_ref (view -> ogl_geom[id][jd][i]);
343 gtk_container_remove (GTK_CONTAINER(widg), view -> ogl_geom[id][jd][i]);
344 }
345 gtk_menu_shell_append ((GtkMenuShell *)menucts, view -> ogl_geom[id][jd][i]);
346 }
347 }
348 }
349 }
350 }
351 else if ((jd == 2 && view -> adv_bonding[0]) || (jd == 3 && view -> adv_bonding[1]))
352 {
353 if (view -> oglmv[id][jd])
354 {
355 gtk_menu_item_set_submenu ((GtkMenuItem *)colt, view -> oglmv[id][jd][0]);
356 }
357 }
358 if (jd != 9)
359 {
360 colt = create_menu_item (FALSE, "Color(s)");
361 gtk_menu_shell_append ((GtkMenuShell *)menuct, colt);
362 }
363 if (jd < 2)
364 {
365 menucts = gtk_menu_new ();
366 gtk_menu_item_set_submenu ((GtkMenuItem *)colt, menucts);
367 if (view -> oglmc[id][jd])
368 {
369 for (i=0; i<this_proj -> nspec; i++)
370 {
371 if (GTK_IS_WIDGET(view -> oglmc[id][jd][i]))
372 {
373 widg = gtk_widget_get_parent (view -> oglmc[id][jd][i]);
374 if (GTK_IS_WIDGET(widg))
375 {
376 g_object_ref (view -> oglmc[id][jd][i]);
377 gtk_container_remove (GTK_CONTAINER(widg), view -> oglmc[id][jd][i]);
378 }
379 gtk_menu_shell_append ((GtkMenuShell *)menucts, view -> oglmc[id][jd][i]);
380 }
381 }
382 }
383 }
384 else if ((jd == 2 && view -> adv_bonding[0]) || (jd == 3 && view -> adv_bonding[1]))
385 {
386 if (view -> oglmc[id][jd])
387 {
388 if (GTK_IS_WIDGET(view -> oglmc[id][jd][0]))
389 {
390 gtk_menu_item_set_submenu ((GtkMenuItem *)colt, view -> oglmc[id][jd][0]);
391 }
392 }
393 }
394 else if ((jd > 3 && jd < 9) && view -> rings)
395 {
396 if (view -> oglmc[id][jd])
397 {
398 if (GTK_IS_WIDGET(view -> oglmc[id][jd][0]))
399 {
400 widg = gtk_menu_get_attach_widget (GTK_MENU(view -> oglmc[id][jd][0]));
401 if (GTK_IS_WIDGET(widg))
402 {
403 g_object_ref (view -> oglmc[id][jd][0]);
404 gtk_menu_detach (GTK_MENU(view -> oglmc[id][jd][0]));
405 }
406 gtk_menu_item_set_submenu ((GtkMenuItem *)colt, view -> oglmc[id][jd][0]);
407 }
408 }
409 }
410 }
411 add_advanced_item (menuct, G_CALLBACK(coord_properties), (gpointer)& view -> colorp[jd][1], FALSE, 0, 0);
412 return menuct;
413}
414
423GtkWidget * menu_coord (glwin * view, int id)
424{
425 GtkWidget * menuco = create_menu_item (FALSE, "Coordination");
426 GtkWidget * menuc = gtk_menu_new ();
427 gtk_menu_item_set_submenu ((GtkMenuItem *)menuco, menuc);
428
429 gtk_menu_shell_append ((GtkMenuShell *)menuc, menu_item_new_with_submenu ("Total(s)", TRUE, add_menu_coord(view, id, 0)));
430 gtk_menu_shell_append ((GtkMenuShell *)menuc, menu_item_new_with_submenu ("Partial(s)", TRUE, add_menu_coord(view, id, 1)));
431 return menuco;
432}
433
442GtkWidget * menu_rings (glwin * view, int id)
443{
444 GtkWidget * menuco = gtk_menu_new ();
445 if (view -> rings)
446 {
447 int i;
448 for (i=0; i<5; i++)
449 {
450 if (view -> ring_max[i])
451 {
452 if (id == 0)
453 {
454 view -> ogl_rings[i+1] = menu_item_new_with_submenu (rings_type[i], TRUE, add_menu_coord (view, id, 4+i));
455 gtk_menu_shell_append ((GtkMenuShell *)menuco, view -> ogl_rings[i+1]);
456 }
457 else
458 {
459 gtk_menu_shell_append ((GtkMenuShell *)menuco, menu_item_new_with_submenu (rings_type[i], TRUE, add_menu_coord (view, id, 4+i)));
460 }
461 }
462 }
463 }
464 return menuco;
465}
466#else
479GMenu * color_item (glwin * view, gchar * act, int popm, int id, GCallback handler, gpointer data)
480{
481 GMenu * menu = g_menu_new ();
482 append_opengl_item (view, menu, act, act, popm, id, NULL, IMG_NONE, NULL, TRUE, NULL, NULL, FALSE, FALSE, FALSE, FALSE);
483 append_opengl_item (view, menu, "More colors ...", act, popm, id, NULL, IMG_NONE, NULL, FALSE, handler, data, FALSE, FALSE, FALSE, TRUE);
484 return menu;
485}
486
497GMenu * menu_show_coord (glwin * view, int popm, int id, int mid)
498{
499 GMenu * menu = g_menu_new ();
500 GMenu * menus;
501 project * this_proj = get_project_by_id (view -> proj);
502 gchar * stra, * strb;
503 int i, j, k;
504 for (i=0; i<this_proj -> nspec; i++)
505 {
506 menus = g_menu_new ();
507 if (this_proj -> coord)
508 {
509 if (this_proj -> coord -> ntg[id])
510 {
511 j = 0;
512 for (k=0; k<i; k++)
513 {
514 j += this_proj -> coord -> ntg[id][k];
515 }
516 for (k=0; k < this_proj -> coord -> ntg[id][i]; k++)
517 {
518 if (id)
519 {
520 stra = exact_name (env_name (this_proj, k, i, 1, NULL));
521 }
522 else
523 {
524 stra = g_strdup_printf ("%d", this_proj -> coord -> geolist[id][i][k]);
525 }
526 if (! mid)
527 {
528 strb = g_strdup_printf ("%s-s", stra);
529 append_opengl_item (view, menus, stra, strb, popm, k+j, NULL, IMG_NONE, NULL, FALSE, G_CALLBACK(show_hide_coord), & view -> gcid[id][k+j][id],
530 TRUE, view -> anim -> last -> img -> show_coord[id][k+j], FALSE, TRUE);
531 }
532 else
533 {
534 strb = g_strdup_printf ("%s-c", stra);
535 append_submenu (menus, stra, color_item(view, strb, popm, k+j, G_CALLBACK(window_color_coord), & view -> gcid[id][k+j][id]));
536 }
537 g_free (stra);
538 g_free (strb);
539 }
540 }
541 }
542 append_submenu (menu, this_proj -> chemistry -> label[i], menus);
543 g_object_unref (menus);
544 }
545 return menu;
546}
547
557G_MODULE_EXPORT void to_coord_properties (GSimpleAction * action, GVariant * parameter, gpointer data)
558{
559 coord_properties (NULL, data);
560}
561
572GMenu * menu_show_frag_mol (glwin * view, int popm, int id, int mid)
573{
574 GMenu * menu = g_menu_new ();
575 project * this_proj = get_project_by_id (view -> proj);
576 if (active_coord -> totcoord[id] <= COORD_MAX_MENU)
577 {
578 gchar * stra, * strb;
579 int i;
580 for (i=0; i < this_proj -> coord -> totcoord[id]; i++)
581 {
582 stra = g_strdup_printf ("%s N°%d", (id == 2) ? "Fragment" : "Molecule", i+1);
583 strb = g_strdup_printf ("%s-%d", (id == 2) ? "frag" : "mol", i+1);
584 if (! mid)
585 {
586 append_opengl_item (view, menu, stra, strb, popm, i, NULL, IMG_NONE, NULL, FALSE, G_CALLBACK(show_hide_coord), & view -> gcid[id][i][id],
587 TRUE, view -> anim -> last -> img -> show_coord[id][i], FALSE, TRUE);
588 }
589 else
590 {
591 append_submenu (menu, stra, color_item(view, (id == 2) ? "fcol": "mcol", popm, i, G_CALLBACK(window_color_coord), & view -> gcid[id][i][id]));
592 }
593 g_free (stra);
594 g_free (strb);
595 }
596 }
597 // append_opengl_item (view, menu, "All", "all-fm", popm, id, NULL, IMG_NONE, NULL, FALSE, G_CALLBACK(to_coord_properties), & view -> colorp[id][1], FALSE, FALSE, FALSE, TRUE);
598 return menu;
599}
600
611GMenu * menu_show_rings (glwin * view, int popm, int id, int mid)
612{
613 GMenu * menu = g_menu_new ();
614 GMenu * menus;
615 if (! mid)
616 {
617 menus = g_menu_new ();
618 append_submenu (menu, (id < 9) ? "Atoms In Ring(s) of Size " : "Atoms In Chain(s) of Size ", menus);
619 }
620 project * this_proj = get_project_by_id (view -> proj);
621 gchar * rin = g_strdup_printf ("rcol-%d", id);
622 gchar * str;
623 int i;
624 for (i=0; i < this_proj -> coord -> totcoord[id]; i++)
625 {
626 str = g_strdup_printf ("rshow-%d", this_proj -> coord -> geolist[id][0][i]);
627 if (! mid)
628 {
629 append_opengl_item (view, menus, str, str, popm, i, NULL, IMG_NONE, NULL, FALSE, G_CALLBACK(show_hide_coord), & view -> gcid[id][i][id],
630 TRUE, view -> anim -> last -> img -> show_coord[id][i], FALSE, TRUE);
631 }
632 else
633 {
634 append_submenu (menu, str, color_item(view, rin, popm, i, G_CALLBACK(window_color_coord), & view -> gcid[id][i][id]));
635 }
636 g_free (str);
637 }
638 g_free (rin);
639 if (! mid) g_object_unref (menus);
640 return menu;
641}
642
652GMenu * add_menu_coord (glwin * view, int popm, int id)
653{
654 GMenu * menu = g_menu_new ();
655 project * this_proj = get_project_by_id (view -> proj);
656 gchar * menu_name[2] = {"Show/Hide", "Color"};
657 if (is_coord_in_menu(id, this_proj))
658 {
659 int i;
660 for (i=0; i<2; i++)
661 {
662 if (id < 2)
663 {
664 append_submenu (menu, menu_name[i], menu_show_coord(view, popm, id, i));
665 }
666 else if (id < 4)
667 {
668 append_submenu (menu, menu_name[i], menu_show_frag_mol(view, popm, id, i));
669 }
670 else if (id < 10)
671 {
672 append_submenu (menu, menu_name[i], menu_show_rings(view, popm, id, i));
673 }
674 }
675 append_opengl_item (view, menu, "Advanced", "adv-c", popm, id, NULL, IMG_STOCK, (gpointer)DPROPERTIES, FALSE,
676 G_CALLBACK(to_coord_properties), & view -> colorp[id][1], FALSE, FALSE, FALSE, TRUE);
677 }
678 return menu;
679}
680
689GMenu * menu_coord (glwin * view, int popm)
690{
691 GMenu * menu = g_menu_new ();
692 append_submenu (menu, "Total(s)", add_menu_coord(view, popm, 0));
693 append_submenu (menu, "Partial(s)", add_menu_coord(view, popm, 1));
694 return menu;
695}
696
705GMenu * menu_rings (glwin * view, int popm)
706{
707 GMenu * menu = g_menu_new ();
708 if (view -> rings)
709 {
710 int i;
711 for (i=0; i<5; i++)
712 {
713 if (view -> ring_max[i])
714 {
715 append_submenu (menu, rings_type[i], add_menu_coord (view, popm, 4+i));
716 }
717 }
718 }
719 return menu;
720}
721#endif
integer(kind=c_int) function chemistry()
Definition chemistry.F90:22
color colorp[64]
G_MODULE_EXPORT void window_color_coord(GtkWidget *widg, gpointer data)
create a window to select a color callback GTK3
Definition w_colors.c:277
void label(cairo_t *cr, double val, int axe, int p, project *this_proj)
draw axis label
Definition labels.c:56
int atoms[NUM_STYLES][2]
void init_default_shaders(glwin *view)
re-initialize the default OpenGL shaders
char * rings_type[5]
Definition global.c:143
Global variable declarations Global convenience function declarations Global data structure defin...
@ IMG_NONE
Definition global.h:232
@ IMG_STOCK
Definition global.h:236
coord_info * active_coord
Definition project.c:49
project * proj
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
Definition gui.c:602
GtkWidget * add_advanced_item(GtkWidget *menu, GCallback handler, gpointer data, gboolean accel, guint key, GdkModifierType mod)
#define DPROPERTIES
Definition global.h:178
GtkWidget * create_menu_item(gboolean add_mnemo, gchar *action)
GtkWidget * menu_item_new_with_submenu(gchar *name, gboolean active, GtkWidget *sub_menu)
project * get_project_by_id(int p)
get project pointer using id number
Definition project.c:120
Variable declarations related to the OpenGL window Function declarations related to the OpenGL wind...
action
Definition glview.h:189
#define COORD_MAX_MENU
Maximum number of fragments or molecules to build the related menu items.
Definition glview.h:139
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)
gchar * env_name(project *this_proj, int g, int s, int f, GtkTextBuffer *buffer)
ouput the name of a coordination sphere
Definition interface.c:889
gchar * exact_name(gchar *name)
short cut to print string without spaces
Definition interface.c:370
Messaging function declarations.
G_MODULE_EXPORT void coord_properties(GtkWidget *widg, gpointer data)
create the environments configuration window
Definition w_coord.c:1483
gboolean is_coord_in_menu(int id, project *this_proj)
is this coordination in a menu ?
Definition m_coord.c:74
GMenu * menu_coord(glwin *view, int popm)
create the 'Coordination' submenu GTK4
Definition m_coord.c:689
G_MODULE_EXPORT void show_hide_coord(GtkWidget *widg, gpointer data)
show/hide coordination callback GTK3
Definition m_coord.c:106
GMenu * menu_rings(glwin *view, int popm)
create the 'Ring(s)' submenu GTK4
Definition m_coord.c:705
G_MODULE_EXPORT void to_coord_properties(GSimpleAction *action, GVariant *parameter, gpointer data)
open advancedd coordination properties GTK4 callback
Definition m_coord.c:557
GMenu * add_menu_coord(glwin *view, int popm, int id)
create a coordination type submenu
Definition m_coord.c:652
GMenu * menu_show_frag_mol(glwin *view, int popm, int id, int mid)
create a fragment/molecule coordination submenu
Definition m_coord.c:572
GMenu * color_item(glwin *view, gchar *act, int popm, int id, GCallback handler, gpointer data)
create a submenu to attach a color palette
Definition m_coord.c:479
GMenu * menu_show_coord(glwin *view, int popm, int id, int mid)
create the coordination 'Show' or 'Color' submenus
Definition m_coord.c:497
GMenu * menu_show_rings(glwin *view, int popm, int id, int mid)
create a ring coordination submenu
Definition m_coord.c:611
Definition glwin.h:875
Definition global.h:106
int b
Definition tab-1.c:95
int c
Definition tab-1.c:95
int d
Definition tab-1.c:95
int a
Definition tab-1.c:95
GtkWidget * img
Definition workspace.c:70