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