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(500, 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         if (this.el.relative_to == null) {
54             this.el.set_relative_to(onbtn);
55         }
56         this.el.show_all();
57        // not sure why..
58        
59        
60        
61         while(Gtk.events_pending()) { 
62                 Gtk.main_iteration();
63         }       
64     }
65     public class Xcls_compile_view : Object
66     {
67         public Gtk.Box el;
68         private Xcls_ValaCompileResults  _this;
69
70
71             // my vars (def)
72
73         // ctor
74         public Xcls_compile_view(Xcls_ValaCompileResults _owner )
75         {
76             _this = _owner;
77             _this.compile_view = this;
78             this.el = new Gtk.Box( Gtk.Orientation.VERTICAL, 0 );
79
80             // my vars (dec)
81
82             // set gobject values
83             this.el.homogeneous = false;
84             var child_0 = new Xcls_ScrolledWindow3( _this );
85             child_0.ref();
86             this.el.pack_end (  child_0.el , true,true,0 );
87         }
88
89         // user defined functions
90     }
91     public class Xcls_ScrolledWindow3 : Object
92     {
93         public Gtk.ScrolledWindow el;
94         private Xcls_ValaCompileResults  _this;
95
96
97             // my vars (def)
98
99         // ctor
100         public Xcls_ScrolledWindow3(Xcls_ValaCompileResults _owner )
101         {
102             _this = _owner;
103             this.el = new Gtk.ScrolledWindow( null, null );
104
105             // my vars (dec)
106
107             // set gobject values
108             this.el.hexpand = true;
109             var child_0 = new Xcls_SourceView4( _this );
110             child_0.ref();
111             this.el.add (  child_0.el  );
112
113             // init method
114
115             {
116              this.el.set_policy (Gtk.PolicyType.AUTOMATIC, Gtk.PolicyType.AUTOMATIC);
117              
118             
119             }
120         }
121
122         // user defined functions
123     }
124     public class Xcls_SourceView4 : Object
125     {
126         public Gtk.SourceView el;
127         private Xcls_ValaCompileResults  _this;
128
129
130             // my vars (def)
131
132         // ctor
133         public Xcls_SourceView4(Xcls_ValaCompileResults _owner )
134         {
135             _this = _owner;
136             this.el = new Gtk.SourceView();
137
138             // my vars (dec)
139
140             // set gobject values
141             this.el.show_line_numbers = true;
142
143             // init method
144
145             {
146             
147                 var description =   Pango.FontDescription.from_string("monospace");
148                 description.set_size(8000);
149                 this.el.override_font(description);
150             
151             
152             }
153         }
154
155         // user defined functions
156     }
157
158
159
160 }