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

Functions to create the measurement(s) window. More...

#include "global.h"
#include "glview.h"
+ Include dependency graph for w_measures.c:

Go to the source code of this file.

Functions

void bonds_loop (glwin *view, int id, int pi, GtkTreeStore *store)
 do things for the measured distances selection
 
void angles_loop (glwin *view, int id, int pi, GtkTreeStore *store)
 do things for the measured angles selection
 
void dihedrals_loop (glwin *view, int id, int pi, GtkTreeStore *store)
 do things for the measured dihedrals selection
 
int num_bonds (int i)
 number of distinct pair(s) of atoms in selection
 
int num_angles (int i)
 number of distinct triplet(s) of atoms in selection
 
int num_dihedrals (int i)
 number of distinct quadruplet(s) of atoms in selection
 
int get_selection_type (glwin *view)
 get selection type
 
void fill_bond_model_row (int p, int a, int b, GtkTreeStore *store)
 fill bond tree store row
 
void fill_angle_model_row (int p, int a, int b, int c, GtkTreeStore *store)
 fill angle tree store row
 
void fill_dihedral_model_row (int p, int a, int b, int c, int d, GtkTreeStore *store)
 fill dihedral tree store row
 
ColRGBA init_color (int id, int numid)
 initialize color based id number over total number of elements
 
void measure_set_visible (GtkTreeViewColumn *col, GtkCellRenderer *renderer, GtkTreeModel *mod, GtkTreeIter *iter, gpointer data)
 show / hide cell renderer in the measures tree store
 
void measure_set_color (GtkTreeViewColumn *col, GtkCellRenderer *renderer, GtkTreeModel *mod, GtkTreeIter *iter, gpointer data)
 set renderer color in the measures tree store
 
void dihedral_set_color_and_markup (GtkTreeViewColumn *col, GtkCellRenderer *renderer, GtkTreeModel *mod, GtkTreeIter *iter, gpointer data)
 
void measure_set_color_and_markup (GtkTreeViewColumn *col, GtkCellRenderer *renderer, GtkTreeModel *mod, GtkTreeIter *iter, gpointer data)
 
GtkWidget * create_selection_tree (glwin *view, int sid, int mid)
 create the measurements selection tree
 
void update_selection_tree (glwin *view, int sid, int mid)
 update measurements tree view
 
G_MODULE_EXPORT void measure_tree_button_event (GtkWidget *widget, double event_x, double event_y, guint event_button, gpointer data)
 measure tree button event
 
G_MODULE_EXPORT void measure_tree_button_pressed (GtkGesture *gesture, int n_press, double x, double y, gpointer data)
 measures tree view button press callback GTK3
 
GtkWidget * measurment_tab (glwin *view, int sid, int mid)
 
gchar * create_measure_label (glwin *view, int sid)
 create the text information for the number of atom(s) in selection
 
void update_label_selection (glwin *view, int sid)
 update the text information for the number of atoms/measures in selection
 
GtkWidget * labels_tab (glwin *view, int id)
 create atomic label(s) tab for the atom(s) / clone(s) window
 
G_MODULE_EXPORT void close_ml (GtkButton *but, gpointer data)
 measurements style edition window close button
 
G_MODULE_EXPORT void measure_labels (GtkButton *but, gpointer data)
 measurements style edition window
 
G_MODULE_EXPORT gboolean close_measure_event (GtkWidget *widg, GdkEvent *event, gpointer data)
 measurements window close event callback GTK3
 
G_MODULE_EXPORT void window_measures (GtkWidget *widg, gpointer data)
 create the measurements window
 

Variables

int bond_id
 
int angle_id
 
int dihedral_id
 

Detailed Description

Functions to create the measurement(s) window.

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 w_measures.c.

Function Documentation

◆ angles_loop()

void angles_loop ( glwin * view,
int id,
int pi,
GtkTreeStore * store )
extern

do things for the measured angles selection

Parameters
viewthe target glwin
idaction to perform:
-2 = save angles selection,
-1 = clean angles selection,
0 = prepare OpenGL buffer data analysis mode selection measure,
1 = prepare OpenGL buffer data edition mode selection measure,
2 = fill angles tree store measures window
pi0 = mouse analysis mode, 1 = mouse edition mode
storethe tree store to fill, if any

Definition at line 204 of file d_measures.c.

◆ bonds_loop()

void bonds_loop ( glwin * view,
int id,
int pi,
GtkTreeStore * store )
extern

do things for the measured distances selection

Parameters
viewthe target glwin
idaction to perform:
-2 = save bonds selection
-1 = clean bonds selection
0 = prepare OpenGL buffer data analysis mode selection measure
1 = prepare OpenGL buffer data edition mode selection measure
2 = fill bonds distances tree store measures window
pi0 = mouse analysis mode, 1 = mouse edition mode
storethe tree store to fill, if any

Definition at line 530 of file d_measures.c.

◆ close_measure_event()

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

measurements window close event callback GTK3

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

Definition at line 716 of file w_measures.c.

◆ close_ml()

G_MODULE_EXPORT void close_ml ( GtkButton * but,
gpointer data )

measurements style edition window close button

Parameters
butthe GtkButton sending the signal
datathe associated data pointer

Definition at line 664 of file w_measures.c.

◆ create_measure_label()

gchar * create_measure_label ( glwin * view,
int sid )

create the text information for the number of atom(s) in selection

Parameters
viewthe target glwin
sidthe type of selection (0 = analysis mode, 1 = edition mode)

Definition at line 625 of file w_measures.c.

◆ create_selection_tree()

GtkWidget * create_selection_tree ( glwin * view,
int sid,
int mid )

create the measurements selection tree

Parameters
viewthe target glwin
sidthe type of selection (0 = analysis mode, 1 = edition mode)
midthe type of measurement (0 = bonds, 1 = angles, 2 = dihedrals)

Definition at line 490 of file w_measures.c.

◆ dihedral_set_color_and_markup()

void dihedral_set_color_and_markup ( GtkTreeViewColumn * col,
GtkCellRenderer * renderer,
GtkTreeModel * mod,
GtkTreeIter * iter,
gpointer data )
Parameters
colthe tree view column
rendererthe column renderer
modthe tree model
iterthe tree it
datathe associated data pointer

Definition at line 338 of file w_measures.c.

◆ dihedrals_loop()

void dihedrals_loop ( glwin * view,
int id,
int pi,
GtkTreeStore * store )
extern

do things for the measured dihedrals selection

Parameters
viewthe target glwin
idaction to perform:
-2 = save dihedrals selection
-1 = clean dihedrals selection
0 = prepare OpenGL buffer data analysis mode selection measure
1 = prepare OpenGL buffer data edition mode selection measure
2 = fill dihedrals tree store measures window
pi0 = mouse analysis mode, 1 = mouse edition mode
storethe tree store to fill, if any

Definition at line 319 of file d_measures.c.

◆ fill_angle_model_row()

void fill_angle_model_row ( int p,
int a,
int b,
int c,
GtkTreeStore * store )

fill angle tree store row

Parameters
pthe project id
a1st atom id
b2nd atom id
c3rd atom id
storethe GtkTreeStore to fill

Definition at line 158 of file w_measures.c.

◆ fill_bond_model_row()

void fill_bond_model_row ( int p,
int a,
int b,
GtkTreeStore * store )

fill bond tree store row

Parameters
pthe project id
a1st atom id
b2nd atom id
storethe GtkTreeStore to fill

Definition at line 109 of file w_measures.c.

◆ fill_dihedral_model_row()

void fill_dihedral_model_row ( int p,
int a,
int b,
int c,
int d,
GtkTreeStore * store )

fill dihedral tree store row

Parameters
pthe project id
a1st atom id
b2nd atom id
c3rd atom id
d4th atom id
storethe GtkTreeStore to fill

Definition at line 213 of file w_measures.c.

◆ get_selection_type()

int get_selection_type ( glwin * view)

get selection type

Parameters
viewthe target glwin

Definition at line 83 of file w_measures.c.

◆ init_color()

ColRGBA init_color ( int id,
int numid )
extern

initialize color based id number over total number of elements

Parameters
idthe id number
numidthe total number of elements

Definition at line 81 of file initcoord.c.

◆ labels_tab()

GtkWidget * labels_tab ( glwin * view,
int lid )
extern

create atomic label(s) tab for the atom(s) / clone(s) window

Parameters
viewthe target glwin
lidlabel type (0 = atoms, 1 = clones, 3 = analysis measures, 4 = edition mode measures)

Definition at line 537 of file w_labels.c.

◆ measure_labels()

G_MODULE_EXPORT void measure_labels ( GtkButton * but,
gpointer data )

measurements style edition window

Parameters
butthe GtkButton sending the signal
datathe associated data pointer

Definition at line 677 of file w_measures.c.

◆ measure_set_color()

void measure_set_color ( GtkTreeViewColumn * col,
GtkCellRenderer * renderer,
GtkTreeModel * mod,
GtkTreeIter * iter,
gpointer data )

set renderer color in the measures tree store

Parameters
colthe tree view column
rendererthe column renderer
modthe tree model
iterthe tree it
datathe associated data pointer

Definition at line 293 of file w_measures.c.

◆ measure_set_color_and_markup()

void measure_set_color_and_markup ( GtkTreeViewColumn * col,
GtkCellRenderer * renderer,
GtkTreeModel * mod,
GtkTreeIter * iter,
gpointer data )
Parameters
colthe tree view column
rendererthe column renderer
modthe tree model
iterthe tree it
datathe associated data pointer

Definition at line 360 of file w_measures.c.

◆ measure_set_visible()

void measure_set_visible ( GtkTreeViewColumn * col,
GtkCellRenderer * renderer,
GtkTreeModel * mod,
GtkTreeIter * iter,
gpointer data )

show / hide cell renderer in the measures tree store

Parameters
colthe tree view column
rendererthe column renderer
modthe tree model
iterthe tree it
datathe associated data pointer

Definition at line 274 of file w_measures.c.

◆ measure_tree_button_event()

G_MODULE_EXPORT void measure_tree_button_event ( GtkWidget * widget,
double event_x,
double event_y,
guint event_button,
gpointer data )

measure tree button event

Parameters
widgetthe GtkWidget sending the signal
event_xx position
event_yy position
event_buttonevent buttton
datathe associated data pointer

Definition at line 401 of file w_measures.c.

◆ measure_tree_button_pressed()

G_MODULE_EXPORT void measure_tree_button_pressed ( GtkGesture * gesture,
int n_press,
double x,
double y,
gpointer data )

measures tree view button press callback GTK3

Parameters
gesturethe GtkGesture sending the signal
n_pressnumber of times it was pressed
xx position
yy position
datathe associated data pointer

Definition at line 475 of file w_measures.c.

◆ measurment_tab()

GtkWidget * measurment_tab ( glwin * view,
int sid,
int mid )

Definition at line 609 of file w_measures.c.

◆ num_angles()

int num_angles ( int i)
extern

number of distinct triplet(s) of atoms in selection

Parameters
ithe number of atom(s) in selection

Definition at line 195 of file selection.c.

◆ num_bonds()

int num_bonds ( int i)
extern

number of distinct pair(s) of atoms in selection

Parameters
ithe number of atom(s) in selection

Definition at line 183 of file selection.c.

◆ num_dihedrals()

int num_dihedrals ( int i)
extern

number of distinct quadruplet(s) of atoms in selection

Parameters
ithe number of atom(s) in selection

Definition at line 207 of file selection.c.

◆ update_label_selection()

void update_label_selection ( glwin * view,
int sid )

update the text information for the number of atoms/measures in selection

Parameters
viewthe target glwin
sidthe type of selection (0 = analysis mode, 1 = edition mode)

Definition at line 648 of file w_measures.c.

◆ update_selection_tree()

void update_selection_tree ( glwin * view,
int sid,
int mid )

update measurements tree view

Parameters
viewthe target glwin
sidthe type of selection (0 = analysis mode, 1 = edition mode)
midthe type of measurement (0 = bonds, 1 = angles, 2 = dihedrals)

Definition at line 381 of file w_measures.c.

◆ window_measures()

G_MODULE_EXPORT void window_measures ( GtkWidget * widg,
gpointer data )

create the measurements window

Parameters
widgthe GtkWidget sending the signal
datathe associated data pointer

Definition at line 739 of file w_measures.c.

Variable Documentation

◆ angle_id

int angle_id

Definition at line 73 of file w_measures.c.

◆ bond_id

int bond_id

Definition at line 72 of file w_measures.c.

◆ dihedral_id

int dihedral_id

Definition at line 74 of file w_measures.c.