resources/RooUsage.txt
[app.Builder.js] / src / Builder4 / WindowAddProp.bjs
index 6e33494..423580f 100644 (file)
@@ -1,61 +1,62 @@
 {
-    "id": "file-gtk-14",
-    "name": "WindowAddProp",
-    "parent": "",
-    "title": false,
-    "path": "/home/alan/gitlive/app.Builder.js/Builder4/WindowAddProp.bjs",
-    "items": [
+ "name" : "WindowAddProp",
+ "parent" : "",
+ "title" : "",
+ "path" : "/home/alan/gitlive/app.Builder.js/src/Builder4/WindowAddProp.bjs",
+ "permname" : "",
+ "modOrder" : "",
+ "build_module" : "builder",
+ "items" : [
+  {
+   "id" : "WindowAddProp",
+   "$ shadow_type" : "Gtk.ShadowType.IN",
+   "* init" : "    this.el.set_policy (Gtk.PolicyType.AUTOMATIC, Gtk.PolicyType.AUTOMATIC);\n ",
+   "| void show" : "(Palete.Palete pal, string etype, string xtype) {\n    this.model.el.clear();\n\n    Gtk.TreeIter iter;\n    var elementList = pal.getPropertiesFor( xtype,etype);\n    \n    \n    //print (\"GOT \" + elementList.length + \" items for \" + fullpath + \"|\" + type);\n           // console.dump(elementList);\n           \n    var miter = elementList.map_iterator();\n    while (miter.next()) {\n       var p = miter.get_value();\n        \n        this.model.el.append(out iter);\n\n        this.model.el.set(iter,\n                0,  p.name, \n                1, p.type,\n                2, \"<b>\" + p.name +\"</b> <i>\"+p.type+\"</i>\\n\" + \n                        GLib.Markup.escape_text(p.doctxt),\n                3, p.sig,\n                4, \"<b>\" + p.name +\"</b> <span size=\\\"small\\\"><i>\"+p.type+\"</i></span>\",\n                5, etype,\n                -1\n        );\n    }\n    this.model.el.set_sort_column_id(0,Gtk.SortType.ASCENDING);\n                             \n}\n",
+   "xtype" : "ScrolledWindow",
+   "@ void select" : "(string key, string type, string skel, string etype)",
+   "$ xns" : "Gtk",
+   "| void clear" : "() {\n    this.model.el.clear();\n\n}",
+   "items" : [
+    {
+     "listeners" : {
+      "row_activated" : "(path, column)  => {\n\n        Gtk.TreeIter iter;\n\n\n        var m = _this.model;\n        \n        m.el.get_iter(out iter,path);\n        \n        \n        // var val = \"\";\n        \n        \n        var key = m.getValue(iter, 0);\n        \n        var type = m.getValue(iter, 1);\n        var skel = m.getValue(iter, 3);\n        var etype = m.getValue(iter, 5);\n        \n        \n        _this.select(key,etype == \"signals\" ? \"\" : type,skel, etype);\n        \n}\n "
+     },
+     "* init" : "{  \n       var description = new Pango.FontDescription();\n     description.set_size(8000);\n    this.el.override_font(description);     \n                    \n    this.el.get_selection().set_mode( Gtk.SelectionMode.SINGLE);\n \n\n    \n  \n    \n}\n",
+     "tooltip_column" : 2,
+     "xtype" : "TreeView",
+     "* pack" : "add",
+     "$ enable_tree_lines" : true,
+     "$ headers_visible" : true,
+     "$ xns" : "Gtk",
+     "items" : [
+      {
+       "| string getValue" : "(Gtk.TreeIter iter, int col)\n{\n\n    GLib.Value value;\n    this.el.get_value(iter, col, out value);\n\n    return (string)value;\n    \n}",
+       "id" : "model",
+       "* pack" : "set_model",
+       "xtype" : "ListStore",
+       "$ columns" : "typeof(string),  // 0 real key\ntypeof(string), // 1 real type\ntypeof(string), // 2 docs ?\ntypeof(string), // 3 visable desc\ntypeof(string), // 4 function desc\ntypeof(string) // 5 element type (event|prop)\n        ",
+       "n_columns" : 6,
+       "$ xns" : "Gtk"
+      },
+      {
+       "id" : "namecol",
+       "utf8 title" : "Double click to add",
+       "* init" : "  this.el.add_attribute(_this.namerender.el , \"markup\", 4  );\n \n",
+       "xtype" : "TreeViewColumn",
+       "* pack" : "append_column",
+       "$ xns" : "Gtk",
+       "items" : [
         {
-            "|void:clear": "() {\n    this.model.el.clear();\n\n}",
-            ".signal:void:select": "(string key, string type, string skel, string etype)",
-            "id": "WindowAddProp",
-            "xtype": "ScrolledWindow",
-            "|init": "    this.el.set_policy (Gtk.PolicyType.AUTOMATIC, Gtk.PolicyType.AUTOMATIC);\n ",
-            "|shadow_type": "Gtk.ShadowType.IN",
-            "|void:show": "(Palete.Palete pal, string etype, string xtype) {\n    this.model.el.clear();\n\n    Gtk.TreeIter iter;\n    var elementList = pal.getPropertiesFor( xtype,etype);\n    \n    \n    //print (\"GOT \" + elementList.length + \" items for \" + fullpath + \"|\" + type);\n           // console.dump(elementList);\n           \n    var miter = elementList.map_iterator();\n    while (miter.next()) {\n       var p = miter.get_value();\n        \n        this.model.el.append(out iter);\n\n        this.model.el.set(iter,\n                0,  p.name, \n                1, p.type,\n                2, \"<b>\" + p.name +\"</b> <i>\"+p.type+\"</i>\\n\" + \n                        GLib.Markup.escape_text(p.doctxt),\n                3, p.sig,\n                4, \"<b>\" + p.name +\"</b> <span size=\\\"small\\\"><i>\"+p.type+\"</i></span>\",\n                5, etype,\n                -1\n        );\n    }\n    this.model.el.set_sort_column_id(0,Gtk.SortType.ASCENDING);\n                             \n}\n",
-            "|xns": "Gtk",
-            "items": [
-                {
-                    "listeners": {
-                        "row_activated": "(path, column)  => {\n\n        Gtk.TreeIter iter;\n\n\n        var m = _this.model;\n        \n        m.el.get_iter(out iter,path);\n        \n        \n        // var val = \"\";\n        \n        \n        var key = m.getValue(iter, 0);\n        \n        var type = m.getValue(iter, 1);\n        var skel = m.getValue(iter, 3);\n        var etype = m.getValue(iter, 5);\n        \n        \n        _this.select(key,etype == \"signals\" ? \"\" : type,skel, etype);\n        \n}\n"
-                    },
-                    "pack": "add",
-                    "tooltip_column": 2,
-                    "xtype": "TreeView",
-                    "|enable_tree_lines": "true",
-                    "|headers_visible": "false",
-                    "|init": "{  \n       var description = new Pango.FontDescription();\n     description.set_size(8000);\n    this.el.modify_font(description);     \n                    \n    this.el.get_selection().set_mode( Gtk.SelectionMode.SINGLE);\n \n\n    \n  \n    \n}\n",
-                    "|xns": "Gtk",
-                    "items": [
-                        {
-                            "id": "model",
-                            "n_columns": 6,
-                            "pack": "set_model",
-                            "xtype": "ListStore",
-                            "|columns": "typeof(string),  // 0 real key\ntypeof(string), // 1 real type\ntypeof(string), // 2 docs ?\ntypeof(string), // 3 visable desc\ntypeof(string), // 4 function desc\ntypeof(string) // 5 element type (event|prop)\n        ",
-                            "|string:getValue": "(Gtk.TreeIter iter, int col)\n{\n\n    GLib.Value value;\n    this.el.get_value(iter, col, out value);\n\n    return (string)value;\n    \n}",
-                            "|xns": "Gtk"
-                        },
-                        {
-                            "id": "namecol",
-                            "pack": "append_column",
-                            "xtype": "TreeViewColumn",
-                            "|init": "  this.el.add_attribute(_this.namerender.el , \"markup\", 4  );\n \n",
-                            "|xns": "Gtk",
-                            "items": [
-                                {
-                                    "id": "namerender",
-                                    "pack": "pack_start,true",
-                                    "xtype": "CellRendererText",
-                                    "|xns": "Gtk"
-                                }
-                            ]
-                        }
-                    ]
-                }
-            ]
+         "id" : "namerender",
+         "* pack" : "pack_start,true",
+         "xtype" : "CellRendererText",
+         "$ xns" : "Gtk"
         }
-    ],
-    "permname": "",
-    "modOrder": ""
+       ]
+      }
+     ]
+    }
+   ]
+  }
+ ]
 }
\ No newline at end of file