1 static Xcls_ValaCompileResults _ValaCompileResults;
3 public class Xcls_ValaCompileResults : Object
6 private Xcls_ValaCompileResults _this;
8 public static Xcls_ValaCompileResults singleton()
10 if (_ValaCompileResults == null) {
11 _ValaCompileResults= new Xcls_ValaCompileResults();
13 return _ValaCompileResults;
15 public Xcls_compile_view compile_view;
16 public Xcls_sourceview sourceview;
19 public Xcls_MainWindow window;
23 public Xcls_ValaCompileResults()
26 this.el = new Gtk.Popover( null );
32 this.el.width_request = 600;
33 this.el.height_request = 400;
35 this.el.position = Gtk.PositionType.TOP;
36 var child_0 = new Xcls_compile_view( _this );
38 this.el.add ( child_0.el );
41 // user defined functions
42 public void show ( Gtk.Widget onbtn, bool reset) {
43 this.window.el.get_size(out w, out h);
45 // left tree = 250, editor area = 500?
47 var new_w = int.min(500, w-100);
48 if (new_w > (w-100)) {
51 this.el.set_size_request( int.max(100, new_w), int.max(100, h-120));
54 if (this.el.relative_to == null) {
55 this.el.set_relative_to(onbtn);
61 var buf = (Gtk.SourceBuffer)this.sourceview.el.get_buffer();
65 while(Gtk.events_pending()) {
72 public void addLine (string str) {
73 var buf = (Gtk.SourceBuffer)this.sourceview.el.get_buffer();
75 buf.get_end_iter (out iter);
76 buf.insert(ref iter, str, str.length);
81 public class Xcls_compile_view : Object
84 private Xcls_ValaCompileResults _this;
90 public Xcls_compile_view(Xcls_ValaCompileResults _owner )
93 _this.compile_view = this;
94 this.el = new Gtk.Box( Gtk.Orientation.VERTICAL, 0 );
99 this.el.homogeneous = false;
100 var child_0 = new Xcls_ScrolledWindow3( _this );
102 this.el.pack_end ( child_0.el , true,true,0 );
105 // user defined functions
107 public class Xcls_ScrolledWindow3 : Object
109 public Gtk.ScrolledWindow el;
110 private Xcls_ValaCompileResults _this;
116 public Xcls_ScrolledWindow3(Xcls_ValaCompileResults _owner )
119 this.el = new Gtk.ScrolledWindow( null, null );
123 // set gobject values
124 this.el.hexpand = true;
125 var child_0 = new Xcls_sourceview( _this );
127 this.el.add ( child_0.el );
132 this.el.set_policy (Gtk.PolicyType.AUTOMATIC, Gtk.PolicyType.AUTOMATIC);
138 // user defined functions
140 public class Xcls_sourceview : Object
142 public Gtk.SourceView el;
143 private Xcls_ValaCompileResults _this;
149 public Xcls_sourceview(Xcls_ValaCompileResults _owner )
152 _this.sourceview = this;
153 this.el = new Gtk.SourceView();
157 // set gobject values
158 this.el.editable = false;
159 this.el.show_line_numbers = true;
165 var description = Pango.FontDescription.from_string("monospace");
166 description.set_size(8000);
167 this.el.override_font(description);
173 // user defined functions