atomes 1.1.14
atomes: an atomic scale modeling tool box
Loading...
Searching...
No Matches
atom_move.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
24/*
25* This file: 'atom_move.c'
26*
27* Contains:
28*
29
30 - The functions to move atom(s) and group of atom(s)
31 - The functions to move randomly atom(s) and group of atom(s)
32 - The functions to create the motion widgets of the model edition window
33
34*
35* List of functions:
36
37 float get_limit (int mot, glwin * view);
38
39 double ** save_coordinates (project * this_proj, int status);
40
41 gboolean rebuild_selection (project * this_proj, atom_search * asearch, int filter);
42 gboolean random_move_objects (project * this_proj, atom_search * asearch, int numo, int filter, int obj);
43 gboolean move_objects (project * this_proj, atom_search * asearch, int action, int axis, vec3_t trans, float ang);
44
45 G_MODULE_EXPORT gboolean scroll_range_move (GtkRange * range, GtkScrollType scroll, gdouble value, gpointer data);
46
47 void reset_coordinates (project * this_proj, int status);
48 void init_coordinates (project * this_proj, int status, gboolean win, gboolean init);
49 void translate (project * this_proj, int status, int axis, vec3_t trans);
50 void rotate_quat (project * this_proj, vec4_t q, int status, int axis);
51 void rotate (project * this_proj, int status, int axis, int raxis, float param);
52 void random_move_this_atom (project * this_proj, int aid);
53 void random_rotate_this_object (project * this_proj, atomic_object * object, double ratio, double msd);
54 void random_translate_this_object (project * this_proj, atomic_object * object, double ratio, double msd);
55 void random_move_this_object (project * this_proj, atomic_object * object, int move, double msd);
56 void trigger_refresh (project * this_proj, atom_search * asearch);
57 void random_move (project * this_proj, atom_search * asearch);
58 void translate_this_atom (project * this_proj, int aid, int axis, vec3_t trans);
59 void translate_this_object (project * this_proj, atomic_object * object, int axis, vec3_t trans);
60 void rotate_this_object (project * this_proj, atomic_object * object, int axis, int rax, float ang);
61 void move_selection (project * this_proj, int action, int axis, vec3_t trans, float ang);
62 void update_coordinates (project * this_proj, int status, int axis, int action);
63 void update_range_and_entry (project * this_proj, int i, int j, int k);
64 void range_has_changed (gpointer data, double v);
65 void check_motion_interactors (project * this_proj, atom_search * asearch);
66
67 G_MODULE_EXPORT void repeat_move (GtkSpinButton * res, gpointer data);
68 G_MODULE_EXPORT void set_move (GtkEntry * res, gpointer data);
69 G_MODULE_EXPORT void range_move (GtkRange * range, gpointer data);
70 G_MODULE_EXPORT void set_axis_for_motion (GtkComboBox * box, gpointer data);
71 G_MODULE_EXPORT void set_show_motion_axis (GtkCheckButton * but, gpointer data);
72 G_MODULE_EXPORT void set_show_motion_axis (GtkToggleButton * but, gpointer data);
73
74 GtkWidget * create_axis_entries (atom_search * asearch, project * this_proj, int mot, int axd);
75 GtkWidget * add_motion_interaction (atom_search * asearch, int axd, project * this_proj);
76
77*/
78
79#include "atom_edit.h"
80
81gboolean * was_moved_atom;
82
91double ** save_coordinates (project * this_proj, int status)
92{
93 int i, j;
94 i = 0;
95 if (status > 1)
96 {
97 i = this_proj -> natomes;
98 }
99 else
100 {
101 for (j=0; j<this_proj -> natomes; j++)
102 {
103 if (this_proj -> atoms[0][j].pick[0] == status) i++;
104 }
105 }
106 if (i == 0) return NULL;
107
108 double ** coords = allocddouble (i, 3);
109 i = 0;
110 if (status > 1)
111 {
112 for (i=0; i<this_proj -> natomes; i++)
113 {
114 coords[i][0] = this_proj -> atoms[0][i].x;
115 coords[i][1] = this_proj -> atoms[0][i].y;
116 coords[i][2] = this_proj -> atoms[0][i].z;
117 }
118 }
119 else
120 {
121 for (j=0; j<this_proj -> natomes; j++)
122 {
123 if (this_proj -> atoms[0][j].pick[0] == status)
124 {
125 coords[i][0] = this_proj -> atoms[0][j].x;
126 coords[i][1] = this_proj -> atoms[0][j].y;
127 coords[i][2] = this_proj -> atoms[0][j].z;
128 i ++;
129 }
130 }
131 }
132 return coords;
133}
134
143void reset_coordinates (project * this_proj, int status)
144{
145 int i, j;
146 i = 0;
147 if (this_proj -> modelgl -> saved_coord[status] != NULL)
148 {
149 for (j=0; j<this_proj -> natomes; j++)
150 {
151 if (this_proj -> atoms[0][j].pick[0] == status || status > 1)
152 {
153 this_proj -> atoms[0][j].x = this_proj -> modelgl -> saved_coord[status][i][0];
154 this_proj -> atoms[0][j].y = this_proj -> modelgl -> saved_coord[status][i][1];
155 this_proj -> atoms[0][j].z = this_proj -> modelgl -> saved_coord[status][i][2];
156 i ++;
157 }
158 }
159 }
160}
161
170vec3_t get_bary (project * this_proj, int status)
171{
172 vec3_t bar = vec3(0.0,0.0,0.0);
173 int j;
174 float i = 0.0;
175 for (j=0; j<this_proj -> natomes; j++)
176 {
177 if (this_proj -> atoms[0][j].pick[0] == status || status == 2)
178 {
179 i += 1.0;
180 bar = v3_add (bar, vec3(this_proj -> atoms[0][j].x, this_proj -> atoms[0][j].y, this_proj -> atoms[0][j].z));
181 }
182 }
183 if (i > 0.0) bar = v3_divs (bar, i);
184 return bar;
185}
186
197void init_coordinates (project * this_proj, int status, gboolean win, gboolean init)
198{
199 if (win)
200 {
201 int i, j;
202 for (i=0; i<2; i++)
203 {
204 for (j=0; j<6; j++)
205 {
206 this_proj -> modelgl -> atom_win -> new_param[status][i][j] = this_proj -> modelgl -> edition_param[status][i][j];
207 this_proj -> modelgl -> atom_win -> old_param[status][i][j] = this_proj -> modelgl -> edition_param[status][i][j];
208 }
209 }
210 this_proj -> modelgl -> atom_win -> axis[status] = 1;
211 this_proj -> modelgl -> atom_win -> show_axis[status] = FALSE;
212 }
213 this_proj -> modelgl -> baryc[status] = get_bary (this_proj, status);
214 if (init)
215 {
216 this_proj -> modelgl -> saved_coord[status] = save_coordinates (this_proj, status);
217 }
218}
219
230void translate (project * this_proj, int status, int axis, vec3_t trans)
231{
232 int i, j;
233 vec3_t c_old, c_new;
234 for (i=0; i<this_proj -> steps; i++)
235 {
236 for (j=0; j<this_proj -> natomes; j++)
237 {
238 if (this_proj -> atoms[i][j].pick[0] == status || status < 0)
239 {
240 c_old = vec3(this_proj -> atoms[i][j].x, this_proj -> atoms[i][j].y, this_proj -> atoms[i][j].z);
241 if (axis)
242 {
243 c_new = m4_mul_pos (this_proj -> modelgl -> view_matrix, c_old);
244 c_old = v3_add (c_new, trans);
245 c_new = m4_mul_pos (this_proj -> modelgl -> un_view_matrix, c_old);
246 }
247 else
248 {
249 c_new = v3_add (c_old, trans);
250 }
251 this_proj -> atoms[i][j].x = c_new.x;
252 this_proj -> atoms[i][j].y = c_new.y;
253 this_proj -> atoms[i][j].z = c_new.z;
254 }
255 }
256 }
257}
258
269void rotate_quat (project * this_proj, vec4_t q, int status, int axis)
270{
271 int j;
272 mat4_t rot = m4_quat_rotation (q);
273 vec3_t c_old, c_new;
274 for (j=0; j<this_proj -> natomes; j++)
275 {
276 if (this_proj -> atoms[0][j].pick[0] == status)
277 {
278 c_old = vec3(this_proj -> atoms[0][j].x, this_proj -> atoms[0][j].y, this_proj -> atoms[0][j].z);
279 c_new = v3_sub(c_old, this_proj -> modelgl -> baryc[status]);
280 if (axis)
281 {
282 c_old = m4_mul_pos (this_proj -> modelgl -> view_matrix, c_new);
283 c_new = m4_mul_pos (rot, c_old);
284 c_old = m4_mul_pos (this_proj -> modelgl -> un_view_matrix, c_new);
285 }
286 else
287 {
288 c_old = m4_mul_pos (rot, c_new);
289 }
290 c_new = v3_add (c_old, this_proj -> modelgl -> baryc[status]);
291 this_proj -> atoms[0][j].x = c_new.x;
292 this_proj -> atoms[0][j].y = c_new.y;
293 this_proj -> atoms[0][j].z = c_new.z;
294 }
295 }
296}
297
309void rotate (project * this_proj, int status, int axis, int raxis, float param)
310{
311 vec4_t qr;
312 vec3_t ax[3];
313 ax[0] = vec3(1.0,0.0,0.0);
314 ax[1] = vec3(0.0,1.0,0.0);
315 ax[2] = vec3(0.0,0.0,1.0);
316 qr = axis_to_quat(ax[raxis-3], param*pi/90.0);
317 rotate_quat (this_proj, qr, status, axis);
318}
319
328void random_move_this_atom (project * this_proj, int aid)
329{
330 int i, j, k, l;
331 // Using CPU time to randomize
332 clock_t begin = clock();
333 double prob;
334 i = (int)begin;
335 for (j=0; j<3; j++)
336 {
337 k = (j+1)*i*aid*(3*this_proj -> numwid);
338 prob= random3_(& k);
339 k *= k;
340 l = (prob <= 0.5) ? 1 : -1;
341 prob = random3_(& k);
342 switch (j)
343 {
344 case 0:
345 this_proj -> atoms[0][aid].x += l*prob*sqrt(this_proj -> modelgl -> atom_win -> msd[aid]/3.0);
346 break;
347 case 1:
348 this_proj -> atoms[0][aid].y += l*prob*sqrt(this_proj -> modelgl -> atom_win -> msd[aid]/3.0);
349 break;
350 case 2:
351 this_proj -> atoms[0][aid].z += l*prob*sqrt(this_proj -> modelgl -> atom_win -> msd[aid]/3.0);
352 break;
353 }
354 }
355}
356
367void random_rotate_this_object (project * this_proj, atomic_object * object, double ratio, double msd)
368{
369 int i, j, k, l, m, n;
370 vec3_t c_new, c_old;
371 vec3_t ax[3];
372 ax[0] = vec3(1.0,0.0,0.0);
373 ax[1] = vec3(0.0,1.0,0.0);
374 ax[2] = vec3(0.0,0.0,1.0);
375 vec3_t baryc = vec3(object -> baryc[0], object -> baryc[1], object -> baryc[2]);
376 vec4_t qr;
377 mat4_t rot;
378 // Using CPU time to randomize
379 clock_t begin = clock();
380 double prob;
381 i = (int)begin;
382 for (j=0; j<3; j++)
383 {
384 k = (j+1)*i*(3*this_proj -> numwid);
385 prob=random3_(& k);
386 k *= k;
387 l = (prob <= 0.5) ? 1 : -1;
388 prob = random3_(& k);
389 qr = axis_to_quat(ax[j], l*prob*sqrt(ratio*msd/3.0)*pi/90.0);
390 rot = m4_quat_rotation (qr);
391 for (m=0; m<object -> atoms; m++)
392 {
393 n = object -> at_list[m].id;
394 if (! was_moved_atom[n])
395 {
396 c_old = vec3(object -> at_list[m].x, object -> at_list[m].y, object -> at_list[m].z);
397 c_new = m4_mul_pos (rot, c_old);
398 object -> at_list[m].x = c_new.x;
399 object -> at_list[m].y = c_new.y;
400 object -> at_list[m].z = c_new.z;
401 c_old = v3_add (c_new, baryc);
402 this_proj -> atoms[0][n].x = c_old.x;
403 this_proj -> atoms[0][n].y = c_old.y;
404 this_proj -> atoms[0][n].z = c_old.z;
405 }
406 }
407 }
408}
409
420void random_translate_this_object (project * this_proj, atomic_object * object, double ratio, double msd)
421{
422 int i, j, k, l, m, n;
423 // Using CPU time to randomize
424 clock_t begin = clock();
425 double prob;
426 i = (int)begin;
427 for (j=0; j<3; j++)
428 {
429 k = (j+1)*i*(3*this_proj -> numwid);
430 prob=random3_(& k);
431 k *= k;
432 l = (prob <= 0.5) ? 1 : -1;
433 prob = l*random3_(& k)*sqrt(ratio*msd/3.0);
434 switch (j)
435 {
436 case 0:
437 for (m=0; m<object -> atoms; m++)
438 {
439 n = object -> at_list[m].id;
440 if (! was_moved_atom[n]) this_proj -> atoms[0][n].x += prob;
441 }
442 break;
443 case 1:
444 for (m=0; m<object -> atoms; m++)
445 {
446 n = object -> at_list[m].id;
447 if (! was_moved_atom[n]) this_proj -> atoms[0][n].y += prob;
448 }
449 break;
450 case 2:
451 for (m=0; m<object -> atoms; m++)
452 {
453 n = object -> at_list[m].id;
454 if (! was_moved_atom[n]) this_proj -> atoms[0][n].z += prob;
455 }
456 break;
457 }
458 object -> baryc[j] += prob;
459 }
460}
461
472void random_move_this_object (project * this_proj, atomic_object * object, int move, double msd)
473{
474 int i, j;
475 // Using CPU time to randomize
476 clock_t begin = clock();
477 double prob;
478 i = (int)begin;
479 switch (move)
480 {
481 case 1:
482 random_translate_this_object (this_proj, object, 1.0, msd);
483 break;
484 case 2:
485 random_rotate_this_object (this_proj, object, 1.0, msd);
486 break;
487 case 3:
488 j = object -> species*i*object -> atoms*(3*this_proj -> numwid);
489 prob = random3_(& j);
490 random_translate_this_object (this_proj, object, prob, msd);
491 random_rotate_this_object (this_proj, object, 1.0-prob, msd);
492 break;
493 }
494}
495
504void trigger_refresh (project * this_proj, atom_search * asearch)
505{
506 clean_all_trees (asearch, this_proj);
507 this_proj -> modelgl -> atom_win -> rebuilt[(asearch -> action == DISPL) ? 0 : 1] = TRUE;
508 update_search_tree (this_proj -> modelgl -> search_widg[(asearch -> action == DISPL) ? 6 : 2]);
509 check_all_trees (this_proj);
510}
511
521gboolean rebuild_selection (project * this_proj, atom_search * asearch, int filter)
522{
523 int i, j, k, l;
524 gboolean was_frag = this_proj -> modelgl -> adv_bonding[0];
525 gboolean was_mol = this_proj -> modelgl -> adv_bonding[1];
526 gboolean recons = FALSE;
527 int old_frag = this_proj -> coord -> totcoord[2];
528 i = (asearch -> action == DISPL) ? 0 : 1;
529 if (asearch -> object && this_proj -> modelgl -> rebuild[0][i])
530 {
531 int * saved_todo = duplicate_int (asearch -> todo_size, asearch -> todo);
532 int old_tds = asearch -> todo_size;
533 g_free (asearch -> todo);
534 allocate_todo (asearch, this_proj -> natomes);
535 j = 0;
536 int * oifcl = NULL;
537 atomic_object * object = this_proj -> modelgl -> atom_win -> to_be_moved[i];
538 while (object)
539 {
540 j += object -> ifcl;
541 object = object -> next;
542 }
543 if (j)
544 {
545 object = this_proj -> modelgl -> atom_win -> to_be_moved[i];
546 oifcl = allocint (j);
547 l = 0;
548 while (object)
549 {
550 for (k=0; k<object -> ifcl; k++)
551 {
552 oifcl[l] = object -> bcid[k];
553 l ++;
554 }
555 object = object -> next;
556 }
557 }
558 if (j)
559 {
560 reconstruct_bonds (this_proj, j, oifcl);
561 g_free (oifcl);
562 oifcl = NULL;
563 }
564 object = this_proj -> modelgl -> atom_win -> to_be_moved[i];
565 while (object)
566 {
567 if (object -> ifcl) reconstruct_coordinates_for_object (this_proj, object, TRUE);
568 if (filter < 3)
569 {
570 recons = TRUE;
571 for (j=0; j<object -> atoms; j++)
572 {
573 k = object -> at_list[j].id;
574 asearch -> todo[k] = 1;
575 }
576 }
577 object = object -> next;
578 }
579 if (recons)
580 {
581 apply_action (this_proj, asearch);
582 trigger_refresh (this_proj, asearch);
583 }
584 g_free (asearch -> todo);
585 asearch -> todo = duplicate_int (old_tds, saved_todo);
586 asearch -> todo_size = old_tds;
587 g_free (saved_todo);
588 }
589 if ((was_frag && ! this_proj -> modelgl -> adv_bonding[0]) || (was_mol && ! this_proj -> modelgl -> adv_bonding[1]))
590 {
591 return TRUE;
592 }
593 else if (old_frag != this_proj -> coord -> totcoord[2])
594 {
595 return TRUE;
596 }
597 else
598 {
599 return FALSE;
600 }
601}
602
614gboolean random_move_objects (project * this_proj, atom_search * asearch, int numo, int filter, int obj)
615{
616 atomic_object * object = this_proj -> modelgl -> atom_win -> to_be_moved[1];
617 float v;
618 int i, j, k;
619 gboolean recons = FALSE;
620 if (! this_proj -> modelgl -> atom_win -> rebuilt[1])
621 {
622 recons = rebuild_selection (this_proj, asearch, filter);
623 }
624 was_moved_atom = allocbool (this_proj -> natomes);
625 for (i=0; i<numo; i++)
626 {
627 if (asearch -> todo[i] && object)
628 {
629 v = (obj && filter > 2) ? this_proj -> modelgl -> atom_win -> msd_all[i] : this_proj -> modelgl -> atom_win -> msd[i];
630 if (v > 0.0)
631 {
632 for (j=0; j<this_proj -> modelgl -> atom_win -> repeat_move; j++)
633 {
634 random_move_this_object (this_proj, object, asearch -> todo[i], v);
635 }
636 for (j=0; j<object -> atoms; j++)
637 {
638 k = object -> at_list[j].id;
639 was_moved_atom[k] = TRUE;
640 }
641 }
642 object = object -> next;
643 }
644 }
645 g_free (was_moved_atom);
646 return recons;
647}
648
657void random_move (project * this_proj, atom_search * asearch)
658{
659 int obj = get_asearch_object (asearch);
660 int filter = get_asearch_filter (asearch);
661 int i, j;
662 gboolean recons = FALSE;
663 if (this_proj -> modelgl -> atom_win -> to_be_moved[1])
664 {
665 recons = random_move_objects (this_proj, asearch, asearch -> todo_size, filter, obj);
666 }
667 else
668 {
669 if (this_proj -> modelgl -> rebuild[0][1] && ! this_proj -> modelgl -> atom_win -> rebuilt[1])
670 {
671 apply_action (this_proj, asearch);
672 recons = TRUE;
673 }
674 for (i=0; i<asearch -> todo_size; i++)
675 {
676 if (asearch -> todo[i] && this_proj -> modelgl -> atom_win -> msd[i] > 0.0)
677 {
678 for (j=0; j<this_proj -> modelgl -> atom_win -> repeat_move; j++) random_move_this_atom (this_proj, i);
679 }
680 }
681 }
682 if (asearch -> recompute_bonding)
683 {
684 i = activep;
686 bonds_update = 1;
687 frag_update = (active_project -> natomes > ATOM_LIMIT) ? 0 : 1;
688 mol_update = (frag_update) ? ((active_project -> steps > STEP_LIMIT) ? 0 : 1) : 0;
689 active_project -> runc[0] = FALSE;
690 on_calc_bonds_released (NULL, NULL);
692 recons = TRUE;
693 }
694 this_proj -> modelgl -> was_moved = TRUE;
695 init_default_shaders (this_proj -> modelgl);
696#ifdef GTK3
697 // GTK3 Menu Action To Check
698 set_advanced_bonding_menus (this_proj -> modelgl);
699#endif
700 if (recons) trigger_refresh (this_proj, asearch);
701}
702
713void translate_this_atom (project * this_proj, int aid, int axis, vec3_t trans)
714{
715 vec3_t c_old, c_new;
716 c_old = vec3(this_proj -> atoms[0][aid].x, this_proj -> atoms[0][aid].y, this_proj -> atoms[0][aid].z);
717 if (axis)
718 {
719 c_new = m4_mul_pos (this_proj -> modelgl -> view_matrix, c_old);
720 c_old = v3_add (c_new, trans);
721 c_new = m4_mul_pos (this_proj -> modelgl -> un_view_matrix, c_old);
722 }
723 else
724 {
725 c_new = v3_add (c_old, trans);
726 }
727 this_proj -> atoms[0][aid].x = c_new.x;
728 this_proj -> atoms[0][aid].y = c_new.y;
729 this_proj -> atoms[0][aid].z = c_new.z;
730}
731
742void translate_this_object (project * this_proj, atomic_object * object, int axis, vec3_t trans)
743{
744 int i, j;
745 vec3_t c_old, c_new;
746 c_old = vec3(object -> baryc[0], object -> baryc[1], object -> baryc[2]);
747 if (axis)
748 {
749 c_new = m4_mul_pos (this_proj -> modelgl -> view_matrix, c_old);
750 c_old = v3_add (c_new, trans);
751 c_new = m4_mul_pos (this_proj -> modelgl -> un_view_matrix, c_old);
752 }
753 else
754 {
755 c_new = v3_add (c_old, trans);
756 }
757 object -> baryc[0] = c_new.x;
758 object -> baryc[1] = c_new.y;
759 object -> baryc[2] = c_new.z;
760 for (i=0; i<object -> atoms; i++)
761 {
762 j = object -> at_list[i].id;
763 if (! was_moved_atom[j])
764 {
765 was_moved_atom[j] = TRUE;
766 this_proj -> atoms[0][j].x = object -> baryc[0] + object -> at_list[i].x;
767 this_proj -> atoms[0][j].y = object -> baryc[1] + object -> at_list[i].y;
768 this_proj -> atoms[0][j].z = object -> baryc[2] + object -> at_list[i].z;
769 }
770 }
771}
772
784void rotate_this_object (project * this_proj, atomic_object * object, int axis, int rax, float ang)
785{
786 int i, j;
787 vec3_t c_new, c_old;
788 vec3_t baryc = vec3(object -> baryc[0], object -> baryc[1], object -> baryc[2]);
789 vec3_t ax[3];
790 ax[0] = vec3(1.0,0.0,0.0);
791 ax[1] = vec3(0.0,1.0,0.0);
792 ax[2] = vec3(0.0,0.0,1.0);
793 vec4_t qr;
794 mat4_t rot;
795 qr = axis_to_quat(ax[rax], ang*pi/180.0);
796 rot = m4_quat_rotation (qr);
797 for (i=0; i<object -> atoms; i++)
798 {
799 j = object -> at_list[i].id;
800 if (! was_moved_atom[j])
801 {
802 c_old = vec3(object -> at_list[i].x, object -> at_list[i].y, object -> at_list[i].z);
803 if (axis)
804 {
805 c_new = m4_mul_pos (this_proj -> modelgl -> view_matrix, c_old);
806 c_old = m4_mul_pos (rot, c_new);
807 c_new = m4_mul_pos (this_proj -> modelgl -> un_view_matrix, c_old);
808 }
809 else
810 {
811 c_new = m4_mul_pos (rot, c_old);
812 }
813 object -> at_list[i].x = c_new.x;
814 object -> at_list[i].y = c_new.y;
815 object -> at_list[i].z = c_new.z;
816 c_old = v3_add (c_new, baryc);
817 this_proj -> atoms[0][j].x = c_old.x;
818 this_proj -> atoms[0][j].y = c_old.y;
819 this_proj -> atoms[0][j].z = c_old.z;
820 was_moved_atom[j] = TRUE;
821 }
822 }
823}
824
837gboolean move_objects (project * this_proj, atom_search * asearch, int action, int axis, vec3_t trans, float ang)
838{
839 gboolean recons = FALSE;
840 if (this_proj -> modelgl -> rebuild[0][0] && ! this_proj -> modelgl -> atom_win -> rebuilt[0])
841 {
842 recons = rebuild_selection (this_proj, asearch, get_asearch_filter(asearch));
843 }
844 atomic_object * object = this_proj -> modelgl -> atom_win -> to_be_moved[0];
845 was_moved_atom = allocbool (this_proj -> natomes);
846 int i, j;
847 while (object)
848 {
849 if (action < 3)
850 {
851 translate_this_object (this_proj, object, axis, trans);
852 }
853 else
854 {
855 rotate_this_object (this_proj, object, axis, action-3, ang);
856 }
857 for (i=0; i<object -> atoms; i++)
858 {
859 j = object -> at_list[i].id;
860 was_moved_atom[j] = TRUE;
861 }
862 object = object -> next;
863 }
864 g_free (was_moved_atom);
865 return recons;
866}
867
869
881void move_selection (project * this_proj, int action, int axis, vec3_t trans, float ang)
882{
883 atom_search * asearch = duplicate_atom_search (this_proj -> modelgl -> search_widg[2]);
884 gboolean recons = FALSE;
885 gboolean move_it = do_we_have_objects_in_selection (this_proj, asearch, TRUE);
886 if (move_it)
887 {
888 int i;
889 if (this_proj -> modelgl -> atom_win -> to_be_moved[0])
890 {
891 recons = move_objects (this_proj, asearch, action, axis, trans, ang);
892 }
893 else
894 {
895 if (this_proj -> modelgl -> rebuild[0][0] && ! this_proj -> modelgl -> atom_win -> rebuilt[0])
896 {
897 apply_action (this_proj, asearch);
898 recons = TRUE;
899 }
900 for (i=0; i<asearch -> todo_size; i++)
901 {
902 if (asearch -> todo[i])
903 {
904 translate_this_atom (this_proj, i, axis, trans);
905 }
906 }
907 }
908 if (asearch -> recompute_bonding)
909 {
910 i = activep;
912 bonds_update = 1;
913 frag_update = (active_project -> natomes > ATOM_LIMIT) ? 0 : 1;
914 mol_update = (frag_update) ? ((active_project -> steps > STEP_LIMIT) ? 0 : 1) : 0;
915 active_project -> runc[0] = FALSE;
916 on_calc_bonds_released (NULL, NULL);
918 recons = TRUE;
919 }
920 init_default_shaders (this_proj -> modelgl);
921#ifdef GTK3
922 // GTK3 Menu Action To Check
923 set_advanced_bonding_menus (this_proj -> modelgl);
924#endif
925 if (recons) trigger_refresh (this_proj, asearch);
926 }
927}
928
939void update_coordinates (project * this_proj, int status, int axis, int action)
940{
941 vec3_t trans = vec3(this_proj -> modelgl -> atom_win -> new_param[status][axis][0]-this_proj -> modelgl -> atom_win -> old_param[status][axis][0],
942 this_proj -> modelgl -> atom_win -> new_param[status][axis][1]-this_proj -> modelgl -> atom_win -> old_param[status][axis][1],
943 this_proj -> modelgl -> atom_win -> new_param[status][axis][2]-this_proj -> modelgl -> atom_win -> old_param[status][axis][2]);
944 float r = this_proj -> modelgl -> atom_win -> new_param[status][axis][action] - this_proj -> modelgl -> atom_win -> old_param[status][axis][action];
945 if (v3_length(trans) != 0.0 || r != 0.0)
946 {
947 move_selection (this_proj, action, axis, trans, r);
948 this_proj -> modelgl -> was_moved = TRUE;
949 this_proj -> modelgl -> atom_win -> old_param[status][axis][action] = this_proj -> modelgl -> atom_win -> new_param[status][axis][action];
950 init_default_shaders (this_proj -> modelgl);
951 update (this_proj -> modelgl);
952 }
953}
954
963G_MODULE_EXPORT void repeat_move (GtkSpinButton * res, gpointer data)
964{
965 project * this_proj = (project *)data;
966 this_proj -> modelgl -> atom_win -> repeat_move = gtk_spin_button_get_value_as_int(res);
967}
968
979void update_range_and_entry (project * this_proj, int i, int j, int k)
980{
981 update_entry_double (GTK_ENTRY(this_proj -> modelgl -> atom_win -> edit_entry[k]),
982 this_proj -> modelgl -> atom_win -> new_param[i][j][k]);
983 gtk_range_set_value (GTK_RANGE(this_proj -> modelgl -> atom_win -> edit_scale[k]),
984 this_proj -> modelgl -> atom_win -> new_param[i][j][k]);
985}
986
995float get_limit (int mot, glwin * view)
996{
997 if (! mot)
998 {
999 int plimit = (int)(view -> anim -> last -> img -> p_depth/limit[mot]);
1000 return limit[mot] + 2.0*plimit*limit[mot];
1001 }
1002 else
1003 {
1004 return limit[mot];
1005 }
1006}
1007
1016void range_has_changed (gpointer data, double v)
1017{
1018 tint * id = (tint *)data;
1019 project * this_proj = get_project_by_id(id -> a);
1020 int h, i, j, k;
1021 h = id -> b - TOLAB;
1022 i = (h < 3) ? 0 : 1;
1023 j = this_proj -> modelgl -> atom_win -> axis[i];
1024 k = this_proj -> modelgl -> search_widg[id -> c] -> status;
1025 if (v != this_proj -> modelgl -> atom_win -> new_param[k][j][h])
1026 {
1027 float plim = get_limit (i, this_proj -> modelgl);
1028 if (v >= -plim && v <= plim)
1029 {
1030 this_proj -> modelgl -> atom_win -> new_param[k][j][h] = v;
1031 this_proj -> modelgl -> atom_win -> active = i;
1032 update_coordinates (this_proj, k, j, h);
1033 }
1034 update_range_and_entry (this_proj, k, j, h);
1035 }
1036}
1037
1046G_MODULE_EXPORT void set_move (GtkEntry * res, gpointer data)
1047{
1048 const gchar * m = entry_get_text (res);
1049 double v = atof(m);
1050 range_has_changed (data, v);
1051}
1052
1061G_MODULE_EXPORT void range_move (GtkRange * range, gpointer data)
1062{
1063 range_has_changed (data, gtk_range_get_value (range));
1064}
1065
1076G_MODULE_EXPORT gboolean scroll_range_move (GtkRange * range, GtkScrollType scroll, gdouble value, gpointer data)
1077{
1078 range_has_changed (data, value);
1079 return FALSE;
1080}
1081
1090G_MODULE_EXPORT void set_axis_for_motion (GtkComboBox * box, gpointer data)
1091{
1092 tint * id = (tint *)data;
1093 project * this_proj = get_project_by_id (id -> a);
1094 int i, j;
1095 j = id -> b - TOLAB;
1096 this_proj -> modelgl -> atom_win -> axis[j] = gtk_combo_box_get_active (box);
1097 for (i=3*j; i<(j + 1)*3; i++)
1098 {
1099 update_range_and_entry (this_proj, this_proj -> modelgl -> search_widg[id -> c] -> status, this_proj -> modelgl -> atom_win -> axis[j], i);
1100 }
1101 this_proj -> modelgl -> atom_win -> active = j;
1102 update (this_proj -> modelgl);
1103}
1104
1105#ifdef GTK4
1114G_MODULE_EXPORT void set_show_motion_axis (GtkCheckButton * but, gpointer data)
1115#else
1124G_MODULE_EXPORT void set_show_motion_axis (GtkToggleButton * but, gpointer data)
1125#endif
1126{
1127 tint * id = (tint *)data;
1128 project * this_proj = get_project_by_id (id -> a);
1129 int i, j;
1130 j = id -> b - TOLAB;
1131#ifdef GTK4
1132 i = gtk_check_button_get_active (but);
1133 gtk_check_button_set_active (GTK_CHECK_BUTTON(this_proj -> modelgl -> atom_win -> axis_but[! j]), i);
1134#else
1135 i = gtk_toggle_button_get_active (but);
1136 gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(this_proj -> modelgl -> atom_win -> axis_but[! j]), i);
1137#endif
1138 this_proj -> modelgl -> atom_win -> active = j;
1139 this_proj -> modelgl -> atom_win -> show_axis[j] = i;
1140 if (i)
1141 {
1142 this_proj -> modelgl -> anim -> last -> img -> box_axis[AXIS] = CYLINDERS;
1143 }
1144 else
1145 {
1146 this_proj -> modelgl -> anim -> last -> img -> box_axis[AXIS] = this_proj -> modelgl -> atom_win -> old_axis;
1147 }
1148 this_proj -> modelgl -> create_shaders[MAXIS] = TRUE;
1149 update (this_proj -> modelgl);
1150}
1151
1160void check_motion_interactors (project * this_proj, atom_search * asearch)
1161{
1162 gboolean activate = do_we_have_objects_in_selection (this_proj, asearch, FALSE);
1163 int i;
1164 if (this_proj -> modelgl -> atom_win)
1165 {
1166 for (i=0; i<6; i++)
1167 {
1168 if (this_proj -> modelgl -> atom_win -> edit_entry[i])
1169 {
1170 widget_set_sensitive (this_proj -> modelgl -> atom_win -> edit_entry[i], (((asearch -> object && ! asearch -> passivating ) || (asearch -> object > 1 && asearch -> passivating)) || i < 3) ? activate : 0);
1171 }
1172 if (this_proj -> modelgl -> atom_win -> edit_scale[i])
1173 {
1174 widget_set_sensitive (this_proj -> modelgl -> atom_win -> edit_scale[i], (((asearch -> object && ! asearch -> passivating ) || (asearch -> object > 1 && asearch -> passivating)) || i < 3) ? activate : 0);
1175 }
1176 }
1177 }
1178}
1179
1190GtkWidget * create_axis_entries (atom_search * asearch, project * this_proj, int mot, int axd)
1191{
1192 gchar * str;
1193 GtkWidget * lab;
1194 GtkWidget * hbox;
1195 gchar * axis[3]={"x", "y", "z"};
1196 gchar * unit[2]={"<b>&#xC5;</b>", "<b>&#xB0;</b>"};
1197 GtkWidget * vbox = create_vbox (5);
1198 int j = mot*3 + axd;
1199 float plim = get_limit (mot, this_proj -> modelgl);
1200 this_proj -> modelgl -> atom_win -> edit_entry[j] = create_entry (G_CALLBACK(set_move), 100, 15, FALSE, & asearch -> pointer[j]);
1201 this_proj -> modelgl -> atom_win -> edit_scale[j] = create_hscale (-plim, plim, 0.001,
1202 this_proj -> modelgl -> atom_win -> new_param[asearch -> status][1][j], GTK_POS_TOP, 4, 250,
1203 G_CALLBACK(range_move), G_CALLBACK(scroll_range_move), & asearch -> pointer[j]);
1204 widget_set_sensitive (this_proj -> modelgl -> atom_win -> edit_entry[j], 0);
1205 widget_set_sensitive (this_proj -> modelgl -> atom_win -> edit_scale[j], 0);
1206 str = g_strdup_printf ("On <b>%s</b> axis:", axis[axd]);
1207 lab = markup_label(unit[mot], 20, -1, 0.0, 0.5);
1208 update_entry_double (GTK_ENTRY(this_proj -> modelgl -> atom_win -> edit_entry[j]), this_proj -> modelgl -> atom_win -> new_param[asearch -> status][1][j]);
1209 hbox = create_hbox (0);
1210 add_box_child_start (GTK_ORIENTATION_HORIZONTAL, hbox, markup_label(str, 70, -1, 0.0, 0.5), FALSE, FALSE, 50);
1211 g_free (str);
1212 add_box_child_start (GTK_ORIENTATION_HORIZONTAL, hbox, this_proj -> modelgl -> atom_win -> edit_scale[j], FALSE, FALSE, 0);
1213 GtkWidget * fixed = gtk_fixed_new ();
1214 gtk_fixed_put (GTK_FIXED(fixed), this_proj -> modelgl -> atom_win -> edit_entry[j], 0, 15);
1215 gtk_fixed_put (GTK_FIXED(fixed), lab, 120, 25);
1216 add_box_child_start (GTK_ORIENTATION_HORIZONTAL, hbox, fixed, FALSE, FALSE, 50);
1217 add_box_child_start (GTK_ORIENTATION_VERTICAL, vbox, hbox, FALSE, FALSE, 0);
1218 return vbox;
1219}
1220
1230GtkWidget * add_motion_interaction (atom_search * asearch, int axd, project * this_proj)
1231{
1232 GtkWidget * vbox = create_vbox (BSEP);
1233 GtkWidget * hbox = create_hbox (5);
1234 add_box_child_start (GTK_ORIENTATION_VERTICAL, vbox, hbox, FALSE, FALSE, 10);
1235 add_box_child_start (GTK_ORIENTATION_HORIZONTAL, hbox, markup_label("<u>Select the axis to be used:</u> ", 200, -1, 0.0, 0.5), FALSE, FALSE, 20);
1236 this_proj -> modelgl -> atom_win -> axis_combo[axd] = create_combo ();
1237 combo_text_append (this_proj -> modelgl -> atom_win -> axis_combo[axd], "Model axis");
1238 combo_text_append (this_proj -> modelgl -> atom_win -> axis_combo[axd], "Eye (viewer) axis");
1239 gtk_combo_box_set_active (GTK_COMBO_BOX(this_proj -> modelgl -> atom_win -> axis_combo[axd]),
1240 this_proj -> modelgl -> atom_win -> axis[axd]);
1241 g_signal_connect (G_OBJECT (this_proj -> modelgl -> atom_win -> axis_combo[axd]), "changed", G_CALLBACK(set_axis_for_motion), & asearch -> pointer[axd]);
1242 add_box_child_start (GTK_ORIENTATION_HORIZONTAL, hbox, this_proj -> modelgl -> atom_win -> axis_combo[axd], FALSE, FALSE, 20);
1243 this_proj -> modelgl -> atom_win -> axis_but[axd] = check_button ("Show", 100, 35, FALSE, G_CALLBACK(set_show_motion_axis), & asearch -> pointer[axd]);
1244 add_box_child_start (GTK_ORIENTATION_HORIZONTAL, hbox, this_proj -> modelgl -> atom_win -> axis_but[axd], FALSE, FALSE, 20);
1245 int i;
1246 for (i=0; i<3; i++)
1247 {
1248 add_box_child_start (GTK_ORIENTATION_VERTICAL, vbox, create_axis_entries (asearch, this_proj, axd, i), FALSE, FALSE, 0);
1249 }
1250 hbox = create_hbox (5);
1251 add_box_child_start (GTK_ORIENTATION_VERTICAL, vbox, hbox, FALSE, FALSE, 20);
1252 //add_box_child_start (GTK_ORIENTATION_HORIZONTAL, hbox,
1253 // check_button ("Reset transformation(s)", -1, 35, FALSE, G_CALLBACK(set_reset_transformation), & asearch -> pointer[0]),
1254 // FALSE, FALSE, 10);
1255 return vbox;
1256}
void apply_action(project *this_proj, atom_search *asearch)
apply edition action
gboolean do_we_have_objects_in_selection(project *this_proj, atom_search *asearch, gboolean editing)
check for object(s) in selection to apply action
void clean_all_trees(atom_search *asearch, project *this_proj)
clean all tree models in the 'model edition' window
gboolean was_moved
Definition atom_edit.c:62
float limit[2]
Definition atom_edit.c:59
Function declarations for the mode edition window.
int get_asearch_object(atom_search *asearch)
get the number of object(s) in this atom search
Definition w_search.c:149
void update_search_tree(atom_search *asearch)
update search tree
Definition w_search.c:1294
void reconstruct_coordinates_for_object(project *this_proj, atomic_object *this_object, gboolean upcoord)
reconstruct object atomic coordinates using PBC
int get_asearch_filter(atom_search *asearch)
get asearch filter
Definition w_search.c:170
gchar * mot[2][2]
Definition popup.c:3294
void check_all_trees(project *this_proj)
check all search trees
Definition w_search.c:450
#define TOLAB
Definition atom_edit.h:45
void allocate_todo(atom_search *asearch, int tsize)
allocate the selection list data buffer
Definition w_search.c:3717
void reconstruct_bonds(project *this_proj, int ifcl, int *bcid)
reconstruct the project bond(s)/clone(s) lists after reconstruction using PBC
void random_translate_this_object(project *this_proj, atomic_object *object, double ratio, double msd)
random translate an object
Definition atom_move.c:420
void rotate(project *this_proj, int status, int axis, int raxis, float param)
rotate
Definition atom_move.c:309
void translate_this_object(project *this_proj, atomic_object *object, int axis, vec3_t trans)
translate object
Definition atom_move.c:742
G_MODULE_EXPORT gboolean scroll_range_move(GtkRange *range, GtkScrollType scroll, gdouble value, gpointer data)
motion callback - scroll
Definition atom_move.c:1076
double ** save_coordinates(project *this_proj, int status)
save atomic coordinates
Definition atom_move.c:91
void trigger_refresh(project *this_proj, atom_search *asearch)
refresh search tree model
Definition atom_move.c:504
gboolean rebuild_selection(project *this_proj, atom_search *asearch, int filter)
rebuild selection (split fragments linked thru PBC)
Definition atom_move.c:521
G_MODULE_EXPORT void set_show_motion_axis(GtkToggleButton *but, gpointer data)
set show / hide motion axis toggle callback GTK3
Definition atom_move.c:1124
G_MODULE_EXPORT void set_move(GtkEntry *res, gpointer data)
motion callback - entry
Definition atom_move.c:1046
float get_limit(int mot, glwin *view)
get motion limit
Definition atom_move.c:995
atom_search * duplicate_atom_search(atom_search *asearch)
duplicate atom search data structure
G_MODULE_EXPORT void repeat_move(GtkSpinButton *res, gpointer data)
repeat motion callback
Definition atom_move.c:963
gboolean random_move_objects(project *this_proj, atom_search *asearch, int numo, int filter, int obj)
random move object(s)
Definition atom_move.c:614
void random_move_this_atom(project *this_proj, int aid)
random move atom
Definition atom_move.c:328
void init_coordinates(project *this_proj, int status, gboolean win, gboolean init)
preserve atomic coordinates
Definition atom_move.c:197
void random_move(project *this_proj, atom_search *asearch)
random move
Definition atom_move.c:657
void random_rotate_this_object(project *this_proj, atomic_object *object, double ratio, double msd)
random rotate an object
Definition atom_move.c:367
void reset_coordinates(project *this_proj, int status)
reset transformation and restore saved atomic coordinates
Definition atom_move.c:143
void move_selection(project *this_proj, int action, int axis, vec3_t trans, float ang)
move atom selection
Definition atom_move.c:881
GtkWidget * add_motion_interaction(atom_search *asearch, int axd, project *this_proj)
add motion interaction widgets
Definition atom_move.c:1230
void translate(project *this_proj, int status, int axis, vec3_t trans)
translate
Definition atom_move.c:230
void range_has_changed(gpointer data, double v)
motion
Definition atom_move.c:1016
G_MODULE_EXPORT void range_move(GtkRange *range, gpointer data)
motion callback - range
Definition atom_move.c:1061
void rotate_quat(project *this_proj, vec4_t q, int status, int axis)
rotate using quaternion
Definition atom_move.c:269
gboolean * was_moved_atom
Definition atom_move.c:81
void update_coordinates(project *this_proj, int status, int axis, int action)
update atomic coordinates on motion
Definition atom_move.c:939
vec3_t get_bary(project *this_proj, int status)
get barycenter of atomic coordinates
Definition atom_move.c:170
void update_range_and_entry(project *this_proj, int i, int j, int k)
update motion range
Definition atom_move.c:979
GtkWidget * create_axis_entries(atom_search *asearch, project *this_proj, int mot, int axd)
create axis entries
Definition atom_move.c:1190
gboolean move_objects(project *this_proj, atom_search *asearch, int action, int axis, vec3_t trans, float ang)
move objects, return reconstruction status
Definition atom_move.c:837
void translate_this_atom(project *this_proj, int aid, int axis, vec3_t trans)
translate atom
Definition atom_move.c:713
void rotate_this_object(project *this_proj, atomic_object *object, int axis, int rax, float ang)
rotate object
Definition atom_move.c:784
void check_motion_interactors(project *this_proj, atom_search *asearch)
add motion check button
Definition atom_move.c:1160
void random_move_this_object(project *this_proj, atomic_object *object, int move, double msd)
random move object
Definition atom_move.c:472
G_MODULE_EXPORT void set_axis_for_motion(GtkComboBox *box, gpointer data)
set motion axis (eye or model)
Definition atom_move.c:1090
double random3_(int *)
GtkFileFilter * filter[NCFORMATS+1]
Definition callbacks.c:1406
gchar * axis[3]
Definition w_axis.c:65
gchar * param[2]
double ax
Definition curve.c:70
int atoms[NUM_STYLES][2]
void init_default_shaders(glwin *view)
re-initialize the default OpenGL shaders
int * duplicate_int(int num, int *old_val)
copy a list of int
Definition global.c:572
int mol_update
Definition global.c:171
double pi
Definition global.c:195
int activep
Definition global.c:159
gboolean * allocbool(int val)
allocate a gboolean * pointer
Definition global.c:266
double ** allocddouble(int xal, int yal)
allocate a double ** pointer
Definition global.c:487
int frag_update
Definition global.c:170
int bonds_update
Definition global.c:169
int * allocint(int val)
allocate an int * pointer
Definition global.c:326
GtkWidget * create_entry(GCallback handler, int dim, int cdim, gboolean key_release, gpointer data)
Create a GtkEntry.
Definition gtk-misc.c:1294
void update_entry_double(GtkEntry *entry, double doubleval)
update the content of a GtkEntry as double
Definition gtk-misc.c:613
#define ATOM_LIMIT
Atom number limit to compute fragment(s) and molecule(s) analysis automatically.
const gchar * entry_get_text(GtkEntry *entry)
get the text in a GtkEntry
Definition gtk-misc.c:577
#define BSEP
Definition global.h:217
GtkWidget * check_button(gchar *text, int dimx, int dimy, gboolean state, GCallback handler, gpointer data)
create a check button
Definition gtk-misc.c:1779
#define STEP_LIMIT
Definition global.h:249
G_MODULE_EXPORT void on_calc_bonds_released(GtkWidget *widg, gpointer data)
compute bonding properties
Definition bdcall.c:471
GtkWidget * create_combo()
create a GtkCombox widget, note deprecated in GTK4
Definition gtk-misc.c:903
GtkWidget * markup_label(gchar *text, int dimx, int dimy, float ax, float ay)
Definition gtk-misc.c:1565
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.
Definition gtk-misc.c:279
void widget_set_sensitive(GtkWidget *widg, gboolean sensitive)
Set sensitivity for a GtkWidget, ensuring it is a GtkWidget.
Definition gtk-misc.c:186
GtkWidget * create_hbox(int spacing)
create a GtkBox with horizontal orientation
Definition gtk-misc.c:793
void combo_text_append(GtkWidget *combo, gchar *text)
append text in GtkComboBox widget
Definition gtk-misc.c:880
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
Definition gtk-misc.c:724
GtkWidget * create_vbox(int spacing)
create a GtkBox with vertical orientation
Definition gtk-misc.c:781
project * active_project
Definition project.c:47
project * get_project_by_id(int p)
get project pointer using id number
Definition project.c:120
void update(glwin *view)
update the rendering of the OpenGL window
Definition glview.c:439
action
Definition glview.h:189
gboolean pick
@ DISPL
Definition glview.h:224
@ CYLINDERS
Definition glview.h:177
#define AXIS
Definition glwin.h:55
@ MAXIS
Definition glwin.h:94
void set_advanced_bonding_menus(glwin *view)
integer(kind=c_int) function msd(dlt, ndts)
Definition msd.F90:22
double z
Definition ogl_draw.c:57
double y
Definition ogl_draw.c:57
double x
Definition ogl_draw.c:57
void active_project_changed(int id)
change the active project
Definition update_p.c:175
Definition glwin.h:875
Definition global.h:98
float y
Definition math_3d.h:130
float x
Definition math_3d.h:130
float z
Definition math_3d.h:130
int b
Definition tab-1.c:95
int c
Definition tab-1.c:95
int a
Definition tab-1.c:95
GtkWidget * show_axis
Definition tab-4.c:97
int status
Definition w_advance.c:160
GtkWidget * res[2]
Definition w_encode.c:212
GtkWidget * hbox
Definition workspace.c:71
GtkWidget * img
Definition workspace.c:70
GtkWidget * vbox
Definition workspace.c:72
GtkWidget * lab
Definition workspace.c:73