1 static Xcls_ValaCompileErrors _ValaCompileErrors;
3 public class Xcls_ValaCompileErrors : Object
6 private Xcls_ValaCompileErrors _this;
8 public static Xcls_ValaCompileErrors singleton()
10 if (_ValaCompileErrors == null) {
11 _ValaCompileErrors= new Xcls_ValaCompileErrors();
13 return _ValaCompileErrors;
15 public Xcls_compile_view compile_view;
16 public Xcls_compile_tree compile_tree;
17 public Xcls_compile_result_store compile_result_store;
18 public Xcls_renderer renderer;
21 public Xcls_MainWindow window;
24 public Xcls_ValaCompileErrors()
27 this.el = new Gtk.Popover( null );
32 this.el.position = Gtk.PositionType.TOP;
33 var child_0 = new Xcls_compile_view( _this );
35 this.el.add ( child_0.el );
38 // user defined functions
39 public void show (Json.Object tree, Gtk.Widget onbtn) {
40 this.el.set_relative_to(onbtn);
43 //print("looking for %s\n", id);
44 // loop through parent childnre
47 var store = this.compile_result_store.el;
52 tree.foreach_member((obj, file, node) => {
53 // id line "display text", file
55 var title = GLib.Path.get_basename( file) ;
58 store.append(out iter, null);
59 store.set(iter, 0, file, 1, 0, 2, title, 3, file,-1);
60 var lines = tree.get_object_member(file);
61 lines.foreach_member((obja, line, nodea) => {
63 var ar = lines.get_array_member(line);
64 for (var i = 0 ; i < ar.get_length(); i++) {
65 msg += (msg.length > 0) ? "\n" : "";
66 msg += ar.get_string_element(i);
70 store.append(out citer, iter);
74 2, GLib.Markup.escape_text(line + ": " + msg),
85 public class Xcls_compile_view : Object
88 private Xcls_ValaCompileErrors _this;
94 public Xcls_compile_view(Xcls_ValaCompileErrors _owner )
97 _this.compile_view = this;
98 this.el = new Gtk.VBox( false, 0 );
102 // set gobject values
103 var child_0 = new Xcls_HBox3( _this );
105 this.el.pack_start ( child_0.el , false,false,0 );
106 var child_1 = new Xcls_HPaned5( _this );
108 this.el.pack_start ( child_1.el , true,true,0 );
111 // user defined functions
113 public class Xcls_HBox3 : Object
116 private Xcls_ValaCompileErrors _this;
122 public Xcls_HBox3(Xcls_ValaCompileErrors _owner )
125 this.el = new Gtk.HBox( true, 0 );
129 // set gobject values
130 var child_0 = new Xcls_Button4( _this );
132 this.el.pack_start ( child_0.el , true,true,0 );
135 // user defined functions
137 public class Xcls_Button4 : Object
139 public Gtk.Button el;
140 private Xcls_ValaCompileErrors _this;
146 public Xcls_Button4(Xcls_ValaCompileErrors _owner )
149 this.el = new Gtk.Button();
153 // set gobject values
154 this.el.label = "Compile and Run";
157 // user defined functions
159 public class Xcls_HPaned5 : Object
161 public Gtk.HPaned el;
162 private Xcls_ValaCompileErrors _this;
168 public Xcls_HPaned5(Xcls_ValaCompileErrors _owner )
171 this.el = new Gtk.HPaned();
175 // set gobject values
176 var child_0 = new Xcls_ScrolledWindow6( _this );
178 this.el.add ( child_0.el );
179 var child_1 = new Xcls_ScrolledWindow11( _this );
181 this.el.add ( child_1.el );
184 // user defined functions
186 public class Xcls_ScrolledWindow6 : Object
188 public Gtk.ScrolledWindow el;
189 private Xcls_ValaCompileErrors _this;
195 public Xcls_ScrolledWindow6(Xcls_ValaCompileErrors _owner )
198 this.el = new Gtk.ScrolledWindow( null, null );
202 // set gobject values
203 var child_0 = new Xcls_compile_tree( _this );
205 this.el.add ( child_0.el );
210 this.el.set_policy (Gtk.PolicyType.AUTOMATIC, Gtk.PolicyType.AUTOMATIC);
216 // user defined functions
218 public class Xcls_compile_tree : Object
220 public Gtk.TreeView el;
221 private Xcls_ValaCompileErrors _this;
227 public Xcls_compile_tree(Xcls_ValaCompileErrors _owner )
230 _this.compile_tree = this;
231 this.el = new Gtk.TreeView();
235 // set gobject values
236 var child_0 = new Xcls_compile_result_store( _this );
238 this.el.set_model ( child_0.el );
239 var child_1 = new Xcls_column( _this );
241 this.el.append_column ( child_1.el );
244 // user defined functions
246 public class Xcls_compile_result_store : Object
248 public Gtk.TreeStore el;
249 private Xcls_ValaCompileErrors _this;
255 public Xcls_compile_result_store(Xcls_ValaCompileErrors _owner )
258 _this.compile_result_store = this;
259 this.el = new Gtk.TreeStore( 4, typeof(string), typeof(int), typeof(string), typeof(string) );
263 // set gobject values
266 // user defined functions
268 public class Xcls_column : Object
270 public Gtk.TreeViewColumn el;
271 private Xcls_ValaCompileErrors _this;
277 public Xcls_column(Xcls_ValaCompileErrors _owner )
280 this.el = new Gtk.TreeViewColumn();
284 // set gobject values
285 this.el.title = "Compile output";
286 var child_0 = new Xcls_renderer( _this );
288 this.el.pack_start ( child_0.el , true );
293 this.el.add_attribute(_this.renderer.el , "markup", 2 );
298 // user defined functions
300 public class Xcls_renderer : Object
302 public Gtk.CellRendererText el;
303 private Xcls_ValaCompileErrors _this;
309 public Xcls_renderer(Xcls_ValaCompileErrors _owner )
312 _this.renderer = this;
313 this.el = new Gtk.CellRendererText();
317 // set gobject values
320 // user defined functions
322 public class Xcls_ScrolledWindow11 : Object
324 public Gtk.ScrolledWindow el;
325 private Xcls_ValaCompileErrors _this;
331 public Xcls_ScrolledWindow11(Xcls_ValaCompileErrors _owner )
334 this.el = new Gtk.ScrolledWindow( null, null );
338 // set gobject values
339 var child_0 = new Xcls_SourceView12( _this );
341 this.el.add ( child_0.el );
344 // user defined functions
346 public class Xcls_SourceView12 : Object
348 public Gtk.SourceView el;
349 private Xcls_ValaCompileErrors _this;
355 public Xcls_SourceView12(Xcls_ValaCompileErrors _owner )
358 this.el = new Gtk.SourceView();
362 // set gobject values
363 this.el.editable = false;
364 this.el.show_line_marks = true;
365 this.el.show_line_numbers = true;
368 // user defined functions