X-Git-Url: http://git.roojs.org/?a=blobdiff_plain;f=src%2FBuilder4%2FCodeInfo.vala;h=86a061fed5d7c3fec07151d130233fb25a74922f;hb=ee48badb20ee4af798c32c9b02bb5feb75d42beb;hp=d026b0f5da484ffd2c4a059995cfca3826d30014;hpb=c2fe6243f41b0b37f506607242a2d74c80e5127f;p=roobuilder diff --git a/src/Builder4/CodeInfo.vala b/src/Builder4/CodeInfo.vala index d026b0f5d..86a061fed 100644 --- a/src/Builder4/CodeInfo.vala +++ b/src/Builder4/CodeInfo.vala @@ -30,6 +30,10 @@ public class CodeInfo : Object } // user defined functions + public void show (Gtk.Widget onbtn) { + this.el.set_parent(onbtn); + this.el.popup(); + } public class Xcls_Paned1 : Object { public Gtk.Paned el; @@ -47,17 +51,167 @@ public class CodeInfo : Object // my vars (dec) // set gobject values - var child_1 = new Xcls_ScrolledWindow2( _this ); + var child_1 = new Xcls_Notebook2( _this ); + child_1.ref(); + this.el.end_child = child_1.el; + var child_2 = new Xcls_Box5( _this ); + child_2.ref(); + this.el.start_child = child_2.el; + } + + // user defined functions + } + public class Xcls_Notebook2 : Object + { + public Gtk.Notebook el; + private CodeInfo _this; + + + // my vars (def) + + // ctor + public Xcls_Notebook2(CodeInfo _owner ) + { + _this = _owner; + this.el = new Gtk.Notebook(); + + // my vars (dec) + + // set gobject values + var child_1 = new Xcls_NotebookPage3( _this , this); + child_1.ref(); + } + + // user defined functions + } + public class Xcls_NotebookPage3 : Object + { + public Gtk.NotebookPage el; + private CodeInfo _this; + + + // my vars (def) + public string tab_label; + + // ctor + public Xcls_NotebookPage3(CodeInfo _owner , Xcls_Notebook2 notebook) + { + _this = _owner; + + // my vars (dec) + this.tab_label = "Documentation"; + var child_1 = new Xcls_WebView4( _this ); + child_1.ref(); + notebook.el.append_page( child_1.el , new Gtk.Label(this.tab_label) ); + } + + // user defined functions + } + public class Xcls_WebView4 : Object + { + public WebKit.WebView el; + private CodeInfo _this; + + + // my vars (def) + + // ctor + public Xcls_WebView4(CodeInfo _owner ) + { + _this = _owner; + this.el = new WebKit.WebView(); + + // my vars (dec) + + // set gobject values + } + + // user defined functions + } + + + + public class Xcls_Box5 : Object + { + public Gtk.Box el; + private CodeInfo _this; + + + // my vars (def) + + // ctor + public Xcls_Box5(CodeInfo _owner ) + { + _this = _owner; + this.el = new Gtk.Box( Gtk.Orientation.VERTICAL, 0 ); + + // my vars (dec) + + // set gobject values + this.el.hexpand = true; + this.el.vexpand = true; + var child_1 = new Xcls_SearchBar6( _this ); child_1.ref(); - this.el.start_child = child_1.el; - var child_2 = new Xcls_Notebook4( _this ); + this.el.append( child_1.el ); + var child_2 = new Xcls_ScrolledWindow595( _this ); child_2.ref(); - this.el.end_child = child_2.el; + this.el.append( child_2.el ); + } + + // user defined functions + } + public class Xcls_SearchBar6 : Object + { + public Gtk.SearchBar el; + private CodeInfo _this; + + + // my vars (def) + + // ctor + public Xcls_SearchBar6(CodeInfo _owner ) + { + _this = _owner; + this.el = new Gtk.SearchBar(); + + // my vars (dec) + + // set gobject values + this.el.hexpand = true; + this.el.search_mode_enabled = true; + var child_1 = new Xcls_SearchEntry1881( _this ); + child_1.ref(); + this.el.child = child_1.el; + } + + // user defined functions + } + public class Xcls_SearchEntry1881 : Object + { + public Gtk.SearchEntry el; + private CodeInfo _this; + + + // my vars (def) + + // ctor + public Xcls_SearchEntry1881(CodeInfo _owner ) + { + _this = _owner; + this.el = new Gtk.SearchEntry(); + + // my vars (dec) + + // set gobject values + this.el.hexpand = true; + this.el.activates_default = true; } // user defined functions } - public class Xcls_ScrolledWindow2 : Object + + + public class Xcls_ScrolledWindow595 : Object { public Gtk.ScrolledWindow el; private CodeInfo _this; @@ -66,7 +220,7 @@ public class CodeInfo : Object // my vars (def) // ctor - public Xcls_ScrolledWindow2(CodeInfo _owner ) + public Xcls_ScrolledWindow595(CodeInfo _owner ) { _this = _owner; this.el = new Gtk.ScrolledWindow(); @@ -74,95 +228,212 @@ public class CodeInfo : Object // my vars (dec) // set gobject values - var child_1 = new Xcls_ListView3( _this ); + this.el.hexpand = true; + this.el.vexpand = true; + var child_1 = new Xcls_ColumnView596( _this ); child_1.ref(); this.el.child = child_1.el; } // user defined functions } - public class Xcls_ListView3 : Object + public class Xcls_ColumnView596 : Object { - public Gtk.ListView el; + public Gtk.ColumnView el; private CodeInfo _this; // my vars (def) // ctor - public Xcls_ListView3(CodeInfo _owner ) + public Xcls_ColumnView596(CodeInfo _owner ) { _this = _owner; - this.el = new Gtk.ListView( null, null ); + var child_1 = new Xcls_SingleSelection35( _this ); + child_1.ref(); + this.el = new Gtk.ColumnView( child_1.el ); // my vars (dec) // set gobject values + var child_2 = new Xcls_ColumnViewColumn597( _this ); + child_2.ref(); + this.el.append_column( child_2.el ); } // user defined functions } + public class Xcls_ColumnViewColumn597 : Object + { + public Gtk.ColumnViewColumn el; + private CodeInfo _this; + + + // my vars (def) + + // ctor + public Xcls_ColumnViewColumn597(CodeInfo _owner ) + { + _this = _owner; + var child_1 = new Xcls_SignalListItemFactory95( _this ); + child_1.ref(); + this.el = new Gtk.ColumnViewColumn( "Object Navigation", child_1.el ); + // my vars (dec) - public class Xcls_Notebook4 : Object + // set gobject values + this.el.expand = true; + } + + // user defined functions + } + public class Xcls_SignalListItemFactory95 : Object { - public Gtk.Notebook el; + public Gtk.SignalListItemFactory el; private CodeInfo _this; // my vars (def) // ctor - public Xcls_Notebook4(CodeInfo _owner ) + public Xcls_SignalListItemFactory95(CodeInfo _owner ) { _this = _owner; - this.el = new Gtk.Notebook(); + this.el = new Gtk.SignalListItemFactory(); // my vars (dec) // set gobject values - var child_1 = new Xcls_NotebookPage5( _this , this); - child_1.ref(); + + //listeners + this.el.setup.connect( (listitem) => { + + var expand = new Gtk.TreeExpander(); + + expand.set_indent_for_depth(true); + expand.set_indent_for_icon(true); + var hbox = new Gtk.Box(Gtk.Orientation.HORIZONTAL,0); + var icon = new Gtk.Image(); + var lbl = new Gtk.Label(""); + lbl.use_markup = true; + lbl.ellipsize = Pango.EllipsizeMode.END; + + icon.margin_end = 4; + lbl.justify = Gtk.Justification.LEFT; + lbl.xalign = 0; + + // listitem.activatable = true; ?? + + hbox.append(icon); + hbox.append(lbl); + expand.set_child(hbox); + ((Gtk.ListItem)listitem).set_child(expand); + + }); + this.el.bind.connect( (listitem) => { + // GLib.debug("listitme is is %s", ((Gtk.ListItem)listitem).get_type().name()); + + //var expand = (Gtk.TreeExpander) ((Gtk.ListItem)listitem).get_child(); + var expand = (Gtk.TreeExpander) ((Gtk.ListItem)listitem).get_child(); + + + var hbox = (Gtk.Box) expand.child; + + + var img = (Gtk.Image) hbox.get_first_child(); + var lbl = (Gtk.Label) img.get_next_sibling(); + + var lr = (Gtk.TreeListRow)((Gtk.ListItem)listitem).get_item(); + var node = (JsRender.Node) lr.get_item(); + if (node == null || node.fqn() == "") { + return; + } + + expand.set_hide_expander( !node.hasChildren() ); + expand.set_list_row(lr); + + node.bind_property("iconResourceName", + img, "resource", + GLib.BindingFlags.SYNC_CREATE); + + node.bind_property("nodeTitleProp", + lbl, "label", + GLib.BindingFlags.SYNC_CREATE); + node.bind_property("nodeTipProp", + lbl, "tooltip_markup", + GLib.BindingFlags.SYNC_CREATE); + // bind image... + + }); } // user defined functions } - public class Xcls_NotebookPage5 : Object + + + public class Xcls_SingleSelection35 : Object { - public Gtk.NotebookPage el; + public Gtk.SingleSelection el; private CodeInfo _this; // my vars (def) - public string tab_label; // ctor - public Xcls_NotebookPage5(CodeInfo _owner , Xcls_Notebook4 notebook) + public Xcls_SingleSelection35(CodeInfo _owner ) { _this = _owner; + var child_1 = new Xcls_TreeListModel58( _this ); + child_1.ref(); + this.el = new Gtk.SingleSelection( child_1.el ); // my vars (dec) - this.tab_label = "details"; - var child_1 = new Xcls_Box483( _this ); + + // set gobject values + } + + // user defined functions + } + public class Xcls_TreeListModel58 : Object + { + public Gtk.TreeListModel el; + private CodeInfo _this; + + + // my vars (def) + + // ctor + public Xcls_TreeListModel58(CodeInfo _owner ) + { + _this = _owner; + var child_1 = new Xcls_ListStore81( _this ); child_1.ref(); - notebook.el.append_page( child_1 , new Gtk.Label(this.tab_label) ); + this.el = new Gtk.TreeListModel( child_1.el, false, true, (item) => { + //fixme... + return ((JsRender.Node)item).childstore; +} + ); + + // my vars (dec) + + // set gobject values } // user defined functions } - public class Xcls_Box483 : Object + public class Xcls_ListStore81 : Object { - public Gtk.Box el; + public GLib.ListStore el; private CodeInfo _this; // my vars (def) // ctor - public Xcls_Box483(CodeInfo _owner ) + public Xcls_ListStore81(CodeInfo _owner ) { _this = _owner; - this.el = new Gtk.Box( Gtk.Orientation.HORIZONTAL, 0 ); + this.el = new GLib.ListStore( typeof(JsRender.Node) ); // my vars (dec) @@ -175,4 +446,7 @@ public class CodeInfo : Object + + + }