atomes 1.3.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-2026 by CNRS and University of Strasbourg */
15
21
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] = {i18n("Move"), i18n("Replace"), i18n("Remove"), i18n("Insert"), i18n("Random Move")};
61gchar * action_atoms[3] = {i18n("All Non-selected Atoms"), i18n("All Selected Atoms"), i18n("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 j = -1;
329 if (id != active_project)
330 {
331 i = activep;
333 }
334 init_camera (this_proj);
335 if (j != -1) active_project_changed (j);
336 last -> rotation_quaternion = q;
337 this_proj -> modelgl -> mode = i;
338 for (h=0; h<3; h++)
339 {
340 for (i=0; i<2; i++)
341 {
342 for (j=0; j<6; j++)
343 {
344 this_proj -> modelgl -> edition_param[h][i][j] = this_proj -> modelgl -> atom_win -> new_param[h][i][j];
345 this_proj -> modelgl -> atom_win -> old_param[h][i][j] = this_proj -> modelgl -> atom_win -> new_param[h][i][j];
346 }
347 }
348 }
349 for (h=0; h<2; h++)
350 {
351 g_free (this_proj -> modelgl -> saved_coord[h]);
352 this_proj -> modelgl -> saved_coord[h] = save_coordinates (this_proj, h);
353 }
354 this_proj -> modelgl -> was_moved = FALSE;
355 //clean_atom_win (this_proj);
356}
357
366GtkWidget * create_atom_notebook (project * this_proj, GtkWidget * vbox)
367{
368 GtkWidget * notebook = gtk_notebook_new ();
369 add_box_child_start (GTK_ORIENTATION_VERTICAL, vbox, notebook, FALSE, FALSE, 0);
370 gchar * str;
371 int i;
372 for (i=0; i<5; i++)
373 {
374 str = g_strdup_printf ("<b>%s</b>", _(action_name[i]));
375 gtk_notebook_append_page (GTK_NOTEBOOK(notebook), action_tab(i, this_proj), markup_label(str, -1, -1, 0.0, 0.5));
376 g_free (str);
377 }
378
379 show_the_widgets (notebook);
380 return notebook;
381}
382
393atom_search * allocate_atom_search (int proj, int action, int searchid, int tsize)
394{
395 atom_search * asearch = g_malloc0(sizeof*asearch);
396 asearch -> search_digit = -1;
397 asearch -> proj = proj;
398 asearch -> action = action;
399 int i;
400 for (i=0; i<6; i++)
401 {
402 asearch -> pointer[i].a = proj;
403 asearch -> pointer[i].b = TOLAB+i;
404 asearch -> pointer[i].c = searchid;
405 }
406 asearch -> recompute_bonding = FALSE;
407 if (searchid != 5) allocate_todo (asearch, tsize);
408 if (get_project_by_id(proj) -> modelgl) clean_picked_and_labelled (asearch, TRUE);
409 return asearch;
410}
411
419GtkWidget * create_edition_window (project * this_proj)
420{
421 gchar * str = g_strdup_printf (_("Model edition - %s"), this_proj -> name);
422 this_proj -> modelgl -> was_moved = FALSE;
423 GtkWidget * win = create_win (str, this_proj -> modelgl -> win, FALSE, FALSE);
424 g_free (str);
425 int i, j;
426 for (i=2; i<7; i++)
427 {
428 if (this_proj -> modelgl -> search_widg[i] == NULL)
429 {
430 this_proj -> modelgl -> search_widg[i] = allocate_atom_search (this_proj -> id, i, i, this_proj -> natomes);
431 this_proj -> modelgl -> search_widg[i] -> status = (this_proj -> modelgl -> anim -> last -> img -> selected[0] -> selected) ? 1 : 2;
432 }
433 }
434 this_proj -> modelgl -> atom_win -> vbox = create_vbox (5);
435 add_container_child (CONTAINER_WIN, win, this_proj -> modelgl -> atom_win -> vbox);
436 gtk_widget_set_size_request (this_proj -> modelgl -> atom_win -> vbox, 760, -1);
437 add_gtk_close_event (win, G_CALLBACK(delete_action), GINT_TO_POINTER(this_proj -> id));
438 for (i=0; i<2; i++)
439 {
440 for (j=0; j<2; j++) this_proj -> modelgl -> rebuild[i][j] = TRUE;
441 }
442 this_proj -> modelgl -> atom_win -> notebook = create_atom_notebook (this_proj, this_proj -> modelgl -> atom_win -> vbox);
443 GtkWidget * hbox = create_hbox (5);
444 add_box_child_end (this_proj -> modelgl -> atom_win -> vbox, hbox, TRUE, FALSE, 0);
445 GtkWidget * but = create_button (_("Apply"), IMG_STOCK, APPLY, -1, -1, GTK_RELIEF_NORMAL, G_CALLBACK(apply_edit), GINT_TO_POINTER(this_proj -> id));
446 add_box_child_end (hbox, but, FALSE, FALSE, 5);
447 but = create_button (_("Close"), IMG_STOCK, FCLOSE, -1, -1, GTK_RELIEF_NORMAL, G_CALLBACK(close_edit), GINT_TO_POINTER(this_proj -> id));
448 add_box_child_start (GTK_ORIENTATION_HORIZONTAL, hbox, but, FALSE, FALSE, 5);
449 return win;
450}
451
460void prepare_atom_edition (gpointer data, gboolean visible)
461{
462 tint * id = (tint *) data;
463 project * this_proj = get_project_by_id(id -> a);
464 int i;
465 if (this_proj -> modelgl -> atom_win == NULL)
466 {
467 this_proj -> modelgl -> atom_win = g_malloc0(sizeof*this_proj -> modelgl -> atom_win);
468 for (i=0; i<2; i++) this_proj -> modelgl -> atom_win -> adv_bonding[i] = this_proj -> modelgl -> adv_bonding[i];
469 if (this_proj -> modelgl -> anim)
470 {
471 this_proj -> modelgl -> atom_win -> old_axis = this_proj -> modelgl -> anim -> last -> img -> xyz -> axis;
472 }
473 for (i=0; i<2; i++)
474 {
475 init_coordinates (this_proj, i, visible, TRUE);
476 }
477 this_proj -> modelgl -> atom_win -> msd = allocfloat (this_proj -> natomes);
478 this_proj -> modelgl -> atom_win -> msd_all = allocfloat (this_proj -> nspec);
479 this_proj -> modelgl -> atom_win -> repeat_move = 1;
480 }
481 this_proj -> modelgl -> atom_win -> visible = visible;
482 if (visible)
483 {
484 this_proj -> modelgl -> atom_win -> win = create_edition_window (this_proj);
485 show_the_widgets (this_proj -> modelgl -> atom_win -> win);
486 gtk_notebook_set_current_page (GTK_NOTEBOOK (this_proj -> modelgl -> atom_win -> notebook), id -> b);
487 for (i=0; i<5; i++)
488 {
489 if (i != 3)
490 {
491 if (this_proj -> modelgl -> search_widg[i+2] -> todo_size < GTK_LIMIT)
492 {
493 hide_the_widgets (this_proj -> modelgl -> search_widg[i+2] -> info[1]);
494 }
495 else
496 {
497 hide_the_widgets (this_proj -> modelgl -> search_widg[i+2] -> id_box);
498 }
499 }
500 widget_set_sensitive (gtk_notebook_get_nth_page(GTK_NOTEBOOK (this_proj -> modelgl -> atom_win -> notebook), i), this_proj -> natomes);
501 }
502 widget_set_sensitive (gtk_notebook_get_nth_page(GTK_NOTEBOOK (this_proj -> modelgl -> atom_win -> notebook), 3), 1);
503 if (this_proj -> modelgl -> mode == EDITION)
504 {
505#ifdef GTK4
506 set_mode (NULL, & this_proj -> modelgl -> colorp[0][0]);
507#else
508 // GTK3 Menu Action To Check
509 gtk_check_menu_item_set_active ((GtkCheckMenuItem *)this_proj -> modelgl -> ogl_mode[0], TRUE);
510 set_mode (this_proj -> modelgl -> ogl_mode[0], & this_proj -> modelgl -> colorp[0][0]);
511#endif
512 }
513 }
514}
515
516#ifdef GTK4
526G_MODULE_EXPORT void action_window (GSimpleAction * action, GVariant * parameter, gpointer data)
527#else
536G_MODULE_EXPORT void action_window (GtkWidget * widg, gpointer data)
537#endif
538{
539 prepare_atom_edition (data, TRUE);
540}
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:460
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:393
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:419
G_MODULE_EXPORT void action_window(GtkWidget *widg, gpointer data)
open model edition window callback GTK3
Definition atom_edit.c:536
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:366
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:188
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:1298
void clean_picked_and_labelled(atom_search *asearch, gboolean clean_msd)
initialize atom search data buffers
Definition w_search.c:3779
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:3705
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 activep
Definition global.c:162
int * allocint(int val)
allocate an int * pointer
Definition global.c:301
#define i18n(String)
Definition global.c:80
float * allocfloat(int val)
allocate a float * pointer
Definition global.c:385
@ IMG_STOCK
Definition global.h:280
#define GTK_LIMIT
maximum number of elements in GTK widgets like GtkTreeView, GtkTreeStore or similar rendering widgets...
Definition global.h:77
GtkWidget * create_win(gchar *str, GtkWidget *parent, gboolean modal, gboolean resiz)
create a new GtkWindow
Definition gtk-misc.c:486
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:2557
void button_set_status(GtkWidget *button, int status)
set status of check / toggle button
Definition gtk-misc.c:1916
#define APPLY
Definition global.h:236
@ CONTAINER_WIN
Definition global.h:266
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:1999
GtkWidget * markup_label(gchar *text, int dimx, int dimy, float ax, float ay)
create a GtkLabel with pango markup
Definition gtk-misc.c:1672
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:340
void widget_set_sensitive(GtkWidget *widg, gboolean sensitive)
Set sensitivity for a GtkWidget, ensuring it is a GtkWidget.
Definition gtk-misc.c:247
GtkWidget * create_hbox(int spacing)
create a GtkBox with horizontal orientation
Definition gtk-misc.c:849
GtkWidget * destroy_this_widget(GtkWidget *widg)
destroy a GtkWidget
Definition gtk-misc.c:2213
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:318
void add_container_child(int type, GtkWidget *widg, GtkWidget *child)
Add a GtkWidget into another GtkWidget.
Definition gtk-misc.c:267
void hide_the_widgets(GtkWidget *widg)
hide GtkWidget
Definition gtk-misc.c:224
GtkWidget * create_vbox(int spacing)
create a GtkBox with vertical orientation
Definition gtk-misc.c:837
int button_get_status(GtkWidget *button)
get status of check / toggle button
Definition gtk-misc.c:1899
#define FCLOSE
Definition global.h:227
project * active_project
Definition project.c:47
void show_the_widgets(GtkWidget *widg)
show GtkWidget
Definition gtk-misc.c:202
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:461
void init_camera(project *this_proj)
initialize the OpenGL camera settings
Definition glview.c:1180
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
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:420
integer(kind=c_int) function msd(dlt, ndts)
Definition msd.F90:22
double y
Definition ogl_draw.c:63
double x
Definition ogl_draw.c:63
void active_project_changed(int id)
change the active project
Definition update_p.c:220
Definition glwin.h:332
Definition glwin.h:967
Definition glwin.h:364
Definition global.h:118
int status
Definition w_advance.c:173
G_MODULE_EXPORT void set_mode(GtkWidget *widg, gpointer data)
set mouse mode callback
Definition m_tools.c:180
GtkWidget * hbox
Definition workspace.c:71
GtkWidget * img
Definition workspace.c:70
GtkWidget * vbox
Definition workspace.c:72