atomes 1.1.15
atomes: an atomic scale modeling tool box
Loading...
Searching...
No Matches
m_rep.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_rep.c'
24*
25* Contains:
26*
27
28 - The functions to create the 'View -> Representation' submenu
29
30*
31* List of functions:
32
33 G_MODULE_EXPORT gboolean scroll_set_camera (GtkRange * range, GtkScrollType scroll, gdouble value, gpointer data);
34 G_MODULE_EXPORT gboolean on_rep_delete (GtkWindow * widg, gpointer data);
35 G_MODULE_EXPORT gboolean on_rep_delete (GtkWidget * widg, GdkEvent * event, gpointer data);
36
37 void update_labels (glwin * view);
38 void camera_has_changed (gdouble value, gpointer data);
39
40 G_MODULE_EXPORT void reset_view (GtkButton * but, gpointer data);
41 G_MODULE_EXPORT void to_reset_view (GSimpleAction * action, GVariant * parameter, gpointer data);
42 G_MODULE_EXPORT void to_reset_view (GtkWidget * widg, gpointer data);
43 G_MODULE_EXPORT void set_camera (GtkRange * range, gpointer data);
44 G_MODULE_EXPORT void set_camera_spin (GtkSpinButton * res, gpointer data);
45 G_MODULE_EXPORT void representation_advanced (GtkWidget * widg, gpointer data);
46 G_MODULE_EXPORT void set_rep (GtkWidget * widg, gpointer data);
47 G_MODULE_EXPORT void change_rep_radio (GSimpleAction * action, GVariant * parameter, gpointer data);
48 G_MODULE_EXPORT void to_rep_advanced (GSimpleAction * action, GVariant * parameter, gpointer data);
49 G_MODULE_EXPORT void to_center_molecule (GSimpleAction * action, GVariant * parameter, gpointer data);
50
51 GtkWidget * menu_rep (glwin * view, int id);
52
53 GMenu * menu_rep (glwin * view, int popm);
54 GMenu * menu_reset (glwin * view, int popm);
55 GMenu * menu_fullscreen (glwin * view, int popm);
56 GMenu * menu_view (glwin * view, int popm);
57
58*/
59
60#include "global.h"
61#include "interface.h"
62#include "glview.h"
63#include "glwindow.h"
64#include "submenus.h"
65
66extern void save_rotation_quaternion (glwin * view);
67extern void rotate_x_y (glwin * view, double angle_x, double angle_y);
68#ifdef GTK4
69extern G_MODULE_EXPORT void set_full_screen (GSimpleAction * action, GVariant * parameter, gpointer data);
70#else
71extern G_MODULE_EXPORT void set_full_screen (GtkWidget * widg, gpointer data);
72#endif
73
74gchar * text_reps[OGL_REPS] = {"Orthographic", "Perspective"};
75
83void update_labels (glwin * view)
84{
85 int i;
86 for (i=0; i<2; i++) if (view -> anim -> last -> img -> labels_scale[i]) view -> create_shaders[LABEL] = TRUE;
87 if (view -> anim -> last -> img -> labels_scale[2]) view -> create_shaders[MAXIS] = TRUE;
88 if (view -> anim -> last -> img -> labels_scale[3]) view -> create_shaders[MEASU] = TRUE;
89}
90
99void camera_has_changed (gdouble value, gpointer data)
100{
101 tint * cid = (tint *)data;
102 project * this_proj = get_project_by_id(cid -> a);
103 double v;
104 switch (cid -> b)
105 {
106 case 0:
107 this_proj -> modelgl -> anim -> last -> img -> zoom = 2.0*(1.0-value);
108 // gtk_spin_button_set_increments ((GtkSpinButton *)this_proj -> modelgl -> camera_widg[0], this_proj -> modelgl -> zoom_factor, this_proj -> modelgl -> zoom_factor);
109 break;
110 case 1:
111 // > camera depth
112 if (value > this_proj -> modelgl -> anim -> last -> img -> gnear)
113 {
114 this_proj -> modelgl -> anim -> last -> img -> p_depth = value;
115 }
116 else
117 {
118 this_proj -> modelgl -> anim -> last -> img -> p_depth = this_proj -> modelgl -> anim -> last -> img -> gnear + 0.01;
119 gtk_spin_button_set_value ((GtkSpinButton *)this_proj -> modelgl -> camera_widg[1], this_proj -> modelgl -> anim -> last -> img -> p_depth);
120 }
121 break;
122 case 2:
123 // < perspective depth
124 if (value < this_proj -> modelgl -> anim -> last -> img -> p_depth)
125 {
126 this_proj -> modelgl -> anim -> last -> img -> gnear = value;
127 }
128 else
129 {
130 this_proj -> modelgl -> anim -> last -> img -> gnear = this_proj -> modelgl -> anim -> last -> img -> p_depth - 0.01;
131 gtk_spin_button_set_value ((GtkSpinButton *)this_proj -> modelgl -> camera_widg[2], this_proj -> modelgl -> anim -> last -> img -> gnear);
132 }
133 break;
134 default:
135 if (cid -> b < 5)
136 {
137 if (value != this_proj -> modelgl -> anim -> last -> img -> c_angle[cid -> b - 3])
138 {
139 v = this_proj -> modelgl -> anim -> last -> img -> c_angle[cid -> b - 3] - value;
140 save_rotation_quaternion (this_proj -> modelgl);
141 if (cid -> b == 3)
142 {
143 rotate_x_y (this_proj -> modelgl, v, 0.0);
144 }
145 else
146 {
147 rotate_x_y (this_proj -> modelgl, 0.0, v);
148 }
149 }
150 }
151 else
152 {
153 this_proj -> modelgl -> anim -> last -> img -> c_shift[cid -> b - 5] = (value == 0.0) ? value : - value;
154 }
155 break;
156 }
157 update_labels (this_proj -> modelgl);
158 update (this_proj -> modelgl);
159}
160
169G_MODULE_EXPORT void reset_view (GtkButton * but, gpointer data)
170{
171 glwin * view = (glwin *)data;
172 int i = view -> mode;
173 view -> mode = ANALYZE;
174 init_camera (get_project_by_id(view -> proj), FALSE);
175 view -> mode = i;
176 update_labels (view);
177 update (view);
178}
179
180#ifdef GTK4
190G_MODULE_EXPORT void to_reset_view (GSimpleAction * action, GVariant * parameter, gpointer data)
191#else
200G_MODULE_EXPORT void to_reset_view (GtkWidget * widg, gpointer data)
201#endif
202{
203 reset_view (NULL, data);
204}
205
216G_MODULE_EXPORT gboolean scroll_set_camera (GtkRange * range, GtkScrollType scroll, gdouble value, gpointer data)
217{
218 camera_has_changed (value, data);
219 return FALSE;
220}
221
230G_MODULE_EXPORT void set_camera (GtkRange * range, gpointer data)
231{
232 camera_has_changed (gtk_range_get_value (range), data);
233}
234
243G_MODULE_EXPORT void set_camera_spin (GtkSpinButton * res, gpointer data)
244{
245 camera_has_changed (gtk_spin_button_get_value(res), data);
246}
247
248#ifdef GTK4
257G_MODULE_EXPORT gboolean on_rep_delete (GtkWindow * widg, gpointer data)
258#else
268G_MODULE_EXPORT gboolean on_rep_delete (GtkWidget * widg, GdkEvent * event, gpointer data)
269#endif
270{
271 glwin * view = (glwin *)data;
272 int i;
273 for (i=0; i<7; i++)
274 {
275 if (view -> camera_widg[i]) view -> camera_widg[i] = destroy_this_widget(view -> camera_widg[i]);
276 }
277 destroy_this_widget ((GtkWidget *)widg);
278 return TRUE;
279}
280
289G_MODULE_EXPORT void representation_advanced (GtkWidget * widg, gpointer data)
290{
291 glwin * view = (glwin *)data;
292 gchar * cam_opts[7]={"Zoom:", "Perspective depth:", "Camera depth:",
293 "Camera pitch:", "Camera heading:",
294 "Camera right/left", "Camera up/down"};
295 gchar * str;
296 double smax[7] = {1.0, 100.0, 100.0, 180.0, 180.0, 100.0, 100.0};
297 double smin[7] = {-2.0, 0.0, 0.0, -180.0, -180.0, -100.0, -100.0};
298 double sdel[7] = {0.001, 0.01, 0.01, 0.1, 0.1, 0.01, 0.01};
299 int sdig[7] = {3, 2, 2, 1, 1, 2, 2};
300 int i;
301 double v;
302 str = g_strdup_printf ("OpenGL camera set-up - %s", get_project_by_id(view -> proj)->name);
303 GtkWidget * arep = create_win (str, view -> win, FALSE, FALSE);
304 g_free (str);
305 GtkWidget * vbox = create_vbox (5);
307 GtkWidget * box;
308 for (i=0; i<7; i++)
309 {
310 box = abox (vbox, cam_opts[i], 0);
311 switch (i)
312 {
313 case 0:
314 v = 1.0-0.5*view -> anim -> last -> img -> zoom;
315 break;
316 case 1:
317 v = view -> anim -> last -> img -> p_depth;
318 break;
319 case 2:
320 v = view -> anim -> last -> img -> gnear;
321 break;
322 default:
323 if (i < 5)
324 {
325 v = view -> anim -> last -> img -> c_angle[i-3];
326 }
327 else
328 {
329 v = (view -> anim -> last -> img -> c_shift[i-5] == 0.0) ? 0.0 : - view -> anim -> last -> img -> c_shift[i-5];
330 }
331 break;
332 }
333 if (view -> camera_widg[i]) view -> camera_widg[i] = destroy_this_widget(view -> camera_widg[i]);
334 view -> camera_widg[i] = spin_button (G_CALLBACK(set_camera_spin), v, smin[i], smax[i], sdel[i], sdig[i], 150, & view -> colorp[i][0]);
335 add_box_child_start (GTK_ORIENTATION_HORIZONTAL, box, view -> camera_widg[i], FALSE, FALSE, 10);
336 if (i > 2 || i == 0)
337 {
338 str = g_strdup_printf ("in [%.1f, %.1f]", smin[i], smax[i]);
339 }
340 else if (i == 1)
341 {
342 str = g_strdup_printf ("in [C. depth, %.1f]", smax[i]);
343 }
344 else
345 {
346 str = g_strdup_printf ("in [%.1f, P. depth]", smin[i]);
347 }
348 add_box_child_start (GTK_ORIENTATION_HORIZONTAL, box, markup_label(str, 25, -1, 0.0, 0.5), FALSE, FALSE, 5);
349 g_free (str);
350 if(i < 3 && view -> anim -> last -> img -> rep == ORTHOGRAPHIC) widget_set_sensitive (view -> camera_widg[i], 0);
351 }
352 box = create_hbox(0);
353 add_box_child_start (GTK_ORIENTATION_VERTICAL, vbox, box, FALSE, FALSE, 10);
354 add_box_child_start (GTK_ORIENTATION_HORIZONTAL, box, create_button("Reset view", IMG_NONE, NULL, 100, 25, GTK_RELIEF_NORMAL, G_CALLBACK(reset_view), view), FALSE, FALSE, 200);
355 add_gtk_close_event (arep, G_CALLBACK(on_rep_delete), view);
356 show_the_widgets (arep);
357}
358
367G_MODULE_EXPORT void set_rep (GtkWidget * widg, gpointer data)
368{
369 tint * the_data = (tint *)data;
370 project * this_proj = get_project_by_id(the_data -> a);
371 int i, j;
372 i = this_proj -> modelgl -> anim -> last -> img -> rep;
373 j = the_data -> b;
374#ifdef GTK4
375 if (i != j)
376#else
377 if (i != j && gtk_check_menu_item_get_active ((GtkCheckMenuItem *)widg))
378#endif
379 {
380 this_proj -> modelgl -> anim -> last -> img -> rep = NONE;
381#ifdef GTK3
382 // GTK3 Menu Action To Check
383 gtk_check_menu_item_set_active ((GtkCheckMenuItem *)this_proj -> modelgl -> ogl_rep[i], FALSE);
384 if (widg != this_proj -> modelgl -> ogl_rep[j])
385 {
386 gtk_check_menu_item_set_active ((GtkCheckMenuItem *)this_proj -> modelgl -> ogl_rep[j], TRUE);
387 }
388#endif
389 this_proj -> modelgl -> anim -> last -> img -> rep = j;
390#ifdef GTK3
391 // GTK3 Menu Action To Check
392 for (i=2; i<4; i++)
393 {
394 if (this_proj -> modelgl -> camera_widg[i])
395 {
396 if (GTK_IS_WIDGET(this_proj -> modelgl -> camera_widg[i]))
397 {
398 widget_set_sensitive (this_proj -> modelgl -> camera_widg[i], j);
399 }
400 }
401 }
402#endif
403 this_proj -> modelgl -> create_shaders[MAXIS] = TRUE;
404 update (this_proj -> modelgl);
405 }
406#ifdef GTK3
407 // GTK3 Menu Action To Check
408 else if (i == j && ! gtk_check_menu_item_get_active ((GtkCheckMenuItem *)widg))
409 {
410 gtk_check_menu_item_set_active ((GtkCheckMenuItem *)this_proj -> modelgl -> ogl_rep[j], TRUE);
411 }
412#endif
413}
414
415#ifdef GTK3
424GtkWidget * menu_rep (glwin * view, int id)
425{
426 int i, j;
427 GtkWidget * menur = gtk_menu_new ();
428 j = view -> anim -> last -> img -> rep;
429 if (id == 0)
430 {
431 for (i=0; i<OGL_REPS; i++)
432 {
433 view -> ogl_rep[i] = gtk3_menu_item (menur, text_reps[i], IMG_NONE, NULL, G_CALLBACK(set_rep), & view -> colorp[i][0], FALSE, 0, 0, TRUE, TRUE, (i == j) ? TRUE : FALSE);
434 }
435 }
436 else
437 {
438 for (i=0; i<OGL_REPS; i++)
439 {
440 gtk3_menu_item (menur, text_reps[i], IMG_NONE, NULL, G_CALLBACK(set_rep), & view -> colorp[i][0], FALSE, 0, 0, TRUE, TRUE, (i == j) ? TRUE : FALSE);
441 }
442 }
443 add_advanced_item (menur, G_CALLBACK(representation_advanced), (gpointer)view, FALSE, 0, 0);
444 return menur;
445}
446#else
456G_MODULE_EXPORT void change_rep_radio (GSimpleAction * action, GVariant * parameter, gpointer data)
457{
458 glwin * view = (glwin *)data;
459 const gchar * rep = g_variant_get_string (parameter, NULL);
460 int lgt = strlen (rep);
461 gchar * name = g_strdup_printf ("%c%c", rep[lgt-2], rep[lgt-1]);
462 if (g_strcmp0(name, ".1") == 0)
463 {
464 g_free (name);
465 name = g_strdup_printf ("%.*s.0", lgt-2, rep);
466 g_action_group_activate_action ((GActionGroup *)view -> action_group, "set-rep", g_variant_new_string((const gchar *)name));
467 g_free (name);
468 }
469 else
470 {
471 const gchar * rep = g_variant_get_string (parameter, NULL);
472 gchar * rep_name = NULL;
473 int i;
474 for (i=0; i<OGL_REPS; i++)
475 {
476 rep_name = g_strdup_printf ("set-rep.%d.0", i);
477 if (g_strcmp0(rep, (const gchar *)rep_name) == 0)
478 {
479 set_rep (NULL, & view -> colorp[i][0]);
480 g_free (rep_name);
481 rep_name = NULL;
482 break;
483 }
484 g_free (rep_name);
485 rep_name = NULL;
486 }
487 g_action_change_state (G_ACTION (action), parameter);
488 }
489}
490
500G_MODULE_EXPORT void to_rep_advanced (GSimpleAction * action, GVariant * parameter, gpointer data)
501{
502 representation_advanced (NULL, data);
503}
504
513GMenu * menu_rep (glwin * view, int popm)
514{
515 GMenu * menu = g_menu_new ();
516 int i, j;
517 i = view -> anim -> last -> img -> rep;
518 for (j=0; j<OGL_REPS; j++)
519 {
520 append_opengl_item (view, menu, text_reps[j], "rep", popm, j, NULL, IMG_NONE, NULL, FALSE, G_CALLBACK(change_rep_radio), (gpointer)view, FALSE, (i == j) ? TRUE : FALSE, TRUE, TRUE);
521 }
522 append_opengl_item (view, menu, "Advanced", "rep-adv", popm, j, NULL, IMG_NONE, NULL, FALSE, G_CALLBACK(to_rep_advanced), (gpointer)view, FALSE, FALSE, FALSE, TRUE);
523 return menu;
524}
525
535G_MODULE_EXPORT void to_center_molecule (GSimpleAction * action, GVariant * parameter, gpointer data)
536{
538}
539
548GMenu * menu_reset (glwin * view, int popm)
549{
550 GMenu * menu = g_menu_new ();
551 append_opengl_item (view, menu, "Reset view", "reset-view", popm, popm, NULL, IMG_NONE, NULL, FALSE, G_CALLBACK(to_reset_view), (gpointer)view, FALSE, FALSE, FALSE, TRUE);
552 append_opengl_item (view, menu, "Center molecule", "center-mol", popm, popm, NULL, IMG_NONE, NULL, FALSE, G_CALLBACK(to_center_molecule), (gpointer)view, FALSE, FALSE, FALSE, TRUE);
553 return menu;
554}
555
564GMenu * menu_fullscreen (glwin * view, int popm)
565{
566 GMenu * menu = g_menu_new ();
567 append_opengl_item (view, menu, "Fullscreen", "full", popm, popm, "<CTRL>F", IMG_STOCK, (gpointer)FULLSCREEN, FALSE, G_CALLBACK(set_full_screen), (gpointer)view, FALSE, FALSE, FALSE, TRUE);
568 return menu;
569}
570
579GMenu * menu_view (glwin * view, int popm)
580{
581 GMenu * menu = g_menu_new ();
582 append_submenu (menu, "Representation", menu_rep(view, popm));
583 append_submenu (menu, "Projection", menu_proj(view, popm));
584 append_submenu (menu, "Background", menu_back(view, popm));
585 if (get_project_by_id(view -> proj) -> nspec) g_menu_append_item (menu, menu_box_axis (view, popm, 1));
586 if (! popm)
587 {
588 g_menu_append_section (menu, NULL, (GMenuModel*)menu_reset(view, popm));
589 g_menu_append_section (menu, NULL, (GMenuModel*)menu_fullscreen(view, popm));
590 }
591 return menu;
592}
593
594#endif
color colorp[64]
dint rep
Definition dlp_edit.c:2239
Global variable declarations Global convenience function declarations Global data structure defin...
@ IMG_NONE
Definition global.h:260
@ IMG_STOCK
Definition global.h:264
GtkWidget * gtk3_menu_item(GtkWidget *menu, gchar *name, int icon_format, gpointer item_icon, GCallback handler, gpointer data, gboolean accel, guint key, GdkModifierType mod, gboolean check, gboolean radio, gboolean status)
GtkWidget * create_win(gchar *str, GtkWidget *parent, gboolean modal, gboolean resiz)
create a new GtkWindow
Definition gtk-misc.c:445
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:728
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:2387
GtkWidget * spin_button(GCallback handler, double value, double start, double end, double step, int digits, int dim, gpointer data)
create a spin button
Definition gtk-misc.c:1772
GtkWidget * add_advanced_item(GtkWidget *menu, GCallback handler, gpointer data, gboolean accel, guint key, GdkModifierType mod)
@ CONTAINER_WIN
Definition global.h:250
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:1863
GtkWidget * markup_label(gchar *text, int dimx, int dimy, float ax, float ay)
Definition gtk-misc.c:1585
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:299
void widget_set_sensitive(GtkWidget *widg, gboolean sensitive)
Set sensitivity for a GtkWidget, ensuring it is a GtkWidget.
Definition gtk-misc.c:206
GtkWidget * create_hbox(int spacing)
create a GtkBox with horizontal orientation
Definition gtk-misc.c:813
#define FULLSCREEN
Definition global.h:198
GtkWidget * destroy_this_widget(GtkWidget *widg)
destroy a GtkWidget
Definition gtk-misc.c:2034
void add_container_child(int type, GtkWidget *widg, GtkWidget *child)
Add a GtkWidget into another GtkWidget.
Definition gtk-misc.c:226
GtkWidget * create_vbox(int spacing)
create a GtkBox with vertical orientation
Definition gtk-misc.c:801
GtkWidget * abox(GtkWidget *box, char *lab, int vspace)
box creating routine, to help design faster elements for the GUI
Definition gtk-misc.c:1912
void show_the_widgets(GtkWidget *widg)
show GtkWidget
Definition gtk-misc.c:173
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
void zoom(glwin *view, int delta)
zoom in or zoom out in the OpenGL window
Definition glview.c:1006
void init_camera(project *this_proj, int get_depth)
intialize the OpenGL camera settings
Definition glview.c:1132
void center_this_molecule(glwin *view)
center atomic coordinates around (0,0,0) and refresh shaders
Definition glview.c:1522
Variable declarations related to the OpenGL window Function declarations related to the OpenGL wind...
action
Definition glview.h:189
@ ANALYZE
Definition glview.h:157
@ ORTHOGRAPHIC
Definition glview.h:151
@ NONE
Definition glview.h:172
@ LABEL
Definition glwin.h:98
@ MAXIS
Definition glwin.h:94
@ MEASU
Definition glwin.h:99
#define OGL_REPS
Definition glwin.h:60
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)
Messaging function declarations.
GMenu * menu_back(glwin *view, int popm)
create the background color menu item GTK4
Definition m_back.c:68
GMenuItem * menu_box_axis(glwin *view, int popm, int ab)
create the 'Model -> Box' and 'View -> Axis' submenus GTK4
Definition m_box.c:470
GMenu * menu_proj(glwin *view, int popm)
create the 'View -> Projection' submenu - GTK4
Definition m_proj.c:164
G_MODULE_EXPORT void to_center_molecule(GSimpleAction *action, GVariant *parameter, gpointer data)
center molecule callback - GTK4
Definition m_rep.c:535
void update_labels(glwin *view)
update labels (on representation data update)
Definition m_rep.c:83
void save_rotation_quaternion(glwin *view)
save the rotation quaternion of the last image
Definition glview.c:543
GMenu * menu_fullscreen(glwin *view, int popm)
create the 'Fullscreen' menu item - GTK4
Definition m_rep.c:564
GMenu * menu_reset(glwin *view, int popm)
create the reset menu items - GTK4
Definition m_rep.c:548
G_MODULE_EXPORT void change_rep_radio(GSimpleAction *action, GVariant *parameter, gpointer data)
change representation radio items callback - GTK4
Definition m_rep.c:456
void camera_has_changed(gdouble value, gpointer data)
update camera data
Definition m_rep.c:99
G_MODULE_EXPORT void reset_view(GtkButton *but, gpointer data)
reset view callback
Definition m_rep.c:169
G_MODULE_EXPORT void set_full_screen(GtkWidget *widg, gpointer data)
set full screen callback GTK3
Definition popup.c:229
G_MODULE_EXPORT void set_rep(GtkWidget *widg, gpointer data)
change representation callback - GTK3
Definition m_rep.c:367
G_MODULE_EXPORT gboolean on_rep_delete(GtkWidget *widg, GdkEvent *event, gpointer data)
representation window delete event - GTK3
Definition m_rep.c:268
G_MODULE_EXPORT void set_camera(GtkRange *range, gpointer data)
update camera data callback - range callback
Definition m_rep.c:230
GMenu * menu_rep(glwin *view, int popm)
create 'View -> Representation' submenu items - GTK4
Definition m_rep.c:513
G_MODULE_EXPORT void to_reset_view(GtkWidget *widg, gpointer data)
reset view callback - GTK3
Definition m_rep.c:200
G_MODULE_EXPORT void to_rep_advanced(GSimpleAction *action, GVariant *parameter, gpointer data)
change representation callback - GTK4
Definition m_rep.c:500
G_MODULE_EXPORT gboolean scroll_set_camera(GtkRange *range, GtkScrollType scroll, gdouble value, gpointer data)
update camera data callback - scroll callback
Definition m_rep.c:216
void rotate_x_y(glwin *view, double angle_x, double angle_y)
rotate the OpenGL camera
Definition glview.c:1081
G_MODULE_EXPORT void set_camera_spin(GtkSpinButton *res, gpointer data)
update camera data callback - spin button
Definition m_rep.c:243
G_MODULE_EXPORT void representation_advanced(GtkWidget *widg, gpointer data)
open advanced representation dialog
Definition m_rep.c:289
GMenu * menu_view(glwin *view, int popm)
create the 'View' submenu - GTK4
Definition m_rep.c:579
gchar * text_reps[OGL_REPS]
Definition m_rep.c:74
Definition glwin.h:875
Definition global.h:104
Function declarations for the creation of the OpenGL window menus.
int b
Definition tab-1.c:95
int a
Definition tab-1.c:95
GtkWidget * res[2]
Definition w_encode.c:212
GtkWidget * img
Definition workspace.c:70
GtkWidget * vbox
Definition workspace.c:72