atomes 1.1.15
atomes: an atomic scale modeling tool box
Loading...
Searching...
No Matches
cbuild_info.c
Go to the documentation of this file.
1/* This file is part of the 'atomes' software
2
3'atomes' is free software: you can redistribute it and/or modify it under the terms
4of the GNU Affero General Public License as published by the Free Software Foundation,
5either version 3 of the License, or (at your option) any later version.
6
7'atomes' is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
8without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
9See the GNU General Public License for more details.
10
11You should have received a copy of the GNU Affero General Public License along with 'atomes'.
12If not, see <https://www.gnu.org/licenses/>
13
14Copyright (C) 2022-2024 by CNRS and University of Strasbourg */
15
22/*
23* This file: 'cbuild_info.c'
24*
25* Contains:
26*
27
28 - The functions to create the space group information dialog
29
30*
31* List of functions:
32
33 gchar * get_bravais (int spg);
34 gchar * get_frac (float val);
35
36 void get_wyck_char (float val, int ax, int bx);
37 void get_extra_val (float val, int ax);
38 void get_wyck_names (space_group * spg, int i, int j);
39 void set_wisible (GtkTreeViewColumn * col, GtkCellRenderer * renderer, GtkTreeModel * mod, GtkTreeIter * iter, gpointer data);
40
41 static void fill_wyckoff_model (GtkTreeStore * store, space_group * spg);
42
43 G_MODULE_EXPORT void set_so_info (GtkComboBox * box, gpointer data);
44 G_MODULE_EXPORT void show_sg_info (GtkWidget * but, gpointer data);
45
46 GtkWidget * create_wyckoff_tree (space_group * spg);
47 GtkWidget * create_setting_info (space_group * spg, int sid);
48 GtkWidget * create_wyck_pts_info (space_group * spg, int sid);
49
50*/
51
52#include "global.h"
53#include "interface.h"
54#include "glview.h"
55#include "cbuild_edit.h"
56
57extern int get_crystal_id (int spg);
58extern int get_bravais_img_id (int spg);
59extern gchar * frac_string (gchar * init);
60extern gchar * get_num_string (gchar * str);
61extern gchar * get_so_string (space_group * spg, int id);
62extern GtkTreeModel * so_combo_tree (space_group * spg);
63
64extern gchar * tmp_pos;
65extern gchar * latt_info[7];
66
67GtkWidget * info_hsbox;
68GtkWidget * info_vs;
69GtkWidget * wypts_vbox;
70GtkWidget * info_wyck_pts;
71GtkWidget * info_wyck_scroll;
72GtkWidget * info_wyck_tree;
73
74gchar * wnpos[3] = {NULL, NULL, NULL};
75
83gchar * get_bravais (int spg)
84{
85 if (groups[spg-1][0] == 'A' || groups[spg-1][0] == 'C')
86 {
87 return "Base-centered";
88 }
89 else if (groups[spg-1][0] == 'F')
90 {
91 return "Face-centered";
92 }
93 else if (groups[spg-1][0] == 'I')
94 {
95 return "Body-centered";
96 }
97 else if (groups[spg-1][0] == 'P')
98 {
99 return "Primitive";
100 }
101 else if (groups[spg-1][0] == 'R')
102 {
103 return "Rhombohedral";
104 }
105 else
106 {
107 return NULL;
108 }
109}
110
118gchar * get_frac (float val)
119{
120 float vallist[12] = {1.0, 1.0/2.0, 1.0/4.0, 3.0/4.0, 1.0/8.0, 3.0/8.0, 5.0/8.0, 7.0/8.0, 1.0/3.0, 2.0/3.0, 1.0/6.0, 5.0/6.0};
121 gchar * charlist[12] = {"1", "1/2", "1/4", "3/4", "1/8", "3/8", "5/8", "7/8", "1/3", "2/3", "1/6", "5/6"};
122 int i;
123 for (i=0; i<12; i++)
124 {
125 if (fabs(val) - vallist[i] == 0.0) return g_strdup_printf ("%s", charlist[i]);
126 }
127 return NULL;
128}
129
139void get_wyck_char (float val, int ax, int bx)
140{
141 if (wnpos[ax])
142 {
143 if (fabs(val) == 1.0)
144 {
145 if (val > 0.0)
146 {
147 wnpos[ax] = g_strdup_printf ("%s+%s", wnpos[ax], vect_comp[bx]);
148 }
149 else
150 {
151 wnpos[ax] = g_strdup_printf ("%s-%s", wnpos[ax], vect_comp[bx]);
152 }
153 }
154 else if (val != 0.0)
155 {
156 if (val > 0.0)
157 {
158 wnpos[ax] = g_strdup_printf ("%s+%s%s", wnpos[ax], get_frac(val), vect_comp[bx]);
159 }
160 else
161 {
162 wnpos[ax] = g_strdup_printf ("%s-%s%s", wnpos[ax], get_frac(val), vect_comp[bx]);
163 }
164 }
165 }
166 else
167 {
168 if (fabs(val) == 1.0)
169 {
170 if (val > 0.0)
171 {
172 wnpos[ax] = g_strdup_printf ("%s", vect_comp[bx]);
173 }
174 else
175 {
176 wnpos[ax] = g_strdup_printf ("-%s", vect_comp[bx]);
177 }
178 }
179 else if (val != 0.0)
180 {
181 if (val > 0.0)
182 {
183 wnpos[ax] = g_strdup_printf ("%s%s", get_frac(val), vect_comp[bx]);
184 }
185 else
186 {
187 wnpos[ax] = g_strdup_printf ("-%s%s", get_frac(val), vect_comp[bx]);
188 }
189 }
190 }
191}
192
201void get_extra_val (float val, int ax)
202{
203 if (val)
204 {
205 if (wnpos[ax])
206 {
207 if (val > 0.0)
208 {
209 wnpos[ax] = g_strdup_printf ("%s+%s", wnpos[ax], get_frac(val));
210 }
211 else
212 {
213 wnpos[ax] = g_strdup_printf ("%s-%s", wnpos[ax], get_frac(val));
214 }
215 }
216 else
217 {
218 float v = (val > 0.0) ? val : 1.0 + val;
219 v = (v == 1.0) ? 0.0 : v;
220 if (v != 0.0) wnpos[ax] = g_strdup_printf ("%s", get_frac(v));
221 }
222 }
223}
224
234void get_wyck_names (space_group * spg, int i, int j)
235{
236 int k, l;
237 double spgpos[3][4];
238 mat4_t wpos;
239 for (k=0; k<3; k++)
240 {
241 tmp_pos = g_strdup_printf ("%s", spg -> wyckoff[i].pos[j][k]);
242 for (l=0; l<3; l++)
243 {
244 spgpos[k][l] = get_val_from_wyckoff (vect_comp[l], spg -> wyckoff[i].pos[j][k]);
245 }
246
247 if (tmp_pos)
248 {
249 spgpos[k][3] = get_value_from_pos (tmp_pos);
250 g_free (tmp_pos);
251 tmp_pos = NULL;
252 }
253 else
254 {
255 spgpos[k][3] = 0.0;
256 }
257 }
258 wpos = mat4 (spgpos[0][0], spgpos[0][1], spgpos[0][2], spgpos[0][3],
259 spgpos[1][0], spgpos[1][1], spgpos[1][2], spgpos[1][3],
260 spgpos[2][0], spgpos[2][1], spgpos[2][2], spgpos[2][3],
261 0.0, 0.0, 0.0, 1.0);
262 if (i == spg -> numw - 1) m4_print (wpos);
263 wpos = m43_mul(spg -> wyck_origin, wpos);
264 for (k=0; k<3; k++)
265 {
266 if (wnpos[k])
267 {
268 g_free (wnpos[k]);
269 wnpos[k] = NULL;
270 }
271 }
272
273 get_wyck_char (wpos.m00, 0, 0);
274 get_wyck_char (wpos.m10, 0, 1);
275 get_wyck_char (wpos.m20, 0, 2);
276 get_extra_val (wpos.m30, 0);
277
278 get_wyck_char (wpos.m01, 1, 0);
279 get_wyck_char (wpos.m11, 1, 1);
280 get_wyck_char (wpos.m21, 1, 2);
281 get_extra_val (wpos.m31, 1);
282
283 get_wyck_char (wpos.m02, 2, 0);
284 get_wyck_char (wpos.m12, 2, 1);
285 get_wyck_char (wpos.m22, 2, 2);
286 get_extra_val (wpos.m32, 2);
287
288 for (k=0; k<3; k++) if (! wnpos[k]) wnpos[k] = g_strdup_printf ("0");
289}
290
299static void fill_wyckoff_model (GtkTreeStore * store, space_group * spg)
300{
301 GtkTreeIter wlevel;
302 GtkTreeIter mlevel;
303 int i, j, k;
304 gchar * str;
305 gchar * strw[3];
306 if (spg)
307 {
308 for (i=0; i<spg -> numw; i++)
309 {
310 gtk_tree_store_append (store, & wlevel, NULL);
311 str = g_strdup_printf ("%d", spg -> wyckoff[i].multi);
312 gtk_tree_store_set (store, & wlevel, 0, 1,
313 1, i+1,
314 2, str,
315 3, spg -> wyckoff[i].let,
316 4, spg -> wyckoff[i].site, -1);
317 g_free (str);
318 for (j=0; j<spg -> wyckoff[i].multi; j++)
319 {
320 get_wyck_names (spg, i, j);
321 gtk_tree_store_append (store, & mlevel, & wlevel);
322 for (k= 0; k<3; k++) strw[k] = frac_string (wnpos[k]);
323 str = g_strdup_printf ("(%s,%s,%s)", strw[0], strw[1], strw[2]);
324 for (k= 0; k<3; k++) g_free (strw[k]);
325 gtk_tree_store_set (store, & mlevel, 0, 0, 5, str, -1);
326 g_free (str);
327 }
328 }
329 }
330}
331
343void set_wisible (GtkTreeViewColumn * col, GtkCellRenderer * renderer, GtkTreeModel * mod, GtkTreeIter * iter, gpointer data)
344{
345 int i, j;
346 i = GPOINTER_TO_INT(data);
347 gtk_tree_model_get (mod, iter, 0, & j, -1);
348 if ((j && (i > 1 && i < 5)) || (!j && i==5))
349 {
350 gchar * str = NULL;
351 gtk_tree_model_get (mod, iter, i, & str, -1);
352 g_object_set (renderer, "markup", str, NULL, NULL);
353 g_free (str);
354 }
355 gtk_cell_renderer_set_visible (renderer, (i<5) ? j : ! j);
356}
357
366{
367 int i;
368 GtkTreeViewColumn * wcol[6];
369 GtkCellRenderer * wcell[6];
370 gchar * witle[6] = {" ", "Id.", "Multiplicity", "Letter", "Symmetry", "Coordinates"};
371 gchar * wtype[6]={"text", "text", "text", "text", "text", "text"};
372 GType w_type[6] = {G_TYPE_INT, G_TYPE_INT, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING};
373 GtkTreeStore * wmodel = gtk_tree_store_newv (6, w_type);
374 GtkWidget * wtree = gtk_tree_view_new_with_model(GTK_TREE_MODEL(wmodel));
375 for (i=0; i<6; i++)
376 {
377 wcell[i] = gtk_cell_renderer_text_new();
378 wcol[i] = gtk_tree_view_column_new_with_attributes(witle[i], wcell[i], wtype[i], i, NULL);
379 gtk_tree_view_append_column(GTK_TREE_VIEW(wtree), wcol[i]);
380 gtk_tree_view_column_set_cell_data_func (wcol[i], wcell[i], set_wisible, GINT_TO_POINTER(i), NULL);
381 if (!i) gtk_tree_view_column_set_visible (wcol[i], FALSE);
382 }
383 fill_wyckoff_model (wmodel, spg);
384 g_object_unref (wmodel);
385 return wtree;
386}
387
396GtkWidget * create_setting_info (space_group * spg, int sid)
397{
398 gchar * sxyz[3];
399 int i;
400 for (i=0; i<3; i++)
401 {
402 sxyz[i] = g_strdup_printf ("%s", spg -> settings[sid].pos[i]);
403 sxyz[i] = frac_string (sxyz[i]);
404 }
405 gchar * str = g_strdup_printf ("<b>(%s,%s,%s)</b>", sxyz[0], sxyz[1], sxyz[2]);
406 for (i=0; i<3; i++) g_free (sxyz[i]);
407
408 GtkWidget * label = markup_label(str, 90, -1, 0.0, 0.5);
409 g_free (str);
410 return label;
411}
412
421GtkWidget * create_wyck_pts_info (space_group * spg, int sid)
422{
423 int i, j;
424 gchar * str;
425 gchar * sxyz[3];
426 if (spg -> settings[sid].nump > 1)
427 {
428 for (i=0; i<spg -> settings[sid].nump; i++)
429 {
430 for (j=0; j<3; j++)
431 {
432 sxyz[j] = g_strdup_printf ("%s", spg -> settings[sid].points[i][j]);
433 sxyz[j] = frac_string (sxyz[j]);
434 }
435 if (! i)
436 {
437 str = g_strdup_printf ("<b>+(%s,%s,%s)</b>", sxyz[0], sxyz[1], sxyz[2]);
438 }
439 else
440 {
441 str = g_strdup_printf ("%s\t<b>+(%s,%s,%s)</b>", str, sxyz[0], sxyz[1], sxyz[2]);
442 }
443 for (j=0; j<3; j++) g_free (sxyz[j]);
444 }
445
446 return markup_label(str, -1, -1, 0.5, 0.5);
447 }
448 else
449 {
450 return NULL;
451 }
452}
453
462G_MODULE_EXPORT void set_so_info (GtkComboBox * box, gpointer data)
463{
464 builder_edition * cbuilder = (builder_edition *)data;
465 int i = gtk_combo_box_get_active (box);
466 gtk_combo_box_set_active (GTK_COMBO_BOX(cbuilder -> so_combo), i);
467 if (i > -1)
468 {
470 info_vs = create_setting_info (cbuilder -> cell.sp_group, i);
471 add_box_child_start (GTK_ORIENTATION_HORIZONTAL, info_hsbox, info_vs, FALSE, FALSE, 5);
474 info_wyck_pts = create_wyck_pts_info (cbuilder -> cell.sp_group, i);
475 if (info_wyck_pts)
476 {
477 add_box_child_start (GTK_ORIENTATION_VERTICAL, wypts_vbox, info_wyck_pts, FALSE, FALSE, 0);
479 }
481 {
483 info_wyck_tree = create_wyckoff_tree (cbuilder -> cell.sp_group);
486 }
487 }
488}
489
498G_MODULE_EXPORT void show_sg_info (GtkWidget * but, gpointer data)
499{
500 tint * id = (tint *) data;
501 space_group * spg = get_project_by_id(id -> a) -> modelgl -> builder_win -> cell.sp_group;
502 gchar * str = g_strdup_printf ("%s info", groups[spg -> id-1]);
503 str = substitute_string (str, "<sub>", NULL);
504 str = substitute_string (str, "</sub>", NULL);
505 GtkWidget * info = dialogmodal (str, GTK_WINDOW(get_project_by_id(id -> a) -> modelgl -> builder_win -> win));
506 GtkWidget * vbox, * hbox;
508 GtkWidget * ivbox[2];
509 GtkWidget * ihbox = create_hbox (0);
510 add_box_child_start (GTK_ORIENTATION_VERTICAL, vbox, ihbox, FALSE, FALSE, 0);
511 int xsize = 150;
512 int i;
513 for (i=0; i<2; i++)
514 {
515 ivbox[i] = create_vbox(i);
516 add_box_child_start (GTK_ORIENTATION_HORIZONTAL, ihbox, ivbox[i], FALSE, FALSE, 0);
517 }
518
519 hbox = create_hbox (0);
520 add_box_child_start (GTK_ORIENTATION_HORIZONTAL, hbox, markup_label("Space group: ", xsize, -1, 0.0, 0.5), FALSE, FALSE, 5);
521 str = g_strdup_printf ("<b>%s</b>", groups[spg -> id-1]);
522 add_box_child_start (GTK_ORIENTATION_HORIZONTAL, hbox, markup_label(str, 100, -1, 0.0, 0.5), FALSE, FALSE, 5);
523 g_free (str);
524 add_box_child_start (GTK_ORIENTATION_VERTICAL, ivbox[0], hbox, FALSE, FALSE, 5);
525
526 hbox = create_hbox (0);
527 add_box_child_start (GTK_ORIENTATION_HORIZONTAL, hbox, markup_label("Number: ", xsize, -1, 0.0, 0.5), FALSE, FALSE, 5);
528 str = g_strdup_printf ("<b>%d</b>", spg -> id);
529 add_box_child_start (GTK_ORIENTATION_HORIZONTAL, hbox, markup_label(str, 100, -1, 0.0, 0.5), FALSE, FALSE, 5);
530 g_free (str);
531 add_box_child_start (GTK_ORIENTATION_VERTICAL, ivbox[0], hbox, FALSE, FALSE, 5);
532 hbox = create_hbox (0);
533 add_box_child_start (GTK_ORIENTATION_HORIZONTAL, hbox, markup_label("Hermman-Mauguin: ", xsize, -1, 0.0, 0.5), FALSE, FALSE, 5);
534 str = g_strdup_printf ("%s", spg -> hms);
535 str = g_strdup_printf ("<b>%s</b>", get_num_string(str));
536 add_box_child_start (GTK_ORIENTATION_HORIZONTAL, hbox, markup_label(str, 100, -1, 0.0, 0.5), FALSE, FALSE, 5);
537 g_free (str);
538 add_box_child_start (GTK_ORIENTATION_VERTICAL, ivbox[0], hbox, FALSE, FALSE, 5);
539
540 hbox = create_hbox (0);
541 add_box_child_start (GTK_ORIENTATION_HORIZONTAL, hbox, markup_label("Crystal system: ", xsize, -1, 0.0, 0.5), FALSE, FALSE, 5);
542 str = g_strdup_printf ("<b>%s</b>", spg -> bravais);
543 add_box_child_start (GTK_ORIENTATION_HORIZONTAL, hbox, markup_label(str, 100, -1, 0.0, 0.5), FALSE, FALSE, 5);
544 g_free (str);
545 add_box_child_start (GTK_ORIENTATION_VERTICAL, ivbox[0], hbox, FALSE, FALSE, 5);
546
547 str = get_bravais(spg -> id);
548 if (str)
549 {
550 hbox = create_hbox (0);
551 add_box_child_start (GTK_ORIENTATION_HORIZONTAL, hbox, markup_label("Bravais lattice: ", xsize, -1, 0.0, 0.5), FALSE, FALSE, 5);
552 str = g_strdup_printf ("<b>%s</b>", str);
553 add_box_child_start (GTK_ORIENTATION_HORIZONTAL, hbox, markup_label(str, 100, -1, 0.0, 0.5), FALSE, FALSE, 5);
554 g_free (str);
555 add_box_child_start (GTK_ORIENTATION_VERTICAL, ivbox[0], hbox, FALSE, FALSE, 5);
556 }
557
558 hbox = create_hbox (0);
559 add_box_child_start (GTK_ORIENTATION_HORIZONTAL, hbox, markup_label("Lattice constraints: ", xsize, -1, 0.0, 0.5), FALSE, FALSE, 5);
560 str = g_strdup_printf ("<b>%s</b>", latt_info[get_crystal_id (spg -> id)]);
561 add_box_child_start (GTK_ORIENTATION_HORIZONTAL, hbox, markup_label(str, 150, -1, 0.0, 0.5), FALSE, FALSE, 5);
562 g_free (str);
563 add_box_child_start (GTK_ORIENTATION_VERTICAL, ivbox[0], hbox, FALSE, FALSE, 5);
564
565 GtkWidget * bvimg = gtk_image_new_from_file (bravais_img[get_bravais_img_id(spg -> id)]);
566#ifdef GTK4
567 gtk_widget_set_size_request (bvimg, 200, 200);
568 gtk_widget_set_hexpand (bvimg, TRUE);
569 gtk_widget_set_vexpand (bvimg, TRUE);
570#endif
571 add_box_child_start (GTK_ORIENTATION_VERTICAL, ivbox[1], bvimg, FALSE, FALSE, 5);
572
574 add_box_child_start (GTK_ORIENTATION_VERTICAL, vbox, info_hsbox, FALSE, FALSE, 5);
575 add_box_child_start (GTK_ORIENTATION_HORIZONTAL, info_hsbox, markup_label("Setting(s): ", xsize, -1, 0.0, 0.5), FALSE, FALSE, 5);
576 if (spg -> nums > 1)
577 {
578 GtkTreeModel * model = so_combo_tree (spg);
579 GtkWidget * sbox = gtk_combo_box_new_with_model (model);
580 g_object_unref (model);
581 GtkCellRenderer * renderer = gtk_cell_renderer_combo_new ();
582 gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (sbox), renderer, TRUE);
583 gtk_cell_layout_set_attributes (GTK_CELL_LAYOUT (sbox), renderer, "text", 0, NULL);
584 gtk_widget_set_size_request (sbox, 150, 25);
585 add_box_child_start (GTK_ORIENTATION_HORIZONTAL, info_hsbox, sbox, FALSE, FALSE, 5);
586 gtk_combo_box_set_active (GTK_COMBO_BOX(sbox), 0);
587 g_signal_connect (G_OBJECT(sbox), "changed", G_CALLBACK(set_so_info), get_project_by_id(id -> a) -> modelgl -> builder_win);
588 GList * cell_list = gtk_cell_layout_get_cells(GTK_CELL_LAYOUT(sbox));
589 if (cell_list && cell_list -> data)
590 {
591 gtk_cell_layout_set_attributes(GTK_CELL_LAYOUT(sbox), cell_list -> data, "markup", 0, NULL);
592 }
593 }
594 else
595 {
596 add_box_child_start (GTK_ORIENTATION_HORIZONTAL, info_hsbox, markup_label(get_so_string (spg, 0), 50, -1, 0.0, 0.5), FALSE, FALSE, 5);
597 }
598
599 info_vs = create_setting_info (spg, 0);
600 add_box_child_start (GTK_ORIENTATION_HORIZONTAL, info_hsbox, info_vs, FALSE, FALSE, 0);
601
602 hbox = create_hbox (0);
603 add_box_child_start (GTK_ORIENTATION_HORIZONTAL, hbox, markup_label("Wyckoff position(s): ", xsize, -1, 0.0, 0.5), FALSE, FALSE, 5);
604 add_box_child_start (GTK_ORIENTATION_VERTICAL, vbox, hbox, FALSE, FALSE, 5);
606 add_box_child_start (GTK_ORIENTATION_VERTICAL, vbox, wypts_vbox, FALSE, FALSE, 5);
608 if (info_wyck_pts) add_box_child_start (GTK_ORIENTATION_VERTICAL, wypts_vbox, info_wyck_pts, FALSE, FALSE, 0);
609 info_wyck_scroll = create_scroll (NULL, 400, 200, GTK_SHADOW_NONE);
612 add_box_child_start (GTK_ORIENTATION_VERTICAL, vbox, info_wyck_scroll, FALSE, FALSE, 5);
613
614 show_the_widgets (info);
615 run_this_gtk_dialog (info, G_CALLBACK(run_destroy_dialog), NULL);
616}
gchar * substitute_string(gchar *init, gchar *o_motif, gchar *n_motif)
substitute all patterns in string
Definition w_library.c:372
double get_val_from_wyckoff(gchar *pos, gchar *wval)
get point value from wyckoff position
double get_value_from_pos(gchar *pos)
get position double value from string description
GtkWidget * builder_win(project *this_proj, gpointer data)
create crystal builder window
Function declarations for the crystal builder.
gchar * groups[230]
Definition cbuild_sg.c:43
void get_extra_val(float val, int ax)
convert wyckoff extra value to string
GtkWidget * wypts_vbox
Definition cbuild_info.c:69
G_MODULE_EXPORT void set_so_info(GtkComboBox *box, gpointer data)
change space group origin
GtkWidget * info_wyck_pts
Definition cbuild_info.c:70
gchar * get_num_string(gchar *str)
get description string for entry string
gchar * latt_info[7]
gchar * frac_string(gchar *init)
get pango string for fraction string
int get_crystal_id(int spg)
get the bravais lattice id from space group id
GtkWidget * create_wyck_pts_info(space_group *spg, int sid)
create wyckoff label
void set_wisible(GtkTreeViewColumn *col, GtkCellRenderer *renderer, GtkTreeModel *mod, GtkTreeIter *iter, gpointer data)
show / hide cell renderer, if visible then add or not pango markup
gchar * tmp_pos
GtkWidget * info_wyck_scroll
Definition cbuild_info.c:71
void get_wyck_char(float val, int ax, int bx)
convert wyckoff value to string
G_MODULE_EXPORT void show_sg_info(GtkWidget *but, gpointer data)
show space group information dialog callback
GtkWidget * info_hsbox
Definition cbuild_info.c:67
void get_wyck_names(space_group *spg, int i, int j)
get the name of this wyckoff position
int get_bravais_img_id(int spg)
get bravais image from space group id
gchar * get_bravais(int spg)
retrieve the space group bravais lattice
Definition cbuild_info.c:83
GtkTreeModel * so_combo_tree(space_group *spg)
create the space group setting combo box tree model
GtkWidget * create_setting_info(space_group *spg, int sid)
create setting information label
gchar * get_so_string(space_group *spg, int id)
get space group setting descrption string
gchar * wnpos[3]
Definition cbuild_info.c:74
GtkWidget * create_wyckoff_tree(space_group *spg)
create wyckoff position tree
GtkWidget * info_wyck_tree
Definition cbuild_info.c:72
GtkWidget * info_vs
Definition cbuild_info.c:68
gchar * get_frac(float val)
get string for value
double ax
Definition curve.c:70
void label(cairo_t *cr, double val, int axe, int p, project *this_proj)
draw axis label
Definition labels.c:56
ColRGBA col
Definition d_measures.c:77
float val
Definition dlp_init.c:117
int multi
Definition dlp_init.c:121
gchar * bravais_img[14]
Definition global.c:138
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
Definition gtk-misc.c:492
GtkWidget * create_scroll(GtkWidget *box, int dimx, int dimy, int shadow)
create a scroll window
Definition gtk-misc.c:1960
GtkWidget * dialogmodal(gchar *str, GtkWindow *parent)
Create a new dialog modal window.
Definition gtk-misc.c:510
#define BSEP
Definition global.h:245
@ CONTAINER_SCR
Definition global.h:251
GtkWidget * dialog_get_content_area(GtkWidget *widg)
prepare GtkWidget to insert content in a GtkDialog window
Definition gtk-misc.c:825
GtkWidget * markup_label(gchar *text, int dimx, int dimy, float ax, float ay)
Definition gtk-misc.c:1585
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.
Definition gtk-misc.c:299
GtkWidget * create_hbox(int spacing)
create a GtkBox with horizontal orientation
Definition gtk-misc.c:813
G_MODULE_EXPORT void run_destroy_dialog(GtkDialog *dialog, gint response_id, gpointer data)
to destroy a GtkDialog when the dialog emit the closing signal
Definition gtk-misc.c:2102
GtkWidget * destroy_this_widget(GtkWidget *widg)
destroy a GtkWidget
Definition gtk-misc.c:2034
void add_container_child(int type, GtkWidget *widg, GtkWidget *child)
Add a GtkWidget into another GtkWidget.
Definition gtk-misc.c:226
GtkWidget * create_vbox(int spacing)
create a GtkBox with vertical orientation
Definition gtk-misc.c:801
void show_the_widgets(GtkWidget *widg)
show GtkWidget
Definition gtk-misc.c:173
project * get_project_by_id(int p)
get project pointer using id number
Definition project.c:120
Variable declarations related to the OpenGL window Function declarations related to the OpenGL wind...
Messaging function declarations.
char * vect_comp[3]
Definition edit_menu.c:82
Definition global.h:104
int a
Definition tab-1.c:95
float m11
Definition math_3d.h:209
float m30
Definition math_3d.h:211
float m22
Definition math_3d.h:210
float m00
Definition math_3d.h:208
float m01
Definition math_3d.h:208
float m21
Definition math_3d.h:210
float m32
Definition math_3d.h:211
float m10
Definition math_3d.h:209
float m02
Definition math_3d.h:208
float m12
Definition math_3d.h:209
float m31
Definition math_3d.h:211
float m20
Definition math_3d.h:210
gchar * settings[3][10]
Definition w_advance.c:119
GtkWidget * hbox
Definition workspace.c:71
GtkWidget * vbox
Definition workspace.c:72