src/Builder4/ValaCompileResults.bjs
[app.Builder.js] / src / Builder4 / ValaCompileResults.vala
1 static Xcls_ValaCompileResults  _ValaCompileResults;
2
3 public class Xcls_ValaCompileResults : Object
4 {
5     public Gtk.Popover el;
6     private Xcls_ValaCompileResults  _this;
7
8     public static Xcls_ValaCompileResults singleton()
9     {
10         if (_ValaCompileResults == null) {
11             _ValaCompileResults= new Xcls_ValaCompileResults();
12         }
13         return _ValaCompileResults;
14     }
15     public Xcls_compile_view compile_view;
16
17         // my vars (def)
18     public Xcls_MainWindow window;
19     public bool active;
20
21     // ctor
22     public Xcls_ValaCompileResults()
23     {
24         _this = this;
25         this.el = new Gtk.Popover( null );
26
27         // my vars (dec)
28         this.active = false;
29
30         // set gobject values
31         this.el.width_request = 600;
32         this.el.height_request = 400;
33         this.el.modal = true;
34         this.el.position = Gtk.PositionType.TOP;
35         var child_0 = new Xcls_compile_view( _this );
36         child_0.ref();
37         this.el.add (  child_0.el  );
38     }
39
40     // user defined functions
41     public void show ( Gtk.Widget onbtn) {
42         this.window.el.get_size(out w, out h);
43         
44         // left tree = 250, editor area = 500?
45         
46         var new_w = int.min(250, w-100);
47         if (new_w > (w-100)) {
48             new_w = w-100;
49         }
50         this.el.set_size_request( int.max(100, new_w), int.max(100, h-120));
51     
52         
53     
54         if (this.el.relative_to == null) {
55             this.el.set_relative_to(onbtn);
56         }
57         this.el.show_all();
58        
59         while(Gtk.events_pending()) { 
60                 Gtk.main_iteration();
61         }       
62     }
63     public class Xcls_compile_view : Object
64     {
65         public Gtk.Box el;
66         private Xcls_ValaCompileResults  _this;
67
68
69             // my vars (def)
70
71         // ctor
72         public Xcls_compile_view(Xcls_ValaCompileResults _owner )
73         {
74             _this = _owner;
75             _this.compile_view = this;
76             this.el = new Gtk.Box( Gtk.Orientation.VERTICAL, 0 );
77
78             // my vars (dec)
79
80             // set gobject values
81             this.el.homogeneous = false;
82             var child_0 = new Xcls_ScrolledWindow3( _this );
83             child_0.ref();
84             this.el.pack_end (  child_0.el , true,true,0 );
85         }
86
87         // user defined functions
88     }
89     public class Xcls_ScrolledWindow3 : Object
90     {
91         public Gtk.ScrolledWindow el;
92         private Xcls_ValaCompileResults  _this;
93
94
95             // my vars (def)
96
97         // ctor
98         public Xcls_ScrolledWindow3(Xcls_ValaCompileResults _owner )
99         {
100             _this = _owner;
101             this.el = new Gtk.ScrolledWindow( null, null );
102
103             // my vars (dec)
104
105             // set gobject values
106             this.el.hexpand = true;
107             var child_0 = new Xcls_SourceView4( _this );
108             child_0.ref();
109             this.el.add (  child_0.el  );
110
111             // init method
112
113             {
114              this.el.set_policy (Gtk.PolicyType.AUTOMATIC, Gtk.PolicyType.AUTOMATIC);
115              
116             
117             }
118         }
119
120         // user defined functions
121     }
122     public class Xcls_SourceView4 : Object
123     {
124         public Gtk.SourceView el;
125         private Xcls_ValaCompileResults  _this;
126
127
128             // my vars (def)
129
130         // ctor
131         public Xcls_SourceView4(Xcls_ValaCompileResults _owner )
132         {
133             _this = _owner;
134             this.el = new Gtk.SourceView();
135
136             // my vars (dec)
137
138             // set gobject values
139             this.el.show_line_numbers = true;
140
141             // init method
142
143             {
144             
145                 var description =   Pango.FontDescription.from_string("monospace");
146                 description.set_size(8000);
147                 this.el.override_font(description);
148             
149             
150             }
151         }
152
153         // user defined functions
154     }
155
156
157
158 }