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 Xcls_ProjectSettings projectsettings;
50 public Xcls_ClutterFiles clutterfiles;
51 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.projectsettings = null;
75 this.clutterfiles = null;
76 this.left_props = null;
77 this.rightpalete = null;
78 this.title = "Application Builder";
79 this.vala_projectsettings = null;
80 this.add_props = null;
81 this.window_gladeview = null;
84 this.el.border_width = 0;
85 this.el.default_height = 500;
86 this.el.default_width = 800;
87 var child_0 = new Xcls_vbox( _this );
89 this.el.add ( child_0.el );
97 this.el.delete_event.connect( ( event) => {
100 this.el.destroy.connect( () => {
101 Xcls_MainWindow.singleton().no_windows--;
103 if (Xcls_MainWindow.singleton().no_windows < 1) {
108 this.el.show.connect( ( ) => {
109 // hide the file editing..
111 //this.hideViewEditing();
115 // user defined functions
116 public void hideAddListener () {
117 _this.backbutton.el.hide();
118 _this.projectbutton.el.show();
119 _this.projecteditbutton.el.show();
120 _this.editfilebutton.el.show();
121 _this.addpropsview.el.save_easing_state();
122 var el = _this.rooview.el;
123 el.save_easing_state();
126 el.set_scale(1.0f,1.0f);
127 _this.addpropsview.el.set_scale(0.0f,0.0f);
128 _this.state = "edit";
131 //_this.clutterfiles.loadProject(_this.project);
133 el.restore_easing_state();
134 _this.addpropsview.el.restore_easing_state();
136 public void initChildren () {
137 // this needs putting in a better place..
139 print("init children");
140 this.left_tree = new Xcls_WindowLeftTree();
141 this.left_tree.ref();
142 this.left_tree.main_window = _this;
143 this.tree.el.pack_start(this.left_tree.el,true, true,0);
144 this.left_tree.el.show_all();
146 this.left_tree.before_node_change.connect(() => {
147 if (this.state != "codeedit") {
148 this.left_props.finish_editing();
151 if (!this.code_editor.saveContents()) {
158 this.left_tree.node_selected.connect((sel) => {
160 print("node_selected called %s\n", (sel == null) ? "NULL" : "a value");
163 this.left_props.el.hide();
165 this.left_props.el.show();
166 this.left_props.load(this.left_tree.getActiveFile(), sel);
167 switch (this.state) {
171 this.rightpalete.clear();
174 this.rightpalete.load(_this.left_tree.getActiveFile().palete(), sel.fqn());
180 this.add_props.clear();
183 this.add_props.show(_this.left_tree.getActiveFile().palete(), "props", sel.fqn());
188 this.add_props.clear();
191 this.add_props.show(_this.left_tree.getActiveFile().palete(), "signals", sel.fqn());
205 this.left_tree.changed.connect(() => {
206 this.window_rooview.requestRedraw();
207 this.left_tree.model.file.save();
214 this.left_props =new Xcls_LeftProps();
215 this.left_props.ref();
216 this.left_props.main_window = _this;
217 this.props.el.pack_start(this.left_props.el,true, true,0);
218 this.left_props.el.show_all();
220 this.left_props.show_editor.connect( (file, node, type, key) => {
221 this.showCodeEdit(file, node, type, key);
223 this.left_props.stop_editor.connect( () => {
224 if (this.state != "codeedit") {
228 var ret = this.code_editor.saveContents();
235 this.left_props.changed.connect(() => {
236 if (this.left_tree.getActiveFile().xtype == "Roo" ) {
237 this.window_rooview.requestRedraw();
240 this.window_gladeview.loadFile(this.left_tree.getActiveFile());
242 this.left_tree.model.updateSelected();
243 this.left_tree.model.file.save();
250 this.left_projects = new Xcls_WindowLeftProjects();
251 this.left_projects.ref();
252 this.leftpane.el.pack_start(this.left_projects.el,true, true,0);
253 this.left_projects.el.show_all();
254 this.left_projects.project_selected.connect((proj) => {
256 _this.clutterfiles.loadProject(proj);
262 this.projectsettings =new Xcls_ProjectSettings();
263 this.projectsettings.ref(); /// really?
265 this.vala_projectsettings =new ValaProjectSettings();
266 this.vala_projectsettings.ref();
269 ((Gtk.Container)(this.projecteditview.el.get_widget())).add(this.projectsettings.el);
270 //this.projectsettings.el.show_all();
272 var stage = _this.projecteditview.el.get_stage();
273 stage.set_background_color( Clutter.Color.from_string("#000"));
275 this.projectsettings.buttonPressed.connect((btn) => {
276 if (this.left_tree.getActiveFile().xtype == "Roo" ) {
279 _this.window_rooview.view.renderJS(true);
281 if (btn == "apply") {
282 _this.window_rooview.view.renderJS(true);
286 // do nothing for gtk..
288 if (btn == "save" || btn == "apply") {
289 _this.project.save();
293 this.hideProjectEdit();
298 // objects (palate..)
299 this.rightpalete = new Xcls_RightPalete();
300 this.rightpalete.ref(); /// really?
301 ((Gtk.Container)(this.objectview.el.get_widget())).add(this.rightpalete.el);
302 //this.projectsettings.el.show_all();
304 stage = _this.objectview.el.get_stage();
305 stage.set_background_color( Clutter.Color.from_string("#000"));
307 /*this.projectsettings.buttonPressed.connect((btn) => {
309 _this.window_rooview.view.renderJS(true);
311 if (btn == "apply") {
312 _this.window_rooview.view.renderJS(true);
315 this.hideProjectEdit();
323 this.add_props = new Xcls_WindowAddProp();
324 this.add_props.ref(); /// really?
325 ((Gtk.Container)(this.addpropsview.el.get_widget())).add(this.add_props.el);
326 //this.projectsettings.el.show_all();
328 stage = _this.addpropsview.el.get_stage();
329 stage.set_background_color( Clutter.Color.from_string("#000"));
332 _this.add_props.select.connect( (key,type,skel, etype) => {
333 this.left_props.addProp(etype, key, skel, type);
339 this.code_editor = new Editor();
340 this.code_editor.ref(); /// really?
341 ((Gtk.Container)(this.codeeditview.el.get_widget())).add(this.code_editor.el);
342 //this.projectsettings.el.show_all();
344 stage = _this.codeeditview.el.get_stage();
345 stage.set_background_color( Clutter.Color.from_string("#000"));
348 _this.code_editor.save.connect( () => {
349 this.left_tree.model.file.save();
350 this.left_tree.model.updateSelected();
358 this.window_rooview =new Xcls_WindowRooView();
359 this.window_rooview.ref();
360 ((Gtk.Container)(this.rooview.el.get_widget())).add(this.window_rooview.el);
361 this.window_rooview.el.show_all();
363 stage = _this.rooview.el.get_stage();
364 stage.set_background_color( Clutter.Color.from_string("#000"));
369 this.window_gladeview =new Xcls_GtkView();
370 this.window_gladeview.ref();
372 //((Gtk.Container)(this.rooview.el.get_widget())).add(this.window_gladeview.el);
373 ///this.window_gladeview.el.hide();
380 this.clutterfiles = new Xcls_ClutterFiles();
381 this.clutterfiles.ref();
382 stage.add_child(this.clutterfiles.el);
383 this.clutterfiles.el.show_all();
386 this.clutterfiles.open.connect((file) => {
387 _this.project = file.project;
388 _this.showViewEditing();
389 this.left_tree.model.loadFile(file);
390 var ctr= ((Gtk.Container)(this.rooview.el.get_widget()));
391 var ctr_p= ((Gtk.Container)(this.projecteditview.el.get_widget()));
392 if (file.xtype == "Roo" ) {
393 ctr.foreach( (w) => { ctr.remove(w); });
394 ctr_p.foreach( (w) => { ctr_p.remove(w); });
395 ctr.add(this.window_rooview.el);
396 ctr_p.add(this.projectsettings.el);
397 this.window_rooview.loadFile(file);
398 this.window_rooview.el.show_all();
399 this.projectsettings.el.show_all();
402 ctr.foreach( (w) => { ctr.remove(w); });
403 ctr_p.foreach( (w) => { ctr_p.remove(w); });
404 ctr.add(this.window_gladeview.el);
405 ctr_p.add(this.vala_projectsettings.el);
406 this.window_gladeview.loadFile(file);
407 this.window_gladeview.el.show_all();
408 this.vala_projectsettings.el.show_all();
410 print("OPEN : " + file.name);
411 _this.editpane.el.set_position(_this.editpane.el.max_position);
417 this.new_file_dialog = new Xcls_DialogNewComponent();
418 // force it modal to the main window..
419 this.new_file_dialog.el.set_transient_for(this.el);
420 this.new_file_dialog.el.set_modal(true);
422 this.new_file_dialog.success.connect((project,file) =>
424 _this.project = project;
425 _this.showViewEditing();
426 this.left_tree.model.loadFile(file);
427 var ctr= ((Gtk.Container)(this.rooview.el.get_widget()));
428 var ctr_p= ((Gtk.Container)(this.projecteditview.el.get_widget()));
429 if (file.xtype == "Roo" ) {
430 ctr.foreach( (w) => { ctr.remove(w); });
431 ctr_p.foreach( (w) => { ctr_p.remove(w); });
432 ctr.add(this.window_rooview.el);
433 ctr_p.add(this.projectsettings.el);
434 this.window_rooview.loadFile(file);
435 this.window_rooview.el.show_all();
436 this.projectsettings.el.show_all();
440 ctr.foreach( (w) => { ctr.remove(w); });
441 ctr_p.foreach( (w) => { ctr_p.remove(w); });
442 ctr.add(this.window_gladeview.el);
443 ctr_p.add(this.vala_projectsettings.el);
444 this.window_gladeview.loadFile(file);
445 this.window_gladeview.el.show_all();
446 this.vala_projectsettings.el.show_all();
454 var tl = new Clutter.Timeline(6000);
455 tl.set_repeat_count(-1);
459 this.children_loaded = true;
465 public void hideCodeEdit () {
466 //this.code_editor.saveContents();
467 _this.backbutton.el.hide();
468 _this.projectbutton.el.show();
469 _this.projecteditbutton.el.show();
470 _this.editfilebutton.el.show();
471 _this.codeeditview.el.save_easing_state();
472 var el = _this.rooview.el;
473 el.save_easing_state();
476 el.set_scale(1.0f,1.0f);
477 _this.codeeditview.el.set_scale(0.0f,0.0f);
478 _this.state = "edit";
481 //_this.clutterfiles.loadProject(_this.project);
483 el.restore_easing_state();
484 _this.codeeditview.el.restore_easing_state();
486 public void showAddProp () {
489 var ae = this.left_tree.getActiveElement();
493 _this.backbutton.el.show();
494 _this.projectbutton.el.hide();
495 _this.editfilebutton.el.hide();
496 _this.projecteditbutton.el.hide();
500 //this.rooview.el.hide();
501 this.add_props.el.show_all();
503 Palete.factory(this.project.xtype),
508 _this.addpropsview.el.save_easing_state();
510 var el = _this.rooview.el;
511 el.save_easing_state();
512 _this.clutterembed.setSizesAlloc("addprop");
516 _this.addpropsview.el.set_scale(1.0f,1.0f);
520 //_this.clutterfiles.loadProject(_this.project);
522 el.restore_easing_state();
523 _this.addpropsview.el.restore_easing_state();
524 this.state = "addprop";
526 public void showViewEditing ( ) {
527 this.editpane.el.show();
528 // this.rooview.el.show();
529 this.left_projects.el.hide();
531 _this.addprojectbutton.el.hide();
532 _this.delprojectbutton.el.hide();
533 _this.addfilebutton.el.hide();
534 _this.backbutton.el.hide();
535 _this.new_window.el.hide();
538 _this.projectbutton.el.show();
539 _this.editfilebutton.el.show();
540 _this.projecteditbutton.el.show();
541 _this.objectshowbutton.el.show();
542 _this.addpropbutton.el.show();
543 _this.addlistenerbutton.el.show();
546 var el = _this.rooview.el;
547 el.save_easing_state();
550 el.set_rotation_angle(Clutter.RotateAxis.Y_AXIS, 0.0f);
551 el.set_scale(1.0f,1.0f);
552 _this.state = "edit";
553 // _this.mainpane.el.set_position(_this.leftpane.lastWidth);
554 _this.clutterfiles.el.hide();
556 el.restore_easing_state();
558 print("show view editing");
560 public void hideProjectEdit () {
561 // return to editing state..
563 _this.projectbutton.el.show();
564 _this.projecteditbutton.el.show();
565 _this.backbutton.el.hide();
566 _this.editfilebutton.el.show();
570 _this.projecteditview.el.save_easing_state();
571 var el = _this.rooview.el;
572 el.save_easing_state();
575 el.set_scale(1.0f,1.0f);
576 _this.projecteditview.el.set_scale(1.0f,0.0f);
577 _this.state = "edit";
580 //_this.clutterfiles.loadProject(_this.project);
582 el.restore_easing_state();
583 _this.projecteditview.el.restore_easing_state();
586 public void showProjectEdit () {
587 // make the browser smaller, and show the edit dialog
590 _this.projectbutton.el.hide();
591 _this.projecteditbutton.el.hide();
592 _this.editfilebutton.el.hide();
594 _this.backbutton.el.show();
596 //this.rooview.el.hide();
599 if (this.project.xtype == "Roo") {
600 this.projectsettings.el.show_all();
601 this.projectsettings.show(this.project);
603 this.vala_projectsettings.el.show_all();
604 this.vala_projectsettings.show((Project.Gtk)this.project);
606 _this.projecteditview.el.save_easing_state();
608 var el = _this.rooview.el;
609 el.save_easing_state();
612 el.set_scale(0.5f,0.5f);
614 _this.projecteditview.el.set_scale(1.0f,1.0f);
616 _this.state = "projectedit";
619 //_this.clutterfiles.loadProject(_this.project);
621 el.restore_easing_state();
622 _this.projecteditview.el.restore_easing_state();
623 // print("show view browsing");
626 public void showAddListener () {
630 var ae = this.left_tree.getActiveElement();
635 _this.backbutton.el.show();
636 _this.projectbutton.el.hide();
637 _this.editfilebutton.el.hide();
638 _this.projecteditbutton.el.hide();
641 //this.rooview.el.hide();
642 this.add_props.el.show_all();
644 Palete.factory(this.project.xtype),
648 //this.rightpalete.show(this.project);
650 _this.addpropsview.el.save_easing_state();
652 var el = _this.rooview.el;
653 el.save_easing_state();
655 _this.clutterembed.setSizesAlloc("addlistener");
660 _this.addpropsview.el.set_scale(1.0f,1.0f);
664 //_this.clutterfiles.loadProject(_this.project);
666 el.restore_easing_state();
667 _this.addpropsview.el.restore_easing_state();
668 this.state = "addlistener";
670 public void hideAddProp () {
671 _this.backbutton.el.hide();
672 _this.projectbutton.el.show();
673 _this.projecteditbutton.el.show();
674 _this.editfilebutton.el.show();
675 _this.addpropsview.el.save_easing_state();
677 var el = _this.rooview.el;
678 el.save_easing_state();
681 el.set_scale(1.0f,1.0f);
682 _this.addpropsview.el.set_scale(0.0f,0.0f);
683 _this.state = "edit";
686 //_this.clutterfiles.loadProject(_this.project);
688 el.restore_easing_state();
689 _this.addpropsview.el.restore_easing_state();
691 public void showCodeEdit (JsRender.JsRender file, JsRender.Node node, string ptype, string key)
693 // this is a bit different,
694 // it's not called via a button - but triggered by the prop edit class signal.
695 // so it has to hide any other state..
705 this.hideAddListener();
709 _this.backbutton.el.show();
711 _this.projectbutton.el.hide();
712 _this.editfilebutton.el.hide();
713 _this.projecteditbutton.el.hide();
716 //this.rooview.el.hide();
717 this.code_editor.el.show_all();
718 this.code_editor.show(
725 _this.codeeditview.el.save_easing_state();
727 var el = _this.rooview.el;
728 el.save_easing_state();
729 _this.clutterembed.setSizesAlloc("codedit");
731 _this.codeeditview.el.set_scale(1.0f,1.0f);
735 //_this.clutterfiles.loadProject(_this.project);
737 el.restore_easing_state();
738 _this.codeeditview.el.restore_easing_state();
739 this.state = "codeedit";
741 public void setTitle (string str) {
742 this.el.set_title(this.title + " - " + str);
744 public void show () {
745 this.left_tree =new Xcls_WindowLeftTree();
746 _this.vbox.el.pack_start(this.left_tree.el,true, true,0);
750 public void hideViewEditing ( ) {
752 // show the file navigation...
754 if (this.left_tree.getActiveFile() != null) {
755 if (this.left_tree.getActiveFile().xtype == "Roo" ) {
756 this.window_rooview.createThumb();
758 this.window_gladeview.createThumb();
762 _this.addprojectbutton.el.show();
763 _this.addfilebutton.el.show();
764 _this.backbutton.el.show();
765 _this.delprojectbutton.el.show();
766 _this.new_window.el.show();
768 _this.editfilebutton.el.hide();
769 _this.projectbutton.el.hide();
770 _this.projecteditbutton.el.hide();
771 _this.objectshowbutton.el.hide();
772 _this.addpropbutton.el.hide();
773 _this.addlistenerbutton.el.hide();
779 // show the add file button..
783 this.editpane.el.hide();
784 //this.rooview.el.hide();
785 this.left_projects.el.show();
787 var el = _this.rooview.el;
788 el.save_easing_state();
789 el.set_easing_duration(1000);
790 // show project / file view..
791 //_this.mainpane.lastWidth = _this.leftpane.el.get_position();
792 //_this.mainpane.el.set_position(0);
794 el.set_rotation_angle(Clutter.RotateAxis.Y_AXIS, 360.0f);
795 el.set_scale(0.0f,0.0f);
797 _this.state = "files";
798 if (_this.project != null) {
799 _this.left_projects.selectProject(_this.project);
801 //_this.clutterfiles.loadProject(_this.project);
803 el.restore_easing_state();
805 print("show view browsing");
807 public void showObject () {
810 // what's the active node on the left hand side..
812 var n = _this.left_tree.getActiveElement();
814 if (_this.left_tree.model.file == null) {
818 if (n == null && _this.left_tree.model.file.tree != null) {
822 _this.backbutton.el.show();
823 _this.projectbutton.el.hide();
824 _this.editfilebutton.el.hide();
825 _this.projecteditbutton.el.hide();
828 //this.rooview.el.hide();
829 this.rightpalete.el.show_all();
830 this.rightpalete.load(_this.left_tree.getActiveFile().palete(), n == null ? "*top" : n.fqn());
833 //this.rightpalete.show(this.project);
835 _this.objectview.el.save_easing_state();
837 var el = _this.rooview.el;
838 el.save_easing_state();
840 _this.clutterembed.setSizesAlloc("object");
843 _this.objectview.el.set_scale(1.0f,1.0f);
847 //_this.clutterfiles.loadProject(_this.project);
849 el.restore_easing_state();
850 _this.objectview.el.restore_easing_state();
851 this.state = "object";
853 public void hideObject () {
854 // return to editing state..
856 _this.projecteditbutton.el.show();
857 _this.backbutton.el.hide();
858 _this.projectbutton.el.show();
859 _this.editfilebutton.el.show();
860 _this.objectview.el.save_easing_state();
861 var el = _this.rooview.el;
862 el.save_easing_state();
865 el.set_scale(1.0f,1.0f);
866 _this.objectview.el.set_scale(0.0f,0.0f);
867 _this.state = "edit";
870 //_this.clutterfiles.loadProject(_this.project);
872 el.restore_easing_state();
873 _this.objectview.el.restore_easing_state();
877 public class Xcls_vbox : Object
880 private Xcls_MainWindow _this;
886 public Xcls_vbox(Xcls_MainWindow _owner )
890 this.el = new Gtk.VBox( false, 0 );
894 // set gobject values
895 var child_0 = new Xcls_mainpane( _this );
897 this.el.pack_end ( child_0.el , true,true,0 );
900 // user defined functions
902 public class Xcls_mainpane : Object
904 public Gtk.HPaned el;
905 private Xcls_MainWindow _this;
909 public int lastWidth;
912 public Xcls_mainpane(Xcls_MainWindow _owner )
915 _this.mainpane = this;
916 this.el = new Gtk.HPaned();
921 // set gobject values
922 this.el.position = 400;
923 var child_0 = new Xcls_leftpane( _this );
925 this.el.add1 ( child_0.el );
926 var child_1 = new Xcls_VBox8( _this );
928 this.el.add2 ( child_1.el );
931 // user defined functions
933 public class Xcls_leftpane : Object
936 private Xcls_MainWindow _this;
942 public Xcls_leftpane(Xcls_MainWindow _owner )
945 _this.leftpane = this;
946 this.el = new Gtk.VBox( true, 0 );
950 // set gobject values
951 var child_0 = new Xcls_editpane( _this );
953 this.el.pack_start ( child_0.el , false,true,0 );
956 // user defined functions
958 public class Xcls_editpane : Object
960 public Gtk.VPaned el;
961 private Xcls_MainWindow _this;
967 public Xcls_editpane(Xcls_MainWindow _owner )
970 _this.editpane = this;
971 this.el = new Gtk.VPaned();
975 // set gobject values
976 var child_0 = new Xcls_tree( _this );
978 this.el.add1 ( child_0.el );
979 var child_1 = new Xcls_props( _this );
981 this.el.add2 ( child_1.el );
984 // user defined functions
986 public class Xcls_tree : Object
989 private Xcls_MainWindow _this;
995 public Xcls_tree(Xcls_MainWindow _owner )
999 this.el = new Gtk.VBox( true, 0 );
1003 // set gobject values
1006 // user defined functions
1008 public class Xcls_props : Object
1011 private Xcls_MainWindow _this;
1017 public Xcls_props(Xcls_MainWindow _owner )
1021 this.el = new Gtk.VBox( true, 0 );
1025 // set gobject values
1028 // user defined functions
1030 public class Xcls_VBox8 : Object
1033 private Xcls_MainWindow _this;
1039 public Xcls_VBox8(Xcls_MainWindow _owner )
1042 this.el = new Gtk.VBox( true, 0 );
1046 // set gobject values
1047 var child_0 = new Xcls_clutterembed( _this );
1049 this.el.pack_start ( child_0.el , true,true,0 );
1052 // user defined functions
1054 public class Xcls_clutterembed : Object
1056 public GtkClutter.Embed el;
1057 private Xcls_MainWindow _this;
1063 public Xcls_clutterembed(Xcls_MainWindow _owner )
1066 _this.clutterembed = this;
1067 this.el = new GtkClutter.Embed();
1071 // set gobject values
1072 var child_0 = new Xcls_rooview( _this );
1074 this.el.get_stage().add_child ( child_0.el );
1075 var child_1 = new Xcls_objectview( _this );
1077 this.el.get_stage().add_child ( child_1.el );
1078 var child_2 = new Xcls_codeeditview( _this );
1080 this.el.get_stage().add_child ( child_2.el );
1081 var child_3 = new Xcls_addpropsview( _this );
1083 this.el.get_stage().add_child ( child_3.el );
1084 var child_4 = new Xcls_projecteditview( _this );
1086 this.el.get_stage().add_child ( child_4.el );
1087 var child_5 = new Xcls_buttonlayout( _this );
1089 this.el.get_stage().add_child ( child_5.el );
1093 var stage = this.el.get_stage();
1094 stage.set_background_color( Clutter.Color.from_string("#000"));
1096 this.el.size_allocate.connect( ( alloc) => {
1097 this.setSizes(alloc, _this.state);
1102 // user defined functions
1103 public void setSizes ( Gtk.Allocation alloc, string state) {
1104 if (!_this.children_loaded) { return; }
1106 _this.clutterfiles.set_size(alloc.width-50, alloc.height);
1108 // project view appears at top...
1110 _this.projecteditview.el.set_size(alloc.width-50, alloc.height / 2.0f);
1114 var avail = alloc.width < 50.0f ? 0 : alloc.width - 50.0f;
1117 var palsize = avail < 300.0f ? avail : 300.0f;
1118 print("set palsize size %f\n", palsize);
1119 // palate / props : fixed 300 pix
1121 _this.objectview.el.set_size(palsize, alloc.height);
1122 _this.addpropsview.el.set_size(palsize, alloc.height);
1126 // code edit min 600
1128 var codesize = avail < 800.0f ? avail : 800.0f;
1129 print("set code size %f\n", codesize);
1131 _this.codeeditview.el.set_size(codesize, alloc.height);
1132 _this.rooview.el.set_size(alloc.width-50, alloc.height);
1137 var scale = avail > 0.0f ? (avail - codesize -10 ) / avail : 0.0f;
1140 _this.rooview.el.set_scale(scale,scale);
1145 var scale = avail > 0.0f ? (avail - palsize -10 ) / avail : 0.0f;
1146 _this.rooview.el.set_scale(scale,scale);
1151 public void setSizesAlloc (string state) {
1153 Gtk.Allocation alloc;
1154 this.el.get_allocation(out alloc);
1155 this.setSizes(alloc, state);
1158 public class Xcls_rooview : Object
1160 public GtkClutter.Actor el;
1161 private Xcls_MainWindow _this;
1167 public Xcls_rooview(Xcls_MainWindow _owner )
1170 _this.rooview = this;
1171 this.el = new GtkClutter.Actor();
1175 // set gobject values
1182 this.el.add_constraint(
1183 new Clutter.AlignConstraint(
1184 _this.clutterembed.el.get_stage(),
1185 Clutter.AlignAxis.X_AXIS,
1190 //this.el.set_position(100,100);
1191 this.el.set_pivot_point(1.0f,1.0f);
1193 this.el.set_size(_this.clutterembed.el.get_stage().width-50,
1194 _this.clutterembed.el.get_stage().height);
1198 // user defined functions
1200 public class Xcls_objectview : Object
1202 public GtkClutter.Actor el;
1203 private Xcls_MainWindow _this;
1209 public Xcls_objectview(Xcls_MainWindow _owner )
1212 _this.objectview = this;
1213 this.el = new GtkClutter.Actor();
1217 // set gobject values
1224 this.el.add_constraint(
1225 new Clutter.AlignConstraint(
1226 _this.clutterembed.el.get_stage(),
1227 Clutter.AlignAxis.X_AXIS,
1232 this.el.fixed_x = 50.0f;
1233 this.el.fixed_y = 0.0f;
1234 //this.el.set_position(100,100);
1235 this.el.set_pivot_point(0.0f,0.0f);
1236 this.el.set_scale(0.0f,1.0f);
1237 this.el.set_size((_this.clutterembed.el.get_stage().width-50)/2,
1238 _this.clutterembed.el.get_stage().height);
1242 // user defined functions
1244 public class Xcls_codeeditview : Object
1246 public GtkClutter.Actor el;
1247 private Xcls_MainWindow _this;
1253 public Xcls_codeeditview(Xcls_MainWindow _owner )
1256 _this.codeeditview = this;
1257 this.el = new GtkClutter.Actor();
1261 // set gobject values
1268 this.el.add_constraint(
1269 new Clutter.AlignConstraint(
1270 _this.clutterembed.el.get_stage(),
1271 Clutter.AlignAxis.X_AXIS,
1276 this.el.fixed_x = 50.0f;
1277 this.el.fixed_y = 0.0f;
1278 //this.el.set_position(100,100);
1279 this.el.set_pivot_point(0.0f,0.0f);
1280 this.el.set_scale(0.0f,1.0f);
1281 this.el.set_size((_this.clutterembed.el.get_stage().width-50)/2,
1282 _this.clutterembed.el.get_stage().height);
1286 // user defined functions
1288 public class Xcls_addpropsview : Object
1290 public GtkClutter.Actor el;
1291 private Xcls_MainWindow _this;
1297 public Xcls_addpropsview(Xcls_MainWindow _owner )
1300 _this.addpropsview = this;
1301 this.el = new GtkClutter.Actor();
1305 // set gobject values
1312 this.el.add_constraint(
1313 new Clutter.AlignConstraint(
1314 _this.clutterembed.el.get_stage(),
1315 Clutter.AlignAxis.X_AXIS,
1320 this.el.fixed_x = 50.0f;
1321 this.el.fixed_y = 0.0f;
1322 //this.el.set_position(100,100);
1323 this.el.set_pivot_point(0.0f,0.0f);
1324 this.el.set_scale(0.0f,1.0f);
1325 this.el.set_size((_this.clutterembed.el.get_stage().width-50)/2,
1326 _this.clutterembed.el.get_stage().height);
1330 // user defined functions
1332 public class Xcls_projecteditview : Object
1334 public GtkClutter.Actor el;
1335 private Xcls_MainWindow _this;
1341 public Xcls_projecteditview(Xcls_MainWindow _owner )
1344 _this.projecteditview = this;
1345 this.el = new GtkClutter.Actor();
1349 // set gobject values
1356 this.el.add_constraint(
1357 new Clutter.AlignConstraint(
1358 _this.clutterembed.el.get_stage(),
1359 Clutter.AlignAxis.X_AXIS,
1364 //this.el.set_position(100,100);
1365 this.el.set_pivot_point(0.0f,0.0f);
1366 this.el.set_scale(1.0f,0.0f);
1367 this.el.set_size(_this.clutterembed.el.get_stage().width-50,
1368 _this.clutterembed.el.get_stage().height /2);
1372 // user defined functions
1374 public class Xcls_buttonlayout : Object
1376 public Clutter.Actor el;
1377 private Xcls_MainWindow _this;
1383 public Xcls_buttonlayout(Xcls_MainWindow _owner )
1386 _this.buttonlayout = this;
1387 this.el = new Clutter.Actor();
1391 // set gobject values
1392 var child_0 = new Xcls_BoxLayout16( _this );
1394 this.el.layout_manager = child_0.el;
1395 var child_1 = new Xcls_backbutton( _this );
1397 this.el.add_child ( child_1.el );
1398 var child_2 = new Xcls_projectbutton( _this );
1400 this.el.add_child ( child_2.el );
1401 var child_3 = new Xcls_editfilebutton( _this );
1403 this.el.add_child ( child_3.el );
1404 var child_4 = new Xcls_projecteditbutton( _this );
1406 this.el.add_child ( child_4.el );
1407 var child_5 = new Xcls_objectshowbutton( _this );
1409 this.el.add_child ( child_5.el );
1410 var child_6 = new Xcls_addpropbutton( _this );
1412 this.el.add_child ( child_6.el );
1413 var child_7 = new Xcls_addlistenerbutton( _this );
1415 this.el.add_child ( child_7.el );
1416 var child_8 = new Xcls_addprojectbutton( _this );
1418 this.el.add_child ( child_8.el );
1419 var child_9 = new Xcls_addfilebutton( _this );
1421 this.el.add_child ( child_9.el );
1422 var child_10 = new Xcls_delprojectbutton( _this );
1424 this.el.add_child ( child_10.el );
1425 var child_11 = new Xcls_new_window( _this );
1427 this.el.add_child ( child_11.el );
1433 this.el.add_constraint(
1434 new Clutter.AlignConstraint(
1435 _this.clutterembed.el.get_stage(),
1436 Clutter.AlignAxis.X_AXIS,
1442 //this.el.set_position(100,100);
1443 this.el.set_pivot_point(0.5f,0.5f);
1444 this.el.set_size(50,
1445 _this.clutterembed.el.get_stage().height);
1449 // user defined functions
1451 public class Xcls_BoxLayout16 : Object
1453 public Clutter.BoxLayout el;
1454 private Xcls_MainWindow _this;
1460 public Xcls_BoxLayout16(Xcls_MainWindow _owner )
1463 this.el = new Clutter.BoxLayout();
1467 // set gobject values
1468 this.el.orientation = Clutter.Orientation.VERTICAL;
1471 // user defined functions
1473 public class Xcls_backbutton : Object
1475 public Clutter.Actor el;
1476 private Xcls_MainWindow _this;
1482 public Xcls_backbutton(Xcls_MainWindow _owner )
1485 _this.backbutton = this;
1486 this.el = new Clutter.Actor();
1490 // set gobject values
1491 var child_0 = new Xcls_Actor18( _this );
1493 this.el.add_child ( child_0.el );
1497 this.el.set_size(50,50); }
1499 // user defined functions
1501 public class Xcls_Actor18 : Object
1503 public GtkClutter.Actor el;
1504 private Xcls_MainWindow _this;
1510 public Xcls_Actor18(Xcls_MainWindow _owner )
1513 this.el = new GtkClutter.Actor();
1517 // set gobject values
1518 var child_0 = new Xcls_Button19( _this );
1523 ((Gtk.Container)(this.el.get_widget())).add ( child_0.el); }
1525 // user defined functions
1527 public class Xcls_Button19 : Object
1529 public Gtk.Button el;
1530 private Xcls_MainWindow _this;
1536 public Xcls_Button19(Xcls_MainWindow _owner )
1539 this.el = new Gtk.Button();
1543 // set gobject values
1544 this.el.width_request = 50;
1545 this.el.height_request = 50;
1546 this.el.tooltip_text = "Back";
1547 var child_0 = new Xcls_Image20( _this );
1549 this.el.set_image ( child_0.el );
1552 this.el.clicked.connect( ( ) => {
1553 switch (_this.state) {
1556 _this.hideViewEditing();
1559 // should only occur if there is an active file..
1560 _this.showViewEditing();
1564 _this.hideAddProp();
1568 _this.hideAddListener();
1578 _this.hideCodeEdit();
1583 _this.hideProjectEdit();
1594 // user defined functions
1596 public class Xcls_Image20 : Object
1598 public Gtk.Image el;
1599 private Xcls_MainWindow _this;
1605 public Xcls_Image20(Xcls_MainWindow _owner )
1608 this.el = new Gtk.Image();
1612 // set gobject values
1613 this.el.icon_name = "go-previous";
1616 // user defined functions
1618 public class Xcls_projectbutton : Object
1620 public Clutter.Actor el;
1621 private Xcls_MainWindow _this;
1627 public Xcls_projectbutton(Xcls_MainWindow _owner )
1630 _this.projectbutton = this;
1631 this.el = new Clutter.Actor();
1635 // set gobject values
1636 var child_0 = new Xcls_Actor22( _this );
1638 this.el.add_child ( child_0.el );
1642 this.el.set_size(50,50); }
1644 // user defined functions
1646 public class Xcls_Actor22 : Object
1648 public GtkClutter.Actor el;
1649 private Xcls_MainWindow _this;
1655 public Xcls_Actor22(Xcls_MainWindow _owner )
1658 this.el = new GtkClutter.Actor();
1662 // set gobject values
1663 var child_0 = new Xcls_Button23( _this );
1668 ((Gtk.Container)(this.el.get_widget())).add ( child_0.el); }
1670 // user defined functions
1672 public class Xcls_Button23 : Object
1674 public Gtk.Button el;
1675 private Xcls_MainWindow _this;
1681 public Xcls_Button23(Xcls_MainWindow _owner )
1684 this.el = new Gtk.Button();
1688 // set gobject values
1689 this.el.width_request = 50;
1690 this.el.height_request = 50;
1691 var child_0 = new Xcls_Image24( _this );
1693 this.el.set_image ( child_0.el );
1696 this.el.clicked.connect( ( ) => {
1697 switch (_this.state) {
1700 _this.hideViewEditing();
1703 _this.showViewEditing();
1707 _this.hideAddProp();
1708 _this.hideViewEditing();
1711 _this.hideAddListener();
1712 _this.hideViewEditing();
1717 _this.hideViewEditing();
1728 // user defined functions
1730 public class Xcls_Image24 : Object
1732 public Gtk.Image el;
1733 private Xcls_MainWindow _this;
1739 public Xcls_Image24(Xcls_MainWindow _owner )
1742 this.el = new Gtk.Image();
1746 // set gobject values
1747 this.el.icon_name = "document-open";
1750 // user defined functions
1752 public class Xcls_editfilebutton : Object
1754 public Clutter.Actor el;
1755 private Xcls_MainWindow _this;
1761 public Xcls_editfilebutton(Xcls_MainWindow _owner )
1764 _this.editfilebutton = this;
1765 this.el = new Clutter.Actor();
1769 // set gobject values
1770 var child_0 = new Xcls_Actor26( _this );
1772 this.el.add_child ( child_0.el );
1776 this.el.set_size(50.0f,50.0f); }
1778 // user defined functions
1780 public class Xcls_Actor26 : Object
1782 public GtkClutter.Actor el;
1783 private Xcls_MainWindow _this;
1789 public Xcls_Actor26(Xcls_MainWindow _owner )
1792 this.el = new GtkClutter.Actor();
1796 // set gobject values
1797 var child_0 = new Xcls_Button27( _this );
1802 ((Gtk.Container)(this.el.get_widget())).add ( child_0.el); }
1804 // user defined functions
1806 public class Xcls_Button27 : Object
1808 public Gtk.Button el;
1809 private Xcls_MainWindow _this;
1815 public Xcls_Button27(Xcls_MainWindow _owner )
1818 this.el = new Gtk.Button();
1822 // set gobject values
1823 this.el.width_request = 50;
1824 this.el.height_request = 50;
1825 this.el.tooltip_text = "File Details";
1826 var child_0 = new Xcls_Image28( _this );
1828 this.el.set_image ( child_0.el );
1831 this.el.clicked.connect( ( ) => {
1833 // create a new file in project..
1834 if (_this.project == null || _this.left_tree.model.file == null) {
1838 _this.new_file_dialog.show(_this.left_tree.model.file);
1846 // user defined functions
1848 public class Xcls_Image28 : Object
1850 public Gtk.Image el;
1851 private Xcls_MainWindow _this;
1857 public Xcls_Image28(Xcls_MainWindow _owner )
1860 this.el = new Gtk.Image();
1864 // set gobject values
1865 this.el.icon_name = "document-properties";
1868 // user defined functions
1870 public class Xcls_projecteditbutton : Object
1872 public Clutter.Actor el;
1873 private Xcls_MainWindow _this;
1879 public Xcls_projecteditbutton(Xcls_MainWindow _owner )
1882 _this.projecteditbutton = this;
1883 this.el = new Clutter.Actor();
1887 // set gobject values
1888 var child_0 = new Xcls_Actor30( _this );
1890 this.el.add_child ( child_0.el );
1894 this.el.set_size(50,50); }
1896 // user defined functions
1898 public class Xcls_Actor30 : Object
1900 public GtkClutter.Actor el;
1901 private Xcls_MainWindow _this;
1907 public Xcls_Actor30(Xcls_MainWindow _owner )
1910 this.el = new GtkClutter.Actor();
1914 // set gobject values
1915 var child_0 = new Xcls_Button31( _this );
1920 ((Gtk.Container)(this.el.get_widget())).add ( child_0.el); }
1922 // user defined functions
1924 public class Xcls_Button31 : Object
1926 public Gtk.Button el;
1927 private Xcls_MainWindow _this;
1933 public Xcls_Button31(Xcls_MainWindow _owner )
1936 this.el = new Gtk.Button();
1940 // set gobject values
1941 this.el.width_request = 50;
1942 this.el.height_request = 50;
1943 this.el.tooltip_text = "Project Details";
1944 var child_0 = new Xcls_Image32( _this );
1946 this.el.set_image ( child_0.el );
1949 this.el.clicked.connect( ( ) => {
1950 switch (_this.state) {
1952 _this.showProjectEdit();
1955 // _this.showViewEditing();
1958 _this.hideProjectEdit();
1964 _this.hideAddProp();
1965 _this.showProjectEdit();
1968 _this.hideAddListener();
1969 _this.showProjectEdit();
1974 _this.showProjectEdit();
1985 // user defined functions
1987 public class Xcls_Image32 : Object
1989 public Gtk.Image el;
1990 private Xcls_MainWindow _this;
1996 public Xcls_Image32(Xcls_MainWindow _owner )
1999 this.el = new Gtk.Image();
2003 // set gobject values
2004 this.el.icon_name = "emblem-system";
2007 // user defined functions
2009 public class Xcls_objectshowbutton : Object
2011 public Clutter.Actor el;
2012 private Xcls_MainWindow _this;
2018 public Xcls_objectshowbutton(Xcls_MainWindow _owner )
2021 _this.objectshowbutton = this;
2022 this.el = new Clutter.Actor();
2026 // set gobject values
2027 var child_0 = new Xcls_Actor34( _this );
2029 this.el.add_child ( child_0.el );
2033 this.el.set_size(50,50);
2035 this.el.button_press_event.connect( ( ) => {
2039 switch (_this.state) {
2043 _this.hideAddProp();
2047 _this.hideAddListener();
2063 print("unhandled add objects from %s\n",_this.state);
2070 this.el.enter_event.connect( ( event) => {
2071 this.el.background_color = new Clutter.Color.from_string("#333");
2074 this.el.leave_event.connect( ( event) => {
2075 this.el.background_color = new Clutter.Color.from_string("#000");
2080 // user defined functions
2082 public class Xcls_Actor34 : Object
2084 public GtkClutter.Actor el;
2085 private Xcls_MainWindow _this;
2091 public Xcls_Actor34(Xcls_MainWindow _owner )
2094 this.el = new GtkClutter.Actor();
2098 // set gobject values
2099 var child_0 = new Xcls_Button35( _this );
2104 ((Gtk.Container)(this.el.get_widget())).add ( child_0.el); }
2106 // user defined functions
2108 public class Xcls_Button35 : Object
2110 public Gtk.Button el;
2111 private Xcls_MainWindow _this;
2117 public Xcls_Button35(Xcls_MainWindow _owner )
2120 this.el = new Gtk.Button();
2124 // set gobject values
2125 this.el.width_request = 50;
2126 this.el.height_request = 50;
2127 this.el.tooltip_text = "Add Child Element";
2128 var child_0 = new Xcls_Image36( _this );
2130 this.el.set_image ( child_0.el );
2133 this.el.clicked.connect( ( ) => {
2137 switch (_this.state) {
2141 _this.hideAddProp();
2145 _this.hideAddListener();
2161 print("unhandled add objects from %s\n",_this.state);
2170 // user defined functions
2172 public class Xcls_Image36 : Object
2174 public Gtk.Image el;
2175 private Xcls_MainWindow _this;
2181 public Xcls_Image36(Xcls_MainWindow _owner )
2184 this.el = new Gtk.Image();
2188 // set gobject values
2189 this.el.icon_name = "list-add";
2192 // user defined functions
2194 public class Xcls_addpropbutton : Object
2196 public Clutter.Actor el;
2197 private Xcls_MainWindow _this;
2203 public Xcls_addpropbutton(Xcls_MainWindow _owner )
2206 _this.addpropbutton = this;
2207 this.el = new Clutter.Actor();
2211 // set gobject values
2212 var child_0 = new Xcls_Actor38( _this );
2214 this.el.add_child ( child_0.el );
2218 this.el.set_size(50,50); }
2220 // user defined functions
2222 public class Xcls_Actor38 : Object
2224 public GtkClutter.Actor el;
2225 private Xcls_MainWindow _this;
2231 public Xcls_Actor38(Xcls_MainWindow _owner )
2234 this.el = new GtkClutter.Actor();
2238 // set gobject values
2239 var child_0 = new Xcls_Button39( _this );
2244 ((Gtk.Container)(this.el.get_widget())).add ( child_0.el); }
2246 // user defined functions
2248 public class Xcls_Button39 : Object
2250 public Gtk.Button el;
2251 private Xcls_MainWindow _this;
2257 public Xcls_Button39(Xcls_MainWindow _owner )
2260 this.el = new Gtk.Button();
2264 // set gobject values
2265 this.el.width_request = 50;
2266 this.el.height_request = 50;
2267 this.el.tooltip_text = "Add Property";
2268 var child_0 = new Xcls_Image40( _this );
2270 this.el.set_image ( child_0.el );
2273 this.el.clicked.connect( ( ) => {
2277 switch (_this.state) {
2279 _this.showAddProp();
2284 _this.showAddProp();
2288 _this.hideAddListener();
2289 _this.showAddProp();
2294 _this.hideAddProp();
2298 print("unhandled add property from %s\n",_this.state);
2308 // user defined functions
2310 public class Xcls_Image40 : Object
2312 public Gtk.Image el;
2313 private Xcls_MainWindow _this;
2319 public Xcls_Image40(Xcls_MainWindow _owner )
2322 this.el = new Gtk.Image();
2326 // set gobject values
2327 this.el.icon_name = "format-justify-left";
2330 // user defined functions
2332 public class Xcls_addlistenerbutton : Object
2334 public Clutter.Actor el;
2335 private Xcls_MainWindow _this;
2341 public Xcls_addlistenerbutton(Xcls_MainWindow _owner )
2344 _this.addlistenerbutton = this;
2345 this.el = new Clutter.Actor();
2349 // set gobject values
2350 var child_0 = new Xcls_Actor42( _this );
2352 this.el.add_child ( child_0.el );
2356 this.el.set_size(50,50); }
2358 // user defined functions
2360 public class Xcls_Actor42 : Object
2362 public GtkClutter.Actor el;
2363 private Xcls_MainWindow _this;
2369 public Xcls_Actor42(Xcls_MainWindow _owner )
2372 this.el = new GtkClutter.Actor();
2376 // set gobject values
2377 var child_0 = new Xcls_Button43( _this );
2382 ((Gtk.Container)(this.el.get_widget())).add ( child_0.el); }
2384 // user defined functions
2386 public class Xcls_Button43 : Object
2388 public Gtk.Button el;
2389 private Xcls_MainWindow _this;
2395 public Xcls_Button43(Xcls_MainWindow _owner )
2398 this.el = new Gtk.Button();
2402 // set gobject values
2403 this.el.width_request = 50;
2404 this.el.height_request = 50;
2405 this.el.tooltip_text = "Add Event Code";
2406 var child_0 = new Xcls_Image44( _this );
2408 this.el.set_image ( child_0.el );
2411 this.el.clicked.connect( ( ) => {
2415 switch (_this.state) {
2417 _this.showAddListener();
2422 _this.hideAddListener();
2427 _this.hideAddProp();
2428 _this.showAddListener();
2432 _this.showAddListener();
2436 print("unhandled add listener from %s\n",_this.state);
2447 // user defined functions
2449 public class Xcls_Image44 : Object
2451 public Gtk.Image el;
2452 private Xcls_MainWindow _this;
2458 public Xcls_Image44(Xcls_MainWindow _owner )
2461 this.el = new Gtk.Image();
2465 // set gobject values
2466 this.el.icon_name = "appointment-new";
2469 // user defined functions
2471 public class Xcls_addprojectbutton : Object
2473 public Clutter.Actor el;
2474 private Xcls_MainWindow _this;
2480 public Xcls_addprojectbutton(Xcls_MainWindow _owner )
2483 _this.addprojectbutton = this;
2484 this.el = new Clutter.Actor();
2488 // set gobject values
2489 var child_0 = new Xcls_Actor46( _this );
2491 this.el.add_child ( child_0.el );
2495 this.el.set_size(50.0f,50.0f); }
2497 // user defined functions
2499 public class Xcls_Actor46 : Object
2501 public GtkClutter.Actor el;
2502 private Xcls_MainWindow _this;
2508 public Xcls_Actor46(Xcls_MainWindow _owner )
2511 this.el = new GtkClutter.Actor();
2515 // set gobject values
2516 var child_0 = new Xcls_Button47( _this );
2521 ((Gtk.Container)(this.el.get_widget())).add ( child_0.el); }
2523 // user defined functions
2525 public class Xcls_Button47 : Object
2527 public Gtk.Button el;
2528 private Xcls_MainWindow _this;
2534 public Xcls_Button47(Xcls_MainWindow _owner )
2537 this.el = new Gtk.Button();
2541 // set gobject values
2542 this.el.width_request = 50;
2543 this.el.height_request = 50;
2544 this.el.tooltip_text = "New\nProj.";
2545 var child_0 = new Xcls_Image48( _this );
2547 this.el.set_image ( child_0.el );
2550 this.el.clicked.connect( ( ) => {
2552 // create a new file in project..
2553 //Xcls_DialogNewComponent.singleton().show(
2554 var pe = Xcls_EditProject.singleton();
2555 pe.el.set_transient_for(_this.el);
2556 pe.el.set_modal(true);
2563 _this.left_projects.is_loaded = false;
2564 _this.left_projects.load();
2565 _this.left_projects.selectProject(p);
2572 // user defined functions
2574 public class Xcls_Image48 : Object
2576 public Gtk.Image el;
2577 private Xcls_MainWindow _this;
2583 public Xcls_Image48(Xcls_MainWindow _owner )
2586 this.el = new Gtk.Image();
2590 // set gobject values
2591 this.el.icon_name = "folder-new";
2594 // user defined functions
2596 public class Xcls_addfilebutton : Object
2598 public Clutter.Actor el;
2599 private Xcls_MainWindow _this;
2605 public Xcls_addfilebutton(Xcls_MainWindow _owner )
2608 _this.addfilebutton = this;
2609 this.el = new Clutter.Actor();
2613 // set gobject values
2614 var child_0 = new Xcls_Actor50( _this );
2616 this.el.add_child ( child_0.el );
2620 this.el.set_size(50.0f,50.0f); }
2622 // user defined functions
2624 public class Xcls_Actor50 : Object
2626 public GtkClutter.Actor el;
2627 private Xcls_MainWindow _this;
2633 public Xcls_Actor50(Xcls_MainWindow _owner )
2636 this.el = new GtkClutter.Actor();
2640 // set gobject values
2641 var child_0 = new Xcls_Button51( _this );
2646 ((Gtk.Container)(this.el.get_widget())).add ( child_0.el); }
2648 // user defined functions
2650 public class Xcls_Button51 : Object
2652 public Gtk.Button el;
2653 private Xcls_MainWindow _this;
2659 public Xcls_Button51(Xcls_MainWindow _owner )
2662 this.el = new Gtk.Button();
2666 // set gobject values
2667 this.el.width_request = 50;
2668 this.el.height_request = 50;
2669 this.el.tooltip_text = "Add File";
2670 var child_0 = new Xcls_Image52( _this );
2672 this.el.set_image ( child_0.el );
2675 this.el.clicked.connect( () => {
2676 // create a new file in project..
2678 // what's the currently selected project...
2679 var proj = _this.left_projects.getSelectedProject();
2687 var f = JsRender.JsRender.factory(proj.xtype, proj, "");
2688 _this.project = proj;
2689 _this.new_file_dialog.show(f);
2695 // user defined functions
2697 public class Xcls_Image52 : Object
2699 public Gtk.Image el;
2700 private Xcls_MainWindow _this;
2706 public Xcls_Image52(Xcls_MainWindow _owner )
2709 this.el = new Gtk.Image();
2713 // set gobject values
2714 this.el.icon_name = "document-new";
2717 // user defined functions
2719 public class Xcls_delprojectbutton : Object
2721 public Clutter.Actor el;
2722 private Xcls_MainWindow _this;
2728 public Xcls_delprojectbutton(Xcls_MainWindow _owner )
2731 _this.delprojectbutton = this;
2732 this.el = new Clutter.Actor();
2736 // set gobject values
2737 var child_0 = new Xcls_Actor54( _this );
2739 this.el.add_child ( child_0.el );
2743 this.el.set_size(50,50); }
2745 // user defined functions
2747 public class Xcls_Actor54 : Object
2749 public GtkClutter.Actor el;
2750 private Xcls_MainWindow _this;
2756 public Xcls_Actor54(Xcls_MainWindow _owner )
2759 this.el = new GtkClutter.Actor();
2763 // set gobject values
2764 var child_0 = new Xcls_Button55( _this );
2769 ((Gtk.Container)(this.el.get_widget())).add ( child_0.el); }
2771 // user defined functions
2773 public class Xcls_Button55 : Object
2775 public Gtk.Button el;
2776 private Xcls_MainWindow _this;
2782 public Xcls_Button55(Xcls_MainWindow _owner )
2785 this.el = new Gtk.Button();
2789 // set gobject values
2790 this.el.width_request = 50;
2791 this.el.height_request = 50;
2792 this.el.tooltip_text = "Delelte Project";
2793 var child_0 = new Xcls_Image56( _this );
2795 this.el.set_image ( child_0.el );
2798 this.el.clicked.connect( ( ) => {
2800 var cd = DialogConfirm.singleton();
2801 cd.el.set_transient_for(_this.el);
2802 cd.el.set_modal(true);
2804 var project = _this.left_projects.getSelectedProject();
2805 if (project == null) {
2806 print("SKIP - no project\n");
2811 if (Gtk.ResponseType.YES != cd.show("Confirm",
2812 "Are you sure you want to delete project %s".printf(project.name))) {
2818 Project.Project.remove(project);
2819 _this.project = null;
2821 _this.left_projects.is_loaded = false;
2822 _this.left_projects.load();
2823 _this.clutterfiles.clearFiles();
2828 // user defined functions
2830 public class Xcls_Image56 : Object
2832 public Gtk.Image el;
2833 private Xcls_MainWindow _this;
2839 public Xcls_Image56(Xcls_MainWindow _owner )
2842 this.el = new Gtk.Image();
2846 // set gobject values
2847 this.el.icon_name = "user-trash";
2850 // user defined functions
2852 public class Xcls_new_window : Object
2854 public Clutter.Actor el;
2855 private Xcls_MainWindow _this;
2861 public Xcls_new_window(Xcls_MainWindow _owner )
2864 _this.new_window = this;
2865 this.el = new Clutter.Actor();
2869 // set gobject values
2870 var child_0 = new Xcls_Actor58( _this );
2872 this.el.add_child ( child_0.el );
2876 this.el.set_size(50,50); }
2878 // user defined functions
2880 public class Xcls_Actor58 : Object
2882 public GtkClutter.Actor el;
2883 private Xcls_MainWindow _this;
2889 public Xcls_Actor58(Xcls_MainWindow _owner )
2892 this.el = new GtkClutter.Actor();
2896 // set gobject values
2897 var child_0 = new Xcls_Button59( _this );
2902 ((Gtk.Container)(this.el.get_widget())).add ( child_0.el); }
2904 // user defined functions
2906 public class Xcls_Button59 : Object
2908 public Gtk.Button el;
2909 private Xcls_MainWindow _this;
2915 public Xcls_Button59(Xcls_MainWindow _owner )
2918 this.el = new Gtk.Button();
2922 // set gobject values
2923 this.el.width_request = 50;
2924 this.el.height_request = 50;
2925 this.el.tooltip_text = "Open New Window";
2926 var child_0 = new Xcls_Image60( _this );
2928 this.el.set_image ( child_0.el );
2931 this.el.clicked.connect( ( ) => {
2932 Xcls_MainWindow.singleton().no_windows++;
2933 var w = new Xcls_MainWindow();
2938 w.hideViewEditing();
2942 // user defined functions
2944 public class Xcls_Image60 : Object
2946 public Gtk.Image el;
2947 private Xcls_MainWindow _this;
2953 public Xcls_Image60(Xcls_MainWindow _owner )
2956 this.el = new Gtk.Image();
2960 // set gobject values
2961 this.el.icon_name = "window-new";
2964 // user defined functions