space page : a first approach
This commit is contained in:
parent
d0e04d4901
commit
af5f4cfc11
2
Makefile
2
Makefile
|
@ -21,11 +21,9 @@ exec.o: hot.c warm.c cold.c main.c Makefile
|
|||
clean:
|
||||
rm -f exec.o
|
||||
|
||||
# Builder will call this to install the application before running.
|
||||
install:
|
||||
echo "Installing is not supported"
|
||||
|
||||
# Builder uses this target to run your application.
|
||||
run: exec.o
|
||||
./exec.o
|
||||
|
||||
|
|
18
hot.c
18
hot.c
|
@ -5,8 +5,22 @@
|
|||
#include "cold.h"
|
||||
|
||||
GtkWidget *get_space_page_new(){
|
||||
GtkWidget * space_grid = gtk_grid_new();
|
||||
gtk_grid_attach (GTK_GRID(space_grid), gtk_button_new_with_label ("Hi babe...here am I !"), 0, 0, 1, 1);
|
||||
GtkWidget *space_grid = gtk_grid_new();
|
||||
|
||||
GtkDrawingArea *surface = GTK_DRAWING_AREA(gtk_drawing_area_new ());
|
||||
gtk_drawing_area_set_content_width (surface, 640);
|
||||
gtk_drawing_area_set_content_height (surface, 600);
|
||||
gtk_grid_attach (GTK_GRID(space_grid), GTK_WIDGET(surface), 0, 0, 1, 1);
|
||||
|
||||
GtkBox *XYZ_box = GTK_BOX(gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 2)); // spacing = 2
|
||||
gtk_box_append (XYZ_box, gtk_button_new_with_label ("X"));
|
||||
gtk_box_append (XYZ_box, gtk_button_new_with_label ("Y"));
|
||||
gtk_box_append (XYZ_box, gtk_button_new_with_label ("Z"));
|
||||
gtk_grid_attach (GTK_GRID(space_grid), GTK_WIDGET(XYZ_box), 1, 0, 1, 1);
|
||||
|
||||
gtk_grid_attach (GTK_GRID(space_grid), gtk_button_new_with_label ("RUN / STOP (and all that stuff...)"), 0, 1, 2, 1);
|
||||
gtk_grid_attach (GTK_GRID(space_grid), gtk_button_new_with_label ("Objects / Situations (transparences)"), 0, 2, 2, 1);
|
||||
gtk_grid_attach (GTK_GRID(space_grid), gtk_button_new_with_label ("camera (zoom...)"), 0, 3, 2, 1);
|
||||
return space_grid;
|
||||
}
|
||||
|
||||
|
|
4
warm.c
4
warm.c
|
@ -8,8 +8,8 @@ GtkWidget *get_measures_page_new(){
|
|||
gtk_grid_attach (GTK_GRID (measures_grid), gtk_button_new_with_label ("movements"), 0, 0, 1, 1);
|
||||
gtk_grid_attach (GTK_GRID (measures_grid), gtk_button_new_with_label ("transports"), 1, 0, 1, 1);
|
||||
gtk_grid_attach (GTK_GRID (measures_grid), gtk_button_new_with_label ("transformations"), 2, 0, 1, 1);
|
||||
gtk_grid_attach (GTK_GRID (measures_grid), gtk_button_new_with_label ("objects counts"), 0, 1, 1, 1);
|
||||
gtk_grid_attach (GTK_GRID (measures_grid), gtk_button_new_with_label ("situations counts"), 1, 1, 1, 1);
|
||||
gtk_grid_attach (GTK_GRID (measures_grid), gtk_button_new_with_label ("objects"), 0, 1, 1, 1);
|
||||
gtk_grid_attach (GTK_GRID (measures_grid), gtk_button_new_with_label ("situations"), 1, 1, 1, 1);
|
||||
return measures_grid;
|
||||
}
|
||||
|
||||
|
|
8
warm.h
8
warm.h
|
@ -20,16 +20,16 @@
|
|||
* https://stackoverflow.com/questions/20122232/gtklistc-code-how-to-get-the-selection-of-a-gtklist
|
||||
*
|
||||
GtkWidget *switcher = gtk_stack_switcher_new();
|
||||
// GtkWidget *sidebar = gtk_stack_sidebar_new();
|
||||
GtkWidget *sidebar = gtk_stack_sidebar_new();
|
||||
gtk_grid_attach (GTK_GRID (grid), switcher, 0, 1, 3, 1);
|
||||
gtk_orientable_set_orientation (GTK_ORIENTABLE (switcher), GTK_ORIENTATION_VERTICAL);
|
||||
gtk_orientable_set_orientation (GTK_ORIENTABLE (switcher), GTK_ORIENTATION_HORIZONTAL);
|
||||
GtkStack *stack = GTK_STACK (gtk_stack_new());
|
||||
gtk_stack_switcher_set_stack (GTK_STACK_SWITCHER (switcher), stack);
|
||||
// gtk_stack_sidebar_set_stack (GTK_STACK_SIDEBAR (sidebar), stack);
|
||||
gtk_stack_sidebar_set_stack (GTK_STACK_SIDEBAR (sidebar), stack);
|
||||
|
||||
// GtkWidget *page_0 = gtk_paned_new(GTK_ORIENTATION_VERTICAL);
|
||||
// GtkWidget *page_1 = gtk_paned_new(GTK_ORIENTATION_VERTICAL);
|
||||
GtkWidget *page_0 = gtk_paned_new(GTK_ORIENTATION_VERTICAL);
|
||||
GtkWidget *page_1 = gtk_paned_new(GTK_ORIENTATION_VERTICAL);
|
||||
GtkWidget *box_0 = gtk_box_new (0, 0);
|
||||
GtkWidget *box_1 = gtk_box_new (0, 0);
|
||||
GtkWidget *box_2 = gtk_box_new (0, 0);
|
||||
|
|
Loading…
Reference in New Issue