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.rooview.el.hide();
571 //this.edit_project.el.show();
572 _this.projecteditview.el.save_easing_state();
573 var el = _this.rooview.el;
574 el.save_easing_state();
577 el.set_scale(1.0f,1.0f);
578 _this.projecteditview.el.set_scale(1.0f,0.0f);
579 _this.state = "edit";
582 //_this.clutterfiles.loadProject(_this.project);
584 el.restore_easing_state();
585 _this.projecteditview.el.restore_easing_state();
588 public void showProjectEdit () {
589 // make the browser smaller, and show the edit dialog
592 _this.projectbutton.el.hide();
593 _this.projecteditbutton.el.hide();
595 _this.editfilebutton.el.hide();
600 _this.backbutton.el.show();
602 //this.rooview.el.hide();
603 this.projectsettings.el.show_all();
604 this.projectsettings.show(this.project);
605 _this.projecteditview.el.save_easing_state();
607 var el = _this.rooview.el;
608 el.save_easing_state();
611 el.set_scale(0.5f,0.5f);
613 _this.projecteditview.el.set_scale(1.0f,1.0f);
615 _this.state = "projectedit";
618 //_this.clutterfiles.loadProject(_this.project);
620 el.restore_easing_state();
621 _this.projecteditview.el.restore_easing_state();
622 // print("show view browsing");
625 public void showAddListener () {
629 var ae = this.left_tree.getActiveElement();
634 _this.backbutton.el.show();
635 _this.projectbutton.el.hide();
636 _this.editfilebutton.el.hide();
637 _this.projecteditbutton.el.hide();
640 //this.rooview.el.hide();
641 this.add_props.el.show_all();
643 Palete.factory(this.project.xtype),
647 //this.rightpalete.show(this.project);
649 _this.addpropsview.el.save_easing_state();
651 var el = _this.rooview.el;
652 el.save_easing_state();
654 _this.clutterembed.setSizesAlloc("addlistener");
659 _this.addpropsview.el.set_scale(1.0f,1.0f);
663 //_this.clutterfiles.loadProject(_this.project);
665 el.restore_easing_state();
666 _this.addpropsview.el.restore_easing_state();
667 this.state = "addlistener";
669 public void hideAddProp () {
670 _this.backbutton.el.hide();
671 _this.projectbutton.el.show();
672 _this.projecteditbutton.el.show();
673 _this.editfilebutton.el.show();
674 _this.addpropsview.el.save_easing_state();
676 var el = _this.rooview.el;
677 el.save_easing_state();
680 el.set_scale(1.0f,1.0f);
681 _this.addpropsview.el.set_scale(0.0f,0.0f);
682 _this.state = "edit";
685 //_this.clutterfiles.loadProject(_this.project);
687 el.restore_easing_state();
688 _this.addpropsview.el.restore_easing_state();
690 public void showCodeEdit (JsRender.JsRender file, JsRender.Node node, string ptype, string key)
692 // this is a bit different,
693 // it's not called via a button - but triggered by the prop edit class signal.
694 // so it has to hide any other state..
704 this.hideAddListener();
708 _this.backbutton.el.show();
710 _this.projectbutton.el.hide();
711 _this.editfilebutton.el.hide();
712 _this.projecteditbutton.el.hide();
715 //this.rooview.el.hide();
716 this.code_editor.el.show_all();
717 this.code_editor.show(
724 _this.codeeditview.el.save_easing_state();
726 var el = _this.rooview.el;
727 el.save_easing_state();
728 _this.clutterembed.setSizesAlloc("codedit");
730 _this.codeeditview.el.set_scale(1.0f,1.0f);
734 //_this.clutterfiles.loadProject(_this.project);
736 el.restore_easing_state();
737 _this.codeeditview.el.restore_easing_state();
738 this.state = "codeedit";
740 public void setTitle (string str) {
741 this.el.set_title(this.title + " - " + str);
743 public void show () {
744 this.left_tree =new Xcls_WindowLeftTree();
745 _this.vbox.el.pack_start(this.left_tree.el,true, true,0);
749 public void hideViewEditing ( ) {
751 // show the file navigation...
753 if (this.left_tree.getActiveFile() != null) {
754 if (this.left_tree.getActiveFile().xtype == "Roo" ) {
755 this.window_rooview.createThumb();
757 this.window_gladeview.createThumb();
761 _this.addprojectbutton.el.show();
762 _this.addfilebutton.el.show();
763 _this.backbutton.el.show();
764 _this.delprojectbutton.el.show();
765 _this.new_window.el.show();
767 _this.editfilebutton.el.hide();
768 _this.projectbutton.el.hide();
769 _this.projecteditbutton.el.hide();
770 _this.objectshowbutton.el.hide();
771 _this.addpropbutton.el.hide();
772 _this.addlistenerbutton.el.hide();
778 // show the add file button..
782 this.editpane.el.hide();
783 //this.rooview.el.hide();
784 this.left_projects.el.show();
786 var el = _this.rooview.el;
787 el.save_easing_state();
788 el.set_easing_duration(1000);
789 // show project / file view..
790 //_this.mainpane.lastWidth = _this.leftpane.el.get_position();
791 //_this.mainpane.el.set_position(0);
793 el.set_rotation_angle(Clutter.RotateAxis.Y_AXIS, 360.0f);
794 el.set_scale(0.0f,0.0f);
796 _this.state = "files";
797 if (_this.project != null) {
798 _this.left_projects.selectProject(_this.project);
800 //_this.clutterfiles.loadProject(_this.project);
802 el.restore_easing_state();
804 print("show view browsing");
806 public void showObject () {
809 // what's the active node on the left hand side..
811 var n = _this.left_tree.getActiveElement();
813 if (_this.left_tree.model.file == null) {
817 if (n == null && _this.left_tree.model.file.tree != null) {
821 _this.backbutton.el.show();
822 _this.projectbutton.el.hide();
823 _this.editfilebutton.el.hide();
824 _this.projecteditbutton.el.hide();
827 //this.rooview.el.hide();
828 this.rightpalete.el.show_all();
829 this.rightpalete.load(_this.left_tree.getActiveFile().palete(), n == null ? "*top" : n.fqn());
832 //this.rightpalete.show(this.project);
834 _this.objectview.el.save_easing_state();
836 var el = _this.rooview.el;
837 el.save_easing_state();
839 _this.clutterembed.setSizesAlloc("object");
842 _this.objectview.el.set_scale(1.0f,1.0f);
846 //_this.clutterfiles.loadProject(_this.project);
848 el.restore_easing_state();
849 _this.objectview.el.restore_easing_state();
850 this.state = "object";
852 public void hideObject () {
853 // return to editing state..
855 _this.projecteditbutton.el.show();
856 _this.backbutton.el.hide();
857 _this.projectbutton.el.show();
858 _this.editfilebutton.el.show();
859 _this.objectview.el.save_easing_state();
860 var el = _this.rooview.el;
861 el.save_easing_state();
864 el.set_scale(1.0f,1.0f);
865 _this.objectview.el.set_scale(0.0f,0.0f);
866 _this.state = "edit";
869 //_this.clutterfiles.loadProject(_this.project);
871 el.restore_easing_state();
872 _this.objectview.el.restore_easing_state();
876 public class Xcls_vbox : Object
879 private Xcls_MainWindow _this;
885 public Xcls_vbox(Xcls_MainWindow _owner )
889 this.el = new Gtk.VBox( false, 0 );
893 // set gobject values
894 var child_0 = new Xcls_mainpane( _this );
896 this.el.pack_end ( child_0.el , true,true,0 );
899 // user defined functions
901 public class Xcls_mainpane : Object
903 public Gtk.HPaned el;
904 private Xcls_MainWindow _this;
908 public int lastWidth;
911 public Xcls_mainpane(Xcls_MainWindow _owner )
914 _this.mainpane = this;
915 this.el = new Gtk.HPaned();
920 // set gobject values
921 this.el.position = 400;
922 var child_0 = new Xcls_leftpane( _this );
924 this.el.add1 ( child_0.el );
925 var child_1 = new Xcls_VBox8( _this );
927 this.el.add2 ( child_1.el );
930 // user defined functions
932 public class Xcls_leftpane : Object
935 private Xcls_MainWindow _this;
941 public Xcls_leftpane(Xcls_MainWindow _owner )
944 _this.leftpane = this;
945 this.el = new Gtk.VBox( true, 0 );
949 // set gobject values
950 var child_0 = new Xcls_editpane( _this );
952 this.el.pack_start ( child_0.el , false,true,0 );
955 // user defined functions
957 public class Xcls_editpane : Object
959 public Gtk.VPaned el;
960 private Xcls_MainWindow _this;
966 public Xcls_editpane(Xcls_MainWindow _owner )
969 _this.editpane = this;
970 this.el = new Gtk.VPaned();
974 // set gobject values
975 var child_0 = new Xcls_tree( _this );
977 this.el.add1 ( child_0.el );
978 var child_1 = new Xcls_props( _this );
980 this.el.add2 ( child_1.el );
983 // user defined functions
985 public class Xcls_tree : Object
988 private Xcls_MainWindow _this;
994 public Xcls_tree(Xcls_MainWindow _owner )
998 this.el = new Gtk.VBox( true, 0 );
1002 // set gobject values
1005 // user defined functions
1007 public class Xcls_props : Object
1010 private Xcls_MainWindow _this;
1016 public Xcls_props(Xcls_MainWindow _owner )
1020 this.el = new Gtk.VBox( true, 0 );
1024 // set gobject values
1027 // user defined functions
1029 public class Xcls_VBox8 : Object
1032 private Xcls_MainWindow _this;
1038 public Xcls_VBox8(Xcls_MainWindow _owner )
1041 this.el = new Gtk.VBox( true, 0 );
1045 // set gobject values
1046 var child_0 = new Xcls_clutterembed( _this );
1048 this.el.pack_start ( child_0.el , true,true,0 );
1051 // user defined functions
1053 public class Xcls_clutterembed : Object
1055 public GtkClutter.Embed el;
1056 private Xcls_MainWindow _this;
1062 public Xcls_clutterembed(Xcls_MainWindow _owner )
1065 _this.clutterembed = this;
1066 this.el = new GtkClutter.Embed();
1070 // set gobject values
1071 var child_0 = new Xcls_rooview( _this );
1073 this.el.get_stage().add_child ( child_0.el );
1074 var child_1 = new Xcls_objectview( _this );
1076 this.el.get_stage().add_child ( child_1.el );
1077 var child_2 = new Xcls_codeeditview( _this );
1079 this.el.get_stage().add_child ( child_2.el );
1080 var child_3 = new Xcls_addpropsview( _this );
1082 this.el.get_stage().add_child ( child_3.el );
1083 var child_4 = new Xcls_projecteditview( _this );
1085 this.el.get_stage().add_child ( child_4.el );
1086 var child_5 = new Xcls_buttonlayout( _this );
1088 this.el.get_stage().add_child ( child_5.el );
1092 var stage = this.el.get_stage();
1093 stage.set_background_color( Clutter.Color.from_string("#000"));
1095 this.el.size_allocate.connect( ( alloc) => {
1096 this.setSizes(alloc, _this.state);
1101 // user defined functions
1102 public void setSizes ( Gtk.Allocation alloc, string state) {
1103 if (!_this.children_loaded) { return; }
1105 _this.clutterfiles.set_size(alloc.width-50, alloc.height);
1107 // project view appears at top...
1109 _this.projecteditview.el.set_size(alloc.width-50, alloc.height / 2.0f);
1113 var avail = alloc.width < 50.0f ? 0 : alloc.width - 50.0f;
1116 var palsize = avail < 300.0f ? avail : 300.0f;
1117 print("set palsize size %f\n", palsize);
1118 // palate / props : fixed 300 pix
1120 _this.objectview.el.set_size(palsize, alloc.height);
1121 _this.addpropsview.el.set_size(palsize, alloc.height);
1125 // code edit min 600
1127 var codesize = avail < 800.0f ? avail : 800.0f;
1128 print("set code size %f\n", codesize);
1130 _this.codeeditview.el.set_size(codesize, alloc.height);
1131 _this.rooview.el.set_size(alloc.width-50, alloc.height);
1136 var scale = avail > 0.0f ? (avail - codesize -10 ) / avail : 0.0f;
1139 _this.rooview.el.set_scale(scale,scale);
1144 var scale = avail > 0.0f ? (avail - palsize -10 ) / avail : 0.0f;
1145 _this.rooview.el.set_scale(scale,scale);
1150 public void setSizesAlloc (string state) {
1152 Gtk.Allocation alloc;
1153 this.el.get_allocation(out alloc);
1154 this.setSizes(alloc, state);
1157 public class Xcls_rooview : Object
1159 public GtkClutter.Actor el;
1160 private Xcls_MainWindow _this;
1166 public Xcls_rooview(Xcls_MainWindow _owner )
1169 _this.rooview = this;
1170 this.el = new GtkClutter.Actor();
1174 // set gobject values
1181 this.el.add_constraint(
1182 new Clutter.AlignConstraint(
1183 _this.clutterembed.el.get_stage(),
1184 Clutter.AlignAxis.X_AXIS,
1189 //this.el.set_position(100,100);
1190 this.el.set_pivot_point(1.0f,1.0f);
1192 this.el.set_size(_this.clutterembed.el.get_stage().width-50,
1193 _this.clutterembed.el.get_stage().height);
1197 // user defined functions
1199 public class Xcls_objectview : Object
1201 public GtkClutter.Actor el;
1202 private Xcls_MainWindow _this;
1208 public Xcls_objectview(Xcls_MainWindow _owner )
1211 _this.objectview = this;
1212 this.el = new GtkClutter.Actor();
1216 // set gobject values
1223 this.el.add_constraint(
1224 new Clutter.AlignConstraint(
1225 _this.clutterembed.el.get_stage(),
1226 Clutter.AlignAxis.X_AXIS,
1231 this.el.fixed_x = 50.0f;
1232 this.el.fixed_y = 0.0f;
1233 //this.el.set_position(100,100);
1234 this.el.set_pivot_point(0.0f,0.0f);
1235 this.el.set_scale(0.0f,1.0f);
1236 this.el.set_size((_this.clutterembed.el.get_stage().width-50)/2,
1237 _this.clutterembed.el.get_stage().height);
1241 // user defined functions
1243 public class Xcls_codeeditview : Object
1245 public GtkClutter.Actor el;
1246 private Xcls_MainWindow _this;
1252 public Xcls_codeeditview(Xcls_MainWindow _owner )
1255 _this.codeeditview = this;
1256 this.el = new GtkClutter.Actor();
1260 // set gobject values
1267 this.el.add_constraint(
1268 new Clutter.AlignConstraint(
1269 _this.clutterembed.el.get_stage(),
1270 Clutter.AlignAxis.X_AXIS,
1275 this.el.fixed_x = 50.0f;
1276 this.el.fixed_y = 0.0f;
1277 //this.el.set_position(100,100);
1278 this.el.set_pivot_point(0.0f,0.0f);
1279 this.el.set_scale(0.0f,1.0f);
1280 this.el.set_size((_this.clutterembed.el.get_stage().width-50)/2,
1281 _this.clutterembed.el.get_stage().height);
1285 // user defined functions
1287 public class Xcls_addpropsview : Object
1289 public GtkClutter.Actor el;
1290 private Xcls_MainWindow _this;
1296 public Xcls_addpropsview(Xcls_MainWindow _owner )
1299 _this.addpropsview = this;
1300 this.el = new GtkClutter.Actor();
1304 // set gobject values
1311 this.el.add_constraint(
1312 new Clutter.AlignConstraint(
1313 _this.clutterembed.el.get_stage(),
1314 Clutter.AlignAxis.X_AXIS,
1319 this.el.fixed_x = 50.0f;
1320 this.el.fixed_y = 0.0f;
1321 //this.el.set_position(100,100);
1322 this.el.set_pivot_point(0.0f,0.0f);
1323 this.el.set_scale(0.0f,1.0f);
1324 this.el.set_size((_this.clutterembed.el.get_stage().width-50)/2,
1325 _this.clutterembed.el.get_stage().height);
1329 // user defined functions
1331 public class Xcls_projecteditview : Object
1333 public GtkClutter.Actor el;
1334 private Xcls_MainWindow _this;
1340 public Xcls_projecteditview(Xcls_MainWindow _owner )
1343 _this.projecteditview = this;
1344 this.el = new GtkClutter.Actor();
1348 // set gobject values
1355 this.el.add_constraint(
1356 new Clutter.AlignConstraint(
1357 _this.clutterembed.el.get_stage(),
1358 Clutter.AlignAxis.X_AXIS,
1363 //this.el.set_position(100,100);
1364 this.el.set_pivot_point(0.0f,0.0f);
1365 this.el.set_scale(1.0f,0.0f);
1366 this.el.set_size(_this.clutterembed.el.get_stage().width-50,
1367 _this.clutterembed.el.get_stage().height /2);
1371 // user defined functions
1373 public class Xcls_buttonlayout : Object
1375 public Clutter.Actor el;
1376 private Xcls_MainWindow _this;
1382 public Xcls_buttonlayout(Xcls_MainWindow _owner )
1385 _this.buttonlayout = this;
1386 this.el = new Clutter.Actor();
1390 // set gobject values
1391 var child_0 = new Xcls_BoxLayout16( _this );
1393 this.el.layout_manager = child_0.el;
1394 var child_1 = new Xcls_backbutton( _this );
1396 this.el.add_child ( child_1.el );
1397 var child_2 = new Xcls_projectbutton( _this );
1399 this.el.add_child ( child_2.el );
1400 var child_3 = new Xcls_editfilebutton( _this );
1402 this.el.add_child ( child_3.el );
1403 var child_4 = new Xcls_projecteditbutton( _this );
1405 this.el.add_child ( child_4.el );
1406 var child_5 = new Xcls_objectshowbutton( _this );
1408 this.el.add_child ( child_5.el );
1409 var child_6 = new Xcls_addpropbutton( _this );
1411 this.el.add_child ( child_6.el );
1412 var child_7 = new Xcls_addlistenerbutton( _this );
1414 this.el.add_child ( child_7.el );
1415 var child_8 = new Xcls_addprojectbutton( _this );
1417 this.el.add_child ( child_8.el );
1418 var child_9 = new Xcls_addfilebutton( _this );
1420 this.el.add_child ( child_9.el );
1421 var child_10 = new Xcls_delprojectbutton( _this );
1423 this.el.add_child ( child_10.el );
1424 var child_11 = new Xcls_new_window( _this );
1426 this.el.add_child ( child_11.el );
1432 this.el.add_constraint(
1433 new Clutter.AlignConstraint(
1434 _this.clutterembed.el.get_stage(),
1435 Clutter.AlignAxis.X_AXIS,
1441 //this.el.set_position(100,100);
1442 this.el.set_pivot_point(0.5f,0.5f);
1443 this.el.set_size(50,
1444 _this.clutterembed.el.get_stage().height);
1448 // user defined functions
1450 public class Xcls_BoxLayout16 : Object
1452 public Clutter.BoxLayout el;
1453 private Xcls_MainWindow _this;
1459 public Xcls_BoxLayout16(Xcls_MainWindow _owner )
1462 this.el = new Clutter.BoxLayout();
1466 // set gobject values
1467 this.el.orientation = Clutter.Orientation.VERTICAL;
1470 // user defined functions
1472 public class Xcls_backbutton : Object
1474 public Clutter.Actor el;
1475 private Xcls_MainWindow _this;
1481 public Xcls_backbutton(Xcls_MainWindow _owner )
1484 _this.backbutton = this;
1485 this.el = new Clutter.Actor();
1489 // set gobject values
1490 var child_0 = new Xcls_Actor18( _this );
1492 this.el.add_child ( child_0.el );
1496 this.el.set_size(50,50); }
1498 // user defined functions
1500 public class Xcls_Actor18 : Object
1502 public GtkClutter.Actor el;
1503 private Xcls_MainWindow _this;
1509 public Xcls_Actor18(Xcls_MainWindow _owner )
1512 this.el = new GtkClutter.Actor();
1516 // set gobject values
1517 var child_0 = new Xcls_Button19( _this );
1522 ((Gtk.Container)(this.el.get_widget())).add ( child_0.el); }
1524 // user defined functions
1526 public class Xcls_Button19 : Object
1528 public Gtk.Button el;
1529 private Xcls_MainWindow _this;
1535 public Xcls_Button19(Xcls_MainWindow _owner )
1538 this.el = new Gtk.Button();
1542 // set gobject values
1543 this.el.width_request = 50;
1544 this.el.height_request = 50;
1545 this.el.tooltip_text = "Back";
1546 var child_0 = new Xcls_Image20( _this );
1548 this.el.set_image ( child_0.el );
1551 this.el.clicked.connect( ( ) => {
1552 switch (_this.state) {
1555 _this.hideViewEditing();
1558 // should only occur if there is an active file..
1559 _this.showViewEditing();
1563 _this.hideAddProp();
1567 _this.hideAddListener();
1577 _this.hideCodeEdit();
1582 _this.hideProjectEdit();
1593 // user defined functions
1595 public class Xcls_Image20 : Object
1597 public Gtk.Image el;
1598 private Xcls_MainWindow _this;
1604 public Xcls_Image20(Xcls_MainWindow _owner )
1607 this.el = new Gtk.Image();
1611 // set gobject values
1612 this.el.icon_name = "go-previous";
1615 // user defined functions
1617 public class Xcls_projectbutton : Object
1619 public Clutter.Actor el;
1620 private Xcls_MainWindow _this;
1626 public Xcls_projectbutton(Xcls_MainWindow _owner )
1629 _this.projectbutton = this;
1630 this.el = new Clutter.Actor();
1634 // set gobject values
1635 var child_0 = new Xcls_Actor22( _this );
1637 this.el.add_child ( child_0.el );
1641 this.el.set_size(50,50); }
1643 // user defined functions
1645 public class Xcls_Actor22 : Object
1647 public GtkClutter.Actor el;
1648 private Xcls_MainWindow _this;
1654 public Xcls_Actor22(Xcls_MainWindow _owner )
1657 this.el = new GtkClutter.Actor();
1661 // set gobject values
1662 var child_0 = new Xcls_Button23( _this );
1667 ((Gtk.Container)(this.el.get_widget())).add ( child_0.el); }
1669 // user defined functions
1671 public class Xcls_Button23 : Object
1673 public Gtk.Button el;
1674 private Xcls_MainWindow _this;
1680 public Xcls_Button23(Xcls_MainWindow _owner )
1683 this.el = new Gtk.Button();
1687 // set gobject values
1688 this.el.width_request = 50;
1689 this.el.height_request = 50;
1690 var child_0 = new Xcls_Image24( _this );
1692 this.el.set_image ( child_0.el );
1695 this.el.clicked.connect( ( ) => {
1696 switch (_this.state) {
1699 _this.hideViewEditing();
1702 _this.showViewEditing();
1706 _this.hideAddProp();
1707 _this.hideViewEditing();
1710 _this.hideAddListener();
1711 _this.hideViewEditing();
1716 _this.hideViewEditing();
1727 // user defined functions
1729 public class Xcls_Image24 : Object
1731 public Gtk.Image el;
1732 private Xcls_MainWindow _this;
1738 public Xcls_Image24(Xcls_MainWindow _owner )
1741 this.el = new Gtk.Image();
1745 // set gobject values
1746 this.el.icon_name = "document-open";
1749 // user defined functions
1751 public class Xcls_editfilebutton : Object
1753 public Clutter.Actor el;
1754 private Xcls_MainWindow _this;
1760 public Xcls_editfilebutton(Xcls_MainWindow _owner )
1763 _this.editfilebutton = this;
1764 this.el = new Clutter.Actor();
1768 // set gobject values
1769 var child_0 = new Xcls_Actor26( _this );
1771 this.el.add_child ( child_0.el );
1775 this.el.set_size(50.0f,50.0f); }
1777 // user defined functions
1779 public class Xcls_Actor26 : Object
1781 public GtkClutter.Actor el;
1782 private Xcls_MainWindow _this;
1788 public Xcls_Actor26(Xcls_MainWindow _owner )
1791 this.el = new GtkClutter.Actor();
1795 // set gobject values
1796 var child_0 = new Xcls_Button27( _this );
1801 ((Gtk.Container)(this.el.get_widget())).add ( child_0.el); }
1803 // user defined functions
1805 public class Xcls_Button27 : Object
1807 public Gtk.Button el;
1808 private Xcls_MainWindow _this;
1814 public Xcls_Button27(Xcls_MainWindow _owner )
1817 this.el = new Gtk.Button();
1821 // set gobject values
1822 this.el.width_request = 50;
1823 this.el.height_request = 50;
1824 this.el.tooltip_text = "File Details";
1825 var child_0 = new Xcls_Image28( _this );
1827 this.el.set_image ( child_0.el );
1830 this.el.clicked.connect( ( ) => {
1832 // create a new file in project..
1833 if (_this.project == null || _this.left_tree.model.file == null) {
1837 _this.new_file_dialog.show(_this.left_tree.model.file);
1845 // user defined functions
1847 public class Xcls_Image28 : Object
1849 public Gtk.Image el;
1850 private Xcls_MainWindow _this;
1856 public Xcls_Image28(Xcls_MainWindow _owner )
1859 this.el = new Gtk.Image();
1863 // set gobject values
1864 this.el.icon_name = "document-properties";
1867 // user defined functions
1869 public class Xcls_projecteditbutton : Object
1871 public Clutter.Actor el;
1872 private Xcls_MainWindow _this;
1878 public Xcls_projecteditbutton(Xcls_MainWindow _owner )
1881 _this.projecteditbutton = this;
1882 this.el = new Clutter.Actor();
1886 // set gobject values
1887 var child_0 = new Xcls_Actor30( _this );
1889 this.el.add_child ( child_0.el );
1893 this.el.set_size(50,50); }
1895 // user defined functions
1897 public class Xcls_Actor30 : Object
1899 public GtkClutter.Actor el;
1900 private Xcls_MainWindow _this;
1906 public Xcls_Actor30(Xcls_MainWindow _owner )
1909 this.el = new GtkClutter.Actor();
1913 // set gobject values
1914 var child_0 = new Xcls_Button31( _this );
1919 ((Gtk.Container)(this.el.get_widget())).add ( child_0.el); }
1921 // user defined functions
1923 public class Xcls_Button31 : Object
1925 public Gtk.Button el;
1926 private Xcls_MainWindow _this;
1932 public Xcls_Button31(Xcls_MainWindow _owner )
1935 this.el = new Gtk.Button();
1939 // set gobject values
1940 this.el.width_request = 50;
1941 this.el.height_request = 50;
1942 this.el.tooltip_text = "Project Details";
1943 var child_0 = new Xcls_Image32( _this );
1945 this.el.set_image ( child_0.el );
1948 this.el.clicked.connect( ( ) => {
1949 switch (_this.state) {
1951 _this.showProjectEdit();
1954 // _this.showViewEditing();
1957 _this.hideProjectEdit();
1963 _this.hideAddProp();
1964 _this.showProjectEdit();
1967 _this.hideAddListener();
1968 _this.showProjectEdit();
1973 _this.showProjectEdit();
1984 // user defined functions
1986 public class Xcls_Image32 : Object
1988 public Gtk.Image el;
1989 private Xcls_MainWindow _this;
1995 public Xcls_Image32(Xcls_MainWindow _owner )
1998 this.el = new Gtk.Image();
2002 // set gobject values
2003 this.el.icon_name = "emblem-system";
2006 // user defined functions
2008 public class Xcls_objectshowbutton : Object
2010 public Clutter.Actor el;
2011 private Xcls_MainWindow _this;
2017 public Xcls_objectshowbutton(Xcls_MainWindow _owner )
2020 _this.objectshowbutton = this;
2021 this.el = new Clutter.Actor();
2025 // set gobject values
2026 var child_0 = new Xcls_Actor34( _this );
2028 this.el.add_child ( child_0.el );
2032 this.el.set_size(50,50);
2034 this.el.button_press_event.connect( ( ) => {
2038 switch (_this.state) {
2042 _this.hideAddProp();
2046 _this.hideAddListener();
2062 print("unhandled add objects from %s\n",_this.state);
2069 this.el.enter_event.connect( ( event) => {
2070 this.el.background_color = new Clutter.Color.from_string("#333");
2073 this.el.leave_event.connect( ( event) => {
2074 this.el.background_color = new Clutter.Color.from_string("#000");
2079 // user defined functions
2081 public class Xcls_Actor34 : Object
2083 public GtkClutter.Actor el;
2084 private Xcls_MainWindow _this;
2090 public Xcls_Actor34(Xcls_MainWindow _owner )
2093 this.el = new GtkClutter.Actor();
2097 // set gobject values
2098 var child_0 = new Xcls_Button35( _this );
2103 ((Gtk.Container)(this.el.get_widget())).add ( child_0.el); }
2105 // user defined functions
2107 public class Xcls_Button35 : Object
2109 public Gtk.Button el;
2110 private Xcls_MainWindow _this;
2116 public Xcls_Button35(Xcls_MainWindow _owner )
2119 this.el = new Gtk.Button();
2123 // set gobject values
2124 this.el.width_request = 50;
2125 this.el.height_request = 50;
2126 this.el.tooltip_text = "Add Child Element";
2127 var child_0 = new Xcls_Image36( _this );
2129 this.el.set_image ( child_0.el );
2132 this.el.clicked.connect( ( ) => {
2136 switch (_this.state) {
2140 _this.hideAddProp();
2144 _this.hideAddListener();
2160 print("unhandled add objects from %s\n",_this.state);
2169 // user defined functions
2171 public class Xcls_Image36 : Object
2173 public Gtk.Image el;
2174 private Xcls_MainWindow _this;
2180 public Xcls_Image36(Xcls_MainWindow _owner )
2183 this.el = new Gtk.Image();
2187 // set gobject values
2188 this.el.icon_name = "list-add";
2191 // user defined functions
2193 public class Xcls_addpropbutton : Object
2195 public Clutter.Actor el;
2196 private Xcls_MainWindow _this;
2202 public Xcls_addpropbutton(Xcls_MainWindow _owner )
2205 _this.addpropbutton = this;
2206 this.el = new Clutter.Actor();
2210 // set gobject values
2211 var child_0 = new Xcls_Actor38( _this );
2213 this.el.add_child ( child_0.el );
2217 this.el.set_size(50,50); }
2219 // user defined functions
2221 public class Xcls_Actor38 : Object
2223 public GtkClutter.Actor el;
2224 private Xcls_MainWindow _this;
2230 public Xcls_Actor38(Xcls_MainWindow _owner )
2233 this.el = new GtkClutter.Actor();
2237 // set gobject values
2238 var child_0 = new Xcls_Button39( _this );
2243 ((Gtk.Container)(this.el.get_widget())).add ( child_0.el); }
2245 // user defined functions
2247 public class Xcls_Button39 : Object
2249 public Gtk.Button el;
2250 private Xcls_MainWindow _this;
2256 public Xcls_Button39(Xcls_MainWindow _owner )
2259 this.el = new Gtk.Button();
2263 // set gobject values
2264 this.el.width_request = 50;
2265 this.el.height_request = 50;
2266 this.el.tooltip_text = "Add Property";
2267 var child_0 = new Xcls_Image40( _this );
2269 this.el.set_image ( child_0.el );
2272 this.el.clicked.connect( ( ) => {
2276 switch (_this.state) {
2278 _this.showAddProp();
2283 _this.showAddProp();
2287 _this.hideAddListener();
2288 _this.showAddProp();
2293 _this.hideAddProp();
2297 print("unhandled add property from %s\n",_this.state);
2307 // user defined functions
2309 public class Xcls_Image40 : Object
2311 public Gtk.Image el;
2312 private Xcls_MainWindow _this;
2318 public Xcls_Image40(Xcls_MainWindow _owner )
2321 this.el = new Gtk.Image();
2325 // set gobject values
2326 this.el.icon_name = "format-justify-left";
2329 // user defined functions
2331 public class Xcls_addlistenerbutton : Object
2333 public Clutter.Actor el;
2334 private Xcls_MainWindow _this;
2340 public Xcls_addlistenerbutton(Xcls_MainWindow _owner )
2343 _this.addlistenerbutton = this;
2344 this.el = new Clutter.Actor();
2348 // set gobject values
2349 var child_0 = new Xcls_Actor42( _this );
2351 this.el.add_child ( child_0.el );
2355 this.el.set_size(50,50); }
2357 // user defined functions
2359 public class Xcls_Actor42 : Object
2361 public GtkClutter.Actor el;
2362 private Xcls_MainWindow _this;
2368 public Xcls_Actor42(Xcls_MainWindow _owner )
2371 this.el = new GtkClutter.Actor();
2375 // set gobject values
2376 var child_0 = new Xcls_Button43( _this );
2381 ((Gtk.Container)(this.el.get_widget())).add ( child_0.el); }
2383 // user defined functions
2385 public class Xcls_Button43 : Object
2387 public Gtk.Button el;
2388 private Xcls_MainWindow _this;
2394 public Xcls_Button43(Xcls_MainWindow _owner )
2397 this.el = new Gtk.Button();
2401 // set gobject values
2402 this.el.width_request = 50;
2403 this.el.height_request = 50;
2404 this.el.tooltip_text = "Add Event Code";
2405 var child_0 = new Xcls_Image44( _this );
2407 this.el.set_image ( child_0.el );
2410 this.el.clicked.connect( ( ) => {
2414 switch (_this.state) {
2416 _this.showAddListener();
2421 _this.hideAddListener();
2426 _this.hideAddProp();
2427 _this.showAddListener();
2431 _this.showAddListener();
2435 print("unhandled add listener from %s\n",_this.state);
2446 // user defined functions
2448 public class Xcls_Image44 : Object
2450 public Gtk.Image el;
2451 private Xcls_MainWindow _this;
2457 public Xcls_Image44(Xcls_MainWindow _owner )
2460 this.el = new Gtk.Image();
2464 // set gobject values
2465 this.el.icon_name = "appointment-new";
2468 // user defined functions
2470 public class Xcls_addprojectbutton : Object
2472 public Clutter.Actor el;
2473 private Xcls_MainWindow _this;
2479 public Xcls_addprojectbutton(Xcls_MainWindow _owner )
2482 _this.addprojectbutton = this;
2483 this.el = new Clutter.Actor();
2487 // set gobject values
2488 var child_0 = new Xcls_Actor46( _this );
2490 this.el.add_child ( child_0.el );
2494 this.el.set_size(50.0f,50.0f); }
2496 // user defined functions
2498 public class Xcls_Actor46 : Object
2500 public GtkClutter.Actor el;
2501 private Xcls_MainWindow _this;
2507 public Xcls_Actor46(Xcls_MainWindow _owner )
2510 this.el = new GtkClutter.Actor();
2514 // set gobject values
2515 var child_0 = new Xcls_Button47( _this );
2520 ((Gtk.Container)(this.el.get_widget())).add ( child_0.el); }
2522 // user defined functions
2524 public class Xcls_Button47 : Object
2526 public Gtk.Button el;
2527 private Xcls_MainWindow _this;
2533 public Xcls_Button47(Xcls_MainWindow _owner )
2536 this.el = new Gtk.Button();
2540 // set gobject values
2541 this.el.width_request = 50;
2542 this.el.height_request = 50;
2543 this.el.tooltip_text = "New\nProj.";
2544 var child_0 = new Xcls_Image48( _this );
2546 this.el.set_image ( child_0.el );
2549 this.el.clicked.connect( ( ) => {
2551 // create a new file in project..
2552 //Xcls_DialogNewComponent.singleton().show(
2553 var pe = Xcls_EditProject.singleton();
2554 pe.el.set_transient_for(_this.el);
2555 pe.el.set_modal(true);
2562 _this.left_projects.is_loaded = false;
2563 _this.left_projects.load();
2564 _this.left_projects.selectProject(p);
2571 // user defined functions
2573 public class Xcls_Image48 : Object
2575 public Gtk.Image el;
2576 private Xcls_MainWindow _this;
2582 public Xcls_Image48(Xcls_MainWindow _owner )
2585 this.el = new Gtk.Image();
2589 // set gobject values
2590 this.el.icon_name = "folder-new";
2593 // user defined functions
2595 public class Xcls_addfilebutton : Object
2597 public Clutter.Actor el;
2598 private Xcls_MainWindow _this;
2604 public Xcls_addfilebutton(Xcls_MainWindow _owner )
2607 _this.addfilebutton = this;
2608 this.el = new Clutter.Actor();
2612 // set gobject values
2613 var child_0 = new Xcls_Actor50( _this );
2615 this.el.add_child ( child_0.el );
2619 this.el.set_size(50.0f,50.0f); }
2621 // user defined functions
2623 public class Xcls_Actor50 : Object
2625 public GtkClutter.Actor el;
2626 private Xcls_MainWindow _this;
2632 public Xcls_Actor50(Xcls_MainWindow _owner )
2635 this.el = new GtkClutter.Actor();
2639 // set gobject values
2640 var child_0 = new Xcls_Button51( _this );
2645 ((Gtk.Container)(this.el.get_widget())).add ( child_0.el); }
2647 // user defined functions
2649 public class Xcls_Button51 : Object
2651 public Gtk.Button el;
2652 private Xcls_MainWindow _this;
2658 public Xcls_Button51(Xcls_MainWindow _owner )
2661 this.el = new Gtk.Button();
2665 // set gobject values
2666 this.el.width_request = 50;
2667 this.el.height_request = 50;
2668 this.el.tooltip_text = "Add File";
2669 var child_0 = new Xcls_Image52( _this );
2671 this.el.set_image ( child_0.el );
2674 this.el.clicked.connect( () => {
2675 // create a new file in project..
2677 // what's the currently selected project...
2678 var proj = _this.left_projects.getSelectedProject();
2686 var f = JsRender.JsRender.factory(proj.xtype, proj, "");
2687 _this.project = proj;
2688 _this.new_file_dialog.show(f);
2694 // user defined functions
2696 public class Xcls_Image52 : Object
2698 public Gtk.Image el;
2699 private Xcls_MainWindow _this;
2705 public Xcls_Image52(Xcls_MainWindow _owner )
2708 this.el = new Gtk.Image();
2712 // set gobject values
2713 this.el.icon_name = "document-new";
2716 // user defined functions
2718 public class Xcls_delprojectbutton : Object
2720 public Clutter.Actor el;
2721 private Xcls_MainWindow _this;
2727 public Xcls_delprojectbutton(Xcls_MainWindow _owner )
2730 _this.delprojectbutton = this;
2731 this.el = new Clutter.Actor();
2735 // set gobject values
2736 var child_0 = new Xcls_Actor54( _this );
2738 this.el.add_child ( child_0.el );
2742 this.el.set_size(50,50); }
2744 // user defined functions
2746 public class Xcls_Actor54 : Object
2748 public GtkClutter.Actor el;
2749 private Xcls_MainWindow _this;
2755 public Xcls_Actor54(Xcls_MainWindow _owner )
2758 this.el = new GtkClutter.Actor();
2762 // set gobject values
2763 var child_0 = new Xcls_Button55( _this );
2768 ((Gtk.Container)(this.el.get_widget())).add ( child_0.el); }
2770 // user defined functions
2772 public class Xcls_Button55 : Object
2774 public Gtk.Button el;
2775 private Xcls_MainWindow _this;
2781 public Xcls_Button55(Xcls_MainWindow _owner )
2784 this.el = new Gtk.Button();
2788 // set gobject values
2789 this.el.width_request = 50;
2790 this.el.height_request = 50;
2791 this.el.tooltip_text = "Delelte Project";
2792 var child_0 = new Xcls_Image56( _this );
2794 this.el.set_image ( child_0.el );
2797 this.el.clicked.connect( ( ) => {
2799 var cd = DialogConfirm.singleton();
2800 cd.el.set_transient_for(_this.el);
2801 cd.el.set_modal(true);
2803 var project = _this.left_projects.getSelectedProject();
2804 if (project == null) {
2805 print("SKIP - no project\n");
2810 if (Gtk.ResponseType.YES != cd.show("Confirm",
2811 "Are you sure you want to delete project %s".printf(project.name))) {
2817 Project.Project.remove(project);
2818 _this.project = null;
2820 _this.left_projects.is_loaded = false;
2821 _this.left_projects.load();
2822 _this.clutterfiles.clearFiles();
2827 // user defined functions
2829 public class Xcls_Image56 : Object
2831 public Gtk.Image el;
2832 private Xcls_MainWindow _this;
2838 public Xcls_Image56(Xcls_MainWindow _owner )
2841 this.el = new Gtk.Image();
2845 // set gobject values
2846 this.el.icon_name = "user-trash";
2849 // user defined functions
2851 public class Xcls_new_window : Object
2853 public Clutter.Actor el;
2854 private Xcls_MainWindow _this;
2860 public Xcls_new_window(Xcls_MainWindow _owner )
2863 _this.new_window = this;
2864 this.el = new Clutter.Actor();
2868 // set gobject values
2869 var child_0 = new Xcls_Actor58( _this );
2871 this.el.add_child ( child_0.el );
2875 this.el.set_size(50,50); }
2877 // user defined functions
2879 public class Xcls_Actor58 : Object
2881 public GtkClutter.Actor el;
2882 private Xcls_MainWindow _this;
2888 public Xcls_Actor58(Xcls_MainWindow _owner )
2891 this.el = new GtkClutter.Actor();
2895 // set gobject values
2896 var child_0 = new Xcls_Button59( _this );
2901 ((Gtk.Container)(this.el.get_widget())).add ( child_0.el); }
2903 // user defined functions
2905 public class Xcls_Button59 : Object
2907 public Gtk.Button el;
2908 private Xcls_MainWindow _this;
2914 public Xcls_Button59(Xcls_MainWindow _owner )
2917 this.el = new Gtk.Button();
2921 // set gobject values
2922 this.el.width_request = 50;
2923 this.el.height_request = 50;
2924 this.el.tooltip_text = "Open New Window";
2925 var child_0 = new Xcls_Image60( _this );
2927 this.el.set_image ( child_0.el );
2930 this.el.clicked.connect( ( ) => {
2931 Xcls_MainWindow.singleton().no_windows++;
2932 var w = new Xcls_MainWindow();
2937 w.hideViewEditing();
2941 // user defined functions
2943 public class Xcls_Image60 : Object
2945 public Gtk.Image el;
2946 private Xcls_MainWindow _this;
2952 public Xcls_Image60(Xcls_MainWindow _owner )
2955 this.el = new Gtk.Image();
2959 // set gobject values
2960 this.el.icon_name = "window-new";
2963 // user defined functions