atomes 1.2.1
atomes: an atomic scale modeling tool box
Loading...
Searching...
No Matches
atom_edit.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-2025 by CNRS and University of Strasbourg */
15
22/*
23* This file: 'atom_edit.c'
24*
25* Contains:
26*
27
28 - The functions to create the model edition window
29
30*
31* List of functions:
32
33 gboolean is_atom_win_active (glwin * view);
34
35 G_MODULE_EXPORT gboolean delete_action (GtkWindow * widg, gpointer data);
36 G_MODULE_EXPORT gboolean delete_action (GtkWidget * widg, GdkEvent * event, gpointer data);
37
38 void clean_coord_window (project * this_proj);
39 void clean_other_window_after_edit (project * this_proj);
40 void clean_atom_win (project * this_proj);
41 void prepare_atom_edition (gpointer data, gboolean visible);
42
43 G_MODULE_EXPORT void close_edit (GtkButton * but, gpointer data);
44 G_MODULE_EXPORT void set_reset_transformation (GtkCheckButton * but, gpointer data);
45 G_MODULE_EXPORT void set_reset_transformation (GtkToggleButton * but, gpointer data);
46 G_MODULE_EXPORT void apply_edit (GtkButton * but, gpointer data);
47 G_MODULE_EXPORT void action_window (GSimpleAction * action, GVariant * parameter, gpointer data);
48 G_MODULE_EXPORT void action_window (GtkWidget * widg, gpointer data);
49
50 GtkWidget * create_atom_notebook (project * this_proj, GtkWidget * vbox);
51 GtkWidget * create_edition_window (project * this_proj);
52
53 atom_search * allocate_atom_search (int proj, int action, int searchid, int tsize);
54
55*/
56
57#include "atom_edit.h"
58
59float limit[2] = {100.0, 180.0};
60gchar * action_name[5] = {"Move", "Replace", "Remove", "Insert", "Random move"};
61gchar * action_atoms[3] = {"All non-selected atoms", "All selected atoms", "All atoms"};
62gboolean was_moved;
63
71gboolean is_atom_win_active (glwin * view)
72{
73 if (view -> atom_win)
74 {
75 return view -> atom_win -> visible;
76 }
77 return FALSE;
78}
79
87void clean_coord_window (project * this_proj)
88{
89 if (this_proj -> modelgl -> coord_win)
90 {
91#ifdef GTK3
92 int x, y;
93 gtk_window_get_position (GTK_WINDOW(this_proj -> modelgl -> coord_win -> win), & x, & y);
94#endif
95 this_proj -> modelgl -> coord_win -> win = destroy_this_widget (this_proj -> modelgl -> coord_win -> win);
96 this_proj -> modelgl -> coord_win -> win = advanced_coord_properties (this_proj -> modelgl, 0);
97#ifdef GTK3
98 gtk_window_move (GTK_WINDOW(this_proj -> modelgl -> coord_win -> win), x ,y);
99#endif
100 }
101}
102
111{
112 int i;
113 clean_coord_window (this_proj);
114 if (this_proj -> modelgl -> cell_win)
115 {
116 if (this_proj -> modelgl -> cell_win -> win && ! this_proj -> modelgl -> cell_win -> slab_passivate)
117 {
118 i = gtk_notebook_get_current_page (GTK_NOTEBOOK (this_proj -> modelgl -> cell_win -> notebook));
119#ifdef GTK3
120 int x, y;
121 gtk_window_get_position (GTK_WINDOW(this_proj -> modelgl -> cell_win -> win), & x, & y);
122#endif
123 this_proj -> modelgl -> cell_win -> win = destroy_this_widget (this_proj -> modelgl -> cell_win -> win);
124 this_proj -> modelgl -> cell_win -> density = NULL;
125 if (this_proj -> modelgl -> cell_win -> slab_lot) g_free (this_proj -> modelgl -> cell_win -> slab_lot);
126 this_proj -> modelgl -> cell_win -> slab_lot = allocint (this_proj -> nspec);
127 this_proj -> modelgl -> cell_win -> slab_info = NULL;
128 if (this_proj -> natomes)
129 {
130 this_proj -> modelgl -> cell_win -> win = create_cell_edition_window (this_proj, & this_proj -> modelgl -> colorp[0][0]);
131 gtk_notebook_set_current_page (GTK_NOTEBOOK (this_proj -> modelgl -> cell_win -> notebook), i);
132#ifdef GTK3
133 gtk_window_move (GTK_WINDOW(this_proj -> modelgl -> cell_win -> win), x ,y);
134#endif
135 show_the_widgets (this_proj -> modelgl -> cell_win -> win);
136 for (i=1; i<6; i++)
137 {
138 if (i < 3) hide_the_widgets (this_proj -> modelgl -> cell_win -> slab_hbox[i]);
139 hide_the_widgets (this_proj -> modelgl -> cell_win -> slab_box[i]);
140 }
141 }
142 }
143 }
144 /*if (this_proj -> modelgl -> spiner)
145 {
146 gtk_window_get_position (GTK_WINDOW(this_proj -> modelgl -> spiner -> win), & x, & y);
147 this_proj -> modelgl -> spiner -> win = destroy_this_widget (this_proj -> modelgl -> spiner -> win);
148 g_free (this_proj -> modelgl -> spiner);
149 this_proj -> modelgl -> spiner = NULL;
150 if (this_proj -> natomes) window_spinner (NULL, this_proj -> modelgl);
151 gtk_window_move (GTK_WINDOW(this_proj -> modelgl -> spiner -> win), x ,y);
152 }*/
153}
154
162void clean_atom_win (project * this_proj)
163{
164 this_proj -> modelgl -> anim -> last -> img -> xyz -> axis = this_proj -> modelgl -> atom_win -> old_axis;
165 this_proj -> modelgl -> atom_win -> win = destroy_this_widget (this_proj -> modelgl -> atom_win -> win);
166 if (! this_proj -> modelgl -> builder_win)
167 {
168 g_free (this_proj -> modelgl -> atom_win);
169 this_proj -> modelgl -> atom_win = NULL;
170 }
171 else
172 {
173 this_proj -> modelgl -> atom_win -> visible = FALSE;
174 }
175 int shaders[6] = {ATOMS, BONDS, POLYS, RINGS, SELEC, VOLMS};
176 re_create_md_shaders (6, shaders, this_proj);
177 this_proj -> modelgl -> create_shaders[LABEL] = TRUE;
178 this_proj -> modelgl -> create_shaders[MEASU] = TRUE;
179 this_proj -> modelgl -> create_shaders[MAXIS] = TRUE;
180 this_proj -> modelgl -> create_shaders[PICKS] = TRUE;
181 int i;
182 for (i=0; i<2; i++)
183 {
184 if (this_proj -> modelgl -> saved_coord[i] != NULL)
185 {
186 g_free (this_proj -> modelgl -> saved_coord[i]);
187 this_proj -> modelgl -> saved_coord[i] = NULL;
188 }
189 }
191 update (this_proj -> modelgl);
192}
193
202G_MODULE_EXPORT void close_edit (GtkButton * but, gpointer data)
203{
204 int id = GPOINTER_TO_INT(data);
205 project * this_proj = get_project_by_id(id);
206 gboolean leave = (this_proj -> modelgl -> was_moved) ? ask_yes_no("Leaving without saving ?",
207 "To preserve atom(s) displacement(s) press the 'Apply' button\n"
208 "Otherwise initial atom positions will be restored ...\n"
209 "\t\t\t Are you sure to leave ?" ,
210 GTK_MESSAGE_QUESTION, this_proj -> modelgl -> atom_win -> win) : TRUE;
211 if (leave && this_proj -> modelgl -> atom_win)
212 {
213 int h;
214 for (h=0; h<2; h++)
215 {
216 reset_coordinates (this_proj, h);
217 init_coordinates (this_proj, h, TRUE, FALSE);
218 }
219 for (h=2; h<7; h++)
220 {
221 g_free (this_proj -> modelgl -> search_widg[h]);
222 this_proj -> modelgl -> search_widg[h]= NULL;
223 }
224 this_proj -> modelgl -> was_moved = FALSE;
225 clean_atom_win (this_proj);
226 }
227}
228
229#ifdef GTK4
238G_MODULE_EXPORT gboolean delete_action (GtkWindow * widg, gpointer data)
239#else
249G_MODULE_EXPORT gboolean delete_action (GtkWidget * widg, GdkEvent * event, gpointer data)
250#endif
251{
252 close_edit (NULL, data);
253 return TRUE;
254}
255
256#ifdef GTK4
265G_MODULE_EXPORT void set_reset_transformation (GtkCheckButton * but, gpointer data)
266#else
275G_MODULE_EXPORT void set_reset_transformation (GtkToggleButton * but, gpointer data)
276#endif
277{
278 if (button_get_status((GtkWidget *)but))
279 {
280 tint * id = (tint *)data;
281 project * this_proj = get_project_by_id (id -> a);
282 if (ask_yes_no("Reset", "Reset and get back to initial coordinates ?\n This will affect all atoms !",
283 GTK_MESSAGE_WARNING, this_proj -> modelgl -> atom_win -> win))
284 {
285 int h, i, j;
286 for (h=0; h<3; h++)
287 {
288 for (i=0; i<2; i++)
289 {
290 for (j=0; j<6; j++)
291 {
292 this_proj -> modelgl -> atom_win -> new_param[h][i][j] = this_proj -> modelgl -> edition_param[h][i][j];
293 gtk_range_set_value (GTK_RANGE(this_proj -> modelgl -> atom_win -> edit_scale[j]), this_proj -> modelgl -> atom_win -> new_param[h][i][j]);
294 update_range_and_entry (this_proj, h, i, j);
295 // update_coordinates (this_proj, h, i, j);
296 }
297 }
298 }
299 for (h=0; h<2; h++)
300 {
301 reset_coordinates (this_proj, h);
302 init_coordinates (this_proj, h, TRUE, FALSE);
303 }
304 init_default_shaders (this_proj -> modelgl);
305 update (this_proj -> modelgl);
306 }
307 button_set_status ((GtkWidget *)but, FALSE);
308 }
309}
310
319G_MODULE_EXPORT void apply_edit (GtkButton * but, gpointer data)
320{
321 int id = GPOINTER_TO_INT(data);
322 project * this_proj = get_project_by_id(id);
323 int h, i, j;
324 i = this_proj -> modelgl -> mode;
325 this_proj -> modelgl -> mode = ANALYZE;
326 image * last = this_proj -> modelgl -> anim -> last -> img;
327 vec4_t q = last -> rotation_quaternion;
328 init_camera (this_proj, TRUE);
329 last -> rotation_quaternion = q;
330 this_proj -> modelgl -> mode = i;
331 for (h=0; h<3; h++)
332 {
333 for (i=0; i<2; i++)
334 {
335 for (j=0; j<6; j++)
336 {
337 this_proj -> modelgl -> edition_param[h][i][j] = this_proj -> modelgl -> atom_win -> new_param[h][i][j];
338 this_proj -> modelgl -> atom_win -> old_param[h][i][j] = this_proj -> modelgl -> atom_win -> new_param[h][i][j];
339 }
340 }
341 }
342 for (h=0; h<2; h++)
343 {
344 g_free (this_proj -> modelgl -> saved_coord[h]);
345 this_proj -> modelgl -> saved_coord[h] = save_coordinates (this_proj, h);
346 }
347 this_proj -> modelgl -> was_moved = FALSE;
348 //clean_atom_win (this_proj);
349}
350
359GtkWidget * create_atom_notebook (project * this_proj, GtkWidget * vbox)
360{
361 GtkWidget * notebook = gtk_notebook_new ();
362 add_box_child_start (GTK_ORIENTATION_VERTICAL, vbox, notebook, FALSE, FALSE, 0);
363 gchar * str;
364 int i;
365 for (i=0; i<5; i++)
366 {
367 str = g_strdup_printf ("<b>%s</b>", action_name[i]);
368 gtk_notebook_append_page (GTK_NOTEBOOK(notebook), action_tab(i, this_proj), markup_label(str, -1, -1, 0.0, 0.5));
369 g_free (str);
370 }
371
372 show_the_widgets (notebook);
373 return notebook;
374}
375
386atom_search * allocate_atom_search (int proj, int action, int searchid, int tsize)
387{
388 atom_search * asearch = g_malloc0 (sizeof*asearch);
389 asearch -> search_digit = -1;
390 asearch -> proj = proj;
391 asearch -> action = action;
392 int i;
393 for (i=0; i<6; i++)
394 {
395 asearch -> pointer[i].a = proj;
396 asearch -> pointer[i].b = TOLAB+i;
397 asearch -> pointer[i].c = searchid;
398 }
399 asearch -> recompute_bonding = FALSE;
400 if (searchid != 5) allocate_todo (asearch, tsize);
401 if (get_project_by_id(proj) -> modelgl) clean_picked_and_labelled (asearch, TRUE);
402 return asearch;
403}
404
412GtkWidget * create_edition_window (project * this_proj)
413{
414 gchar * str = g_strdup_printf ("Model edition - %s", this_proj -> name);
415 this_proj -> modelgl -> was_moved = FALSE;
416 GtkWidget * win = create_win (str, this_proj -> modelgl -> win, FALSE, FALSE);
417 g_free (str);
418 int i, j;
419 for (i=2; i<7; i++)
420 {
421 if (this_proj -> modelgl -> search_widg[i] == NULL)
422 {
423 this_proj -> modelgl -> search_widg[i] = allocate_atom_search (this_proj -> id, i, i, this_proj -> natomes);
424 this_proj -> modelgl -> search_widg[i] -> status = (this_proj -> modelgl -> anim -> last -> img -> selected[0] -> selected) ? 1 : 2;
425 }
426 }
427 this_proj -> modelgl -> atom_win -> vbox = create_vbox (5);
428 add_container_child (CONTAINER_WIN, win, this_proj -> modelgl -> atom_win -> vbox);
429 gtk_widget_set_size_request (this_proj -> modelgl -> atom_win -> vbox, 760, -1);
430 add_gtk_close_event (win, G_CALLBACK(delete_action), GINT_TO_POINTER(this_proj -> id));
431 for (i=0; i<2; i++)
432 {
433 for (j=0; j<2; j++) this_proj -> modelgl -> rebuild[i][j] = TRUE;
434 }
435 this_proj -> modelgl -> atom_win -> notebook = create_atom_notebook (this_proj, this_proj -> modelgl -> atom_win -> vbox);
436 GtkWidget * hbox = create_hbox (5);
437 add_box_child_end (this_proj -> modelgl -> atom_win -> vbox, hbox, TRUE, FALSE, 0);
438 GtkWidget * but = create_button ("Apply", IMG_STOCK, APPLY, -1, -1, GTK_RELIEF_NORMAL, G_CALLBACK(apply_edit), GINT_TO_POINTER(this_proj -> id));
439 add_box_child_end (hbox, but, FALSE, FALSE, 5);
440 but = create_button ("Close", IMG_STOCK, FCLOSE, -1, -1, GTK_RELIEF_NORMAL, G_CALLBACK(close_edit), GINT_TO_POINTER(this_proj -> id));
441 add_box_child_start (GTK_ORIENTATION_HORIZONTAL, hbox, but, FALSE, FALSE, 5);
442 return win;
443}
444
453void prepare_atom_edition (gpointer data, gboolean visible)
454{
455 tint * id = (tint *) data;
456 project * this_proj = get_project_by_id(id -> a);
457 int i;
458 if (this_proj -> modelgl -> atom_win == NULL)
459 {
460 this_proj -> modelgl -> atom_win = g_malloc0 (sizeof*this_proj -> modelgl -> atom_win);
461 for (i=0; i<2; i++) this_proj -> modelgl -> atom_win -> adv_bonding[i] = this_proj -> modelgl -> adv_bonding[i];
462 if (this_proj -> modelgl -> anim)
463 {
464 this_proj -> modelgl -> atom_win -> old_axis = this_proj -> modelgl -> anim -> last -> img -> xyz -> axis;
465 }
466 for (i=0; i<2; i++)
467 {
468 init_coordinates (this_proj, i, visible, TRUE);
469 }
470 this_proj -> modelgl -> atom_win -> msd = allocfloat (this_proj -> natomes);
471 this_proj -> modelgl -> atom_win -> msd_all = allocfloat (this_proj -> nspec);
472 this_proj -> modelgl -> atom_win -> repeat_move = 1;
473 }
474 this_proj -> modelgl -> atom_win -> visible = visible;
475 if (visible)
476 {
477 this_proj -> modelgl -> atom_win -> win = create_edition_window (this_proj);
478 show_the_widgets (this_proj -> modelgl -> atom_win -> win);
479 gtk_notebook_set_current_page (GTK_NOTEBOOK (this_proj -> modelgl -> atom_win -> notebook), id -> b);
480 for (i=0; i<5; i++)
481 {
482 if (i != 3)
483 {
484 if (this_proj -> modelgl -> search_widg[i+2] -> todo_size < 10000)
485 {
486 hide_the_widgets (this_proj -> modelgl -> search_widg[i+2] -> info[1]);
487 }
488 else
489 {
490 hide_the_widgets (this_proj -> modelgl -> search_widg[i+2] -> id_box);
491 }
492 }
493 widget_set_sensitive (gtk_notebook_get_nth_page(GTK_NOTEBOOK (this_proj -> modelgl -> atom_win -> notebook), i), this_proj -> natomes);
494 }
495 widget_set_sensitive (gtk_notebook_get_nth_page(GTK_NOTEBOOK (this_proj -> modelgl -> atom_win -> notebook), 3), 1);
496 if (this_proj -> modelgl -> mode == EDITION)
497 {
498#ifdef GTK4
499 set_mode (NULL, & this_proj -> modelgl -> colorp[0][0]);
500#else
501 // GTK3 Menu Action To Check
502 gtk_check_menu_item_set_active ((GtkCheckMenuItem *)this_proj -> modelgl -> ogl_mode[0], TRUE);
503 set_mode (this_proj -> modelgl -> ogl_mode[0], & this_proj -> modelgl -> colorp[0][0]);
504#endif
505 }
506 }
507}
508
509#ifdef GTK4
519G_MODULE_EXPORT void action_window (GSimpleAction * action, GVariant * parameter, gpointer data)
520#else
529G_MODULE_EXPORT void action_window (GtkWidget * widg, gpointer data)
530#endif
531{
532 prepare_atom_edition (data, TRUE);
533}
G_MODULE_EXPORT void close_edit(GtkButton *but, gpointer data)
close model edition window
Definition atom_edit.c:202
void clean_atom_win(project *this_proj)
clean model edition data
Definition atom_edit.c:162
void clean_coord_window(project *this_proj)
update the environment configuration window after edtion
Definition atom_edit.c:87
gboolean is_atom_win_active(glwin *view)
is the model edition window visible ?
Definition atom_edit.c:71
gchar * action_name[5]
Definition atom_edit.c:60
gboolean was_moved
Definition atom_edit.c:62
void prepare_atom_edition(gpointer data, gboolean visible)
prepare atom edition
Definition atom_edit.c:453
G_MODULE_EXPORT void set_reset_transformation(GtkToggleButton *but, gpointer data)
reset model transformation toggle callback GTK3
Definition atom_edit.c:275
void clean_other_window_after_edit(project *this_proj)
update other windows after model edition if required
Definition atom_edit.c:110
atom_search * allocate_atom_search(int proj, int action, int searchid, int tsize)
allocate atom search data structure
Definition atom_edit.c:386
gchar * action_atoms[3]
Definition atom_edit.c:61
GtkWidget * create_edition_window(project *this_proj)
create the model edition window
Definition atom_edit.c:412
G_MODULE_EXPORT void action_window(GtkWidget *widg, gpointer data)
open model edition window callback GTK3
Definition atom_edit.c:529
G_MODULE_EXPORT gboolean delete_action(GtkWidget *widg, GdkEvent *event, gpointer data)
model edition window close event callback GTK3
Definition atom_edit.c:249
float limit[2]
Definition atom_edit.c:59
G_MODULE_EXPORT void apply_edit(GtkButton *but, gpointer data)
apply edition action callback
Definition atom_edit.c:319
GtkWidget * create_atom_notebook(project *this_proj, GtkWidget *vbox)
create the model edition notebook
Definition atom_edit.c:359
Function declarations for the mode edition window.
double ** save_coordinates(project *this_proj, int status)
save atomic coordinates
Definition atom_move.c:91
G_MODULE_EXPORT void repeat_move(GtkSpinButton *res, gpointer data)
repeat motion callback
Definition atom_move.c:963
GtkWidget * action_tab(int aid, project *this_proj)
create model edtion action tab
void init_coordinates(project *this_proj, int status, gboolean win, gboolean init)
preserve atomic coordinates
Definition atom_move.c:197
GtkWidget * create_cell_edition_window(project *this_proj, gpointer data)
create the cell editon window
Definition cell_edit.c:182
void reset_coordinates(project *this_proj, int status)
reset transformation and restore saved atomic coordinates
Definition atom_move.c:143
GtkWidget * advanced_coord_properties(glwin *view, int page)
create the environments configuration window
Definition w_coord.c:1290
void clean_picked_and_labelled(atom_search *asearch, gboolean clean_msd)
initialize atom search data buffers
Definition w_search.c:3789
void update_range_and_entry(project *this_proj, int i, int j, int k)
update motion range
Definition atom_move.c:979
#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:3715
GtkWidget * builder_win(project *this_proj, gpointer data)
create crystal builder window
color colorp[64]
void init_default_shaders(glwin *view)
re-initialize the default OpenGL shaders
int * allocint(int val)
allocate an int * pointer
Definition global.c:314
float * allocfloat(int val)
allocate a float * pointer
Definition global.c:398
@ IMG_STOCK
Definition global.h:266
GtkWidget * create_win(gchar *str, GtkWidget *parent, gboolean modal, gboolean resiz)
create a new GtkWindow
Definition gtk-misc.c:454
project * proj
void add_gtk_close_event(GtkWidget *widg, GCallback handler, gpointer data)
add a close event signal and callback to a GtkWidget
Definition gtk-misc.c:2522
void button_set_status(GtkWidget *button, int status)
set status of check / toggle button
Definition gtk-misc.c:1872
#define APPLY
Definition global.h:222
@ CONTAINER_WIN
Definition global.h:252
GtkWidget * create_button(gchar *text, int image_format, gchar *image, int dimx, int dimy, int relief, GCallback handler, gpointer data)
create a simple button
Definition gtk-misc.c:1955
GtkWidget * markup_label(gchar *text, int dimx, int dimy, float ax, float ay)
create a GtkLabel with pango markup
Definition gtk-misc.c:1646
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:308
void widget_set_sensitive(GtkWidget *widg, gboolean sensitive)
Set sensitivity for a GtkWidget, ensuring it is a GtkWidget.
Definition gtk-misc.c:215
GtkWidget * create_hbox(int spacing)
create a GtkBox with horizontal orientation
Definition gtk-misc.c:823
GtkWidget * destroy_this_widget(GtkWidget *widg)
destroy a GtkWidget
Definition gtk-misc.c:2169
void add_box_child_end(GtkWidget *widg, GtkWidget *child, gboolean expand, gboolean fill, int padding)
Add a GtkWidget in a GtkBox at the end position.
Definition gtk-misc.c:286
void add_container_child(int type, GtkWidget *widg, GtkWidget *child)
Add a GtkWidget into another GtkWidget.
Definition gtk-misc.c:235
void hide_the_widgets(GtkWidget *widg)
hide GtkWidget
Definition gtk-misc.c:198
GtkWidget * create_vbox(int spacing)
create a GtkBox with vertical orientation
Definition gtk-misc.c:811
int button_get_status(GtkWidget *button)
get status of check / toggle button
Definition gtk-misc.c:1855
#define FCLOSE
Definition global.h:213
void show_the_widgets(GtkWidget *widg)
show GtkWidget
Definition gtk-misc.c:182
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:450
void init_camera(project *this_proj, int get_depth)
initialize the OpenGL camera settings
Definition glview.c:1170
void re_create_md_shaders(int nshaders, int shaders[nshaders], project *this_proj)
re-initialize some MD dependent OpenGL shaders
action
Definition glview.h:198
@ ANALYZE
Definition glview.h:166
@ EDITION
Definition glview.h:167
struct axis axis
axis layout data structure
Definition glwin.h:331
shaders
The different types of shaders in the atomes program.
Definition glwin.h:88
@ BONDS
Definition glwin.h:90
@ PICKS
Definition glwin.h:97
@ LABEL
Definition glwin.h:98
@ VOLMS
Definition glwin.h:102
@ POLYS
Definition glwin.h:92
@ MAXIS
Definition glwin.h:94
@ SELEC
Definition glwin.h:91
@ MEASU
Definition glwin.h:99
@ ATOMS
Definition glwin.h:89
@ RINGS
Definition glwin.h:96
gboolean ask_yes_no(gchar *title, gchar *text, int type, GtkWidget *widg)
ask yes or no for something: prepare dialog
Definition interface.c:356
integer(kind=c_int) function msd(dlt, ndts)
Definition msd.F90:22
double y
Definition ogl_draw.c:61
double x
Definition ogl_draw.c:61
Definition glwin.h:333
Definition glwin.h:965
Definition glwin.h:365
Definition global.h:106
int b
Definition tab-1.c:95
int a
Definition tab-1.c:95
int status
Definition w_advance.c:178
G_MODULE_EXPORT void set_mode(GtkWidget *widg, gpointer data)
set mouse mode callback
Definition m_tools.c:172
GtkWidget * hbox
Definition workspace.c:71
GtkWidget * img
Definition workspace.c:70
GtkWidget * vbox
Definition workspace.c:72