Merge branch 'master' of http://git.roojs.com/roobuilder
[roobuilder] / tests / sample_working_gladeui.vala
1 /** 
2
3  compile:
4  
5 valac src/Builder4/sample_working_gladeui.vala --pkg gladeui-2.0  --pkg gtk+-3.0 -o /tmp/test_glade --vapidir src/vapi
6
7 This works fine. - however when I added it to the builder - the gtkwindows seperated themselves from the display
8 - I think it tries to get clever and does something with gtk_plug which doesnt really work.
9
10 There are some downsides to using glade anyway - so probably dont think about it next time.
11 * the UI mouse menu introduces quite a few things that may be difficult to handle.
12 * the drag drop into the view, needs the paleate from glade - which is not really compatible with our one.
13
14 */
15
16 using Glade;
17 using Gtk;
18  
19 static int main (string[] args)
20 {
21     Gtk.init(ref args);
22     Window win = new Window(WindowType.TOPLEVEL);
23    
24     Project proj = new Project();
25
26     //Palette pal = new Palette();
27     //Inspector ins = new Inspector();
28     DesignView dv = new DesignView(proj);
29     //pal.project = proj;
30     //ins.project = proj;
31     HBox box = new HBox(false,0);
32     //box.pack_start(pal);
33     //box.pack_start(ins);
34     box.pack_start(dv);
35     win.add(box);
36     dv.show();
37     //pal.show();
38     //ins.show();
39     win.set_size_request(300,300);
40     win.show_all();
41      App.set_window(win);
42     App.add_project(proj);     
43     proj.load_from_file("/tmp/glade.xml");
44     
45     Gtk.main();
46     return 0;
47 }