Fix #7368 - auto show menu items
[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             {
319               this.el.show_all();
320             }
321         }
322
323         // user defined functions
324     }
325     public class Xcls_MenuItem7 : Object
326     {
327         public Gtk.MenuItem el;
328         private Xcls_MainWindow  _this;
329
330
331             // my vars (def)
332
333         // ctor
334         public Xcls_MenuItem7(Xcls_MainWindow _owner )
335         {
336             _this = _owner;
337             this.el = new Gtk.MenuItem();
338
339             // my vars (dec)
340
341             // set gobject values
342             this.el.label = "New Window";
343             this.el.show_all();
344
345             //listeners
346             this.el.activate.connect( ( ) => {
347             
348                 _this.windowstate.showPopoverFiles(_this.windowbtn.el, _this.project, true);
349             });
350         }
351
352         // user defined functions
353     }
354
355     public class Xcls_SeparatorMenuItem8 : Object
356     {
357         public Gtk.SeparatorMenuItem el;
358         private Xcls_MainWindow  _this;
359
360
361             // my vars (def)
362
363         // ctor
364         public Xcls_SeparatorMenuItem8(Xcls_MainWindow _owner )
365         {
366             _this = _owner;
367             this.el = new Gtk.SeparatorMenuItem();
368
369             // my vars (dec)
370
371             // set gobject values
372             this.el.show_all();
373         }
374
375         // user defined functions
376     }
377
378
379
380     public class Xcls_open_projects_btn : Object
381     {
382         public Gtk.Button el;
383         private Xcls_MainWindow  _this;
384
385
386             // my vars (def)
387
388         // ctor
389         public Xcls_open_projects_btn(Xcls_MainWindow _owner )
390         {
391             _this = _owner;
392             _this.open_projects_btn = this;
393             this.el = new Gtk.Button();
394
395             // my vars (dec)
396
397             // set gobject values
398             this.el.always_show_image = true;
399             this.el.label = "Files / Projects";
400             var child_0 = new Xcls_Image10( _this );
401             child_0.ref();
402             this.el.set_image (  child_0.el  );
403
404             //listeners
405             this.el.clicked.connect( ( ) => {
406                 _this.windowstate.showPopoverFiles(this.el, _this.project, false);
407             
408             });
409         }
410
411         // user defined functions
412     }
413     public class Xcls_Image10 : Object
414     {
415         public Gtk.Image el;
416         private Xcls_MainWindow  _this;
417
418
419             // my vars (def)
420
421         // ctor
422         public Xcls_Image10(Xcls_MainWindow _owner )
423         {
424             _this = _owner;
425             this.el = new Gtk.Image();
426
427             // my vars (dec)
428
429             // set gobject values
430             this.el.icon_name = "system-file-manager";
431         }
432
433         // user defined functions
434     }
435
436
437
438
439     public class Xcls_vbox : Object
440     {
441         public Gtk.Box el;
442         private Xcls_MainWindow  _this;
443
444
445             // my vars (def)
446
447         // ctor
448         public Xcls_vbox(Xcls_MainWindow _owner )
449         {
450             _this = _owner;
451             _this.vbox = this;
452             this.el = new Gtk.Box( Gtk.Orientation.VERTICAL, 0 );
453
454             // my vars (dec)
455
456             // set gobject values
457             this.el.homogeneous = false;
458             var child_0 = new Xcls_mainpane( _this );
459             child_0.ref();
460             this.el.pack_start (  child_0.el , true,true,0 );
461             var child_1 = new Xcls_Box20( _this );
462             child_1.ref();
463             this.el.pack_end (  child_1.el , false,true,0 );
464         }
465
466         // user defined functions
467     }
468     public class Xcls_mainpane : Object
469     {
470         public Gtk.Paned el;
471         private Xcls_MainWindow  _this;
472
473
474             // my vars (def)
475         public int lastWidth;
476
477         // ctor
478         public Xcls_mainpane(Xcls_MainWindow _owner )
479         {
480             _this = _owner;
481             _this.mainpane = this;
482             this.el = new Gtk.Paned( Gtk.Orientation.HORIZONTAL );
483
484             // my vars (dec)
485             this.lastWidth = 0;
486
487             // set gobject values
488             this.el.position = 400;
489             var child_0 = new Xcls_leftpane( _this );
490             child_0.ref();
491             this.el.add (  child_0.el  );
492             var child_1 = new Xcls_Box17( _this );
493             child_1.ref();
494             this.el.add2 (  child_1.el  );
495         }
496
497         // user defined functions
498     }
499     public class Xcls_leftpane : Object
500     {
501         public Gtk.Box el;
502         private Xcls_MainWindow  _this;
503
504
505             // my vars (def)
506
507         // ctor
508         public Xcls_leftpane(Xcls_MainWindow _owner )
509         {
510             _this = _owner;
511             _this.leftpane = this;
512             this.el = new Gtk.Box( Gtk.Orientation.HORIZONTAL, 0 );
513
514             // my vars (dec)
515
516             // set gobject values
517             var child_0 = new Xcls_editpane( _this );
518             child_0.ref();
519             this.el.pack_start (  child_0.el , true,true,0 );
520         }
521
522         // user defined functions
523     }
524     public class Xcls_editpane : Object
525     {
526         public Gtk.Paned el;
527         private Xcls_MainWindow  _this;
528
529
530             // my vars (def)
531
532         // ctor
533         public Xcls_editpane(Xcls_MainWindow _owner )
534         {
535             _this = _owner;
536             _this.editpane = this;
537             this.el = new Gtk.Paned( Gtk.Orientation.HORIZONTAL );
538
539             // my vars (dec)
540
541             // set gobject values
542             var child_0 = new Xcls_tree( _this );
543             child_0.ref();
544             this.el.add1 (  child_0.el  );
545             var child_1 = new Xcls_props( _this );
546             child_1.ref();
547             this.el.add2 (  child_1.el  );
548
549             //listeners
550             this.el.accept_position.connect( () => {
551                 GLib.debug("Accept postion");
552                 return true;
553             });
554             this.el.move_handle.connect( (scroll) => {
555                 GLib.debug("Move handle");
556                 return true;
557             });
558         }
559
560         // user defined functions
561     }
562     public class Xcls_tree : Object
563     {
564         public Gtk.Box el;
565         private Xcls_MainWindow  _this;
566
567
568             // my vars (def)
569
570         // ctor
571         public Xcls_tree(Xcls_MainWindow _owner )
572         {
573             _this = _owner;
574             _this.tree = this;
575             this.el = new Gtk.Box( Gtk.Orientation.VERTICAL, 0 );
576
577             // my vars (dec)
578
579             // set gobject values
580         }
581
582         // user defined functions
583     }
584
585     public class Xcls_props : Object
586     {
587         public Gtk.Box el;
588         private Xcls_MainWindow  _this;
589
590
591             // my vars (def)
592
593         // ctor
594         public Xcls_props(Xcls_MainWindow _owner )
595         {
596             _this = _owner;
597             _this.props = this;
598             this.el = new Gtk.Box( Gtk.Orientation.VERTICAL, 0 );
599
600             // my vars (dec)
601
602             // set gobject values
603         }
604
605         // user defined functions
606     }
607
608
609
610     public class Xcls_Box17 : Object
611     {
612         public Gtk.Box el;
613         private Xcls_MainWindow  _this;
614
615
616             // my vars (def)
617
618         // ctor
619         public Xcls_Box17(Xcls_MainWindow _owner )
620         {
621             _this = _owner;
622             this.el = new Gtk.Box( Gtk.Orientation.VERTICAL, 0 );
623
624             // my vars (dec)
625
626             // set gobject values
627             var child_0 = new Xcls_rooviewbox( _this );
628             child_0.ref();
629             this.el.add (  child_0.el  );
630             var child_1 = new Xcls_codeeditviewbox( _this );
631             child_1.ref();
632             this.el.add (  child_1.el  );
633         }
634
635         // user defined functions
636     }
637     public class Xcls_rooviewbox : Object
638     {
639         public Gtk.Box el;
640         private Xcls_MainWindow  _this;
641
642
643             // my vars (def)
644
645         // ctor
646         public Xcls_rooviewbox(Xcls_MainWindow _owner )
647         {
648             _this = _owner;
649             _this.rooviewbox = this;
650             this.el = new Gtk.Box( Gtk.Orientation.VERTICAL, 0 );
651
652             // my vars (dec)
653
654             // set gobject values
655             this.el.vexpand = true;
656         }
657
658         // user defined functions
659     }
660
661     public class Xcls_codeeditviewbox : Object
662     {
663         public Gtk.Box el;
664         private Xcls_MainWindow  _this;
665
666
667             // my vars (def)
668
669         // ctor
670         public Xcls_codeeditviewbox(Xcls_MainWindow _owner )
671         {
672             _this = _owner;
673             _this.codeeditviewbox = this;
674             this.el = new Gtk.Box( Gtk.Orientation.VERTICAL, 0 );
675
676             // my vars (dec)
677
678             // set gobject values
679             this.el.vexpand = true;
680         }
681
682         // user defined functions
683     }
684
685
686
687     public class Xcls_Box20 : Object
688     {
689         public Gtk.Box el;
690         private Xcls_MainWindow  _this;
691
692
693             // my vars (def)
694
695         // ctor
696         public Xcls_Box20(Xcls_MainWindow _owner )
697         {
698             _this = _owner;
699             this.el = new Gtk.Box( Gtk.Orientation.HORIZONTAL, 0 );
700
701             // my vars (dec)
702
703             // set gobject values
704             this.el.homogeneous = false;
705             var child_0 = new Xcls_Button21( _this );
706             child_0.ref();
707             this.el.add (  child_0.el  );
708             var child_1 = new Xcls_Button23( _this );
709             child_1.ref();
710             this.el.add (  child_1.el  );
711             var child_2 = new Xcls_MenuButton25( _this );
712             child_2.ref();
713             this.el.add (  child_2.el  );
714             var child_3 = new Xcls_Label30( _this );
715             child_3.ref();
716             this.el.pack_start (  child_3.el , true,true,0 );
717             var child_4 = new Xcls_statusbar( _this );
718             child_4.ref();
719             this.el.pack_start (  child_4.el , true,true,0 );
720             var child_5 = new Xcls_MenuBar32( _this );
721             child_5.ref();
722             this.el.add (  child_5.el  );
723             var child_6 = new Xcls_statusbar_compile_spinner( _this );
724             child_6.ref();
725             this.el.add (  child_6.el  );
726         }
727
728         // user defined functions
729     }
730     public class Xcls_Button21 : Object
731     {
732         public Gtk.Button el;
733         private Xcls_MainWindow  _this;
734
735
736             // my vars (def)
737
738         // ctor
739         public Xcls_Button21(Xcls_MainWindow _owner )
740         {
741             _this = _owner;
742             this.el = new Gtk.Button();
743
744             // my vars (dec)
745
746             // set gobject values
747             this.el.always_show_image = true;
748             this.el.tooltip_text = "Project Details";
749             this.el.label = "Edit Project Settings";
750             var child_0 = new Xcls_Image22( _this );
751             child_0.ref();
752             this.el.set_image (  child_0.el  );
753
754             //listeners
755             this.el.clicked.connect( ( ) => {
756                  
757                  _this.windowstate.projectPopoverShow(this.el, _this.project);
758                
759               
760             });
761         }
762
763         // user defined functions
764     }
765     public class Xcls_Image22 : Object
766     {
767         public Gtk.Image el;
768         private Xcls_MainWindow  _this;
769
770
771             // my vars (def)
772
773         // ctor
774         public Xcls_Image22(Xcls_MainWindow _owner )
775         {
776             _this = _owner;
777             this.el = new Gtk.Image();
778
779             // my vars (dec)
780
781             // set gobject values
782             this.el.icon_name = "emblem-system";
783         }
784
785         // user defined functions
786     }
787
788
789     public class Xcls_Button23 : Object
790     {
791         public Gtk.Button el;
792         private Xcls_MainWindow  _this;
793
794
795             // my vars (def)
796
797         // ctor
798         public Xcls_Button23(Xcls_MainWindow _owner )
799         {
800             _this = _owner;
801             this.el = new Gtk.Button();
802
803             // my vars (dec)
804
805             // set gobject values
806             this.el.always_show_image = true;
807             this.el.tooltip_text = "File Details";
808             this.el.label = "Edit File Properties";
809             var child_0 = new Xcls_Image24( _this );
810             child_0.ref();
811             this.el.set_image (  child_0.el  );
812
813             //listeners
814             this.el.clicked.connect( ( ) => {
815               
816                 // create a new file in project..
817                 if (_this.project == null || _this.windowstate.file == null) {
818                     return  ;
819                 }
820                  _this.windowstate.file_details.show(
821                     _this.windowstate.file, this.el, false
822                 );
823                  
824                 return  ;    
825             
826             
827             });
828         }
829
830         // user defined functions
831     }
832     public class Xcls_Image24 : Object
833     {
834         public Gtk.Image el;
835         private Xcls_MainWindow  _this;
836
837
838             // my vars (def)
839
840         // ctor
841         public Xcls_Image24(Xcls_MainWindow _owner )
842         {
843             _this = _owner;
844             this.el = new Gtk.Image();
845
846             // my vars (dec)
847
848             // set gobject values
849             this.el.icon_name = "document-properties";
850         }
851
852         // user defined functions
853     }
854
855
856     public class Xcls_MenuButton25 : Object
857     {
858         public Gtk.MenuButton el;
859         private Xcls_MainWindow  _this;
860
861
862             // my vars (def)
863
864         // ctor
865         public Xcls_MenuButton25(Xcls_MainWindow _owner )
866         {
867             _this = _owner;
868             this.el = new Gtk.MenuButton();
869
870             // my vars (dec)
871
872             // set gobject values
873             this.el.always_show_image = true;
874             this.el.label = "About";
875             var child_0 = new Xcls_topbarmenu( _this );
876             child_0.ref();
877             this.el.set_popup (  child_0.el  );
878             var child_1 = new Xcls_Image29( _this );
879             child_1.ref();
880             this.el.set_image (  child_1.el  );
881         }
882
883         // user defined functions
884     }
885     public class Xcls_topbarmenu : Object
886     {
887         public Gtk.Menu el;
888         private Xcls_MainWindow  _this;
889
890
891             // my vars (def)
892
893         // ctor
894         public Xcls_topbarmenu(Xcls_MainWindow _owner )
895         {
896             _this = _owner;
897             _this.topbarmenu = this;
898             this.el = new Gtk.Menu();
899
900             // my vars (dec)
901
902             // set gobject values
903             var child_0 = new Xcls_MenuItem27( _this );
904             child_0.ref();
905             this.el.append (  child_0.el  );
906             var child_1 = new Xcls_MenuItem28( _this );
907             child_1.ref();
908             this.el.append (  child_1.el  );
909
910             // init method
911
912             {
913                 this.el.show_all();
914             }
915         }
916
917         // user defined functions
918     }
919     public class Xcls_MenuItem27 : Object
920     {
921         public Gtk.MenuItem el;
922         private Xcls_MainWindow  _this;
923
924
925             // my vars (def)
926
927         // ctor
928         public Xcls_MenuItem27(Xcls_MainWindow _owner )
929         {
930             _this = _owner;
931             this.el = new Gtk.MenuItem();
932
933             // my vars (dec)
934
935             // set gobject values
936             this.el.label = "Download updated Resources";
937             this.el.show_all();
938
939             //listeners
940             this.el.activate.connect( ( ) => {
941                      Resources.singleton().fetchStart();
942             });
943         }
944
945         // user defined functions
946     }
947
948     public class Xcls_MenuItem28 : Object
949     {
950         public Gtk.MenuItem el;
951         private Xcls_MainWindow  _this;
952
953
954             // my vars (def)
955
956         // ctor
957         public Xcls_MenuItem28(Xcls_MainWindow _owner )
958         {
959             _this = _owner;
960             this.el = new Gtk.MenuItem();
961
962             // my vars (dec)
963
964             // set gobject values
965             this.el.label = "About the Builder";
966             this.el.show_all();
967
968             //listeners
969             this.el.activate.connect( () => {
970                 About.singleton().el.show();
971                 });
972         }
973
974         // user defined functions
975     }
976
977
978     public class Xcls_Image29 : Object
979     {
980         public Gtk.Image el;
981         private Xcls_MainWindow  _this;
982
983
984             // my vars (def)
985
986         // ctor
987         public Xcls_Image29(Xcls_MainWindow _owner )
988         {
989             _this = _owner;
990             this.el = new Gtk.Image();
991
992             // my vars (dec)
993
994             // set gobject values
995             this.el.icon_name = "dialog-information";
996         }
997
998         // user defined functions
999     }
1000
1001
1002     public class Xcls_Label30 : Object
1003     {
1004         public Gtk.Label el;
1005         private Xcls_MainWindow  _this;
1006
1007
1008             // my vars (def)
1009
1010         // ctor
1011         public Xcls_Label30(Xcls_MainWindow _owner )
1012         {
1013             _this = _owner;
1014             this.el = new Gtk.Label( "   " );
1015
1016             // my vars (dec)
1017
1018             // set gobject values
1019         }
1020
1021         // user defined functions
1022     }
1023
1024     public class Xcls_statusbar : Object
1025     {
1026         public Gtk.ProgressBar el;
1027         private Xcls_MainWindow  _this;
1028
1029
1030             // my vars (def)
1031         public ulong handler_id;
1032
1033         // ctor
1034         public Xcls_statusbar(Xcls_MainWindow _owner )
1035         {
1036             _this = _owner;
1037             _this.statusbar = this;
1038             this.el = new Gtk.ProgressBar();
1039
1040             // my vars (dec)
1041             this.handler_id = -1;
1042
1043             // set gobject values
1044             this.el.show_text = true;
1045
1046             // init method
1047
1048             {
1049                  this.handler_id = Resources.singleton().updateProgress.connect((pos,total) => {
1050                     if (pos < 1) {
1051                         this.el.hide();
1052                         _this.mainpane.el.set_sensitive(true);
1053                         
1054                         return;
1055                     }
1056                      _this.mainpane.el.set_sensitive(false);
1057                      this.el.show();
1058                      this.el.set_fraction ((1.0f * pos) / (1.0f * total));
1059                      this.el.set_text("Fetching Resource : %s/%s".printf(pos.to_string(), total.to_string()));
1060                    
1061                  });
1062             }
1063         }
1064
1065         // user defined functions
1066     }
1067
1068     public class Xcls_MenuBar32 : Object
1069     {
1070         public Gtk.MenuBar el;
1071         private Xcls_MainWindow  _this;
1072
1073
1074             // my vars (def)
1075
1076         // ctor
1077         public Xcls_MenuBar32(Xcls_MainWindow _owner )
1078         {
1079             _this = _owner;
1080             this.el = new Gtk.MenuBar();
1081
1082             // my vars (dec)
1083
1084             // set gobject values
1085             var child_0 = new Xcls_statusbar_compilestatus_label( _this );
1086             child_0.ref();
1087             this.el.add (  child_0.el  );
1088             var child_1 = new Xcls_statusbar_errors( _this );
1089             child_1.ref();
1090             this.el.add (  child_1.el  );
1091             var child_2 = new Xcls_statusbar_warnings( _this );
1092             child_2.ref();
1093             this.el.add (  child_2.el  );
1094             var child_3 = new Xcls_statusbar_depricated( _this );
1095             child_3.ref();
1096             this.el.add (  child_3.el  );
1097             var child_4 = new Xcls_statusbar_run( _this );
1098             child_4.ref();
1099             this.el.add (  child_4.el  );
1100         }
1101
1102         // user defined functions
1103     }
1104     public class Xcls_statusbar_compilestatus_label : Object
1105     {
1106         public Gtk.MenuItem el;
1107         private Xcls_MainWindow  _this;
1108
1109
1110             // my vars (def)
1111
1112         // ctor
1113         public Xcls_statusbar_compilestatus_label(Xcls_MainWindow _owner )
1114         {
1115             _this = _owner;
1116             _this.statusbar_compilestatus_label = this;
1117             this.el = new Gtk.MenuItem();
1118
1119             // my vars (dec)
1120
1121             // set gobject values
1122             this.el.label = "Compile Status:";
1123             this.el.show_all();
1124         }
1125
1126         // user defined functions
1127     }
1128
1129     public class Xcls_statusbar_errors : Object
1130     {
1131         public Gtk.ImageMenuItem el;
1132         private Xcls_MainWindow  _this;
1133
1134
1135             // my vars (def)
1136         public Xcls_ValaCompileErrors popup;
1137         public Json.Object notices;
1138
1139         // ctor
1140         public Xcls_statusbar_errors(Xcls_MainWindow _owner )
1141         {
1142             _this = _owner;
1143             _this.statusbar_errors = this;
1144             this.el = new Gtk.ImageMenuItem();
1145
1146             // my vars (dec)
1147             this.notices = new Json.Object();
1148
1149             // set gobject values
1150             this.el.always_show_image = true;
1151             this.el.label = "Errors";
1152             var child_0 = new Xcls_Image35( _this );
1153             child_0.ref();
1154             this.el.set_image (  child_0.el  );
1155             this.el.show_all();
1156
1157             //listeners
1158             this.el.button_press_event.connect( () => {
1159                 if (this.popup == null) {
1160                     this.popup = new Xcls_ValaCompileErrors();
1161                     this.popup.window = _this;
1162                 }
1163                
1164                 
1165                 this.popup.show(this.notices, this.el);
1166                 return true;
1167             });
1168         }
1169
1170         // user defined functions
1171         public void setNotices (Json.Object nots, int qty) {
1172             this.el.show();
1173             this.el.label = qty.to_string() + " Errors";
1174             this.notices = nots;
1175         
1176         }
1177     }
1178     public class Xcls_Image35 : Object
1179     {
1180         public Gtk.Image el;
1181         private Xcls_MainWindow  _this;
1182
1183
1184             // my vars (def)
1185
1186         // ctor
1187         public Xcls_Image35(Xcls_MainWindow _owner )
1188         {
1189             _this = _owner;
1190             this.el = new Gtk.Image();
1191
1192             // my vars (dec)
1193
1194             // set gobject values
1195             this.el.icon_name = "dialog-error";
1196         }
1197
1198         // user defined functions
1199     }
1200
1201
1202     public class Xcls_statusbar_warnings : Object
1203     {
1204         public Gtk.ImageMenuItem el;
1205         private Xcls_MainWindow  _this;
1206
1207
1208             // my vars (def)
1209         public Xcls_ValaCompileErrors popup;
1210         public Json.Object notices;
1211
1212         // ctor
1213         public Xcls_statusbar_warnings(Xcls_MainWindow _owner )
1214         {
1215             _this = _owner;
1216             _this.statusbar_warnings = this;
1217             this.el = new Gtk.ImageMenuItem();
1218
1219             // my vars (dec)
1220             this.notices = new Json.Object();
1221
1222             // set gobject values
1223             this.el.always_show_image = true;
1224             this.el.label = "Warnings";
1225             var child_0 = new Xcls_Image37( _this );
1226             child_0.ref();
1227             this.el.set_image (  child_0.el  );
1228             this.el.show_all();
1229
1230             //listeners
1231             this.el.button_press_event.connect( () => {
1232                 if (this.popup == null) {
1233                     this.popup = new Xcls_ValaCompileErrors();
1234                     this.popup.window = _this;
1235                 }
1236                 
1237                 this.popup.show(this.notices, this.el);
1238                 return true;
1239             });
1240         }
1241
1242         // user defined functions
1243         public void setNotices (Json.Object nots, int qty) {
1244             this.el.show();
1245             this.el.label = qty.to_string() + " Warnings";
1246             this.notices = nots;
1247         
1248         }
1249     }
1250     public class Xcls_Image37 : Object
1251     {
1252         public Gtk.Image el;
1253         private Xcls_MainWindow  _this;
1254
1255
1256             // my vars (def)
1257
1258         // ctor
1259         public Xcls_Image37(Xcls_MainWindow _owner )
1260         {
1261             _this = _owner;
1262             this.el = new Gtk.Image();
1263
1264             // my vars (dec)
1265
1266             // set gobject values
1267             this.el.icon_name = "dialog-warning";
1268         }
1269
1270         // user defined functions
1271     }
1272
1273
1274     public class Xcls_statusbar_depricated : Object
1275     {
1276         public Gtk.ImageMenuItem el;
1277         private Xcls_MainWindow  _this;
1278
1279
1280             // my vars (def)
1281         public Xcls_ValaCompileErrors popup;
1282         public Json.Object notices;
1283
1284         // ctor
1285         public Xcls_statusbar_depricated(Xcls_MainWindow _owner )
1286         {
1287             _this = _owner;
1288             _this.statusbar_depricated = this;
1289             this.el = new Gtk.ImageMenuItem();
1290
1291             // my vars (dec)
1292             this.notices = new Json.Object();
1293
1294             // set gobject values
1295             this.el.always_show_image = true;
1296             this.el.label = "Depricated";
1297             var child_0 = new Xcls_Image39( _this );
1298             child_0.ref();
1299             this.el.set_image (  child_0.el  );
1300             this.el.show_all();
1301
1302             //listeners
1303             this.el.button_press_event.connect( () => {
1304                 if (this.popup == null) {
1305                     this.popup = new Xcls_ValaCompileErrors();
1306                     this.popup.window = _this;
1307                 }
1308                 
1309                 
1310                 this.popup.show(this.notices, this.el);
1311                 return true;
1312             });
1313         }
1314
1315         // user defined functions
1316         public void setNotices (Json.Object nots, int qty) {
1317             this.el.show();
1318             this.el.label = qty.to_string() + " Depricated";
1319             this.notices = nots;
1320         
1321         }
1322     }
1323     public class Xcls_Image39 : Object
1324     {
1325         public Gtk.Image el;
1326         private Xcls_MainWindow  _this;
1327
1328
1329             // my vars (def)
1330
1331         // ctor
1332         public Xcls_Image39(Xcls_MainWindow _owner )
1333         {
1334             _this = _owner;
1335             this.el = new Gtk.Image();
1336
1337             // my vars (dec)
1338
1339             // set gobject values
1340             this.el.icon_name = "dialog-information";
1341         }
1342
1343         // user defined functions
1344     }
1345
1346
1347     public class Xcls_statusbar_run : Object
1348     {
1349         public Gtk.ImageMenuItem el;
1350         private Xcls_MainWindow  _this;
1351
1352
1353             // my vars (def)
1354         public Xcls_ValaCompileErrors popup;
1355
1356         // ctor
1357         public Xcls_statusbar_run(Xcls_MainWindow _owner )
1358         {
1359             _this = _owner;
1360             _this.statusbar_run = this;
1361             this.el = new Gtk.ImageMenuItem();
1362
1363             // my vars (dec)
1364
1365             // set gobject values
1366             this.el.always_show_image = true;
1367             this.el.label = "Run";
1368             var child_0 = new Xcls_Image41( _this );
1369             child_0.ref();
1370             this.el.set_image (  child_0.el  );
1371             this.el.show_all();
1372
1373             //listeners
1374             this.el.button_press_event.connect( () => {
1375                 if (_this.windowstate.file == null) {
1376                         return true;
1377                 }
1378                 BuilderApplication.valasource.spawnExecute(_this.windowstate.file);
1379                 
1380                 _this.windowstate.compile_results.show(this.el,true);
1381                 
1382                 return true;
1383             });
1384         }
1385
1386         // user defined functions
1387     }
1388     public class Xcls_Image41 : Object
1389     {
1390         public Gtk.Image el;
1391         private Xcls_MainWindow  _this;
1392
1393
1394             // my vars (def)
1395
1396         // ctor
1397         public Xcls_Image41(Xcls_MainWindow _owner )
1398         {
1399             _this = _owner;
1400             this.el = new Gtk.Image();
1401
1402             // my vars (dec)
1403
1404             // set gobject values
1405             this.el.icon_name = "media-playback-start";
1406         }
1407
1408         // user defined functions
1409     }
1410
1411
1412
1413     public class Xcls_statusbar_compile_spinner : Object
1414     {
1415         public Gtk.Spinner el;
1416         private Xcls_MainWindow  _this;
1417
1418
1419             // my vars (def)
1420
1421         // ctor
1422         public Xcls_statusbar_compile_spinner(Xcls_MainWindow _owner )
1423         {
1424             _this = _owner;
1425             _this.statusbar_compile_spinner = this;
1426             this.el = new Gtk.Spinner();
1427
1428             // my vars (dec)
1429
1430             // set gobject values
1431             this.el.tooltip_text = "Compiling";
1432         }
1433
1434         // user defined functions
1435         public void start () {
1436           this.el.show();
1437           this.el.start();  
1438         }
1439         public void stop () {
1440          this.el.stop();
1441           this.el.hide();
1442         }
1443     }
1444
1445
1446
1447 }