82 box_type = view -> anim -> last ->
img -> abc ->
box;
83 box_line = view -> anim -> last ->
img -> abc -> line;
84 box_rad = view -> anim -> last ->
img -> abc -> rad;
88 if (v > 0.0) box_rad = v;
94 str = g_strdup_printf (
"_Radius [ %f Å ]", v);
95 gtk_menu_item_set_label (GTK_MENU_ITEM(view -> ogl_box_axis[0][6]), str);
98 view -> anim -> last ->
img -> abc -> rad = v;
107 if (v > 0.0) box_line = v;
113 str = g_strdup_printf (
"_Width [ %f pts ]", v);
114 gtk_menu_item_set_label (GTK_MENU_ITEM(view -> ogl_box_axis[0][4]), str);
117 view -> anim -> last ->
img -> abc -> line = v;
127 view -> create_shaders[
MDBOX] = TRUE;
147 view = (
glwin *)data;
148 box_win = view -> box_win;
158 view -> create_shaders[
MDBOX] = TRUE;
172 gtk_check_menu_item_set_active ((GtkCheckMenuItem *)view -> ogl_box_axis[0][2], TRUE);
188 gtk_check_menu_item_set_active ((GtkCheckMenuItem *)view -> ogl_box_axis[0][1], TRUE);
198 view -> create_shaders[
MDBOX] = TRUE;
201 update_menu_bar (view);
236 view = (
glwin *)data;
237 box_win = view -> box_win;
252 gtk_check_menu_item_set_active ((GtkCheckMenuItem *)view -> ogl_box_axis[0][0], TRUE);
263 gtk_check_menu_item_set_active ((GtkCheckMenuItem *)view -> ogl_box_axis[0][0], FALSE);
295 view -> create_shaders[
MDBOX] = TRUE;
309G_MODULE_EXPORT gboolean
on_box_delete (GtkWindow * widg, gpointer data)
320G_MODULE_EXPORT gboolean
on_box_delete (GtkWidget * widg, GdkEvent * event, gpointer data)
325 g_free (view -> box_win);
326 view -> box_win = NULL;
358 view = (
glwin *)data;
359 view -> box_win = g_malloc0(
sizeof*view -> box_win);
360 the_box = view -> box_win;
361 box_type = view -> anim -> last ->
img -> abc ->
box;
362 box_color = view -> anim -> last ->
img -> abc ->
color;
363 box_line = view -> anim -> last ->
img -> abc -> line;
364 box_rad = view -> anim -> last ->
img -> abc -> rad;
371 adv_box (the_box -> win,
"<b>Box settings</b>", 5, 120, 0.0);
379 the_box -> win =
create_win (str, view -> win, FALSE, FALSE);
385 if (box_type !=
NONE)
400 add_box_child_start (GTK_ORIENTATION_VERTICAL, the_box -> box_data, pos_box, TRUE, TRUE, 0);
402 box =
abox (the_box -> box_data,
"Style ", 5);
412 gtk_widget_set_size_request (the_box ->
styles, 120, -1);
415 the_box -> width_box =
abox (the_box -> box_data,
"Line width [pts] ", 0);
418 add_box_child_start (GTK_ORIENTATION_HORIZONTAL, the_box -> width_box, the_box -> width, FALSE, FALSE, 10);
419 the_box -> radius_box =
abox (the_box -> box_data,
"Cylinder radius [Å] ", 0);
422 add_box_child_start (GTK_ORIENTATION_HORIZONTAL, the_box -> radius_box, the_box -> radius, FALSE, FALSE, 10);
425 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
gboolean is_the_widget_visible(GtkWidget *widg)
test if a GtkWidget exist, then return if it is visible or not
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...
struct box box
box layout data structure
Function declarations for the creation of the OpenGL window.
Messaging function declarations.
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.
gboolean from_box_or_axis
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
gchar * box_style[BOX_STYLES]
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