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