{ "build_module" : "builder", "gen_extended" : false, "items" : [ { "$ xns" : "Gtk", "Gtk.PositionType position" : "Gtk.PositionType.TOP", "Xcls_MainWindow window" : "", "bool active" : true, "bool modal" : true, "id" : "ValaCompileResults", "int height_request" : 400, "int width_request" : 600, "items" : [ { "$ xns" : "Gtk", "* pack" : "set_child", "Gtk.Orientation orientation" : "Gtk.Orientation.VERTICAL", "bool hexpand" : true, "bool vexpand" : true, "gboolean homogeneous" : false, "id" : "compile_view", "items" : [ { "$ xns" : "Gtk", "* init" : [ "{", " this.el.set_policy (Gtk.PolicyType.AUTOMATIC, Gtk.PolicyType.AUTOMATIC);", " ", "", "}", "" ], "bool hexpand" : true, "bool vexpand" : true, "items" : [ { "$ xns" : "GtkSource", "* init" : [ "{", "", " \tthis.css = new Gtk.CssProvider();", "\t ", "\tthis.css.load_from_string(", "\t\t\"#compile-results-view { font: 10px monospace ;}\"", "\t);", "\t ", "\t\t\tGtk.StyleContext.add_provider_for_display(", "\t\tthis.el.get_display(),", "\t\tthis.css,", "\t\tGtk.STYLE_PROVIDER_PRIORITY_APPLICATION", "\t);", "\t\t", "", "}", "" ], "* prop" : "child", "Gtk.CssProvider css" : "", "bool editable" : false, "bool hexpand" : true, "bool show_line_numbers" : false, "bool vexpand" : true, "id" : "sourceview", "string name" : "compile-results-view", "xtype" : "View" } ], "xtype" : "ScrolledWindow" } ], "xtype" : "Box" } ], "xtype" : "Popover", "| void addLine" : [ "(string str) {", "\t ", "\t", "\t", "\tvar buf = (GtkSource.Buffer)this.sourceview.el.get_buffer();", "\tGtk.TextIter iter;", "\tbuf.get_end_iter (out iter);", "\tbuf.insert(ref iter, str, str.length);", "\t/// scroll..", "\tbuf.get_end_iter (out iter);", "\tthis.sourceview.el.scroll_to_iter(iter, 0.0f, true, 0.0f, 1.0f);", " ", "}", "" ], "| void show" : [ "( Gtk.Widget onbtn, bool reset) {", "\tvar win = this.window.el;", " var w = win.get_width();", " var h = win.get_height();", "", " // left tree = 250, editor area = 500?", " ", " var new_w = int.min(750, w-100);", " if (new_w > (w-100)) {", " new_w = w-100;", " }", " this.el.set_size_request( int.max(100, new_w), int.max(100, h-120));", " \tif (this.el.parent == null) {", "\t\tthis.el.set_parent(win);", "\t}", " // Gtk.Allocation rect;", "\t//onbtn.get_allocation(out rect);", " //this.el.set_pointing_to(rect);", "", " this.el.popup();", " // not sure why..", " ", " if (reset) {", "\t\tvar buf = (GtkSource.Buffer)this.sourceview.el.get_buffer();", "\t\tbuf.set_text(\"\",0);", "\t}", " ", " ", " ", " ", "}", "" ] } ], "name" : "ValaCompileResults" }