63 "van Der Waals radius",
76 for (i=0; i<this_proj -> steps; i++)
78 for (j=0; j<this_proj -> natomes; j++)
97 int s = view -> anim -> last ->
img -> style;
117 gtk_menu_item_set_label (GTK_MENU_ITEM(view -> ogl_atoms[4*i+1]), str);
126 gtk_menu_item_set_label (GTK_MENU_ITEM(view -> ogl_atoms[4*i+1]), str);
135 gtk_menu_item_set_label (GTK_MENU_ITEM(view -> ogl_atoms[4*i+1]), str);
144 gtk_menu_item_set_label (GTK_MENU_ITEM(view -> ogl_atoms[4*i+1]), str);
154 gtk_menu_item_set_label (GTK_MENU_ITEM(view -> ogl_atoms[4*i+1]), str);
171G_MODULE_EXPORT
void set_style (GtkWidget * widg, gpointer data)
175 int s = the_data ->
b;
178 int old_style = this_proj -> modelgl -> anim -> last ->
img -> style;
179 int old_filled = this_proj -> modelgl -> anim -> last ->
img -> filled_type;
182 if ((old_style != st || old_filled != ft) && gtk_check_menu_item_get_active ((GtkCheckMenuItem *)widg))
184 if (old_style != st || old_filled != ft)
189 this_proj -> modelgl -> anim -> last ->
img -> style =
NONE;
190 this_proj -> modelgl -> anim -> last ->
img -> filled_type =
NONE;
194 gtk_check_menu_item_set_active ((GtkCheckMenuItem *)this_proj -> modelgl -> filled_styles[j], FALSE);
198 gtk_check_menu_item_set_active ((GtkCheckMenuItem *)this_proj -> modelgl -> ogl_styles[i], FALSE);
203 j = this_proj -> nspec;
207 this_proj -> modelgl -> anim -> last ->
img -> atomicrad[i] = this_proj -> modelgl -> anim -> last ->
img -> atomicrad[i+j] =
set_radius_ (& k, & ft);
210 if (widg != this_proj -> modelgl -> filled_styles[ft])
212 gtk_check_menu_item_set_active ((GtkCheckMenuItem *)this_proj -> modelgl -> filled_styles[ft], TRUE);
215 this_proj -> modelgl -> anim -> last ->
img -> filled_type = ft;
216 this_proj -> modelgl -> anim -> last ->
img -> style =
SPACEFILL;
221 if (widg != this_proj -> modelgl -> ogl_styles[st])
223 gtk_check_menu_item_set_active ((GtkCheckMenuItem *)this_proj -> modelgl -> ogl_styles[st], TRUE);
226 this_proj -> modelgl -> anim -> last ->
img -> style = st;
273GtkWidget * create_style_menu (
char * name,
int val,
int style,
int vbl,
int filled, guint accel, GtkWidget * menu,
tint * data)
276 0, TRUE, TRUE, (style ==
val && filled == vbl) ? TRUE : FALSE);
292 GtkWidget * menus = gtk_menu_new ();
293 guint accels[
OGL_STYLES-1]={GDK_KEY_b, GDK_KEY_w, GDK_KEY_s, GDK_KEY_c, GDK_KEY_d};
294 guint accelf[
FILLED_STYLES]={GDK_KEY_o, GDK_KEY_i, GDK_KEY_v, GDK_KEY_r};
301 view -> ogl_styles[
i] = create_style_menu (
text_styles[i],
303 view -> anim -> last ->
img -> style,
313 gtk_menu_shell_append ((GtkMenuShell *)menus, widg);
314 GtkWidget * menuf = gtk_menu_new ();
315 gtk_menu_item_set_submenu ((GtkMenuItem *)widg, menuf);
318 view -> filled_styles[
j] = create_style_menu (
text_filled[j],
320 view -> anim -> last ->
img -> style,
322 view -> anim -> last ->
img -> filled_type,
338 view -> anim -> last ->
img -> style,
348 gtk_menu_shell_append ((GtkMenuShell *)menus, widg);
349 GtkWidget * menuf = gtk_menu_new ();
350 gtk_menu_item_set_submenu ((GtkMenuItem *)widg, menuf);
355 view -> anim -> last ->
img -> style,
357 view -> anim -> last ->
img -> filled_type,
381 const gchar * style = g_variant_get_string (parameter, NULL);
382 int lgt = strlen (style);
383 gchar * name = g_strdup_printf (
"%c%c", style[lgt-2], style[lgt-1]);
384 if (g_strcmp0(name,
".1") == 0)
387 name = g_strdup_printf (
"%.*s.0", lgt-2, style);
388 g_action_group_activate_action ((GActionGroup *)view -> action_group,
"set-style", g_variant_new_string((
const gchar *)name));
393 gchar * style_name = NULL;
397 style_name = g_strdup_printf (
"set-style.%d.0", i);
398 if (g_strcmp0(style, (
const gchar *)style_name) == 0)
421 g_action_change_state (G_ACTION (
action), parameter);
436 GMenu * menu = g_menu_new ();
437 gchar * accels[
OGL_STYLES-1]={
"b",
"w",
"s",
"c",
"d"};
448 FALSE, (view -> anim -> last ->
img -> style == i) ? TRUE : FALSE, TRUE, TRUE);
452 GMenu * menus = g_menu_new ();
458 FALSE, (view -> anim -> last ->
img -> style ==
SPACEFILL && view -> anim -> last ->
img -> filled_type == j) ? TRUE : FALSE, TRUE, TRUE);
Binding to the Fortran90 subroutines.
double set_radius_(int *, int *)
integer(kind=c_int) function chemistry()
void init_default_shaders(glwin *view)
re-initialize the default OpenGL shaders
Global variable declarations Global convenience function declarations Global data structure defin...
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)
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
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 hide_the_widgets(GtkWidget *widg)
hide GtkWidget
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...
void update_menus(glwin *view)
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)
gchar * label_atpts(project *this_proj, glwin *view, int id)
prepare the text of a menu item in the 'Model -> Atom(s)' submenu
G_MODULE_EXPORT void set_style(GtkWidget *widg, gpointer data)
set style callback
void clean_atom_style(project *this_proj)
clean all atom(s) possible alternative rendering styles
char * text_filled[FILLED_STYLES]
G_MODULE_EXPORT void change_style_radio(GSimpleAction *action, GVariant *parameter, gpointer data)
change style callback GTK4
GMenu * menu_style(glwin *view, int popm)
create the 'OpenGL -> Style' submenu - GTK4
char * text_styles[OGL_STYLES]
double precision, dimension(:), allocatable s
Function declarations for reading atomes project file Function declarations for saving atomes proje...