atomes 1.1.15
atomes: an atomic scale modeling tool box
Loading...
Searching...
No Matches
m_rep.c File Reference

Functions to create the 'View -> Representation' submenu. More...

#include "global.h"
#include "interface.h"
#include "glview.h"
#include "glwindow.h"
#include "submenus.h"
+ Include dependency graph for m_rep.c:

Go to the source code of this file.

Functions

void save_rotation_quaternion (glwin *view)
 save the rotation quaternion of the last image
 
void rotate_x_y (glwin *view, double angle_x, double angle_y)
 rotate the OpenGL camera
 
G_MODULE_EXPORT void set_full_screen (GtkWidget *widg, gpointer data)
 set full screen callback GTK3
 
void update_labels (glwin *view)
 update labels (on representation data update)
 
void camera_has_changed (gdouble value, gpointer data)
 update camera data
 
G_MODULE_EXPORT void reset_view (GtkButton *but, gpointer data)
 reset view callback
 
G_MODULE_EXPORT void to_reset_view (GtkWidget *widg, gpointer data)
 reset view callback - GTK3
 
G_MODULE_EXPORT gboolean scroll_set_camera (GtkRange *range, GtkScrollType scroll, gdouble value, gpointer data)
 update camera data callback - scroll callback
 
G_MODULE_EXPORT void set_camera (GtkRange *range, gpointer data)
 update camera data callback - range callback
 
G_MODULE_EXPORT void set_camera_spin (GtkSpinButton *res, gpointer data)
 update camera data callback - spin button
 
G_MODULE_EXPORT gboolean on_rep_delete (GtkWidget *widg, GdkEvent *event, gpointer data)
 representation window delete event - GTK3
 
G_MODULE_EXPORT void representation_advanced (GtkWidget *widg, gpointer data)
 open advanced representation dialog
 
G_MODULE_EXPORT void set_rep (GtkWidget *widg, gpointer data)
 change representation callback - GTK3
 
G_MODULE_EXPORT void change_rep_radio (GSimpleAction *action, GVariant *parameter, gpointer data)
 change representation radio items callback - GTK4
 
G_MODULE_EXPORT void to_rep_advanced (GSimpleAction *action, GVariant *parameter, gpointer data)
 change representation callback - GTK4
 
GMenu * menu_rep (glwin *view, int popm)
 create 'View -> Representation' submenu items - GTK4
 
G_MODULE_EXPORT void to_center_molecule (GSimpleAction *action, GVariant *parameter, gpointer data)
 center molecule callback - GTK4
 
GMenu * menu_reset (glwin *view, int popm)
 create the reset menu items - GTK4
 
GMenu * menu_fullscreen (glwin *view, int popm)
 create the 'Fullscreen' menu item - GTK4
 
GMenu * menu_view (glwin *view, int popm)
 create the 'View' submenu - GTK4
 

Variables

gchar * text_reps [OGL_REPS] = {"Orthographic", "Perspective"}
 

Detailed Description

Functions to create the 'View -> Representation' submenu.

Author
Sébastien Le Roux sebas.nosp@m.tien.nosp@m..lero.nosp@m.ux@i.nosp@m.pcms..nosp@m.unis.nosp@m.tra.f.nosp@m.r

Definition in file m_rep.c.

Function Documentation

◆ camera_has_changed()

void camera_has_changed ( gdouble value,
gpointer data )

update camera data

Parameters
valuethe new value
datathe associated data pointer

Definition at line 99 of file m_rep.c.

◆ change_rep_radio()

G_MODULE_EXPORT void change_rep_radio ( GSimpleAction * action,
GVariant * parameter,
gpointer data )

change representation radio items callback - GTK4

Parameters
actionthe GAction sending the signal
parameterGVariant parameter of the GAction, if any
datathe associated data pointer

Definition at line 456 of file m_rep.c.

◆ menu_fullscreen()

GMenu * menu_fullscreen ( glwin * view,
int popm )

create the 'Fullscreen' menu item - GTK4

Parameters
viewthe target glwin
popmmain app (0) or popup (1)

Definition at line 564 of file m_rep.c.

◆ menu_rep()

GMenu * menu_rep ( glwin * view,
int popm )

create 'View -> Representation' submenu items - GTK4

Parameters
viewthe target glwin
popmmain app (0) or popup (1)

Definition at line 513 of file m_rep.c.

◆ menu_reset()

GMenu * menu_reset ( glwin * view,
int popm )

create the reset menu items - GTK4

Parameters
viewthe target glwin
popmmain app (0) or popup (1)

Definition at line 548 of file m_rep.c.

◆ menu_view()

GMenu * menu_view ( glwin * view,
int popm )

create the 'View' submenu - GTK4

Parameters
viewthe target glwin
popmmain app (0) or popup (1)

Definition at line 579 of file m_rep.c.

◆ on_rep_delete()

G_MODULE_EXPORT gboolean on_rep_delete ( GtkWidget * widg,
GdkEvent * event,
gpointer data )

representation window delete event - GTK3

Parameters
widgthe GtkWidget sending the signal
eventthe GdkEvent triggering the signal
datathe associated data pointer

Definition at line 268 of file m_rep.c.

◆ representation_advanced()

G_MODULE_EXPORT void representation_advanced ( GtkWidget * widg,
gpointer data )

open advanced representation dialog

Parameters
widgthe GtkWidget sending the signal
datathe associated data pointer

Definition at line 289 of file m_rep.c.

◆ reset_view()

G_MODULE_EXPORT void reset_view ( GtkButton * but,
gpointer data )

reset view callback

Parameters
butthe GtkButton sending the signal
datathe associated data pointer

Definition at line 169 of file m_rep.c.

◆ rotate_x_y()

void rotate_x_y ( glwin * view,
double angle_x,
double angle_y )
extern

rotate the OpenGL camera

Parameters
viewthe target glwin
angle_xcamera angle on x axis
angle_ycamera angle on y axis

Definition at line 1081 of file glview.c.

◆ save_rotation_quaternion()

void save_rotation_quaternion ( glwin * view)
extern

save the rotation quaternion of the last image

Parameters
viewthe target glwin

Definition at line 543 of file glview.c.

◆ scroll_set_camera()

G_MODULE_EXPORT gboolean scroll_set_camera ( GtkRange * range,
GtkScrollType scroll,
gdouble value,
gpointer data )

update camera data callback - scroll callback

Parameters
rangethe GtkRange sending the signal
scrollthe associated scroll type
valuethe range value
datathe associated data pointer

Definition at line 216 of file m_rep.c.

◆ set_camera()

G_MODULE_EXPORT void set_camera ( GtkRange * range,
gpointer data )

update camera data callback - range callback

Parameters
rangethe GtkRange sending the signal
datathe associated data pointer

Definition at line 230 of file m_rep.c.

◆ set_camera_spin()

G_MODULE_EXPORT void set_camera_spin ( GtkSpinButton * res,
gpointer data )

update camera data callback - spin button

Parameters
resthe GtkSpinButton sending the signal
datathe associated data pointer

Definition at line 243 of file m_rep.c.

◆ set_full_screen()

G_MODULE_EXPORT void set_full_screen ( GtkWidget * widg,
gpointer data )
extern

set full screen callback GTK3

Parameters
widgthe GtkWidget sending the signal
datathe associated data pointer

Definition at line 229 of file popup.c.

◆ set_rep()

G_MODULE_EXPORT void set_rep ( GtkWidget * widg,
gpointer data )

change representation callback - GTK3

Parameters
widgthe GtkWidget sending the signal
datathe associated data pointer

Definition at line 367 of file m_rep.c.

◆ to_center_molecule()

G_MODULE_EXPORT void to_center_molecule ( GSimpleAction * action,
GVariant * parameter,
gpointer data )

center molecule callback - GTK4

Parameters
actionthe GAction sending the signal
parameterGVariant parameter of the GAction, if any
datathe associated data pointer

Definition at line 535 of file m_rep.c.

◆ to_rep_advanced()

G_MODULE_EXPORT void to_rep_advanced ( GSimpleAction * action,
GVariant * parameter,
gpointer data )

change representation callback - GTK4

Parameters
actionthe GAction sending the signal
parameterGVariant parameter of the GAction, if any
datathe associated data pointer

Definition at line 500 of file m_rep.c.

◆ to_reset_view()

G_MODULE_EXPORT void to_reset_view ( GtkWidget * widg,
gpointer data )

reset view callback - GTK3

Parameters
widgthe GtkWidget sending the signal
datathe associated data pointer

Definition at line 200 of file m_rep.c.

◆ update_labels()

void update_labels ( glwin * view)

update labels (on representation data update)

Parameters
viewthe target glwin

Definition at line 83 of file m_rep.c.

Variable Documentation

◆ text_reps

gchar* text_reps[OGL_REPS] = {"Orthographic", "Perspective"}

Definition at line 74 of file m_rep.c.