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_vbox vbox;
16 public Xcls_mainpane mainpane;
17 public Xcls_leftpane leftpane;
18 public Xcls_editpane editpane;
19 public Xcls_tree tree;
20 public Xcls_props props;
21 public Xcls_clutterembed clutterembed;
22 public Xcls_rooview rooview;
23 public Xcls_objectview objectview;
24 public Xcls_codeeditview codeeditview;
25 public Xcls_addpropsview addpropsview;
26 public Xcls_projecteditview projecteditview;
27 public Xcls_buttonlayout buttonlayout;
28 public Xcls_backbutton backbutton;
29 public Xcls_projectbutton projectbutton;
30 public Xcls_editfilebutton editfilebutton;
31 public Xcls_projecteditbutton projecteditbutton;
32 public Xcls_objectshowbutton objectshowbutton;
33 public Xcls_addpropbutton addpropbutton;
34 public Xcls_addlistenerbutton addlistenerbutton;
35 public Xcls_addprojectbutton addprojectbutton;
36 public Xcls_addfilebutton addfilebutton;
37 public Xcls_delprojectbutton delprojectbutton;
38 public Xcls_new_window new_window;
41 public int no_windows;
42 public Project.Project project;
43 public bool children_loaded;
44 public Xcls_WindowLeftProjects left_projects;
45 public Xcls_WindowRooView window_rooview;
46 public Xcls_WindowLeftTree left_tree;
47 public Editor code_editor;
48 public Xcls_DialogNewComponent new_file_dialog;
49 public WindowState windowstate;
50 public Xcls_ProjectSettings projectsettings;
51 public Xcls_ClutterFiles clutterfiles;
52 public Xcls_LeftProps left_props;
53 public Xcls_RightPalete rightpalete;
55 public ValaProjectSettings vala_projectsettings;
56 public Xcls_WindowAddProp add_props;
57 public Xcls_GtkView window_gladeview;
60 public Xcls_MainWindow()
63 this.el = new Gtk.Window( Gtk.WindowType.TOPLEVEL );
68 this.children_loaded = false;
69 this.left_projects = null;
70 this.window_rooview = null;
71 this.left_tree = null;
72 this.code_editor = null;
73 this.new_file_dialog = null;
74 this.windowstate = null;
75 this.projectsettings = null;
76 this.clutterfiles = null;
77 this.left_props = null;
78 this.rightpalete = null;
79 this.title = "Application Builder";
80 this.vala_projectsettings = null;
81 this.add_props = null;
82 this.window_gladeview = null;
85 this.el.border_width = 0;
86 this.el.default_height = 500;
87 this.el.default_width = 800;
88 var child_0 = new Xcls_vbox( _this );
90 this.el.add ( child_0.el );
98 this.el.delete_event.connect( ( event) => {
101 this.el.destroy.connect( () => {
102 Xcls_MainWindow.singleton().no_windows--;
104 if (Xcls_MainWindow.singleton().no_windows < 1) {
109 this.el.show.connect( ( ) => {
110 // hide the file editing..
112 //this.hideViewEditing();
116 // user defined functions
117 public void hideAddListener () {
118 _this.backbutton.el.hide();
119 _this.projectbutton.el.show();
120 _this.projecteditbutton.el.show();
121 _this.editfilebutton.el.show();
122 _this.addpropsview.el.save_easing_state();
123 var el = _this.rooview.el;
124 el.save_easing_state();
127 el.set_scale(1.0f,1.0f);
128 _this.addpropsview.el.set_scale(0.0f,0.0f);
129 _this.state = "edit";
132 //_this.clutterfiles.loadProject(_this.project);
134 el.restore_easing_state();
135 _this.addpropsview.el.restore_easing_state();
137 public void initChildren () {
138 // this needs putting in a better place..
139 this.windowstate = new WindowState(this);
143 var tl = new Clutter.Timeline(6000);
144 tl.set_repeat_count(-1);
148 this.children_loaded = true;
154 public void hideCodeEdit () {
155 //this.code_editor.saveContents();
156 _this.backbutton.el.hide();
158 _this.projectbutton.el.show();
159 _this.projecteditbutton.el.show();
160 _this.editfilebutton.el.show();
164 _this.codeeditview.el.save_easing_state();
165 var el = _this.rooview.el;
166 el.save_easing_state();
169 el.set_scale(1.0f,1.0f);
170 _this.codeeditview.el.set_scale(0.0f,0.0f);
171 _this.state = "edit";
174 //_this.clutterfiles.loadProject(_this.project);
176 el.restore_easing_state();
177 _this.codeeditview.el.restore_easing_state();
179 public void showAddProp () {
182 var ae = this.left_tree.getActiveElement();
186 _this.backbutton.el.show();
187 _this.projectbutton.el.hide();
188 _this.editfilebutton.el.hide();
189 _this.projecteditbutton.el.hide();
193 //this.rooview.el.hide();
194 this.add_props.el.show_all();
196 Palete.factory(this.project.xtype),
201 _this.addpropsview.el.save_easing_state();
203 var el = _this.rooview.el;
204 el.save_easing_state();
205 _this.clutterembed.setSizesAlloc("addprop");
209 _this.addpropsview.el.set_scale(1.0f,1.0f);
213 //_this.clutterfiles.loadProject(_this.project);
215 el.restore_easing_state();
216 _this.addpropsview.el.restore_easing_state();
217 this.state = "addprop";
219 public void showViewEditing ( ) {
220 this.editpane.el.show();
221 // this.rooview.el.show();
222 this.left_projects.el.hide();
224 _this.addprojectbutton.el.hide();
225 _this.delprojectbutton.el.hide();
226 _this.addfilebutton.el.hide();
227 _this.backbutton.el.hide();
228 _this.new_window.el.hide();
231 _this.projectbutton.el.show();
232 _this.editfilebutton.el.show();
233 _this.projecteditbutton.el.show();
234 _this.objectshowbutton.el.show();
235 _this.addpropbutton.el.show();
236 _this.addlistenerbutton.el.show();
239 var el = _this.rooview.el;
240 el.save_easing_state();
243 el.set_rotation_angle(Clutter.RotateAxis.Y_AXIS, 0.0f);
244 el.set_scale(1.0f,1.0f);
245 _this.state = "edit";
246 // _this.mainpane.el.set_position(_this.leftpane.lastWidth);
247 _this.clutterfiles.el.hide();
249 el.restore_easing_state();
251 print("show view editing");
253 public void hideProjectEdit () {
254 // return to editing state..
256 _this.projectbutton.el.show();
257 _this.projecteditbutton.el.show();
258 _this.backbutton.el.hide();
259 _this.editfilebutton.el.show();
262 if (this.project.xtype == "Roo") {
264 //this.projectsettings.show(this.project);
267 this.vala_projectsettings.project.writeConfig();
269 _this.projecteditview.el.save_easing_state();
270 var el = _this.rooview.el;
271 el.save_easing_state();
274 el.set_scale(1.0f,1.0f);
275 _this.projecteditview.el.set_scale(1.0f,0.0f);
276 _this.state = "edit";
279 //_this.clutterfiles.loadProject(_this.project);
281 el.restore_easing_state();
282 _this.projecteditview.el.restore_easing_state();
285 public void showProjectEdit () {
286 // make the browser smaller, and show the edit dialog
289 _this.projectbutton.el.hide();
290 _this.projecteditbutton.el.hide();
291 _this.editfilebutton.el.hide();
293 _this.backbutton.el.show();
295 //this.rooview.el.hide();
298 if (this.project.xtype == "Roo") {
299 this.projectsettings.el.show_all();
300 this.projectsettings.show(this.project);
302 this.vala_projectsettings.el.show_all();
303 this.vala_projectsettings.show((Project.Gtk)this.project);
305 _this.projecteditview.el.save_easing_state();
307 var el = _this.rooview.el;
308 el.save_easing_state();
311 el.set_scale(0.5f,0.5f);
313 _this.projecteditview.el.set_scale(1.0f,1.0f);
315 _this.state = "projectedit";
318 //_this.clutterfiles.loadProject(_this.project);
320 el.restore_easing_state();
321 _this.projecteditview.el.restore_easing_state();
322 // print("show view browsing");
325 public void showAddListener () {
329 var ae = this.left_tree.getActiveElement();
334 _this.backbutton.el.show();
335 _this.projectbutton.el.hide();
336 _this.editfilebutton.el.hide();
337 _this.projecteditbutton.el.hide();
340 //this.rooview.el.hide();
341 this.add_props.el.show_all();
343 Palete.factory(this.project.xtype),
347 //this.rightpalete.show(this.project);
349 _this.addpropsview.el.save_easing_state();
351 var el = _this.rooview.el;
352 el.save_easing_state();
354 _this.clutterembed.setSizesAlloc("addlistener");
359 _this.addpropsview.el.set_scale(1.0f,1.0f);
363 //_this.clutterfiles.loadProject(_this.project);
365 el.restore_easing_state();
366 _this.addpropsview.el.restore_easing_state();
367 this.state = "addlistener";
369 public void hideAddProp () {
370 _this.backbutton.el.hide();
371 _this.projectbutton.el.show();
372 _this.projecteditbutton.el.show();
373 _this.editfilebutton.el.show();
374 _this.addpropsview.el.save_easing_state();
376 var el = _this.rooview.el;
377 el.save_easing_state();
380 el.set_scale(1.0f,1.0f);
381 _this.addpropsview.el.set_scale(0.0f,0.0f);
382 _this.state = "edit";
385 //_this.clutterfiles.loadProject(_this.project);
387 el.restore_easing_state();
388 _this.addpropsview.el.restore_easing_state();
390 public void showCodeEdit (JsRender.JsRender file, JsRender.Node node, string ptype, string key)
392 // this is a bit different,
393 // it's not called via a button - but triggered by the prop edit class signal.
394 // so it has to hide any other state..
404 this.hideAddListener();
408 _this.backbutton.el.show();
410 _this.projectbutton.el.hide();
411 _this.editfilebutton.el.hide();
412 _this.projecteditbutton.el.hide();
415 //this.rooview.el.hide();
416 this.code_editor.el.show_all();
417 this.code_editor.show(
424 _this.codeeditview.el.save_easing_state();
426 var el = _this.rooview.el;
427 el.save_easing_state();
428 _this.clutterembed.setSizesAlloc("codedit");
430 _this.codeeditview.el.set_scale(1.0f,1.0f);
434 //_this.clutterfiles.loadProject(_this.project);
436 el.restore_easing_state();
437 _this.codeeditview.el.restore_easing_state();
438 this.state = "codeedit";
440 public void setTitle (string str) {
441 this.el.set_title(this.title + " - " + str);
443 public void show () {
444 this.left_tree =new Xcls_WindowLeftTree();
445 _this.vbox.el.pack_start(this.left_tree.el,true, true,0);
449 public void hideViewEditing ( ) {
451 // show the file navigation...
452 this.windowstate.set(WindowState.State.FILES);
455 public void showObject () {
458 // what's the active node on the left hand side..
460 var n = _this.left_tree.getActiveElement();
462 if (_this.left_tree.model.file == null) {
466 if (n == null && _this.left_tree.model.file.tree != null) {
470 _this.backbutton.el.show();
471 _this.projectbutton.el.hide();
472 _this.editfilebutton.el.hide();
473 _this.projecteditbutton.el.hide();
476 //this.rooview.el.hide();
477 this.rightpalete.el.show_all();
478 this.rightpalete.load(_this.left_tree.getActiveFile().palete(), n == null ? "*top" : n.fqn());
481 //this.rightpalete.show(this.project);
483 _this.objectview.el.save_easing_state();
485 var el = _this.rooview.el;
486 el.save_easing_state();
488 _this.clutterembed.setSizesAlloc("object");
491 _this.objectview.el.set_scale(1.0f,1.0f);
495 //_this.clutterfiles.loadProject(_this.project);
497 el.restore_easing_state();
498 _this.objectview.el.restore_easing_state();
499 this.state = "object";
501 public void hideObject () {
502 // return to editing state..
504 _this.projecteditbutton.el.show();
505 _this.backbutton.el.hide();
506 _this.projectbutton.el.show();
507 _this.editfilebutton.el.show();
508 _this.objectview.el.save_easing_state();
509 var el = _this.rooview.el;
510 el.save_easing_state();
513 el.set_scale(1.0f,1.0f);
514 _this.objectview.el.set_scale(0.0f,0.0f);
515 _this.state = "edit";
518 //_this.clutterfiles.loadProject(_this.project);
520 el.restore_easing_state();
521 _this.objectview.el.restore_easing_state();
525 public class Xcls_vbox : Object
528 private Xcls_MainWindow _this;
534 public Xcls_vbox(Xcls_MainWindow _owner )
538 this.el = new Gtk.VBox( false, 0 );
542 // set gobject values
543 var child_0 = new Xcls_mainpane( _this );
545 this.el.pack_end ( child_0.el , true,true,0 );
548 // user defined functions
550 public class Xcls_mainpane : Object
552 public Gtk.HPaned el;
553 private Xcls_MainWindow _this;
557 public int lastWidth;
560 public Xcls_mainpane(Xcls_MainWindow _owner )
563 _this.mainpane = this;
564 this.el = new Gtk.HPaned();
569 // set gobject values
570 this.el.position = 400;
571 var child_0 = new Xcls_leftpane( _this );
573 this.el.add1 ( child_0.el );
574 var child_1 = new Xcls_VBox8( _this );
576 this.el.add2 ( child_1.el );
579 // user defined functions
581 public class Xcls_leftpane : Object
584 private Xcls_MainWindow _this;
590 public Xcls_leftpane(Xcls_MainWindow _owner )
593 _this.leftpane = this;
594 this.el = new Gtk.VBox( true, 0 );
598 // set gobject values
599 var child_0 = new Xcls_editpane( _this );
601 this.el.pack_start ( child_0.el , false,true,0 );
604 // user defined functions
606 public class Xcls_editpane : Object
608 public Gtk.VPaned el;
609 private Xcls_MainWindow _this;
615 public Xcls_editpane(Xcls_MainWindow _owner )
618 _this.editpane = this;
619 this.el = new Gtk.VPaned();
623 // set gobject values
624 var child_0 = new Xcls_tree( _this );
626 this.el.add1 ( child_0.el );
627 var child_1 = new Xcls_props( _this );
629 this.el.add2 ( child_1.el );
632 // user defined functions
634 public class Xcls_tree : Object
637 private Xcls_MainWindow _this;
643 public Xcls_tree(Xcls_MainWindow _owner )
647 this.el = new Gtk.VBox( true, 0 );
651 // set gobject values
654 // user defined functions
656 public class Xcls_props : Object
659 private Xcls_MainWindow _this;
665 public Xcls_props(Xcls_MainWindow _owner )
669 this.el = new Gtk.VBox( true, 0 );
673 // set gobject values
676 // user defined functions
678 public class Xcls_VBox8 : Object
681 private Xcls_MainWindow _this;
687 public Xcls_VBox8(Xcls_MainWindow _owner )
690 this.el = new Gtk.VBox( true, 0 );
694 // set gobject values
695 var child_0 = new Xcls_clutterembed( _this );
697 this.el.pack_start ( child_0.el , true,true,0 );
700 // user defined functions
702 public class Xcls_clutterembed : Object
704 public GtkClutter.Embed el;
705 private Xcls_MainWindow _this;
711 public Xcls_clutterembed(Xcls_MainWindow _owner )
714 _this.clutterembed = this;
715 this.el = new GtkClutter.Embed();
719 // set gobject values
720 var child_0 = new Xcls_rooview( _this );
722 this.el.get_stage().add_child ( child_0.el );
723 var child_1 = new Xcls_objectview( _this );
725 this.el.get_stage().add_child ( child_1.el );
726 var child_2 = new Xcls_codeeditview( _this );
728 this.el.get_stage().add_child ( child_2.el );
729 var child_3 = new Xcls_addpropsview( _this );
731 this.el.get_stage().add_child ( child_3.el );
732 var child_4 = new Xcls_projecteditview( _this );
734 this.el.get_stage().add_child ( child_4.el );
735 var child_5 = new Xcls_buttonlayout( _this );
737 this.el.get_stage().add_child ( child_5.el );
741 var stage = this.el.get_stage();
742 stage.set_background_color( Clutter.Color.from_string("#000"));
744 this.el.size_allocate.connect( ( alloc) => {
745 this.windowstate.resizeCanvasElements(alloc);
750 // user defined functions
752 public class Xcls_rooview : Object
754 public GtkClutter.Actor el;
755 private Xcls_MainWindow _this;
761 public Xcls_rooview(Xcls_MainWindow _owner )
764 _this.rooview = this;
765 this.el = new GtkClutter.Actor();
769 // set gobject values
776 this.el.add_constraint(
777 new Clutter.AlignConstraint(
778 _this.clutterembed.el.get_stage(),
779 Clutter.AlignAxis.X_AXIS,
784 //this.el.set_position(100,100);
785 this.el.set_pivot_point(1.0f,1.0f);
787 this.el.set_size(_this.clutterembed.el.get_stage().width-50,
788 _this.clutterembed.el.get_stage().height);
792 // user defined functions
794 public class Xcls_objectview : Object
796 public GtkClutter.Actor el;
797 private Xcls_MainWindow _this;
803 public Xcls_objectview(Xcls_MainWindow _owner )
806 _this.objectview = this;
807 this.el = new GtkClutter.Actor();
811 // set gobject values
818 this.el.add_constraint(
819 new Clutter.AlignConstraint(
820 _this.clutterembed.el.get_stage(),
821 Clutter.AlignAxis.X_AXIS,
826 this.el.fixed_x = 50.0f;
827 this.el.fixed_y = 0.0f;
828 //this.el.set_position(100,100);
829 this.el.set_pivot_point(0.0f,0.0f);
830 this.el.set_scale(0.0f,1.0f);
831 this.el.set_size((_this.clutterembed.el.get_stage().width-50)/2,
832 _this.clutterembed.el.get_stage().height);
836 // user defined functions
838 public class Xcls_codeeditview : Object
840 public GtkClutter.Actor el;
841 private Xcls_MainWindow _this;
847 public Xcls_codeeditview(Xcls_MainWindow _owner )
850 _this.codeeditview = this;
851 this.el = new GtkClutter.Actor();
855 // set gobject values
862 this.el.add_constraint(
863 new Clutter.AlignConstraint(
864 _this.clutterembed.el.get_stage(),
865 Clutter.AlignAxis.X_AXIS,
870 this.el.fixed_x = 50.0f;
871 this.el.fixed_y = 0.0f;
872 //this.el.set_position(100,100);
873 this.el.set_pivot_point(0.0f,0.0f);
874 this.el.set_scale(0.0f,1.0f);
875 this.el.set_size((_this.clutterembed.el.get_stage().width-50)/2,
876 _this.clutterembed.el.get_stage().height);
880 // user defined functions
882 public class Xcls_addpropsview : Object
884 public GtkClutter.Actor el;
885 private Xcls_MainWindow _this;
891 public Xcls_addpropsview(Xcls_MainWindow _owner )
894 _this.addpropsview = this;
895 this.el = new GtkClutter.Actor();
899 // set gobject values
906 this.el.add_constraint(
907 new Clutter.AlignConstraint(
908 _this.clutterembed.el.get_stage(),
909 Clutter.AlignAxis.X_AXIS,
914 this.el.fixed_x = 50.0f;
915 this.el.fixed_y = 0.0f;
916 //this.el.set_position(100,100);
917 this.el.set_pivot_point(0.0f,0.0f);
918 this.el.set_scale(0.0f,1.0f);
919 this.el.set_size((_this.clutterembed.el.get_stage().width-50)/2,
920 _this.clutterembed.el.get_stage().height);
924 // user defined functions
926 public class Xcls_projecteditview : Object
928 public GtkClutter.Actor el;
929 private Xcls_MainWindow _this;
935 public Xcls_projecteditview(Xcls_MainWindow _owner )
938 _this.projecteditview = this;
939 this.el = new GtkClutter.Actor();
943 // set gobject values
950 this.el.add_constraint(
951 new Clutter.AlignConstraint(
952 _this.clutterembed.el.get_stage(),
953 Clutter.AlignAxis.X_AXIS,
958 //this.el.set_position(100,100);
959 this.el.set_pivot_point(0.0f,0.0f);
960 this.el.set_scale(1.0f,0.0f);
961 this.el.set_size(_this.clutterembed.el.get_stage().width-50,
962 _this.clutterembed.el.get_stage().height /2);
966 // user defined functions
968 public class Xcls_buttonlayout : Object
970 public Clutter.Actor el;
971 private Xcls_MainWindow _this;
977 public Xcls_buttonlayout(Xcls_MainWindow _owner )
980 _this.buttonlayout = this;
981 this.el = new Clutter.Actor();
985 // set gobject values
986 var child_0 = new Xcls_BoxLayout16( _this );
988 this.el.layout_manager = child_0.el;
989 var child_1 = new Xcls_backbutton( _this );
991 this.el.add_child ( child_1.el );
992 var child_2 = new Xcls_projectbutton( _this );
994 this.el.add_child ( child_2.el );
995 var child_3 = new Xcls_editfilebutton( _this );
997 this.el.add_child ( child_3.el );
998 var child_4 = new Xcls_projecteditbutton( _this );
1000 this.el.add_child ( child_4.el );
1001 var child_5 = new Xcls_objectshowbutton( _this );
1003 this.el.add_child ( child_5.el );
1004 var child_6 = new Xcls_addpropbutton( _this );
1006 this.el.add_child ( child_6.el );
1007 var child_7 = new Xcls_addlistenerbutton( _this );
1009 this.el.add_child ( child_7.el );
1010 var child_8 = new Xcls_addprojectbutton( _this );
1012 this.el.add_child ( child_8.el );
1013 var child_9 = new Xcls_addfilebutton( _this );
1015 this.el.add_child ( child_9.el );
1016 var child_10 = new Xcls_delprojectbutton( _this );
1018 this.el.add_child ( child_10.el );
1019 var child_11 = new Xcls_new_window( _this );
1021 this.el.add_child ( child_11.el );
1027 this.el.add_constraint(
1028 new Clutter.AlignConstraint(
1029 _this.clutterembed.el.get_stage(),
1030 Clutter.AlignAxis.X_AXIS,
1036 //this.el.set_position(100,100);
1037 this.el.set_pivot_point(0.5f,0.5f);
1038 this.el.set_size(50,
1039 _this.clutterembed.el.get_stage().height);
1043 // user defined functions
1045 public class Xcls_BoxLayout16 : Object
1047 public Clutter.BoxLayout el;
1048 private Xcls_MainWindow _this;
1054 public Xcls_BoxLayout16(Xcls_MainWindow _owner )
1057 this.el = new Clutter.BoxLayout();
1061 // set gobject values
1062 this.el.orientation = Clutter.Orientation.VERTICAL;
1065 // user defined functions
1067 public class Xcls_backbutton : Object
1069 public Clutter.Actor el;
1070 private Xcls_MainWindow _this;
1076 public Xcls_backbutton(Xcls_MainWindow _owner )
1079 _this.backbutton = this;
1080 this.el = new Clutter.Actor();
1084 // set gobject values
1085 var child_0 = new Xcls_Actor18( _this );
1087 this.el.add_child ( child_0.el );
1091 this.el.set_size(50,50); }
1093 // user defined functions
1095 public class Xcls_Actor18 : Object
1097 public GtkClutter.Actor el;
1098 private Xcls_MainWindow _this;
1104 public Xcls_Actor18(Xcls_MainWindow _owner )
1107 this.el = new GtkClutter.Actor();
1111 // set gobject values
1112 var child_0 = new Xcls_Button19( _this );
1117 ((Gtk.Container)(this.el.get_widget())).add ( child_0.el); }
1119 // user defined functions
1121 public class Xcls_Button19 : Object
1123 public Gtk.Button el;
1124 private Xcls_MainWindow _this;
1130 public Xcls_Button19(Xcls_MainWindow _owner )
1133 this.el = new Gtk.Button();
1137 // set gobject values
1138 this.el.width_request = 50;
1139 this.el.height_request = 50;
1140 this.el.tooltip_text = "Back";
1141 var child_0 = new Xcls_Image20( _this );
1143 this.el.set_image ( child_0.el );
1146 this.el.clicked.connect( ( ) => {
1148 this.windowstate.switchState(WindowState.State.PREVIEW);
1154 // user defined functions
1156 public class Xcls_Image20 : Object
1158 public Gtk.Image el;
1159 private Xcls_MainWindow _this;
1165 public Xcls_Image20(Xcls_MainWindow _owner )
1168 this.el = new Gtk.Image();
1172 // set gobject values
1173 this.el.icon_name = "go-previous";
1176 // user defined functions
1178 public class Xcls_projectbutton : Object
1180 public Clutter.Actor el;
1181 private Xcls_MainWindow _this;
1187 public Xcls_projectbutton(Xcls_MainWindow _owner )
1190 _this.projectbutton = this;
1191 this.el = new Clutter.Actor();
1195 // set gobject values
1196 var child_0 = new Xcls_Actor22( _this );
1198 this.el.add_child ( child_0.el );
1202 this.el.set_size(50,50); }
1204 // user defined functions
1206 public class Xcls_Actor22 : Object
1208 public GtkClutter.Actor el;
1209 private Xcls_MainWindow _this;
1215 public Xcls_Actor22(Xcls_MainWindow _owner )
1218 this.el = new GtkClutter.Actor();
1222 // set gobject values
1223 var child_0 = new Xcls_Button23( _this );
1228 ((Gtk.Container)(this.el.get_widget())).add ( child_0.el); }
1230 // user defined functions
1232 public class Xcls_Button23 : Object
1234 public Gtk.Button el;
1235 private Xcls_MainWindow _this;
1241 public Xcls_Button23(Xcls_MainWindow _owner )
1244 this.el = new Gtk.Button();
1248 // set gobject values
1249 this.el.width_request = 50;
1250 this.el.height_request = 50;
1251 var child_0 = new Xcls_Image24( _this );
1253 this.el.set_image ( child_0.el );
1256 this.el.clicked.connect( ( ) => {
1257 this.windowstate.switchState(WindowState.State.PROJECT);
1263 // user defined functions
1265 public class Xcls_Image24 : Object
1267 public Gtk.Image el;
1268 private Xcls_MainWindow _this;
1274 public Xcls_Image24(Xcls_MainWindow _owner )
1277 this.el = new Gtk.Image();
1281 // set gobject values
1282 this.el.icon_name = "document-open";
1285 // user defined functions
1287 public class Xcls_editfilebutton : Object
1289 public Clutter.Actor el;
1290 private Xcls_MainWindow _this;
1296 public Xcls_editfilebutton(Xcls_MainWindow _owner )
1299 _this.editfilebutton = this;
1300 this.el = new Clutter.Actor();
1304 // set gobject values
1305 var child_0 = new Xcls_Actor26( _this );
1307 this.el.add_child ( child_0.el );
1311 this.el.set_size(50.0f,50.0f); }
1313 // user defined functions
1315 public class Xcls_Actor26 : Object
1317 public GtkClutter.Actor el;
1318 private Xcls_MainWindow _this;
1324 public Xcls_Actor26(Xcls_MainWindow _owner )
1327 this.el = new GtkClutter.Actor();
1331 // set gobject values
1332 var child_0 = new Xcls_Button27( _this );
1337 ((Gtk.Container)(this.el.get_widget())).add ( child_0.el); }
1339 // user defined functions
1341 public class Xcls_Button27 : Object
1343 public Gtk.Button el;
1344 private Xcls_MainWindow _this;
1350 public Xcls_Button27(Xcls_MainWindow _owner )
1353 this.el = new Gtk.Button();
1357 // set gobject values
1358 this.el.width_request = 50;
1359 this.el.height_request = 50;
1360 this.el.tooltip_text = "File Details";
1361 var child_0 = new Xcls_Image28( _this );
1363 this.el.set_image ( child_0.el );
1366 this.el.clicked.connect( ( ) => {
1368 // create a new file in project..
1369 if (_this.project == null || _this.left_tree.model.file == null) {
1372 this.windowstate.new_file_dialog.show(_this.left_tree.model.file);
1380 // user defined functions
1382 public class Xcls_Image28 : Object
1384 public Gtk.Image el;
1385 private Xcls_MainWindow _this;
1391 public Xcls_Image28(Xcls_MainWindow _owner )
1394 this.el = new Gtk.Image();
1398 // set gobject values
1399 this.el.icon_name = "document-properties";
1402 // user defined functions
1404 public class Xcls_projecteditbutton : Object
1406 public Clutter.Actor el;
1407 private Xcls_MainWindow _this;
1413 public Xcls_projecteditbutton(Xcls_MainWindow _owner )
1416 _this.projecteditbutton = this;
1417 this.el = new Clutter.Actor();
1421 // set gobject values
1422 var child_0 = new Xcls_Actor30( _this );
1424 this.el.add_child ( child_0.el );
1428 this.el.set_size(50,50); }
1430 // user defined functions
1432 public class Xcls_Actor30 : Object
1434 public GtkClutter.Actor el;
1435 private Xcls_MainWindow _this;
1441 public Xcls_Actor30(Xcls_MainWindow _owner )
1444 this.el = new GtkClutter.Actor();
1448 // set gobject values
1449 var child_0 = new Xcls_Button31( _this );
1454 ((Gtk.Container)(this.el.get_widget())).add ( child_0.el); }
1456 // user defined functions
1458 public class Xcls_Button31 : Object
1460 public Gtk.Button el;
1461 private Xcls_MainWindow _this;
1467 public Xcls_Button31(Xcls_MainWindow _owner )
1470 this.el = new Gtk.Button();
1474 // set gobject values
1475 this.el.width_request = 50;
1476 this.el.height_request = 50;
1477 this.el.tooltip_text = "Project Details";
1478 var child_0 = new Xcls_Image32( _this );
1480 this.el.set_image ( child_0.el );
1483 this.el.clicked.connect( ( ) => {
1484 switch (_this.state) {
1486 _this.showProjectEdit();
1489 // _this.showViewEditing();
1492 _this.hideProjectEdit();
1498 _this.hideAddProp();
1499 _this.showProjectEdit();
1502 _this.hideAddListener();
1503 _this.showProjectEdit();
1508 _this.showProjectEdit();
1519 // user defined functions
1521 public class Xcls_Image32 : Object
1523 public Gtk.Image el;
1524 private Xcls_MainWindow _this;
1530 public Xcls_Image32(Xcls_MainWindow _owner )
1533 this.el = new Gtk.Image();
1537 // set gobject values
1538 this.el.icon_name = "emblem-system";
1541 // user defined functions
1543 public class Xcls_objectshowbutton : Object
1545 public Clutter.Actor el;
1546 private Xcls_MainWindow _this;
1552 public Xcls_objectshowbutton(Xcls_MainWindow _owner )
1555 _this.objectshowbutton = this;
1556 this.el = new Clutter.Actor();
1560 // set gobject values
1561 var child_0 = new Xcls_Actor34( _this );
1563 this.el.add_child ( child_0.el );
1567 this.el.set_size(50,50);
1569 this.el.button_press_event.connect( ( ) => {
1573 switch (_this.state) {
1577 _this.hideAddProp();
1581 _this.hideAddListener();
1597 print("unhandled add objects from %s\n",_this.state);
1604 this.el.enter_event.connect( ( event) => {
1605 this.el.background_color = new Clutter.Color.from_string("#333");
1608 this.el.leave_event.connect( ( event) => {
1609 this.el.background_color = new Clutter.Color.from_string("#000");
1614 // user defined functions
1616 public class Xcls_Actor34 : Object
1618 public GtkClutter.Actor el;
1619 private Xcls_MainWindow _this;
1625 public Xcls_Actor34(Xcls_MainWindow _owner )
1628 this.el = new GtkClutter.Actor();
1632 // set gobject values
1633 var child_0 = new Xcls_Button35( _this );
1638 ((Gtk.Container)(this.el.get_widget())).add ( child_0.el); }
1640 // user defined functions
1642 public class Xcls_Button35 : Object
1644 public Gtk.Button el;
1645 private Xcls_MainWindow _this;
1651 public Xcls_Button35(Xcls_MainWindow _owner )
1654 this.el = new Gtk.Button();
1658 // set gobject values
1659 this.el.width_request = 50;
1660 this.el.height_request = 50;
1661 this.el.tooltip_text = "Add Child Element";
1662 var child_0 = new Xcls_Image36( _this );
1664 this.el.set_image ( child_0.el );
1667 this.el.clicked.connect( ( ) => {
1671 switch (_this.state) {
1675 _this.hideAddProp();
1679 _this.hideAddListener();
1695 print("unhandled add objects from %s\n",_this.state);
1704 // user defined functions
1706 public class Xcls_Image36 : Object
1708 public Gtk.Image el;
1709 private Xcls_MainWindow _this;
1715 public Xcls_Image36(Xcls_MainWindow _owner )
1718 this.el = new Gtk.Image();
1722 // set gobject values
1723 this.el.icon_name = "list-add";
1726 // user defined functions
1728 public class Xcls_addpropbutton : Object
1730 public Clutter.Actor el;
1731 private Xcls_MainWindow _this;
1737 public Xcls_addpropbutton(Xcls_MainWindow _owner )
1740 _this.addpropbutton = this;
1741 this.el = new Clutter.Actor();
1745 // set gobject values
1746 var child_0 = new Xcls_Actor38( _this );
1748 this.el.add_child ( child_0.el );
1752 this.el.set_size(50,50); }
1754 // user defined functions
1756 public class Xcls_Actor38 : Object
1758 public GtkClutter.Actor el;
1759 private Xcls_MainWindow _this;
1765 public Xcls_Actor38(Xcls_MainWindow _owner )
1768 this.el = new GtkClutter.Actor();
1772 // set gobject values
1773 var child_0 = new Xcls_Button39( _this );
1778 ((Gtk.Container)(this.el.get_widget())).add ( child_0.el); }
1780 // user defined functions
1782 public class Xcls_Button39 : Object
1784 public Gtk.Button el;
1785 private Xcls_MainWindow _this;
1791 public Xcls_Button39(Xcls_MainWindow _owner )
1794 this.el = new Gtk.Button();
1798 // set gobject values
1799 this.el.width_request = 50;
1800 this.el.height_request = 50;
1801 this.el.tooltip_text = "Add Property";
1802 var child_0 = new Xcls_Image40( _this );
1804 this.el.set_image ( child_0.el );
1807 this.el.clicked.connect( ( ) => {
1811 switch (_this.state) {
1813 _this.showAddProp();
1818 _this.showAddProp();
1822 _this.hideAddListener();
1823 _this.showAddProp();
1828 _this.hideAddProp();
1832 print("unhandled add property from %s\n",_this.state);
1842 // user defined functions
1844 public class Xcls_Image40 : Object
1846 public Gtk.Image el;
1847 private Xcls_MainWindow _this;
1853 public Xcls_Image40(Xcls_MainWindow _owner )
1856 this.el = new Gtk.Image();
1860 // set gobject values
1861 this.el.icon_name = "format-justify-left";
1864 // user defined functions
1866 public class Xcls_addlistenerbutton : Object
1868 public Clutter.Actor el;
1869 private Xcls_MainWindow _this;
1875 public Xcls_addlistenerbutton(Xcls_MainWindow _owner )
1878 _this.addlistenerbutton = this;
1879 this.el = new Clutter.Actor();
1883 // set gobject values
1884 var child_0 = new Xcls_Actor42( _this );
1886 this.el.add_child ( child_0.el );
1890 this.el.set_size(50,50); }
1892 // user defined functions
1894 public class Xcls_Actor42 : Object
1896 public GtkClutter.Actor el;
1897 private Xcls_MainWindow _this;
1903 public Xcls_Actor42(Xcls_MainWindow _owner )
1906 this.el = new GtkClutter.Actor();
1910 // set gobject values
1911 var child_0 = new Xcls_Button43( _this );
1916 ((Gtk.Container)(this.el.get_widget())).add ( child_0.el); }
1918 // user defined functions
1920 public class Xcls_Button43 : Object
1922 public Gtk.Button el;
1923 private Xcls_MainWindow _this;
1929 public Xcls_Button43(Xcls_MainWindow _owner )
1932 this.el = new Gtk.Button();
1936 // set gobject values
1937 this.el.width_request = 50;
1938 this.el.height_request = 50;
1939 this.el.tooltip_text = "Add Event Code";
1940 var child_0 = new Xcls_Image44( _this );
1942 this.el.set_image ( child_0.el );
1945 this.el.clicked.connect( ( ) => {
1949 switch (_this.state) {
1951 _this.showAddListener();
1956 _this.hideAddListener();
1961 _this.hideAddProp();
1962 _this.showAddListener();
1966 _this.showAddListener();
1970 print("unhandled add listener from %s\n",_this.state);
1981 // user defined functions
1983 public class Xcls_Image44 : Object
1985 public Gtk.Image el;
1986 private Xcls_MainWindow _this;
1992 public Xcls_Image44(Xcls_MainWindow _owner )
1995 this.el = new Gtk.Image();
1999 // set gobject values
2000 this.el.icon_name = "appointment-new";
2003 // user defined functions
2005 public class Xcls_addprojectbutton : Object
2007 public Clutter.Actor el;
2008 private Xcls_MainWindow _this;
2014 public Xcls_addprojectbutton(Xcls_MainWindow _owner )
2017 _this.addprojectbutton = this;
2018 this.el = new Clutter.Actor();
2022 // set gobject values
2023 var child_0 = new Xcls_Actor46( _this );
2025 this.el.add_child ( child_0.el );
2029 this.el.set_size(50.0f,50.0f); }
2031 // user defined functions
2033 public class Xcls_Actor46 : Object
2035 public GtkClutter.Actor el;
2036 private Xcls_MainWindow _this;
2042 public Xcls_Actor46(Xcls_MainWindow _owner )
2045 this.el = new GtkClutter.Actor();
2049 // set gobject values
2050 var child_0 = new Xcls_Button47( _this );
2055 ((Gtk.Container)(this.el.get_widget())).add ( child_0.el); }
2057 // user defined functions
2059 public class Xcls_Button47 : Object
2061 public Gtk.Button el;
2062 private Xcls_MainWindow _this;
2068 public Xcls_Button47(Xcls_MainWindow _owner )
2071 this.el = new Gtk.Button();
2075 // set gobject values
2076 this.el.width_request = 50;
2077 this.el.height_request = 50;
2078 this.el.tooltip_text = "New\nProj.";
2079 var child_0 = new Xcls_Image48( _this );
2081 this.el.set_image ( child_0.el );
2084 this.el.clicked.connect( ( ) => {
2086 // create a new file in project..
2087 //Xcls_DialogNewComponent.singleton().show(
2088 var pe = Xcls_EditProject.singleton();
2089 pe.el.set_transient_for(_this.el);
2090 pe.el.set_modal(true);
2097 _this.left_projects.is_loaded = false;
2098 _this.left_projects.load();
2099 _this.left_projects.selectProject(p);
2106 // user defined functions
2108 public class Xcls_Image48 : Object
2110 public Gtk.Image el;
2111 private Xcls_MainWindow _this;
2117 public Xcls_Image48(Xcls_MainWindow _owner )
2120 this.el = new Gtk.Image();
2124 // set gobject values
2125 this.el.icon_name = "folder-new";
2128 // user defined functions
2130 public class Xcls_addfilebutton : Object
2132 public Clutter.Actor el;
2133 private Xcls_MainWindow _this;
2139 public Xcls_addfilebutton(Xcls_MainWindow _owner )
2142 _this.addfilebutton = this;
2143 this.el = new Clutter.Actor();
2147 // set gobject values
2148 var child_0 = new Xcls_Actor50( _this );
2150 this.el.add_child ( child_0.el );
2154 this.el.set_size(50.0f,50.0f); }
2156 // user defined functions
2158 public class Xcls_Actor50 : Object
2160 public GtkClutter.Actor el;
2161 private Xcls_MainWindow _this;
2167 public Xcls_Actor50(Xcls_MainWindow _owner )
2170 this.el = new GtkClutter.Actor();
2174 // set gobject values
2175 var child_0 = new Xcls_Button51( _this );
2180 ((Gtk.Container)(this.el.get_widget())).add ( child_0.el); }
2182 // user defined functions
2184 public class Xcls_Button51 : Object
2186 public Gtk.Button el;
2187 private Xcls_MainWindow _this;
2193 public Xcls_Button51(Xcls_MainWindow _owner )
2196 this.el = new Gtk.Button();
2200 // set gobject values
2201 this.el.width_request = 50;
2202 this.el.height_request = 50;
2203 this.el.tooltip_text = "Add File";
2204 var child_0 = new Xcls_Image52( _this );
2206 this.el.set_image ( child_0.el );
2209 this.el.clicked.connect( () => {
2210 // create a new file in project..
2212 // what's the currently selected project...
2213 var proj = _this.left_projects.getSelectedProject();
2221 var f = JsRender.JsRender.factory(proj.xtype, proj, "");
2222 _this.project = proj;
2223 _this.new_file_dialog.show(f);
2229 // user defined functions
2231 public class Xcls_Image52 : Object
2233 public Gtk.Image el;
2234 private Xcls_MainWindow _this;
2240 public Xcls_Image52(Xcls_MainWindow _owner )
2243 this.el = new Gtk.Image();
2247 // set gobject values
2248 this.el.icon_name = "document-new";
2251 // user defined functions
2253 public class Xcls_delprojectbutton : Object
2255 public Clutter.Actor el;
2256 private Xcls_MainWindow _this;
2262 public Xcls_delprojectbutton(Xcls_MainWindow _owner )
2265 _this.delprojectbutton = this;
2266 this.el = new Clutter.Actor();
2270 // set gobject values
2271 var child_0 = new Xcls_Actor54( _this );
2273 this.el.add_child ( child_0.el );
2277 this.el.set_size(50,50); }
2279 // user defined functions
2281 public class Xcls_Actor54 : Object
2283 public GtkClutter.Actor el;
2284 private Xcls_MainWindow _this;
2290 public Xcls_Actor54(Xcls_MainWindow _owner )
2293 this.el = new GtkClutter.Actor();
2297 // set gobject values
2298 var child_0 = new Xcls_Button55( _this );
2303 ((Gtk.Container)(this.el.get_widget())).add ( child_0.el); }
2305 // user defined functions
2307 public class Xcls_Button55 : Object
2309 public Gtk.Button el;
2310 private Xcls_MainWindow _this;
2316 public Xcls_Button55(Xcls_MainWindow _owner )
2319 this.el = new Gtk.Button();
2323 // set gobject values
2324 this.el.width_request = 50;
2325 this.el.height_request = 50;
2326 this.el.tooltip_text = "Delelte Project";
2327 var child_0 = new Xcls_Image56( _this );
2329 this.el.set_image ( child_0.el );
2332 this.el.clicked.connect( ( ) => {
2334 var cd = DialogConfirm.singleton();
2335 cd.el.set_transient_for(_this.el);
2336 cd.el.set_modal(true);
2338 var project = _this.left_projects.getSelectedProject();
2339 if (project == null) {
2340 print("SKIP - no project\n");
2345 if (Gtk.ResponseType.YES != cd.show("Confirm",
2346 "Are you sure you want to delete project %s".printf(project.name))) {
2352 Project.Project.remove(project);
2353 _this.project = null;
2355 _this.left_projects.is_loaded = false;
2356 _this.left_projects.load();
2357 _this.clutterfiles.clearFiles();
2362 // user defined functions
2364 public class Xcls_Image56 : Object
2366 public Gtk.Image el;
2367 private Xcls_MainWindow _this;
2373 public Xcls_Image56(Xcls_MainWindow _owner )
2376 this.el = new Gtk.Image();
2380 // set gobject values
2381 this.el.icon_name = "user-trash";
2384 // user defined functions
2386 public class Xcls_new_window : Object
2388 public Clutter.Actor el;
2389 private Xcls_MainWindow _this;
2395 public Xcls_new_window(Xcls_MainWindow _owner )
2398 _this.new_window = this;
2399 this.el = new Clutter.Actor();
2403 // set gobject values
2404 var child_0 = new Xcls_Actor58( _this );
2406 this.el.add_child ( child_0.el );
2410 this.el.set_size(50,50); }
2412 // user defined functions
2414 public class Xcls_Actor58 : Object
2416 public GtkClutter.Actor el;
2417 private Xcls_MainWindow _this;
2423 public Xcls_Actor58(Xcls_MainWindow _owner )
2426 this.el = new GtkClutter.Actor();
2430 // set gobject values
2431 var child_0 = new Xcls_Button59( _this );
2436 ((Gtk.Container)(this.el.get_widget())).add ( child_0.el); }
2438 // user defined functions
2440 public class Xcls_Button59 : Object
2442 public Gtk.Button el;
2443 private Xcls_MainWindow _this;
2449 public Xcls_Button59(Xcls_MainWindow _owner )
2452 this.el = new Gtk.Button();
2456 // set gobject values
2457 this.el.width_request = 50;
2458 this.el.height_request = 50;
2459 this.el.tooltip_text = "Open New Window";
2460 var child_0 = new Xcls_Image60( _this );
2462 this.el.set_image ( child_0.el );
2465 this.el.clicked.connect( ( ) => {
2466 Xcls_MainWindow.singleton().no_windows++;
2467 var w = new Xcls_MainWindow();
2472 w.hideViewEditing();
2476 // user defined functions
2478 public class Xcls_Image60 : Object
2480 public Gtk.Image el;
2481 private Xcls_MainWindow _this;
2487 public Xcls_Image60(Xcls_MainWindow _owner )
2490 this.el = new Gtk.Image();
2494 // set gobject values
2495 this.el.icon_name = "window-new";
2498 // user defined functions