59 gchar * pname[3]= {
"Volume:",
"Mass density:",
"Number density:"};
60 gchar * punit[3]= {
"Å<sup>3</sup>",
"g/cm<sup>3</sup>",
"atom/Å<sup>3</sup>"};
72 str = g_strdup_printf (
"<b>%f</b>",
val[i]);
77 add_box_child_start (GTK_ORIENTATION_VERTICAL, cell -> density_box, cell -> density, FALSE, FALSE, 10);
90G_MODULE_EXPORT
void set_rescaling (GtkCheckButton * but, gpointer data)
105 view -> cell_win -> homo_density = gtk_check_button_get_active (but);
107 view -> cell_win -> homo_density = gtk_toggle_button_get_active (but);
126 G_CALLBACK(
set_rescaling), this_proj -> modelgl), FALSE, FALSE, 5);
129 this_proj -> modelgl -> cell_win -> density_box =
create_vbox (5);
130 add_box_child_start (GTK_ORIENTATION_VERTICAL,
vbox, this_proj -> modelgl -> cell_win -> density_box, FALSE, FALSE, 5);
131 display_density (this_proj -> modelgl -> cell_win, this_proj -> cell.volume,
132 this_proj -> cell.density, this_proj -> natomes/this_proj -> cell.volume);
133 gchar * info[2] = {
" * Visual information will be preserved, real bonding is likely to be modified.\n"
134 " Bond properties should be re-calculated, if required bond cutoff should be updated.",
135 "** Keep the ratios between the lattice vectors A, B and C like in the initial cell."};
void display_density(cell_edition *cell, double vol, double dens, double adens)
create density information widgets
G_MODULE_EXPORT void set_rescaling(GtkToggleButton *but, gpointer data)
homogeneous rescaling toggle callback GTK3
GtkWidget * adjust_density_tab(project *this_proj)
create the density tab
Function declarations for the cell edition window.
GtkWidget * create_cell_entries(project *this_proj, int i)
create the cell entry widgets
void layout_add_widget(GtkWidget *layout, GtkWidget *child, int x_pos, int y_pos)
Add a GtkWidget in a GtkLayout.
GtkWidget * check_button(gchar *text, int dimx, int dimy, gboolean state, GCallback handler, gpointer data)
create a check button
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.
void widget_set_sensitive(GtkWidget *widg, gboolean sensitive)
Set sensitivity for a GtkWidget, ensuring it is a GtkWidget.
GtkWidget * create_hbox(int spacing)
create a GtkBox with horizontal orientation
GtkWidget * create_layout(int x, int y)
create a GtkLayout / GtkFixed widget
GtkWidget * destroy_this_widget(GtkWidget *widg)
destroy a GtkWidget
GtkWidget * create_vbox(int spacing)
create a GtkBox with vertical orientation
void show_the_widgets(GtkWidget *widg)
show GtkWidget