"| void scroll_to_line" : "(int line) {\n this.notebook.el.page = 1;// code preview...\n \n GLib.Timeout.add(500, () => {\n \n \n\t \n\t \n\t\t var buf = this.sourceview.el.get_buffer();\n\t \n\t\tvar sbuf = (Gtk.SourceBuffer) buf;\n\n\n\t\tGtk.TextIter iter; \n\t\tsbuf.get_iter_at_line(out iter, line);\n\t\tthis.sourceview.el.scroll_to_iter(iter, 0.1f, true, 0.0f, 0.5f);\n\t\treturn false;\n\t}); \n\n \n}\n",
"id" : "WindowRooView",
"# Gtk.Widget lastObj" : "null",
- "| void createThumb" : "() {\n \n \n if (this.file == null) {\n return;\n }\n var filename = this.file.getIconFileName(false);\n \n var win = this.el.get_parent_window();\n var width = win.get_width();\n // var height = win.get_height();\n try { \n Gdk.Pixbuf screenshot = Gdk.pixbuf_get_from_window(win, 0, 0, width, this.paned.el.position);\n screenshot.save(filename,\"png\");\n } catch(Error e) {\n //noop\n }\n\n \n \n \n \n}\n",
+ "| void createThumb" : "() {\n \n \n if (this.file == null) {\n return;\n }\n\tif (this.notebook.el.page > 0 ) {\n return;\n }\n \n var filename = this.file.getIconFileName(false);\n \n var win = this.el.get_parent_window();\n var width = win.get_width();\n // var height = win.get_height();\n try { \n Gdk.Pixbuf screenshot = Gdk.pixbuf_get_from_window(win, 0, 0, width, this.paned.el.position);\n screenshot.save(filename,\"png\");\n } catch(Error e) {\n //noop\n }\n\n \n \n \n \n}\n",
"| void loadFile" : "\n(JsRender.JsRender file)\n{\n this.file = file;\n this.view.renderJS(true);\n this.notebook.el.page = 0;// gtk preview \n this.sourceview.loadFile(); \n \n}\n \n ",
"int width" : 0,
"bool hexpand" : true,
"items" : [
{
"id" : "notebook",
- "* pack" : "pack_start,true,true,0",
"xtype" : "Notebook",
+ "* pack" : "pack_start,true,true,0",
"$ xns" : "Gtk",
"items" : [
{
"id" : "label_preview",
- "* pack" : false,
"xtype" : "Label",
+ "* pack" : false,
"$ xns" : "Gtk",
"utf8 label" : "Preview"
},
{
"id" : "label_code",
- "xtype" : "Label",
"* pack" : false,
+ "xtype" : "Label",
"$ xns" : "Gtk",
"utf8 label" : "Preview Generated Code"
},
{
"id" : "paned",
- "* pack" : "add",
"xtype" : "Paned",
+ "* pack" : "add",
"$ xns" : "Gtk",
"Gtk.Orientation orientation" : "Gtk.Orientation.VERTICAL",
"items" : [
{
"id" : "viewbox",
- "* pack" : "pack1,true,true",
"xtype" : "Box",
+ "* pack" : "pack1,true,true",
"$ xns" : "Gtk",
"Gtk.Orientation orientation" : "Gtk.Orientation.VERTICAL",
"$ homogeneous" : false,
"items" : [
{
"$ vexpand" : false,
- "$ height_request" : 20,
"* pack" : "pack_start,false,true,0",
+ "$ height_request" : 20,
"xtype" : "Box",
"$ xns" : "Gtk",
"Gtk.Orientation orientation" : "Gtk.Orientation.HORIZONTAL",
"clicked" : "( ) => {\n _this.view.renderJS( true);\n}"
},
"label" : "Redraw",
- "xtype" : "Button",
"* pack" : "pack_start,false,false,0",
+ "xtype" : "Button",
"$ xns" : "Gtk"
},
{
"clicked" : " () => {\n _this.view.redraws = 99;\n _this.view.el.web_context.clear_cache(); \n //_this.view.renderJS(true);\n FakeServerCache.clear();\n _this.view.reInit();\n\n}"
},
"label" : "Full Redraw",
- "xtype" : "Button",
"* pack" : "pack_start,false,false,0",
+ "xtype" : "Button",
"$ xns" : "Gtk"
}
]
},
{
"id" : "viewcontainer",
- "* init" : " this.el.set_policy(Gtk.PolicyType.AUTOMATIC, Gtk.PolicyType.AUTOMATIC);\n \n",
"$ shadow_type" : "Gtk.ShadowType.IN",
+ "* init" : " this.el.set_policy(Gtk.PolicyType.AUTOMATIC, Gtk.PolicyType.AUTOMATIC);\n \n",
"* pack" : "pack_end,true,true,0",
"xtype" : "ScrolledWindow",
"$ xns" : "Gtk",
},
{
"id" : "inspectorcontainer",
- "* init" : " this.el.set_policy(Gtk.PolicyType.AUTOMATIC, Gtk.PolicyType.AUTOMATIC);\n \n",
"$ shadow_type" : "Gtk.ShadowType.IN",
+ "* init" : " this.el.set_policy(Gtk.PolicyType.AUTOMATIC, Gtk.PolicyType.AUTOMATIC);\n \n",
"xtype" : "ScrolledWindow",
"* pack" : "pack2,true,true",
"$ xns" : "Gtk"