Attribute changed old-javascript
[app.Builder.js] / old-javascript / Builder4 / GtkView.vala
1 static Xcls_GtkView  _GtkView;
2
3 public class Xcls_GtkView : Object 
4 {
5     public Gtk.VPaned el;
6     private Xcls_GtkView  _this;
7
8     public static Xcls_GtkView singleton()
9     {
10         if (_GtkView == null) {
11             _GtkView= new Xcls_GtkView();
12         }
13         return _GtkView;
14     }
15     public Xcls_container container;
16
17         // my vars (def)
18     public Gtk.Widget lastObj;
19     public JsRender.JsRender file;
20
21     // ctor 
22     public Xcls_GtkView()
23     {
24         _this = this;
25         this.el = new Gtk.VPaned();
26
27         // my vars (dec)
28         this.lastObj = null;
29         this.file = null;
30
31         // set gobject values
32         var child_0 = new Xcls_Viewport2( _this );
33         child_0.ref();
34         this.el.pack1 (  child_0.el , true,true );
35         var child_1 = new Xcls_VBox4( _this );
36         child_1.ref();
37         this.el.pack2 (  child_1.el , true,true );
38     }
39
40     // user defined functions 
41     public void createThumb () {
42         
43         
44         if (this.file == null) {
45             return;
46         }
47         var filename = this.file.getIconFileName(false);
48         
49         var  win = this.el.get_parent_window();
50         var width = win.get_width();
51         var height = win.get_height();
52     
53         Gdk.Pixbuf screenshot = Gdk.pixbuf_get_from_window(win, 0, 0, width, height); // this.el.position?
54     
55         screenshot.save(filename,"png");
56         return;
57         
58         
59         
60         
61         
62          
63         
64         // should we hold until it's printed...
65         
66           
67     
68         
69         
70     
71     
72         
73          
74     }
75     public void loadFile (JsRender.JsRender file) 
76     {
77         
78             this.el.set_position((int)(this.el.max_position * 0.7));
79             this.file = null;
80             
81             if (file.tree == null) {
82                 return;
83             }
84             this.file = file;
85             if (this.lastObj != null) {
86                 this.container.el.remove(this.lastObj);
87             }
88      
89         var x = new JsRender.NodeToGtk(file.tree);
90             var obj = x.munge() as Gtk.Widget;
91             this.lastObj = null;
92         if (obj == null) {
93                 return;
94         }
95         this.lastObj = obj;
96             
97             this.container.el.add(obj);
98             obj.show_all();
99     }
100     public class Xcls_Viewport2 : Object 
101     {
102         public Gtk.Viewport el;
103         private Xcls_GtkView  _this;
104
105
106             // my vars (def)
107
108         // ctor 
109         public Xcls_Viewport2(Xcls_GtkView _owner )
110         {
111             _this = _owner;
112             this.el = new Gtk.Viewport( null, null );
113
114             // my vars (dec)
115
116             // set gobject values
117             var child_0 = new Xcls_container( _this );
118             child_0.ref();
119             this.el.add (  child_0.el  );
120         }
121
122         // user defined functions 
123     }
124     public class Xcls_container : Object 
125     {
126         public Gtk.HBox el;
127         private Xcls_GtkView  _this;
128
129
130             // my vars (def)
131
132         // ctor 
133         public Xcls_container(Xcls_GtkView _owner )
134         {
135             _this = _owner;
136             _this.container = this;
137             this.el = new Gtk.HBox( true, 0 );
138
139             // my vars (dec)
140
141             // set gobject values
142         }
143
144         // user defined functions 
145     }
146     public class Xcls_VBox4 : Object 
147     {
148         public Gtk.VBox el;
149         private Xcls_GtkView  _this;
150
151
152             // my vars (def)
153
154         // ctor 
155         public Xcls_VBox4(Xcls_GtkView _owner )
156         {
157             _this = _owner;
158             this.el = new Gtk.VBox( false, 0 );
159
160             // my vars (dec)
161
162             // set gobject values
163             var child_0 = new Xcls_HBox5( _this );
164             child_0.ref();
165             this.el.pack_start (  child_0.el , false,false,0 );
166             var child_1 = new Xcls_HBox7( _this );
167             child_1.ref();
168             this.el.pack_start (  child_1.el , true,true,0 );
169         }
170
171         // user defined functions 
172     }
173     public class Xcls_HBox5 : Object 
174     {
175         public Gtk.HBox el;
176         private Xcls_GtkView  _this;
177
178
179             // my vars (def)
180
181         // ctor 
182         public Xcls_HBox5(Xcls_GtkView _owner )
183         {
184             _this = _owner;
185             this.el = new Gtk.HBox( true, 0 );
186
187             // my vars (dec)
188
189             // set gobject values
190             var child_0 = new Xcls_Button6( _this );
191             child_0.ref();
192             this.el.pack_start (  child_0.el , true,true,0 );
193         }
194
195         // user defined functions 
196     }
197     public class Xcls_Button6 : Object 
198     {
199         public Gtk.Button el;
200         private Xcls_GtkView  _this;
201
202
203             // my vars (def)
204
205         // ctor 
206         public Xcls_Button6(Xcls_GtkView _owner )
207         {
208             _this = _owner;
209             this.el = new Gtk.Button();
210
211             // my vars (dec)
212
213             // set gobject values
214             this.el.label = "Full Compile";
215         }
216
217         // user defined functions 
218     }
219     public class Xcls_HBox7 : Object 
220     {
221         public Gtk.HBox el;
222         private Xcls_GtkView  _this;
223
224
225             // my vars (def)
226
227         // ctor 
228         public Xcls_HBox7(Xcls_GtkView _owner )
229         {
230             _this = _owner;
231             this.el = new Gtk.HBox( true, 0 );
232
233             // my vars (dec)
234
235             // set gobject values
236             var child_0 = new Xcls_TreeView8( _this );
237             child_0.ref();
238             this.el.add (  child_0.el  );
239             var child_1 = new Xcls_ScrolledWindow12( _this );
240             child_1.ref();
241             this.el.pack_start (  child_1.el , true,true,0 );
242         }
243
244         // user defined functions 
245     }
246     public class Xcls_TreeView8 : Object 
247     {
248         public Gtk.TreeView el;
249         private Xcls_GtkView  _this;
250
251
252             // my vars (def)
253
254         // ctor 
255         public Xcls_TreeView8(Xcls_GtkView _owner )
256         {
257             _this = _owner;
258             this.el = new Gtk.TreeView();
259
260             // my vars (dec)
261
262             // set gobject values
263             var child_0 = new Xcls_ListStore9( _this );
264             child_0.ref();
265             this.el.set_model (  child_0.el  );
266             var child_1 = new Xcls_column( _this );
267             child_1.ref();
268         }
269
270         // user defined functions 
271     }
272     public class Xcls_ListStore9 : Object 
273     {
274         public Gtk.ListStore el;
275         private Xcls_GtkView  _this;
276
277
278             // my vars (def)
279
280         // ctor 
281         public Xcls_ListStore9(Xcls_GtkView _owner )
282         {
283             _this = _owner;
284             this.el = new Gtk.ListStore( 1,   typeof(string) );
285
286             // my vars (dec)
287
288             // set gobject values
289         }
290
291         // user defined functions 
292     }
293     public class Xcls_column : Object 
294     {
295         public Gtk.TreeViewColumn el;
296         private Xcls_GtkView  _this;
297
298
299             // my vars (def)
300
301         // ctor 
302         public Xcls_column(Xcls_GtkView _owner )
303         {
304             _this = _owner;
305             this.el = new Gtk.TreeViewColumn();
306
307             // my vars (dec)
308
309             // set gobject values
310             this.el.title = "Compile output";
311             var child_0 = new Xcls_CellRendererText11( _this );
312             child_0.ref();
313             this.el.pack_start (  child_0.el , false );
314         }
315
316         // user defined functions 
317     }
318     public class Xcls_CellRendererText11 : Object 
319     {
320         public Gtk.CellRendererText el;
321         private Xcls_GtkView  _this;
322
323
324             // my vars (def)
325
326         // ctor 
327         public Xcls_CellRendererText11(Xcls_GtkView _owner )
328         {
329             _this = _owner;
330             this.el = new Gtk.CellRendererText();
331
332             // my vars (dec)
333
334             // set gobject values
335         }
336
337         // user defined functions 
338     }
339     public class Xcls_ScrolledWindow12 : Object 
340     {
341         public Gtk.ScrolledWindow el;
342         private Xcls_GtkView  _this;
343
344
345             // my vars (def)
346
347         // ctor 
348         public Xcls_ScrolledWindow12(Xcls_GtkView _owner )
349         {
350             _this = _owner;
351             this.el = new Gtk.ScrolledWindow( null, null );
352
353             // my vars (dec)
354
355             // set gobject values
356             var child_0 = new Xcls_View13( _this );
357             child_0.ref();
358             this.el.add (  child_0.el  );
359         }
360
361         // user defined functions 
362     }
363     public class Xcls_View13 : Object 
364     {
365         public Gtk.SourceView el;
366         private Xcls_GtkView  _this;
367
368
369             // my vars (def)
370
371         // ctor 
372         public Xcls_View13(Xcls_GtkView _owner )
373         {
374             _this = _owner;
375             this.el = new Gtk.SourceView();
376
377             // my vars (dec)
378
379             // set gobject values
380             this.el.editable = false;
381             this.el.show_line_marks = true;
382             this.el.show_line_numbers = true;
383         }
384
385         // user defined functions 
386     }
387 }