72G_MODULE_EXPORT
void run_window_color (GtkDialog * win, gint response_id, gpointer data)
76 if (response_id == GTK_RESPONSE_OK)
81 this_proj -> modelgl -> anim -> last ->
img -> backcolor = colo;
82 this_proj -> modelgl -> create_shaders[
MEASU] = TRUE;
86 this_proj -> modelgl -> anim -> last ->
img -> box_color = colo;
87 this_proj -> modelgl -> create_shaders[
MDBOX] = TRUE;
91 this_proj -> modelgl -> anim -> last ->
img -> at_color[
wc_cid] = colo;
94 int shader[1] = {
POLYS};
95 if (this_proj -> modelgl -> anim -> last ->
img -> color_map[1] == 0)
re_create_md_shaders (1, shader, this_proj);
97 update (this_proj -> modelgl);
116 str = g_strdup_printf (
"Background color");
121 str = g_strdup_printf (
"Model box color");
126 if (wc_cid < this_proj -> nspec)
132 str = g_strdup_printf (
"%s* - clone(s) color", this_proj ->
chemistry ->
label[
wc_cid-this_proj -> nspec]);
136 GtkWidget * win = gtk_color_chooser_dialog_new (str, GTK_WINDOW(view -> win));
137 gtk_window_set_modal (GTK_WINDOW(win), TRUE);
138 gtk_color_chooser_set_use_alpha (GTK_COLOR_CHOOSER(win), TRUE);
139 gtk_color_chooser_set_rgba (GTK_COLOR_CHOOSER(win), &
col);
199 view -> create_shaders[
MDBOX] = TRUE;
233 this_proj -> modelgl -> create_shaders[
LABEL] = TRUE;
234 update (this_proj -> modelgl);
254 if (response_id == GTK_RESPONSE_OK)
257 this_proj -> modelgl -> anim -> last ->
img -> spcolor[g][s][
c] =
get_window_color (GTK_WIDGET(win));
260 update (this_proj -> modelgl);
295 g_debug (
"s= %d, c= %d, g= %d", s,
c, g);
299 str = g_strdup_printf (
"%s atom(s) %d fold coordination sphere color", this_proj ->
chemistry ->
label[s],
300 this_proj -> coord -> geolist[0][s][
c]);
303 str = g_strdup_printf (
"%s - %s coordination sphere color", this_proj ->
chemistry ->
label[s],
307 str = g_strdup_printf (
"Fragment N°%d color",
c);
312 str = g_strdup_printf (
"Molecule N°%d color",
c);
317 str = g_strdup_printf (
"%d atom chain(s) color", this_proj -> coord -> geolist[g][0][
c]);
321 str = g_strdup_printf (
"%s - %d atom ring(s) color",
rings_type[s], this_proj -> coord -> geolist[g][0][
c]);
325 GtkWidget * win = gtk_color_chooser_dialog_new (str, GTK_WINDOW(this_proj -> modelgl -> win));
328 gtk_color_chooser_set_use_alpha (GTK_COLOR_CHOOSER(win), TRUE);
329 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
void window_color(project *this_proj, glwin *view)
window color chooser - creating 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