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();
267 this.vala_projectsettings.window = this;
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();
569 if (this.project.xtype == "Roo") {
571 //this.projectsettings.show(this.project);
574 this.vala_projectsettings.project.writeConfig();
576 _this.projecteditview.el.save_easing_state();
577 var el = _this.rooview.el;
578 el.save_easing_state();
581 el.set_scale(1.0f,1.0f);
582 _this.projecteditview.el.set_scale(1.0f,0.0f);
583 _this.state = "edit";
586 //_this.clutterfiles.loadProject(_this.project);
588 el.restore_easing_state();
589 _this.projecteditview.el.restore_easing_state();
592 public void showProjectEdit () {
593 // make the browser smaller, and show the edit dialog
596 _this.projectbutton.el.hide();
597 _this.projecteditbutton.el.hide();
598 _this.editfilebutton.el.hide();
600 _this.backbutton.el.show();
602 //this.rooview.el.hide();
605 if (this.project.xtype == "Roo") {
606 this.projectsettings.el.show_all();
607 this.projectsettings.show(this.project);
609 this.vala_projectsettings.el.show_all();
610 this.vala_projectsettings.show((Project.Gtk)this.project);
612 _this.projecteditview.el.save_easing_state();
614 var el = _this.rooview.el;
615 el.save_easing_state();
618 el.set_scale(0.5f,0.5f);
620 _this.projecteditview.el.set_scale(1.0f,1.0f);
622 _this.state = "projectedit";
625 //_this.clutterfiles.loadProject(_this.project);
627 el.restore_easing_state();
628 _this.projecteditview.el.restore_easing_state();
629 // print("show view browsing");
632 public void showAddListener () {
636 var ae = this.left_tree.getActiveElement();
641 _this.backbutton.el.show();
642 _this.projectbutton.el.hide();
643 _this.editfilebutton.el.hide();
644 _this.projecteditbutton.el.hide();
647 //this.rooview.el.hide();
648 this.add_props.el.show_all();
650 Palete.factory(this.project.xtype),
654 //this.rightpalete.show(this.project);
656 _this.addpropsview.el.save_easing_state();
658 var el = _this.rooview.el;
659 el.save_easing_state();
661 _this.clutterembed.setSizesAlloc("addlistener");
666 _this.addpropsview.el.set_scale(1.0f,1.0f);
670 //_this.clutterfiles.loadProject(_this.project);
672 el.restore_easing_state();
673 _this.addpropsview.el.restore_easing_state();
674 this.state = "addlistener";
676 public void hideAddProp () {
677 _this.backbutton.el.hide();
678 _this.projectbutton.el.show();
679 _this.projecteditbutton.el.show();
680 _this.editfilebutton.el.show();
681 _this.addpropsview.el.save_easing_state();
683 var el = _this.rooview.el;
684 el.save_easing_state();
687 el.set_scale(1.0f,1.0f);
688 _this.addpropsview.el.set_scale(0.0f,0.0f);
689 _this.state = "edit";
692 //_this.clutterfiles.loadProject(_this.project);
694 el.restore_easing_state();
695 _this.addpropsview.el.restore_easing_state();
697 public void showCodeEdit (JsRender.JsRender file, JsRender.Node node, string ptype, string key)
699 // this is a bit different,
700 // it's not called via a button - but triggered by the prop edit class signal.
701 // so it has to hide any other state..
711 this.hideAddListener();
715 _this.backbutton.el.show();
717 _this.projectbutton.el.hide();
718 _this.editfilebutton.el.hide();
719 _this.projecteditbutton.el.hide();
722 //this.rooview.el.hide();
723 this.code_editor.el.show_all();
724 this.code_editor.show(
731 _this.codeeditview.el.save_easing_state();
733 var el = _this.rooview.el;
734 el.save_easing_state();
735 _this.clutterembed.setSizesAlloc("codedit");
737 _this.codeeditview.el.set_scale(1.0f,1.0f);
741 //_this.clutterfiles.loadProject(_this.project);
743 el.restore_easing_state();
744 _this.codeeditview.el.restore_easing_state();
745 this.state = "codeedit";
747 public void setTitle (string str) {
748 this.el.set_title(this.title + " - " + str);
750 public void show () {
751 this.left_tree =new Xcls_WindowLeftTree();
752 _this.vbox.el.pack_start(this.left_tree.el,true, true,0);
756 public void hideViewEditing ( ) {
758 // show the file navigation...
760 if (this.left_tree.getActiveFile() != null) {
761 if (this.left_tree.getActiveFile().xtype == "Roo" ) {
762 this.window_rooview.createThumb();
764 this.window_gladeview.createThumb();
768 _this.addprojectbutton.el.show();
769 _this.addfilebutton.el.show();
770 _this.backbutton.el.show();
771 _this.delprojectbutton.el.show();
772 _this.new_window.el.show();
774 _this.editfilebutton.el.hide();
775 _this.projectbutton.el.hide();
776 _this.projecteditbutton.el.hide();
777 _this.objectshowbutton.el.hide();
778 _this.addpropbutton.el.hide();
779 _this.addlistenerbutton.el.hide();
785 // show the add file button..
789 this.editpane.el.hide();
790 //this.rooview.el.hide();
791 this.left_projects.el.show();
793 var el = _this.rooview.el;
794 el.save_easing_state();
795 el.set_easing_duration(1000);
796 // show project / file view..
797 //_this.mainpane.lastWidth = _this.leftpane.el.get_position();
798 //_this.mainpane.el.set_position(0);
800 el.set_rotation_angle(Clutter.RotateAxis.Y_AXIS, 360.0f);
801 el.set_scale(0.0f,0.0f);
803 _this.state = "files";
804 if (_this.project != null) {
805 _this.left_projects.selectProject(_this.project);
807 //_this.clutterfiles.loadProject(_this.project);
809 el.restore_easing_state();
811 print("show view browsing");
813 public void showObject () {
816 // what's the active node on the left hand side..
818 var n = _this.left_tree.getActiveElement();
820 if (_this.left_tree.model.file == null) {
824 if (n == null && _this.left_tree.model.file.tree != null) {
828 _this.backbutton.el.show();
829 _this.projectbutton.el.hide();
830 _this.editfilebutton.el.hide();
831 _this.projecteditbutton.el.hide();
834 //this.rooview.el.hide();
835 this.rightpalete.el.show_all();
836 this.rightpalete.load(_this.left_tree.getActiveFile().palete(), n == null ? "*top" : n.fqn());
839 //this.rightpalete.show(this.project);
841 _this.objectview.el.save_easing_state();
843 var el = _this.rooview.el;
844 el.save_easing_state();
846 _this.clutterembed.setSizesAlloc("object");
849 _this.objectview.el.set_scale(1.0f,1.0f);
853 //_this.clutterfiles.loadProject(_this.project);
855 el.restore_easing_state();
856 _this.objectview.el.restore_easing_state();
857 this.state = "object";
859 public void hideObject () {
860 // return to editing state..
862 _this.projecteditbutton.el.show();
863 _this.backbutton.el.hide();
864 _this.projectbutton.el.show();
865 _this.editfilebutton.el.show();
866 _this.objectview.el.save_easing_state();
867 var el = _this.rooview.el;
868 el.save_easing_state();
871 el.set_scale(1.0f,1.0f);
872 _this.objectview.el.set_scale(0.0f,0.0f);
873 _this.state = "edit";
876 //_this.clutterfiles.loadProject(_this.project);
878 el.restore_easing_state();
879 _this.objectview.el.restore_easing_state();
883 public class Xcls_vbox : Object
886 private Xcls_MainWindow _this;
892 public Xcls_vbox(Xcls_MainWindow _owner )
896 this.el = new Gtk.VBox( false, 0 );
900 // set gobject values
901 var child_0 = new Xcls_mainpane( _this );
903 this.el.pack_end ( child_0.el , true,true,0 );
906 // user defined functions
908 public class Xcls_mainpane : Object
910 public Gtk.HPaned el;
911 private Xcls_MainWindow _this;
915 public int lastWidth;
918 public Xcls_mainpane(Xcls_MainWindow _owner )
921 _this.mainpane = this;
922 this.el = new Gtk.HPaned();
927 // set gobject values
928 this.el.position = 400;
929 var child_0 = new Xcls_leftpane( _this );
931 this.el.add1 ( child_0.el );
932 var child_1 = new Xcls_VBox8( _this );
934 this.el.add2 ( child_1.el );
937 // user defined functions
939 public class Xcls_leftpane : Object
942 private Xcls_MainWindow _this;
948 public Xcls_leftpane(Xcls_MainWindow _owner )
951 _this.leftpane = this;
952 this.el = new Gtk.VBox( true, 0 );
956 // set gobject values
957 var child_0 = new Xcls_editpane( _this );
959 this.el.pack_start ( child_0.el , false,true,0 );
962 // user defined functions
964 public class Xcls_editpane : Object
966 public Gtk.VPaned el;
967 private Xcls_MainWindow _this;
973 public Xcls_editpane(Xcls_MainWindow _owner )
976 _this.editpane = this;
977 this.el = new Gtk.VPaned();
981 // set gobject values
982 var child_0 = new Xcls_tree( _this );
984 this.el.add1 ( child_0.el );
985 var child_1 = new Xcls_props( _this );
987 this.el.add2 ( child_1.el );
990 // user defined functions
992 public class Xcls_tree : Object
995 private Xcls_MainWindow _this;
1001 public Xcls_tree(Xcls_MainWindow _owner )
1005 this.el = new Gtk.VBox( true, 0 );
1009 // set gobject values
1012 // user defined functions
1014 public class Xcls_props : Object
1017 private Xcls_MainWindow _this;
1023 public Xcls_props(Xcls_MainWindow _owner )
1027 this.el = new Gtk.VBox( true, 0 );
1031 // set gobject values
1034 // user defined functions
1036 public class Xcls_VBox8 : Object
1039 private Xcls_MainWindow _this;
1045 public Xcls_VBox8(Xcls_MainWindow _owner )
1048 this.el = new Gtk.VBox( true, 0 );
1052 // set gobject values
1053 var child_0 = new Xcls_clutterembed( _this );
1055 this.el.pack_start ( child_0.el , true,true,0 );
1058 // user defined functions
1060 public class Xcls_clutterembed : Object
1062 public GtkClutter.Embed el;
1063 private Xcls_MainWindow _this;
1069 public Xcls_clutterembed(Xcls_MainWindow _owner )
1072 _this.clutterembed = this;
1073 this.el = new GtkClutter.Embed();
1077 // set gobject values
1078 var child_0 = new Xcls_rooview( _this );
1080 this.el.get_stage().add_child ( child_0.el );
1081 var child_1 = new Xcls_objectview( _this );
1083 this.el.get_stage().add_child ( child_1.el );
1084 var child_2 = new Xcls_codeeditview( _this );
1086 this.el.get_stage().add_child ( child_2.el );
1087 var child_3 = new Xcls_addpropsview( _this );
1089 this.el.get_stage().add_child ( child_3.el );
1090 var child_4 = new Xcls_projecteditview( _this );
1092 this.el.get_stage().add_child ( child_4.el );
1093 var child_5 = new Xcls_buttonlayout( _this );
1095 this.el.get_stage().add_child ( child_5.el );
1099 var stage = this.el.get_stage();
1100 stage.set_background_color( Clutter.Color.from_string("#000"));
1102 this.el.size_allocate.connect( ( alloc) => {
1103 this.setSizes(alloc, _this.state);
1108 // user defined functions
1109 public void setSizes ( Gtk.Allocation alloc, string state) {
1110 if (!_this.children_loaded) { return; }
1112 _this.clutterfiles.set_size(alloc.width-50, alloc.height);
1114 // project view appears at top...
1116 _this.projecteditview.el.set_size(alloc.width-50, alloc.height / 2.0f);
1120 var avail = alloc.width < 50.0f ? 0 : alloc.width - 50.0f;
1123 var palsize = avail < 300.0f ? avail : 300.0f;
1124 print("set palsize size %f\n", palsize);
1125 // palate / props : fixed 300 pix
1127 _this.objectview.el.set_size(palsize, alloc.height);
1128 _this.addpropsview.el.set_size(palsize, alloc.height);
1132 // code edit min 600
1134 var codesize = avail < 800.0f ? avail : 800.0f;
1135 print("set code size %f\n", codesize);
1137 _this.codeeditview.el.set_size(codesize, alloc.height);
1138 _this.rooview.el.set_size(alloc.width-50, alloc.height);
1143 var scale = avail > 0.0f ? (avail - codesize -10 ) / avail : 0.0f;
1146 _this.rooview.el.set_scale(scale,scale);
1151 var scale = avail > 0.0f ? (avail - palsize -10 ) / avail : 0.0f;
1152 _this.rooview.el.set_scale(scale,scale);
1157 public void setSizesAlloc (string state) {
1159 Gtk.Allocation alloc;
1160 this.el.get_allocation(out alloc);
1161 this.setSizes(alloc, state);
1164 public class Xcls_rooview : Object
1166 public GtkClutter.Actor el;
1167 private Xcls_MainWindow _this;
1173 public Xcls_rooview(Xcls_MainWindow _owner )
1176 _this.rooview = this;
1177 this.el = new GtkClutter.Actor();
1181 // set gobject values
1188 this.el.add_constraint(
1189 new Clutter.AlignConstraint(
1190 _this.clutterembed.el.get_stage(),
1191 Clutter.AlignAxis.X_AXIS,
1196 //this.el.set_position(100,100);
1197 this.el.set_pivot_point(1.0f,1.0f);
1199 this.el.set_size(_this.clutterembed.el.get_stage().width-50,
1200 _this.clutterembed.el.get_stage().height);
1204 // user defined functions
1206 public class Xcls_objectview : Object
1208 public GtkClutter.Actor el;
1209 private Xcls_MainWindow _this;
1215 public Xcls_objectview(Xcls_MainWindow _owner )
1218 _this.objectview = this;
1219 this.el = new GtkClutter.Actor();
1223 // set gobject values
1230 this.el.add_constraint(
1231 new Clutter.AlignConstraint(
1232 _this.clutterembed.el.get_stage(),
1233 Clutter.AlignAxis.X_AXIS,
1238 this.el.fixed_x = 50.0f;
1239 this.el.fixed_y = 0.0f;
1240 //this.el.set_position(100,100);
1241 this.el.set_pivot_point(0.0f,0.0f);
1242 this.el.set_scale(0.0f,1.0f);
1243 this.el.set_size((_this.clutterembed.el.get_stage().width-50)/2,
1244 _this.clutterembed.el.get_stage().height);
1248 // user defined functions
1250 public class Xcls_codeeditview : Object
1252 public GtkClutter.Actor el;
1253 private Xcls_MainWindow _this;
1259 public Xcls_codeeditview(Xcls_MainWindow _owner )
1262 _this.codeeditview = this;
1263 this.el = new GtkClutter.Actor();
1267 // set gobject values
1274 this.el.add_constraint(
1275 new Clutter.AlignConstraint(
1276 _this.clutterembed.el.get_stage(),
1277 Clutter.AlignAxis.X_AXIS,
1282 this.el.fixed_x = 50.0f;
1283 this.el.fixed_y = 0.0f;
1284 //this.el.set_position(100,100);
1285 this.el.set_pivot_point(0.0f,0.0f);
1286 this.el.set_scale(0.0f,1.0f);
1287 this.el.set_size((_this.clutterembed.el.get_stage().width-50)/2,
1288 _this.clutterembed.el.get_stage().height);
1292 // user defined functions
1294 public class Xcls_addpropsview : Object
1296 public GtkClutter.Actor el;
1297 private Xcls_MainWindow _this;
1303 public Xcls_addpropsview(Xcls_MainWindow _owner )
1306 _this.addpropsview = this;
1307 this.el = new GtkClutter.Actor();
1311 // set gobject values
1318 this.el.add_constraint(
1319 new Clutter.AlignConstraint(
1320 _this.clutterembed.el.get_stage(),
1321 Clutter.AlignAxis.X_AXIS,
1326 this.el.fixed_x = 50.0f;
1327 this.el.fixed_y = 0.0f;
1328 //this.el.set_position(100,100);
1329 this.el.set_pivot_point(0.0f,0.0f);
1330 this.el.set_scale(0.0f,1.0f);
1331 this.el.set_size((_this.clutterembed.el.get_stage().width-50)/2,
1332 _this.clutterembed.el.get_stage().height);
1336 // user defined functions
1338 public class Xcls_projecteditview : Object
1340 public GtkClutter.Actor el;
1341 private Xcls_MainWindow _this;
1347 public Xcls_projecteditview(Xcls_MainWindow _owner )
1350 _this.projecteditview = this;
1351 this.el = new GtkClutter.Actor();
1355 // set gobject values
1362 this.el.add_constraint(
1363 new Clutter.AlignConstraint(
1364 _this.clutterembed.el.get_stage(),
1365 Clutter.AlignAxis.X_AXIS,
1370 //this.el.set_position(100,100);
1371 this.el.set_pivot_point(0.0f,0.0f);
1372 this.el.set_scale(1.0f,0.0f);
1373 this.el.set_size(_this.clutterembed.el.get_stage().width-50,
1374 _this.clutterembed.el.get_stage().height /2);
1378 // user defined functions
1380 public class Xcls_buttonlayout : Object
1382 public Clutter.Actor el;
1383 private Xcls_MainWindow _this;
1389 public Xcls_buttonlayout(Xcls_MainWindow _owner )
1392 _this.buttonlayout = this;
1393 this.el = new Clutter.Actor();
1397 // set gobject values
1398 var child_0 = new Xcls_BoxLayout16( _this );
1400 this.el.layout_manager = child_0.el;
1401 var child_1 = new Xcls_backbutton( _this );
1403 this.el.add_child ( child_1.el );
1404 var child_2 = new Xcls_projectbutton( _this );
1406 this.el.add_child ( child_2.el );
1407 var child_3 = new Xcls_editfilebutton( _this );
1409 this.el.add_child ( child_3.el );
1410 var child_4 = new Xcls_projecteditbutton( _this );
1412 this.el.add_child ( child_4.el );
1413 var child_5 = new Xcls_objectshowbutton( _this );
1415 this.el.add_child ( child_5.el );
1416 var child_6 = new Xcls_addpropbutton( _this );
1418 this.el.add_child ( child_6.el );
1419 var child_7 = new Xcls_addlistenerbutton( _this );
1421 this.el.add_child ( child_7.el );
1422 var child_8 = new Xcls_addprojectbutton( _this );
1424 this.el.add_child ( child_8.el );
1425 var child_9 = new Xcls_addfilebutton( _this );
1427 this.el.add_child ( child_9.el );
1428 var child_10 = new Xcls_delprojectbutton( _this );
1430 this.el.add_child ( child_10.el );
1431 var child_11 = new Xcls_new_window( _this );
1433 this.el.add_child ( child_11.el );
1439 this.el.add_constraint(
1440 new Clutter.AlignConstraint(
1441 _this.clutterembed.el.get_stage(),
1442 Clutter.AlignAxis.X_AXIS,
1448 //this.el.set_position(100,100);
1449 this.el.set_pivot_point(0.5f,0.5f);
1450 this.el.set_size(50,
1451 _this.clutterembed.el.get_stage().height);
1455 // user defined functions
1457 public class Xcls_BoxLayout16 : Object
1459 public Clutter.BoxLayout el;
1460 private Xcls_MainWindow _this;
1466 public Xcls_BoxLayout16(Xcls_MainWindow _owner )
1469 this.el = new Clutter.BoxLayout();
1473 // set gobject values
1474 this.el.orientation = Clutter.Orientation.VERTICAL;
1477 // user defined functions
1479 public class Xcls_backbutton : Object
1481 public Clutter.Actor el;
1482 private Xcls_MainWindow _this;
1488 public Xcls_backbutton(Xcls_MainWindow _owner )
1491 _this.backbutton = this;
1492 this.el = new Clutter.Actor();
1496 // set gobject values
1497 var child_0 = new Xcls_Actor18( _this );
1499 this.el.add_child ( child_0.el );
1503 this.el.set_size(50,50); }
1505 // user defined functions
1507 public class Xcls_Actor18 : Object
1509 public GtkClutter.Actor el;
1510 private Xcls_MainWindow _this;
1516 public Xcls_Actor18(Xcls_MainWindow _owner )
1519 this.el = new GtkClutter.Actor();
1523 // set gobject values
1524 var child_0 = new Xcls_Button19( _this );
1529 ((Gtk.Container)(this.el.get_widget())).add ( child_0.el); }
1531 // user defined functions
1533 public class Xcls_Button19 : Object
1535 public Gtk.Button el;
1536 private Xcls_MainWindow _this;
1542 public Xcls_Button19(Xcls_MainWindow _owner )
1545 this.el = new Gtk.Button();
1549 // set gobject values
1550 this.el.width_request = 50;
1551 this.el.height_request = 50;
1552 this.el.tooltip_text = "Back";
1553 var child_0 = new Xcls_Image20( _this );
1555 this.el.set_image ( child_0.el );
1558 this.el.clicked.connect( ( ) => {
1559 switch (_this.state) {
1562 _this.hideViewEditing();
1565 // should only occur if there is an active file..
1566 _this.showViewEditing();
1570 _this.hideAddProp();
1574 _this.hideAddListener();
1584 _this.hideCodeEdit();
1589 _this.hideProjectEdit();
1600 // user defined functions
1602 public class Xcls_Image20 : Object
1604 public Gtk.Image el;
1605 private Xcls_MainWindow _this;
1611 public Xcls_Image20(Xcls_MainWindow _owner )
1614 this.el = new Gtk.Image();
1618 // set gobject values
1619 this.el.icon_name = "go-previous";
1622 // user defined functions
1624 public class Xcls_projectbutton : Object
1626 public Clutter.Actor el;
1627 private Xcls_MainWindow _this;
1633 public Xcls_projectbutton(Xcls_MainWindow _owner )
1636 _this.projectbutton = this;
1637 this.el = new Clutter.Actor();
1641 // set gobject values
1642 var child_0 = new Xcls_Actor22( _this );
1644 this.el.add_child ( child_0.el );
1648 this.el.set_size(50,50); }
1650 // user defined functions
1652 public class Xcls_Actor22 : Object
1654 public GtkClutter.Actor el;
1655 private Xcls_MainWindow _this;
1661 public Xcls_Actor22(Xcls_MainWindow _owner )
1664 this.el = new GtkClutter.Actor();
1668 // set gobject values
1669 var child_0 = new Xcls_Button23( _this );
1674 ((Gtk.Container)(this.el.get_widget())).add ( child_0.el); }
1676 // user defined functions
1678 public class Xcls_Button23 : Object
1680 public Gtk.Button el;
1681 private Xcls_MainWindow _this;
1687 public Xcls_Button23(Xcls_MainWindow _owner )
1690 this.el = new Gtk.Button();
1694 // set gobject values
1695 this.el.width_request = 50;
1696 this.el.height_request = 50;
1697 var child_0 = new Xcls_Image24( _this );
1699 this.el.set_image ( child_0.el );
1702 this.el.clicked.connect( ( ) => {
1703 switch (_this.state) {
1706 _this.hideViewEditing();
1709 _this.showViewEditing();
1713 _this.hideAddProp();
1714 _this.hideViewEditing();
1717 _this.hideAddListener();
1718 _this.hideViewEditing();
1723 _this.hideViewEditing();
1734 // user defined functions
1736 public class Xcls_Image24 : Object
1738 public Gtk.Image el;
1739 private Xcls_MainWindow _this;
1745 public Xcls_Image24(Xcls_MainWindow _owner )
1748 this.el = new Gtk.Image();
1752 // set gobject values
1753 this.el.icon_name = "document-open";
1756 // user defined functions
1758 public class Xcls_editfilebutton : Object
1760 public Clutter.Actor el;
1761 private Xcls_MainWindow _this;
1767 public Xcls_editfilebutton(Xcls_MainWindow _owner )
1770 _this.editfilebutton = this;
1771 this.el = new Clutter.Actor();
1775 // set gobject values
1776 var child_0 = new Xcls_Actor26( _this );
1778 this.el.add_child ( child_0.el );
1782 this.el.set_size(50.0f,50.0f); }
1784 // user defined functions
1786 public class Xcls_Actor26 : Object
1788 public GtkClutter.Actor el;
1789 private Xcls_MainWindow _this;
1795 public Xcls_Actor26(Xcls_MainWindow _owner )
1798 this.el = new GtkClutter.Actor();
1802 // set gobject values
1803 var child_0 = new Xcls_Button27( _this );
1808 ((Gtk.Container)(this.el.get_widget())).add ( child_0.el); }
1810 // user defined functions
1812 public class Xcls_Button27 : Object
1814 public Gtk.Button el;
1815 private Xcls_MainWindow _this;
1821 public Xcls_Button27(Xcls_MainWindow _owner )
1824 this.el = new Gtk.Button();
1828 // set gobject values
1829 this.el.width_request = 50;
1830 this.el.height_request = 50;
1831 this.el.tooltip_text = "File Details";
1832 var child_0 = new Xcls_Image28( _this );
1834 this.el.set_image ( child_0.el );
1837 this.el.clicked.connect( ( ) => {
1839 // create a new file in project..
1840 if (_this.project == null || _this.left_tree.model.file == null) {
1844 _this.new_file_dialog.show(_this.left_tree.model.file);
1852 // user defined functions
1854 public class Xcls_Image28 : Object
1856 public Gtk.Image el;
1857 private Xcls_MainWindow _this;
1863 public Xcls_Image28(Xcls_MainWindow _owner )
1866 this.el = new Gtk.Image();
1870 // set gobject values
1871 this.el.icon_name = "document-properties";
1874 // user defined functions
1876 public class Xcls_projecteditbutton : Object
1878 public Clutter.Actor el;
1879 private Xcls_MainWindow _this;
1885 public Xcls_projecteditbutton(Xcls_MainWindow _owner )
1888 _this.projecteditbutton = this;
1889 this.el = new Clutter.Actor();
1893 // set gobject values
1894 var child_0 = new Xcls_Actor30( _this );
1896 this.el.add_child ( child_0.el );
1900 this.el.set_size(50,50); }
1902 // user defined functions
1904 public class Xcls_Actor30 : Object
1906 public GtkClutter.Actor el;
1907 private Xcls_MainWindow _this;
1913 public Xcls_Actor30(Xcls_MainWindow _owner )
1916 this.el = new GtkClutter.Actor();
1920 // set gobject values
1921 var child_0 = new Xcls_Button31( _this );
1926 ((Gtk.Container)(this.el.get_widget())).add ( child_0.el); }
1928 // user defined functions
1930 public class Xcls_Button31 : Object
1932 public Gtk.Button el;
1933 private Xcls_MainWindow _this;
1939 public Xcls_Button31(Xcls_MainWindow _owner )
1942 this.el = new Gtk.Button();
1946 // set gobject values
1947 this.el.width_request = 50;
1948 this.el.height_request = 50;
1949 this.el.tooltip_text = "Project Details";
1950 var child_0 = new Xcls_Image32( _this );
1952 this.el.set_image ( child_0.el );
1955 this.el.clicked.connect( ( ) => {
1956 switch (_this.state) {
1958 _this.showProjectEdit();
1961 // _this.showViewEditing();
1964 _this.hideProjectEdit();
1970 _this.hideAddProp();
1971 _this.showProjectEdit();
1974 _this.hideAddListener();
1975 _this.showProjectEdit();
1980 _this.showProjectEdit();
1991 // user defined functions
1993 public class Xcls_Image32 : Object
1995 public Gtk.Image el;
1996 private Xcls_MainWindow _this;
2002 public Xcls_Image32(Xcls_MainWindow _owner )
2005 this.el = new Gtk.Image();
2009 // set gobject values
2010 this.el.icon_name = "emblem-system";
2013 // user defined functions
2015 public class Xcls_objectshowbutton : Object
2017 public Clutter.Actor el;
2018 private Xcls_MainWindow _this;
2024 public Xcls_objectshowbutton(Xcls_MainWindow _owner )
2027 _this.objectshowbutton = this;
2028 this.el = new Clutter.Actor();
2032 // set gobject values
2033 var child_0 = new Xcls_Actor34( _this );
2035 this.el.add_child ( child_0.el );
2039 this.el.set_size(50,50);
2041 this.el.button_press_event.connect( ( ) => {
2045 switch (_this.state) {
2049 _this.hideAddProp();
2053 _this.hideAddListener();
2069 print("unhandled add objects from %s\n",_this.state);
2076 this.el.enter_event.connect( ( event) => {
2077 this.el.background_color = new Clutter.Color.from_string("#333");
2080 this.el.leave_event.connect( ( event) => {
2081 this.el.background_color = new Clutter.Color.from_string("#000");
2086 // user defined functions
2088 public class Xcls_Actor34 : Object
2090 public GtkClutter.Actor el;
2091 private Xcls_MainWindow _this;
2097 public Xcls_Actor34(Xcls_MainWindow _owner )
2100 this.el = new GtkClutter.Actor();
2104 // set gobject values
2105 var child_0 = new Xcls_Button35( _this );
2110 ((Gtk.Container)(this.el.get_widget())).add ( child_0.el); }
2112 // user defined functions
2114 public class Xcls_Button35 : Object
2116 public Gtk.Button el;
2117 private Xcls_MainWindow _this;
2123 public Xcls_Button35(Xcls_MainWindow _owner )
2126 this.el = new Gtk.Button();
2130 // set gobject values
2131 this.el.width_request = 50;
2132 this.el.height_request = 50;
2133 this.el.tooltip_text = "Add Child Element";
2134 var child_0 = new Xcls_Image36( _this );
2136 this.el.set_image ( child_0.el );
2139 this.el.clicked.connect( ( ) => {
2143 switch (_this.state) {
2147 _this.hideAddProp();
2151 _this.hideAddListener();
2167 print("unhandled add objects from %s\n",_this.state);
2176 // user defined functions
2178 public class Xcls_Image36 : Object
2180 public Gtk.Image el;
2181 private Xcls_MainWindow _this;
2187 public Xcls_Image36(Xcls_MainWindow _owner )
2190 this.el = new Gtk.Image();
2194 // set gobject values
2195 this.el.icon_name = "list-add";
2198 // user defined functions
2200 public class Xcls_addpropbutton : Object
2202 public Clutter.Actor el;
2203 private Xcls_MainWindow _this;
2209 public Xcls_addpropbutton(Xcls_MainWindow _owner )
2212 _this.addpropbutton = this;
2213 this.el = new Clutter.Actor();
2217 // set gobject values
2218 var child_0 = new Xcls_Actor38( _this );
2220 this.el.add_child ( child_0.el );
2224 this.el.set_size(50,50); }
2226 // user defined functions
2228 public class Xcls_Actor38 : Object
2230 public GtkClutter.Actor el;
2231 private Xcls_MainWindow _this;
2237 public Xcls_Actor38(Xcls_MainWindow _owner )
2240 this.el = new GtkClutter.Actor();
2244 // set gobject values
2245 var child_0 = new Xcls_Button39( _this );
2250 ((Gtk.Container)(this.el.get_widget())).add ( child_0.el); }
2252 // user defined functions
2254 public class Xcls_Button39 : Object
2256 public Gtk.Button el;
2257 private Xcls_MainWindow _this;
2263 public Xcls_Button39(Xcls_MainWindow _owner )
2266 this.el = new Gtk.Button();
2270 // set gobject values
2271 this.el.width_request = 50;
2272 this.el.height_request = 50;
2273 this.el.tooltip_text = "Add Property";
2274 var child_0 = new Xcls_Image40( _this );
2276 this.el.set_image ( child_0.el );
2279 this.el.clicked.connect( ( ) => {
2283 switch (_this.state) {
2285 _this.showAddProp();
2290 _this.showAddProp();
2294 _this.hideAddListener();
2295 _this.showAddProp();
2300 _this.hideAddProp();
2304 print("unhandled add property from %s\n",_this.state);
2314 // user defined functions
2316 public class Xcls_Image40 : Object
2318 public Gtk.Image el;
2319 private Xcls_MainWindow _this;
2325 public Xcls_Image40(Xcls_MainWindow _owner )
2328 this.el = new Gtk.Image();
2332 // set gobject values
2333 this.el.icon_name = "format-justify-left";
2336 // user defined functions
2338 public class Xcls_addlistenerbutton : Object
2340 public Clutter.Actor el;
2341 private Xcls_MainWindow _this;
2347 public Xcls_addlistenerbutton(Xcls_MainWindow _owner )
2350 _this.addlistenerbutton = this;
2351 this.el = new Clutter.Actor();
2355 // set gobject values
2356 var child_0 = new Xcls_Actor42( _this );
2358 this.el.add_child ( child_0.el );
2362 this.el.set_size(50,50); }
2364 // user defined functions
2366 public class Xcls_Actor42 : Object
2368 public GtkClutter.Actor el;
2369 private Xcls_MainWindow _this;
2375 public Xcls_Actor42(Xcls_MainWindow _owner )
2378 this.el = new GtkClutter.Actor();
2382 // set gobject values
2383 var child_0 = new Xcls_Button43( _this );
2388 ((Gtk.Container)(this.el.get_widget())).add ( child_0.el); }
2390 // user defined functions
2392 public class Xcls_Button43 : Object
2394 public Gtk.Button el;
2395 private Xcls_MainWindow _this;
2401 public Xcls_Button43(Xcls_MainWindow _owner )
2404 this.el = new Gtk.Button();
2408 // set gobject values
2409 this.el.width_request = 50;
2410 this.el.height_request = 50;
2411 this.el.tooltip_text = "Add Event Code";
2412 var child_0 = new Xcls_Image44( _this );
2414 this.el.set_image ( child_0.el );
2417 this.el.clicked.connect( ( ) => {
2421 switch (_this.state) {
2423 _this.showAddListener();
2428 _this.hideAddListener();
2433 _this.hideAddProp();
2434 _this.showAddListener();
2438 _this.showAddListener();
2442 print("unhandled add listener from %s\n",_this.state);
2453 // user defined functions
2455 public class Xcls_Image44 : Object
2457 public Gtk.Image el;
2458 private Xcls_MainWindow _this;
2464 public Xcls_Image44(Xcls_MainWindow _owner )
2467 this.el = new Gtk.Image();
2471 // set gobject values
2472 this.el.icon_name = "appointment-new";
2475 // user defined functions
2477 public class Xcls_addprojectbutton : Object
2479 public Clutter.Actor el;
2480 private Xcls_MainWindow _this;
2486 public Xcls_addprojectbutton(Xcls_MainWindow _owner )
2489 _this.addprojectbutton = this;
2490 this.el = new Clutter.Actor();
2494 // set gobject values
2495 var child_0 = new Xcls_Actor46( _this );
2497 this.el.add_child ( child_0.el );
2501 this.el.set_size(50.0f,50.0f); }
2503 // user defined functions
2505 public class Xcls_Actor46 : Object
2507 public GtkClutter.Actor el;
2508 private Xcls_MainWindow _this;
2514 public Xcls_Actor46(Xcls_MainWindow _owner )
2517 this.el = new GtkClutter.Actor();
2521 // set gobject values
2522 var child_0 = new Xcls_Button47( _this );
2527 ((Gtk.Container)(this.el.get_widget())).add ( child_0.el); }
2529 // user defined functions
2531 public class Xcls_Button47 : Object
2533 public Gtk.Button el;
2534 private Xcls_MainWindow _this;
2540 public Xcls_Button47(Xcls_MainWindow _owner )
2543 this.el = new Gtk.Button();
2547 // set gobject values
2548 this.el.width_request = 50;
2549 this.el.height_request = 50;
2550 this.el.tooltip_text = "New\nProj.";
2551 var child_0 = new Xcls_Image48( _this );
2553 this.el.set_image ( child_0.el );
2556 this.el.clicked.connect( ( ) => {
2558 // create a new file in project..
2559 //Xcls_DialogNewComponent.singleton().show(
2560 var pe = Xcls_EditProject.singleton();
2561 pe.el.set_transient_for(_this.el);
2562 pe.el.set_modal(true);
2569 _this.left_projects.is_loaded = false;
2570 _this.left_projects.load();
2571 _this.left_projects.selectProject(p);
2578 // user defined functions
2580 public class Xcls_Image48 : Object
2582 public Gtk.Image el;
2583 private Xcls_MainWindow _this;
2589 public Xcls_Image48(Xcls_MainWindow _owner )
2592 this.el = new Gtk.Image();
2596 // set gobject values
2597 this.el.icon_name = "folder-new";
2600 // user defined functions
2602 public class Xcls_addfilebutton : Object
2604 public Clutter.Actor el;
2605 private Xcls_MainWindow _this;
2611 public Xcls_addfilebutton(Xcls_MainWindow _owner )
2614 _this.addfilebutton = this;
2615 this.el = new Clutter.Actor();
2619 // set gobject values
2620 var child_0 = new Xcls_Actor50( _this );
2622 this.el.add_child ( child_0.el );
2626 this.el.set_size(50.0f,50.0f); }
2628 // user defined functions
2630 public class Xcls_Actor50 : Object
2632 public GtkClutter.Actor el;
2633 private Xcls_MainWindow _this;
2639 public Xcls_Actor50(Xcls_MainWindow _owner )
2642 this.el = new GtkClutter.Actor();
2646 // set gobject values
2647 var child_0 = new Xcls_Button51( _this );
2652 ((Gtk.Container)(this.el.get_widget())).add ( child_0.el); }
2654 // user defined functions
2656 public class Xcls_Button51 : Object
2658 public Gtk.Button el;
2659 private Xcls_MainWindow _this;
2665 public Xcls_Button51(Xcls_MainWindow _owner )
2668 this.el = new Gtk.Button();
2672 // set gobject values
2673 this.el.width_request = 50;
2674 this.el.height_request = 50;
2675 this.el.tooltip_text = "Add File";
2676 var child_0 = new Xcls_Image52( _this );
2678 this.el.set_image ( child_0.el );
2681 this.el.clicked.connect( () => {
2682 // create a new file in project..
2684 // what's the currently selected project...
2685 var proj = _this.left_projects.getSelectedProject();
2693 var f = JsRender.JsRender.factory(proj.xtype, proj, "");
2694 _this.project = proj;
2695 _this.new_file_dialog.show(f);
2701 // user defined functions
2703 public class Xcls_Image52 : Object
2705 public Gtk.Image el;
2706 private Xcls_MainWindow _this;
2712 public Xcls_Image52(Xcls_MainWindow _owner )
2715 this.el = new Gtk.Image();
2719 // set gobject values
2720 this.el.icon_name = "document-new";
2723 // user defined functions
2725 public class Xcls_delprojectbutton : Object
2727 public Clutter.Actor el;
2728 private Xcls_MainWindow _this;
2734 public Xcls_delprojectbutton(Xcls_MainWindow _owner )
2737 _this.delprojectbutton = this;
2738 this.el = new Clutter.Actor();
2742 // set gobject values
2743 var child_0 = new Xcls_Actor54( _this );
2745 this.el.add_child ( child_0.el );
2749 this.el.set_size(50,50); }
2751 // user defined functions
2753 public class Xcls_Actor54 : Object
2755 public GtkClutter.Actor el;
2756 private Xcls_MainWindow _this;
2762 public Xcls_Actor54(Xcls_MainWindow _owner )
2765 this.el = new GtkClutter.Actor();
2769 // set gobject values
2770 var child_0 = new Xcls_Button55( _this );
2775 ((Gtk.Container)(this.el.get_widget())).add ( child_0.el); }
2777 // user defined functions
2779 public class Xcls_Button55 : Object
2781 public Gtk.Button el;
2782 private Xcls_MainWindow _this;
2788 public Xcls_Button55(Xcls_MainWindow _owner )
2791 this.el = new Gtk.Button();
2795 // set gobject values
2796 this.el.width_request = 50;
2797 this.el.height_request = 50;
2798 this.el.tooltip_text = "Delelte Project";
2799 var child_0 = new Xcls_Image56( _this );
2801 this.el.set_image ( child_0.el );
2804 this.el.clicked.connect( ( ) => {
2806 var cd = DialogConfirm.singleton();
2807 cd.el.set_transient_for(_this.el);
2808 cd.el.set_modal(true);
2810 var project = _this.left_projects.getSelectedProject();
2811 if (project == null) {
2812 print("SKIP - no project\n");
2817 if (Gtk.ResponseType.YES != cd.show("Confirm",
2818 "Are you sure you want to delete project %s".printf(project.name))) {
2824 Project.Project.remove(project);
2825 _this.project = null;
2827 _this.left_projects.is_loaded = false;
2828 _this.left_projects.load();
2829 _this.clutterfiles.clearFiles();
2834 // user defined functions
2836 public class Xcls_Image56 : Object
2838 public Gtk.Image el;
2839 private Xcls_MainWindow _this;
2845 public Xcls_Image56(Xcls_MainWindow _owner )
2848 this.el = new Gtk.Image();
2852 // set gobject values
2853 this.el.icon_name = "user-trash";
2856 // user defined functions
2858 public class Xcls_new_window : Object
2860 public Clutter.Actor el;
2861 private Xcls_MainWindow _this;
2867 public Xcls_new_window(Xcls_MainWindow _owner )
2870 _this.new_window = this;
2871 this.el = new Clutter.Actor();
2875 // set gobject values
2876 var child_0 = new Xcls_Actor58( _this );
2878 this.el.add_child ( child_0.el );
2882 this.el.set_size(50,50); }
2884 // user defined functions
2886 public class Xcls_Actor58 : Object
2888 public GtkClutter.Actor el;
2889 private Xcls_MainWindow _this;
2895 public Xcls_Actor58(Xcls_MainWindow _owner )
2898 this.el = new GtkClutter.Actor();
2902 // set gobject values
2903 var child_0 = new Xcls_Button59( _this );
2908 ((Gtk.Container)(this.el.get_widget())).add ( child_0.el); }
2910 // user defined functions
2912 public class Xcls_Button59 : Object
2914 public Gtk.Button el;
2915 private Xcls_MainWindow _this;
2921 public Xcls_Button59(Xcls_MainWindow _owner )
2924 this.el = new Gtk.Button();
2928 // set gobject values
2929 this.el.width_request = 50;
2930 this.el.height_request = 50;
2931 this.el.tooltip_text = "Open New Window";
2932 var child_0 = new Xcls_Image60( _this );
2934 this.el.set_image ( child_0.el );
2937 this.el.clicked.connect( ( ) => {
2938 Xcls_MainWindow.singleton().no_windows++;
2939 var w = new Xcls_MainWindow();
2944 w.hideViewEditing();
2948 // user defined functions
2950 public class Xcls_Image60 : Object
2952 public Gtk.Image el;
2953 private Xcls_MainWindow _this;
2959 public Xcls_Image60(Xcls_MainWindow _owner )
2962 this.el = new Gtk.Image();
2966 // set gobject values
2967 this.el.icon_name = "window-new";
2970 // user defined functions