X-Git-Url: http://git.roojs.org/?a=blobdiff_plain;f=DependTree%2FWindow.bjs;h=285b1a10632d4033a13e68b8c186e279c1a386df;hb=7e03c503cf3e6bfb3b7386cb7e87a92ad60da10d;hp=5b8374f0bb1f30f3583534c9d3e57867516a4ecf;hpb=b1d1f9eb582f11e5f5d7f4822af55444d16cbd19;p=app.Builder.js diff --git a/DependTree/Window.bjs b/DependTree/Window.bjs index 5b8374f0b..285b1a106 100644 --- a/DependTree/Window.bjs +++ b/DependTree/Window.bjs @@ -1,5 +1,5 @@ { - "id": "file-gtk-18", + "id": "file-gtk-17", "name": "Window", "parent": "", "title": false, @@ -7,7 +7,7 @@ "items": [ { "listeners": { - "show": "function (self) {\n print(\"SHOW\");\n var BuildLists = imports['BuildLists.js'].BuildLists;\n this.data = new BuildLists();\n print(JSON.stringify(this.data.allmethods, null,4));\n \n var ls = this.get('method-list-store');\n this.data.allmethods.forEach(function(v) {\n ls.append( [ v ]);\n });\n var ls = this.get('children-list-store');\n this.data.allchildren.forEach(function(v) {\n ls.append( [ v ]);\n });\n var ls = this.get('class-list-store');\n for (var c in this.data.methods) {\n ls.append( [ c ]);\n };\n \n \n \n}" + "show": "function (self) {\n print(\"SHOW\");\n var BuildLists = imports['BuildLists.js'].BuildLists;\n this.data = new BuildLists();\n print(JSON.stringify(this.data.allmethods, null,4));\n \n var ls = this.get('method-list-store');\n this.data.allmethods.forEach(function(v) {\n ls.append( [ v , false, true ]);\n });\n var ls = this.get('children-list-store');\n this.data.allchildren.forEach(function(v) {\n ls.append( [ v , false, true ]);\n });\n var ls = this.get('class-list-store');\n var i =0;\n for (var c in this.data.methods) {\n i++;\n ls.append( [ c , true , true]);\n };\n \n \n \n}" }, "default_height": 500, "default_width": 600, @@ -16,14 +16,26 @@ "|xns": "Gtk", "items": [ { - "|xns": "Gtk", "xtype": "VBox", - "pack": false, + "|xns": "Gtk", + "listeners": {}, "items": [ { + "pack": "pack_start,false,false", "xtype": "HBox", "|xns": "Gtk", - "pack": false, + "items": [ + { + "label": "Reset", + "xtype": "Button", + "|xns": "Gtk" + } + ] + }, + { + "xtype": "HBox", + "|xns": "Gtk", + "listeners": {}, "items": [ { "xtype": "ScrolledWindow", @@ -31,19 +43,32 @@ "listeners": {}, "items": [ { + "listeners": { + "cursor_changed": "function (self) {\n var sel = this.el.get_selection();\n var iter = new Gtk.TreeIter();\n \n \n}" + }, "xtype": "TreeView", "|xns": "Gtk", - "listeners": {}, "items": [ { - "id": "class-list-store", - "xtype": "ListStore", - "|xns": "Gtk" + "xtype": "TreeModelFilter", + "|init": "function() {\n this.items[0].pack = false;\n this.items[0].init();\n this.list = this.items[0];\n this.el = new Gtk.TreeModelFilter.c_new(this.items[0].el, null);\n this.el.set_visible_column(2);\n XObject.prototype.init.call(this);\n \n}\n", + "|xns": "Gtk", + "items": [ + { + "id": "class-list-store", + "pack": false, + "xtype": "ListStore", + "|init": " function() \n {\n XObject.prototype.init.call(this);\n this.el.set_column_types ( 6, [\n GObject.TYPE_STRING, \n GObject.TYPE_BOOLEAN, \n GObject.TYPE_BOOLEAN, \n GObject.TYPE_STRING, \n GObject.TYPE_STRING, \n GObject.TYPE_STRING \n ] );\n \n }", + "|xns": "Gtk" + } + ] }, { "title": "Class", "xtype": "TreeViewColumn", "|xns": "Gtk", + "expand": true, + "listeners": {}, "items": [ { "xtype": "CellRendererText", @@ -51,6 +76,21 @@ "listeners": {} } ] + }, + { + "title": "Active", + "xtype": "TreeViewColumn", + "|xns": "Gtk", + "items": [ + { + "listeners": { + "toggled": "function (self, path) {\n print(\"TOGGLE\");\n // this.list\n\n\n \n var old = this.list.getValue(path, 1);\n // print(JSON.stringify(old));\n this.list.setValue(path, 1, old ? false : true)\n \n \n \n \n}" + }, + "activatable": true, + "xtype": "CellRendererToggle", + "|xns": "Gtk" + } + ] } ] } @@ -67,14 +107,25 @@ "listeners": {}, "items": [ { - "id": "method-list-store", - "xtype": "ListStore", - "|xns": "Gtk" + "xtype": "TreeModelFilter", + "|init": "function() {\n this.items[0].pack = false;\n this.items[0].init();\n this.list = this.items[0];\n this.el = new Gtk.TreeModelFilter.c_new(this.items[0].el, null);\n this.el.set_visible_column(2);\n XObject.prototype.init.call(this);\n \n}\n", + "|xns": "Gtk", + "items": [ + { + "id": "method-list-store", + "xtype": "ListStore", + "|init": " function() \n {\n XObject.prototype.init.call(this);\n this.el.set_column_types ( 6, [\n GObject.TYPE_STRING, \n GObject.TYPE_BOOLEAN, \n GObject.TYPE_BOOLEAN, \n GObject.TYPE_STRING, \n GObject.TYPE_STRING, \n GObject.TYPE_STRING \n ] );\n \n }", + "|xns": "Gtk", + "listeners": {} + } + ] }, { "title": "Methods", "xtype": "TreeViewColumn", "|xns": "Gtk", + "expand": true, + "listeners": {}, "items": [ { "xtype": "CellRendererText", @@ -82,6 +133,22 @@ "listeners": {} } ] + }, + { + "title": "Active", + "xtype": "TreeViewColumn", + "|xns": "Gtk", + "listeners": {}, + "items": [ + { + "listeners": { + "toggled": "function (self, path) {\n print(\"TOGGLE\");\n // this.list\n\n\n \n var old = this.list.getValue(path, 1);\n // print(JSON.stringify(old));\n this.list.setValue(path, 1, old ? false : true)\n \n \n \n \n}" + }, + "activatable": true, + "xtype": "CellRendererToggle", + "|xns": "Gtk" + } + ] } ] } @@ -98,14 +165,25 @@ "listeners": {}, "items": [ { - "id": "children-list-store", - "xtype": "ListStore", - "|xns": "Gtk" + "xtype": "TreeModelFilter", + "|init": "function() {\n this.items[0].pack = false;\n this.items[0].init();\n this.list = this.items[0];\n this.el = new Gtk.TreeModelFilter.c_new(this.items[0].el, null);\n this.el.set_visible_column(2);\n XObject.prototype.init.call(this);\n \n}\n", + "|xns": "Gtk", + "items": [ + { + "id": "children-list-store", + "pack": false, + "xtype": "ListStore", + "|init": " function() \n {\n XObject.prototype.init.call(this);\n this.el.set_column_types ( 6, [\n GObject.TYPE_STRING, \n GObject.TYPE_BOOLEAN, \n GObject.TYPE_BOOLEAN, \n GObject.TYPE_STRING, \n GObject.TYPE_STRING, \n GObject.TYPE_STRING \n ] );\n \n }", + "|xns": "Gtk" + } + ] }, { "title": "Child classes", "xtype": "TreeViewColumn", "|xns": "Gtk", + "expand": true, + "listeners": {}, "items": [ { "xtype": "CellRendererText", @@ -113,106 +191,22 @@ "listeners": {} } ] - } - ] - } - ] - } - ] - } - ] - }, - { - "xtype": "HBox", - "|xns": "Gtk", - "pack": false, - "items": [ - { - "xtype": "ScrolledWindow", - "|xns": "Gtk", - "listeners": {}, - "items": [ - { - "xtype": "TreeView", - "|xns": "Gtk", - "listeners": {}, - "items": [ - { - "id": "class-list-store", - "xtype": "ListStore", - "|xns": "Gtk" - }, - { - "title": "Class", - "xtype": "TreeViewColumn", - "|xns": "Gtk", - "items": [ - { - "xtype": "CellRendererText", - "|xns": "Gtk", - "listeners": {} - } - ] - } - ] - } - ] - }, - { - "xtype": "ScrolledWindow", - "|xns": "Gtk", - "listeners": {}, - "items": [ - { - "xtype": "TreeView", - "|xns": "Gtk", - "listeners": {}, - "items": [ - { - "id": "method-list-store", - "xtype": "ListStore", - "|xns": "Gtk" - }, - { - "title": "Methods", - "xtype": "TreeViewColumn", - "|xns": "Gtk", - "items": [ - { - "xtype": "CellRendererText", - "|xns": "Gtk", - "listeners": {} - } - ] - } - ] - } - ] - }, - { - "xtype": "ScrolledWindow", - "|xns": "Gtk", - "listeners": {}, - "items": [ - { - "xtype": "TreeView", - "|xns": "Gtk", - "listeners": {}, - "items": [ - { - "id": "children-list-store", - "xtype": "ListStore", - "|xns": "Gtk" - }, - { - "title": "Child classes", - "xtype": "TreeViewColumn", - "|xns": "Gtk", - "items": [ + }, { - "xtype": "CellRendererText", + "title": "Active", + "xtype": "TreeViewColumn", "|xns": "Gtk", - "listeners": {} + "listeners": {}, + "items": [ + { + "listeners": { + "toggled": "function (self, path) {\n print(\"TOGGLE\");\n // this.list\n\n\n \n var old = this.list.getValue(path, 1);\n // print(JSON.stringify(old));\n this.list.setValue(path, 1, old ? false : true)\n \n \n \n \n}" + }, + "activatable": true, + "xtype": "CellRendererToggle", + "|xns": "Gtk" + } + ] } ] }