sync
[app.Builder.js] / DependTree / Window.bjs
1 {
2     "id": "file-gtk-17",
3     "name": "Window",
4     "parent": "",
5     "title": false,
6     "path": "/home/alan/gitlive/app.Builder.js/DependTree/Window.bjs",
7     "items": [
8         {
9             "listeners": {
10                 "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 , true, true ]);\n    });\n    \n    var ls = this.get('children-list-store');\n    this.data.allchildren.forEach(function(v) {\n        ls.append( [ v , true, 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    print(JSON.stringify(this.data.methods['Gtk.AccelGroup']));\n    \n    \n    \n}"
11             },
12             "default_height": 500,
13             "default_width": 600,
14             "id": "window",
15             "xtype": "Window",
16             "|init": "function() {\n    XObject.prototype.init.call(this);\n    this.el.show_all();\n}\n",
17             "|xns": "Gtk",
18             "items": [
19                 {
20                     "xtype": "VBox",
21                     "|xns": "Gtk",
22                     "listeners": {},
23                     "items": [
24                         {
25                             "pack": "pack_start,false,false",
26                             "xtype": "HBox",
27                             "|xns": "Gtk",
28                             "items": [
29                                 {
30                                     "label": "Reset",
31                                     "xtype": "Button",
32                                     "|xns": "Gtk"
33                                 }
34                             ]
35                         },
36                         {
37                             "xtype": "HBox",
38                             "|xns": "Gtk",
39                             "listeners": {},
40                             "items": [
41                                 {
42                                     "xtype": "ScrolledWindow",
43                                     "|xns": "Gtk",
44                                     "listeners": {},
45                                     "items": [
46                                         {
47                                             "listeners": {
48                                                 "cursor_changed": "function (self) {\n\n    var sel  = this.el.get_selection();\n\n    \n    var iter = new Gtk.TreeIter();\n    sel.get_selected(this.model.el, iter);\n    \n    var tp = this.model.el.get_path(iter).to_string();\n    print(tp);\n    // \n    var cls = this.model.getValue(tp, 0);\n    print(cls);\n    var data = this.get('/window').data;\n    \n\n    // hide all the rows in the methods list.\n    var tp = false; \n    var cstore = this.get('/window.children-list-store');\n    var meths = [];\n    while (false !== (tp = cstore.nextPath(tp))) {\n        var mname = cstore.getValue(tp, 0);\n        var show = typeof(data.methods[cls][mname]) == 'undefined' ? false :true;\n        if (show) {\n            meths.push.apply(meths, data.methods[cls][mname]);\n        }\n        cstore.setValue(tp, 2, show); // hide..  \n\n        \n    }    \n    print(JSON.stringify(meths));\n\n    tp = false; \n    var mstore = this.get('/window.method-list-store');\n    while (false !== (tp = mstore.nextPath(tp))) {\n        var mname = mstore.getValue(tp, 0);\n        var show = meths.indexOf(mname) > -1  ? true :false;\n    \n        mstore.setValue(tp, 2, show); // hide..  \n    }\n    \n    \n    \n}"
49                                             },
50                                             "xtype": "TreeView",
51                                             "|xns": "Gtk",
52                                             "items": [
53                                                 {
54                                                     "xtype": "TreeModelFilter",
55                                                     "|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    this.parent.model = this;\n   \n}\n",
56                                                     "|xns": "Gtk",
57                                                     "items": [
58                                                         {
59                                                             "id": "class-list-store",
60                                                             "pack": false,
61                                                             "xtype": "ListStore",
62                                                             "|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        }",
63                                                             "|xns": "Gtk"
64                                                         }
65                                                     ]
66                                                 },
67                                                 {
68                                                     "title": "Class",
69                                                     "xtype": "TreeViewColumn",
70                                                     "|xns": "Gtk",
71                                                     "expand": true,
72                                                     "listeners": {},
73                                                     "items": [
74                                                         {
75                                                             "xtype": "CellRendererText",
76                                                             "|xns": "Gtk",
77                                                             "listeners": {}
78                                                         }
79                                                     ]
80                                                 },
81                                                 {
82                                                     "title": "Active",
83                                                     "xtype": "TreeViewColumn",
84                                                     "|xns": "Gtk",
85                                                     "items": [
86                                                         {
87                                                             "listeners": {
88                                                                 "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}"
89                                                             },
90                                                             "activatable": true,
91                                                             "xtype": "CellRendererToggle",
92                                                             "|xns": "Gtk"
93                                                         }
94                                                     ]
95                                                 }
96                                             ]
97                                         }
98                                     ]
99                                 },
100                                 {
101                                     "xtype": "ScrolledWindow",
102                                     "|xns": "Gtk",
103                                     "listeners": {},
104                                     "items": [
105                                         {
106                                             "xtype": "TreeView",
107                                             "|xns": "Gtk",
108                                             "listeners": {},
109                                             "items": [
110                                                 {
111                                                     "xtype": "TreeModelFilter",
112                                                     "|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",
113                                                     "|xns": "Gtk",
114                                                     "items": [
115                                                         {
116                                                             "id": "method-list-store",
117                                                             "xtype": "ListStore",
118                                                             "|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        }",
119                                                             "|xns": "Gtk",
120                                                             "listeners": {}
121                                                         }
122                                                     ]
123                                                 },
124                                                 {
125                                                     "title": "Methods",
126                                                     "xtype": "TreeViewColumn",
127                                                     "|xns": "Gtk",
128                                                     "expand": true,
129                                                     "listeners": {},
130                                                     "items": [
131                                                         {
132                                                             "xtype": "CellRendererText",
133                                                             "|xns": "Gtk",
134                                                             "listeners": {}
135                                                         }
136                                                     ]
137                                                 },
138                                                 {
139                                                     "title": "Active",
140                                                     "xtype": "TreeViewColumn",
141                                                     "|xns": "Gtk",
142                                                     "listeners": {},
143                                                     "items": [
144                                                         {
145                                                             "listeners": {
146                                                                 "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}"
147                                                             },
148                                                             "activatable": true,
149                                                             "xtype": "CellRendererToggle",
150                                                             "|xns": "Gtk"
151                                                         }
152                                                     ]
153                                                 }
154                                             ]
155                                         }
156                                     ]
157                                 },
158                                 {
159                                     "xtype": "ScrolledWindow",
160                                     "|xns": "Gtk",
161                                     "listeners": {},
162                                     "items": [
163                                         {
164                                             "xtype": "TreeView",
165                                             "|xns": "Gtk",
166                                             "listeners": {},
167                                             "items": [
168                                                 {
169                                                     "xtype": "TreeModelFilter",
170                                                     "|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",
171                                                     "|xns": "Gtk",
172                                                     "items": [
173                                                         {
174                                                             "id": "children-list-store",
175                                                             "pack": false,
176                                                             "xtype": "ListStore",
177                                                             "|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        }",
178                                                             "|xns": "Gtk"
179                                                         }
180                                                     ]
181                                                 },
182                                                 {
183                                                     "title": "Child classes",
184                                                     "xtype": "TreeViewColumn",
185                                                     "|xns": "Gtk",
186                                                     "expand": true,
187                                                     "listeners": {},
188                                                     "items": [
189                                                         {
190                                                             "xtype": "CellRendererText",
191                                                             "|xns": "Gtk",
192                                                             "listeners": {}
193                                                         }
194                                                     ]
195                                                 },
196                                                 {
197                                                     "title": "Active",
198                                                     "xtype": "TreeViewColumn",
199                                                     "|xns": "Gtk",
200                                                     "listeners": {},
201                                                     "items": [
202                                                         {
203                                                             "listeners": {
204                                                                 "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}"
205                                                             },
206                                                             "activatable": true,
207                                                             "xtype": "CellRendererToggle",
208                                                             "|xns": "Gtk"
209                                                         }
210                                                     ]
211                                                 }
212                                             ]
213                                         }
214                                     ]
215                                 }
216                             ]
217                         }
218                     ]
219                 }
220             ]
221         }
222     ],
223     "permname": "",
224     "modOrder": ""
225 }