public override string toSource()
{
-
-
- if (this.tree == null) {
- return "";
- }
-
- // var data = JSON.parse(JSON.stringify(this.items[0]));
- // we should base this on the objects in the tree really..
- string[] inc = { "Gtk", "Gdk", "Pango", "GLib", "Gio", "GObject",
- "GtkSource", "WebKit", "Vte" }; //, "GtkClutter" , "Gdl"];
- var src = "";
-
- for (var i=0; i< inc.length; i++) {
- var e = inc[i];
- src += e+" = imports.gi." + e +";\n";
- }
-
- src += "console = imports.console;\n"; // path?!!?
- src += "XObject = imports.XObject.XObject;\n"; // path?!!?
-
-
- src += this.name + "=new XObject("+ this.mungeToString(" ") + ");\n";
- src += this.name + ".init();\n";
- // register it in the cache
- src += "XObject.cache['/" + this.name + "'] = " + this.name + ";\n";
-
-
- return src;
+ return "";
+
}