49G_MODULE_EXPORT
void add_cell (GtkSpinButton *
res, gpointer data)
54 image * last = this_proj -> modelgl -> anim -> last ->
img;
55 i =
max(last -> extra_cell[0], last -> extra_cell[1]);
56 i =
max(i, last -> extra_cell[2]);
57 last -> p_depth /= (i+1);
58 last -> extra_cell[dat ->
b] = gtk_spin_button_get_value_as_int(
res) - 1;
59 i =
max(last -> extra_cell[0], last -> extra_cell[1]);
60 i =
max(i, last -> extra_cell[2]);
61 last -> p_depth *= (i+1);
62 double fact = last -> p_depth*2.0 / last -> gfar;
63 last -> gfar = last -> p_depth*2.0;
64 last -> gnear *= fact;
67 this_proj -> modelgl -> create_shaders[
MDBOX] = TRUE;
68 this_proj -> modelgl -> create_shaders[
MAXIS] = TRUE;
69 if (this_proj -> modelgl -> n_shaders[
SLABS][0]) this_proj -> modelgl -> create_shaders[
SLABS] = TRUE;
70 update (this_proj -> modelgl);
95 view -> cell_win -> ax_cell[i] =
spin_button (G_CALLBACK(
add_cell), view -> anim -> last ->
img -> extra_cell[i]+1, 1, 1000, 1, 0, 100, & view ->
colorp[i][0]);
96 str = g_strdup_printf (
"%s x ",
box_prop[0][i]);
98 add_box_child_start (GTK_ORIENTATION_HORIZONTAL, hhbox, view -> cell_win -> ax_cell[i], FALSE, FALSE, 0);
Function declarations for the cell edition window.
void sens_superbut(project *this_proj)
adjust 'Create super-cell' button sensitivity
G_MODULE_EXPORT void super_cell_but(GtkButton *but, gpointer data)
create super cell callback
void init_default_shaders(glwin *view)
re-initialize the default OpenGL shaders
void layout_add_widget(GtkWidget *layout, GtkWidget *child, int x_pos, int y_pos)
Add a GtkWidget in a GtkLayout.
GtkWidget * spin_button(GCallback handler, double value, double start, double end, double step, int digits, int dim, gpointer data)
create a spin button
GtkWidget * create_button(gchar *text, int image_format, gchar *image, int dimx, int dimy, int relief, GCallback handler, gpointer data)
create a simple 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.
GtkWidget * create_hbox(int spacing)
create a GtkBox with horizontal orientation
GtkWidget * create_layout(int x, int y)
create a GtkLayout / GtkFixed widget
GtkWidget * create_vbox(int spacing)
create a GtkBox with vertical orientation
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
void zoom(glwin *view, int delta)
zoom in or zoom out in the OpenGL window