// my vars (def)
public Gtk.Widget lastObj;
+ public int width;
public JsRender.JsRender file;
+ public int height;
// ctor
public Xcls_GtkView()
// my vars (dec)
this.lastObj = null;
+ this.width = 0;
this.file = null;
+ this.height = 0;
// set gobject values
var child_0 = new Xcls_ScrolledWindow2( _this );
child_0.ref();
- this.el.pack_start ( child_0.el , true,true );
+ this.el.pack1 ( child_0.el , true,true );
var child_1 = new Xcls_compile_view( _this );
child_1.ref();
this.el.pack2 ( child_1.el , true,true );
// listeners
- this.el.show.connect( () => {
- _this.compile_view.el.hide();
+ this.el.size_allocate.connect( (aloc) => {
- });
+ this.width = aloc.width;
+ this.height =aloc.height;
+ });
}
// user defined functions
// hide the compile view at present..
- uint w,h;
+ var w = this.width;
+ var h = this.height;
- _this.view_layout.el.get_size(out w, out h);
+ print("ALLOC SET SIZES %d, %d\n", w,h);
// set the container size min to 500/500 or 20 px less than max..
- w = uint.max (w-20, 500);
- h = uint.max (h-20, 500);
- _this.container.el.set_size_request((int)w,(int)h);
+ w = int.max (w-20, 500);
+ h = int.max (h-20, 500);
+
+ print("SET SIZES %d, %d\n", w,h);
+ _this.container.el.set_size_request(w,h);
+
+ _this.view_layout.el.set_size(w,h); // should be baded on calc.. -- see update_scrolled.
+ var rgba = Gdk.RGBA ();
+ rgba.parse ("#ccc");
+ _this.view_layout.el.override_background_color(Gtk.StateFlags.NORMAL, rgba);
- _this.view_layout.el.set_size(1000,1000); // should be baded on calc.. -- see update_scrolled.
var x = new JsRender.NodeToGtk(file.tree);
var obj = x.munge() as Gtk.Widget;