}
return _GtkView;
}
- public Xcls_view_layout_sw view_layout_sw;
public Xcls_view_layout view_layout;
public Xcls_container container;
public Xcls_compile_view compile_view;
// 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_view_layout_sw( _this );
+ var child_0 = new Xcls_ScrolledWindow2( _this );
child_0.ref();
this.el.pack1 ( child_0.el , true,true );
var child_1 = new Xcls_compile_view( _this );
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);
+
var x = new JsRender.NodeToGtk(file.tree);
var obj = x.munge() as Gtk.Widget;
}
- public class Xcls_view_layout_sw : Object
+ public class Xcls_ScrolledWindow2 : Object
{
public Gtk.ScrolledWindow el;
private Xcls_GtkView _this;
// my vars (def)
// ctor
- public Xcls_view_layout_sw(Xcls_GtkView _owner )
+ public Xcls_ScrolledWindow2(Xcls_GtkView _owner )
{
_this = _owner;
- _this.view_layout_sw = this;
this.el = new Gtk.ScrolledWindow( null, null );
// my vars (dec)