78 box_type = view -> anim -> last ->
img -> abc ->
box;
79 box_line = view -> anim -> last ->
img -> abc -> line;
80 box_rad = view -> anim -> last ->
img -> abc -> rad;
84 if (v > 0.0) box_rad = v;
90 str = g_strdup_printf (_(
"Radius [ %f Å ]"), v);
91 gtk_menu_item_set_label (GTK_MENU_ITEM(view -> ogl_box_axis[0][6]), str);
94 view -> anim -> last ->
img -> abc -> rad = v;
103 if (v > 0.0) box_line = v;
109 str = g_strdup_printf (_(
"Width [ %f pts ]"), v);
110 gtk_menu_item_set_label (GTK_MENU_ITEM(view -> ogl_box_axis[0][4]), str);
113 view -> anim -> last ->
img -> abc -> line = v;
123 view -> create_shaders[
MDBOX] = TRUE;
143 view = (
glwin *)data;
144 box_win = view -> box_win;
154 view -> create_shaders[
MDBOX] = TRUE;
168 gtk_check_menu_item_set_active ((GtkCheckMenuItem *)view -> ogl_box_axis[0][2], TRUE);
184 gtk_check_menu_item_set_active ((GtkCheckMenuItem *)view -> ogl_box_axis[0][1], TRUE);
194 view -> create_shaders[
MDBOX] = TRUE;
197 update_menu_bar (view);
232 view = (
glwin *)data;
233 box_win = view -> box_win;
248 gtk_check_menu_item_set_active ((GtkCheckMenuItem *)view -> ogl_box_axis[0][0], TRUE);
259 gtk_check_menu_item_set_active ((GtkCheckMenuItem *)view -> ogl_box_axis[0][0], FALSE);
291 view -> create_shaders[
MDBOX] = TRUE;
305G_MODULE_EXPORT gboolean
on_box_delete (GtkWindow * widg, gpointer data)
316G_MODULE_EXPORT gboolean
on_box_delete (GtkWidget * widg, GdkEvent * event, gpointer data)
321 g_free (view -> box_win);
322 view -> box_win = NULL;
354 view = (
glwin *)data;
355 view -> box_win = g_malloc0(
sizeof*view -> box_win);
356 the_box = view -> box_win;
357 box_type = view -> anim -> last ->
img -> abc ->
box;
358 box_color = view -> anim -> last ->
img -> abc ->
color;
359 box_line = view -> anim -> last ->
img -> abc -> line;
360 box_rad = view -> anim -> last ->
img -> abc -> rad;
367 adv_box (the_box -> win, _(
"<b>Box settings</b>"), 5, 120, 0.0);
375 the_box -> win =
create_win (str, view -> win, FALSE, FALSE);
381 if (box_type !=
NONE)
396 add_box_child_start (GTK_ORIENTATION_VERTICAL, the_box -> box_data, pos_box, TRUE, TRUE, 0);
398 box =
abox (the_box -> box_data, _(
"Style "), 5);
406 gtk_widget_set_size_request (the_box ->
styles, 120, -1);
409 the_box -> width_box =
abox (the_box -> box_data, _(
"Line width [pts] "), 0);
412 add_box_child_start (GTK_ORIENTATION_HORIZONTAL, the_box -> width_box, the_box -> width, FALSE, FALSE, 10);
413 the_box -> radius_box =
abox (the_box -> box_data, _(
"Cylinder radius [Å] "), 0);
416 add_box_child_start (GTK_ORIENTATION_HORIZONTAL, the_box -> radius_box, the_box -> radius, FALSE, FALSE, 10);
419 add_box_child_start (GTK_ORIENTATION_HORIZONTAL,
abox (the_box -> box_data, _(
"Color "), 5),
color_button(box_color, TRUE, 120, -1, G_CALLBACK(
set_color_box), data), FALSE, FALSE, 10);
double string_to_double(gpointer string)
convert string to double
Global variable declarations Global convenience function declarations Global data structure defin...
int combo_get_active(GtkWidget *combo)
retrieve the active item's position
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_win(gchar *str, GtkWidget *parent, gboolean modal, gboolean resiz)
create a new GtkWindow
void combo_set_active(GtkWidget *combo, int pos)
set the active item's position
const gchar * entry_get_text(GtkEntry *entry)
get the text in a GtkEntry
void add_gtk_close_event(GtkWidget *widg, GCallback handler, gpointer data)
add a close event signal and callback to a GtkWidget
void add_global_option(GtkWidget *vbox, tint *oid)
add a button to update global user preferences
GtkWidget * check_button(gchar *text, int dimx, int dimy, gboolean state, GCallback handler, gpointer data)
create a check button
GtkWidget * create_combo()
create a GtkCombox widget, note deprecated in GTK4
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.
GtkWidget * create_hbox(int spacing)
create a GtkBox with horizontal orientation
void combo_text_append(GtkWidget *combo, gchar *text)
append text in GtkComboBox widget
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 add_container_child(int type, GtkWidget *widg, GtkWidget *child)
Add a GtkWidget into another GtkWidget.
void hide_the_widgets(GtkWidget *widg)
hide GtkWidget
GtkWidget * create_vbox(int spacing)
create a GtkBox with vertical orientation
int button_get_status(GtkWidget *button)
get status of check / toggle button
GtkWidget * abox(GtkWidget *box, char *lab, int vspace)
box creating routine, to help design faster elements for the GUI
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...
Function declarations for the creation of the OpenGL window.
Messaging function declarations.
gboolean from_box_or_axis
box_edition * pref_box_win
GtkWidget * adv_box(GtkWidget *box, char *lab, int vspace, int size, float xalign)
create a box with markup label
Preference variable declarations.
G_MODULE_EXPORT void set_show_box_toggle(GtkToggleButton *but, gpointer data)
toggle show / hide box callback GTK3
G_MODULE_EXPORT void set_box_combo_style(GtkWidget *widg, gpointer data)
set box style callback
G_MODULE_EXPORT void set_color_box(GtkColorChooser *colob, gpointer data)
set box color callback
G_MODULE_EXPORT void update_box_parameter(GtkEntry *res, gpointer data)
update box parameter callback
G_MODULE_EXPORT gboolean on_box_delete(GtkWidget *widg, GdkEvent *event, gpointer data)
box window delete event - GTK3
G_MODULE_EXPORT void box_advanced(GtkWidget *widg, gpointer data)
create the box edition window