DependTree/Window.js
[app.Builder.js] / DependTree / Window.js
1 Gtk = imports.gi.Gtk;
2 Gdk = imports.gi.Gdk;
3 Pango = imports.gi.Pango;
4 GLib = imports.gi.GLib;
5 Gio = imports.gi.Gio;
6 GObject = imports.gi.GObject;
7 GtkSource = imports.gi.GtkSource;
8 WebKit = imports.gi.WebKit;
9 Vte = imports.gi.Vte;
10 GtkClutter = imports.gi.GtkClutter;
11 Gdl = imports.gi.Gdl;
12 console = imports.console;
13 XObject = imports.XObject.XObject;
14 Window=new XObject({
15     xtype: Gtk.Window,
16     listeners : {
17         show : function (self) {
18             print("SHOW");
19             var BuildLists = imports['BuildLists.js'].BuildLists;
20             this.data = new BuildLists();
21             print(JSON.stringify(this.data.allmethods, null,4));
22             
23             var ls = this.get('method-list-store');
24             this.data.allmethods.forEach(function(v) {
25                 ls.append( [ v ]);
26             });
27         }
28     },
29     default_height : 500,
30     default_width : 600,
31     init : function() {
32         XObject.prototype.init.call(this);
33         this.el.show_all();
34     },
35     items : [
36         {
37             xtype: Gtk.HBox,
38             items : [
39                 {
40                     xtype: Gtk.ScrolledWindow,
41                     items : [
42                         {
43                             xtype: Gtk.TreeView,
44                             items : [
45                                 {
46                                     xtype: Gtk.ListStore
47                                 },
48                                 {
49                                     xtype: Gtk.TreeViewColumn,
50                                     title : "Class",
51                                     items : [
52                                         {
53                                             xtype: Gtk.CellRendererText
54                                         }
55                                     ]
56                                 }
57                             ]
58                         }
59                     ]
60                 },
61                 {
62                     xtype: Gtk.ScrolledWindow,
63                     items : [
64                         {
65                             xtype: Gtk.TreeView,
66                             items : [
67                                 {
68                                     xtype: Gtk.ListStore
69                                 },
70                                 {
71                                     xtype: Gtk.TreeViewColumn,
72                                     title : "Child Classes",
73                                     items : [
74                                         {
75                                             xtype: Gtk.CellRendererText
76                                         }
77                                     ]
78                                 }
79                             ]
80                         }
81                     ]
82                 },
83                 {
84                     xtype: Gtk.ScrolledWindow,
85                     items : [
86                         {
87                             xtype: Gtk.TreeView,
88                             items : [
89                                 {
90                                     xtype: Gtk.ListStore,
91                                     id : "method-list-store"
92                                 },
93                                 {
94                                     xtype: Gtk.TreeViewColumn,
95                                     title : "Methods",
96                                     items : [
97                                         {
98                                             xtype: Gtk.CellRendererText
99                                         }
100                                     ]
101                                 }
102                             ]
103                         }
104                     ]
105                 }
106             ]
107         }
108     ]
109 });
110 Window.init();
111 XObject.cache['/Window'] = Window;