Builder4/ClutterFiles.bjs
authorAlan Knowles <alan@roojs.com>
Wed, 9 Jul 2014 10:14:26 +0000 (18:14 +0800)
committerAlan Knowles <alan@roojs.com>
Wed, 9 Jul 2014 10:14:26 +0000 (18:14 +0800)
Builder4/ClutterFiles.js
Builder4/ClutterFiles.vala

Builder4/ClutterFiles.bjs
Builder4/ClutterFiles.js
Builder4/ClutterFiles.vala

index f4bfdde..c65ed59 100644 (file)
@@ -6,7 +6,7 @@
     "path": "/home/alan/gitlive/app.Builder.js/Builder4/ClutterFiles.bjs",
     "items": [
         {
-            "|xns": "Clutter",
+            "Gee.ArrayList<Xcls_fileitem>:fileitems": "",
             ".signal:void:open": "(JsRender.JsRender file)",
             "id": "ClutterFiles",
             "scroll_mode": "Clutter.ScrollMode.VERTICAL",
@@ -16,6 +16,7 @@
             "|void:clearFiles": "() {\n    \n    this.filelayout.el.remove_all_children();\n    // we need to unref all the chidren that we loaded though...\n    \n}\n",
             "|void:loadProject": "(Project.Project pr) {\n    // list all the files, and create new Xcls_fileitem for each one.\n    \n    // LEAK --- we should unref all the chilren...\n    this.clearFiles();\n    \n    print(\"clutter files - load project: \" + pr.name +\"\\n\");\n    // should unref.. them hopefully.\n    this.fileitems = new Gee.ArrayList<Xcls_fileitem>();\n\n    var fiter = pr.files.map_iterator();\n    while (fiter.next()) {\n        var a = new Xcls_fileitem(this,fiter.get_value());\n        this.fileitems.add(a);\n\n//        a.ref();\n        print(\"add to clutter file view: \" + fiter.get_value().name + \"\\n\");\n        this.filelayout.el.add_child(a.el);\n    }\n    this.el.show_all();\n}\n",
             "|void:set_size": "(float w, float h) \n{\n     if (this.el == null) {\n        print(\"object not ready yet?\");\n        return;\n    }\n   _this.filelayout_manager.el.max_column_width = w - 150;\n   this.el.set_size(this.el.get_stage().width-150,\n                        this.el.get_stage().height);\n            this.el.set_position(100,50);\n}\n",
+            "|xns": "Clutter",
             "items": [
                 {
                     "id": "filelayout",
index f2b0f85..ed899e6 100644 (file)
@@ -11,6 +11,7 @@ console = imports.console;
 XObject = imports.XObject.XObject;
 ClutterFiles=new XObject({
     xtype: Clutter.ScrollActor,
+    'Gee.ArrayList<Xcls_fileitem>:fileitems' : "",
     id : "ClutterFiles",
     scroll_mode : "Clutter.ScrollMode.VERTICAL",
     init : this.fileitems = new Gee.ArrayList<Xcls_fileitem>();,
index bdf2834..63e355f 100644 (file)
@@ -48,8 +48,6 @@ public class Xcls_ClutterFiles : Object
     }
 
     // userdefined functions 
-
-    // skip |xns - no return type
     public void clearFiles() {
             
             this.filelayout.el.remove_all_children();
@@ -88,6 +86,8 @@ public class Xcls_ClutterFiles : Object
                                 this.el.get_stage().height);
                     this.el.set_position(100,50);
         }
+
+    // skip |xns - no return type
     public class Xcls_filelayout : Object 
     {
         public Clutter.Actor el;