86a2313045953ae7dfa2afe2d2df694c31271144
[app.Builder.js] / 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_topbarmenu topbarmenu;
17     public Xcls_vbox vbox;
18     public Xcls_mainpane mainpane;
19     public Xcls_leftpane leftpane;
20     public Xcls_editpane editpane;
21     public Xcls_tree tree;
22     public Xcls_props props;
23     public Xcls_clutterembed clutterembed;
24     public Xcls_rooview rooview;
25     public Xcls_objectview objectview;
26     public Xcls_codeeditview codeeditview;
27     public Xcls_addpropsview addpropsview;
28     public Xcls_projecteditview projecteditview;
29     public Xcls_buttonlayout buttonlayout;
30     public Xcls_backbutton backbutton;
31     public Xcls_projectbutton projectbutton;
32     public Xcls_editfilebutton editfilebutton;
33     public Xcls_projecteditbutton projecteditbutton;
34     public Xcls_objectshowbutton objectshowbutton;
35     public Xcls_addpropbutton addpropbutton;
36     public Xcls_addlistenerbutton addlistenerbutton;
37     public Xcls_addprojectbutton addprojectbutton;
38     public Xcls_addfilebutton addfilebutton;
39     public Xcls_delprojectbutton delprojectbutton;
40     public Xcls_statusbar statusbar;
41     public Xcls_search_entry search_entry;
42     public Xcls_search_results search_results;
43     public Xcls_statusbar_errors statusbar_errors;
44     public Xcls_statusbar_warnings statusbar_warnings;
45     public Xcls_statusbar_depricated statusbar_depricated;
46     public Xcls_statusbar_run statusbar_run;
47
48         // my vars (def)
49     public Project.Project project;
50     public string title;
51     public int no_windows;
52     public WindowState windowstate;
53
54     // ctor
55     public Xcls_MainWindow()
56     {
57         _this = this;
58         this.el = new Gtk.Window( Gtk.WindowType.TOPLEVEL );
59
60         // my vars (dec)
61         this.project = null;
62         this.title = "Application Builder";
63         this.no_windows = 1;
64         this.windowstate = null;
65
66         // set gobject values
67         this.el.border_width = 0;
68         this.el.default_height = 500;
69         this.el.default_width = 800;
70         var child_0 = new Xcls_headerbar( _this );
71         child_0.ref();
72         this.el.set_titlebar (  child_0.el  );
73         var child_1 = new Xcls_vbox( _this );
74         child_1.ref();
75         this.el.add (  child_1.el  );
76
77         // init method
78
79         //this.el.show_all();
80
81         //listeners
82         this.el.delete_event.connect( (   event) => {
83             return false;
84         });
85         this.el.destroy.connect( () =>  {
86          Xcls_MainWindow.singleton().no_windows--;
87          
88          Resources.singleton().disconnect(_this.statusbar.handler_id);
89          
90          
91          if (Xcls_MainWindow.singleton().no_windows < 1) {
92         
93              Gtk.main_quit();
94          }
95         });
96         this.el.show.connect( ( ) => {
97             // hide the file editing..
98            
99             //this.hideViewEditing();
100             _this.statusbar.el.hide();
101              _this.statusbar_errors.el.hide();
102             _this.statusbar_warnings.el.hide();
103             _this.statusbar_depricated.el.hide();
104             
105           
106             Resources.singleton().checkResources();
107         
108         });
109         this.el.key_release_event.connect( (event) => {
110             
111             if (this.search_entry.el.is_visible()) {
112                         if (event.keyval == Gdk.Key.f && (event.state & Gdk.ModifierType.CONTROL_MASK ) > 0 ) {
113                             print("SAVE: ctrl-f  pressed");
114                                 this.search_entry.el.grab_focus();
115                             return false;
116                         }
117                         
118                           if (event.keyval == Gdk.Key.g && (event.state & Gdk.ModifierType.CONTROL_MASK ) > 0 ) {
119                             print("SAVE: ctrl-g  pressed");
120                                 this.search_entry.forwardSearch(true);
121                             return false;
122                         }
123                 }    
124            // print(event.key.keyval)
125             
126             return false;
127         
128         });
129     }
130
131     // user defined functions
132     public        void initChildren () {
133         // this needs putting in a better place..
134         this.windowstate = new WindowState(this);
135          
136     
137         //w.el.show_all();
138         var tl = new Clutter.Timeline(6000);
139         tl.set_repeat_count(-1);
140         tl.start();
141         tl.ref();
142     
143         
144     
145     
146     
147     }
148     public             void show () {
149        
150         this.el.show_all();
151     
152     }
153     public             void setTitle (string str) {
154         this.headerbar.el.set_title(this.title + " - " + str);
155     }
156     public class Xcls_headerbar : Object
157     {
158         public Gtk.HeaderBar el;
159         private Xcls_MainWindow  _this;
160
161
162             // my vars (def)
163
164         // ctor
165         public Xcls_headerbar(Xcls_MainWindow _owner )
166         {
167             _this = _owner;
168             _this.headerbar = this;
169             this.el = new Gtk.HeaderBar();
170
171             // my vars (dec)
172
173             // set gobject values
174             this.el.title = "Application Builder";
175             this.el.show_close_button = true;
176             var child_0 = new Xcls_Box3( _this );
177             child_0.ref();
178             this.el.pack_start (  child_0.el  );
179         }
180
181         // user defined functions
182     }
183     public class Xcls_Box3 : Object
184     {
185         public Gtk.Box el;
186         private Xcls_MainWindow  _this;
187
188
189             // my vars (def)
190
191         // ctor
192         public Xcls_Box3(Xcls_MainWindow _owner )
193         {
194             _this = _owner;
195             this.el = new Gtk.Box( Gtk.Orientation.HORIZONTAL, 0 );
196
197             // my vars (dec)
198
199             // set gobject values
200             var child_0 = new Xcls_MenuButton4( _this );
201             child_0.ref();
202             this.el.add (  child_0.el  );
203         }
204
205         // user defined functions
206     }
207     public class Xcls_MenuButton4 : Object
208     {
209         public Gtk.MenuButton el;
210         private Xcls_MainWindow  _this;
211
212
213             // my vars (def)
214
215         // ctor
216         public Xcls_MenuButton4(Xcls_MainWindow _owner )
217         {
218             _this = _owner;
219             this.el = new Gtk.MenuButton();
220
221             // my vars (dec)
222
223             // set gobject values
224             this.el.use_popover = false;
225             var child_0 = new Xcls_topbarmenu( _this );
226             child_0.ref();
227             this.el.set_popup (  child_0.el  );
228             var child_1 = new Xcls_Image10( _this );
229             child_1.ref();
230             this.el.set_image (  child_1.el  );
231         }
232
233         // user defined functions
234     }
235     public class Xcls_topbarmenu : Object
236     {
237         public Gtk.Menu el;
238         private Xcls_MainWindow  _this;
239
240
241             // my vars (def)
242
243         // ctor
244         public Xcls_topbarmenu(Xcls_MainWindow _owner )
245         {
246             _this = _owner;
247             _this.topbarmenu = this;
248             this.el = new Gtk.Menu();
249
250             // my vars (dec)
251
252             // set gobject values
253             var child_0 = new Xcls_MenuItem6( _this );
254             child_0.ref();
255             this.el.append (  child_0.el  );
256             var child_1 = new Xcls_SeparatorMenuItem7( _this );
257             child_1.ref();
258             this.el.append (  child_1.el  );
259             var child_2 = new Xcls_MenuItem8( _this );
260             child_2.ref();
261             this.el.append (  child_2.el  );
262             var child_3 = new Xcls_MenuItem9( _this );
263             child_3.ref();
264             this.el.append (  child_3.el  );
265
266             // init method
267
268             {
269                 this.el.show_all();
270             }
271         }
272
273         // user defined functions
274     }
275     public class Xcls_MenuItem6 : Object
276     {
277         public Gtk.MenuItem el;
278         private Xcls_MainWindow  _this;
279
280
281             // my vars (def)
282
283         // ctor
284         public Xcls_MenuItem6(Xcls_MainWindow _owner )
285         {
286             _this = _owner;
287             this.el = new Gtk.MenuItem();
288
289             // my vars (dec)
290
291             // set gobject values
292             this.el.label = "Open a new Window";
293
294             //listeners
295             this.el.activate.connect( ( ) => {
296                     Xcls_MainWindow.singleton().no_windows++;
297                     var w = new Xcls_MainWindow();
298                     w.ref();
299             
300                     w.el.show_all();
301                     w.initChildren();
302                     w.windowstate.switchState(WindowState.State.FILES);
303             });
304         }
305
306         // user defined functions
307     }
308
309     public class Xcls_SeparatorMenuItem7 : Object
310     {
311         public Gtk.SeparatorMenuItem el;
312         private Xcls_MainWindow  _this;
313
314
315             // my vars (def)
316
317         // ctor
318         public Xcls_SeparatorMenuItem7(Xcls_MainWindow _owner )
319         {
320             _this = _owner;
321             this.el = new Gtk.SeparatorMenuItem();
322
323             // my vars (dec)
324
325             // set gobject values
326         }
327
328         // user defined functions
329     }
330
331     public class Xcls_MenuItem8 : Object
332     {
333         public Gtk.MenuItem el;
334         private Xcls_MainWindow  _this;
335
336
337             // my vars (def)
338
339         // ctor
340         public Xcls_MenuItem8(Xcls_MainWindow _owner )
341         {
342             _this = _owner;
343             this.el = new Gtk.MenuItem();
344
345             // my vars (dec)
346
347             // set gobject values
348             this.el.label = "Download updated Resources";
349
350             //listeners
351             this.el.activate.connect( ( ) => {
352                      Resources.singleton().fetchStart();
353             });
354         }
355
356         // user defined functions
357     }
358
359     public class Xcls_MenuItem9 : Object
360     {
361         public Gtk.MenuItem el;
362         private Xcls_MainWindow  _this;
363
364
365             // my vars (def)
366
367         // ctor
368         public Xcls_MenuItem9(Xcls_MainWindow _owner )
369         {
370             _this = _owner;
371             this.el = new Gtk.MenuItem();
372
373             // my vars (dec)
374
375             // set gobject values
376             this.el.label = "About the Builder";
377
378             //listeners
379             this.el.activate.connect( () => {
380                 About.singleton().el.show();
381                 });
382         }
383
384         // user defined functions
385     }
386
387
388     public class Xcls_Image10 : Object
389     {
390         public Gtk.Image el;
391         private Xcls_MainWindow  _this;
392
393
394             // my vars (def)
395
396         // ctor
397         public Xcls_Image10(Xcls_MainWindow _owner )
398         {
399             _this = _owner;
400             this.el = new Gtk.Image();
401
402             // my vars (dec)
403
404             // set gobject values
405             this.el.icon_name = "help-about";
406         }
407
408         // user defined functions
409     }
410
411
412
413
414     public class Xcls_vbox : Object
415     {
416         public Gtk.Box el;
417         private Xcls_MainWindow  _this;
418
419
420             // my vars (def)
421
422         // ctor
423         public Xcls_vbox(Xcls_MainWindow _owner )
424         {
425             _this = _owner;
426             _this.vbox = this;
427             this.el = new Gtk.Box( Gtk.Orientation.VERTICAL, 0 );
428
429             // my vars (dec)
430
431             // set gobject values
432             this.el.homogeneous = false;
433             var child_0 = new Xcls_mainpane( _this );
434             child_0.ref();
435             this.el.pack_start (  child_0.el , true,true,0 );
436             var child_1 = new Xcls_Box66( _this );
437             child_1.ref();
438             this.el.pack_end (  child_1.el , false,true,0 );
439         }
440
441         // user defined functions
442     }
443     public class Xcls_mainpane : Object
444     {
445         public Gtk.Paned el;
446         private Xcls_MainWindow  _this;
447
448
449             // my vars (def)
450         public int lastWidth;
451
452         // ctor
453         public Xcls_mainpane(Xcls_MainWindow _owner )
454         {
455             _this = _owner;
456             _this.mainpane = this;
457             this.el = new Gtk.Paned( Gtk.Orientation.HORIZONTAL );
458
459             // my vars (dec)
460             this.lastWidth = 0;
461
462             // set gobject values
463             this.el.position = 400;
464             var child_0 = new Xcls_leftpane( _this );
465             child_0.ref();
466             this.el.add1 (  child_0.el  );
467             var child_1 = new Xcls_Box17( _this );
468             child_1.ref();
469             this.el.add2 (  child_1.el  );
470         }
471
472         // user defined functions
473     }
474     public class Xcls_leftpane : Object
475     {
476         public Gtk.Box el;
477         private Xcls_MainWindow  _this;
478
479
480             // my vars (def)
481
482         // ctor
483         public Xcls_leftpane(Xcls_MainWindow _owner )
484         {
485             _this = _owner;
486             _this.leftpane = this;
487             this.el = new Gtk.Box( Gtk.Orientation.VERTICAL, 0 );
488
489             // my vars (dec)
490
491             // set gobject values
492             var child_0 = new Xcls_editpane( _this );
493             child_0.ref();
494             this.el.pack_start (  child_0.el , true,true,0 );
495         }
496
497         // user defined functions
498     }
499     public class Xcls_editpane : Object
500     {
501         public Gtk.Paned el;
502         private Xcls_MainWindow  _this;
503
504
505             // my vars (def)
506
507         // ctor
508         public Xcls_editpane(Xcls_MainWindow _owner )
509         {
510             _this = _owner;
511             _this.editpane = this;
512             this.el = new Gtk.Paned( Gtk.Orientation.VERTICAL );
513
514             // my vars (dec)
515
516             // set gobject values
517             var child_0 = new Xcls_tree( _this );
518             child_0.ref();
519             this.el.add1 (  child_0.el  );
520             var child_1 = new Xcls_props( _this );
521             child_1.ref();
522             this.el.add2 (  child_1.el  );
523         }
524
525         // user defined functions
526     }
527     public class Xcls_tree : Object
528     {
529         public Gtk.Box el;
530         private Xcls_MainWindow  _this;
531
532
533             // my vars (def)
534
535         // ctor
536         public Xcls_tree(Xcls_MainWindow _owner )
537         {
538             _this = _owner;
539             _this.tree = this;
540             this.el = new Gtk.Box( Gtk.Orientation.VERTICAL, 0 );
541
542             // my vars (dec)
543
544             // set gobject values
545         }
546
547         // user defined functions
548     }
549
550     public class Xcls_props : Object
551     {
552         public Gtk.Box el;
553         private Xcls_MainWindow  _this;
554
555
556             // my vars (def)
557
558         // ctor
559         public Xcls_props(Xcls_MainWindow _owner )
560         {
561             _this = _owner;
562             _this.props = this;
563             this.el = new Gtk.Box( Gtk.Orientation.VERTICAL, 0 );
564
565             // my vars (dec)
566
567             // set gobject values
568         }
569
570         // user defined functions
571     }
572
573
574
575     public class Xcls_Box17 : Object
576     {
577         public Gtk.Box el;
578         private Xcls_MainWindow  _this;
579
580
581             // my vars (def)
582
583         // ctor
584         public Xcls_Box17(Xcls_MainWindow _owner )
585         {
586             _this = _owner;
587             this.el = new Gtk.Box( Gtk.Orientation.VERTICAL, 0 );
588
589             // my vars (dec)
590
591             // set gobject values
592             var child_0 = new Xcls_clutterembed( _this );
593             child_0.ref();
594             this.el.pack_start (  child_0.el , true,true,0 );
595         }
596
597         // user defined functions
598     }
599     public class Xcls_clutterembed : Object
600     {
601         public GtkClutter.Embed el;
602         private Xcls_MainWindow  _this;
603
604
605             // my vars (def)
606
607         // ctor
608         public Xcls_clutterembed(Xcls_MainWindow _owner )
609         {
610             _this = _owner;
611             _this.clutterembed = this;
612             this.el = new GtkClutter.Embed();
613
614             // my vars (dec)
615
616             // set gobject values
617             var child_0 = new Xcls_rooview( _this );
618             child_0.ref();
619             this.el.get_stage().add_child (  child_0.el  );
620             var child_1 = new Xcls_objectview( _this );
621             child_1.ref();
622             this.el.get_stage().add_child (  child_1.el  );
623             var child_2 = new Xcls_codeeditview( _this );
624             child_2.ref();
625             this.el.get_stage().add_child (  child_2.el  );
626             var child_3 = new Xcls_addpropsview( _this );
627             child_3.ref();
628             this.el.get_stage().add_child (  child_3.el  );
629             var child_4 = new Xcls_projecteditview( _this );
630             child_4.ref();
631             this.el.get_stage().add_child (  child_4.el  );
632             var child_5 = new Xcls_buttonlayout( _this );
633             child_5.ref();
634             this.el.get_stage().add_child (  child_5.el  );
635
636             // init method
637
638             var stage = this.el.get_stage();
639                 stage.set_background_color(  Clutter.Color.from_string("#000"));
640
641             //listeners
642             this.el.size_allocate.connect( (  alloc) => {
643                 if (_this.windowstate == null) {
644                     return;
645                 }
646                 _this.windowstate.resizeCanvas(); 
647                     
648             });
649         }
650
651         // user defined functions
652     }
653     public class Xcls_rooview : Object
654     {
655         public GtkClutter.Actor el;
656         private Xcls_MainWindow  _this;
657
658
659             // my vars (def)
660
661         // ctor
662         public Xcls_rooview(Xcls_MainWindow _owner )
663         {
664             _this = _owner;
665             _this.rooview = this;
666             this.el = new GtkClutter.Actor();
667
668             // my vars (dec)
669
670             // set gobject values
671
672             // init method
673
674             {
675                
676                
677                 this.el.add_constraint(
678                     new Clutter.AlignConstraint(
679                         _this.clutterembed.el.get_stage(), 
680                         Clutter.AlignAxis.X_AXIS,
681                         1.0f
682                     )
683                 );
684                     
685                 //this.el.set_position(100,100);
686                 this.el.set_pivot_point(1.0f,1.0f);
687                 
688                 this.el.set_size(_this.clutterembed.el.get_stage().width-50,
689                         _this.clutterembed.el.get_stage().height);
690                         
691             }
692         }
693
694         // user defined functions
695     }
696
697     public class Xcls_objectview : Object
698     {
699         public GtkClutter.Actor el;
700         private Xcls_MainWindow  _this;
701
702
703             // my vars (def)
704
705         // ctor
706         public Xcls_objectview(Xcls_MainWindow _owner )
707         {
708             _this = _owner;
709             _this.objectview = this;
710             this.el = new GtkClutter.Actor();
711
712             // my vars (dec)
713
714             // set gobject values
715
716             // init method
717
718             {
719                
720                /*
721                 this.el.add_constraint(
722                     new Clutter.AlignConstraint(
723                         _this.clutterembed.el.get_stage(), 
724                         Clutter.AlignAxis.X_AXIS,
725                         0.0f
726                     )
727                 );
728                 */
729                 this.el.fixed_x = 50.0f;
730                 this.el.fixed_y = 0.0f;
731                 //this.el.set_position(100,100);
732                 this.el.set_pivot_point(0.0f,0.0f);
733                 this.el.set_scale(0.0f,1.0f);
734                 this.el.set_size((_this.clutterembed.el.get_stage().width-50)/2,
735                         _this.clutterembed.el.get_stage().height);
736                         
737             }
738         }
739
740         // user defined functions
741     }
742
743     public class Xcls_codeeditview : Object
744     {
745         public GtkClutter.Actor el;
746         private Xcls_MainWindow  _this;
747
748
749             // my vars (def)
750
751         // ctor
752         public Xcls_codeeditview(Xcls_MainWindow _owner )
753         {
754             _this = _owner;
755             _this.codeeditview = this;
756             this.el = new GtkClutter.Actor();
757
758             // my vars (dec)
759
760             // set gobject values
761
762             // init method
763
764             {
765                
766                /*
767                 this.el.add_constraint(
768                     new Clutter.AlignConstraint(
769                         _this.clutterembed.el.get_stage(), 
770                         Clutter.AlignAxis.X_AXIS,
771                         0.0f
772                     )
773                 );
774                 */
775                 this.el.fixed_x = 50.0f;
776                 this.el.fixed_y = 0.0f;
777                 //this.el.set_position(100,100);
778                 this.el.set_pivot_point(0.0f,0.0f);
779                 this.el.set_scale(0.0f,1.0f);
780                 this.el.set_size((_this.clutterembed.el.get_stage().width-50)/2,
781                         _this.clutterembed.el.get_stage().height);
782                         
783             }
784         }
785
786         // user defined functions
787     }
788
789     public class Xcls_addpropsview : Object
790     {
791         public GtkClutter.Actor el;
792         private Xcls_MainWindow  _this;
793
794
795             // my vars (def)
796
797         // ctor
798         public Xcls_addpropsview(Xcls_MainWindow _owner )
799         {
800             _this = _owner;
801             _this.addpropsview = this;
802             this.el = new GtkClutter.Actor();
803
804             // my vars (dec)
805
806             // set gobject values
807
808             // init method
809
810             {
811                
812                /*
813                 this.el.add_constraint(
814                     new Clutter.AlignConstraint(
815                         _this.clutterembed.el.get_stage(), 
816                         Clutter.AlignAxis.X_AXIS,
817                         0.0f
818                     )
819                 );
820                 */
821                 this.el.fixed_x = 50.0f;
822                 this.el.fixed_y = 0.0f;
823                 //this.el.set_position(100,100);
824                 this.el.set_pivot_point(0.0f,0.0f);
825                 this.el.set_scale(0.0f,1.0f);
826                 this.el.set_size((_this.clutterembed.el.get_stage().width-50)/2,
827                         _this.clutterembed.el.get_stage().height);
828                         
829             }
830         }
831
832         // user defined functions
833     }
834
835     public class Xcls_projecteditview : Object
836     {
837         public GtkClutter.Actor el;
838         private Xcls_MainWindow  _this;
839
840
841             // my vars (def)
842
843         // ctor
844         public Xcls_projecteditview(Xcls_MainWindow _owner )
845         {
846             _this = _owner;
847             _this.projecteditview = this;
848             this.el = new GtkClutter.Actor();
849
850             // my vars (dec)
851
852             // set gobject values
853
854             // init method
855
856             {
857                
858                
859                 this.el.add_constraint(
860                     new Clutter.AlignConstraint(
861                         _this.clutterembed.el.get_stage(), 
862                         Clutter.AlignAxis.X_AXIS,
863                         1.0f
864                     )
865                 );
866                     
867                 //this.el.set_position(100,100);
868                 this.el.set_pivot_point(0.0f,0.0f);
869                 this.el.set_scale(1.0f,0.0f);
870                 this.el.set_size(_this.clutterembed.el.get_stage().width-50,
871                         _this.clutterembed.el.get_stage().height /2);
872                         
873             }
874         }
875
876         // user defined functions
877     }
878
879     public class Xcls_buttonlayout : Object
880     {
881         public Clutter.Actor el;
882         private Xcls_MainWindow  _this;
883
884
885             // my vars (def)
886
887         // ctor
888         public Xcls_buttonlayout(Xcls_MainWindow _owner )
889         {
890             _this = _owner;
891             _this.buttonlayout = this;
892             this.el = new Clutter.Actor();
893
894             // my vars (dec)
895
896             // set gobject values
897             var child_0 = new Xcls_BoxLayout25( _this );
898             child_0.ref();
899             this.el.layout_manager = child_0.el;
900             var child_1 = new Xcls_backbutton( _this );
901             child_1.ref();
902             this.el.add_child (  child_1.el  );
903             var child_2 = new Xcls_projectbutton( _this );
904             child_2.ref();
905             this.el.add_child (  child_2.el  );
906             var child_3 = new Xcls_editfilebutton( _this );
907             child_3.ref();
908             this.el.add_child (  child_3.el  );
909             var child_4 = new Xcls_projecteditbutton( _this );
910             child_4.ref();
911             this.el.add_child (  child_4.el  );
912             var child_5 = new Xcls_objectshowbutton( _this );
913             child_5.ref();
914             this.el.add_child (  child_5.el  );
915             var child_6 = new Xcls_addpropbutton( _this );
916             child_6.ref();
917             this.el.add_child (  child_6.el  );
918             var child_7 = new Xcls_addlistenerbutton( _this );
919             child_7.ref();
920             this.el.add_child (  child_7.el  );
921             var child_8 = new Xcls_addprojectbutton( _this );
922             child_8.ref();
923             this.el.add_child (  child_8.el  );
924             var child_9 = new Xcls_addfilebutton( _this );
925             child_9.ref();
926             this.el.add_child (  child_9.el  );
927             var child_10 = new Xcls_delprojectbutton( _this );
928             child_10.ref();
929             this.el.add_child (  child_10.el  );
930
931             // init method
932
933             {
934                 
935                 this.el.add_constraint(
936                     new Clutter.AlignConstraint(
937                         _this.clutterembed.el.get_stage(), 
938                         Clutter.AlignAxis.X_AXIS,
939                         0.0f
940                     )
941                 );
942                  
943                 
944                 //this.el.set_position(100,100);
945                 this.el.set_pivot_point(0.5f,0.5f);
946                  this.el.set_size(50,
947                        _this.clutterembed.el.get_stage().height);
948                  
949             }
950         }
951
952         // user defined functions
953     }
954     public class Xcls_BoxLayout25 : Object
955     {
956         public Clutter.BoxLayout el;
957         private Xcls_MainWindow  _this;
958
959
960             // my vars (def)
961
962         // ctor
963         public Xcls_BoxLayout25(Xcls_MainWindow _owner )
964         {
965             _this = _owner;
966             this.el = new Clutter.BoxLayout();
967
968             // my vars (dec)
969
970             // set gobject values
971             this.el.orientation = Clutter.Orientation.VERTICAL;
972         }
973
974         // user defined functions
975     }
976
977     public class Xcls_backbutton : Object
978     {
979         public Clutter.Actor el;
980         private Xcls_MainWindow  _this;
981
982
983             // my vars (def)
984
985         // ctor
986         public Xcls_backbutton(Xcls_MainWindow _owner )
987         {
988             _this = _owner;
989             _this.backbutton = this;
990             this.el = new Clutter.Actor();
991
992             // my vars (dec)
993
994             // set gobject values
995             var child_0 = new Xcls_Actor27( _this );
996             child_0.ref();
997             this.el.add_child (  child_0.el  );
998
999             // init method
1000
1001             this.el.set_size(50,50);
1002         }
1003
1004         // user defined functions
1005     }
1006     public class Xcls_Actor27 : Object
1007     {
1008         public GtkClutter.Actor el;
1009         private Xcls_MainWindow  _this;
1010
1011
1012             // my vars (def)
1013
1014         // ctor
1015         public Xcls_Actor27(Xcls_MainWindow _owner )
1016         {
1017             _this = _owner;
1018             this.el = new GtkClutter.Actor();
1019
1020             // my vars (dec)
1021
1022             // set gobject values
1023             var child_0 = new Xcls_Button28( _this );
1024             child_0.ref();
1025
1026             // init method
1027
1028             ((Gtk.Container)(this.el.get_widget())).add ( child_0.el);
1029         }
1030
1031         // user defined functions
1032     }
1033     public class Xcls_Button28 : Object
1034     {
1035         public Gtk.Button el;
1036         private Xcls_MainWindow  _this;
1037
1038
1039             // my vars (def)
1040
1041         // ctor
1042         public Xcls_Button28(Xcls_MainWindow _owner )
1043         {
1044             _this = _owner;
1045             this.el = new Gtk.Button();
1046
1047             // my vars (dec)
1048
1049             // set gobject values
1050             this.el.width_request = 50;
1051             this.el.height_request = 50;
1052             this.el.tooltip_text = "Back";
1053             var child_0 = new Xcls_Image29( _this );
1054             child_0.ref();
1055             this.el.set_image (  child_0.el  );
1056
1057             //listeners
1058             this.el.clicked.connect( ( ) => {
1059               
1060                 _this.windowstate.switchState(WindowState.State.PREVIEW);
1061                 
1062             
1063             });
1064         }
1065
1066         // user defined functions
1067     }
1068     public class Xcls_Image29 : Object
1069     {
1070         public Gtk.Image el;
1071         private Xcls_MainWindow  _this;
1072
1073
1074             // my vars (def)
1075
1076         // ctor
1077         public Xcls_Image29(Xcls_MainWindow _owner )
1078         {
1079             _this = _owner;
1080             this.el = new Gtk.Image();
1081
1082             // my vars (dec)
1083
1084             // set gobject values
1085             this.el.icon_name = "go-previous";
1086         }
1087
1088         // user defined functions
1089     }
1090
1091
1092
1093
1094     public class Xcls_projectbutton : Object
1095     {
1096         public Clutter.Actor el;
1097         private Xcls_MainWindow  _this;
1098
1099
1100             // my vars (def)
1101
1102         // ctor
1103         public Xcls_projectbutton(Xcls_MainWindow _owner )
1104         {
1105             _this = _owner;
1106             _this.projectbutton = this;
1107             this.el = new Clutter.Actor();
1108
1109             // my vars (dec)
1110
1111             // set gobject values
1112             var child_0 = new Xcls_Actor31( _this );
1113             child_0.ref();
1114             this.el.add_child (  child_0.el  );
1115
1116             // init method
1117
1118             this.el.set_size(50,50);
1119         }
1120
1121         // user defined functions
1122     }
1123     public class Xcls_Actor31 : Object
1124     {
1125         public GtkClutter.Actor el;
1126         private Xcls_MainWindow  _this;
1127
1128
1129             // my vars (def)
1130
1131         // ctor
1132         public Xcls_Actor31(Xcls_MainWindow _owner )
1133         {
1134             _this = _owner;
1135             this.el = new GtkClutter.Actor();
1136
1137             // my vars (dec)
1138
1139             // set gobject values
1140             var child_0 = new Xcls_Button32( _this );
1141             child_0.ref();
1142
1143             // init method
1144
1145             ((Gtk.Container)(this.el.get_widget())).add ( child_0.el);
1146         }
1147
1148         // user defined functions
1149     }
1150     public class Xcls_Button32 : Object
1151     {
1152         public Gtk.Button el;
1153         private Xcls_MainWindow  _this;
1154
1155
1156             // my vars (def)
1157
1158         // ctor
1159         public Xcls_Button32(Xcls_MainWindow _owner )
1160         {
1161             _this = _owner;
1162             this.el = new Gtk.Button();
1163
1164             // my vars (dec)
1165
1166             // set gobject values
1167             this.el.width_request = 50;
1168             this.el.height_request = 50;
1169             var child_0 = new Xcls_Image33( _this );
1170             child_0.ref();
1171             this.el.set_image (  child_0.el  );
1172
1173             //listeners
1174             this.el.clicked.connect( ( ) => {
1175                _this.windowstate.switchState(WindowState.State.FILES);
1176                   
1177             
1178             });
1179         }
1180
1181         // user defined functions
1182     }
1183     public class Xcls_Image33 : Object
1184     {
1185         public Gtk.Image el;
1186         private Xcls_MainWindow  _this;
1187
1188
1189             // my vars (def)
1190
1191         // ctor
1192         public Xcls_Image33(Xcls_MainWindow _owner )
1193         {
1194             _this = _owner;
1195             this.el = new Gtk.Image();
1196
1197             // my vars (dec)
1198
1199             // set gobject values
1200             this.el.icon_name = "document-open";
1201         }
1202
1203         // user defined functions
1204     }
1205
1206
1207
1208
1209     public class Xcls_editfilebutton : Object
1210     {
1211         public Clutter.Actor el;
1212         private Xcls_MainWindow  _this;
1213
1214
1215             // my vars (def)
1216
1217         // ctor
1218         public Xcls_editfilebutton(Xcls_MainWindow _owner )
1219         {
1220             _this = _owner;
1221             _this.editfilebutton = this;
1222             this.el = new Clutter.Actor();
1223
1224             // my vars (dec)
1225
1226             // set gobject values
1227             var child_0 = new Xcls_Actor35( _this );
1228             child_0.ref();
1229             this.el.add_child (  child_0.el  );
1230
1231             // init method
1232
1233             this.el.set_size(50.0f,50.0f);
1234         }
1235
1236         // user defined functions
1237     }
1238     public class Xcls_Actor35 : Object
1239     {
1240         public GtkClutter.Actor el;
1241         private Xcls_MainWindow  _this;
1242
1243
1244             // my vars (def)
1245
1246         // ctor
1247         public Xcls_Actor35(Xcls_MainWindow _owner )
1248         {
1249             _this = _owner;
1250             this.el = new GtkClutter.Actor();
1251
1252             // my vars (dec)
1253
1254             // set gobject values
1255             var child_0 = new Xcls_Button36( _this );
1256             child_0.ref();
1257
1258             // init method
1259
1260             ((Gtk.Container)(this.el.get_widget())).add ( child_0.el);
1261         }
1262
1263         // user defined functions
1264     }
1265     public class Xcls_Button36 : Object
1266     {
1267         public Gtk.Button el;
1268         private Xcls_MainWindow  _this;
1269
1270
1271             // my vars (def)
1272
1273         // ctor
1274         public Xcls_Button36(Xcls_MainWindow _owner )
1275         {
1276             _this = _owner;
1277             this.el = new Gtk.Button();
1278
1279             // my vars (dec)
1280
1281             // set gobject values
1282             this.el.width_request = 50;
1283             this.el.height_request = 50;
1284             this.el.tooltip_text = "File Details";
1285             var child_0 = new Xcls_Image37( _this );
1286             child_0.ref();
1287             this.el.set_image (  child_0.el  );
1288
1289             //listeners
1290             this.el.clicked.connect( ( ) => {
1291               
1292                 // create a new file in project..
1293                 if (_this.project == null || _this.windowstate.file == null) {
1294                     return  ;
1295                 }
1296                  _this.windowstate.file_details.show(
1297                     _this.windowstate.file, this.el
1298                 );
1299                  
1300                 return  ;    
1301             
1302             
1303             });
1304         }
1305
1306         // user defined functions
1307     }
1308     public class Xcls_Image37 : Object
1309     {
1310         public Gtk.Image el;
1311         private Xcls_MainWindow  _this;
1312
1313
1314             // my vars (def)
1315
1316         // ctor
1317         public Xcls_Image37(Xcls_MainWindow _owner )
1318         {
1319             _this = _owner;
1320             this.el = new Gtk.Image();
1321
1322             // my vars (dec)
1323
1324             // set gobject values
1325             this.el.icon_name = "document-properties";
1326         }
1327
1328         // user defined functions
1329     }
1330
1331
1332
1333
1334     public class Xcls_projecteditbutton : Object
1335     {
1336         public Clutter.Actor el;
1337         private Xcls_MainWindow  _this;
1338
1339
1340             // my vars (def)
1341
1342         // ctor
1343         public Xcls_projecteditbutton(Xcls_MainWindow _owner )
1344         {
1345             _this = _owner;
1346             _this.projecteditbutton = this;
1347             this.el = new Clutter.Actor();
1348
1349             // my vars (dec)
1350
1351             // set gobject values
1352             var child_0 = new Xcls_Actor39( _this );
1353             child_0.ref();
1354             this.el.add_child (  child_0.el  );
1355
1356             // init method
1357
1358             this.el.set_size(50,50);
1359         }
1360
1361         // user defined functions
1362     }
1363     public class Xcls_Actor39 : Object
1364     {
1365         public GtkClutter.Actor el;
1366         private Xcls_MainWindow  _this;
1367
1368
1369             // my vars (def)
1370
1371         // ctor
1372         public Xcls_Actor39(Xcls_MainWindow _owner )
1373         {
1374             _this = _owner;
1375             this.el = new GtkClutter.Actor();
1376
1377             // my vars (dec)
1378
1379             // set gobject values
1380             var child_0 = new Xcls_Button40( _this );
1381             child_0.ref();
1382
1383             // init method
1384
1385             ((Gtk.Container)(this.el.get_widget())).add ( child_0.el);
1386         }
1387
1388         // user defined functions
1389     }
1390     public class Xcls_Button40 : Object
1391     {
1392         public Gtk.Button el;
1393         private Xcls_MainWindow  _this;
1394
1395
1396             // my vars (def)
1397
1398         // ctor
1399         public Xcls_Button40(Xcls_MainWindow _owner )
1400         {
1401             _this = _owner;
1402             this.el = new Gtk.Button();
1403
1404             // my vars (dec)
1405
1406             // set gobject values
1407             this.el.width_request = 50;
1408             this.el.height_request = 50;
1409             this.el.tooltip_text = "Project Details";
1410             var child_0 = new Xcls_Image41( _this );
1411             child_0.ref();
1412             this.el.set_image (  child_0.el  );
1413
1414             //listeners
1415             this.el.clicked.connect( ( ) => {
1416                  _this.windowstate.switchState(WindowState.State.PROJECT);
1417                
1418             
1419             
1420             });
1421         }
1422
1423         // user defined functions
1424     }
1425     public class Xcls_Image41 : Object
1426     {
1427         public Gtk.Image el;
1428         private Xcls_MainWindow  _this;
1429
1430
1431             // my vars (def)
1432
1433         // ctor
1434         public Xcls_Image41(Xcls_MainWindow _owner )
1435         {
1436             _this = _owner;
1437             this.el = new Gtk.Image();
1438
1439             // my vars (dec)
1440
1441             // set gobject values
1442             this.el.icon_name = "emblem-system";
1443         }
1444
1445         // user defined functions
1446     }
1447
1448
1449
1450
1451     public class Xcls_objectshowbutton : Object
1452     {
1453         public Clutter.Actor el;
1454         private Xcls_MainWindow  _this;
1455
1456
1457             // my vars (def)
1458
1459         // ctor
1460         public Xcls_objectshowbutton(Xcls_MainWindow _owner )
1461         {
1462             _this = _owner;
1463             _this.objectshowbutton = this;
1464             this.el = new Clutter.Actor();
1465
1466             // my vars (dec)
1467
1468             // set gobject values
1469             var child_0 = new Xcls_Actor43( _this );
1470             child_0.ref();
1471             this.el.add_child (  child_0.el  );
1472
1473             // init method
1474
1475             this.el.set_size(50,50);
1476
1477             //listeners
1478             this.el.enter_event.connect( (  event)  => {
1479                 this.el.background_color =   Clutter.Color.from_string("#333");
1480                     return false;
1481             });
1482             this.el.leave_event.connect( (  event)  => {
1483                 this.el.background_color =   Clutter.Color.from_string("#000");
1484                 return false;
1485             });
1486         }
1487
1488         // user defined functions
1489     }
1490     public class Xcls_Actor43 : Object
1491     {
1492         public GtkClutter.Actor el;
1493         private Xcls_MainWindow  _this;
1494
1495
1496             // my vars (def)
1497
1498         // ctor
1499         public Xcls_Actor43(Xcls_MainWindow _owner )
1500         {
1501             _this = _owner;
1502             this.el = new GtkClutter.Actor();
1503
1504             // my vars (dec)
1505
1506             // set gobject values
1507             var child_0 = new Xcls_Button44( _this );
1508             child_0.ref();
1509
1510             // init method
1511
1512             ((Gtk.Container)(this.el.get_widget())).add ( child_0.el);
1513         }
1514
1515         // user defined functions
1516     }
1517     public class Xcls_Button44 : Object
1518     {
1519         public Gtk.Button el;
1520         private Xcls_MainWindow  _this;
1521
1522
1523             // my vars (def)
1524
1525         // ctor
1526         public Xcls_Button44(Xcls_MainWindow _owner )
1527         {
1528             _this = _owner;
1529             this.el = new Gtk.Button();
1530
1531             // my vars (dec)
1532
1533             // set gobject values
1534             this.el.width_request = 50;
1535             this.el.height_request = 50;
1536             this.el.tooltip_text = "Add Child Element";
1537             var child_0 = new Xcls_Image45( _this );
1538             child_0.ref();
1539             this.el.set_image (  child_0.el  );
1540
1541             //listeners
1542             this.el.clicked.connect( ( ) => {
1543                 
1544                  _this.windowstate.switchState(WindowState.State.OBJECT);
1545               
1546              
1547             });
1548         }
1549
1550         // user defined functions
1551     }
1552     public class Xcls_Image45 : Object
1553     {
1554         public Gtk.Image el;
1555         private Xcls_MainWindow  _this;
1556
1557
1558             // my vars (def)
1559
1560         // ctor
1561         public Xcls_Image45(Xcls_MainWindow _owner )
1562         {
1563             _this = _owner;
1564             this.el = new Gtk.Image();
1565
1566             // my vars (dec)
1567
1568             // set gobject values
1569             this.el.icon_name = "list-add";
1570         }
1571
1572         // user defined functions
1573     }
1574
1575
1576
1577
1578     public class Xcls_addpropbutton : Object
1579     {
1580         public Clutter.Actor el;
1581         private Xcls_MainWindow  _this;
1582
1583
1584             // my vars (def)
1585
1586         // ctor
1587         public Xcls_addpropbutton(Xcls_MainWindow _owner )
1588         {
1589             _this = _owner;
1590             _this.addpropbutton = this;
1591             this.el = new Clutter.Actor();
1592
1593             // my vars (dec)
1594
1595             // set gobject values
1596             var child_0 = new Xcls_Actor47( _this );
1597             child_0.ref();
1598             this.el.add_child (  child_0.el  );
1599
1600             // init method
1601
1602             this.el.set_size(50,50);
1603         }
1604
1605         // user defined functions
1606     }
1607     public class Xcls_Actor47 : Object
1608     {
1609         public GtkClutter.Actor el;
1610         private Xcls_MainWindow  _this;
1611
1612
1613             // my vars (def)
1614
1615         // ctor
1616         public Xcls_Actor47(Xcls_MainWindow _owner )
1617         {
1618             _this = _owner;
1619             this.el = new GtkClutter.Actor();
1620
1621             // my vars (dec)
1622
1623             // set gobject values
1624             var child_0 = new Xcls_Button48( _this );
1625             child_0.ref();
1626
1627             // init method
1628
1629             ((Gtk.Container)(this.el.get_widget())).add ( child_0.el);
1630         }
1631
1632         // user defined functions
1633     }
1634     public class Xcls_Button48 : Object
1635     {
1636         public Gtk.Button el;
1637         private Xcls_MainWindow  _this;
1638
1639
1640             // my vars (def)
1641
1642         // ctor
1643         public Xcls_Button48(Xcls_MainWindow _owner )
1644         {
1645             _this = _owner;
1646             this.el = new Gtk.Button();
1647
1648             // my vars (dec)
1649
1650             // set gobject values
1651             this.el.width_request = 50;
1652             this.el.height_request = 50;
1653             this.el.tooltip_text = "Add Property";
1654             var child_0 = new Xcls_Image49( _this );
1655             child_0.ref();
1656             this.el.set_image (  child_0.el  );
1657
1658             //listeners
1659             this.el.clicked.connect( ( ) => {
1660                 
1661                  _this.windowstate.switchState(WindowState.State.PROP);
1662              
1663             
1664             });
1665         }
1666
1667         // user defined functions
1668     }
1669     public class Xcls_Image49 : Object
1670     {
1671         public Gtk.Image el;
1672         private Xcls_MainWindow  _this;
1673
1674
1675             // my vars (def)
1676
1677         // ctor
1678         public Xcls_Image49(Xcls_MainWindow _owner )
1679         {
1680             _this = _owner;
1681             this.el = new Gtk.Image();
1682
1683             // my vars (dec)
1684
1685             // set gobject values
1686             this.el.icon_name = "format-justify-left";
1687         }
1688
1689         // user defined functions
1690     }
1691
1692
1693
1694
1695     public class Xcls_addlistenerbutton : Object
1696     {
1697         public Clutter.Actor el;
1698         private Xcls_MainWindow  _this;
1699
1700
1701             // my vars (def)
1702
1703         // ctor
1704         public Xcls_addlistenerbutton(Xcls_MainWindow _owner )
1705         {
1706             _this = _owner;
1707             _this.addlistenerbutton = this;
1708             this.el = new Clutter.Actor();
1709
1710             // my vars (dec)
1711
1712             // set gobject values
1713             var child_0 = new Xcls_Actor51( _this );
1714             child_0.ref();
1715             this.el.add_child (  child_0.el  );
1716
1717             // init method
1718
1719             this.el.set_size(50,50);
1720         }
1721
1722         // user defined functions
1723     }
1724     public class Xcls_Actor51 : Object
1725     {
1726         public GtkClutter.Actor el;
1727         private Xcls_MainWindow  _this;
1728
1729
1730             // my vars (def)
1731
1732         // ctor
1733         public Xcls_Actor51(Xcls_MainWindow _owner )
1734         {
1735             _this = _owner;
1736             this.el = new GtkClutter.Actor();
1737
1738             // my vars (dec)
1739
1740             // set gobject values
1741             var child_0 = new Xcls_Button52( _this );
1742             child_0.ref();
1743
1744             // init method
1745
1746             ((Gtk.Container)(this.el.get_widget())).add ( child_0.el);
1747         }
1748
1749         // user defined functions
1750     }
1751     public class Xcls_Button52 : Object
1752     {
1753         public Gtk.Button el;
1754         private Xcls_MainWindow  _this;
1755
1756
1757             // my vars (def)
1758
1759         // ctor
1760         public Xcls_Button52(Xcls_MainWindow _owner )
1761         {
1762             _this = _owner;
1763             this.el = new Gtk.Button();
1764
1765             // my vars (dec)
1766
1767             // set gobject values
1768             this.el.width_request = 50;
1769             this.el.height_request = 50;
1770             this.el.tooltip_text = "Add Event Code";
1771             var child_0 = new Xcls_Image53( _this );
1772             child_0.ref();
1773             this.el.set_image (  child_0.el  );
1774
1775             //listeners
1776             this.el.clicked.connect( ( ) => {
1777                 
1778                 _this.windowstate.switchState(WindowState.State.LISTENER);
1779               
1780             
1781             
1782             });
1783         }
1784
1785         // user defined functions
1786     }
1787     public class Xcls_Image53 : Object
1788     {
1789         public Gtk.Image el;
1790         private Xcls_MainWindow  _this;
1791
1792
1793             // my vars (def)
1794
1795         // ctor
1796         public Xcls_Image53(Xcls_MainWindow _owner )
1797         {
1798             _this = _owner;
1799             this.el = new Gtk.Image();
1800
1801             // my vars (dec)
1802
1803             // set gobject values
1804             this.el.icon_name = "appointment-new";
1805         }
1806
1807         // user defined functions
1808     }
1809
1810
1811
1812
1813     public class Xcls_addprojectbutton : Object
1814     {
1815         public Clutter.Actor el;
1816         private Xcls_MainWindow  _this;
1817
1818
1819             // my vars (def)
1820
1821         // ctor
1822         public Xcls_addprojectbutton(Xcls_MainWindow _owner )
1823         {
1824             _this = _owner;
1825             _this.addprojectbutton = this;
1826             this.el = new Clutter.Actor();
1827
1828             // my vars (dec)
1829
1830             // set gobject values
1831             var child_0 = new Xcls_Actor55( _this );
1832             child_0.ref();
1833             this.el.add_child (  child_0.el  );
1834
1835             // init method
1836
1837             this.el.set_size(50.0f,50.0f);
1838         }
1839
1840         // user defined functions
1841     }
1842     public class Xcls_Actor55 : Object
1843     {
1844         public GtkClutter.Actor el;
1845         private Xcls_MainWindow  _this;
1846
1847
1848             // my vars (def)
1849
1850         // ctor
1851         public Xcls_Actor55(Xcls_MainWindow _owner )
1852         {
1853             _this = _owner;
1854             this.el = new GtkClutter.Actor();
1855
1856             // my vars (dec)
1857
1858             // set gobject values
1859             var child_0 = new Xcls_Button56( _this );
1860             child_0.ref();
1861
1862             // init method
1863
1864             ((Gtk.Container)(this.el.get_widget())).add ( child_0.el);
1865         }
1866
1867         // user defined functions
1868     }
1869     public class Xcls_Button56 : Object
1870     {
1871         public Gtk.Button el;
1872         private Xcls_MainWindow  _this;
1873
1874
1875             // my vars (def)
1876
1877         // ctor
1878         public Xcls_Button56(Xcls_MainWindow _owner )
1879         {
1880             _this = _owner;
1881             this.el = new Gtk.Button();
1882
1883             // my vars (dec)
1884
1885             // set gobject values
1886             this.el.width_request = 50;
1887             this.el.height_request = 50;
1888             this.el.tooltip_text = "New\nProj.";
1889             var child_0 = new Xcls_Image57( _this );
1890             child_0.ref();
1891             this.el.set_image (  child_0.el  );
1892
1893             //listeners
1894             this.el.clicked.connect( ( ) => {
1895               
1896                 // create a new file in project..
1897                 //Xcls_DialogNewComponent.singleton().show(
1898                var  pe =      EditProject.singleton();
1899                 pe.el.set_transient_for(_this.el);
1900                 pe.el.set_modal(true);   
1901                
1902                 var p  = pe.show();
1903             
1904                 if (p == null) {
1905                     return;
1906                 }
1907                 
1908                 
1909                 _this.windowstate.left_projects.is_loaded = false;    
1910                 _this.windowstate.left_projects.load();
1911                 _this.windowstate.left_projects.selectProject(p);
1912                 return  ;    
1913             
1914             
1915             });
1916         }
1917
1918         // user defined functions
1919     }
1920     public class Xcls_Image57 : Object
1921     {
1922         public Gtk.Image el;
1923         private Xcls_MainWindow  _this;
1924
1925
1926             // my vars (def)
1927
1928         // ctor
1929         public Xcls_Image57(Xcls_MainWindow _owner )
1930         {
1931             _this = _owner;
1932             this.el = new Gtk.Image();
1933
1934             // my vars (dec)
1935
1936             // set gobject values
1937             this.el.icon_name = "folder-new";
1938         }
1939
1940         // user defined functions
1941     }
1942
1943
1944
1945
1946     public class Xcls_addfilebutton : Object
1947     {
1948         public Clutter.Actor el;
1949         private Xcls_MainWindow  _this;
1950
1951
1952             // my vars (def)
1953
1954         // ctor
1955         public Xcls_addfilebutton(Xcls_MainWindow _owner )
1956         {
1957             _this = _owner;
1958             _this.addfilebutton = this;
1959             this.el = new Clutter.Actor();
1960
1961             // my vars (dec)
1962
1963             // set gobject values
1964             var child_0 = new Xcls_Actor59( _this );
1965             child_0.ref();
1966             this.el.add_child (  child_0.el  );
1967
1968             // init method
1969
1970             this.el.set_size(50.0f,50.0f);
1971         }
1972
1973         // user defined functions
1974     }
1975     public class Xcls_Actor59 : Object
1976     {
1977         public GtkClutter.Actor el;
1978         private Xcls_MainWindow  _this;
1979
1980
1981             // my vars (def)
1982
1983         // ctor
1984         public Xcls_Actor59(Xcls_MainWindow _owner )
1985         {
1986             _this = _owner;
1987             this.el = new GtkClutter.Actor();
1988
1989             // my vars (dec)
1990
1991             // set gobject values
1992             var child_0 = new Xcls_Button60( _this );
1993             child_0.ref();
1994
1995             // init method
1996
1997             ((Gtk.Container)(this.el.get_widget())).add ( child_0.el);
1998         }
1999
2000         // user defined functions
2001     }
2002     public class Xcls_Button60 : Object
2003     {
2004         public Gtk.Button el;
2005         private Xcls_MainWindow  _this;
2006
2007
2008             // my vars (def)
2009
2010         // ctor
2011         public Xcls_Button60(Xcls_MainWindow _owner )
2012         {
2013             _this = _owner;
2014             this.el = new Gtk.Button();
2015
2016             // my vars (dec)
2017
2018             // set gobject values
2019             this.el.width_request = 50;
2020             this.el.height_request = 50;
2021             this.el.tooltip_text = "Add File";
2022             var child_0 = new Xcls_Image61( _this );
2023             child_0.ref();
2024             this.el.set_image (  child_0.el  );
2025
2026             //listeners
2027             this.el.clicked.connect( () => {
2028                 // create a new file in project..
2029                 print("add file selected\n");
2030                 // what's the currently selected project...
2031                 var proj = _this.windowstate.left_projects.getSelectedProject();
2032                 
2033                 if (proj == null) {
2034                         print("no project selected?\n");
2035                     return  ;
2036                 }
2037                 
2038                 print("creating file?");
2039                 
2040                 var f = JsRender.JsRender.factory(proj.xtype,  proj, "");
2041                 _this.project = proj;
2042                     print("showing popup?");
2043                  _this.windowstate.file_details.show(
2044                    f, this.el
2045                 );
2046                 
2047                 
2048                 return  ;    
2049             });
2050         }
2051
2052         // user defined functions
2053     }
2054     public class Xcls_Image61 : Object
2055     {
2056         public Gtk.Image el;
2057         private Xcls_MainWindow  _this;
2058
2059
2060             // my vars (def)
2061
2062         // ctor
2063         public Xcls_Image61(Xcls_MainWindow _owner )
2064         {
2065             _this = _owner;
2066             this.el = new Gtk.Image();
2067
2068             // my vars (dec)
2069
2070             // set gobject values
2071             this.el.icon_name = "document-new";
2072         }
2073
2074         // user defined functions
2075     }
2076
2077
2078
2079
2080     public class Xcls_delprojectbutton : Object
2081     {
2082         public Clutter.Actor el;
2083         private Xcls_MainWindow  _this;
2084
2085
2086             // my vars (def)
2087
2088         // ctor
2089         public Xcls_delprojectbutton(Xcls_MainWindow _owner )
2090         {
2091             _this = _owner;
2092             _this.delprojectbutton = this;
2093             this.el = new Clutter.Actor();
2094
2095             // my vars (dec)
2096
2097             // set gobject values
2098             var child_0 = new Xcls_Actor63( _this );
2099             child_0.ref();
2100             this.el.add_child (  child_0.el  );
2101
2102             // init method
2103
2104             this.el.set_size(50,50);
2105         }
2106
2107         // user defined functions
2108     }
2109     public class Xcls_Actor63 : Object
2110     {
2111         public GtkClutter.Actor el;
2112         private Xcls_MainWindow  _this;
2113
2114
2115             // my vars (def)
2116
2117         // ctor
2118         public Xcls_Actor63(Xcls_MainWindow _owner )
2119         {
2120             _this = _owner;
2121             this.el = new GtkClutter.Actor();
2122
2123             // my vars (dec)
2124
2125             // set gobject values
2126             var child_0 = new Xcls_Button64( _this );
2127             child_0.ref();
2128
2129             // init method
2130
2131             ((Gtk.Container)(this.el.get_widget())).add ( child_0.el);
2132         }
2133
2134         // user defined functions
2135     }
2136     public class Xcls_Button64 : Object
2137     {
2138         public Gtk.Button el;
2139         private Xcls_MainWindow  _this;
2140
2141
2142             // my vars (def)
2143
2144         // ctor
2145         public Xcls_Button64(Xcls_MainWindow _owner )
2146         {
2147             _this = _owner;
2148             this.el = new Gtk.Button();
2149
2150             // my vars (dec)
2151
2152             // set gobject values
2153             this.el.width_request = 50;
2154             this.el.height_request = 50;
2155             this.el.tooltip_text = "Delete Project";
2156             var child_0 = new Xcls_Image65( _this );
2157             child_0.ref();
2158             this.el.set_image (  child_0.el  );
2159
2160             //listeners
2161             this.el.clicked.connect( ( ) => {
2162                  
2163                  var cd = DialogConfirm.singleton();
2164                  cd.el.set_transient_for(_this.el);
2165                 cd.el.set_modal(true);
2166             
2167                  var project =   _this.windowstate.left_projects.getSelectedProject();
2168                 if (project == null) {
2169                     print("SKIP - no project\n");
2170                     return;
2171                 }
2172                 
2173                     
2174                  if (Gtk.ResponseType.YES != cd.show("Confirm", 
2175                     "Are you sure you want to delete project %s".printf(project.name))) {
2176                     return;
2177                 }
2178                  
2179             
2180                 // confirm?
2181                 Project.Project.remove(project);
2182                 _this.project = null;
2183                 
2184                 _this.windowstate.left_projects.is_loaded =  false;
2185                 _this.windowstate.left_projects.load();
2186                 _this.windowstate.clutterfiles.clearFiles();
2187             
2188             });
2189         }
2190
2191         // user defined functions
2192     }
2193     public class Xcls_Image65 : Object
2194     {
2195         public Gtk.Image el;
2196         private Xcls_MainWindow  _this;
2197
2198
2199             // my vars (def)
2200
2201         // ctor
2202         public Xcls_Image65(Xcls_MainWindow _owner )
2203         {
2204             _this = _owner;
2205             this.el = new Gtk.Image();
2206
2207             // my vars (dec)
2208
2209             // set gobject values
2210             this.el.icon_name = "user-trash";
2211         }
2212
2213         // user defined functions
2214     }
2215
2216
2217
2218
2219
2220
2221
2222
2223     public class Xcls_Box66 : Object
2224     {
2225         public Gtk.Box el;
2226         private Xcls_MainWindow  _this;
2227
2228
2229             // my vars (def)
2230
2231         // ctor
2232         public Xcls_Box66(Xcls_MainWindow _owner )
2233         {
2234             _this = _owner;
2235             this.el = new Gtk.Box( Gtk.Orientation.HORIZONTAL, 0 );
2236
2237             // my vars (dec)
2238
2239             // set gobject values
2240             this.el.homogeneous = false;
2241             var child_0 = new Xcls_Label67( _this );
2242             child_0.ref();
2243             this.el.pack_start (  child_0.el , true,true,0 );
2244             var child_1 = new Xcls_statusbar( _this );
2245             child_1.ref();
2246             this.el.pack_start (  child_1.el , true,true,0 );
2247             var child_2 = new Xcls_search_entry( _this );
2248             child_2.ref();
2249             this.el.pack_start (  child_2.el , false,true,0 );
2250             var child_3 = new Xcls_MenuBar70( _this );
2251             child_3.ref();
2252             this.el.pack_end (  child_3.el , false,true,0 );
2253         }
2254
2255         // user defined functions
2256     }
2257     public class Xcls_Label67 : Object
2258     {
2259         public Gtk.Label el;
2260         private Xcls_MainWindow  _this;
2261
2262
2263             // my vars (def)
2264
2265         // ctor
2266         public Xcls_Label67(Xcls_MainWindow _owner )
2267         {
2268             _this = _owner;
2269             this.el = new Gtk.Label( "   " );
2270
2271             // my vars (dec)
2272
2273             // set gobject values
2274         }
2275
2276         // user defined functions
2277     }
2278
2279     public class Xcls_statusbar : Object
2280     {
2281         public Gtk.ProgressBar el;
2282         private Xcls_MainWindow  _this;
2283
2284
2285             // my vars (def)
2286         public ulong handler_id;
2287
2288         // ctor
2289         public Xcls_statusbar(Xcls_MainWindow _owner )
2290         {
2291             _this = _owner;
2292             _this.statusbar = this;
2293             this.el = new Gtk.ProgressBar();
2294
2295             // my vars (dec)
2296             this.handler_id = -1;
2297
2298             // set gobject values
2299             this.el.show_text = true;
2300
2301             // init method
2302
2303             {
2304                  this.handler_id = Resources.singleton().updateProgress.connect((pos,total) => {
2305                     if (pos < 1) {
2306                         this.el.hide();
2307                         _this.mainpane.el.set_sensitive(true);
2308                         
2309                         return;
2310                     }
2311                      _this.mainpane.el.set_sensitive(false);
2312                      this.el.show();
2313                      this.el.set_fraction ((1.0f * pos) / (1.0f * total));
2314                      this.el.set_text("Fetching Resource : %s/%s".printf(pos.to_string(), total.to_string()));
2315                    
2316                  });
2317             }
2318         }
2319
2320         // user defined functions
2321     }
2322
2323     public class Xcls_search_entry : Object
2324     {
2325         public Gtk.Entry el;
2326         private Xcls_MainWindow  _this;
2327
2328
2329             // my vars (def)
2330
2331         // ctor
2332         public Xcls_search_entry(Xcls_MainWindow _owner )
2333         {
2334             _this = _owner;
2335             _this.search_entry = this;
2336             this.el = new Gtk.Entry();
2337
2338             // my vars (dec)
2339
2340             // set gobject values
2341
2342             // init method
2343
2344             var description =   Pango.FontDescription.from_string("monospace");
2345                 description.set_size(8000);
2346                  this.el.override_font(description);
2347
2348             //listeners
2349             this.el.key_press_event.connect( (event) => {
2350                 
2351                 if (event.keyval == Gdk.Key.Return) {
2352                         this.forwardSearch(false);
2353                     return true;
2354             
2355                 }    
2356                // print(event.key.keyval)
2357                 
2358                 return false;
2359             
2360             });
2361             this.el.changed.connect( () => {
2362                 if (this.el.text == "") {
2363                         return;
2364                 }
2365                 var res = 0;
2366                 switch(_this.windowstate.state) {
2367                         case WindowState.State.CODEONLY:
2368                         case WindowState.State.CODE:
2369                                 // search the code being edited..
2370                                 res = _this.windowstate.code_editor.search(this.el.text);
2371                                 
2372                                 break;
2373                         case WindowState.State.PREVIEW:
2374                                 if (_this.windowstate.file.xtype == "Gtk") {
2375                                          res = _this.windowstate.window_gladeview.search(this.el.text);
2376                                 } else { 
2377                                          res = _this.windowstate.window_rooview.search(this.el.text);                   
2378                                 }
2379                         
2380                         
2381                                 break;
2382                 }
2383                 if (res > 0) {
2384                         _this.search_results.el.label = "%d Matches".printf(res);
2385                 } else {
2386                         _this.search_results.el.label = "No Matches";
2387                 }
2388                         
2389                 
2390                 
2391             });
2392         }
2393
2394         // user defined functions
2395         public void forwardSearch (bool change_focus) {
2396                 switch(_this.windowstate.state) {
2397                         case WindowState.State.CODEONLY:
2398                         case WindowState.State.CODE:
2399                                 // search the code being edited..
2400                                 _this.windowstate.code_editor.forwardSearch();
2401                                 
2402                                 break;
2403                         case WindowState.State.PREVIEW:
2404                                 if (_this.windowstate.file.xtype == "Gtk") {
2405                                         _this.windowstate.window_gladeview.forwardSearch(change_focus);
2406                                 } else { 
2407                                          _this.windowstate.window_rooview.forwardSearch(change_focus);
2408                                 }
2409                         
2410                                 break;
2411                 }
2412         }
2413     }
2414
2415     public class Xcls_MenuBar70 : Object
2416     {
2417         public Gtk.MenuBar el;
2418         private Xcls_MainWindow  _this;
2419
2420
2421             // my vars (def)
2422
2423         // ctor
2424         public Xcls_MenuBar70(Xcls_MainWindow _owner )
2425         {
2426             _this = _owner;
2427             this.el = new Gtk.MenuBar();
2428
2429             // my vars (dec)
2430
2431             // set gobject values
2432             var child_0 = new Xcls_search_results( _this );
2433             child_0.ref();
2434             this.el.add (  child_0.el  );
2435             var child_1 = new Xcls_MenuItem73( _this );
2436             child_1.ref();
2437             this.el.add (  child_1.el  );
2438             var child_2 = new Xcls_statusbar_errors( _this );
2439             child_2.ref();
2440             this.el.add (  child_2.el  );
2441             var child_3 = new Xcls_statusbar_warnings( _this );
2442             child_3.ref();
2443             this.el.add (  child_3.el  );
2444             var child_4 = new Xcls_statusbar_depricated( _this );
2445             child_4.ref();
2446             this.el.add (  child_4.el  );
2447             var child_5 = new Xcls_statusbar_run( _this );
2448             child_5.ref();
2449             this.el.add (  child_5.el  );
2450         }
2451
2452         // user defined functions
2453     }
2454     public class Xcls_search_results : Object
2455     {
2456         public Gtk.ImageMenuItem el;
2457         private Xcls_MainWindow  _this;
2458
2459
2460             // my vars (def)
2461         public Xcls_ValaCompileErrors popup;
2462
2463         // ctor
2464         public Xcls_search_results(Xcls_MainWindow _owner )
2465         {
2466             _this = _owner;
2467             _this.search_results = this;
2468             this.el = new Gtk.ImageMenuItem();
2469
2470             // my vars (dec)
2471
2472             // set gobject values
2473             this.el.always_show_image = true;
2474             this.el.label = "Matches";
2475             var child_0 = new Xcls_Image72( _this );
2476             child_0.ref();
2477             this.el.set_image (  child_0.el  );
2478
2479             //listeners
2480             this.el.button_press_event.connect( () => {
2481             /*
2482                 if (this.popup == null) {
2483                     this.popup = new Xcls_ValaCompileErrors();
2484                     this.popup.window = _this;
2485                 }
2486                
2487                 
2488                 this.popup.show(this.notices, this.el);
2489                 */
2490                 return true;
2491             });
2492         }
2493
2494         // user defined functions
2495     }
2496     public class Xcls_Image72 : Object
2497     {
2498         public Gtk.Image el;
2499         private Xcls_MainWindow  _this;
2500
2501
2502             // my vars (def)
2503
2504         // ctor
2505         public Xcls_Image72(Xcls_MainWindow _owner )
2506         {
2507             _this = _owner;
2508             this.el = new Gtk.Image();
2509
2510             // my vars (dec)
2511
2512             // set gobject values
2513             this.el.icon_name = "system-search";
2514             this.el.sensitive = false;
2515         }
2516
2517         // user defined functions
2518     }
2519
2520
2521     public class Xcls_MenuItem73 : Object
2522     {
2523         public Gtk.MenuItem el;
2524         private Xcls_MainWindow  _this;
2525
2526
2527             // my vars (def)
2528
2529         // ctor
2530         public Xcls_MenuItem73(Xcls_MainWindow _owner )
2531         {
2532             _this = _owner;
2533             this.el = new Gtk.MenuItem();
2534
2535             // my vars (dec)
2536
2537             // set gobject values
2538             this.el.label = "Compile Status:";
2539         }
2540
2541         // user defined functions
2542     }
2543
2544     public class Xcls_statusbar_errors : Object
2545     {
2546         public Gtk.ImageMenuItem el;
2547         private Xcls_MainWindow  _this;
2548
2549
2550             // my vars (def)
2551         public Xcls_ValaCompileErrors popup;
2552         public Json.Object notices;
2553
2554         // ctor
2555         public Xcls_statusbar_errors(Xcls_MainWindow _owner )
2556         {
2557             _this = _owner;
2558             _this.statusbar_errors = this;
2559             this.el = new Gtk.ImageMenuItem();
2560
2561             // my vars (dec)
2562             this.notices = new Json.Object() ;
2563
2564             // set gobject values
2565             this.el.always_show_image = true;
2566             this.el.label = "Errors";
2567             var child_0 = new Xcls_Image75( _this );
2568             child_0.ref();
2569             this.el.set_image (  child_0.el  );
2570
2571             //listeners
2572             this.el.button_press_event.connect( () => {
2573                 if (this.popup == null) {
2574                     this.popup = new Xcls_ValaCompileErrors();
2575                     this.popup.window = _this;
2576                 }
2577                
2578                 
2579                 this.popup.show(this.notices, this.el);
2580                 return true;
2581             });
2582         }
2583
2584         // user defined functions
2585         public void setNotices (Json.Object nots, int qty) {
2586             this.el.show();
2587             this.el.label = qty.to_string() + " Errors";
2588             this.notices = nots;
2589         
2590         }
2591     }
2592     public class Xcls_Image75 : Object
2593     {
2594         public Gtk.Image el;
2595         private Xcls_MainWindow  _this;
2596
2597
2598             // my vars (def)
2599
2600         // ctor
2601         public Xcls_Image75(Xcls_MainWindow _owner )
2602         {
2603             _this = _owner;
2604             this.el = new Gtk.Image();
2605
2606             // my vars (dec)
2607
2608             // set gobject values
2609             this.el.icon_name = "dialog-error";
2610         }
2611
2612         // user defined functions
2613     }
2614
2615
2616     public class Xcls_statusbar_warnings : Object
2617     {
2618         public Gtk.ImageMenuItem el;
2619         private Xcls_MainWindow  _this;
2620
2621
2622             // my vars (def)
2623         public Xcls_ValaCompileErrors popup;
2624         public Json.Object notices;
2625
2626         // ctor
2627         public Xcls_statusbar_warnings(Xcls_MainWindow _owner )
2628         {
2629             _this = _owner;
2630             _this.statusbar_warnings = this;
2631             this.el = new Gtk.ImageMenuItem();
2632
2633             // my vars (dec)
2634             this.notices = new Json.Object();
2635
2636             // set gobject values
2637             this.el.always_show_image = true;
2638             this.el.label = "Warnings";
2639             var child_0 = new Xcls_Image77( _this );
2640             child_0.ref();
2641             this.el.set_image (  child_0.el  );
2642
2643             //listeners
2644             this.el.button_press_event.connect( () => {
2645                 if (this.popup == null) {
2646                     this.popup = new Xcls_ValaCompileErrors();
2647                     this.popup.window = _this;
2648                 }
2649                 
2650                 this.popup.show(this.notices, this.el);
2651                 return true;
2652             });
2653         }
2654
2655         // user defined functions
2656         public void setNotices (Json.Object nots, int qty) {
2657             this.el.show();
2658             this.el.label = qty.to_string() + " Warnings";
2659             this.notices = nots;
2660         
2661         }
2662     }
2663     public class Xcls_Image77 : Object
2664     {
2665         public Gtk.Image el;
2666         private Xcls_MainWindow  _this;
2667
2668
2669             // my vars (def)
2670
2671         // ctor
2672         public Xcls_Image77(Xcls_MainWindow _owner )
2673         {
2674             _this = _owner;
2675             this.el = new Gtk.Image();
2676
2677             // my vars (dec)
2678
2679             // set gobject values
2680             this.el.icon_name = "dialog-warning";
2681         }
2682
2683         // user defined functions
2684     }
2685
2686
2687     public class Xcls_statusbar_depricated : Object
2688     {
2689         public Gtk.ImageMenuItem el;
2690         private Xcls_MainWindow  _this;
2691
2692
2693             // my vars (def)
2694         public Xcls_ValaCompileErrors popup;
2695         public Json.Object notices;
2696
2697         // ctor
2698         public Xcls_statusbar_depricated(Xcls_MainWindow _owner )
2699         {
2700             _this = _owner;
2701             _this.statusbar_depricated = this;
2702             this.el = new Gtk.ImageMenuItem();
2703
2704             // my vars (dec)
2705             this.notices = new Json.Object();
2706
2707             // set gobject values
2708             this.el.always_show_image = true;
2709             this.el.label = "Depricated";
2710             var child_0 = new Xcls_Image79( _this );
2711             child_0.ref();
2712             this.el.set_image (  child_0.el  );
2713
2714             //listeners
2715             this.el.button_press_event.connect( () => {
2716                 if (this.popup == null) {
2717                     this.popup = new Xcls_ValaCompileErrors();
2718                     this.popup.window = _this;
2719                 }
2720                 
2721                 
2722                 this.popup.show(this.notices, this.el);
2723                 return true;
2724             });
2725         }
2726
2727         // user defined functions
2728         public void setNotices (Json.Object nots, int qty) {
2729             this.el.show();
2730             this.el.label = qty.to_string() + " Depricated";
2731             this.notices = nots;
2732         
2733         }
2734     }
2735     public class Xcls_Image79 : Object
2736     {
2737         public Gtk.Image el;
2738         private Xcls_MainWindow  _this;
2739
2740
2741             // my vars (def)
2742
2743         // ctor
2744         public Xcls_Image79(Xcls_MainWindow _owner )
2745         {
2746             _this = _owner;
2747             this.el = new Gtk.Image();
2748
2749             // my vars (dec)
2750
2751             // set gobject values
2752             this.el.icon_name = "dialog-information";
2753         }
2754
2755         // user defined functions
2756     }
2757
2758
2759     public class Xcls_statusbar_run : Object
2760     {
2761         public Gtk.ImageMenuItem el;
2762         private Xcls_MainWindow  _this;
2763
2764
2765             // my vars (def)
2766         public Xcls_ValaCompileErrors popup;
2767
2768         // ctor
2769         public Xcls_statusbar_run(Xcls_MainWindow _owner )
2770         {
2771             _this = _owner;
2772             _this.statusbar_run = this;
2773             this.el = new Gtk.ImageMenuItem();
2774
2775             // my vars (dec)
2776
2777             // set gobject values
2778             this.el.always_show_image = true;
2779             this.el.label = "Run";
2780             var child_0 = new Xcls_Image81( _this );
2781             child_0.ref();
2782             this.el.set_image (  child_0.el  );
2783
2784             //listeners
2785             this.el.button_press_event.connect( () => {
2786                 if (_this.windowstate.file == null) {
2787                         return true;
2788                 }
2789                 _this.windowstate.valasource.spawnExecute(_this.windowstate.file);
2790                 
2791                 _this.windowstate.compile_results.show(this.el,true);
2792                 
2793                 return true;
2794             });
2795         }
2796
2797         // user defined functions
2798     }
2799     public class Xcls_Image81 : Object
2800     {
2801         public Gtk.Image el;
2802         private Xcls_MainWindow  _this;
2803
2804
2805             // my vars (def)
2806
2807         // ctor
2808         public Xcls_Image81(Xcls_MainWindow _owner )
2809         {
2810             _this = _owner;
2811             this.el = new Gtk.Image();
2812
2813             // my vars (dec)
2814
2815             // set gobject values
2816             this.el.icon_name = "media-playback-start";
2817         }
2818
2819         // user defined functions
2820     }
2821
2822
2823
2824
2825
2826 }