File.js
[app.Builder.js] / DependTree / Window.js
index 1d35acd..b1e1525 100644 (file)
@@ -18,15 +18,16 @@ Window=new XObject({
             print("SHOW");
             var BuildLists = imports['BuildLists.js'].BuildLists;
             this.data = new BuildLists();
-            print(JSON.stringify(this.data.allmethods, null,4));
+            print(JSON.(this.data.allmethods, null,4));
             
             var ls = this.get('method-list-store');
             this.data.allmethods.forEach(function(v) {
-                ls.append( [ v , false, true ]);
+                ls.append( [ v , true, true ]);
             });
+            
             var ls = this.get('children-list-store');
             this.data.allchildren.forEach(function(v) {
-                ls.append( [ v , false, true ]);
+                ls.append( [ v , true, true ]);
             });
             var ls = this.get('class-list-store');
             var i =0;
@@ -34,6 +35,7 @@ Window=new XObject({
                 i++;
                 ls.append( [ c , true ,   true]);
             };
+            print(JSON.(this.data.methods['Gtk.AccelGroup']));
             
             
             
@@ -41,6 +43,7 @@ Window=new XObject({
     },
     default_height : 500,
     default_width : 600,
+    id : "window",
     init : function() {
         XObject.prototype.init.call(this);
         this.el.show_all();
@@ -69,15 +72,47 @@ Window=new XObject({
                                     xtype: Gtk.TreeView,
                                     listeners : {
                                         cursor_changed : function (self) {
-                                            var sel = this.el.get_selection();
-                                            var iter = new Gtk.TreeIter();
-                                            sel.get_selected(this.el.model, iter);
                                         
-                                            var tp = this.el.model.get_path(iter).to_string();
+                                            var sel  = this.el.get_selection();
+                                        
+                                            
+                                            var iter = new Gtk.TreeIter();
+                                            sel.get_selected(this.model.el, iter);
+                                            
+                                            var tp = this.model.el.get_path(iter).to_string();
                                             print(tp);
                                             // 
                                             var cls = this.model.getValue(tp, 0);
                                             print(cls);
+                                            var data = this.get('/window').data;
+                                            
+                                        
+                                            // hide all the rows in the methods list.
+                                            var tp = false; 
+                                            var cstore = this.get('/window.children-list-store');
+                                            var meths = [];
+                                            while (false !== (tp = cstore.nextPath(tp))) {
+                                                var mname = cstore.getValue(tp, 0);
+                                                var show = typeof(data.methods[cls][mname]) == 'undefined' ? false :true;
+                                                if (show) {
+                                                    meths.push.apply(meths, data.methods[cls][mname]);
+                                                }
+                                                cstore.setValue(tp, 2, show); // hide..  
+                                        
+                                                
+                                            }    
+                                            print(JSON.(meths));
+                                        
+                                            tp = false; 
+                                            var mstore = this.get('/window.method-list-store');
+                                            while (false !== (tp = mstore.nextPath(tp))) {
+                                                var mname = mstore.getValue(tp, 0);
+                                                var show = meths.indexOf(mname) > -1  ? true :false;
+                                            
+                                                mstore.setValue(tp, 2, show); // hide..  
+                                            }
+                                            
+                                            
                                             
                                         }
                                     },
@@ -139,7 +174,7 @@ Window=new XObject({
                                                         
                                                              
                                                             var old = this.list.getValue(path, 1);
-                                                           // print(JSON.stringify(old));
+                                                           // print(JSON.(old));
                                                             this.list.setValue(path, 1, old ? false : true)
                                                             
                                                             
@@ -216,7 +251,7 @@ Window=new XObject({
                                                         
                                                              
                                                             var old = this.list.getValue(path, 1);
-                                                           // print(JSON.stringify(old));
+                                                           // print(JSON.(old));
                                                             this.list.setValue(path, 1, old ? false : true)
                                                             
                                                             
@@ -294,7 +329,7 @@ Window=new XObject({
                                                         
                                                              
                                                             var old = this.list.getValue(path, 1);
-                                                           // print(JSON.stringify(old));
+                                                           // print(JSON.(old));
                                                             this.list.setValue(path, 1, old ? false : true)