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 Project.Project project;
42 public int no_windows;
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 Xcls_WindowAddProp add_props;
56 public Xcls_GtkView window_gladeview;
59 public Xcls_MainWindow()
62 this.el = new Gtk.Window( Gtk.WindowType.TOPLEVEL );
67 this.children_loaded = false;
68 this.left_projects = null;
69 this.window_rooview = null;
70 this.left_tree = null;
71 this.code_editor = null;
72 this.new_file_dialog = null;
73 this.projectsettings = null;
74 this.clutterfiles = null;
75 this.left_props = null;
76 this.rightpalete = null;
77 this.title = "Application Builder";
78 this.add_props = null;
79 this.window_gladeview = null;
82 this.el.border_width = 0;
83 this.el.default_height = 500;
84 this.el.default_width = 800;
85 var child_0 = new Xcls_vbox( _this );
87 this.el.add ( child_0.el );
95 this.el.delete_event.connect( ( event) => {
98 this.el.destroy.connect( () => {
99 Xcls_MainWindow.singleton().no_windows--;
101 if (Xcls_MainWindow.singleton().no_windows < 1) {
106 this.el.show.connect( ( ) => {
107 // hide the file editing..
109 //this.hideViewEditing();
113 // user defined functions
114 public void hideAddListener () {
115 _this.backbutton.el.hide();
116 _this.projectbutton.el.show();
117 _this.projecteditbutton.el.show();
118 _this.editfilebutton.el.show();
119 _this.addpropsview.el.save_easing_state();
120 var el = _this.rooview.el;
121 el.save_easing_state();
124 el.set_scale(1.0f,1.0f);
125 _this.addpropsview.el.set_scale(0.0f,0.0f);
126 _this.state = "edit";
129 //_this.clutterfiles.loadProject(_this.project);
131 el.restore_easing_state();
132 _this.addpropsview.el.restore_easing_state();
134 public void initChildren () {
135 // this needs putting in a better place..
137 print("init children");
138 this.left_tree = new Xcls_WindowLeftTree();
139 this.left_tree.ref();
140 this.left_tree.main_window = _this;
141 this.tree.el.pack_start(this.left_tree.el,true, true,0);
142 this.left_tree.el.show_all();
144 this.left_tree.before_node_change.connect(() => {
145 if (this.state != "codeedit") {
146 this.left_props.finish_editing();
149 if (!this.code_editor.saveContents()) {
156 this.left_tree.node_selected.connect((sel) => {
158 print("node_selected called %s\n", (sel == null) ? "NULL" : "a value");
161 this.left_props.el.hide();
163 this.left_props.el.show();
164 this.left_props.load(this.left_tree.getActiveFile(), sel);
165 switch (this.state) {
169 this.rightpalete.clear();
172 this.rightpalete.load(_this.left_tree.getActiveFile().palete(), sel.fqn());
178 this.add_props.clear();
181 this.add_props.show(_this.left_tree.getActiveFile().palete(), "props", sel.fqn());
186 this.add_props.clear();
189 this.add_props.show(_this.left_tree.getActiveFile().palete(), "signals", sel.fqn());
203 this.left_tree.changed.connect(() => {
204 this.window_rooview.requestRedraw();
205 this.left_tree.model.file.save();
212 this.left_props =new Xcls_LeftProps();
213 this.left_props.ref();
214 this.left_props.main_window = _this;
215 this.props.el.pack_start(this.left_props.el,true, true,0);
216 this.left_props.el.show_all();
218 this.left_props.show_editor.connect( (file, node, type, key) => {
219 this.showCodeEdit(file, node, type, key);
221 this.left_props.stop_editor.connect( () => {
222 if (this.state != "codeedit") {
226 var ret = this.code_editor.saveContents();
233 this.left_props.changed.connect(() => {
234 if (this.left_tree.getActiveFile().xtype == "Roo" ) {
235 this.window_rooview.requestRedraw();
238 this.window_gladeview.loadFile(this.left_tree.getActiveFile());
240 this.left_tree.model.updateSelected();
241 this.left_tree.model.file.save();
248 this.left_projects = new Xcls_WindowLeftProjects();
249 this.left_projects.ref();
250 this.leftpane.el.pack_start(this.left_projects.el,true, true,0);
251 this.left_projects.el.show_all();
252 this.left_projects.project_selected.connect((proj) => {
254 _this.clutterfiles.loadProject(proj);
260 this.projectsettings =new Xcls_ProjectSettings();
261 this.projectsettings.ref(); /// really?
262 ((Gtk.Container)(this.projecteditview.el.get_widget())).add(this.projectsettings.el);
263 //this.projectsettings.el.show_all();
265 var stage = _this.projecteditview.el.get_stage();
266 stage.set_background_color( Clutter.Color.from_string("#000"));
268 this.projectsettings.buttonPressed.connect((btn) => {
269 if (this.left_tree.getActiveFile().xtype == "Roo" ) {
272 _this.window_rooview.view.renderJS(true);
274 if (btn == "apply") {
275 _this.window_rooview.view.renderJS(true);
279 // do nothing for gtk..
281 if (btn == "save" || btn == "apply") {
282 _this.project.save();
286 this.hideProjectEdit();
291 // objects (palate..)
292 this.rightpalete = new Xcls_RightPalete();
293 this.rightpalete.ref(); /// really?
294 ((Gtk.Container)(this.objectview.el.get_widget())).add(this.rightpalete.el);
295 //this.projectsettings.el.show_all();
297 stage = _this.objectview.el.get_stage();
298 stage.set_background_color( Clutter.Color.from_string("#000"));
300 /*this.projectsettings.buttonPressed.connect((btn) => {
302 _this.window_rooview.view.renderJS(true);
304 if (btn == "apply") {
305 _this.window_rooview.view.renderJS(true);
308 this.hideProjectEdit();
316 this.add_props = new Xcls_WindowAddProp();
317 this.add_props.ref(); /// really?
318 ((Gtk.Container)(this.addpropsview.el.get_widget())).add(this.add_props.el);
319 //this.projectsettings.el.show_all();
321 stage = _this.addpropsview.el.get_stage();
322 stage.set_background_color( Clutter.Color.from_string("#000"));
325 _this.add_props.select.connect( (key,type,skel, etype) => {
326 this.left_props.addProp(etype, key, skel, type);
332 this.code_editor = new Editor();
333 this.code_editor.ref(); /// really?
334 ((Gtk.Container)(this.codeeditview.el.get_widget())).add(this.code_editor.el);
335 //this.projectsettings.el.show_all();
337 stage = _this.codeeditview.el.get_stage();
338 stage.set_background_color( Clutter.Color.from_string("#000"));
341 _this.code_editor.save.connect( () => {
342 this.left_tree.model.file.save();
343 this.left_tree.model.updateSelected();
351 this.window_rooview =new Xcls_WindowRooView();
352 this.window_rooview.ref();
353 ((Gtk.Container)(this.rooview.el.get_widget())).add(this.window_rooview.el);
354 this.window_rooview.el.show_all();
356 stage = _this.rooview.el.get_stage();
357 stage.set_background_color( Clutter.Color.from_string("#000"));
362 this.window_gladeview =new Xcls_GtkView();
363 this.window_gladeview.ref();
365 //((Gtk.Container)(this.rooview.el.get_widget())).add(this.window_gladeview.el);
366 ///this.window_gladeview.el.hide();
373 this.clutterfiles = new Xcls_ClutterFiles();
374 this.clutterfiles.ref();
375 stage.add_child(this.clutterfiles.el);
376 this.clutterfiles.el.show_all();
379 this.clutterfiles.open.connect((file) => {
380 _this.project = file.project;
381 _this.showViewEditing();
382 this.left_tree.model.loadFile(file);
383 var ctr= ((Gtk.Container)(this.rooview.el.get_widget()));
384 if (file.xtype == "Roo" ) {
385 ctr.foreach( (w) => { ctr.remove(w); });
386 ctr.add(this.window_rooview.el);
387 this.window_rooview.loadFile(file);
389 this.window_rooview.el.show_all();
391 ctr.foreach( (w) => { ctr.remove(w); });
392 ctr.add(this.window_gladeview.el);
393 this.window_gladeview.loadFile(file);
394 this.window_gladeview.el.show_all();
396 print("OPEN : " + file.name);
397 _this.editpane.el.set_position(_this.editpane.el.max_position);
403 this.new_file_dialog = new Xcls_DialogNewComponent();
404 // force it modal to the main window..
405 this.new_file_dialog.el.set_transient_for(this.el);
406 this.new_file_dialog.el.set_modal(true);
408 this.new_file_dialog.success.connect((project,file) =>
410 _this.project = project;
411 _this.showViewEditing();
412 this.left_tree.model.loadFile(file);
413 var ctr= ((Gtk.Container)(this.rooview.el.get_widget()));
414 if (file.xtype == "Roo" ) {
415 ctr.foreach( (w) => { ctr.remove(w); });
416 ctr.add(this.window_rooview.el);
417 this.window_rooview.loadFile(file);
419 this.window_rooview.el.show_all();
421 ctr.foreach( (w) => { ctr.remove(w); });
422 ctr.add(this.window_gladeview.el);
423 this.window_gladeview.loadFile(file);
424 this.window_gladeview.el.show_all();
432 var tl = new Clutter.Timeline(6000);
433 tl.set_repeat_count(-1);
437 this.children_loaded = true;
443 public void hideCodeEdit () {
444 //this.code_editor.saveContents();
445 _this.backbutton.el.hide();
446 _this.projectbutton.el.show();
447 _this.projecteditbutton.el.show();
448 _this.editfilebutton.el.show();
449 _this.codeeditview.el.save_easing_state();
450 var el = _this.rooview.el;
451 el.save_easing_state();
454 el.set_scale(1.0f,1.0f);
455 _this.codeeditview.el.set_scale(0.0f,0.0f);
456 _this.state = "edit";
459 //_this.clutterfiles.loadProject(_this.project);
461 el.restore_easing_state();
462 _this.codeeditview.el.restore_easing_state();
464 public void showAddProp () {
467 var ae = this.left_tree.getActiveElement();
471 _this.backbutton.el.show();
472 _this.projectbutton.el.hide();
473 _this.editfilebutton.el.hide();
474 _this.projecteditbutton.el.hide();
478 //this.rooview.el.hide();
479 this.add_props.el.show_all();
481 Palete.factory(this.project.xtype),
486 _this.addpropsview.el.save_easing_state();
488 var el = _this.rooview.el;
489 el.save_easing_state();
490 _this.clutterembed.setSizesAlloc("addprop");
494 _this.addpropsview.el.set_scale(1.0f,1.0f);
498 //_this.clutterfiles.loadProject(_this.project);
500 el.restore_easing_state();
501 _this.addpropsview.el.restore_easing_state();
502 this.state = "addprop";
504 public void showViewEditing ( ) {
505 this.editpane.el.show();
506 // this.rooview.el.show();
507 this.left_projects.el.hide();
509 _this.addprojectbutton.el.hide();
510 _this.delprojectbutton.el.hide();
511 _this.addfilebutton.el.hide();
512 _this.backbutton.el.hide();
513 _this.new_window.el.hide();
516 _this.projectbutton.el.show();
517 _this.editfilebutton.el.show();
518 _this.projecteditbutton.el.show();
519 _this.objectshowbutton.el.show();
520 _this.addpropbutton.el.show();
521 _this.addlistenerbutton.el.show();
524 var el = _this.rooview.el;
525 el.save_easing_state();
528 el.set_rotation_angle(Clutter.RotateAxis.Y_AXIS, 0.0f);
529 el.set_scale(1.0f,1.0f);
530 _this.state = "edit";
531 // _this.mainpane.el.set_position(_this.leftpane.lastWidth);
532 _this.clutterfiles.el.hide();
534 el.restore_easing_state();
536 print("show view editing");
538 public void hideProjectEdit () {
539 // return to editing state..
541 _this.projectbutton.el.show();
542 _this.projecteditbutton.el.show();
543 _this.backbutton.el.hide();
544 _this.editfilebutton.el.show();
548 //this.rooview.el.hide();
549 //this.edit_project.el.show();
550 _this.projecteditview.el.save_easing_state();
551 var el = _this.rooview.el;
552 el.save_easing_state();
555 el.set_scale(1.0f,1.0f);
556 _this.projecteditview.el.set_scale(1.0f,0.0f);
557 _this.state = "edit";
560 //_this.clutterfiles.loadProject(_this.project);
562 el.restore_easing_state();
563 _this.projecteditview.el.restore_easing_state();
566 public void showProjectEdit () {
567 // make the browser smaller, and show the edit dialog
570 _this.projectbutton.el.hide();
571 _this.projecteditbutton.el.hide();
573 _this.editfilebutton.el.hide();
578 _this.backbutton.el.show();
580 //this.rooview.el.hide();
581 this.projectsettings.el.show_all();
582 this.projectsettings.show(this.project);
583 _this.projecteditview.el.save_easing_state();
585 var el = _this.rooview.el;
586 el.save_easing_state();
589 el.set_scale(0.5f,0.5f);
591 _this.projecteditview.el.set_scale(1.0f,1.0f);
593 _this.state = "projectedit";
596 //_this.clutterfiles.loadProject(_this.project);
598 el.restore_easing_state();
599 _this.projecteditview.el.restore_easing_state();
600 // print("show view browsing");
603 public void showAddListener () {
607 var ae = this.left_tree.getActiveElement();
612 _this.backbutton.el.show();
613 _this.projectbutton.el.hide();
614 _this.editfilebutton.el.hide();
615 _this.projecteditbutton.el.hide();
618 //this.rooview.el.hide();
619 this.add_props.el.show_all();
621 Palete.factory(this.project.xtype),
625 //this.rightpalete.show(this.project);
627 _this.addpropsview.el.save_easing_state();
629 var el = _this.rooview.el;
630 el.save_easing_state();
632 _this.clutterembed.setSizesAlloc("addlistener");
637 _this.addpropsview.el.set_scale(1.0f,1.0f);
641 //_this.clutterfiles.loadProject(_this.project);
643 el.restore_easing_state();
644 _this.addpropsview.el.restore_easing_state();
645 this.state = "addlistener";
647 public void hideAddProp () {
648 _this.backbutton.el.hide();
649 _this.projectbutton.el.show();
650 _this.projecteditbutton.el.show();
651 _this.editfilebutton.el.show();
652 _this.addpropsview.el.save_easing_state();
654 var el = _this.rooview.el;
655 el.save_easing_state();
658 el.set_scale(1.0f,1.0f);
659 _this.addpropsview.el.set_scale(0.0f,0.0f);
660 _this.state = "edit";
663 //_this.clutterfiles.loadProject(_this.project);
665 el.restore_easing_state();
666 _this.addpropsview.el.restore_easing_state();
668 public void showCodeEdit (JsRender.JsRender file, JsRender.Node node, string ptype, string key)
670 // this is a bit different,
671 // it's not called via a button - but triggered by the prop edit class signal.
672 // so it has to hide any other state..
682 this.hideAddListener();
686 _this.backbutton.el.show();
688 _this.projectbutton.el.hide();
689 _this.editfilebutton.el.hide();
690 _this.projecteditbutton.el.hide();
693 //this.rooview.el.hide();
694 this.code_editor.el.show_all();
695 this.code_editor.show(
702 _this.codeeditview.el.save_easing_state();
704 var el = _this.rooview.el;
705 el.save_easing_state();
706 _this.clutterembed.setSizesAlloc("codedit");
708 _this.codeeditview.el.set_scale(1.0f,1.0f);
712 //_this.clutterfiles.loadProject(_this.project);
714 el.restore_easing_state();
715 _this.codeeditview.el.restore_easing_state();
716 this.state = "codeedit";
718 public void setTitle (string str) {
719 this.el.set_title(this.title + " - " + str);
721 public void show () {
722 this.left_tree =new Xcls_WindowLeftTree();
723 _this.vbox.el.pack_start(this.left_tree.el,true, true,0);
727 public void hideViewEditing ( ) {
729 // show the file navigation...
731 if (this.left_tree.getActiveFile() != null) {
732 if (this.left_tree.getActiveFile().xtype == "Roo" ) {
733 this.window_rooview.createThumb();
735 this.window_gladeview.createThumb();
739 _this.addprojectbutton.el.show();
740 _this.addfilebutton.el.show();
741 _this.backbutton.el.show();
742 _this.delprojectbutton.el.show();
743 _this.new_window.el.show();
745 _this.editfilebutton.el.hide();
746 _this.projectbutton.el.hide();
747 _this.projecteditbutton.el.hide();
748 _this.objectshowbutton.el.hide();
749 _this.addpropbutton.el.hide();
750 _this.addlistenerbutton.el.hide();
756 // show the add file button..
760 this.editpane.el.hide();
761 //this.rooview.el.hide();
762 this.left_projects.el.show();
764 var el = _this.rooview.el;
765 el.save_easing_state();
766 el.set_easing_duration(1000);
767 // show project / file view..
768 //_this.mainpane.lastWidth = _this.leftpane.el.get_position();
769 //_this.mainpane.el.set_position(0);
771 el.set_rotation_angle(Clutter.RotateAxis.Y_AXIS, 360.0f);
772 el.set_scale(0.0f,0.0f);
774 _this.state = "files";
775 if (_this.project != null) {
776 _this.left_projects.selectProject(_this.project);
778 //_this.clutterfiles.loadProject(_this.project);
780 el.restore_easing_state();
782 print("show view browsing");
784 public void showObject () {
787 // what's the active node on the left hand side..
789 var n = _this.left_tree.getActiveElement();
791 if (_this.left_tree.model.file == null) {
795 if (n == null && _this.left_tree.model.file.tree != null) {
799 _this.backbutton.el.show();
800 _this.projectbutton.el.hide();
801 _this.editfilebutton.el.hide();
802 _this.projecteditbutton.el.hide();
805 //this.rooview.el.hide();
806 this.rightpalete.el.show_all();
807 this.rightpalete.load(_this.left_tree.getActiveFile().palete(), n == null ? "*top" : n.fqn());
810 //this.rightpalete.show(this.project);
812 _this.objectview.el.save_easing_state();
814 var el = _this.rooview.el;
815 el.save_easing_state();
817 _this.clutterembed.setSizesAlloc("object");
820 _this.objectview.el.set_scale(1.0f,1.0f);
824 //_this.clutterfiles.loadProject(_this.project);
826 el.restore_easing_state();
827 _this.objectview.el.restore_easing_state();
828 this.state = "object";
830 public void hideObject () {
831 // return to editing state..
833 _this.projecteditbutton.el.show();
834 _this.backbutton.el.hide();
835 _this.projectbutton.el.show();
836 _this.editfilebutton.el.show();
837 _this.objectview.el.save_easing_state();
838 var el = _this.rooview.el;
839 el.save_easing_state();
842 el.set_scale(1.0f,1.0f);
843 _this.objectview.el.set_scale(0.0f,0.0f);
844 _this.state = "edit";
847 //_this.clutterfiles.loadProject(_this.project);
849 el.restore_easing_state();
850 _this.objectview.el.restore_easing_state();
854 public class Xcls_vbox : Object
857 private Xcls_MainWindow _this;
863 public Xcls_vbox(Xcls_MainWindow _owner )
867 this.el = new Gtk.VBox( false, 0 );
871 // set gobject values
872 var child_0 = new Xcls_mainpane( _this );
874 this.el.pack_end ( child_0.el , true,true,0 );
877 // user defined functions
879 public class Xcls_mainpane : Object
881 public Gtk.HPaned el;
882 private Xcls_MainWindow _this;
886 public int lastWidth;
889 public Xcls_mainpane(Xcls_MainWindow _owner )
892 _this.mainpane = this;
893 this.el = new Gtk.HPaned();
898 // set gobject values
899 this.el.position = 400;
900 var child_0 = new Xcls_leftpane( _this );
902 this.el.add1 ( child_0.el );
903 var child_1 = new Xcls_VBox8( _this );
905 this.el.add2 ( child_1.el );
908 // user defined functions
910 public class Xcls_leftpane : Object
913 private Xcls_MainWindow _this;
919 public Xcls_leftpane(Xcls_MainWindow _owner )
922 _this.leftpane = this;
923 this.el = new Gtk.VBox( true, 0 );
927 // set gobject values
928 var child_0 = new Xcls_editpane( _this );
930 this.el.pack_start ( child_0.el , false,true,0 );
933 // user defined functions
935 public class Xcls_editpane : Object
937 public Gtk.VPaned el;
938 private Xcls_MainWindow _this;
944 public Xcls_editpane(Xcls_MainWindow _owner )
947 _this.editpane = this;
948 this.el = new Gtk.VPaned();
952 // set gobject values
953 var child_0 = new Xcls_tree( _this );
955 this.el.add1 ( child_0.el );
956 var child_1 = new Xcls_props( _this );
958 this.el.add2 ( child_1.el );
961 // user defined functions
963 public class Xcls_tree : Object
966 private Xcls_MainWindow _this;
972 public Xcls_tree(Xcls_MainWindow _owner )
976 this.el = new Gtk.VBox( true, 0 );
980 // set gobject values
983 // user defined functions
985 public class Xcls_props : Object
988 private Xcls_MainWindow _this;
994 public Xcls_props(Xcls_MainWindow _owner )
998 this.el = new Gtk.VBox( true, 0 );
1002 // set gobject values
1005 // user defined functions
1007 public class Xcls_VBox8 : Object
1010 private Xcls_MainWindow _this;
1016 public Xcls_VBox8(Xcls_MainWindow _owner )
1019 this.el = new Gtk.VBox( true, 0 );
1023 // set gobject values
1024 var child_0 = new Xcls_clutterembed( _this );
1026 this.el.pack_start ( child_0.el , true,true,0 );
1029 // user defined functions
1031 public class Xcls_clutterembed : Object
1033 public GtkClutter.Embed el;
1034 private Xcls_MainWindow _this;
1040 public Xcls_clutterembed(Xcls_MainWindow _owner )
1043 _this.clutterembed = this;
1044 this.el = new GtkClutter.Embed();
1048 // set gobject values
1049 var child_0 = new Xcls_rooview( _this );
1051 this.el.get_stage().add_child ( child_0.el );
1052 var child_1 = new Xcls_objectview( _this );
1054 this.el.get_stage().add_child ( child_1.el );
1055 var child_2 = new Xcls_codeeditview( _this );
1057 this.el.get_stage().add_child ( child_2.el );
1058 var child_3 = new Xcls_addpropsview( _this );
1060 this.el.get_stage().add_child ( child_3.el );
1061 var child_4 = new Xcls_projecteditview( _this );
1063 this.el.get_stage().add_child ( child_4.el );
1064 var child_5 = new Xcls_buttonlayout( _this );
1066 this.el.get_stage().add_child ( child_5.el );
1070 var stage = this.el.get_stage();
1071 stage.set_background_color( Clutter.Color.from_string("#000"));
1073 this.el.size_allocate.connect( ( alloc) => {
1074 this.setSizes(alloc, _this.state);
1079 // user defined functions
1080 public void setSizes ( Gtk.Allocation alloc, string state) {
1081 if (!_this.children_loaded) { return; }
1083 _this.clutterfiles.set_size(alloc.width-50, alloc.height);
1085 // project view appears at top...
1087 _this.projecteditview.el.set_size(alloc.width-50, alloc.height / 2.0f);
1091 var avail = alloc.width < 50.0f ? 0 : alloc.width - 50.0f;
1094 var palsize = avail < 300.0f ? avail : 300.0f;
1095 print("set palsize size %f\n", palsize);
1096 // palate / props : fixed 300 pix
1098 _this.objectview.el.set_size(palsize, alloc.height);
1099 _this.addpropsview.el.set_size(palsize, alloc.height);
1103 // code edit min 600
1105 var codesize = avail < 800.0f ? avail : 800.0f;
1106 print("set code size %f\n", codesize);
1108 _this.codeeditview.el.set_size(codesize, alloc.height);
1109 _this.rooview.el.set_size(alloc.width-50, alloc.height);
1114 var scale = avail > 0.0f ? (avail - codesize -10 ) / avail : 0.0f;
1117 _this.rooview.el.set_scale(scale,scale);
1122 var scale = avail > 0.0f ? (avail - palsize -10 ) / avail : 0.0f;
1123 _this.rooview.el.set_scale(scale,scale);
1128 public void setSizesAlloc (string state) {
1130 Gtk.Allocation alloc;
1131 this.el.get_allocation(out alloc);
1132 this.setSizes(alloc, state);
1135 public class Xcls_rooview : Object
1137 public GtkClutter.Actor el;
1138 private Xcls_MainWindow _this;
1144 public Xcls_rooview(Xcls_MainWindow _owner )
1147 _this.rooview = this;
1148 this.el = new GtkClutter.Actor();
1152 // set gobject values
1159 this.el.add_constraint(
1160 new Clutter.AlignConstraint(
1161 _this.clutterembed.el.get_stage(),
1162 Clutter.AlignAxis.X_AXIS,
1167 //this.el.set_position(100,100);
1168 this.el.set_pivot_point(1.0f,1.0f);
1170 this.el.set_size(_this.clutterembed.el.get_stage().width-50,
1171 _this.clutterembed.el.get_stage().height);
1175 // user defined functions
1177 public class Xcls_objectview : Object
1179 public GtkClutter.Actor el;
1180 private Xcls_MainWindow _this;
1186 public Xcls_objectview(Xcls_MainWindow _owner )
1189 _this.objectview = this;
1190 this.el = new GtkClutter.Actor();
1194 // set gobject values
1201 this.el.add_constraint(
1202 new Clutter.AlignConstraint(
1203 _this.clutterembed.el.get_stage(),
1204 Clutter.AlignAxis.X_AXIS,
1209 this.el.fixed_x = 50.0f;
1210 this.el.fixed_y = 0.0f;
1211 //this.el.set_position(100,100);
1212 this.el.set_pivot_point(0.0f,0.0f);
1213 this.el.set_scale(0.0f,1.0f);
1214 this.el.set_size((_this.clutterembed.el.get_stage().width-50)/2,
1215 _this.clutterembed.el.get_stage().height);
1219 // user defined functions
1221 public class Xcls_codeeditview : Object
1223 public GtkClutter.Actor el;
1224 private Xcls_MainWindow _this;
1230 public Xcls_codeeditview(Xcls_MainWindow _owner )
1233 _this.codeeditview = this;
1234 this.el = new GtkClutter.Actor();
1238 // set gobject values
1245 this.el.add_constraint(
1246 new Clutter.AlignConstraint(
1247 _this.clutterembed.el.get_stage(),
1248 Clutter.AlignAxis.X_AXIS,
1253 this.el.fixed_x = 50.0f;
1254 this.el.fixed_y = 0.0f;
1255 //this.el.set_position(100,100);
1256 this.el.set_pivot_point(0.0f,0.0f);
1257 this.el.set_scale(0.0f,1.0f);
1258 this.el.set_size((_this.clutterembed.el.get_stage().width-50)/2,
1259 _this.clutterembed.el.get_stage().height);
1263 // user defined functions
1265 public class Xcls_addpropsview : Object
1267 public GtkClutter.Actor el;
1268 private Xcls_MainWindow _this;
1274 public Xcls_addpropsview(Xcls_MainWindow _owner )
1277 _this.addpropsview = this;
1278 this.el = new GtkClutter.Actor();
1282 // set gobject values
1289 this.el.add_constraint(
1290 new Clutter.AlignConstraint(
1291 _this.clutterembed.el.get_stage(),
1292 Clutter.AlignAxis.X_AXIS,
1297 this.el.fixed_x = 50.0f;
1298 this.el.fixed_y = 0.0f;
1299 //this.el.set_position(100,100);
1300 this.el.set_pivot_point(0.0f,0.0f);
1301 this.el.set_scale(0.0f,1.0f);
1302 this.el.set_size((_this.clutterembed.el.get_stage().width-50)/2,
1303 _this.clutterembed.el.get_stage().height);
1307 // user defined functions
1309 public class Xcls_projecteditview : Object
1311 public GtkClutter.Actor el;
1312 private Xcls_MainWindow _this;
1318 public Xcls_projecteditview(Xcls_MainWindow _owner )
1321 _this.projecteditview = this;
1322 this.el = new GtkClutter.Actor();
1326 // set gobject values
1333 this.el.add_constraint(
1334 new Clutter.AlignConstraint(
1335 _this.clutterembed.el.get_stage(),
1336 Clutter.AlignAxis.X_AXIS,
1341 //this.el.set_position(100,100);
1342 this.el.set_pivot_point(0.0f,0.0f);
1343 this.el.set_scale(1.0f,0.0f);
1344 this.el.set_size(_this.clutterembed.el.get_stage().width-50,
1345 _this.clutterembed.el.get_stage().height /2);
1349 // user defined functions
1351 public class Xcls_buttonlayout : Object
1353 public Clutter.Actor el;
1354 private Xcls_MainWindow _this;
1360 public Xcls_buttonlayout(Xcls_MainWindow _owner )
1363 _this.buttonlayout = this;
1364 this.el = new Clutter.Actor();
1368 // set gobject values
1369 var child_0 = new Xcls_BoxLayout16( _this );
1371 this.el.layout_manager = child_0.el;
1372 var child_1 = new Xcls_backbutton( _this );
1374 this.el.add_child ( child_1.el );
1375 var child_2 = new Xcls_projectbutton( _this );
1377 this.el.add_child ( child_2.el );
1378 var child_3 = new Xcls_editfilebutton( _this );
1380 this.el.add_child ( child_3.el );
1381 var child_4 = new Xcls_projecteditbutton( _this );
1383 this.el.add_child ( child_4.el );
1384 var child_5 = new Xcls_objectshowbutton( _this );
1386 this.el.add_child ( child_5.el );
1387 var child_6 = new Xcls_addpropbutton( _this );
1389 this.el.add_child ( child_6.el );
1390 var child_7 = new Xcls_addlistenerbutton( _this );
1392 this.el.add_child ( child_7.el );
1393 var child_8 = new Xcls_addprojectbutton( _this );
1395 this.el.add_child ( child_8.el );
1396 var child_9 = new Xcls_addfilebutton( _this );
1398 this.el.add_child ( child_9.el );
1399 var child_10 = new Xcls_delprojectbutton( _this );
1401 this.el.add_child ( child_10.el );
1402 var child_11 = new Xcls_new_window( _this );
1404 this.el.add_child ( child_11.el );
1410 this.el.add_constraint(
1411 new Clutter.AlignConstraint(
1412 _this.clutterembed.el.get_stage(),
1413 Clutter.AlignAxis.X_AXIS,
1419 //this.el.set_position(100,100);
1420 this.el.set_pivot_point(0.5f,0.5f);
1421 this.el.set_size(50,
1422 _this.clutterembed.el.get_stage().height);
1426 // user defined functions
1428 public class Xcls_BoxLayout16 : Object
1430 public Clutter.BoxLayout el;
1431 private Xcls_MainWindow _this;
1437 public Xcls_BoxLayout16(Xcls_MainWindow _owner )
1440 this.el = new Clutter.BoxLayout();
1444 // set gobject values
1445 this.el.orientation = Clutter.Orientation.VERTICAL;
1448 // user defined functions
1450 public class Xcls_backbutton : Object
1452 public Clutter.Actor el;
1453 private Xcls_MainWindow _this;
1459 public Xcls_backbutton(Xcls_MainWindow _owner )
1462 _this.backbutton = this;
1463 this.el = new Clutter.Actor();
1467 // set gobject values
1468 var child_0 = new Xcls_Actor18( _this );
1470 this.el.add_child ( child_0.el );
1474 this.el.set_size(50,50); }
1476 // user defined functions
1478 public class Xcls_Actor18 : Object
1480 public GtkClutter.Actor el;
1481 private Xcls_MainWindow _this;
1487 public Xcls_Actor18(Xcls_MainWindow _owner )
1490 this.el = new GtkClutter.Actor();
1494 // set gobject values
1495 var child_0 = new Xcls_Button19( _this );
1500 ((Gtk.Container)(this.el.get_widget())).add ( child_0.el); }
1502 // user defined functions
1504 public class Xcls_Button19 : Object
1506 public Gtk.Button el;
1507 private Xcls_MainWindow _this;
1513 public Xcls_Button19(Xcls_MainWindow _owner )
1516 this.el = new Gtk.Button();
1520 // set gobject values
1521 this.el.width_request = 50;
1522 this.el.height_request = 50;
1523 this.el.tooltip_text = "Back";
1524 var child_0 = new Xcls_Image20( _this );
1526 this.el.set_image ( child_0.el );
1529 this.el.clicked.connect( ( ) => {
1530 switch (_this.state) {
1533 _this.hideViewEditing();
1536 // should only occur if there is an active file..
1537 _this.showViewEditing();
1541 _this.hideAddProp();
1545 _this.hideAddListener();
1555 _this.hideCodeEdit();
1560 _this.hideProjectEdit();
1571 // user defined functions
1573 public class Xcls_Image20 : Object
1575 public Gtk.Image el;
1576 private Xcls_MainWindow _this;
1582 public Xcls_Image20(Xcls_MainWindow _owner )
1585 this.el = new Gtk.Image();
1589 // set gobject values
1590 this.el.icon_name = "go-previous";
1593 // user defined functions
1595 public class Xcls_projectbutton : Object
1597 public Clutter.Actor el;
1598 private Xcls_MainWindow _this;
1604 public Xcls_projectbutton(Xcls_MainWindow _owner )
1607 _this.projectbutton = this;
1608 this.el = new Clutter.Actor();
1612 // set gobject values
1613 var child_0 = new Xcls_Actor22( _this );
1615 this.el.add_child ( child_0.el );
1619 this.el.set_size(50,50); }
1621 // user defined functions
1623 public class Xcls_Actor22 : Object
1625 public GtkClutter.Actor el;
1626 private Xcls_MainWindow _this;
1632 public Xcls_Actor22(Xcls_MainWindow _owner )
1635 this.el = new GtkClutter.Actor();
1639 // set gobject values
1640 var child_0 = new Xcls_Button23( _this );
1645 ((Gtk.Container)(this.el.get_widget())).add ( child_0.el); }
1647 // user defined functions
1649 public class Xcls_Button23 : Object
1651 public Gtk.Button el;
1652 private Xcls_MainWindow _this;
1658 public Xcls_Button23(Xcls_MainWindow _owner )
1661 this.el = new Gtk.Button();
1665 // set gobject values
1666 this.el.width_request = 50;
1667 this.el.height_request = 50;
1668 var child_0 = new Xcls_Image24( _this );
1670 this.el.set_image ( child_0.el );
1673 this.el.clicked.connect( ( ) => {
1674 switch (_this.state) {
1677 _this.hideViewEditing();
1680 _this.showViewEditing();
1684 _this.hideAddProp();
1685 _this.hideViewEditing();
1688 _this.hideAddListener();
1689 _this.hideViewEditing();
1694 _this.hideViewEditing();
1705 // user defined functions
1707 public class Xcls_Image24 : Object
1709 public Gtk.Image el;
1710 private Xcls_MainWindow _this;
1716 public Xcls_Image24(Xcls_MainWindow _owner )
1719 this.el = new Gtk.Image();
1723 // set gobject values
1724 this.el.icon_name = "document-open";
1727 // user defined functions
1729 public class Xcls_editfilebutton : Object
1731 public Clutter.Actor el;
1732 private Xcls_MainWindow _this;
1738 public Xcls_editfilebutton(Xcls_MainWindow _owner )
1741 _this.editfilebutton = this;
1742 this.el = new Clutter.Actor();
1746 // set gobject values
1747 var child_0 = new Xcls_Actor26( _this );
1749 this.el.add_child ( child_0.el );
1753 this.el.set_size(50.0f,50.0f); }
1755 // user defined functions
1757 public class Xcls_Actor26 : Object
1759 public GtkClutter.Actor el;
1760 private Xcls_MainWindow _this;
1766 public Xcls_Actor26(Xcls_MainWindow _owner )
1769 this.el = new GtkClutter.Actor();
1773 // set gobject values
1774 var child_0 = new Xcls_Button27( _this );
1779 ((Gtk.Container)(this.el.get_widget())).add ( child_0.el); }
1781 // user defined functions
1783 public class Xcls_Button27 : Object
1785 public Gtk.Button el;
1786 private Xcls_MainWindow _this;
1792 public Xcls_Button27(Xcls_MainWindow _owner )
1795 this.el = new Gtk.Button();
1799 // set gobject values
1800 this.el.width_request = 50;
1801 this.el.height_request = 50;
1802 this.el.tooltip_text = "File Details";
1803 var child_0 = new Xcls_Image28( _this );
1805 this.el.set_image ( child_0.el );
1808 this.el.clicked.connect( ( ) => {
1810 // create a new file in project..
1811 if (_this.project == null || _this.left_tree.model.file == null) {
1815 _this.new_file_dialog.show(_this.left_tree.model.file);
1823 // user defined functions
1825 public class Xcls_Image28 : Object
1827 public Gtk.Image el;
1828 private Xcls_MainWindow _this;
1834 public Xcls_Image28(Xcls_MainWindow _owner )
1837 this.el = new Gtk.Image();
1841 // set gobject values
1842 this.el.icon_name = "document-properties";
1845 // user defined functions
1847 public class Xcls_projecteditbutton : Object
1849 public Clutter.Actor el;
1850 private Xcls_MainWindow _this;
1856 public Xcls_projecteditbutton(Xcls_MainWindow _owner )
1859 _this.projecteditbutton = this;
1860 this.el = new Clutter.Actor();
1864 // set gobject values
1865 var child_0 = new Xcls_Actor30( _this );
1867 this.el.add_child ( child_0.el );
1871 this.el.set_size(50,50); }
1873 // user defined functions
1875 public class Xcls_Actor30 : Object
1877 public GtkClutter.Actor el;
1878 private Xcls_MainWindow _this;
1884 public Xcls_Actor30(Xcls_MainWindow _owner )
1887 this.el = new GtkClutter.Actor();
1891 // set gobject values
1892 var child_0 = new Xcls_Button31( _this );
1897 ((Gtk.Container)(this.el.get_widget())).add ( child_0.el); }
1899 // user defined functions
1901 public class Xcls_Button31 : Object
1903 public Gtk.Button el;
1904 private Xcls_MainWindow _this;
1910 public Xcls_Button31(Xcls_MainWindow _owner )
1913 this.el = new Gtk.Button();
1917 // set gobject values
1918 this.el.width_request = 50;
1919 this.el.height_request = 50;
1920 this.el.tooltip_text = "Project Details";
1921 var child_0 = new Xcls_Image32( _this );
1923 this.el.set_image ( child_0.el );
1926 this.el.clicked.connect( ( ) => {
1927 switch (_this.state) {
1929 _this.showProjectEdit();
1932 // _this.showViewEditing();
1935 _this.hideProjectEdit();
1941 _this.hideAddProp();
1942 _this.showProjectEdit();
1945 _this.hideAddListener();
1946 _this.showProjectEdit();
1951 _this.showProjectEdit();
1962 // user defined functions
1964 public class Xcls_Image32 : Object
1966 public Gtk.Image el;
1967 private Xcls_MainWindow _this;
1973 public Xcls_Image32(Xcls_MainWindow _owner )
1976 this.el = new Gtk.Image();
1980 // set gobject values
1981 this.el.icon_name = "emblem-system";
1984 // user defined functions
1986 public class Xcls_objectshowbutton : Object
1988 public Clutter.Actor el;
1989 private Xcls_MainWindow _this;
1995 public Xcls_objectshowbutton(Xcls_MainWindow _owner )
1998 _this.objectshowbutton = this;
1999 this.el = new Clutter.Actor();
2003 // set gobject values
2004 var child_0 = new Xcls_Actor34( _this );
2006 this.el.add_child ( child_0.el );
2010 this.el.set_size(50,50);
2012 this.el.button_press_event.connect( ( ) => {
2016 switch (_this.state) {
2020 _this.hideAddProp();
2024 _this.hideAddListener();
2040 print("unhandled add objects from %s\n",_this.state);
2047 this.el.enter_event.connect( ( event) => {
2048 this.el.background_color = new Clutter.Color.from_string("#333");
2051 this.el.leave_event.connect( ( event) => {
2052 this.el.background_color = new Clutter.Color.from_string("#000");
2057 // user defined functions
2059 public class Xcls_Actor34 : Object
2061 public GtkClutter.Actor el;
2062 private Xcls_MainWindow _this;
2068 public Xcls_Actor34(Xcls_MainWindow _owner )
2071 this.el = new GtkClutter.Actor();
2075 // set gobject values
2076 var child_0 = new Xcls_Button35( _this );
2081 ((Gtk.Container)(this.el.get_widget())).add ( child_0.el); }
2083 // user defined functions
2085 public class Xcls_Button35 : Object
2087 public Gtk.Button el;
2088 private Xcls_MainWindow _this;
2094 public Xcls_Button35(Xcls_MainWindow _owner )
2097 this.el = new Gtk.Button();
2101 // set gobject values
2102 this.el.width_request = 50;
2103 this.el.height_request = 50;
2104 this.el.tooltip_text = "Add Child Element";
2105 var child_0 = new Xcls_Image36( _this );
2107 this.el.set_image ( child_0.el );
2110 this.el.clicked.connect( ( ) => {
2114 switch (_this.state) {
2118 _this.hideAddProp();
2122 _this.hideAddListener();
2138 print("unhandled add objects from %s\n",_this.state);
2147 // user defined functions
2149 public class Xcls_Image36 : Object
2151 public Gtk.Image el;
2152 private Xcls_MainWindow _this;
2158 public Xcls_Image36(Xcls_MainWindow _owner )
2161 this.el = new Gtk.Image();
2165 // set gobject values
2166 this.el.icon_name = "list-add";
2169 // user defined functions
2171 public class Xcls_addpropbutton : Object
2173 public Clutter.Actor el;
2174 private Xcls_MainWindow _this;
2180 public Xcls_addpropbutton(Xcls_MainWindow _owner )
2183 _this.addpropbutton = this;
2184 this.el = new Clutter.Actor();
2188 // set gobject values
2189 var child_0 = new Xcls_Actor38( _this );
2191 this.el.add_child ( child_0.el );
2195 this.el.set_size(50,50); }
2197 // user defined functions
2199 public class Xcls_Actor38 : Object
2201 public GtkClutter.Actor el;
2202 private Xcls_MainWindow _this;
2208 public Xcls_Actor38(Xcls_MainWindow _owner )
2211 this.el = new GtkClutter.Actor();
2215 // set gobject values
2216 var child_0 = new Xcls_Button39( _this );
2221 ((Gtk.Container)(this.el.get_widget())).add ( child_0.el); }
2223 // user defined functions
2225 public class Xcls_Button39 : Object
2227 public Gtk.Button el;
2228 private Xcls_MainWindow _this;
2234 public Xcls_Button39(Xcls_MainWindow _owner )
2237 this.el = new Gtk.Button();
2241 // set gobject values
2242 this.el.width_request = 50;
2243 this.el.height_request = 50;
2244 this.el.tooltip_text = "Add Property";
2245 var child_0 = new Xcls_Image40( _this );
2247 this.el.set_image ( child_0.el );
2250 this.el.clicked.connect( ( ) => {
2254 switch (_this.state) {
2256 _this.showAddProp();
2261 _this.showAddProp();
2265 _this.hideAddListener();
2266 _this.showAddProp();
2271 _this.hideAddProp();
2275 print("unhandled add property from %s\n",_this.state);
2285 // user defined functions
2287 public class Xcls_Image40 : Object
2289 public Gtk.Image el;
2290 private Xcls_MainWindow _this;
2296 public Xcls_Image40(Xcls_MainWindow _owner )
2299 this.el = new Gtk.Image();
2303 // set gobject values
2304 this.el.icon_name = "format-justify-left";
2307 // user defined functions
2309 public class Xcls_addlistenerbutton : Object
2311 public Clutter.Actor el;
2312 private Xcls_MainWindow _this;
2318 public Xcls_addlistenerbutton(Xcls_MainWindow _owner )
2321 _this.addlistenerbutton = this;
2322 this.el = new Clutter.Actor();
2326 // set gobject values
2327 var child_0 = new Xcls_Actor42( _this );
2329 this.el.add_child ( child_0.el );
2333 this.el.set_size(50,50); }
2335 // user defined functions
2337 public class Xcls_Actor42 : Object
2339 public GtkClutter.Actor el;
2340 private Xcls_MainWindow _this;
2346 public Xcls_Actor42(Xcls_MainWindow _owner )
2349 this.el = new GtkClutter.Actor();
2353 // set gobject values
2354 var child_0 = new Xcls_Button43( _this );
2359 ((Gtk.Container)(this.el.get_widget())).add ( child_0.el); }
2361 // user defined functions
2363 public class Xcls_Button43 : Object
2365 public Gtk.Button el;
2366 private Xcls_MainWindow _this;
2372 public Xcls_Button43(Xcls_MainWindow _owner )
2375 this.el = new Gtk.Button();
2379 // set gobject values
2380 this.el.width_request = 50;
2381 this.el.height_request = 50;
2382 this.el.tooltip_text = "Add Event Code";
2383 var child_0 = new Xcls_Image44( _this );
2385 this.el.set_image ( child_0.el );
2388 this.el.clicked.connect( ( ) => {
2392 switch (_this.state) {
2394 _this.showAddListener();
2399 _this.hideAddListener();
2404 _this.hideAddProp();
2405 _this.showAddListener();
2409 _this.showAddListener();
2413 print("unhandled add listener from %s\n",_this.state);
2424 // user defined functions
2426 public class Xcls_Image44 : Object
2428 public Gtk.Image el;
2429 private Xcls_MainWindow _this;
2435 public Xcls_Image44(Xcls_MainWindow _owner )
2438 this.el = new Gtk.Image();
2442 // set gobject values
2443 this.el.icon_name = "appointment-new";
2446 // user defined functions
2448 public class Xcls_addprojectbutton : Object
2450 public Clutter.Actor el;
2451 private Xcls_MainWindow _this;
2457 public Xcls_addprojectbutton(Xcls_MainWindow _owner )
2460 _this.addprojectbutton = this;
2461 this.el = new Clutter.Actor();
2465 // set gobject values
2466 var child_0 = new Xcls_Actor46( _this );
2468 this.el.add_child ( child_0.el );
2472 this.el.set_size(50.0f,50.0f); }
2474 // user defined functions
2476 public class Xcls_Actor46 : Object
2478 public GtkClutter.Actor el;
2479 private Xcls_MainWindow _this;
2485 public Xcls_Actor46(Xcls_MainWindow _owner )
2488 this.el = new GtkClutter.Actor();
2492 // set gobject values
2493 var child_0 = new Xcls_Button47( _this );
2498 ((Gtk.Container)(this.el.get_widget())).add ( child_0.el); }
2500 // user defined functions
2502 public class Xcls_Button47 : Object
2504 public Gtk.Button el;
2505 private Xcls_MainWindow _this;
2511 public Xcls_Button47(Xcls_MainWindow _owner )
2514 this.el = new Gtk.Button();
2518 // set gobject values
2519 this.el.width_request = 50;
2520 this.el.height_request = 50;
2521 this.el.tooltip_text = "New\nProj.";
2522 var child_0 = new Xcls_Image48( _this );
2524 this.el.set_image ( child_0.el );
2527 this.el.clicked.connect( ( ) => {
2529 // create a new file in project..
2530 //Xcls_DialogNewComponent.singleton().show(
2531 var pe = Xcls_EditProject.singleton();
2532 pe.el.set_transient_for(_this.el);
2533 pe.el.set_modal(true);
2540 _this.left_projects.is_loaded = false;
2541 _this.left_projects.load();
2542 _this.left_projects.selectProject(p);
2549 // user defined functions
2551 public class Xcls_Image48 : Object
2553 public Gtk.Image el;
2554 private Xcls_MainWindow _this;
2560 public Xcls_Image48(Xcls_MainWindow _owner )
2563 this.el = new Gtk.Image();
2567 // set gobject values
2568 this.el.icon_name = "folder-new";
2571 // user defined functions
2573 public class Xcls_addfilebutton : Object
2575 public Clutter.Actor el;
2576 private Xcls_MainWindow _this;
2582 public Xcls_addfilebutton(Xcls_MainWindow _owner )
2585 _this.addfilebutton = this;
2586 this.el = new Clutter.Actor();
2590 // set gobject values
2591 var child_0 = new Xcls_Actor50( _this );
2593 this.el.add_child ( child_0.el );
2597 this.el.set_size(50.0f,50.0f); }
2599 // user defined functions
2601 public class Xcls_Actor50 : Object
2603 public GtkClutter.Actor el;
2604 private Xcls_MainWindow _this;
2610 public Xcls_Actor50(Xcls_MainWindow _owner )
2613 this.el = new GtkClutter.Actor();
2617 // set gobject values
2618 var child_0 = new Xcls_Button51( _this );
2623 ((Gtk.Container)(this.el.get_widget())).add ( child_0.el); }
2625 // user defined functions
2627 public class Xcls_Button51 : Object
2629 public Gtk.Button el;
2630 private Xcls_MainWindow _this;
2636 public Xcls_Button51(Xcls_MainWindow _owner )
2639 this.el = new Gtk.Button();
2643 // set gobject values
2644 this.el.width_request = 50;
2645 this.el.height_request = 50;
2646 this.el.tooltip_text = "Add File";
2647 var child_0 = new Xcls_Image52( _this );
2649 this.el.set_image ( child_0.el );
2652 this.el.clicked.connect( () => {
2653 // create a new file in project..
2655 // what's the currently selected project...
2656 var proj = _this.left_projects.getSelectedProject();
2664 var f = JsRender.JsRender.factory(proj.xtype, proj, "");
2665 _this.project = proj;
2666 _this.new_file_dialog.show(f);
2672 // user defined functions
2674 public class Xcls_Image52 : Object
2676 public Gtk.Image el;
2677 private Xcls_MainWindow _this;
2683 public Xcls_Image52(Xcls_MainWindow _owner )
2686 this.el = new Gtk.Image();
2690 // set gobject values
2691 this.el.icon_name = "document-new";
2694 // user defined functions
2696 public class Xcls_delprojectbutton : Object
2698 public Clutter.Actor el;
2699 private Xcls_MainWindow _this;
2705 public Xcls_delprojectbutton(Xcls_MainWindow _owner )
2708 _this.delprojectbutton = this;
2709 this.el = new Clutter.Actor();
2713 // set gobject values
2714 var child_0 = new Xcls_Actor54( _this );
2716 this.el.add_child ( child_0.el );
2720 this.el.set_size(50,50); }
2722 // user defined functions
2724 public class Xcls_Actor54 : Object
2726 public GtkClutter.Actor el;
2727 private Xcls_MainWindow _this;
2733 public Xcls_Actor54(Xcls_MainWindow _owner )
2736 this.el = new GtkClutter.Actor();
2740 // set gobject values
2741 var child_0 = new Xcls_Button55( _this );
2746 ((Gtk.Container)(this.el.get_widget())).add ( child_0.el); }
2748 // user defined functions
2750 public class Xcls_Button55 : Object
2752 public Gtk.Button el;
2753 private Xcls_MainWindow _this;
2759 public Xcls_Button55(Xcls_MainWindow _owner )
2762 this.el = new Gtk.Button();
2766 // set gobject values
2767 this.el.width_request = 50;
2768 this.el.height_request = 50;
2769 this.el.tooltip_text = "Delelte Project";
2770 var child_0 = new Xcls_Image56( _this );
2772 this.el.set_image ( child_0.el );
2775 this.el.clicked.connect( ( ) => {
2777 var cd = DialogConfirm.singleton();
2778 cd.el.set_transient_for(_this.el);
2779 cd.el.set_modal(true);
2781 var project = _this.left_projects.getSelectedProject();
2782 if (project == null) {
2783 print("SKIP - no project\n");
2788 if (Gtk.ResponseType.YES != cd.show("Confirm",
2789 "Are you sure you want to delete project %s".printf(project.name))) {
2795 Project.Project.remove(project);
2796 _this.project = null;
2798 _this.left_projects.is_loaded = false;
2799 _this.left_projects.load();
2800 _this.clutterfiles.clearFiles();
2805 // user defined functions
2807 public class Xcls_Image56 : Object
2809 public Gtk.Image el;
2810 private Xcls_MainWindow _this;
2816 public Xcls_Image56(Xcls_MainWindow _owner )
2819 this.el = new Gtk.Image();
2823 // set gobject values
2824 this.el.icon_name = "user-trash";
2827 // user defined functions
2829 public class Xcls_new_window : Object
2831 public Clutter.Actor el;
2832 private Xcls_MainWindow _this;
2838 public Xcls_new_window(Xcls_MainWindow _owner )
2841 _this.new_window = this;
2842 this.el = new Clutter.Actor();
2846 // set gobject values
2847 var child_0 = new Xcls_Actor58( _this );
2849 this.el.add_child ( child_0.el );
2853 this.el.set_size(50,50); }
2855 // user defined functions
2857 public class Xcls_Actor58 : Object
2859 public GtkClutter.Actor el;
2860 private Xcls_MainWindow _this;
2866 public Xcls_Actor58(Xcls_MainWindow _owner )
2869 this.el = new GtkClutter.Actor();
2873 // set gobject values
2874 var child_0 = new Xcls_Button59( _this );
2879 ((Gtk.Container)(this.el.get_widget())).add ( child_0.el); }
2881 // user defined functions
2883 public class Xcls_Button59 : Object
2885 public Gtk.Button el;
2886 private Xcls_MainWindow _this;
2892 public Xcls_Button59(Xcls_MainWindow _owner )
2895 this.el = new Gtk.Button();
2899 // set gobject values
2900 this.el.width_request = 50;
2901 this.el.height_request = 50;
2902 this.el.tooltip_text = "Open New Window";
2903 var child_0 = new Xcls_Image60( _this );
2905 this.el.set_image ( child_0.el );
2908 this.el.clicked.connect( ( ) => {
2909 Xcls_MainWindow.singleton().no_windows++;
2910 var w = new Xcls_MainWindow();
2915 w.hideViewEditing();
2919 // user defined functions
2921 public class Xcls_Image60 : Object
2923 public Gtk.Image el;
2924 private Xcls_MainWindow _this;
2930 public Xcls_Image60(Xcls_MainWindow _owner )
2933 this.el = new Gtk.Image();
2937 // set gobject values
2938 this.el.icon_name = "window-new";
2941 // user defined functions