1 static Xcls_MainWindow _MainWindow;
3 public class Xcls_MainWindow : Object
6 private Xcls_MainWindow _this;
8 public static Xcls_MainWindow singleton()
10 if (_MainWindow == null) {
11 _MainWindow= new Xcls_MainWindow();
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;
49 public Project.Project project;
51 public int no_windows;
52 public WindowState windowstate;
55 public Xcls_MainWindow()
58 this.el = new Gtk.Window( Gtk.WindowType.TOPLEVEL );
62 this.title = "Application Builder";
64 this.windowstate = null;
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 );
72 this.el.set_titlebar ( child_0.el );
73 var child_1 = new Xcls_vbox( _this );
75 this.el.add ( child_1.el );
82 this.el.delete_event.connect( ( event) => {
85 this.el.button_release_event.connect( );
86 this.el.destroy.connect( () => {
87 Xcls_MainWindow.singleton().no_windows--;
89 Resources.singleton().disconnect(_this.statusbar.handler_id);
92 if (Xcls_MainWindow.singleton().no_windows < 1) {
97 this.el.show.connect( ( ) => {
98 // hide the file editing..
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();
107 Resources.singleton().checkResources();
110 this.el.key_release_event.connect( (event) => {
112 if (event.keyval == Gdk.Key.f && (event.state & Gdk.ModifierType.CONTROL_MASK ) > 0 ) {
113 print("SAVE: ctrl-f pressed");
117 // print(event.key.keyval)
124 // user defined functions
125 public void initChildren () {
126 // this needs putting in a better place..
127 this.windowstate = new WindowState(this);
131 var tl = new Clutter.Timeline(6000);
132 tl.set_repeat_count(-1);
141 public void show () {
146 public void setTitle (string str) {
147 this.headerbar.el.set_title(this.title + " - " + str);
149 public class Xcls_headerbar : Object
151 public Gtk.HeaderBar el;
152 private Xcls_MainWindow _this;
158 public Xcls_headerbar(Xcls_MainWindow _owner )
161 _this.headerbar = this;
162 this.el = new Gtk.HeaderBar();
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 );
171 this.el.pack_start ( child_0.el );
174 // user defined functions
176 public class Xcls_Box3 : Object
179 private Xcls_MainWindow _this;
185 public Xcls_Box3(Xcls_MainWindow _owner )
188 this.el = new Gtk.Box( Gtk.Orientation.HORIZONTAL, 0 );
192 // set gobject values
193 var child_0 = new Xcls_MenuButton4( _this );
195 this.el.add ( child_0.el );
198 // user defined functions
200 public class Xcls_MenuButton4 : Object
202 public Gtk.MenuButton el;
203 private Xcls_MainWindow _this;
209 public Xcls_MenuButton4(Xcls_MainWindow _owner )
212 this.el = new Gtk.MenuButton();
216 // set gobject values
217 this.el.use_popover = false;
218 var child_0 = new Xcls_topbarmenu( _this );
220 this.el.set_popup ( child_0.el );
221 var child_1 = new Xcls_Image10( _this );
223 this.el.set_image ( child_1.el );
226 // user defined functions
228 public class Xcls_topbarmenu : Object
231 private Xcls_MainWindow _this;
237 public Xcls_topbarmenu(Xcls_MainWindow _owner )
240 _this.topbarmenu = this;
241 this.el = new Gtk.Menu();
245 // set gobject values
246 var child_0 = new Xcls_MenuItem6( _this );
248 this.el.append ( child_0.el );
249 var child_1 = new Xcls_SeparatorMenuItem7( _this );
251 this.el.append ( child_1.el );
252 var child_2 = new Xcls_MenuItem8( _this );
254 this.el.append ( child_2.el );
255 var child_3 = new Xcls_MenuItem9( _this );
257 this.el.append ( child_3.el );
266 // user defined functions
268 public class Xcls_MenuItem6 : Object
270 public Gtk.MenuItem el;
271 private Xcls_MainWindow _this;
277 public Xcls_MenuItem6(Xcls_MainWindow _owner )
280 this.el = new Gtk.MenuItem();
284 // set gobject values
285 this.el.label = "Open a new Window";
288 this.el.activate.connect( ( ) => {
289 Xcls_MainWindow.singleton().no_windows++;
290 var w = new Xcls_MainWindow();
295 w.windowstate.switchState(WindowState.State.FILES);
299 // user defined functions
302 public class Xcls_SeparatorMenuItem7 : Object
304 public Gtk.SeparatorMenuItem el;
305 private Xcls_MainWindow _this;
311 public Xcls_SeparatorMenuItem7(Xcls_MainWindow _owner )
314 this.el = new Gtk.SeparatorMenuItem();
318 // set gobject values
321 // user defined functions
324 public class Xcls_MenuItem8 : Object
326 public Gtk.MenuItem el;
327 private Xcls_MainWindow _this;
333 public Xcls_MenuItem8(Xcls_MainWindow _owner )
336 this.el = new Gtk.MenuItem();
340 // set gobject values
341 this.el.label = "Download updated Resources";
344 this.el.activate.connect( ( ) => {
345 Resources.singleton().fetchStart();
349 // user defined functions
352 public class Xcls_MenuItem9 : Object
354 public Gtk.MenuItem el;
355 private Xcls_MainWindow _this;
361 public Xcls_MenuItem9(Xcls_MainWindow _owner )
364 this.el = new Gtk.MenuItem();
368 // set gobject values
369 this.el.label = "About the Builder";
372 this.el.activate.connect( () => {
373 About.singleton().el.show();
377 // user defined functions
381 public class Xcls_Image10 : Object
384 private Xcls_MainWindow _this;
390 public Xcls_Image10(Xcls_MainWindow _owner )
393 this.el = new Gtk.Image();
397 // set gobject values
398 this.el.icon_name = "help-about";
401 // user defined functions
407 public class Xcls_vbox : Object
410 private Xcls_MainWindow _this;
416 public Xcls_vbox(Xcls_MainWindow _owner )
420 this.el = new Gtk.Box( Gtk.Orientation.VERTICAL, 0 );
424 // set gobject values
425 this.el.homogeneous = false;
426 var child_0 = new Xcls_mainpane( _this );
428 this.el.pack_start ( child_0.el , true,true,0 );
429 var child_1 = new Xcls_Box66( _this );
431 this.el.pack_end ( child_1.el , false,true,0 );
434 // user defined functions
436 public class Xcls_mainpane : Object
439 private Xcls_MainWindow _this;
443 public int lastWidth;
446 public Xcls_mainpane(Xcls_MainWindow _owner )
449 _this.mainpane = this;
450 this.el = new Gtk.Paned( Gtk.Orientation.HORIZONTAL );
455 // set gobject values
456 this.el.position = 400;
457 var child_0 = new Xcls_leftpane( _this );
459 this.el.add1 ( child_0.el );
460 var child_1 = new Xcls_Box17( _this );
462 this.el.add2 ( child_1.el );
465 // user defined functions
467 public class Xcls_leftpane : Object
470 private Xcls_MainWindow _this;
476 public Xcls_leftpane(Xcls_MainWindow _owner )
479 _this.leftpane = this;
480 this.el = new Gtk.Box( Gtk.Orientation.VERTICAL, 0 );
484 // set gobject values
485 var child_0 = new Xcls_editpane( _this );
487 this.el.pack_start ( child_0.el , true,true,0 );
490 // user defined functions
492 public class Xcls_editpane : Object
495 private Xcls_MainWindow _this;
501 public Xcls_editpane(Xcls_MainWindow _owner )
504 _this.editpane = this;
505 this.el = new Gtk.Paned( Gtk.Orientation.VERTICAL );
509 // set gobject values
510 var child_0 = new Xcls_tree( _this );
512 this.el.add1 ( child_0.el );
513 var child_1 = new Xcls_props( _this );
515 this.el.add2 ( child_1.el );
518 // user defined functions
520 public class Xcls_tree : Object
523 private Xcls_MainWindow _this;
529 public Xcls_tree(Xcls_MainWindow _owner )
533 this.el = new Gtk.Box( Gtk.Orientation.VERTICAL, 0 );
537 // set gobject values
540 // user defined functions
543 public class Xcls_props : Object
546 private Xcls_MainWindow _this;
552 public Xcls_props(Xcls_MainWindow _owner )
556 this.el = new Gtk.Box( Gtk.Orientation.VERTICAL, 0 );
560 // set gobject values
563 // user defined functions
568 public class Xcls_Box17 : Object
571 private Xcls_MainWindow _this;
577 public Xcls_Box17(Xcls_MainWindow _owner )
580 this.el = new Gtk.Box( Gtk.Orientation.VERTICAL, 0 );
584 // set gobject values
585 var child_0 = new Xcls_clutterembed( _this );
587 this.el.pack_start ( child_0.el , true,true,0 );
590 // user defined functions
592 public class Xcls_clutterembed : Object
594 public GtkClutter.Embed el;
595 private Xcls_MainWindow _this;
601 public Xcls_clutterembed(Xcls_MainWindow _owner )
604 _this.clutterembed = this;
605 this.el = new GtkClutter.Embed();
609 // set gobject values
610 var child_0 = new Xcls_rooview( _this );
612 this.el.get_stage().add_child ( child_0.el );
613 var child_1 = new Xcls_objectview( _this );
615 this.el.get_stage().add_child ( child_1.el );
616 var child_2 = new Xcls_codeeditview( _this );
618 this.el.get_stage().add_child ( child_2.el );
619 var child_3 = new Xcls_addpropsview( _this );
621 this.el.get_stage().add_child ( child_3.el );
622 var child_4 = new Xcls_projecteditview( _this );
624 this.el.get_stage().add_child ( child_4.el );
625 var child_5 = new Xcls_buttonlayout( _this );
627 this.el.get_stage().add_child ( child_5.el );
631 var stage = this.el.get_stage();
632 stage.set_background_color( Clutter.Color.from_string("#000"));
635 this.el.size_allocate.connect( ( alloc) => {
636 if (_this.windowstate == null) {
639 _this.windowstate.resizeCanvas();
644 // user defined functions
646 public class Xcls_rooview : Object
648 public GtkClutter.Actor el;
649 private Xcls_MainWindow _this;
655 public Xcls_rooview(Xcls_MainWindow _owner )
658 _this.rooview = this;
659 this.el = new GtkClutter.Actor();
663 // set gobject values
670 this.el.add_constraint(
671 new Clutter.AlignConstraint(
672 _this.clutterembed.el.get_stage(),
673 Clutter.AlignAxis.X_AXIS,
678 //this.el.set_position(100,100);
679 this.el.set_pivot_point(1.0f,1.0f);
681 this.el.set_size(_this.clutterembed.el.get_stage().width-50,
682 _this.clutterembed.el.get_stage().height);
687 // user defined functions
690 public class Xcls_objectview : Object
692 public GtkClutter.Actor el;
693 private Xcls_MainWindow _this;
699 public Xcls_objectview(Xcls_MainWindow _owner )
702 _this.objectview = this;
703 this.el = new GtkClutter.Actor();
707 // set gobject values
714 this.el.add_constraint(
715 new Clutter.AlignConstraint(
716 _this.clutterembed.el.get_stage(),
717 Clutter.AlignAxis.X_AXIS,
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);
733 // user defined functions
736 public class Xcls_codeeditview : Object
738 public GtkClutter.Actor el;
739 private Xcls_MainWindow _this;
745 public Xcls_codeeditview(Xcls_MainWindow _owner )
748 _this.codeeditview = this;
749 this.el = new GtkClutter.Actor();
753 // set gobject values
760 this.el.add_constraint(
761 new Clutter.AlignConstraint(
762 _this.clutterembed.el.get_stage(),
763 Clutter.AlignAxis.X_AXIS,
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);
779 // user defined functions
782 public class Xcls_addpropsview : Object
784 public GtkClutter.Actor el;
785 private Xcls_MainWindow _this;
791 public Xcls_addpropsview(Xcls_MainWindow _owner )
794 _this.addpropsview = this;
795 this.el = new GtkClutter.Actor();
799 // set gobject values
806 this.el.add_constraint(
807 new Clutter.AlignConstraint(
808 _this.clutterembed.el.get_stage(),
809 Clutter.AlignAxis.X_AXIS,
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);
825 // user defined functions
828 public class Xcls_projecteditview : Object
830 public GtkClutter.Actor el;
831 private Xcls_MainWindow _this;
837 public Xcls_projecteditview(Xcls_MainWindow _owner )
840 _this.projecteditview = this;
841 this.el = new GtkClutter.Actor();
845 // set gobject values
852 this.el.add_constraint(
853 new Clutter.AlignConstraint(
854 _this.clutterembed.el.get_stage(),
855 Clutter.AlignAxis.X_AXIS,
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);
869 // user defined functions
872 public class Xcls_buttonlayout : Object
874 public Clutter.Actor el;
875 private Xcls_MainWindow _this;
881 public Xcls_buttonlayout(Xcls_MainWindow _owner )
884 _this.buttonlayout = this;
885 this.el = new Clutter.Actor();
889 // set gobject values
890 var child_0 = new Xcls_BoxLayout25( _this );
892 this.el.layout_manager = child_0.el;
893 var child_1 = new Xcls_backbutton( _this );
895 this.el.add_child ( child_1.el );
896 var child_2 = new Xcls_projectbutton( _this );
898 this.el.add_child ( child_2.el );
899 var child_3 = new Xcls_editfilebutton( _this );
901 this.el.add_child ( child_3.el );
902 var child_4 = new Xcls_projecteditbutton( _this );
904 this.el.add_child ( child_4.el );
905 var child_5 = new Xcls_objectshowbutton( _this );
907 this.el.add_child ( child_5.el );
908 var child_6 = new Xcls_addpropbutton( _this );
910 this.el.add_child ( child_6.el );
911 var child_7 = new Xcls_addlistenerbutton( _this );
913 this.el.add_child ( child_7.el );
914 var child_8 = new Xcls_addprojectbutton( _this );
916 this.el.add_child ( child_8.el );
917 var child_9 = new Xcls_addfilebutton( _this );
919 this.el.add_child ( child_9.el );
920 var child_10 = new Xcls_delprojectbutton( _this );
922 this.el.add_child ( child_10.el );
928 this.el.add_constraint(
929 new Clutter.AlignConstraint(
930 _this.clutterembed.el.get_stage(),
931 Clutter.AlignAxis.X_AXIS,
937 //this.el.set_position(100,100);
938 this.el.set_pivot_point(0.5f,0.5f);
940 _this.clutterembed.el.get_stage().height);
945 // user defined functions
947 public class Xcls_BoxLayout25 : Object
949 public Clutter.BoxLayout el;
950 private Xcls_MainWindow _this;
956 public Xcls_BoxLayout25(Xcls_MainWindow _owner )
959 this.el = new Clutter.BoxLayout();
963 // set gobject values
964 this.el.orientation = Clutter.Orientation.VERTICAL;
967 // user defined functions
970 public class Xcls_backbutton : Object
972 public Clutter.Actor el;
973 private Xcls_MainWindow _this;
979 public Xcls_backbutton(Xcls_MainWindow _owner )
982 _this.backbutton = this;
983 this.el = new Clutter.Actor();
987 // set gobject values
988 var child_0 = new Xcls_Actor27( _this );
990 this.el.add_child ( child_0.el );
994 this.el.set_size(50,50);
997 // user defined functions
999 public class Xcls_Actor27 : Object
1001 public GtkClutter.Actor el;
1002 private Xcls_MainWindow _this;
1008 public Xcls_Actor27(Xcls_MainWindow _owner )
1011 this.el = new GtkClutter.Actor();
1015 // set gobject values
1016 var child_0 = new Xcls_Button28( _this );
1021 ((Gtk.Container)(this.el.get_widget())).add ( child_0.el);
1024 // user defined functions
1026 public class Xcls_Button28 : Object
1028 public Gtk.Button el;
1029 private Xcls_MainWindow _this;
1035 public Xcls_Button28(Xcls_MainWindow _owner )
1038 this.el = new Gtk.Button();
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 );
1048 this.el.set_image ( child_0.el );
1051 this.el.clicked.connect( ( ) => {
1053 _this.windowstate.switchState(WindowState.State.PREVIEW);
1059 // user defined functions
1061 public class Xcls_Image29 : Object
1063 public Gtk.Image el;
1064 private Xcls_MainWindow _this;
1070 public Xcls_Image29(Xcls_MainWindow _owner )
1073 this.el = new Gtk.Image();
1077 // set gobject values
1078 this.el.icon_name = "go-previous";
1081 // user defined functions
1087 public class Xcls_projectbutton : Object
1089 public Clutter.Actor el;
1090 private Xcls_MainWindow _this;
1096 public Xcls_projectbutton(Xcls_MainWindow _owner )
1099 _this.projectbutton = this;
1100 this.el = new Clutter.Actor();
1104 // set gobject values
1105 var child_0 = new Xcls_Actor31( _this );
1107 this.el.add_child ( child_0.el );
1111 this.el.set_size(50,50);
1114 // user defined functions
1116 public class Xcls_Actor31 : Object
1118 public GtkClutter.Actor el;
1119 private Xcls_MainWindow _this;
1125 public Xcls_Actor31(Xcls_MainWindow _owner )
1128 this.el = new GtkClutter.Actor();
1132 // set gobject values
1133 var child_0 = new Xcls_Button32( _this );
1138 ((Gtk.Container)(this.el.get_widget())).add ( child_0.el);
1141 // user defined functions
1143 public class Xcls_Button32 : Object
1145 public Gtk.Button el;
1146 private Xcls_MainWindow _this;
1152 public Xcls_Button32(Xcls_MainWindow _owner )
1155 this.el = new Gtk.Button();
1159 // set gobject values
1160 this.el.width_request = 50;
1161 this.el.height_request = 50;
1162 var child_0 = new Xcls_Image33( _this );
1164 this.el.set_image ( child_0.el );
1167 this.el.clicked.connect( ( ) => {
1168 _this.windowstate.switchState(WindowState.State.FILES);
1174 // user defined functions
1176 public class Xcls_Image33 : Object
1178 public Gtk.Image el;
1179 private Xcls_MainWindow _this;
1185 public Xcls_Image33(Xcls_MainWindow _owner )
1188 this.el = new Gtk.Image();
1192 // set gobject values
1193 this.el.icon_name = "document-open";
1196 // user defined functions
1202 public class Xcls_editfilebutton : Object
1204 public Clutter.Actor el;
1205 private Xcls_MainWindow _this;
1211 public Xcls_editfilebutton(Xcls_MainWindow _owner )
1214 _this.editfilebutton = this;
1215 this.el = new Clutter.Actor();
1219 // set gobject values
1220 var child_0 = new Xcls_Actor35( _this );
1222 this.el.add_child ( child_0.el );
1226 this.el.set_size(50.0f,50.0f);
1229 // user defined functions
1231 public class Xcls_Actor35 : Object
1233 public GtkClutter.Actor el;
1234 private Xcls_MainWindow _this;
1240 public Xcls_Actor35(Xcls_MainWindow _owner )
1243 this.el = new GtkClutter.Actor();
1247 // set gobject values
1248 var child_0 = new Xcls_Button36( _this );
1253 ((Gtk.Container)(this.el.get_widget())).add ( child_0.el);
1256 // user defined functions
1258 public class Xcls_Button36 : Object
1260 public Gtk.Button el;
1261 private Xcls_MainWindow _this;
1267 public Xcls_Button36(Xcls_MainWindow _owner )
1270 this.el = new Gtk.Button();
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 );
1280 this.el.set_image ( child_0.el );
1283 this.el.clicked.connect( ( ) => {
1285 // create a new file in project..
1286 if (_this.project == null || _this.windowstate.file == null) {
1289 _this.windowstate.file_details.show(
1290 _this.windowstate.file, this.el
1299 // user defined functions
1301 public class Xcls_Image37 : Object
1303 public Gtk.Image el;
1304 private Xcls_MainWindow _this;
1310 public Xcls_Image37(Xcls_MainWindow _owner )
1313 this.el = new Gtk.Image();
1317 // set gobject values
1318 this.el.icon_name = "document-properties";
1321 // user defined functions
1327 public class Xcls_projecteditbutton : Object
1329 public Clutter.Actor el;
1330 private Xcls_MainWindow _this;
1336 public Xcls_projecteditbutton(Xcls_MainWindow _owner )
1339 _this.projecteditbutton = this;
1340 this.el = new Clutter.Actor();
1344 // set gobject values
1345 var child_0 = new Xcls_Actor39( _this );
1347 this.el.add_child ( child_0.el );
1351 this.el.set_size(50,50);
1354 // user defined functions
1356 public class Xcls_Actor39 : Object
1358 public GtkClutter.Actor el;
1359 private Xcls_MainWindow _this;
1365 public Xcls_Actor39(Xcls_MainWindow _owner )
1368 this.el = new GtkClutter.Actor();
1372 // set gobject values
1373 var child_0 = new Xcls_Button40( _this );
1378 ((Gtk.Container)(this.el.get_widget())).add ( child_0.el);
1381 // user defined functions
1383 public class Xcls_Button40 : Object
1385 public Gtk.Button el;
1386 private Xcls_MainWindow _this;
1392 public Xcls_Button40(Xcls_MainWindow _owner )
1395 this.el = new Gtk.Button();
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 );
1405 this.el.set_image ( child_0.el );
1408 this.el.clicked.connect( ( ) => {
1409 _this.windowstate.switchState(WindowState.State.PROJECT);
1416 // user defined functions
1418 public class Xcls_Image41 : Object
1420 public Gtk.Image el;
1421 private Xcls_MainWindow _this;
1427 public Xcls_Image41(Xcls_MainWindow _owner )
1430 this.el = new Gtk.Image();
1434 // set gobject values
1435 this.el.icon_name = "emblem-system";
1438 // user defined functions
1444 public class Xcls_objectshowbutton : Object
1446 public Clutter.Actor el;
1447 private Xcls_MainWindow _this;
1453 public Xcls_objectshowbutton(Xcls_MainWindow _owner )
1456 _this.objectshowbutton = this;
1457 this.el = new Clutter.Actor();
1461 // set gobject values
1462 var child_0 = new Xcls_Actor43( _this );
1464 this.el.add_child ( child_0.el );
1468 this.el.set_size(50,50);
1471 this.el.enter_event.connect( ( event) => {
1472 this.el.background_color = Clutter.Color.from_string("#333");
1475 this.el.leave_event.connect( ( event) => {
1476 this.el.background_color = Clutter.Color.from_string("#000");
1481 // user defined functions
1483 public class Xcls_Actor43 : Object
1485 public GtkClutter.Actor el;
1486 private Xcls_MainWindow _this;
1492 public Xcls_Actor43(Xcls_MainWindow _owner )
1495 this.el = new GtkClutter.Actor();
1499 // set gobject values
1500 var child_0 = new Xcls_Button44( _this );
1505 ((Gtk.Container)(this.el.get_widget())).add ( child_0.el);
1508 // user defined functions
1510 public class Xcls_Button44 : Object
1512 public Gtk.Button el;
1513 private Xcls_MainWindow _this;
1519 public Xcls_Button44(Xcls_MainWindow _owner )
1522 this.el = new Gtk.Button();
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 );
1532 this.el.set_image ( child_0.el );
1535 this.el.clicked.connect( ( ) => {
1537 _this.windowstate.switchState(WindowState.State.OBJECT);
1543 // user defined functions
1545 public class Xcls_Image45 : Object
1547 public Gtk.Image el;
1548 private Xcls_MainWindow _this;
1554 public Xcls_Image45(Xcls_MainWindow _owner )
1557 this.el = new Gtk.Image();
1561 // set gobject values
1562 this.el.icon_name = "list-add";
1565 // user defined functions
1571 public class Xcls_addpropbutton : Object
1573 public Clutter.Actor el;
1574 private Xcls_MainWindow _this;
1580 public Xcls_addpropbutton(Xcls_MainWindow _owner )
1583 _this.addpropbutton = this;
1584 this.el = new Clutter.Actor();
1588 // set gobject values
1589 var child_0 = new Xcls_Actor47( _this );
1591 this.el.add_child ( child_0.el );
1595 this.el.set_size(50,50);
1598 // user defined functions
1600 public class Xcls_Actor47 : Object
1602 public GtkClutter.Actor el;
1603 private Xcls_MainWindow _this;
1609 public Xcls_Actor47(Xcls_MainWindow _owner )
1612 this.el = new GtkClutter.Actor();
1616 // set gobject values
1617 var child_0 = new Xcls_Button48( _this );
1622 ((Gtk.Container)(this.el.get_widget())).add ( child_0.el);
1625 // user defined functions
1627 public class Xcls_Button48 : Object
1629 public Gtk.Button el;
1630 private Xcls_MainWindow _this;
1636 public Xcls_Button48(Xcls_MainWindow _owner )
1639 this.el = new Gtk.Button();
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 );
1649 this.el.set_image ( child_0.el );
1652 this.el.clicked.connect( ( ) => {
1654 _this.windowstate.switchState(WindowState.State.PROP);
1660 // user defined functions
1662 public class Xcls_Image49 : Object
1664 public Gtk.Image el;
1665 private Xcls_MainWindow _this;
1671 public Xcls_Image49(Xcls_MainWindow _owner )
1674 this.el = new Gtk.Image();
1678 // set gobject values
1679 this.el.icon_name = "format-justify-left";
1682 // user defined functions
1688 public class Xcls_addlistenerbutton : Object
1690 public Clutter.Actor el;
1691 private Xcls_MainWindow _this;
1697 public Xcls_addlistenerbutton(Xcls_MainWindow _owner )
1700 _this.addlistenerbutton = this;
1701 this.el = new Clutter.Actor();
1705 // set gobject values
1706 var child_0 = new Xcls_Actor51( _this );
1708 this.el.add_child ( child_0.el );
1712 this.el.set_size(50,50);
1715 // user defined functions
1717 public class Xcls_Actor51 : Object
1719 public GtkClutter.Actor el;
1720 private Xcls_MainWindow _this;
1726 public Xcls_Actor51(Xcls_MainWindow _owner )
1729 this.el = new GtkClutter.Actor();
1733 // set gobject values
1734 var child_0 = new Xcls_Button52( _this );
1739 ((Gtk.Container)(this.el.get_widget())).add ( child_0.el);
1742 // user defined functions
1744 public class Xcls_Button52 : Object
1746 public Gtk.Button el;
1747 private Xcls_MainWindow _this;
1753 public Xcls_Button52(Xcls_MainWindow _owner )
1756 this.el = new Gtk.Button();
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 );
1766 this.el.set_image ( child_0.el );
1769 this.el.clicked.connect( ( ) => {
1771 _this.windowstate.switchState(WindowState.State.LISTENER);
1778 // user defined functions
1780 public class Xcls_Image53 : Object
1782 public Gtk.Image el;
1783 private Xcls_MainWindow _this;
1789 public Xcls_Image53(Xcls_MainWindow _owner )
1792 this.el = new Gtk.Image();
1796 // set gobject values
1797 this.el.icon_name = "appointment-new";
1800 // user defined functions
1806 public class Xcls_addprojectbutton : Object
1808 public Clutter.Actor el;
1809 private Xcls_MainWindow _this;
1815 public Xcls_addprojectbutton(Xcls_MainWindow _owner )
1818 _this.addprojectbutton = this;
1819 this.el = new Clutter.Actor();
1823 // set gobject values
1824 var child_0 = new Xcls_Actor55( _this );
1826 this.el.add_child ( child_0.el );
1830 this.el.set_size(50.0f,50.0f);
1833 // user defined functions
1835 public class Xcls_Actor55 : Object
1837 public GtkClutter.Actor el;
1838 private Xcls_MainWindow _this;
1844 public Xcls_Actor55(Xcls_MainWindow _owner )
1847 this.el = new GtkClutter.Actor();
1851 // set gobject values
1852 var child_0 = new Xcls_Button56( _this );
1857 ((Gtk.Container)(this.el.get_widget())).add ( child_0.el);
1860 // user defined functions
1862 public class Xcls_Button56 : Object
1864 public Gtk.Button el;
1865 private Xcls_MainWindow _this;
1871 public Xcls_Button56(Xcls_MainWindow _owner )
1874 this.el = new Gtk.Button();
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 );
1884 this.el.set_image ( child_0.el );
1887 this.el.clicked.connect( ( ) => {
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);
1902 _this.windowstate.left_projects.is_loaded = false;
1903 _this.windowstate.left_projects.load();
1904 _this.windowstate.left_projects.selectProject(p);
1911 // user defined functions
1913 public class Xcls_Image57 : Object
1915 public Gtk.Image el;
1916 private Xcls_MainWindow _this;
1922 public Xcls_Image57(Xcls_MainWindow _owner )
1925 this.el = new Gtk.Image();
1929 // set gobject values
1930 this.el.icon_name = "folder-new";
1933 // user defined functions
1939 public class Xcls_addfilebutton : Object
1941 public Clutter.Actor el;
1942 private Xcls_MainWindow _this;
1948 public Xcls_addfilebutton(Xcls_MainWindow _owner )
1951 _this.addfilebutton = this;
1952 this.el = new Clutter.Actor();
1956 // set gobject values
1957 var child_0 = new Xcls_Actor59( _this );
1959 this.el.add_child ( child_0.el );
1963 this.el.set_size(50.0f,50.0f);
1966 // user defined functions
1968 public class Xcls_Actor59 : Object
1970 public GtkClutter.Actor el;
1971 private Xcls_MainWindow _this;
1977 public Xcls_Actor59(Xcls_MainWindow _owner )
1980 this.el = new GtkClutter.Actor();
1984 // set gobject values
1985 var child_0 = new Xcls_Button60( _this );
1990 ((Gtk.Container)(this.el.get_widget())).add ( child_0.el);
1993 // user defined functions
1995 public class Xcls_Button60 : Object
1997 public Gtk.Button el;
1998 private Xcls_MainWindow _this;
2004 public Xcls_Button60(Xcls_MainWindow _owner )
2007 this.el = new Gtk.Button();
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 );
2017 this.el.set_image ( child_0.el );
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();
2027 print("no project selected?\n");
2031 print("creating file?");
2033 var f = JsRender.JsRender.factory(proj.xtype, proj, "");
2034 _this.project = proj;
2035 print("showing popup?");
2036 _this.windowstate.file_details.show(
2045 // user defined functions
2047 public class Xcls_Image61 : Object
2049 public Gtk.Image el;
2050 private Xcls_MainWindow _this;
2056 public Xcls_Image61(Xcls_MainWindow _owner )
2059 this.el = new Gtk.Image();
2063 // set gobject values
2064 this.el.icon_name = "document-new";
2067 // user defined functions
2073 public class Xcls_delprojectbutton : Object
2075 public Clutter.Actor el;
2076 private Xcls_MainWindow _this;
2082 public Xcls_delprojectbutton(Xcls_MainWindow _owner )
2085 _this.delprojectbutton = this;
2086 this.el = new Clutter.Actor();
2090 // set gobject values
2091 var child_0 = new Xcls_Actor63( _this );
2093 this.el.add_child ( child_0.el );
2097 this.el.set_size(50,50);
2100 // user defined functions
2102 public class Xcls_Actor63 : Object
2104 public GtkClutter.Actor el;
2105 private Xcls_MainWindow _this;
2111 public Xcls_Actor63(Xcls_MainWindow _owner )
2114 this.el = new GtkClutter.Actor();
2118 // set gobject values
2119 var child_0 = new Xcls_Button64( _this );
2124 ((Gtk.Container)(this.el.get_widget())).add ( child_0.el);
2127 // user defined functions
2129 public class Xcls_Button64 : Object
2131 public Gtk.Button el;
2132 private Xcls_MainWindow _this;
2138 public Xcls_Button64(Xcls_MainWindow _owner )
2141 this.el = new Gtk.Button();
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 );
2151 this.el.set_image ( child_0.el );
2154 this.el.clicked.connect( ( ) => {
2156 var cd = DialogConfirm.singleton();
2157 cd.el.set_transient_for(_this.el);
2158 cd.el.set_modal(true);
2160 var project = _this.windowstate.left_projects.getSelectedProject();
2161 if (project == null) {
2162 print("SKIP - no project\n");
2167 if (Gtk.ResponseType.YES != cd.show("Confirm",
2168 "Are you sure you want to delete project %s".printf(project.name))) {
2174 Project.Project.remove(project);
2175 _this.project = null;
2177 _this.windowstate.left_projects.is_loaded = false;
2178 _this.windowstate.left_projects.load();
2179 _this.windowstate.clutterfiles.clearFiles();
2184 // user defined functions
2186 public class Xcls_Image65 : Object
2188 public Gtk.Image el;
2189 private Xcls_MainWindow _this;
2195 public Xcls_Image65(Xcls_MainWindow _owner )
2198 this.el = new Gtk.Image();
2202 // set gobject values
2203 this.el.icon_name = "user-trash";
2206 // user defined functions
2216 public class Xcls_Box66 : Object
2219 private Xcls_MainWindow _this;
2225 public Xcls_Box66(Xcls_MainWindow _owner )
2228 this.el = new Gtk.Box( Gtk.Orientation.HORIZONTAL, 0 );
2232 // set gobject values
2233 this.el.homogeneous = false;
2234 var child_0 = new Xcls_Label67( _this );
2236 this.el.pack_start ( child_0.el , true,true,0 );
2237 var child_1 = new Xcls_statusbar( _this );
2239 this.el.pack_start ( child_1.el , true,true,0 );
2240 var child_2 = new Xcls_search_entry( _this );
2242 this.el.pack_start ( child_2.el , false,true,0 );
2243 var child_3 = new Xcls_MenuBar70( _this );
2245 this.el.pack_end ( child_3.el , false,true,0 );
2248 // user defined functions
2250 public class Xcls_Label67 : Object
2252 public Gtk.Label el;
2253 private Xcls_MainWindow _this;
2259 public Xcls_Label67(Xcls_MainWindow _owner )
2262 this.el = new Gtk.Label( " " );
2266 // set gobject values
2269 // user defined functions
2272 public class Xcls_statusbar : Object
2274 public Gtk.ProgressBar el;
2275 private Xcls_MainWindow _this;
2279 public ulong handler_id;
2282 public Xcls_statusbar(Xcls_MainWindow _owner )
2285 _this.statusbar = this;
2286 this.el = new Gtk.ProgressBar();
2289 this.handler_id = -1;
2291 // set gobject values
2292 this.el.show_text = true;
2297 this.handler_id = Resources.singleton().updateProgress.connect((pos,total) => {
2300 _this.mainpane.el.set_sensitive(true);
2304 _this.mainpane.el.set_sensitive(false);
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()));
2313 // user defined functions
2316 public class Xcls_search_entry : Object
2318 public Gtk.Entry el;
2319 private Xcls_MainWindow _this;
2325 public Xcls_search_entry(Xcls_MainWindow _owner )
2328 _this.search_entry = this;
2329 this.el = new Gtk.Entry();
2333 // set gobject values
2337 var description = Pango.FontDescription.from_string("monospace");
2338 description.set_size(8000);
2339 this.el.override_font(description);
2342 this.el.changed.connect( () => {
2343 if (this.el.text == "") {
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);
2354 case WindowState.State.PREVIEW:
2355 if (_this.windowstate.file.xtype == "Gtk") {
2356 res = _this.windowstate.window_gladeview.search(this.el.text);
2363 _this.search_results.el.label = "%d Matches".printf(res.size);
2365 _this.search_results.el.label = "No Matches";
2373 // user defined functions
2376 public class Xcls_MenuBar70 : Object
2378 public Gtk.MenuBar el;
2379 private Xcls_MainWindow _this;
2385 public Xcls_MenuBar70(Xcls_MainWindow _owner )
2388 this.el = new Gtk.MenuBar();
2392 // set gobject values
2393 var child_0 = new Xcls_search_results( _this );
2395 this.el.add ( child_0.el );
2396 var child_1 = new Xcls_MenuItem73( _this );
2398 this.el.add ( child_1.el );
2399 var child_2 = new Xcls_statusbar_errors( _this );
2401 this.el.add ( child_2.el );
2402 var child_3 = new Xcls_statusbar_warnings( _this );
2404 this.el.add ( child_3.el );
2405 var child_4 = new Xcls_statusbar_depricated( _this );
2407 this.el.add ( child_4.el );
2408 var child_5 = new Xcls_statusbar_run( _this );
2410 this.el.add ( child_5.el );
2413 // user defined functions
2415 public class Xcls_search_results : Object
2417 public Gtk.ImageMenuItem el;
2418 private Xcls_MainWindow _this;
2422 public Xcls_ValaCompileErrors popup;
2425 public Xcls_search_results(Xcls_MainWindow _owner )
2428 _this.search_results = this;
2429 this.el = new Gtk.ImageMenuItem();
2433 // set gobject values
2434 this.el.always_show_image = true;
2435 this.el.label = "Matches";
2436 var child_0 = new Xcls_Image72( _this );
2438 this.el.set_image ( child_0.el );
2441 this.el.button_press_event.connect( () => {
2443 if (this.popup == null) {
2444 this.popup = new Xcls_ValaCompileErrors();
2445 this.popup.window = _this;
2449 this.popup.show(this.notices, this.el);
2455 // user defined functions
2457 public class Xcls_Image72 : Object
2459 public Gtk.Image el;
2460 private Xcls_MainWindow _this;
2466 public Xcls_Image72(Xcls_MainWindow _owner )
2469 this.el = new Gtk.Image();
2473 // set gobject values
2474 this.el.icon_name = "system-search";
2475 this.el.sensitive = false;
2478 // user defined functions
2482 public class Xcls_MenuItem73 : Object
2484 public Gtk.MenuItem el;
2485 private Xcls_MainWindow _this;
2491 public Xcls_MenuItem73(Xcls_MainWindow _owner )
2494 this.el = new Gtk.MenuItem();
2498 // set gobject values
2499 this.el.label = "Compile Status:";
2502 // user defined functions
2505 public class Xcls_statusbar_errors : Object
2507 public Gtk.ImageMenuItem el;
2508 private Xcls_MainWindow _this;
2512 public Xcls_ValaCompileErrors popup;
2513 public Json.Object notices;
2516 public Xcls_statusbar_errors(Xcls_MainWindow _owner )
2519 _this.statusbar_errors = this;
2520 this.el = new Gtk.ImageMenuItem();
2523 this.notices = new Json.Object() ;
2525 // set gobject values
2526 this.el.always_show_image = true;
2527 this.el.label = "Errors";
2528 var child_0 = new Xcls_Image75( _this );
2530 this.el.set_image ( child_0.el );
2533 this.el.button_press_event.connect( () => {
2534 if (this.popup == null) {
2535 this.popup = new Xcls_ValaCompileErrors();
2536 this.popup.window = _this;
2540 this.popup.show(this.notices, this.el);
2545 // user defined functions
2546 public void setNotices (Json.Object nots, int qty) {
2548 this.el.label = qty.to_string() + " Errors";
2549 this.notices = nots;
2553 public class Xcls_Image75 : Object
2555 public Gtk.Image el;
2556 private Xcls_MainWindow _this;
2562 public Xcls_Image75(Xcls_MainWindow _owner )
2565 this.el = new Gtk.Image();
2569 // set gobject values
2570 this.el.icon_name = "dialog-error";
2573 // user defined functions
2577 public class Xcls_statusbar_warnings : Object
2579 public Gtk.ImageMenuItem el;
2580 private Xcls_MainWindow _this;
2584 public Xcls_ValaCompileErrors popup;
2585 public Json.Object notices;
2588 public Xcls_statusbar_warnings(Xcls_MainWindow _owner )
2591 _this.statusbar_warnings = this;
2592 this.el = new Gtk.ImageMenuItem();
2595 this.notices = new Json.Object();
2597 // set gobject values
2598 this.el.always_show_image = true;
2599 this.el.label = "Warnings";
2600 var child_0 = new Xcls_Image77( _this );
2602 this.el.set_image ( child_0.el );
2605 this.el.button_press_event.connect( () => {
2606 if (this.popup == null) {
2607 this.popup = new Xcls_ValaCompileErrors();
2608 this.popup.window = _this;
2611 this.popup.show(this.notices, this.el);
2616 // user defined functions
2617 public void setNotices (Json.Object nots, int qty) {
2619 this.el.label = qty.to_string() + " Warnings";
2620 this.notices = nots;
2624 public class Xcls_Image77 : Object
2626 public Gtk.Image el;
2627 private Xcls_MainWindow _this;
2633 public Xcls_Image77(Xcls_MainWindow _owner )
2636 this.el = new Gtk.Image();
2640 // set gobject values
2641 this.el.icon_name = "dialog-warning";
2644 // user defined functions
2648 public class Xcls_statusbar_depricated : Object
2650 public Gtk.ImageMenuItem el;
2651 private Xcls_MainWindow _this;
2655 public Xcls_ValaCompileErrors popup;
2656 public Json.Object notices;
2659 public Xcls_statusbar_depricated(Xcls_MainWindow _owner )
2662 _this.statusbar_depricated = this;
2663 this.el = new Gtk.ImageMenuItem();
2666 this.notices = new Json.Object();
2668 // set gobject values
2669 this.el.always_show_image = true;
2670 this.el.label = "Depricated";
2671 var child_0 = new Xcls_Image79( _this );
2673 this.el.set_image ( child_0.el );
2676 this.el.button_press_event.connect( () => {
2677 if (this.popup == null) {
2678 this.popup = new Xcls_ValaCompileErrors();
2679 this.popup.window = _this;
2683 this.popup.show(this.notices, this.el);
2688 // user defined functions
2689 public void setNotices (Json.Object nots, int qty) {
2691 this.el.label = qty.to_string() + " Depricated";
2692 this.notices = nots;
2696 public class Xcls_Image79 : Object
2698 public Gtk.Image el;
2699 private Xcls_MainWindow _this;
2705 public Xcls_Image79(Xcls_MainWindow _owner )
2708 this.el = new Gtk.Image();
2712 // set gobject values
2713 this.el.icon_name = "dialog-information";
2716 // user defined functions
2720 public class Xcls_statusbar_run : Object
2722 public Gtk.ImageMenuItem el;
2723 private Xcls_MainWindow _this;
2727 public Xcls_ValaCompileErrors popup;
2730 public Xcls_statusbar_run(Xcls_MainWindow _owner )
2733 _this.statusbar_run = this;
2734 this.el = new Gtk.ImageMenuItem();
2738 // set gobject values
2739 this.el.always_show_image = true;
2740 this.el.label = "Run";
2741 var child_0 = new Xcls_Image81( _this );
2743 this.el.set_image ( child_0.el );
2746 this.el.button_press_event.connect( () => {
2747 if (_this.windowstate.file == null) {
2750 _this.windowstate.valasource.spawnExecute(_this.windowstate.file);
2752 _this.windowstate.compile_results.show(this.el,true);
2758 // user defined functions
2760 public class Xcls_Image81 : Object
2762 public Gtk.Image el;
2763 private Xcls_MainWindow _this;
2769 public Xcls_Image81(Xcls_MainWindow _owner )
2772 this.el = new Gtk.Image();
2776 // set gobject values
2777 this.el.icon_name = "media-playback-start";
2780 // user defined functions