66G_MODULE_EXPORT
void run_window_color (GtkDialog * win, gint response_id, gpointer data)
70 if (response_id == GTK_RESPONSE_OK)
75 this_proj -> modelgl -> anim -> last ->
img -> backcolor = colo;
76 this_proj -> modelgl -> create_shaders[
MEASU] = TRUE;
80 this_proj -> modelgl -> anim -> last ->
img -> box_color = colo;
81 this_proj -> modelgl -> create_shaders[
MDBOX] = TRUE;
85 this_proj -> modelgl -> anim -> last ->
img -> at_color[
wc_cid] = colo;
88 int shader[1] = {
POLYS};
89 if (this_proj -> modelgl -> anim -> last ->
img -> color_map[1] == 0)
re_create_md_shaders (1, shader, this_proj);
91 update (this_proj -> modelgl);
111 str = g_strdup_printf (
"Background color");
116 str = g_strdup_printf (
"Model box color");
121 if (wc_cid < this_proj -> nspec)
127 str = g_strdup_printf (
"%s* - clone(s) color", this_proj ->
chemistry ->
label[
wc_cid-this_proj -> nspec]);
131 GtkWidget * win = gtk_color_chooser_dialog_new (str, GTK_WINDOW(view -> win));
132 gtk_window_set_modal (GTK_WINDOW(win), TRUE);
133 gtk_color_chooser_set_use_alpha (GTK_COLOR_CHOOSER(win), TRUE);
134 gtk_color_chooser_set_rgba (GTK_COLOR_CHOOSER(win), &
col);
192 view -> create_shaders[
MDBOX] = TRUE;
225 this_proj -> modelgl -> create_shaders[
LABEL] = TRUE;
226 update (this_proj -> modelgl);
246 if (response_id == GTK_RESPONSE_OK)
249 this_proj -> modelgl -> anim -> last ->
img -> spcolor[g][s][
c] =
get_window_color (GTK_WIDGET(win));
252 update (this_proj -> modelgl);
287 g_debug (
"s= %d, c= %d, g= %d", s,
c, g);
291 str = g_strdup_printf (
"%s atom(s) %d fold coordination sphere color", this_proj ->
chemistry ->
label[s],
292 this_proj -> coord -> geolist[0][s][
c]);
295 str = g_strdup_printf (
"%s - %s coordination sphere color", this_proj ->
chemistry ->
label[s],
299 str = g_strdup_printf (
"Fragment N°%d color",
c);
304 str = g_strdup_printf (
"Molecule N°%d color",
c);
309 str = g_strdup_printf (
"%d atom chain(s) color", this_proj -> coord -> geolist[g][0][
c]);
313 str = g_strdup_printf (
"%s - %d atom ring(s) color",
rings_type[s], this_proj -> coord -> geolist[g][0][
c]);
317 GtkWidget * win = gtk_color_chooser_dialog_new (str, GTK_WINDOW(this_proj -> modelgl -> win));
320 gtk_color_chooser_set_use_alpha (GTK_COLOR_CHOOSER(win), TRUE);
321 gtk_window_set_modal ((GtkWindow *)win, TRUE);
integer(kind=c_int) function chemistry()
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
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 set_color_chooser_color(GtkWidget *color_win, ColRGBA col)
set the color of a color selection window
ColRGBA get_window_color(GtkWidget *color_win)
get the ColRGBA color from a color selection window
GdkRGBA colrgba_togtkrgba(ColRGBA col)
convert ColRGBA color to GdkRGBA color
void destroy_this_dialog(GtkDialog *dialog)
destroy a GtkDialog
gchar * prepare_for_title(gchar *init)
prepare a string for a window title, getting rid of all markup
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.
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.
Function declarations for reading atomes project file Function declarations for saving atomes proje...
G_MODULE_EXPORT void to_run_back_color_window(GtkWidget *widg, gpointer data)
to run background color selection window callback GTK3
G_MODULE_EXPORT void to_run_box_color_window(GtkWidget *widg, gpointer data)
to run box color selection window callback GTK3
G_MODULE_EXPORT void window_color_coord(GtkWidget *widg, gpointer data)
create a window to select a color callback GTK3
G_MODULE_EXPORT void run_window_color(GtkDialog *win, gint response_id, gpointer data)
window color chooser - running the dialog
G_MODULE_EXPORT void run_window_color_coord(GtkDialog *win, gint response_id, gpointer data)
window to select a color - running the dialog
G_MODULE_EXPORT void to_run_atom_color_window(GtkWidget *widg, gpointer data)
to run atom color selection window callback GTK3
void window_color(project *this_proj, glwin *view, int wc_cid)
window color chooser - creating the dialog