Fix #7352 - search improvements
[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
344             //listeners
345             this.el.activate.connect( ( ) => {
346             
347                 _this.windowstate.showPopoverFiles(_this.windowbtn.el, _this.project, true);
348             });
349         }
350
351         // user defined functions
352     }
353
354     public class Xcls_SeparatorMenuItem8 : Object
355     {
356         public Gtk.SeparatorMenuItem el;
357         private Xcls_MainWindow  _this;
358
359
360             // my vars (def)
361
362         // ctor
363         public Xcls_SeparatorMenuItem8(Xcls_MainWindow _owner )
364         {
365             _this = _owner;
366             this.el = new Gtk.SeparatorMenuItem();
367
368             // my vars (dec)
369
370             // set gobject values
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
936             //listeners
937             this.el.activate.connect( ( ) => {
938                      Resources.singleton().fetchStart();
939             });
940         }
941
942         // user defined functions
943     }
944
945     public class Xcls_MenuItem28 : Object
946     {
947         public Gtk.MenuItem el;
948         private Xcls_MainWindow  _this;
949
950
951             // my vars (def)
952
953         // ctor
954         public Xcls_MenuItem28(Xcls_MainWindow _owner )
955         {
956             _this = _owner;
957             this.el = new Gtk.MenuItem();
958
959             // my vars (dec)
960
961             // set gobject values
962             this.el.label = "About the Builder";
963
964             //listeners
965             this.el.activate.connect( () => {
966                 About.singleton().el.show();
967                 });
968         }
969
970         // user defined functions
971     }
972
973
974     public class Xcls_Image29 : Object
975     {
976         public Gtk.Image el;
977         private Xcls_MainWindow  _this;
978
979
980             // my vars (def)
981
982         // ctor
983         public Xcls_Image29(Xcls_MainWindow _owner )
984         {
985             _this = _owner;
986             this.el = new Gtk.Image();
987
988             // my vars (dec)
989
990             // set gobject values
991             this.el.icon_name = "dialog-information";
992         }
993
994         // user defined functions
995     }
996
997
998     public class Xcls_Label30 : Object
999     {
1000         public Gtk.Label el;
1001         private Xcls_MainWindow  _this;
1002
1003
1004             // my vars (def)
1005
1006         // ctor
1007         public Xcls_Label30(Xcls_MainWindow _owner )
1008         {
1009             _this = _owner;
1010             this.el = new Gtk.Label( "   " );
1011
1012             // my vars (dec)
1013
1014             // set gobject values
1015         }
1016
1017         // user defined functions
1018     }
1019
1020     public class Xcls_statusbar : Object
1021     {
1022         public Gtk.ProgressBar el;
1023         private Xcls_MainWindow  _this;
1024
1025
1026             // my vars (def)
1027         public ulong handler_id;
1028
1029         // ctor
1030         public Xcls_statusbar(Xcls_MainWindow _owner )
1031         {
1032             _this = _owner;
1033             _this.statusbar = this;
1034             this.el = new Gtk.ProgressBar();
1035
1036             // my vars (dec)
1037             this.handler_id = -1;
1038
1039             // set gobject values
1040             this.el.show_text = true;
1041
1042             // init method
1043
1044             {
1045                  this.handler_id = Resources.singleton().updateProgress.connect((pos,total) => {
1046                     if (pos < 1) {
1047                         this.el.hide();
1048                         _this.mainpane.el.set_sensitive(true);
1049                         
1050                         return;
1051                     }
1052                      _this.mainpane.el.set_sensitive(false);
1053                      this.el.show();
1054                      this.el.set_fraction ((1.0f * pos) / (1.0f * total));
1055                      this.el.set_text("Fetching Resource : %s/%s".printf(pos.to_string(), total.to_string()));
1056                    
1057                  });
1058             }
1059         }
1060
1061         // user defined functions
1062     }
1063
1064     public class Xcls_MenuBar32 : Object
1065     {
1066         public Gtk.MenuBar el;
1067         private Xcls_MainWindow  _this;
1068
1069
1070             // my vars (def)
1071
1072         // ctor
1073         public Xcls_MenuBar32(Xcls_MainWindow _owner )
1074         {
1075             _this = _owner;
1076             this.el = new Gtk.MenuBar();
1077
1078             // my vars (dec)
1079
1080             // set gobject values
1081             var child_0 = new Xcls_statusbar_compilestatus_label( _this );
1082             child_0.ref();
1083             this.el.add (  child_0.el  );
1084             var child_1 = new Xcls_statusbar_errors( _this );
1085             child_1.ref();
1086             this.el.add (  child_1.el  );
1087             var child_2 = new Xcls_statusbar_warnings( _this );
1088             child_2.ref();
1089             this.el.add (  child_2.el  );
1090             var child_3 = new Xcls_statusbar_depricated( _this );
1091             child_3.ref();
1092             this.el.add (  child_3.el  );
1093             var child_4 = new Xcls_statusbar_run( _this );
1094             child_4.ref();
1095             this.el.add (  child_4.el  );
1096         }
1097
1098         // user defined functions
1099     }
1100     public class Xcls_statusbar_compilestatus_label : Object
1101     {
1102         public Gtk.MenuItem el;
1103         private Xcls_MainWindow  _this;
1104
1105
1106             // my vars (def)
1107
1108         // ctor
1109         public Xcls_statusbar_compilestatus_label(Xcls_MainWindow _owner )
1110         {
1111             _this = _owner;
1112             _this.statusbar_compilestatus_label = this;
1113             this.el = new Gtk.MenuItem();
1114
1115             // my vars (dec)
1116
1117             // set gobject values
1118             this.el.label = "Compile Status:";
1119         }
1120
1121         // user defined functions
1122     }
1123
1124     public class Xcls_statusbar_errors : Object
1125     {
1126         public Gtk.ImageMenuItem el;
1127         private Xcls_MainWindow  _this;
1128
1129
1130             // my vars (def)
1131         public Xcls_ValaCompileErrors popup;
1132         public Json.Object notices;
1133
1134         // ctor
1135         public Xcls_statusbar_errors(Xcls_MainWindow _owner )
1136         {
1137             _this = _owner;
1138             _this.statusbar_errors = this;
1139             this.el = new Gtk.ImageMenuItem();
1140
1141             // my vars (dec)
1142             this.notices = new Json.Object();
1143
1144             // set gobject values
1145             this.el.always_show_image = true;
1146             this.el.label = "Errors";
1147             var child_0 = new Xcls_Image35( _this );
1148             child_0.ref();
1149             this.el.set_image (  child_0.el  );
1150
1151             //listeners
1152             this.el.button_press_event.connect( () => {
1153                 if (this.popup == null) {
1154                     this.popup = new Xcls_ValaCompileErrors();
1155                     this.popup.window = _this;
1156                 }
1157                
1158                 
1159                 this.popup.show(this.notices, this.el);
1160                 return true;
1161             });
1162         }
1163
1164         // user defined functions
1165         public void setNotices (Json.Object nots, int qty) {
1166             this.el.show();
1167             this.el.label = qty.to_string() + " Errors";
1168             this.notices = nots;
1169         
1170         }
1171     }
1172     public class Xcls_Image35 : Object
1173     {
1174         public Gtk.Image el;
1175         private Xcls_MainWindow  _this;
1176
1177
1178             // my vars (def)
1179
1180         // ctor
1181         public Xcls_Image35(Xcls_MainWindow _owner )
1182         {
1183             _this = _owner;
1184             this.el = new Gtk.Image();
1185
1186             // my vars (dec)
1187
1188             // set gobject values
1189             this.el.icon_name = "dialog-error";
1190         }
1191
1192         // user defined functions
1193     }
1194
1195
1196     public class Xcls_statusbar_warnings : Object
1197     {
1198         public Gtk.ImageMenuItem el;
1199         private Xcls_MainWindow  _this;
1200
1201
1202             // my vars (def)
1203         public Xcls_ValaCompileErrors popup;
1204         public Json.Object notices;
1205
1206         // ctor
1207         public Xcls_statusbar_warnings(Xcls_MainWindow _owner )
1208         {
1209             _this = _owner;
1210             _this.statusbar_warnings = this;
1211             this.el = new Gtk.ImageMenuItem();
1212
1213             // my vars (dec)
1214             this.notices = new Json.Object();
1215
1216             // set gobject values
1217             this.el.always_show_image = true;
1218             this.el.label = "Warnings";
1219             var child_0 = new Xcls_Image37( _this );
1220             child_0.ref();
1221             this.el.set_image (  child_0.el  );
1222
1223             //listeners
1224             this.el.button_press_event.connect( () => {
1225                 if (this.popup == null) {
1226                     this.popup = new Xcls_ValaCompileErrors();
1227                     this.popup.window = _this;
1228                 }
1229                 
1230                 this.popup.show(this.notices, this.el);
1231                 return true;
1232             });
1233         }
1234
1235         // user defined functions
1236         public void setNotices (Json.Object nots, int qty) {
1237             this.el.show();
1238             this.el.label = qty.to_string() + " Warnings";
1239             this.notices = nots;
1240         
1241         }
1242     }
1243     public class Xcls_Image37 : Object
1244     {
1245         public Gtk.Image el;
1246         private Xcls_MainWindow  _this;
1247
1248
1249             // my vars (def)
1250
1251         // ctor
1252         public Xcls_Image37(Xcls_MainWindow _owner )
1253         {
1254             _this = _owner;
1255             this.el = new Gtk.Image();
1256
1257             // my vars (dec)
1258
1259             // set gobject values
1260             this.el.icon_name = "dialog-warning";
1261         }
1262
1263         // user defined functions
1264     }
1265
1266
1267     public class Xcls_statusbar_depricated : Object
1268     {
1269         public Gtk.ImageMenuItem el;
1270         private Xcls_MainWindow  _this;
1271
1272
1273             // my vars (def)
1274         public Xcls_ValaCompileErrors popup;
1275         public Json.Object notices;
1276
1277         // ctor
1278         public Xcls_statusbar_depricated(Xcls_MainWindow _owner )
1279         {
1280             _this = _owner;
1281             _this.statusbar_depricated = this;
1282             this.el = new Gtk.ImageMenuItem();
1283
1284             // my vars (dec)
1285             this.notices = new Json.Object();
1286
1287             // set gobject values
1288             this.el.always_show_image = true;
1289             this.el.label = "Depricated";
1290             var child_0 = new Xcls_Image39( _this );
1291             child_0.ref();
1292             this.el.set_image (  child_0.el  );
1293
1294             //listeners
1295             this.el.button_press_event.connect( () => {
1296                 if (this.popup == null) {
1297                     this.popup = new Xcls_ValaCompileErrors();
1298                     this.popup.window = _this;
1299                 }
1300                 
1301                 
1302                 this.popup.show(this.notices, this.el);
1303                 return true;
1304             });
1305         }
1306
1307         // user defined functions
1308         public void setNotices (Json.Object nots, int qty) {
1309             this.el.show();
1310             this.el.label = qty.to_string() + " Depricated";
1311             this.notices = nots;
1312         
1313         }
1314     }
1315     public class Xcls_Image39 : Object
1316     {
1317         public Gtk.Image el;
1318         private Xcls_MainWindow  _this;
1319
1320
1321             // my vars (def)
1322
1323         // ctor
1324         public Xcls_Image39(Xcls_MainWindow _owner )
1325         {
1326             _this = _owner;
1327             this.el = new Gtk.Image();
1328
1329             // my vars (dec)
1330
1331             // set gobject values
1332             this.el.icon_name = "dialog-information";
1333         }
1334
1335         // user defined functions
1336     }
1337
1338
1339     public class Xcls_statusbar_run : Object
1340     {
1341         public Gtk.ImageMenuItem el;
1342         private Xcls_MainWindow  _this;
1343
1344
1345             // my vars (def)
1346         public Xcls_ValaCompileErrors popup;
1347
1348         // ctor
1349         public Xcls_statusbar_run(Xcls_MainWindow _owner )
1350         {
1351             _this = _owner;
1352             _this.statusbar_run = this;
1353             this.el = new Gtk.ImageMenuItem();
1354
1355             // my vars (dec)
1356
1357             // set gobject values
1358             this.el.always_show_image = true;
1359             this.el.label = "Run";
1360             var child_0 = new Xcls_Image41( _this );
1361             child_0.ref();
1362             this.el.set_image (  child_0.el  );
1363
1364             //listeners
1365             this.el.button_press_event.connect( () => {
1366                 if (_this.windowstate.file == null) {
1367                         return true;
1368                 }
1369                 BuilderApplication.valasource.spawnExecute(_this.windowstate.file);
1370                 
1371                 _this.windowstate.compile_results.show(this.el,true);
1372                 
1373                 return true;
1374             });
1375         }
1376
1377         // user defined functions
1378     }
1379     public class Xcls_Image41 : Object
1380     {
1381         public Gtk.Image el;
1382         private Xcls_MainWindow  _this;
1383
1384
1385             // my vars (def)
1386
1387         // ctor
1388         public Xcls_Image41(Xcls_MainWindow _owner )
1389         {
1390             _this = _owner;
1391             this.el = new Gtk.Image();
1392
1393             // my vars (dec)
1394
1395             // set gobject values
1396             this.el.icon_name = "media-playback-start";
1397         }
1398
1399         // user defined functions
1400     }
1401
1402
1403
1404     public class Xcls_statusbar_compile_spinner : Object
1405     {
1406         public Gtk.Spinner el;
1407         private Xcls_MainWindow  _this;
1408
1409
1410             // my vars (def)
1411
1412         // ctor
1413         public Xcls_statusbar_compile_spinner(Xcls_MainWindow _owner )
1414         {
1415             _this = _owner;
1416             _this.statusbar_compile_spinner = this;
1417             this.el = new Gtk.Spinner();
1418
1419             // my vars (dec)
1420
1421             // set gobject values
1422             this.el.tooltip_text = "Compiling";
1423         }
1424
1425         // user defined functions
1426         public void start () {
1427           this.el.show();
1428           this.el.start();  
1429         }
1430         public void stop () {
1431          this.el.stop();
1432           this.el.hide();
1433         }
1434     }
1435
1436
1437
1438 }