80extern const gchar *
dfi[2];
104 tmp = g_strdup_printf (
"rgba(%d,%d,%d,%d) 0%%",
105 (
int)(map -> values[0].red*255.0),
106 (
int)(map -> values[0].green*255.0),
107 (
int)(map -> values[0].blue*255.0),
108 (
int)map -> values[0].alpha);
110 j = (map -> positions[0] < map -> cmax) ? 0 : 1;
111 for (i=j; i<map -> points; i++)
113 k = (int)(100.0*(1.0 - (map -> positions[i] - map -> cmin)/(map -> cmax - map -> cmin)));
114 k = (i == map -> points-1 && map -> positions[i] == map -> cmin) ? 100 : k;
115 tmp = g_strdup_printf (
"%s, rgba(%d,%d,%d,%d) %d%%", tmp,
116 (
int)(map -> values[i].red*255.0),
117 (
int)(map -> values[i].green*255.0),
118 (
int)(map -> values[i].blue*255.0),
119 (
int)map -> values[i].alpha,
122 if (map -> positions[i-1] < map -> cmin)
124 tmp = g_strdup_printf (
"%s, rgba(%d,%d,%d,%d) %d%%", tmp,
125 (
int)(map -> values[i-1].red*255.0),
126 (
int)(map -> values[i-1].green*255.0),
127 (
int)(map -> values[i-1].blue*255.0),
128 (
int)map -> values[i-1].alpha,
131 gchar * gradient = g_strdup_printf (
"image#gradient {\n"
132 " background-image: linear-gradient(to bottom, %s);\n"
133 " min-width: 50px;\n"
134 " min-height: 400px;\n"
138 colob = gtk_image_new ();
139 gtk_widget_set_name (colob,
"gradient");
157 if (map -> positions != NULL)
159 g_free (map -> positions);
160 map -> positions = NULL;
162 if (map -> values != NULL)
164 g_free (map -> values);
165 map -> values = NULL;
168 map -> values = g_malloc (pts*
sizeof*map -> values);
170 for (i=0; i<pts; i++)
172 map -> positions[i] = map -> cmax - i*(map -> cmax - map -> cmin)/(pts - 1.0);
173 map -> values[i].red = 1.0 - i / (pts - 1.0);
174 map -> values[i].green = 0.0;
175 map -> values[i].blue = i / (pts - 1.0);
176 map -> values[i].alpha = 1.0;
190 colormap * map = g_malloc0 (
sizeof*map);
191 map -> data = g_malloc (this_proj -> steps*
sizeof*map -> data);
192 map -> colors = g_malloc (this_proj -> steps*
sizeof*map -> colors);
194 for (i=0; i<this_proj -> steps; i++)
196 map -> data[i] = g_malloc0 (this_proj -> natomes*
sizeof*map -> data[i]);
197 map -> colors[i] = g_malloc0 (this_proj -> natomes*
sizeof*map -> colors[i]);
221 cmin = cmax = data[0];
222 for (i=0; i<this_proj -> steps; i++)
224 for (j=0; j<this_proj -> natomes; j++)
226 cmin =
min(cmin, data[k]);
227 cmax =
max(cmax, data[k]);
235 gchar * str = g_strdup_printf (
"Range: [min-max] = %f - %f", cmin, cmax);
236 action =
ask_yes_no (
"Use this data set ?", str, GTK_MESSAGE_QUESTION, NULL);
247 this_proj -> modelgl -> custom_map -> points = 2;
249 the_map = this_proj -> modelgl -> custom_map;
256 for (i=0; i<this_proj -> steps; i++)
258 for (j=0; j<this_proj -> natomes; j++)
260 the_map -> data[i][j] = data[k];
266 for (i=0; i<this_proj -> steps; i++)
268 for (j=0; j<this_proj -> natomes; j++)
271 for (k=0; k<
the_map -> points-1; k++)
279 the_map -> colors[i][j].alpha = 1.0;
290 the_map -> colors[i][j].alpha = 1.0;
297 the_map -> colors[i][j].alpha = 1.0;
316 int pts = GPOINTER_TO_INT (data);
317 float pos = (float) gtk_spin_button_get_value (
res);
319 if (pos >=
tmp_map -> cmin && pos <= tmp_map -> cmax)
321 if (pos !=
tmp_map -> positions[pts])
327 else if (pts ==
tmp_map -> points-1)
333 update = (pos <
tmp_map -> positions[pts-1] && pos >
tmp_map -> positions[pts+1]) ? TRUE : FALSE;
338 gtk_spin_button_set_value (GTK_SPIN_BUTTON(
res),
tmp_map -> positions[pts]);
354 int pts = GPOINTER_TO_INT (data);
373 for (i=0; i<
tmp_map -> points; i++)
377 fixed = gtk_fixed_new ();
380 fixed = gtk_fixed_new ();
382 gtk_fixed_put (GTK_FIXED(fixed),
spin_button (G_CALLBACK(
set_point_position),
tmp_map -> positions[i],
tmp_map -> cmin,
tmp_map -> cmax, 0.01, 3, 100, GINT_TO_POINTER(i)), 0, 0);
414 int id = gtk_spin_button_get_value_as_int (
res);
415 if (
id >= 2 &&
id !=
tmp_map -> points)
420 gtk_spin_button_set_value (GTK_SPIN_BUTTON(
res),
tmp_map -> points);
434 i = GPOINTER_TO_INT(data);
437 gboolean update_cmap = FALSE;
449 if (v < tmp_map -> cmax && v !=
tmp_map -> cmin)
476 if (response_id == GTK_RESPONSE_APPLY)
489 update (this_proj -> modelgl);
505 GtkWidget * win =
dialogmodal (
"Edit color map", GTK_WINDOW(this_proj -> modelgl -> win));
506 gtk_dialog_add_button (GTK_DIALOG(win),
"Apply", GTK_RESPONSE_APPLY);
507 gtk_widget_set_size_request (win, 300, -1);
598 GtkTreeIter step_level, atom_level;
600 if (this_proj -> steps > 1)
602 for (h=0; h < this_proj -> steps; h++)
604 gtk_tree_store_append (store, & step_level, NULL);
605 gtk_tree_store_set (store, & step_level, 0, h+1,
609 for (i=0; i < this_proj -> natomes; i++)
611 gtk_tree_store_append (store, & atom_level, & step_level);
612 j = this_proj ->
atoms[h][i].sp;
613 gtk_tree_store_set (store, & atom_level, 0, -h-1, 1, this_proj ->
chemistry ->
label[j] , 2, i+1, 3,
the_map -> data[h][i], -1);
619 for (i=0; i < this_proj -> natomes; i++)
621 gtk_tree_store_append (store, & atom_level, NULL);
622 j = this_proj ->
atoms[0][i].sp;
623 gtk_tree_store_set (store, & atom_level, 0, this_proj ->
chemistry ->
label[j] , 1, i+1, 2,
the_map -> data[0][i], -1);
638G_MODULE_EXPORT
void edit_map_cell (GtkCellRendererText * cell, gchar * path_string, gchar * new_text, gpointer data)
643 GtkTreePath *
path = gtk_tree_path_new_from_string (path_string);
644 gtk_tree_model_get_iter (GTK_TREE_MODEL(
map_model), & iter,
path);
645 if (this_proj -> steps > 1)
647 gtk_tree_model_get (GTK_TREE_MODEL(
map_model), & iter, 0, & i, -1);
648 gtk_tree_model_get (GTK_TREE_MODEL(
map_model), & iter, 2, & j, -1);
653 gtk_tree_model_get (GTK_TREE_MODEL(
map_model), & iter, 1, & j, -1);
656 if (this_proj -> steps > 1)
658 gtk_tree_store_set (
map_model, & iter, 3,
tmp_data[(-i-1)*this_proj -> natomes + j - 1], -1);
662 gtk_tree_store_set (
map_model, & iter, 2,
tmp_data[(-i-1)*this_proj -> natomes + j - 1], -1);
677 GtkTreeViewColumn * map_col[4];
678 GtkCellRenderer * map_cell[4];
679 gchar *
ctitle[4]={
"MD. step",
"Element",
"Id.",
"Value"};
680 gchar * ctype[4]={
"text",
"text",
"text",
"text"};
681 GType
col_type[2][4]= {{G_TYPE_STRING, G_TYPE_INT, G_TYPE_FLOAT},
682 {G_TYPE_INT, G_TYPE_STRING, G_TYPE_INT, G_TYPE_FLOAT}};
683 j = (this_proj -> steps > 1) ? 1: 0;
684 k = (this_proj -> steps > 1) ? 0: 1;
687 GtkWidget * map_tree = gtk_tree_view_new_with_model (GTK_TREE_MODEL(
map_model));
688 for (i=0; i<3+j; i++)
690 map_cell[i] = gtk_cell_renderer_text_new ();
691 map_col[i] = gtk_tree_view_column_new_with_attributes (
ctitle[i+k], map_cell[i], ctype[i], i, NULL);
692 gtk_tree_view_append_column(GTK_TREE_VIEW(map_tree), map_col[i]);
693 gtk_tree_view_column_set_alignment (map_col[i], 0.5);
697 g_object_set (map_cell[i],
"editable", TRUE, NULL);
698 g_signal_connect (G_OBJECT(map_cell[i]),
"edited", G_CALLBACK(
edit_map_cell), GINT_TO_POINTER(this_proj ->
id));
715 if (response_id == GTK_RESPONSE_APPLY)
721 update (this_proj -> modelgl);
738 GtkWidget * win =
dialogmodal (
"Edit color map data", GTK_WINDOW(this_proj -> modelgl -> win));
739 gtk_dialog_add_button (GTK_DIALOG(win),
"Apply", GTK_RESPONSE_APPLY);
740 gtk_widget_set_size_request (win, 250, 600);
742 GtkWidget * maps =
create_scroll(NULL, -1, -1, GTK_SHADOW_NONE);
746 for (i=0; i<this_proj -> steps; i++)
748 for (j=0; j<this_proj -> natomes; j++)
755 gtk_widget_set_size_request (maps, -1, 550);
776 for (i=0; i<this_proj -> natomes*this_proj -> steps; i++)
778 if (fscanf (
fp,
"%f", &
tmp_map[i]) != 1)
780 show_error (
"Wrong file format !\n Expecting only a single column file\n"
781 " with Ns x Na lines, with:\n"
782 " - Ns = number of MD steps\n"
783 " - Na = number of atoms", 0, this_proj -> modelgl -> win);
798 for (i=0; i<this_proj -> steps; i++)
800 for (j=0; j<this_proj -> natomes; j++)
802 if (fprintf (
fp,
"%f\n", this_proj -> modelgl -> custom_map -> data[i][j]) < 0)
804 show_error (
"Error while saving custom color map", 0, this_proj -> modelgl -> win);
827 GtkFileChooser * chooser = GTK_FILE_CHOOSER((GtkFileChooserNative *)info);
840 GtkFileChooser * chooser = GTK_FILE_CHOOSER((GtkWidget *)info);
847 case GTK_RESPONSE_ACCEPT:
885 const gchar *
res[2] = {
"Open",
"Save"};
886 GtkFileChooserAction act[2] = {GTK_FILE_CHOOSER_ACTION_OPEN, GTK_FILE_CHOOSER_ACTION_SAVE};
887 gchar * title[2] = {
"Opening custom map for ",
"Saving custom map for "};
888 osmap.
a = GPOINTER_TO_INT (data);
894 str = g_strdup_printf (
"Do you want to save the color map data");
895 open_save =
ask_yes_no (
"Save color map data to file ?", str, GTK_MESSAGE_QUESTION, this_proj -> modelgl -> win);
903 str = g_strdup_printf (
"Do you want to read new color map data");
904 open_save =
ask_yes_no (
"Read color map data from file ?", str, GTK_MESSAGE_QUESTION, this_proj -> modelgl -> win);
917 GtkFileChooserNative * info;
926 GtkFileChooser * chooser = GTK_FILE_CHOOSER(info);
929 if (
osmap.
b == 1) gtk_file_chooser_set_do_overwrite_confirmation (chooser, TRUE);
932 filter1 = gtk_file_filter_new();
933 gtk_file_filter_set_name (GTK_FILE_FILTER(
filter1),
"Raw data (*.dat)");
934 gtk_file_filter_add_pattern (GTK_FILE_FILTER(
filter1),
"*.dat");
935 gtk_file_chooser_add_filter (chooser,
filter1);
936 filter2 = gtk_file_filter_new();
937 gtk_file_filter_set_name (GTK_FILE_FILTER(
filter2),
"All files (*)");
938 gtk_file_filter_add_pattern (GTK_FILE_FILTER(
filter2),
"*");
939 gtk_file_chooser_add_filter (chooser,
filter2);
961 if (response_id == GTK_RESPONSE_APPLY)
982 GtkWidget * win =
dialogmodal (
"Custom color map settings", GTK_WINDOW(this_proj -> modelgl -> win));
983 gtk_dialog_add_button (GTK_DIALOG(win),
"Apply", GTK_RESPONSE_APPLY);
985 gchar * btitle[3] = {
"Import / Save data",
"Edit data",
"Customize color map"};
1015 the_map = this_proj -> modelgl -> custom_map;
1019 i = this_proj -> modelgl -> anim -> last ->
img -> color_map[k];
1022 if (i != l && gtk_check_menu_item_get_active ((GtkCheckMenuItem *)widg))
1027 gboolean change_map = TRUE;
1028 gboolean didit = FALSE;
1029 if (j == 6 && !
the_map && ! k)
1034 else if (j == 6 && k && !
the_map)
1040 this_proj -> modelgl -> anim -> last ->
img -> color_map[k] =
NONE;
1042 gtk_check_menu_item_set_active ((GtkCheckMenuItem *)this_proj -> modelgl -> color_styles[k*
ATOM_MAPS+i], FALSE);
1044 if (widg != this_proj -> modelgl -> color_styles[j])
1046 gtk_check_menu_item_set_active ((GtkCheckMenuItem *)this_proj -> modelgl -> color_styles[j], TRUE);
1049 this_proj -> modelgl -> anim -> last ->
img -> color_map[k] = l;
1055 this_proj -> modelgl -> create_shaders[
LABEL] = TRUE;
1062 update (this_proj -> modelgl);
1067 else if (k*
ATOM_MAPS+i == j && ! gtk_check_menu_item_get_active ((GtkCheckMenuItem *)widg))
1069 gtk_check_menu_item_set_active ((GtkCheckMenuItem *)this_proj -> modelgl -> color_styles[j], TRUE);
1087GtkWidget * mapw (
glwin * view,
int m,
int mi,
int mid,
int cid, gchar * str)
1092 view -> color_styles[
v] =
gtk3_menu_item (NULL, str,
IMG_NONE, NULL, G_CALLBACK(
set_color_map), & view ->
colorp[v][0], FALSE, 0, 0, TRUE, TRUE, (cid == mid) ? TRUE : FALSE);
1093 if ((mi && (! view ->
bonding || ! view -> custom_map))
1094 || (mid == 3 && ! view -> adv_bonding[0])
1095 || (mid == 4 && ! view -> adv_bonding[1])
1100 return view -> color_styles[
v];
1104 GtkWidget * ats =
gtk3_menu_item (NULL, str,
IMG_NONE, NULL, G_CALLBACK(
set_color_map), & view ->
colorp[v][0], FALSE, 0, 0, TRUE, TRUE, (cid == mid) ? TRUE : FALSE);
1105 if ((mi && (! view ->
bonding || ! view -> custom_map))
1106 || (mid == 3 && ! view -> adv_bonding[0])
1107 || (mid == 4 && ! view -> adv_bonding[1])
1127GtkWidget *
menump (
glwin * view, gchar * ncm,
int mid,
int id,
int cid)
1130 GtkWidget * mapm = gtk_menu_new ();
1131 gtk_menu_item_set_submenu ((GtkMenuItem *)map, mapm);
1132 gtk_menu_shell_append ((GtkMenuShell *)mapm, mapw(view, mid,
id, 0, cid,
"Atomic Species"));
1134 gtk_menu_shell_append ((GtkMenuShell *)mapm, cp);
1135 GtkWidget * mapn = gtk_menu_new ();
1136 gtk_menu_item_set_submenu ((GtkMenuItem *)cp, mapn);
1137 gtk_menu_shell_append ((GtkMenuShell *)mapn, mapw(view, mid,
id, 1, cid,
"Total"));
1138 gtk_menu_shell_append ((GtkMenuShell *)mapn, mapw(view, mid,
id, 2, cid,
"Partial"));
1139 gtk_menu_shell_append ((GtkMenuShell *)mapm, mapw(view, mid,
id, 3, cid,
"Fragment(s)"));
1140 gtk_menu_shell_append ((GtkMenuShell *)mapm, mapw(view, mid,
id, 4, cid,
"Molecule(s)"));
1141 gtk_menu_shell_append ((GtkMenuShell *)mapm, mapw(view, mid,
id, 5, cid,
"Force Field (DL_POLY)"));
1144 gtk_menu_shell_append ((GtkMenuShell *)mapm, mapw(view, mid,
id, 6, cid,
"Custom"));
1148 gtk_menu_shell_append ((GtkMenuShell *)mapm, mapw(view, mid,
id, 6, cid,
"Use Atom(s) Custom Map"));
1163 GtkWidget * menum = gtk_menu_new ();
1164 gtk_menu_shell_append ((GtkMenuShell *)menum,
menump(view,
"Atoms & bonds",
id, 0, view -> anim -> last ->
img -> color_map[0]));
1165 gtk_menu_shell_append ((GtkMenuShell *)menum,
menump(view,
"Polyhedra",
id, 1, view -> anim -> last ->
img -> color_map[1]));
1182 const gchar *
color = g_variant_get_string (parameter, NULL);
1183 int lgt = strlen (
color);
1184 gchar * name = g_strdup_printf (
"%c%c",
color[lgt-2],
color[lgt-1]);
1185 if (g_strcmp0(name,
".1") == 0)
1188 name = g_strdup_printf (
"%.*s", 8,
color);
1189 if (g_strcmp0(name,
"set-amap") == 0)
1192 name = g_strdup_printf (
"%.*s.0", lgt-2,
color);
1193 g_action_group_activate_action ((GActionGroup *)view -> action_group,
"set-amap", g_variant_new_string((
const gchar *)name));
1198 name = g_strdup_printf (
"%.*s.0", lgt-2,
color);
1199 g_action_group_activate_action ((GActionGroup *)view -> action_group,
"set-pmap", g_variant_new_string((
const gchar *)name));
1206 gchar * dot = g_strdup_printf (
"%c",
color[lgt-4]);
1208 if (g_strcmp0(dot,
".") == 0)
1210 col = g_strdup_printf (
"%c",
color[lgt-3]);
1220 g_action_change_state (G_ACTION (
action), parameter);
1236 gchar * mapname[2] = {
"amap",
"pmap"};
1238 GMenu * menu = g_menu_new ();
1240 FALSE, G_CALLBACK(
change_color_radio), (gpointer)view, FALSE, (cid == 0) ? TRUE : FALSE, TRUE, TRUE);
1241 GMenu * menuf = g_menu_new ();
1243 FALSE, G_CALLBACK(
change_color_radio), (gpointer)view, FALSE, (cid == 1) ? TRUE : FALSE, TRUE, TRUE);
1245 FALSE, G_CALLBACK(
change_color_radio), (gpointer)view, FALSE, (cid == 2) ? TRUE : FALSE, TRUE, TRUE);
1247 g_object_unref (menuf);
1249 sensitive = view -> adv_bonding[0];
1251 FALSE, G_CALLBACK(
change_color_radio), (gpointer)view, FALSE, (cid == 3) ? TRUE : FALSE, TRUE, sensitive);
1252 sensitive = view -> adv_bonding[1];
1254 FALSE, G_CALLBACK(
change_color_radio), (gpointer)view, FALSE, (cid == 4) ? TRUE : FALSE, TRUE, sensitive);
1257 FALSE, G_CALLBACK(
change_color_radio), (gpointer)view, FALSE, (cid == 5) ? TRUE : FALSE, TRUE, sensitive);
1258 sensitive = (! mid) ? TRUE : (view -> custom_map) ? TRUE : FALSE;
1260 FALSE, G_CALLBACK(
change_color_radio), (gpointer)view, FALSE, (cid == 6) ? TRUE : FALSE, TRUE, sensitive);
1274 GMenu * menu = g_menu_new ();
1275 append_submenu (menu,
"Atoms & Bonds",
menump(view, popm, 0, view -> anim -> last ->
img -> color_map[0]));
integer(kind=c_int) function bonding(scf, sbf, adv, bdist, bmin, delt_ij, sfil)
int open_save(FILE *fp, int i, int pid, int aid, int npi, gchar *pfile)
open or save project file
integer(kind=c_int) function chemistry()
void label(cairo_t *cr, double val, int axe, int p, project *this_proj)
draw axis label
gchar * ctitle[MAXDATA][12]
GType col_type[MAXDATA][12]
float * duplicate_float(int num, float *old_val)
copy a list of float
float * allocfloat(int val)
allocate a float * pointer
double string_to_double(gpointer string)
convert string to double
Global variable declarations Global convenience function declarations Global data structure defin...
void run_this_gtk_dialog(GtkWidget *dial, GCallback handler, gpointer data)
run a GTK (3 and 4) basic GtkDialog
void file_chooser_set_current_folder(GtkFileChooser *chooser)
set current folder in a GtkFilechooser
GtkWidget * create_entry(GCallback handler, int dim, int cdim, gboolean key_release, gpointer data)
Create a GtkEntry.
void update_entry_double(GtkEntry *entry, double doubleval)
update the content of a GtkEntry as double
GtkWidget * create_scroll(GtkWidget *box, int dimx, int dimy, int shadow)
create a scroll window
GtkWidget * dialogmodal(gchar *str, GtkWindow *parent)
Create a new dialog modal window.
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)
gchar * file_chooser_get_file_name(GtkFileChooser *chooser)
get a file name from a GtkFileChooser (single file selected)
const gchar * entry_get_text(GtkEntry *entry)
get the text in a GtkEntry
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
GtkWidget * spin_button(GCallback handler, double value, double start, double end, double step, int digits, int dim, gpointer data)
create a spin button
GtkWidget * create_button(gchar *text, int image_format, gchar *image, int dimx, int dimy, int relief, GCallback handler, gpointer data)
create a simple button
GtkWidget * dialog_get_content_area(GtkWidget *widg)
prepare GtkWidget to insert content in a GtkDialog window
GtkWidget * markup_label(gchar *text, int dimx, int dimy, float ax, float ay)
void add_box_child_start(int orientation, GtkWidget *widg, GtkWidget *child, gboolean expand, gboolean fill, int padding)
Add a GtkWidget in a GtkBox at the initial position.
ColRGBA get_button_color(GtkColorChooser *colob)
get the ColRGBA color from a GtkColorChooser button
void widget_set_sensitive(GtkWidget *widg, gboolean sensitive)
Set sensitivity for a GtkWidget, ensuring it is a GtkWidget.
void destroy_this_dialog(GtkDialog *dialog)
destroy a GtkDialog
GtkWidget * create_hbox(int spacing)
create a GtkBox with horizontal orientation
GtkWidget * create_menu_item(gboolean add_mnemo, gchar *action)
GtkWidget * destroy_this_widget(GtkWidget *widg)
destroy a GtkWidget
GtkWidget * color_button(ColRGBA col, gboolean alpha, int dimx, int dimy, GCallback handler, gpointer data)
create a color selection button
void provide_gtk_css(gchar *css)
create a css provider based on the css data
gchar * prepare_for_title(gchar *init)
prepare a string for a window title, getting rid of all markup
void add_container_child(int type, GtkWidget *widg, GtkWidget *child)
Add a GtkWidget into another GtkWidget.
GtkWidget * create_vbox(int spacing)
create a GtkBox with vertical orientation
ColRGBA * duplicate_color(int num, ColRGBA *col)
duplicate a ColRGBA pointer
GtkWidget * create_file_chooser(const gchar *title, GtkWindow *parent, GtkFileChooserAction act, const gchar *act_name)
create a GtkFileChooser, utility to select file(s)
void destroy_this_native_dialog(GtkNativeDialog *dialog)
destroy a GtkNativeDialog
void show_the_widgets(GtkWidget *widg)
show GtkWidget
project * get_project_by_id(int p)
get project pointer using id number
void update(glwin *view)
update the rendering of the OpenGL window
Variable declarations related to the OpenGL window Function declarations related to the OpenGL wind...
void re_create_md_shaders(int nshaders, int shaders[nshaders], project *this_proj)
re-initialize some MD dependent OpenGL shaders
shaders
The different types of shaders in the atomes program.
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)
void show_error(char *error, int val, GtkWidget *win)
show error message
gboolean ask_yes_no(gchar *title, gchar *text, int type, GtkWidget *widg)
ask yes or no for something: prepare dialog
Messaging function declarations.
GtkWidget * create_map_buttons()
create custom color map position and color buttons
GtkWidget * create_css_color_bar(colormap *map)
create the custom color map visualization widget
G_MODULE_EXPORT void edit_data_map(GtkWidget *but, gpointer data)
edit color map - creating the dialog
gboolean use_custom_color_map(int p)
use custom color map - creating the dialog
G_MODULE_EXPORT void update_cmin_max(GtkEntry *res, gpointer data)
update color map min / max
G_MODULE_EXPORT void open_save_data_map(GtkWidget *but, gpointer data)
open / save color map data - creating the dialog
GMenu * menump(glwin *view, int popm, int mid, int cid)
create the 'Color Scheme(s) - > *' submenus - GTK4
G_MODULE_EXPORT void add_map_points(GtkSpinButton *res, gpointer data)
add point to the custom color map
G_MODULE_EXPORT void set_point_position(GtkSpinButton *res, gpointer data)
update color map point position
void fill_map_model(GtkTreeStore *store, project *this_proj)
fill color map tree strore
G_MODULE_EXPORT void change_color_radio(GSimpleAction *action, GVariant *parameter, gpointer data)
change color map callback - GTK4
G_MODULE_EXPORT void edit_map_cell(GtkCellRendererText *cell, gchar *path_string, gchar *new_text, gpointer data)
render color map tree store cell
gboolean setup_custom_color_map(float *data, project *this_proj, gboolean init)
prepare the custom color map data
G_MODULE_EXPORT void custom_mize_map(GtkWidget *but, gpointer data)
customize the color map - creating the dialog
G_MODULE_EXPORT void run_edit_data_map(GtkDialog *win, gint response_id, gpointer data)
edit color map - running the dialog
GMenu * menu_map(glwin *view, int popm)
create the 'OpenGL -> Color Scheme(s)' submenu - GTK4
void init_map_range(colormap *map, int pts)
initialize custom color map
G_MODULE_EXPORT void set_color_map(GtkWidget *widg, gpointer data)
set color map callback
void update_color_map()
update color map visualization widget
colormap * allocate_color_map(int pts, project *this_proj)
allocate custom color map data
gboolean open_save_map(FILE *fp, int act, project *this_proj)
open or save a custom color map to file
GtkWidget * create_map_tree(project *this_proj)
create color map tree view
G_MODULE_EXPORT void run_custom_mize_map(GtkDialog *win, gint response_id, gpointer data)
customize the color map - running the dialog
G_MODULE_EXPORT void run_use_color_map(GtkDialog *win, gint response_id, gpointer data)
use custom color map - running the dialog
G_MODULE_EXPORT void set_point_color(GtkColorChooser *colob, gpointer data)
select color map point color
G_MODULE_EXPORT void run_open_save_data_map(GtkDialog *info, gint response_id, gpointer data)
open / save color map data - running the dialog GTK3
Function declarations for reading atomes project file Function declarations for saving atomes proje...