66extern cairo_surface_t *
col_surface (
double r,
double g,
double b,
int x,
int y);
67extern G_MODULE_EXPORT
void coord_properties (GtkWidget * widg, gpointer data);
88 b = (float)numid / 4.0;
197 gtk_menu_item_set_submenu ((GtkMenuItem *)view -> ogl_coord[0],
coord_menu (view));
213GtkWidget * coord_view_setup (
int * sp,
int id,
int jd)
215 GtkWidget * menuv = gtk_menu_new ();
220 gtk_menu_item_set_submenu ((GtkMenuItem *)
active_glwin -> oglmv[jd][
id][* sp], menuv);
234GtkWidget * coord_color_setup (
int * sp,
int id,
int jd)
237 GtkWidget * menuc = NULL;
238 menuc = gtk_menu_new ();
243 gtk_menu_item_set_submenu ((GtkMenuItem *)
active_glwin -> oglmc[jd][
id][* sp], menuc);
257GtkWidget * poly_show_setup (
int * sp,
int id,
int jd)
259 GtkWidget * menup = gtk_menu_new ();
269 gtk_menu_item_set_submenu ((GtkMenuItem *)
active_glwin -> oglmpv[jd][
id][* sp], menup);
284GtkWidget * create_coord_menu (
int p,
char * name, gboolean va, GtkWidget * menu,
qint * data)
286 GtkWidget * coord_widget =
gtk3_menu_item (menu, name,
IMG_NONE, NULL, NULL, NULL, FALSE, 0, 0, TRUE, FALSE, va);
289 g_signal_connect (G_OBJECT (coord_widget),
"activate", G_CALLBACK(
show_hide_coord), data);
293 g_signal_connect (G_OBJECT (coord_widget),
"activate", G_CALLBACK(
show_hide_poly), data);
344 int i, j, k, l, m, n, o;
354 for (j=0; j < * sp; j++)
359 for (l=0; l < * id; l++)
373 for (m=0; m < * ngsp; m++)
400 for (m=0; m < * ngsp; m++)
420 menuc = coord_color_setup (sp, *
id, m);
421 menuv = coord_view_setup (sp, *
id, m);
424 menupv = poly_show_setup (sp, *
id, m);
430 for (n=0; n < * ngsp; n++)
439 str = g_strdup_printf (
"%d", coordt[n]);
456 active_glwin -> ogl_geom[m][* id][n+i] = create_coord_menu (0, str, TRUE, menuv, &
active_glwin -> gcid[*
id][n+i][*
id]);
457 gtk_menu_shell_append ((GtkMenuShell *)menuc, spm);
462 active_glwin -> ogl_poly[m][* id][n+i] = create_coord_menu (1, str, FALSE, menupv, &
active_glwin -> gcid[*
id][n+i][*
id]);
481 gchar * keyw[2] = {
"fragment(s)",
"molecule(s)"};
484 gchar * str = g_strdup_printf (
"Maximum number of %s per MD step: %d", keyw[*
id -2],
active_coord -> totcoord[*
id]);
502 for (i=0; i < * id; i++)
522 active_glwin -> oglmv[k][* id][0] = coord_view_setup (& i, *
id, k);
523 active_glwin -> oglmc[k][* id][0] = coord_color_setup (& i, *
id, k);
524 if (! k) g_debug (
"active_project -> name= %s, id= %d, totcoord[%d]= %d",
active_project -> name, *
id, *
id,
active_coord -> totcoord[*
id]);
532 str = g_strdup_printf (
"Fragment N°%d", i+1);
536 str = g_strdup_printf (
"Molecule N°%d", i+1);
541 gtk_menu_shell_append ((GtkMenuShell *)
active_glwin -> oglmc[k][*
id][0], spm);
570void init_menurings_ (
int * coo,
int * ids,
int * ngsp,
int coordt[* ngsp],
int * init)
582 for ( j=0 ; j < * ngsp ; j++ )
589 if (* init)
active_image -> show_poly[* coo][j] = FALSE;
606 for (i=0 ; i < 2 ; i++)
610 active_glwin -> oglmc[i][* coo][j] = coord_color_setup (& j, * coo, i);
612 for ( j=0 ; j < * ngsp ; j++ )
619 if (* init)
active_image -> show_poly[* coo][j] = FALSE;
625 str = g_strdup_printf (
"%d", coordt[j]);
627 active_glwin -> ogl_geom[i][* coo][j] = create_coord_menu (0, str, TRUE, NULL, &
active_glwin -> gcid[* coo][j][* coo]);
628 gtk_menu_shell_append ((GtkMenuShell *)
active_glwin -> oglmc[i][* coo][0], spm);
645 gtk_menu_shell_append ((GtkMenuShell *)
active_glwin -> oglmc[i][* coo][0], allt);
671 for (j=0; j < nt; j++)
677 if (id < 2 || id > 3)
695 for (j=0; j < nt; j++)
Binding to the Fortran90 subroutines.
GtkWidget * color_box(glwin *view, int ideo, int spec, int geo)
create the color palette pointers and menus GTK3 version
Structure definitions for color management Function declarations for color management.
void label(cairo_t *cr, double val, int axe, int p, project *this_proj)
draw axis label
gboolean * allocbool(int val)
allocate a gboolean * pointer
int * allocint(int val)
allocate an int * pointer
Global variable declarations Global convenience function declarations Global data structure defin...
GtkWidget * create_menu_item_from_widget(GtkWidget *widg, gboolean check, gboolean radio, gboolean status)
G_MODULE_EXPORT void show_hide_poly(GtkWidget *widg, gpointer data)
show / hide polyhedra callback - GTK3
coord_info * active_coord
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)
G_MODULE_EXPORT void show_hide_coord(GtkWidget *widg, gpointer data)
show/hide coordination callback GTK3
chemical_data * active_chem
GtkWidget * markup_label(gchar *text, int dimx, int dimy, float ax, float ay)
void widget_set_sensitive(GtkWidget *widg, gboolean sensitive)
Set sensitivity for a GtkWidget, ensuring it is a GtkWidget.
GtkWidget * create_menu_item(gboolean add_mnemo, gchar *action)
void show_the_widgets(GtkWidget *widg)
show GtkWidget
project * get_project_by_id(int p)
get project pointer using id number
Variable declarations related to the OpenGL window Function declarations related to the OpenGL wind...
#define COORD_MAX_MENU
Maximum number of fragments or molecules to build the related menu items.
void set_color_map_sensitive(glwin *view)
void prep_all_coord_menus(glwin *view)
Function declarations for the creation of the OpenGL window.
GtkWidget * coord_menu(glwin *view)
G_MODULE_EXPORT void coord_properties(GtkWidget *widg, gpointer data)
create the environments configuration window
int * duplicate_int(int num, int *old_val)
copy a list of int
void init_menu_coordinations_(int *id, int *sp, int *ngsp, int coordt[*ngsp])
getting atomic coordinations data from Fortran90, and related GTK3 menu elements creation
void send_coord_opengl_(int *id, int *num, int *cmin, int *cmax, int *nt, int coord[*num])
coordination information from Fortran90
void init_opengl_coords(int id, int nt, int init)
initialize data to store the coordination data
ColRGBA init_color(int id, int numid)
initialize color based id number over total number of elements
void init_menu_fragmol_(int *id)
getting fragment(s)/molecule(s) data from Fortran90, and related GTK3 menu elements creation
cairo_surface_t * col_surface(double r, double g, double b, int x, int y)
create a cairo sufrace painted with the appropriate color
void gcid_spcolor_setup(int sp, int id)
prepare color pointers
void init_menurings_(int *coo, int *ids, int *ngsp, int coordt[*ngsp], int *init)
getting rings statistics data from Fortran90, and related GTK3 menu elements creation
void allocate_partial_geo_(int *sp, int *ngsp)
allocate partial coordination(s) data
void partial_geo_out_(int *sp, int *id, int *ngsp, int coord[*ngsp])
partial coordination data from Fortran90
void set_advanced_bonding_menus(glwin *view)
gchar * env_name(project *this_proj, int g, int s, int f, GtkTextBuffer *buffer)
ouput the name of a coordination sphere
gchar * exact_name(gchar *name)
short cut to print string without spaces
Messaging function declarations.