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