tests/GtkView.vala
[app.Builder.js] / tests / GtkView.vala
1 /**
2  * Test the writer code...
3
4
5 */
6
7 public Project.Project proj;
8
9 int main (string[] args) {
10         Gtk.init (ref args);
11         //GtkClutter.init (ref args);
12         new JsRender.Lang_Class();
13         GLib.Log.set_always_fatal(LogLevelFlags.LEVEL_ERROR | LogLevelFlags.LEVEL_CRITICAL); 
14         Project.Project.loadAll();
15         proj = Project.Project.getProject("Builder4");
16         
17         proj.scanDirs();
18         
19         loadit("WindowLeftProps");
20         loadit("EditProject");
21
22         
23         Gtk.main();
24     
25         
26         return 0;
27 }
28
29 void loadit(string name ) {
30         print("load %s\n", proj.firstPath() + "/" + name  + ".bjs");
31         //var tf = proj.files.get(proj.firstPath() + "/WindowLeftProps.bjs");
32         var tf = proj.files.get(proj.firstPath() + "/" + name +".bjs");
33         tf.loadItems();
34
35         
36         var w  = new Gtk.Window( Gtk.WindowType.TOPLEVEL );
37         w.title = name;
38         var  left_props =new Xcls_GtkView();
39         left_props.el.show();
40         w.add(left_props.el);
41         w.show_all();   
42         left_props.addNode(tf);
43         
44         left_props.container.el.show_all();
45 }