first version of the generic gui for the tracer

This commit is contained in:
Cedric Roux
2016-04-11 11:18:26 +02:00
parent ee6789cdde
commit 2bb04f0105
18 changed files with 1737 additions and 1 deletions
+46
View File
@@ -0,0 +1,46 @@
#include "gui.h"
int main(void)
{
gui *g;
widget *w, *c1, *c2, *l, *plot, *tl;
int tlcol;
g = gui_init();
c1 = new_container(g, VERTICAL);
c2 = new_container(g, HORIZONTAL);
l = new_label(g, "this is a good label");
widget_add_child(g, c2, l, 0);
l = new_label(g, "this is another good label");
widget_add_child(g, c2, l, -1);
l = new_label(g, "OH! WHAT A LABEL!");
widget_add_child(g, c1, l, -1);
widget_add_child(g, c1, c2, 0);
plot = new_xy_plot(g, 100, 100, "xy plot test", 30);
#if 0
c2 = new_container(g, HORIZONTAL);
widget_add_child(g, c2, plot, -1);
widget_add_child(g, c1, c2, -1);
#else
widget_add_child(g, c1, plot, -1);
#endif
tlcol = new_color(g, "#ddf");
tl = new_text_list(g, 300, 10, tlcol);
widget_add_child(g, c1, tl, -1);
text_list_add(g, tl, "hello", -1);
text_list_add(g, tl, "world", -1);
w = new_toplevel_window(g, 500, 400, "test window");
widget_add_child(g, w, c1, 0);
gui_loop(g);
return 0;
}