3 Pango = imports.gi.Pango;
4 GLib = imports.gi.GLib;
6 GObject = imports.gi.GObject;
7 GtkSource = imports.gi.GtkSource;
8 WebKit = imports.gi.WebKit;
10 GtkClutter = imports.gi.GtkClutter;
12 console = imports.console;
13 XObject = imports.XObject.XObject;
17 show : function (self) {
19 var BuildLists = imports['BuildLists.js'].BuildLists;
20 this.data = new BuildLists();
21 print(JSON.stringify(this.data.allmethods, null,4));
23 var ls = this.get('method-list-store');
24 this.data.allmethods.forEach(function(v) {
25 ls.append( [ v , true, true ]);
28 var ls = this.get('children-list-store');
29 this.data.allchildren.forEach(function(v) {
30 ls.append( [ v , true, true ]);
32 var ls = this.get('class-list-store');
34 for (var c in this.data.methods) {
36 ls.append( [ c , true , true]);
38 print(JSON.stringify(this.data.methods['Gtk.AccelGroup']));
48 XObject.prototype.init.call(this);
57 pack : "pack_start,false,false",
69 xtype: Gtk.ScrolledWindow,
74 cursor_changed : function (self) {
76 var sel = this.el.get_selection();
79 var iter = new Gtk.TreeIter();
80 sel.get_selected(this.model.el, iter);
82 var tp = this.model.el.get_path(iter).to_string();
85 var cls = this.model.getValue(tp, 0);
87 var data = this.get('/window').data;
90 // hide all the rows in the methods list.
92 var cstore = this.get('/window.children-list-store');
94 while (false !== (tp = cstore.nextPath(tp))) {
95 var mname = cstore.getValue(tp, 0);
96 var show = typeof(data.methods[cls][mname]) == 'undefined' ? false :true;
98 meths.push.apply(meths, data.methods[cls][mname]);
100 cstore.setValue(tp, 2, show); // hide..
104 print(JSON.stringify(meths));
107 var mstore = this.get('/window.method-list-store');
108 while (false !== (tp = mstore.nextPath(tp))) {
109 var mname = mstore.getValue(tp, 0);
110 var show = meths.indexOf(mname) > -1 ? true :false;
112 mstore.setValue(tp, 2, show); // hide..
121 xtype: Gtk.TreeModelFilter,
123 this.items[0].pack = false;
124 this.items[0].init();
125 this.list = this.items[0];
126 this.el = new Gtk.TreeModelFilter.c_new(this.items[0].el, null);
127 this.el.set_visible_column(2);
128 XObject.prototype.init.call(this);
129 this.parent.model = this;
134 xtype: Gtk.ListStore,
135 id : "class-list-store",
139 XObject.prototype.init.call(this);
140 this.el.set_column_types ( 6, [
142 GObject.TYPE_BOOLEAN,
143 GObject.TYPE_BOOLEAN,
154 xtype: Gtk.TreeViewColumn,
159 xtype: Gtk.CellRendererText
164 xtype: Gtk.TreeViewColumn,
168 xtype: Gtk.CellRendererToggle,
170 toggled : function (self, path) {
176 var old = this.list.getValue(path, 1);
177 // print(JSON.stringify(old));
178 this.list.setValue(path, 1, old ? false : true)
194 xtype: Gtk.ScrolledWindow,
200 xtype: Gtk.TreeModelFilter,
202 this.items[0].pack = false;
203 this.items[0].init();
204 this.list = this.items[0];
205 this.el = new Gtk.TreeModelFilter.c_new(this.items[0].el, null);
206 this.el.set_visible_column(2);
207 XObject.prototype.init.call(this);
212 xtype: Gtk.ListStore,
213 id : "method-list-store",
216 XObject.prototype.init.call(this);
217 this.el.set_column_types ( 6, [
219 GObject.TYPE_BOOLEAN,
220 GObject.TYPE_BOOLEAN,
231 xtype: Gtk.TreeViewColumn,
236 xtype: Gtk.CellRendererText
241 xtype: Gtk.TreeViewColumn,
245 xtype: Gtk.CellRendererToggle,
247 toggled : function (self, path) {
253 var old = this.list.getValue(path, 1);
254 // print(JSON.stringify(old));
255 this.list.setValue(path, 1, old ? false : true)
271 xtype: Gtk.ScrolledWindow,
277 xtype: Gtk.TreeModelFilter,
279 this.items[0].pack = false;
280 this.items[0].init();
281 this.list = this.items[0];
282 this.el = new Gtk.TreeModelFilter.c_new(this.items[0].el, null);
283 this.el.set_visible_column(2);
284 XObject.prototype.init.call(this);
289 xtype: Gtk.ListStore,
290 id : "children-list-store",
294 XObject.prototype.init.call(this);
295 this.el.set_column_types ( 6, [
297 GObject.TYPE_BOOLEAN,
298 GObject.TYPE_BOOLEAN,
309 xtype: Gtk.TreeViewColumn,
310 title : "Child classes",
314 xtype: Gtk.CellRendererText
319 xtype: Gtk.TreeViewColumn,
323 xtype: Gtk.CellRendererToggle,
325 toggled : function (self, path) {
331 var old = this.list.getValue(path, 1);
332 // print(JSON.stringify(old));
333 this.list.setValue(path, 1, old ? false : true)
355 XObject.cache['/Window'] = Window;