"* prop" : "image",
"bool has_default" : true,
"int icon_size" : 33,
+ "string icon_name" : "\"\"",
"xtype" : "Image"
}
],
"string label" : "xxxcc",
"xtype" : "Button"
},
+ {
+ "$ xns" : "Gtk",
+ "string label" : "xxxcc",
+ "xtype" : "Button"
+ },
{
"$ xns" : "Gtk",
"string label" : "xxxcc",
}
],
"xtype" : "ButtonBox"
+ },
+ {
+ "$ xns" : "Gtk",
+ "* prop" : "_menu",
+ "xtype" : "Menu"
+ },
+ {
+ "$ xns" : "Gtk",
+ "bool has_entry" : false,
+ "xtype" : "ComboBox"
+ },
+ {
+ "$ xns" : "Gtk",
+ "xtype" : "GLArea"
}
],
"xtype" : "Box"
// set gobject values
this.el.has_default = true;
+ this.el.icon_name = "\"\"";
this.el.halign = Gtk.Align.CENTER;
this.el.icon_size = 33;
}
var child_0 = new Xcls_ButtonBox5( _this );
child_0.ref();
this.el.add( child_0.el );
+ var child_1 = new Xcls_Menu9( _this );
+ child_1.ref();
+ this.el._menu = child_1.el;
+ var child_2 = new Xcls_ComboBox10( _this );
+ child_2.ref();
+ this.el.add( child_2.el );
+ var child_3 = new Xcls_GLArea11( _this );
+ child_3.ref();
+ this.el.add( child_3.el );
}
// user defined functions
var child_1 = new Xcls_Button7( _this );
child_1.ref();
this.el.add( child_1.el );
+ var child_2 = new Xcls_Button8( _this );
+ child_2.ref();
+ this.el.add( child_2.el );
}
// user defined functions
// user defined functions
}
+ public class Xcls_Button8 : Object
+ {
+ public Gtk.Button el;
+ private GladeView _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_Button8(GladeView _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.Button();
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.label = "xxxcc";
+ }
+
+ // user defined functions
+ }
+
+
+ public class Xcls_Menu9 : Object
+ {
+ public Gtk.Menu el;
+ private GladeView _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_Menu9(GladeView _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.Menu();
+
+ // my vars (dec)
+
+ // set gobject values
+ }
+
+ // user defined functions
+ }
+
+ public class Xcls_ComboBox10 : Object
+ {
+ public Gtk.ComboBox el;
+ private GladeView _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_ComboBox10(GladeView _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.ComboBox();
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.has_entry = false;
+ }
+
+ // user defined functions
+ }
+
+ public class Xcls_GLArea11 : Object
+ {
+ public Gtk.GLArea el;
+ private GladeView _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_GLArea11(GladeView _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.GLArea();
+
+ // my vars (dec)
+
+ // set gobject values
+ }
+
+ // user defined functions
+ }
}
" _this.main_window.windowstate.file.palete().on_child_added(parentNode,node);",
" ",
" ",
- " ",
+ " this.iterSetValues(n_iter, node);",
" // add the node...",
- " ",
- " this.el.set(n_iter, 0, node.nodeTitle(), 1, node.nodeTip(), -1 );",
- " var o = GLib.Value(typeof(Object));",
- " o.set_object((Object)node);",
- " ",
- " this.el.set_value(n_iter, 2, o);",
- " ",
- " ",
+ " ",
" ",
" ",
"\t\t// load children - if it has any..",
"}",
""
],
+ "| void iterSetValues" : [
+ "(Gtk.TreeIter iter, JsRender.Node node) {",
+ "\tvar ic = Gtk.IconTheme.get_default();",
+ " Gdk.Pixbuf pix;",
+ " ",
+ " var o = GLib.Value(typeof(Object));",
+ " o.set_object((Object)node);",
+ " var clsname = node.fqn();",
+ " ",
+ " var clsb = clsname.split(\".\");",
+ " var sub = clsb.length > 1 ? clsb[1].down() : \"\";",
+ " ",
+ " ",
+ " var fn = \"/usr/share/glade/pixmaps/hicolor/16x16/actions/widget-gtk-\" + sub + \".png\";",
+ " if (FileUtils.test (fn, FileTest.IS_REGULAR)) {",
+ " pix = new Gdk.Pixbuf.from_file (fn);",
+ " } else {",
+ " \tpix = ic.load_icon(\"emblem-new\", 16,0);",
+ " }",
+ " ",
+ " this.el.set(",
+ " \t\titer, ",
+ " \t\t0, node.nodeTitle(),",
+ " 1, node.nodeTip(), ",
+ " -1",
+ " );",
+ " this.el.set_value(iter, 2,o);",
+ " this.el.set_value(iter, 3,pix); ",
+ "",
+ " ",
+ "",
+ "}"
+ ],
"| void load" : [
"(Gee.ArrayList<JsRender.Node> tr, Gtk.TreeIter? iter) ",
"{",
" Gtk.TreeIter citer;",
" //this.insert(citer,iter,0);",
- " var ic = Gtk.IconTheme.get_default();",
- " var pixdef = ic.load_icon(\"emblem-new\", 16,0);",
+ " ",
" ",
" for(var i =0 ; i < tr.size; i++) {",
" if (iter != null) {",
" } else {",
" this.el.append(out citer,null);",
" }",
+ " this.iterSetValues(citer, tr.get(i));",
" ",
- " this.el.set(citer, 0, tr.get(i).nodeTitle(),",
- " 1, tr.get(i).nodeTip(), -1",
- " );",
- " var o = GLib.Value(typeof(Object));",
- " o.set_object((Object)tr.get(i));",
- " ",
- " this.el.set_value(citer, 2, o);",
- " ",
- " var clsname = tr.get(i).fqn();",
- " ",
- " var clsb = clsname.split(\".\");",
- " var sub = clsb.length > 1 ? clsb[1].down() : \"\";",
- " ",
- " var pix = pixdef;",
- " var fn = \"/usr/share/glade/pixmaps/hicolor/16x16/actions/widget-gtk-\" + sub + \".png\";",
- " if (FileUtils.test (fn, FileTest.IS_REGULAR)) {",
- "\t pix = new Gdk.Pixbuf.from_file (fn);",
- " }",
- " ",
- " ",
- " this.el.set_value(citer, 3, pix );",
- " ",
- " ",
- " ",
- " ",
- " ",
+ " ",
+ " ",
" if (tr.get(i).items.size > 0) {",
" this.load(tr.get(i).items, citer);",
" }",
"items" : [
{
"$ xns" : "Gtk",
- "* pack" : "pack_start,true",
+ "* pack" : "pack_start,false",
"id" : "iconrender",
+ "int width" : 16,
"xtype" : "CellRendererPixbuf"
},
{
return "";
+ }
+ public void iterSetValues (Gtk.TreeIter iter, JsRender.Node node) {
+ var ic = Gtk.IconTheme.get_default();
+ Gdk.Pixbuf pix;
+
+ var o = GLib.Value(typeof(Object));
+ o.set_object((Object)node);
+ var clsname = node.fqn();
+
+ var clsb = clsname.split(".");
+ var sub = clsb.length > 1 ? clsb[1].down() : "";
+
+
+ var fn = "/usr/share/glade/pixmaps/hicolor/16x16/actions/widget-gtk-" + sub + ".png";
+ if (FileUtils.test (fn, FileTest.IS_REGULAR)) {
+ pix = new Gdk.Pixbuf.from_file (fn);
+ } else {
+ pix = ic.load_icon("emblem-new", 16,0);
+ }
+
+ this.el.set(
+ iter,
+ 0, node.nodeTitle(),
+ 1, node.nodeTip(),
+ -1
+ );
+ this.el.set_value(iter, 2,o);
+ this.el.set_value(iter, 3,pix);
+
+
+
}
public string treePathFromNode (JsRender.Node node) {
// iterate through the tree and find the node
_this.main_window.windowstate.file.palete().on_child_added(parentNode,node);
-
+ this.iterSetValues(n_iter, node);
// add the node...
-
- this.el.set(n_iter, 0, node.nodeTitle(), 1, node.nodeTip(), -1 );
- var o = GLib.Value(typeof(Object));
- o.set_object((Object)node);
-
- this.el.set_value(n_iter, 2, o);
-
-
+
// load children - if it has any..
{
Gtk.TreeIter citer;
//this.insert(citer,iter,0);
- var ic = Gtk.IconTheme.get_default();
- var pixdef = ic.load_icon("emblem-new", 16,0);
+
for(var i =0 ; i < tr.size; i++) {
if (iter != null) {
} else {
this.el.append(out citer,null);
}
+ this.iterSetValues(citer, tr.get(i));
- this.el.set(citer, 0, tr.get(i).nodeTitle(),
- 1, tr.get(i).nodeTip(), -1
- );
- var o = GLib.Value(typeof(Object));
- o.set_object((Object)tr.get(i));
-
- this.el.set_value(citer, 2, o);
-
- var clsname = tr.get(i).fqn();
-
- var clsb = clsname.split(".");
- var sub = clsb.length > 1 ? clsb[1].down() : "";
-
- var pix = pixdef;
- var fn = "/usr/share/glade/pixmaps/hicolor/16x16/actions/widget-gtk-" + sub + ".png";
- if (FileUtils.test (fn, FileTest.IS_REGULAR)) {
- pix = new Gdk.Pixbuf.from_file (fn);
- }
-
-
- this.el.set_value(citer, 3, pix );
-
-
-
-
-
+
+
if (tr.get(i).items.size > 0) {
this.load(tr.get(i).items, citer);
}
this.el.title = "test";
var child_0 = new Xcls_iconrender( _this );
child_0.ref();
- this.el.pack_start ( child_0.el , true );
+ this.el.pack_start ( child_0.el , false );
var child_1 = new Xcls_renderer( _this );
child_1.ref();
this.el.pack_start ( child_1.el , true );
// my vars (dec)
// set gobject values
+ this.el.width = 16;
}
// user defined functions