Fix #7401 - property column widths
[roobuilder] / src / Builder4 / MainWindow.vala
1 static Xcls_MainWindow  _MainWindow;
2
3 public class Xcls_MainWindow : Object
4 {
5     public Gtk.Window el;
6     private Xcls_MainWindow  _this;
7
8     public static Xcls_MainWindow singleton()
9     {
10         if (_MainWindow == null) {
11             _MainWindow= new Xcls_MainWindow();
12         }
13         return _MainWindow;
14     }
15     public Xcls_headerbar headerbar;
16     public Xcls_windowbtn windowbtn;
17     public Xcls_open_projects_btn open_projects_btn;
18     public Xcls_vbox vbox;
19     public Xcls_mainpane mainpane;
20     public Xcls_leftpane leftpane;
21     public Xcls_editpane editpane;
22     public Xcls_tree tree;
23     public Xcls_props props;
24     public Xcls_rooviewbox rooviewbox;
25     public Xcls_codeeditviewbox codeeditviewbox;
26     public Xcls_topbarmenu topbarmenu;
27     public Xcls_statusbar statusbar;
28     public Xcls_statusbar_compilestatus_label statusbar_compilestatus_label;
29     public Xcls_statusbar_errors statusbar_errors;
30     public Xcls_statusbar_warnings statusbar_warnings;
31     public Xcls_statusbar_depricated statusbar_depricated;
32     public Xcls_statusbar_run statusbar_run;
33     public Xcls_statusbar_compile_spinner statusbar_compile_spinner;
34
35         // my vars (def)
36     public string title;
37     public WindowState windowstate;
38     public Project.Project project;
39
40     // ctor
41     public Xcls_MainWindow()
42     {
43         _this = this;
44         this.el = new Gtk.Window( Gtk.WindowType.TOPLEVEL );
45
46         // my vars (dec)
47         this.title = "Roo Application Builder";
48         this.project = null;
49
50         // set gobject values
51         this.el.border_width = 0;
52         this.el.default_height = 850;
53         this.el.default_width = 1200;
54         var child_0 = new Xcls_headerbar( _this );
55         child_0.ref();
56         this.el.set_titlebar (  child_0.el  );
57         var child_1 = new Xcls_vbox( _this );
58         child_1.ref();
59         this.el.add (  child_1.el  );
60
61         // init method
62
63         this.el.set_icon_name("roobuilder");
64
65         //listeners
66         this.el.delete_event.connect( (   event) => {
67             return false;
68         });
69         this.el.destroy.connect( () =>  {
70          
71          
72          Resources.singleton().disconnect(_this.statusbar.handler_id);
73          
74          BuilderApplication.removeWindow(this);
75          
76          if (BuilderApplication.windows.size  < 1) {
77         
78              Gtk.main_quit();
79          }
80         });
81         this.el.show.connect( ( ) => {
82             // hide the file editing..
83            
84             //this.hideViewEditing();
85             _this.statusbar.el.hide();
86              _this.statusbar_errors.el.hide();
87             _this.statusbar_warnings.el.hide();
88             _this.statusbar_depricated.el.hide();
89             _this.statusbar_compile_spinner.el.hide();
90           
91             Resources.singleton().checkResources();
92         
93         });
94         this.el.key_release_event.connect( (event) => {
95             
96             
97                 
98                 if (event.keyval == Gdk.Key.n && (event.state & Gdk.ModifierType.CONTROL_MASK ) > 0 ) {
99                         print("SAVE: ctrl-n  pressed");
100                         _this.windowstate.showPopoverFiles(_this.windowbtn.el, _this.project, true);
101                         return false;
102                 }
103                 
104            // print(event.key.keyval)
105             
106             return false;
107         
108         });
109     }
110
111     // user defined functions
112     public void initChildren () {
113         // this needs putting in a better place..
114         this.windowstate = new WindowState(this);
115          
116     
117      
118     
119         
120     
121     
122     
123     }
124     public void show () {
125        
126         this.el.show_all();
127     
128     }
129     public void setTitle (string str) {
130         this.headerbar.el.set_title(this.title + " - " + str);
131     }
132     public void openNewWindow () {
133      
134         var w = new Xcls_MainWindow();
135         w.ref();
136         BuilderApplication.addWindow(w);
137         w.el.show_all();
138         w.initChildren();
139         w.windowstate.showPopoverFiles(w.open_projects_btn.el, _this.project, false);
140          
141     }
142     public class Xcls_headerbar : Object
143     {
144         public Gtk.HeaderBar el;
145         private Xcls_MainWindow  _this;
146
147
148             // my vars (def)
149
150         // ctor
151         public Xcls_headerbar(Xcls_MainWindow _owner )
152         {
153             _this = _owner;
154             _this.headerbar = this;
155             this.el = new Gtk.HeaderBar();
156
157             // my vars (dec)
158
159             // set gobject values
160             this.el.title = "Application Builder";
161             this.el.show_close_button = true;
162             var child_0 = new Xcls_Box3( _this );
163             child_0.ref();
164             this.el.pack_start (  child_0.el  );
165         }
166
167         // user defined functions
168     }
169     public class Xcls_Box3 : Object
170     {
171         public Gtk.Box el;
172         private Xcls_MainWindow  _this;
173
174
175             // my vars (def)
176
177         // ctor
178         public Xcls_Box3(Xcls_MainWindow _owner )
179         {
180             _this = _owner;
181             this.el = new Gtk.Box( Gtk.Orientation.HORIZONTAL, 0 );
182
183             // my vars (dec)
184
185             // set gobject values
186             var child_0 = new Xcls_windowbtn( _this );
187             child_0.ref();
188             this.el.add(  child_0.el );
189             var child_1 = new Xcls_open_projects_btn( _this );
190             child_1.ref();
191             this.el.add (  child_1.el  );
192         }
193
194         // user defined functions
195     }
196     public class Xcls_windowbtn : Object
197     {
198         public Gtk.MenuButton el;
199         private Xcls_MainWindow  _this;
200
201
202             // my vars (def)
203         public Gee.ArrayList<Gtk.MenuItem> mitems;
204
205         // ctor
206         public Xcls_windowbtn(Xcls_MainWindow _owner )
207         {
208             _this = _owner;
209             _this.windowbtn = this;
210             this.el = new Gtk.MenuButton();
211
212             // my vars (dec)
213
214             // set gobject values
215             this.el.margin_end = 4;
216             this.el.halign = Gtk.Align.START;
217             this.el.direction = Gtk.ArrowType.DOWN;
218             this.el.use_popover = false;
219             this.el.always_show_image = true;
220             this.el.label = "Windows";
221             var child_0 = new Xcls_Image5( _this );
222             child_0.ref();
223             this.el.set_image (  child_0.el  );
224             var child_1 = new Xcls_Menu6( _this );
225             child_1.ref();
226             this.el.popup = child_1.el;
227
228             // init method
229
230             {
231                 this.mitems = new Gee.ArrayList<Gtk.MenuItem>();
232                 
233             }
234         }
235
236         // user defined functions
237         public void updateMenu () {
238                  foreach(var m in  this.mitems) {
239                          this.el.popup.remove(m);
240                  }
241                  this.mitems.clear();
242                    
243                  foreach(var w in BuilderApplication.windows) {
244                         var wid = BuilderApplication.windows.index_of(w);
245                         // fixme find a better way to display this.
246                         if (w.windowstate == null ||
247                                  w.windowstate.file == null || 
248                                  _this.windowstate == null ||
249                                  _this.windowstate.file == null
250                                  ) { 
251                                 continue;
252                         }
253                         
254                         if (w.windowstate.file.path == _this.windowstate.file.path) {
255                                 continue;
256                         }
257         
258                         GLib.debug("add menuitem %s", w.windowstate.file.path);
259                         var m = new Gtk.MenuItem.with_label(w.windowstate.file.path);
260                         m.activate.connect(() => {
261                                  BuilderApplication.windows.get(wid).el.present();
262                         });
263                         this.el.popup.append(m);
264                         m.show();
265                         this.mitems.add(m);
266                  }
267         }
268     }
269     public class Xcls_Image5 : Object
270     {
271         public Gtk.Image el;
272         private Xcls_MainWindow  _this;
273
274
275             // my vars (def)
276
277         // ctor
278         public Xcls_Image5(Xcls_MainWindow _owner )
279         {
280             _this = _owner;
281             this.el = new Gtk.Image();
282
283             // my vars (dec)
284
285             // set gobject values
286             this.el.icon_name = "window-new";
287         }
288
289         // user defined functions
290     }
291
292     public class Xcls_Menu6 : Object
293     {
294         public Gtk.Menu el;
295         private Xcls_MainWindow  _this;
296
297
298             // my vars (def)
299
300         // ctor
301         public Xcls_Menu6(Xcls_MainWindow _owner )
302         {
303             _this = _owner;
304             this.el = new Gtk.Menu();
305
306             // my vars (dec)
307
308             // set gobject values
309             var child_0 = new Xcls_MenuItem7( _this );
310             child_0.ref();
311             this.el.append (  child_0.el  );
312             var child_1 = new Xcls_SeparatorMenuItem8( _this );
313             child_1.ref();
314             this.el.append (  child_1.el  );
315
316             // init method
317
318             this.el.show_all();
319         }
320
321         // user defined functions
322     }
323     public class Xcls_MenuItem7 : Object
324     {
325         public Gtk.MenuItem el;
326         private Xcls_MainWindow  _this;
327
328
329             // my vars (def)
330
331         // ctor
332         public Xcls_MenuItem7(Xcls_MainWindow _owner )
333         {
334             _this = _owner;
335             this.el = new Gtk.MenuItem();
336
337             // my vars (dec)
338
339             // set gobject values
340             this.el.label = "New Window";
341             this.el.show();
342
343             //listeners
344             this.el.activate.connect( ( ) => {
345             
346                 _this.windowstate.showPopoverFiles(_this.windowbtn.el, _this.project, true);
347             });
348         }
349
350         // user defined functions
351     }
352
353     public class Xcls_SeparatorMenuItem8 : Object
354     {
355         public Gtk.SeparatorMenuItem el;
356         private Xcls_MainWindow  _this;
357
358
359             // my vars (def)
360
361         // ctor
362         public Xcls_SeparatorMenuItem8(Xcls_MainWindow _owner )
363         {
364             _this = _owner;
365             this.el = new Gtk.SeparatorMenuItem();
366
367             // my vars (dec)
368
369             // set gobject values
370             this.el.show();
371         }
372
373         // user defined functions
374     }
375
376
377
378     public class Xcls_open_projects_btn : Object
379     {
380         public Gtk.Button el;
381         private Xcls_MainWindow  _this;
382
383
384             // my vars (def)
385
386         // ctor
387         public Xcls_open_projects_btn(Xcls_MainWindow _owner )
388         {
389             _this = _owner;
390             _this.open_projects_btn = this;
391             this.el = new Gtk.Button();
392
393             // my vars (dec)
394
395             // set gobject values
396             this.el.always_show_image = true;
397             this.el.label = "Files / Projects";
398             var child_0 = new Xcls_Image10( _this );
399             child_0.ref();
400             this.el.set_image (  child_0.el  );
401
402             //listeners
403             this.el.clicked.connect( ( ) => {
404                 _this.windowstate.showPopoverFiles(this.el, _this.project, false);
405             
406             });
407         }
408
409         // user defined functions
410     }
411     public class Xcls_Image10 : Object
412     {
413         public Gtk.Image el;
414         private Xcls_MainWindow  _this;
415
416
417             // my vars (def)
418
419         // ctor
420         public Xcls_Image10(Xcls_MainWindow _owner )
421         {
422             _this = _owner;
423             this.el = new Gtk.Image();
424
425             // my vars (dec)
426
427             // set gobject values
428             this.el.icon_name = "system-file-manager";
429         }
430
431         // user defined functions
432     }
433
434
435
436
437     public class Xcls_vbox : Object
438     {
439         public Gtk.Box el;
440         private Xcls_MainWindow  _this;
441
442
443             // my vars (def)
444
445         // ctor
446         public Xcls_vbox(Xcls_MainWindow _owner )
447         {
448             _this = _owner;
449             _this.vbox = this;
450             this.el = new Gtk.Box( Gtk.Orientation.VERTICAL, 0 );
451
452             // my vars (dec)
453
454             // set gobject values
455             this.el.homogeneous = false;
456             var child_0 = new Xcls_mainpane( _this );
457             child_0.ref();
458             this.el.pack_start (  child_0.el , true,true,0 );
459             var child_1 = new Xcls_Box20( _this );
460             child_1.ref();
461             this.el.pack_end (  child_1.el , false,true,0 );
462         }
463
464         // user defined functions
465     }
466     public class Xcls_mainpane : Object
467     {
468         public Gtk.Paned el;
469         private Xcls_MainWindow  _this;
470
471
472             // my vars (def)
473         public int lastWidth;
474
475         // ctor
476         public Xcls_mainpane(Xcls_MainWindow _owner )
477         {
478             _this = _owner;
479             _this.mainpane = this;
480             this.el = new Gtk.Paned( Gtk.Orientation.HORIZONTAL );
481
482             // my vars (dec)
483             this.lastWidth = 0;
484
485             // set gobject values
486             this.el.position = 400;
487             var child_0 = new Xcls_leftpane( _this );
488             child_0.ref();
489             this.el.add (  child_0.el  );
490             var child_1 = new Xcls_Box17( _this );
491             child_1.ref();
492             this.el.add2 (  child_1.el  );
493         }
494
495         // user defined functions
496     }
497     public class Xcls_leftpane : Object
498     {
499         public Gtk.Box el;
500         private Xcls_MainWindow  _this;
501
502
503             // my vars (def)
504
505         // ctor
506         public Xcls_leftpane(Xcls_MainWindow _owner )
507         {
508             _this = _owner;
509             _this.leftpane = this;
510             this.el = new Gtk.Box( Gtk.Orientation.HORIZONTAL, 0 );
511
512             // my vars (dec)
513
514             // set gobject values
515             var child_0 = new Xcls_editpane( _this );
516             child_0.ref();
517             this.el.pack_start (  child_0.el , true,true,0 );
518         }
519
520         // user defined functions
521     }
522     public class Xcls_editpane : Object
523     {
524         public Gtk.Paned el;
525         private Xcls_MainWindow  _this;
526
527
528             // my vars (def)
529
530         // ctor
531         public Xcls_editpane(Xcls_MainWindow _owner )
532         {
533             _this = _owner;
534             _this.editpane = this;
535             this.el = new Gtk.Paned( Gtk.Orientation.HORIZONTAL );
536
537             // my vars (dec)
538
539             // set gobject values
540             var child_0 = new Xcls_tree( _this );
541             child_0.ref();
542             this.el.add1 (  child_0.el  );
543             var child_1 = new Xcls_props( _this );
544             child_1.ref();
545             this.el.add2 (  child_1.el  );
546
547             //listeners
548             this.el.accept_position.connect( () => {
549                 GLib.debug("Accept postion");
550                 return true;
551             });
552             this.el.move_handle.connect( (scroll) => {
553                 GLib.debug("Move handle");
554                 return true;
555             });
556         }
557
558         // user defined functions
559     }
560     public class Xcls_tree : Object
561     {
562         public Gtk.Box el;
563         private Xcls_MainWindow  _this;
564
565
566             // my vars (def)
567
568         // ctor
569         public Xcls_tree(Xcls_MainWindow _owner )
570         {
571             _this = _owner;
572             _this.tree = this;
573             this.el = new Gtk.Box( Gtk.Orientation.VERTICAL, 0 );
574
575             // my vars (dec)
576
577             // set gobject values
578         }
579
580         // user defined functions
581     }
582
583     public class Xcls_props : Object
584     {
585         public Gtk.Box el;
586         private Xcls_MainWindow  _this;
587
588
589             // my vars (def)
590
591         // ctor
592         public Xcls_props(Xcls_MainWindow _owner )
593         {
594             _this = _owner;
595             _this.props = this;
596             this.el = new Gtk.Box( Gtk.Orientation.VERTICAL, 0 );
597
598             // my vars (dec)
599
600             // set gobject values
601         }
602
603         // user defined functions
604     }
605
606
607
608     public class Xcls_Box17 : Object
609     {
610         public Gtk.Box el;
611         private Xcls_MainWindow  _this;
612
613
614             // my vars (def)
615
616         // ctor
617         public Xcls_Box17(Xcls_MainWindow _owner )
618         {
619             _this = _owner;
620             this.el = new Gtk.Box( Gtk.Orientation.VERTICAL, 0 );
621
622             // my vars (dec)
623
624             // set gobject values
625             var child_0 = new Xcls_rooviewbox( _this );
626             child_0.ref();
627             this.el.add (  child_0.el  );
628             var child_1 = new Xcls_codeeditviewbox( _this );
629             child_1.ref();
630             this.el.add (  child_1.el  );
631         }
632
633         // user defined functions
634     }
635     public class Xcls_rooviewbox : Object
636     {
637         public Gtk.Box el;
638         private Xcls_MainWindow  _this;
639
640
641             // my vars (def)
642
643         // ctor
644         public Xcls_rooviewbox(Xcls_MainWindow _owner )
645         {
646             _this = _owner;
647             _this.rooviewbox = this;
648             this.el = new Gtk.Box( Gtk.Orientation.VERTICAL, 0 );
649
650             // my vars (dec)
651
652             // set gobject values
653             this.el.vexpand = true;
654         }
655
656         // user defined functions
657     }
658
659     public class Xcls_codeeditviewbox : Object
660     {
661         public Gtk.Box el;
662         private Xcls_MainWindow  _this;
663
664
665             // my vars (def)
666
667         // ctor
668         public Xcls_codeeditviewbox(Xcls_MainWindow _owner )
669         {
670             _this = _owner;
671             _this.codeeditviewbox = this;
672             this.el = new Gtk.Box( Gtk.Orientation.VERTICAL, 0 );
673
674             // my vars (dec)
675
676             // set gobject values
677             this.el.vexpand = true;
678         }
679
680         // user defined functions
681     }
682
683
684
685     public class Xcls_Box20 : Object
686     {
687         public Gtk.Box el;
688         private Xcls_MainWindow  _this;
689
690
691             // my vars (def)
692
693         // ctor
694         public Xcls_Box20(Xcls_MainWindow _owner )
695         {
696             _this = _owner;
697             this.el = new Gtk.Box( Gtk.Orientation.HORIZONTAL, 0 );
698
699             // my vars (dec)
700
701             // set gobject values
702             this.el.homogeneous = false;
703             var child_0 = new Xcls_Button21( _this );
704             child_0.ref();
705             this.el.add (  child_0.el  );
706             var child_1 = new Xcls_Button23( _this );
707             child_1.ref();
708             this.el.add (  child_1.el  );
709             var child_2 = new Xcls_MenuButton25( _this );
710             child_2.ref();
711             this.el.add (  child_2.el  );
712             var child_3 = new Xcls_Label30( _this );
713             child_3.ref();
714             this.el.pack_start (  child_3.el , true,true,0 );
715             var child_4 = new Xcls_statusbar( _this );
716             child_4.ref();
717             this.el.pack_start (  child_4.el , true,true,0 );
718             var child_5 = new Xcls_MenuBar32( _this );
719             child_5.ref();
720             this.el.add (  child_5.el  );
721             var child_6 = new Xcls_statusbar_compile_spinner( _this );
722             child_6.ref();
723             this.el.add (  child_6.el  );
724         }
725
726         // user defined functions
727     }
728     public class Xcls_Button21 : Object
729     {
730         public Gtk.Button el;
731         private Xcls_MainWindow  _this;
732
733
734             // my vars (def)
735
736         // ctor
737         public Xcls_Button21(Xcls_MainWindow _owner )
738         {
739             _this = _owner;
740             this.el = new Gtk.Button();
741
742             // my vars (dec)
743
744             // set gobject values
745             this.el.always_show_image = true;
746             this.el.tooltip_text = "Project Details";
747             this.el.label = "Edit Project Settings";
748             var child_0 = new Xcls_Image22( _this );
749             child_0.ref();
750             this.el.set_image (  child_0.el  );
751
752             //listeners
753             this.el.clicked.connect( ( ) => {
754                  
755                  _this.windowstate.projectPopoverShow(this.el, _this.project);
756                
757               
758             });
759         }
760
761         // user defined functions
762     }
763     public class Xcls_Image22 : Object
764     {
765         public Gtk.Image el;
766         private Xcls_MainWindow  _this;
767
768
769             // my vars (def)
770
771         // ctor
772         public Xcls_Image22(Xcls_MainWindow _owner )
773         {
774             _this = _owner;
775             this.el = new Gtk.Image();
776
777             // my vars (dec)
778
779             // set gobject values
780             this.el.icon_name = "emblem-system";
781         }
782
783         // user defined functions
784     }
785
786
787     public class Xcls_Button23 : Object
788     {
789         public Gtk.Button el;
790         private Xcls_MainWindow  _this;
791
792
793             // my vars (def)
794
795         // ctor
796         public Xcls_Button23(Xcls_MainWindow _owner )
797         {
798             _this = _owner;
799             this.el = new Gtk.Button();
800
801             // my vars (dec)
802
803             // set gobject values
804             this.el.always_show_image = true;
805             this.el.tooltip_text = "File Details";
806             this.el.label = "Edit File Properties";
807             var child_0 = new Xcls_Image24( _this );
808             child_0.ref();
809             this.el.set_image (  child_0.el  );
810
811             //listeners
812             this.el.clicked.connect( ( ) => {
813               
814                 // create a new file in project..
815                 if (_this.project == null || _this.windowstate.file == null) {
816                     return  ;
817                 }
818                  _this.windowstate.file_details.show(
819                     _this.windowstate.file, this.el, false
820                 );
821                  
822                 return  ;    
823             
824             
825             });
826         }
827
828         // user defined functions
829     }
830     public class Xcls_Image24 : Object
831     {
832         public Gtk.Image el;
833         private Xcls_MainWindow  _this;
834
835
836             // my vars (def)
837
838         // ctor
839         public Xcls_Image24(Xcls_MainWindow _owner )
840         {
841             _this = _owner;
842             this.el = new Gtk.Image();
843
844             // my vars (dec)
845
846             // set gobject values
847             this.el.icon_name = "document-properties";
848         }
849
850         // user defined functions
851     }
852
853
854     public class Xcls_MenuButton25 : Object
855     {
856         public Gtk.MenuButton el;
857         private Xcls_MainWindow  _this;
858
859
860             // my vars (def)
861
862         // ctor
863         public Xcls_MenuButton25(Xcls_MainWindow _owner )
864         {
865             _this = _owner;
866             this.el = new Gtk.MenuButton();
867
868             // my vars (dec)
869
870             // set gobject values
871             this.el.always_show_image = true;
872             this.el.label = "About";
873             var child_0 = new Xcls_topbarmenu( _this );
874             child_0.ref();
875             this.el.set_popup (  child_0.el  );
876             var child_1 = new Xcls_Image29( _this );
877             child_1.ref();
878             this.el.set_image (  child_1.el  );
879         }
880
881         // user defined functions
882     }
883     public class Xcls_topbarmenu : Object
884     {
885         public Gtk.Menu el;
886         private Xcls_MainWindow  _this;
887
888
889             // my vars (def)
890
891         // ctor
892         public Xcls_topbarmenu(Xcls_MainWindow _owner )
893         {
894             _this = _owner;
895             _this.topbarmenu = this;
896             this.el = new Gtk.Menu();
897
898             // my vars (dec)
899
900             // set gobject values
901             var child_0 = new Xcls_MenuItem27( _this );
902             child_0.ref();
903             this.el.append (  child_0.el  );
904             var child_1 = new Xcls_MenuItem28( _this );
905             child_1.ref();
906             this.el.append (  child_1.el  );
907
908             // init method
909
910             {
911                 this.el.show_all();
912             }
913         }
914
915         // user defined functions
916     }
917     public class Xcls_MenuItem27 : Object
918     {
919         public Gtk.MenuItem el;
920         private Xcls_MainWindow  _this;
921
922
923             // my vars (def)
924
925         // ctor
926         public Xcls_MenuItem27(Xcls_MainWindow _owner )
927         {
928             _this = _owner;
929             this.el = new Gtk.MenuItem();
930
931             // my vars (dec)
932
933             // set gobject values
934             this.el.label = "Download updated Resources";
935             this.el.show();
936
937             //listeners
938             this.el.activate.connect( ( ) => {
939                      Resources.singleton().fetchStart();
940             });
941         }
942
943         // user defined functions
944     }
945
946     public class Xcls_MenuItem28 : Object
947     {
948         public Gtk.MenuItem el;
949         private Xcls_MainWindow  _this;
950
951
952             // my vars (def)
953
954         // ctor
955         public Xcls_MenuItem28(Xcls_MainWindow _owner )
956         {
957             _this = _owner;
958             this.el = new Gtk.MenuItem();
959
960             // my vars (dec)
961
962             // set gobject values
963             this.el.label = "About the Builder";
964             this.el.show();
965
966             //listeners
967             this.el.activate.connect( () => {
968                 About.singleton().el.show();
969                 });
970         }
971
972         // user defined functions
973     }
974
975
976     public class Xcls_Image29 : Object
977     {
978         public Gtk.Image el;
979         private Xcls_MainWindow  _this;
980
981
982             // my vars (def)
983
984         // ctor
985         public Xcls_Image29(Xcls_MainWindow _owner )
986         {
987             _this = _owner;
988             this.el = new Gtk.Image();
989
990             // my vars (dec)
991
992             // set gobject values
993             this.el.icon_name = "dialog-information";
994         }
995
996         // user defined functions
997     }
998
999
1000     public class Xcls_Label30 : Object
1001     {
1002         public Gtk.Label el;
1003         private Xcls_MainWindow  _this;
1004
1005
1006             // my vars (def)
1007
1008         // ctor
1009         public Xcls_Label30(Xcls_MainWindow _owner )
1010         {
1011             _this = _owner;
1012             this.el = new Gtk.Label( "   " );
1013
1014             // my vars (dec)
1015
1016             // set gobject values
1017         }
1018
1019         // user defined functions
1020     }
1021
1022     public class Xcls_statusbar : Object
1023     {
1024         public Gtk.ProgressBar el;
1025         private Xcls_MainWindow  _this;
1026
1027
1028             // my vars (def)
1029         public ulong handler_id;
1030
1031         // ctor
1032         public Xcls_statusbar(Xcls_MainWindow _owner )
1033         {
1034             _this = _owner;
1035             _this.statusbar = this;
1036             this.el = new Gtk.ProgressBar();
1037
1038             // my vars (dec)
1039             this.handler_id = -1;
1040
1041             // set gobject values
1042             this.el.show_text = true;
1043
1044             // init method
1045
1046             {
1047                  this.handler_id = Resources.singleton().updateProgress.connect((pos,total) => {
1048                     if (pos < 1) {
1049                         this.el.hide();
1050                         _this.mainpane.el.set_sensitive(true);
1051                         
1052                         return;
1053                     }
1054                      _this.mainpane.el.set_sensitive(false);
1055                      this.el.show();
1056                      this.el.set_fraction ((1.0f * pos) / (1.0f * total));
1057                      this.el.set_text("Fetching Resource : %s/%s".printf(pos.to_string(), total.to_string()));
1058                    
1059                  });
1060             }
1061         }
1062
1063         // user defined functions
1064     }
1065
1066     public class Xcls_MenuBar32 : Object
1067     {
1068         public Gtk.MenuBar el;
1069         private Xcls_MainWindow  _this;
1070
1071
1072             // my vars (def)
1073
1074         // ctor
1075         public Xcls_MenuBar32(Xcls_MainWindow _owner )
1076         {
1077             _this = _owner;
1078             this.el = new Gtk.MenuBar();
1079
1080             // my vars (dec)
1081
1082             // set gobject values
1083             var child_0 = new Xcls_statusbar_compilestatus_label( _this );
1084             child_0.ref();
1085             this.el.add (  child_0.el  );
1086             var child_1 = new Xcls_statusbar_errors( _this );
1087             child_1.ref();
1088             this.el.add (  child_1.el  );
1089             var child_2 = new Xcls_statusbar_warnings( _this );
1090             child_2.ref();
1091             this.el.add (  child_2.el  );
1092             var child_3 = new Xcls_statusbar_depricated( _this );
1093             child_3.ref();
1094             this.el.add (  child_3.el  );
1095             var child_4 = new Xcls_statusbar_run( _this );
1096             child_4.ref();
1097             this.el.add (  child_4.el  );
1098         }
1099
1100         // user defined functions
1101     }
1102     public class Xcls_statusbar_compilestatus_label : Object
1103     {
1104         public Gtk.MenuItem el;
1105         private Xcls_MainWindow  _this;
1106
1107
1108             // my vars (def)
1109
1110         // ctor
1111         public Xcls_statusbar_compilestatus_label(Xcls_MainWindow _owner )
1112         {
1113             _this = _owner;
1114             _this.statusbar_compilestatus_label = this;
1115             this.el = new Gtk.MenuItem();
1116
1117             // my vars (dec)
1118
1119             // set gobject values
1120             this.el.label = "Compile Status:";
1121             this.el.show();
1122         }
1123
1124         // user defined functions
1125     }
1126
1127     public class Xcls_statusbar_errors : Object
1128     {
1129         public Gtk.ImageMenuItem el;
1130         private Xcls_MainWindow  _this;
1131
1132
1133             // my vars (def)
1134         public Xcls_ValaCompileErrors popup;
1135         public Json.Object notices;
1136
1137         // ctor
1138         public Xcls_statusbar_errors(Xcls_MainWindow _owner )
1139         {
1140             _this = _owner;
1141             _this.statusbar_errors = this;
1142             this.el = new Gtk.ImageMenuItem();
1143
1144             // my vars (dec)
1145             this.notices = new Json.Object();
1146
1147             // set gobject values
1148             this.el.always_show_image = true;
1149             this.el.label = "Errors";
1150             var child_0 = new Xcls_Image35( _this );
1151             child_0.ref();
1152             this.el.set_image (  child_0.el  );
1153             this.el.show();
1154
1155             //listeners
1156             this.el.button_press_event.connect( () => {
1157                 if (this.popup == null) {
1158                     this.popup = new Xcls_ValaCompileErrors();
1159                     this.popup.window = _this;
1160                 }
1161                
1162                 
1163                 this.popup.show(this.notices, this.el);
1164                 return true;
1165             });
1166         }
1167
1168         // user defined functions
1169         public void setNotices (Json.Object nots, int qty) {
1170             this.el.show();
1171             this.el.label = qty.to_string() + " Errors";
1172             this.notices = nots;
1173         
1174         }
1175     }
1176     public class Xcls_Image35 : Object
1177     {
1178         public Gtk.Image el;
1179         private Xcls_MainWindow  _this;
1180
1181
1182             // my vars (def)
1183
1184         // ctor
1185         public Xcls_Image35(Xcls_MainWindow _owner )
1186         {
1187             _this = _owner;
1188             this.el = new Gtk.Image();
1189
1190             // my vars (dec)
1191
1192             // set gobject values
1193             this.el.icon_name = "dialog-error";
1194         }
1195
1196         // user defined functions
1197     }
1198
1199
1200     public class Xcls_statusbar_warnings : Object
1201     {
1202         public Gtk.ImageMenuItem el;
1203         private Xcls_MainWindow  _this;
1204
1205
1206             // my vars (def)
1207         public Xcls_ValaCompileErrors popup;
1208         public Json.Object notices;
1209
1210         // ctor
1211         public Xcls_statusbar_warnings(Xcls_MainWindow _owner )
1212         {
1213             _this = _owner;
1214             _this.statusbar_warnings = this;
1215             this.el = new Gtk.ImageMenuItem();
1216
1217             // my vars (dec)
1218             this.notices = new Json.Object();
1219
1220             // set gobject values
1221             this.el.always_show_image = true;
1222             this.el.label = "Warnings";
1223             var child_0 = new Xcls_Image37( _this );
1224             child_0.ref();
1225             this.el.set_image (  child_0.el  );
1226             this.el.show();
1227
1228             //listeners
1229             this.el.button_press_event.connect( () => {
1230                 if (this.popup == null) {
1231                     this.popup = new Xcls_ValaCompileErrors();
1232                     this.popup.window = _this;
1233                 }
1234                 
1235                 this.popup.show(this.notices, this.el);
1236                 return true;
1237             });
1238         }
1239
1240         // user defined functions
1241         public void setNotices (Json.Object nots, int qty) {
1242             this.el.show();
1243             this.el.label = qty.to_string() + " Warnings";
1244             this.notices = nots;
1245         
1246         }
1247     }
1248     public class Xcls_Image37 : Object
1249     {
1250         public Gtk.Image el;
1251         private Xcls_MainWindow  _this;
1252
1253
1254             // my vars (def)
1255
1256         // ctor
1257         public Xcls_Image37(Xcls_MainWindow _owner )
1258         {
1259             _this = _owner;
1260             this.el = new Gtk.Image();
1261
1262             // my vars (dec)
1263
1264             // set gobject values
1265             this.el.icon_name = "dialog-warning";
1266         }
1267
1268         // user defined functions
1269     }
1270
1271
1272     public class Xcls_statusbar_depricated : Object
1273     {
1274         public Gtk.ImageMenuItem el;
1275         private Xcls_MainWindow  _this;
1276
1277
1278             // my vars (def)
1279         public Xcls_ValaCompileErrors popup;
1280         public Json.Object notices;
1281
1282         // ctor
1283         public Xcls_statusbar_depricated(Xcls_MainWindow _owner )
1284         {
1285             _this = _owner;
1286             _this.statusbar_depricated = this;
1287             this.el = new Gtk.ImageMenuItem();
1288
1289             // my vars (dec)
1290             this.notices = new Json.Object();
1291
1292             // set gobject values
1293             this.el.always_show_image = true;
1294             this.el.label = "Depricated";
1295             var child_0 = new Xcls_Image39( _this );
1296             child_0.ref();
1297             this.el.set_image (  child_0.el  );
1298             this.el.show();
1299
1300             //listeners
1301             this.el.button_press_event.connect( () => {
1302                 if (this.popup == null) {
1303                     this.popup = new Xcls_ValaCompileErrors();
1304                     this.popup.window = _this;
1305                 }
1306                 
1307                 
1308                 this.popup.show(this.notices, this.el);
1309                 return true;
1310             });
1311         }
1312
1313         // user defined functions
1314         public void setNotices (Json.Object nots, int qty) {
1315             this.el.show();
1316             this.el.label = qty.to_string() + " Depricated";
1317             this.notices = nots;
1318         
1319         }
1320     }
1321     public class Xcls_Image39 : Object
1322     {
1323         public Gtk.Image el;
1324         private Xcls_MainWindow  _this;
1325
1326
1327             // my vars (def)
1328
1329         // ctor
1330         public Xcls_Image39(Xcls_MainWindow _owner )
1331         {
1332             _this = _owner;
1333             this.el = new Gtk.Image();
1334
1335             // my vars (dec)
1336
1337             // set gobject values
1338             this.el.icon_name = "dialog-information";
1339         }
1340
1341         // user defined functions
1342     }
1343
1344
1345     public class Xcls_statusbar_run : Object
1346     {
1347         public Gtk.ImageMenuItem el;
1348         private Xcls_MainWindow  _this;
1349
1350
1351             // my vars (def)
1352         public Xcls_ValaCompileErrors popup;
1353
1354         // ctor
1355         public Xcls_statusbar_run(Xcls_MainWindow _owner )
1356         {
1357             _this = _owner;
1358             _this.statusbar_run = this;
1359             this.el = new Gtk.ImageMenuItem();
1360
1361             // my vars (dec)
1362
1363             // set gobject values
1364             this.el.always_show_image = true;
1365             this.el.label = "Run";
1366             var child_0 = new Xcls_Image41( _this );
1367             child_0.ref();
1368             this.el.set_image (  child_0.el  );
1369             this.el.show();
1370
1371             //listeners
1372             this.el.button_press_event.connect( () => {
1373                 if (_this.windowstate.file == null) {
1374                         return true;
1375                 }
1376                 BuilderApplication.valasource.spawnExecute(_this.windowstate.file);
1377                 
1378                 _this.windowstate.compile_results.show(this.el,true);
1379                 
1380                 return true;
1381             });
1382         }
1383
1384         // user defined functions
1385     }
1386     public class Xcls_Image41 : Object
1387     {
1388         public Gtk.Image el;
1389         private Xcls_MainWindow  _this;
1390
1391
1392             // my vars (def)
1393
1394         // ctor
1395         public Xcls_Image41(Xcls_MainWindow _owner )
1396         {
1397             _this = _owner;
1398             this.el = new Gtk.Image();
1399
1400             // my vars (dec)
1401
1402             // set gobject values
1403             this.el.icon_name = "media-playback-start";
1404         }
1405
1406         // user defined functions
1407     }
1408
1409
1410
1411     public class Xcls_statusbar_compile_spinner : Object
1412     {
1413         public Gtk.Spinner el;
1414         private Xcls_MainWindow  _this;
1415
1416
1417             // my vars (def)
1418
1419         // ctor
1420         public Xcls_statusbar_compile_spinner(Xcls_MainWindow _owner )
1421         {
1422             _this = _owner;
1423             _this.statusbar_compile_spinner = this;
1424             this.el = new Gtk.Spinner();
1425
1426             // my vars (dec)
1427
1428             // set gobject values
1429             this.el.tooltip_text = "Compiling";
1430         }
1431
1432         // user defined functions
1433         public void start () {
1434           this.el.show();
1435           this.el.start();  
1436         }
1437         public void stop () {
1438          this.el.stop();
1439           this.el.hide();
1440         }
1441     }
1442
1443
1444
1445 }