64 "van Der Waals radius",
77 for (i=0; i<this_proj -> steps; i++)
79 for (j=0; j<this_proj -> natomes; j++)
98 int s = view -> anim -> last ->
img -> style;
118 gtk_menu_item_set_label (GTK_MENU_ITEM(view -> ogl_atoms[4*i+1]), str);
127 gtk_menu_item_set_label (GTK_MENU_ITEM(view -> ogl_atoms[4*i+1]), str);
136 gtk_menu_item_set_label (GTK_MENU_ITEM(view -> ogl_atoms[4*i+1]), str);
145 gtk_menu_item_set_label (GTK_MENU_ITEM(view -> ogl_atoms[4*i+1]), str);
155 gtk_menu_item_set_label (GTK_MENU_ITEM(view -> ogl_atoms[4*i+1]), str);
172G_MODULE_EXPORT
void set_style (GtkWidget * widg, gpointer data)
176 int s = the_data ->
b;
179 int old_style = this_proj -> modelgl -> anim -> last ->
img -> style;
180 int old_filled = this_proj -> modelgl -> anim -> last ->
img -> filled_type;
183 if ((old_style != st || old_filled != ft) && gtk_check_menu_item_get_active ((GtkCheckMenuItem *)widg))
185 if (old_style != st || old_filled != ft)
190 this_proj -> modelgl -> anim -> last ->
img -> style =
NONE;
191 this_proj -> modelgl -> anim -> last ->
img -> filled_type =
NONE;
195 gtk_check_menu_item_set_active ((GtkCheckMenuItem *)this_proj -> modelgl -> filled_styles[j], FALSE);
199 gtk_check_menu_item_set_active ((GtkCheckMenuItem *)this_proj -> modelgl -> ogl_styles[i], FALSE);
204 j = this_proj -> nspec;
205 k = (ft) ? 9 + ft : 2;
206 l = (ft) ? 12 + ft : 7;
214 if (widg != this_proj -> modelgl -> filled_styles[ft])
216 gtk_check_menu_item_set_active ((GtkCheckMenuItem *)this_proj -> modelgl -> filled_styles[ft], TRUE);
219 this_proj -> modelgl -> anim -> last ->
img -> filled_type = ft;
220 this_proj -> modelgl -> anim -> last ->
img -> style =
SPACEFILL;
225 if (widg != this_proj -> modelgl -> ogl_styles[st])
227 gtk_check_menu_item_set_active ((GtkCheckMenuItem *)this_proj -> modelgl -> ogl_styles[st], TRUE);
230 this_proj -> modelgl -> anim -> last ->
img -> style = st;
277GtkWidget * create_style_menu (
char * name,
int val,
int style,
int vbl,
int filled, guint accel, GtkWidget * menu,
tint * data)
280 0, TRUE, TRUE, (style ==
val && filled == vbl) ? TRUE : FALSE);
296 GtkWidget * menus = gtk_menu_new ();
297 guint accels[
OGL_STYLES-1]={GDK_KEY_b, GDK_KEY_w, GDK_KEY_s, GDK_KEY_c, GDK_KEY_d};
298 guint accelf[
FILLED_STYLES]={GDK_KEY_o, GDK_KEY_i, GDK_KEY_v, GDK_KEY_r};
305 view -> ogl_styles[
i] = create_style_menu (
text_styles[i],
307 view -> anim -> last ->
img -> style,
317 gtk_menu_shell_append ((GtkMenuShell *)menus, widg);
318 GtkWidget * menuf = gtk_menu_new ();
319 gtk_menu_item_set_submenu ((GtkMenuItem *)widg, menuf);
322 view -> filled_styles[
j] = create_style_menu (
text_filled[j],
324 view -> anim -> last ->
img -> style,
326 view -> anim -> last ->
img -> filled_type,
342 view -> anim -> last ->
img -> style,
352 gtk_menu_shell_append ((GtkMenuShell *)menus, widg);
353 GtkWidget * menuf = gtk_menu_new ();
354 gtk_menu_item_set_submenu ((GtkMenuItem *)widg, menuf);
359 view -> anim -> last ->
img -> style,
361 view -> anim -> last ->
img -> filled_type,
385 const gchar * style = g_variant_get_string (parameter, NULL);
386 int lgt = strlen (style);
387 gchar * name = g_strdup_printf (
"%c%c", style[lgt-2], style[lgt-1]);
388 if (g_strcmp0(name,
".1") == 0)
391 name = g_strdup_printf (
"%.*s.0", lgt-2, style);
392 g_action_group_activate_action ((GActionGroup *)view -> action_group,
"set-style", g_variant_new_string((
const gchar *)name));
397 gchar * style_name = NULL;
401 style_name = g_strdup_printf (
"set-style.%d.0", i);
402 if (g_strcmp0(style, (
const gchar *)style_name) == 0)
425 g_action_change_state (G_ACTION (
action), parameter);
440 GMenu * menu = g_menu_new ();
441 gchar * accels[
OGL_STYLES-1]={
"b",
"w",
"s",
"c",
"d"};
452 FALSE, (view -> anim -> last ->
img -> style == i) ? TRUE : FALSE, TRUE, TRUE);
456 GMenu * menus = g_menu_new ();
462 FALSE, (view -> anim -> last ->
img -> style ==
SPACEFILL && view -> anim -> last ->
img -> filled_type == j) ? TRUE : FALSE, TRUE, TRUE);
Binding to the Fortran90 subroutines.
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
float get_radius(int object, int col, int z, element_radius *rad_list)
retrieve the radius/width of a species depending on style
gboolean * default_o_at_rs
element_radius * default_atomic_rad[16]
Preference variable declarations.
Function declarations for reading atomes project file Function declarations for saving atomes proje...