"size_allocate" : "(aloc) => {\n\n this.width = aloc.width;\n this.height =aloc.height;\n }\n"
},
"id" : "GtkView",
- "# 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\n Gdk.Pixbuf screenshot = Gdk.pixbuf_get_from_window(win, 0, 0, width, height); // this.el.position?\n\n screenshot.save(filename,\"png\");\n return;\n \n \n \n \n \n \n \n // should we hold until it's printed...\n \n \n\n \n \n\n\n \n \n}\n",
+ "# Gtk.Widget lastObj" : "null",
"| void loadFile" : "(JsRender.JsRender file) \n{\n this.file = null;\n \n if (file.tree == null) {\n return;\n }\n this.file = file;\n if (this.lastObj != null) {\n this.container.el.remove(this.lastObj);\n }\n \n // hide the compile view at present..\n \n \n var w = this.width;\n var h = this.height;\n \n print(\"ALLOC SET SIZES %d, %d\\n\", w,h); \n \n // set the container size min to 500/500 or 20 px less than max..\n w = int.max (w-20, 500);\n h = int.max (h-20, 500); \n \n print(\"SET SIZES %d, %d\\n\", w,h); \n _this.container.el.set_size_request(w,h);\n \n _this.view_layout.el.set_size(w,h); // should be baded on calc.. -- see update_scrolled.\n var rgba = Gdk.RGBA ();\n rgba.parse (\"#ccc\");\n _this.view_layout.el.override_background_color(Gtk.StateFlags.NORMAL, rgba);\n \n \n\tvar x = new JsRender.NodeToGtk(file.tree);\n var obj = x.munge() as Gtk.Widget;\n this.lastObj = null;\n\tif (obj == null) {\n \treturn;\n\t}\n\tthis.lastObj = obj;\n \n this.container.el.add(obj);\n obj.show_all();\n \n \n \n}\n ",
"int width" : 0,
"Xcls_MainWindow main_window" : "",
"int height" : 0,
"$ xns" : "Gtk",
"items" : [
+ {
+ "* pack" : "pack_start,?bool?,?bool?,?uint?",
+ "xtype" : "Notebook",
+ "$ xns" : "Gtk"
+ },
{
"* pack" : "pack_start,true,true,0",
"xtype" : "ScrolledWindow",
"items" : [
{
"id" : "view_layout",
- "* pack" : "add",
"xtype" : "Layout",
+ "* pack" : "add",
"$ xns" : "Gtk",
"items" : [
{
"id" : "container",
- "xtype" : "HBox",
"* pack" : "put,10,10",
+ "xtype" : "HBox",
"$ xns" : "Gtk"
}
]
static Xcls_GtkView _GtkView;
-public class Xcls_GtkView : Object
+public class Xcls_GtkView : Object
{
public Gtk.VBox el;
private Xcls_GtkView _this;
public JsRender.JsRender file;
public int height;
- // ctor
+ // ctor
public Xcls_GtkView()
{
_this = this;
this.height = 0;
// set gobject values
- var child_0 = new Xcls_ScrolledWindow2( _this );
+ var child_0 = new Xcls_Notebook2( _this );
child_0.ref();
- this.el.pack_start ( child_0.el , true,true,0 );
+ this.el.pack_start ( child_0.el , ?bool?,?bool?,?uint? );
+ var child_1 = new Xcls_ScrolledWindow3( _this );
+ child_1.ref();
+ this.el.pack_start ( child_1.el , true,true,0 );
- // listeners
+ //listeners
this.el.size_allocate.connect( (aloc) => {
this.width = aloc.width;
});
}
- // user defined functions
+ // user defined functions
public void createThumb () {
}
- public class Xcls_ScrolledWindow2 : Object
+ public class Xcls_Notebook2 : Object
+ {
+ public Gtk.Notebook el;
+ private Xcls_GtkView _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_Notebook2(Xcls_GtkView _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.Notebook();
+
+ // my vars (dec)
+
+ // set gobject values
+ }
+
+ // user defined functions
+ }
+
+ public class Xcls_ScrolledWindow3 : Object
{
public Gtk.ScrolledWindow el;
private Xcls_GtkView _this;
// my vars (def)
- // ctor
- public Xcls_ScrolledWindow2(Xcls_GtkView _owner )
+ // ctor
+ public Xcls_ScrolledWindow3(Xcls_GtkView _owner )
{
_this = _owner;
this.el = new Gtk.ScrolledWindow( null, null );
this.el.add ( child_0.el );
}
- // user defined functions
+ // user defined functions
}
- public class Xcls_view_layout : Object
+ public class Xcls_view_layout : Object
{
public Gtk.Layout el;
private Xcls_GtkView _this;
// my vars (def)
- // ctor
+ // ctor
public Xcls_view_layout(Xcls_GtkView _owner )
{
_this = _owner;
this.el.put ( child_0.el , 10,10 );
}
- // user defined functions
+ // user defined functions
}
- public class Xcls_container : Object
+ public class Xcls_container : Object
{
public Gtk.HBox el;
private Xcls_GtkView _this;
// my vars (def)
- // ctor
+ // ctor
public Xcls_container(Xcls_GtkView _owner )
{
_this = _owner;
// set gobject values
}
- // user defined functions
+ // user defined functions
}
+
+
+
}