"path" : "/home/alan/gitlive/app.Builder.js/src/Builder4/WindowRooView.bjs",
"permname" : "",
"modOrder" : "",
+ "build_module" : "",
"items" : [
{
"id" : "WindowRooView",
- "| 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\n Gdk.Pixbuf screenshot = Gdk.pixbuf_get_from_window(win, 0, 0, width, this.el.position);\n\n screenshot.save(filename,\"png\");\n return;\n \n \n \n \n \n \n \n var p = new WebKit.PrintOperation(_this.view.el);\n \n var ps = new Gtk.PrintSettings();\n ps.set_printer(\"Print to File\");\n ps.set(\"output-file-format\", \"pdf\");\n ps.set(\"output-uri\", \"file://\" + filename + \".pdf\");\n\n // find the printer...\n \n /*\n var ar = Gtk.PaperSize.get_paper_sizes(false);\n var psetup = new Gtk.PageSetup();\n for(var i = 0; i < ar.length(); i++) {\n if (ar.nth_data(i).get_name() ==\"iso_a4\") {\n psetup.set_paper_size(ar.nth_data(i));\n }\n }\n psetup.set_orientation(Gtk.PageOrientation.LANDSCAPE);\n \n \n p.set_page_setup(psetup);\n */\n p.set_print_settings(ps);\n \n p.finished.connect(() => {\n print(\"creating thumbnail for \" + filename + \".pdf\\n\"); \n var s = new Cairo.PdfSurface(filename + \".pdf\", 400,400);\n \n s.write_to_png (filename);\n \n // var f = GLib.File.new_for_path (filename + \".pdf\");\n // f.delete();\n });\n \n \n p.print();\n \n // should we hold until it's printed...\n \n \n\n \n \n\n\n \n \n}\n",
"| void loadFile" : "(JsRender.JsRender file)\n{\n this.file = file;\n this.view.renderJS(true);\n}",
+ "| 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\n Gdk.Pixbuf screenshot = Gdk.pixbuf_get_from_window(win, 0, 0, width, this.el.position);\n\n screenshot.save(filename,\"png\");\n return;\n \n \n \n \n \n \n \n var p = new WebKit.PrintOperation(_this.view.el);\n \n var ps = new Gtk.PrintSettings();\n ps.set_printer(\"Print to File\");\n ps.set(\"output-file-format\", \"pdf\");\n ps.set(\"output-uri\", \"file://\" + filename + \".pdf\");\n\n // find the printer...\n \n /*\n var ar = Gtk.PaperSize.get_paper_sizes(false);\n var psetup = new Gtk.PageSetup();\n for(var i = 0; i < ar.length(); i++) {\n if (ar.nth_data(i).get_name() ==\"iso_a4\") {\n psetup.set_paper_size(ar.nth_data(i));\n }\n }\n psetup.set_orientation(Gtk.PageOrientation.LANDSCAPE);\n \n \n p.set_page_setup(psetup);\n */\n p.set_print_settings(ps);\n \n p.finished.connect(() => {\n print(\"creating thumbnail for \" + filename + \".pdf\\n\"); \n var s = new Cairo.PdfSurface(filename + \".pdf\", 400,400);\n \n s.write_to_png (filename);\n \n // var f = GLib.File.new_for_path (filename + \".pdf\");\n // f.delete();\n });\n \n \n p.print();\n \n // should we hold until it's printed...\n \n \n\n \n \n\n\n \n \n}\n",
"* pack" : "add",
- "xtype" : "VPaned",
+ "xtype" : "Paned",
"# JsRender.JsRender file" : "",
"| void requestRedraw" : "() {\n this.view.renderJS(false);\n}",
"$ xns" : "Gtk",
+ "Gtk.Orientation orientation" : "Gtk.Orientation.VERTICAL",
"items" : [
{
"id" : "viewbox",
+ "xtype" : "Box",
"* pack" : "pack1,true,true",
- "xtype" : "VBox",
"$ 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" : "HBox",
"$ xns" : "Gtk",
+ "Gtk.Orientation orientation" : "Gtk.Orientation.HORIZONTAL",
"$ homogeneous" : true,
"items" : [
{
"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"
static Xcls_WindowRooView _WindowRooView;
-public class Xcls_WindowRooView : Object
+public class Xcls_WindowRooView : Object
{
- public Gtk.VPaned el;
+ public Gtk.Paned el;
private Xcls_WindowRooView _this;
public static Xcls_WindowRooView singleton()
// my vars (def)
public JsRender.JsRender file;
- // ctor
+ // ctor
public Xcls_WindowRooView()
{
_this = this;
- this.el = new Gtk.VPaned();
+ this.el = new Gtk.Paned( Gtk.Orientation.VERTICAL );
// my vars (dec)
this.el.pack2 ( child_1.el , true,true );
}
- // user defined functions
+ // user defined functions
+ public void loadFile (JsRender.JsRender file)
+ {
+ this.file = file;
+ this.view.renderJS(true);
+ }
public void createThumb () {
- }
- public void loadFile (JsRender.JsRender file)
- {
- this.file = file;
- this.view.renderJS(true);
}
public void requestRedraw () {
this.view.renderJS(false);
}
- public class Xcls_viewbox : Object
+ public class Xcls_viewbox : Object
{
- public Gtk.VBox el;
+ public Gtk.Box el;
private Xcls_WindowRooView _this;
// my vars (def)
- // ctor
+ // ctor
public Xcls_viewbox(Xcls_WindowRooView _owner )
{
_this = _owner;
_this.viewbox = this;
- this.el = new Gtk.VBox( false, 0 );
+ this.el = new Gtk.Box( Gtk.Orientation.VERTICAL, 0 );
// my vars (dec)
// set gobject values
+ this.el.homogeneous = false;
var child_0 = new Xcls_HBox3( _this );
child_0.ref();
this.el.pack_start ( child_0.el , false,true,0 );
this.el.pack_end ( child_1.el , true,true,0 );
}
- // user defined functions
+ // user defined functions
}
- public class Xcls_HBox3 : Object
+ public class Xcls_HBox3 : Object
{
public Gtk.HBox el;
private Xcls_WindowRooView _this;
// my vars (def)
- // ctor
+ // ctor
public Xcls_HBox3(Xcls_WindowRooView _owner )
{
_this = _owner;
// set gobject values
this.el.height_request = 20;
+ this.el.orientation = Gtk.Orientation.HORIZONTAL;
this.el.vexpand = false;
var child_0 = new Xcls_Button4( _this );
child_0.ref();
this.el.pack_start ( child_2.el , false,false,0 );
}
- // user defined functions
+ // user defined functions
}
- public class Xcls_Button4 : Object
+ public class Xcls_Button4 : Object
{
public Gtk.Button el;
private Xcls_WindowRooView _this;
// my vars (def)
- // ctor
+ // ctor
public Xcls_Button4(Xcls_WindowRooView _owner )
{
_this = _owner;
// set gobject values
this.el.label = "Redraw";
- // listeners
+ //listeners
this.el.clicked.connect( ( ) => {
_this.view.renderJS( true);
});
}
- // user defined functions
+ // user defined functions
}
- public class Xcls_AutoRedraw : Object
+
+ public class Xcls_AutoRedraw : Object
{
public Gtk.CheckButton el;
private Xcls_WindowRooView _this;
// my vars (def)
- // ctor
+ // ctor
public Xcls_AutoRedraw(Xcls_WindowRooView _owner )
{
_this = _owner;
this.el.active = true;
this.el.label = "Auto Redraw On";
- // listeners
+ //listeners
this.el.toggled.connect( (state) => {
this.el.set_label(this.el.active ? "Auto Redraw On" : "Auto Redraw Off");
});
}
- // user defined functions
+ // user defined functions
}
- public class Xcls_Button6 : Object
+
+ public class Xcls_Button6 : Object
{
public Gtk.Button el;
private Xcls_WindowRooView _this;
// my vars (def)
- // ctor
+ // ctor
public Xcls_Button6(Xcls_WindowRooView _owner )
{
_this = _owner;
// set gobject values
this.el.label = "Full Redraw";
- // listeners
+ //listeners
this.el.clicked.connect( () => {
_this.view.redraws = 99;
_this.view.el.web_context.clear_cache();
});
}
- // user defined functions
+ // user defined functions
}
- public class Xcls_viewcontainer : Object
+
+
+ public class Xcls_viewcontainer : Object
{
public Gtk.ScrolledWindow el;
private Xcls_WindowRooView _this;
// my vars (def)
- // ctor
+ // ctor
public Xcls_viewcontainer(Xcls_WindowRooView _owner )
{
_this = _owner;
child_0.ref();
this.el.add ( child_0.el );
- // init method
+ // init method
this.el.set_policy(Gtk.PolicyType.AUTOMATIC, Gtk.PolicyType.AUTOMATIC);
}
- // user defined functions
+ // user defined functions
}
- public class Xcls_view : Object
+ public class Xcls_view : Object
{
public WebKit.WebView el;
private Xcls_WindowRooView _this;
public string runhtml;
public bool pendingRedraw;
- // ctor
+ // ctor
public Xcls_view(Xcls_WindowRooView _owner )
{
_this = _owner;
// set gobject values
- // init method
+ // init method
{
// this may not work!?
}
- // listeners
+ //listeners
this.el.script_dialog.connect( (dialog) => {
if (this.el == null) {
return true;
});
}
- // user defined functions
+ // user defined functions
public void reInit () {
print("reInit?");
// if this happens destroy the webkit..
this.refreshRequired = true;
}
}
- public class Xcls_inspectorcontainer : Object
+
+
+
+ public class Xcls_inspectorcontainer : Object
{
public Gtk.ScrolledWindow el;
private Xcls_WindowRooView _this;
// my vars (def)
- // ctor
+ // ctor
public Xcls_inspectorcontainer(Xcls_WindowRooView _owner )
{
_this = _owner;
// set gobject values
this.el.shadow_type = Gtk.ShadowType.IN;
- // init method
+ // init method
this.el.set_policy(Gtk.PolicyType.AUTOMATIC, Gtk.PolicyType.AUTOMATIC);
}
- // user defined functions
+ // user defined functions
}
+
}