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