2 valac --pkg gio-2.0 --pkg posix --pkg gtk+-3.0 --pkg libnotify --pkg gtksourceview-3.0 --pkg libwnck-3.0 \
3 /tmp/MainWindow.vala -o /tmp/MainWindow
8 static int main (string[] args) {
10 new Xcls_MainWindow();
11 MainWindow.show_all();
18 public static Xcls_MainWindow MainWindow;
20 public class Xcls_MainWindow : Object
23 private Xcls_MainWindow _this;
25 public static Xcls_MainWindow singleton()
27 if (MainWindow == null) {
28 MainWindow= new Xcls_MainWindow();
32 public Xcls_vbox vbox;
33 public Xcls_topbar topbar;
34 public Xcls_mainpane mainpane;
35 public Xcls_leftpane leftpane;
36 public Xcls_editpane editpane;
37 public Xcls_tree tree;
38 public Xcls_props props;
39 public Xcls_clutterembed clutterembed;
40 public Xcls_rooview rooview;
41 public Xcls_objectview objectview;
42 public Xcls_codeeditview codeeditview;
43 public Xcls_addpropsview addpropsview;
44 public Xcls_projecteditview projecteditview;
45 public Xcls_buttonlayout buttonlayout;
46 public Xcls_projectbutton projectbutton;
47 public Xcls_projecteditbutton projecteditbutton;
48 public Xcls_objectshowbutton objectshowbutton;
49 public Xcls_addpropbutton addpropbutton;
50 public Xcls_addlistenerbutton addlistenerbutton;
53 public Project.Project project;
54 public Xcls_ClutterFiles clutterfiles;
55 public Xcls_Editor code_editor;
56 public Xcls_GladeView window_gladeview;
57 public Xcls_LeftProps left_props;
58 public Xcls_ProjectSettings projectsettings;
59 public Xcls_RightPalete rightpalete;
60 public Xcls_WindowAddProp add_props;
61 public Xcls_WindowLeftProjects left_projects;
62 public Xcls_WindowLeftTree left_tree;
63 public Xcls_WindowRooView window_rooview;
64 public bool children_loaded;
69 public Xcls_MainWindow()
72 this.el = new Gtk.Window( Gtk.WindowType.TOPLEVEL );
76 this.clutterfiles = null;
77 this.code_editor = null;
78 this.window_gladeview = null;
79 this.left_props = null;
80 this.projectsettings = null;
81 this.rightpalete = null;
82 this.add_props = null;
83 this.left_projects = null;
84 this.left_tree = null;
85 this.window_rooview = null;
86 this.children_loaded = false;
87 this.title = "Application Builder";
90 this.el.border_width = 0;
91 this.el.default_height = 500;
92 this.el.default_width = 800;
93 var child_0 = new Xcls_vbox( _this );
95 this.el.add ( child_0.el );
100 //this.el.show_all();
105 this.el.show.connect( ( ) => {
106 // hide the file editing..
108 //this.hideViewEditing();
110 this.el.delete_event.connect( ( event) => {
113 this.el.destroy.connect( => ()
119 // userdefined functions
120 public void hideAddListener() {
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 hideAddProp() {
137 _this.addpropsview.el.save_easing_state();
138 var el = _this.rooview.el;
139 el.save_easing_state();
142 el.set_scale(1.0f,1.0f);
143 _this.addpropsview.el.set_scale(0.0f,0.0f);
144 _this.state = "edit";
147 //_this.clutterfiles.loadProject(_this.project);
149 el.restore_easing_state();
150 _this.addpropsview.el.restore_easing_state();
152 public void hideCodeEdit() {
153 //this.code_editor.saveContents();
155 _this.codeeditview.el.save_easing_state();
156 var el = _this.rooview.el;
157 el.save_easing_state();
160 el.set_scale(1.0f,1.0f);
161 _this.codeeditview.el.set_scale(0.0f,0.0f);
162 _this.state = "edit";
165 //_this.clutterfiles.loadProject(_this.project);
167 el.restore_easing_state();
168 _this.codeeditview.el.restore_easing_state();
170 public void hideObject() {
171 // return to editing state..
177 _this.objectview.el.save_easing_state();
178 var el = _this.rooview.el;
179 el.save_easing_state();
182 el.set_scale(1.0f,1.0f);
183 _this.objectview.el.set_scale(0.0f,0.0f);
184 _this.state = "edit";
187 //_this.clutterfiles.loadProject(_this.project);
189 el.restore_easing_state();
190 _this.objectview.el.restore_easing_state();
194 public void hideProjectEdit () {
195 // return to editing state..
197 _this.projectbutton.el.show();
198 _this.projecteditbutton.el.show();
201 //this.rooview.el.hide();
202 //this.edit_project.el.show();
203 _this.projecteditview.el.save_easing_state();
204 var el = _this.rooview.el;
205 el.save_easing_state();
208 el.set_scale(1.0f,1.0f);
209 _this.projecteditview.el.set_scale(1.0f,0.0f);
210 _this.state = "edit";
213 //_this.clutterfiles.loadProject(_this.project);
215 el.restore_easing_state();
216 _this.projecteditview.el.restore_easing_state();
219 public void hideViewEditing ( ) {
221 if (this.left_tree.getActiveFile() != null) {
222 if (this.left_tree.getActiveFile().xtype == "Roo" ) {
223 this.window_rooview.createThumb();
225 this.window_gladeview.createThumb();
228 _this.projecteditbutton.el.hide();
229 this.editpane.el.hide();
230 //this.rooview.el.hide();
231 this.left_projects.el.show();
233 var el = _this.rooview.el;
234 el.save_easing_state();
235 el.set_easing_duration(1000);
236 // show project / file view..
237 //_this.mainpane.lastWidth = _this.leftpane.el.get_position();
238 //_this.mainpane.el.set_position(0);
240 el.set_rotation_angle(Clutter.RotateAxis.Y_AXIS, 360.0f);
241 el.set_scale(0.0f,0.0f);
243 _this.state = "files";
245 _this.left_projects.selectProject(_this.project);
246 //_this.clutterfiles.loadProject(_this.project);
248 el.restore_easing_state();
250 print("show view browsing");
252 public void initChildren () {
253 // this needs putting in a better place..
255 print("init children");
256 this.left_tree = new Xcls_WindowLeftTree();
257 this.left_tree.ref();
258 this.tree.el.pack_start(this.left_tree.el,true, true,0);
259 this.left_tree.el.show_all();
261 this.left_tree.before_node_change.connect(() => {
262 if (this.state != "codeedit") {
263 this.left_props.finish_editing();
266 if (!this.code_editor.saveContents()) {
273 this.left_tree.node_selected.connect((sel) => {
275 print("node_selected called %s\n", (sel == null) ? "NULL" : "a value");
278 this.left_props.el.hide();
280 this.left_props.el.show();
281 this.left_props.load(this.left_tree.getActiveFile(), sel);
282 switch (this.state) {
286 this.rightpalete.clear();
289 this.rightpalete.load(_this.left_tree.getActiveFile().palete(), sel.fqn());
295 this.add_props.clear();
298 this.add_props.show(_this.left_tree.getActiveFile().palete(), "props", sel.fqn());
303 this.add_props.clear();
306 this.add_props.show(_this.left_tree.getActiveFile().palete(), "signals", sel.fqn());
320 this.left_tree.changed.connect(() => {
321 this.window_rooview.requestRedraw();
328 this.left_props =new Xcls_LeftProps();
329 this.left_props.ref();
330 this.props.el.pack_start(this.left_props.el,true, true,0);
331 this.left_props.el.show_all();
333 this.left_props.show_editor.connect( (file, node, type, key) => {
334 this.showCodeEdit(node, type, key);
336 this.left_props.stop_editor.connect( () => {
337 if (this.state != "codeedit") {
341 var ret = this.code_editor.saveContents();
348 this.left_props.changed.connect(() => {
349 if (this.left_tree.getActiveFile().xtype == "Roo" ) {
350 this.window_rooview.requestRedraw();
352 this.window_gladeview.loadFile(this.left_tree.getActiveFile());
360 this.left_projects = new Xcls_WindowLeftProjects();
361 this.left_projects.ref();
362 this.leftpane.el.pack_start(this.left_projects.el,true, true,0);
363 this.left_projects.el.show_all();
364 this.left_projects.project_selected.connect((proj) => {
366 _this.clutterfiles.loadProject(proj);
372 this.projectsettings =new Xcls_ProjectSettings();
373 this.projectsettings.ref(); /// really?
374 ((Gtk.Container)(this.projecteditview.el.get_widget())).add(this.projectsettings.el);
375 //this.projectsettings.el.show_all();
377 var stage = _this.projecteditview.el.get_stage();
378 stage.set_background_color( Clutter.Color.from_string("#000"));
380 this.projectsettings.buttonPressed.connect((btn) => {
381 if (this.left_tree.getActiveFile().xtype == "Roo" ) {
384 _this.window_rooview.view.renderJS(true);
386 if (btn == "apply") {
387 _this.window_rooview.view.renderJS(true);
391 // do nothing for gtk..
393 this.hideProjectEdit();
398 // objects (palate..)
399 this.rightpalete = new Xcls_RightPalete();
400 this.rightpalete.ref(); /// really?
401 ((Gtk.Container)(this.objectview.el.get_widget())).add(this.rightpalete.el);
402 //this.projectsettings.el.show_all();
404 stage = _this.objectview.el.get_stage();
405 stage.set_background_color( Clutter.Color.from_string("#000"));
407 /*this.projectsettings.buttonPressed.connect((btn) => {
409 _this.window_rooview.view.renderJS(true);
411 if (btn == "apply") {
412 _this.window_rooview.view.renderJS(true);
415 this.hideProjectEdit();
423 this.add_props = new Xcls_WindowAddProp();
424 this.add_props.ref(); /// really?
425 ((Gtk.Container)(this.addpropsview.el.get_widget())).add(this.add_props.el);
426 //this.projectsettings.el.show_all();
428 stage = _this.addpropsview.el.get_stage();
429 stage.set_background_color( Clutter.Color.from_string("#000"));
432 _this.add_props.select.connect( (key,type,skel, etype) => {
433 this.left_props.addProp(etype, key, skel, type);
439 this.code_editor = new Xcls_Editor();
440 this.code_editor.ref(); /// really?
441 ((Gtk.Container)(this.codeeditview.el.get_widget())).add(this.code_editor.el);
442 //this.projectsettings.el.show_all();
444 stage = _this.codeeditview.el.get_stage();
445 stage.set_background_color( Clutter.Color.from_string("#000"));
455 this.window_rooview =new Xcls_WindowRooView();
456 this.window_rooview.ref();
457 ((Gtk.Container)(this.rooview.el.get_widget())).add(this.window_rooview.el);
458 this.window_rooview.el.show_all();
460 stage = _this.rooview.el.get_stage();
461 stage.set_background_color( Clutter.Color.from_string("#000"));
466 this.window_gladeview =new Xcls_GladeView();
467 this.window_gladeview.ref();
469 //((Gtk.Container)(this.rooview.el.get_widget())).add(this.window_gladeview.el);
470 ///this.window_gladeview.el.hide();
477 this.clutterfiles = new Xcls_ClutterFiles();
478 this.clutterfiles.ref();
479 stage.add_child(this.clutterfiles.el);
480 this.clutterfiles.el.show_all();
483 this.clutterfiles.open.connect((file) => {
484 _this.project = file.project;
485 _this.showViewEditing();
486 this.left_tree.model.loadFile(file);
487 var ctr= ((Gtk.Container)(this.rooview.el.get_widget()));
488 if (file.xtype == "Roo" ) {
489 ctr.foreach( (w) => { ctr.remove(w); });
490 ctr.add(this.window_rooview.el);
491 this.window_rooview.loadFile(file);
493 this.window_rooview.el.show_all();
495 ctr.foreach( (w) => { ctr.remove(w); });
496 ctr.add(this.window_gladeview.el);
497 this.window_gladeview.loadFile(file);
498 this.window_gladeview.el.show_all();
500 print("OPEN : " + file.name);
510 var tl = new Clutter.Timeline(6000);
511 tl.set_repeat_count(-1);
515 this.children_loaded = true;
521 public void setTitle (string str) {
522 this.el.set_title(this.title + " - " + str);
525 this.left_tree =new Xcls_WindowLeftTree();
526 _this.vbox.el.pack_start(this.left_tree.el,true, true,0);
530 public void showAddListener() {
534 var ae = this.left_tree.getActiveElement();
539 //this.rooview.el.hide();
540 this.add_props.el.show_all();
542 Palete.factory(this.project.xtype),
546 //this.rightpalete.show(this.project);
548 _this.addpropsview.el.save_easing_state();
550 var el = _this.rooview.el;
551 el.save_easing_state();
554 el.set_scale(0.5f,0.5f);
556 _this.addpropsview.el.set_scale(1.0f,1.0f);
560 //_this.clutterfiles.loadProject(_this.project);
562 el.restore_easing_state();
563 _this.addpropsview.el.restore_easing_state();
564 this.state = "addlistener";
566 public void showAddProp() {
569 var ae = this.left_tree.getActiveElement();
577 //this.rooview.el.hide();
578 this.add_props.el.show_all();
580 Palete.factory(this.project.xtype),
585 _this.addpropsview.el.save_easing_state();
587 var el = _this.rooview.el;
588 el.save_easing_state();
591 el.set_scale(0.5f,0.5f);
593 _this.addpropsview.el.set_scale(1.0f,1.0f);
597 //_this.clutterfiles.loadProject(_this.project);
599 el.restore_easing_state();
600 _this.addpropsview.el.restore_easing_state();
601 this.state = "addprop";
603 public void showCodeEdit(JsRender.Node node, string ptype, string key)
605 // this is a bit different,
606 // it's not called via a button - but triggered by the prop edit class signal.
607 // so it has to hide any other state..
617 this.hideAddListener();
624 //this.rooview.el.hide();
625 this.code_editor.el.show_all();
626 this.code_editor.show(
632 _this.codeeditview.el.save_easing_state();
634 var el = _this.rooview.el;
635 el.save_easing_state();
638 el.set_scale(0.5f,0.5f);
640 _this.codeeditview.el.set_scale(1.0f,1.0f);
644 //_this.clutterfiles.loadProject(_this.project);
646 el.restore_easing_state();
647 _this.codeeditview.el.restore_easing_state();
648 this.state = "codeedit";
650 public void showObject() {
653 // what's the active node on the left hand side..
655 var n = _this.left_tree.getActiveElement();
663 //this.rooview.el.hide();
664 this.rightpalete.el.show_all();
665 this.rightpalete.load(_this.left_tree.getActiveFile().palete(), n.fqn());
668 //this.rightpalete.show(this.project);
670 _this.objectview.el.save_easing_state();
672 var el = _this.rooview.el;
673 el.save_easing_state();
676 el.set_scale(0.5f,0.5f);
678 _this.objectview.el.set_scale(1.0f,1.0f);
682 //_this.clutterfiles.loadProject(_this.project);
684 el.restore_easing_state();
685 _this.objectview.el.restore_easing_state();
686 this.state = "object";
688 public void showProjectEdit () {
689 // make the browser smaller, and show the edit dialog
692 _this.projectbutton.el.hide();
693 _this.projecteditbutton.el.hide();
696 //this.rooview.el.hide();
697 this.projectsettings.el.show_all();
698 this.projectsettings.show(this.project);
699 _this.projecteditview.el.save_easing_state();
701 var el = _this.rooview.el;
702 el.save_easing_state();
705 el.set_scale(0.5f,0.5f);
707 _this.projecteditview.el.set_scale(1.0f,1.0f);
709 _this.state = "projectedit";
712 //_this.clutterfiles.loadProject(_this.project);
714 el.restore_easing_state();
715 _this.projecteditview.el.restore_easing_state();
716 // print("show view browsing");
719 public void showViewEditing ( ) {
720 this.editpane.el.show();
721 // this.rooview.el.show();
722 this.left_projects.el.hide();
724 _this.projecteditbutton.el.show();
726 var el = _this.rooview.el;
727 el.save_easing_state();
730 el.set_rotation_angle(Clutter.RotateAxis.Y_AXIS, 0.0f);
731 el.set_scale(1.0f,1.0f);
732 _this.state = "edit";
733 // _this.mainpane.el.set_position(_this.leftpane.lastWidth);
734 _this.clutterfiles.el.hide();
736 el.restore_easing_state();
738 print("show view editing");
741 // skip |xns - no return type
742 public class Xcls_vbox : Object
745 private Xcls_MainWindow _this;
751 public Xcls_vbox(Xcls_MainWindow _owner )
755 this.el = new Gtk.VBox( false, 0 );
759 // set gobject values
760 var child_0 = new Xcls_topbar( _this );
762 this.el.pack_start ( child_0.el , false,true,0 );
763 var child_1 = new Xcls_mainpane( _this );
765 this.el.pack_end ( child_1.el , true,true,0 );
768 // userdefined functions
770 // skip |xns - no return type
772 public class Xcls_topbar : Object
775 private Xcls_MainWindow _this;
781 public Xcls_topbar(Xcls_MainWindow _owner )
785 this.el = new Gtk.HBox( true, 0 );
789 // set gobject values
790 this.el.height_request = 20;
791 this.el.vexpand = false ;
794 // userdefined functions
796 // skip |xns - no return type
798 public class Xcls_mainpane : Object
800 public Gtk.HPaned el;
801 private Xcls_MainWindow _this;
805 public int lastWidth;
808 public Xcls_mainpane(Xcls_MainWindow _owner )
811 _this.mainpane = this;
812 this.el = new Gtk.HPaned();
817 // set gobject values
818 this.el.position = 400;
819 var child_0 = new Xcls_leftpane( _this );
821 this.el.add1 ( child_0.el );
822 var child_1 = new Xcls_VBox9( _this );
824 this.el.add2 ( child_1.el );
827 // userdefined functions
829 // skip |xns - no return type
831 public class Xcls_leftpane : Object
834 private Xcls_MainWindow _this;
840 public Xcls_leftpane(Xcls_MainWindow _owner )
843 _this.leftpane = this;
844 this.el = new Gtk.VBox( true, 0 );
848 // set gobject values
849 var child_0 = new Xcls_editpane( _this );
851 this.el.pack_start ( child_0.el , false,true,0 );
854 // userdefined functions
856 // skip |xns - no return type
858 public class Xcls_editpane : Object
860 public Gtk.VPaned el;
861 private Xcls_MainWindow _this;
867 public Xcls_editpane(Xcls_MainWindow _owner )
870 _this.editpane = this;
871 this.el = new Gtk.VPaned();
875 // set gobject values
876 var child_0 = new Xcls_tree( _this );
878 this.el.add1 ( child_0.el );
879 var child_1 = new Xcls_props( _this );
881 this.el.add2 ( child_1.el );
884 // userdefined functions
886 // skip |xns - no return type
888 public class Xcls_tree : Object
891 private Xcls_MainWindow _this;
897 public Xcls_tree(Xcls_MainWindow _owner )
901 this.el = new Gtk.VBox( true, 0 );
905 // set gobject values
908 // userdefined functions
910 // skip |xns - no return type
912 public class Xcls_props : Object
915 private Xcls_MainWindow _this;
921 public Xcls_props(Xcls_MainWindow _owner )
925 this.el = new Gtk.VBox( true, 0 );
929 // set gobject values
932 // userdefined functions
934 // skip |xns - no return type
936 public class Xcls_VBox9 : Object
939 private Xcls_MainWindow _this;
945 public Xcls_VBox9(Xcls_MainWindow _owner )
948 this.el = new Gtk.VBox( true, 0 );
952 // set gobject values
953 var child_0 = new Xcls_clutterembed( _this );
955 this.el.pack_start ( child_0.el , true,true,0 );
958 // userdefined functions
960 // skip |xns - no return type
962 public class Xcls_clutterembed : Object
964 public GtkClutter.Embed el;
965 private Xcls_MainWindow _this;
971 public Xcls_clutterembed(Xcls_MainWindow _owner )
974 _this.clutterembed = this;
975 this.el = new GtkClutter.Embed();
979 // set gobject values
980 var child_0 = new Xcls_rooview( _this );
982 this.el.get_stage().add_child ( child_0.el );
983 var child_1 = new Xcls_objectview( _this );
985 this.el.get_stage().add_child ( child_1.el );
986 var child_2 = new Xcls_codeeditview( _this );
988 this.el.get_stage().add_child ( child_2.el );
989 var child_3 = new Xcls_addpropsview( _this );
991 this.el.get_stage().add_child ( child_3.el );
992 var child_4 = new Xcls_projecteditview( _this );
994 this.el.get_stage().add_child ( child_4.el );
995 var child_5 = new Xcls_buttonlayout( _this );
997 this.el.get_stage().add_child ( child_5.el );
1000 var stage = this.el.get_stage();
1001 stage.set_background_color( Clutter.Color.from_string("#000"));
1006 this.el.size_allocate.connect( ( alloc) => {
1007 if (!_this.children_loaded) { return; }
1008 //print("size_allocation %d,%d\n".printf(alloc.width, alloc.height));
1010 /* _this.rooview.el.set_size(this.el.get_stage().width-50,
1011 this.el.get_stage().height);
1012 _this.clutterfiles.set_size(this.el.get_stage().width-50,
1013 this.el.get_stage().height);
1015 // this.el.set_size_request(alloc.width,alloc.height);
1016 // this.el.get_stage().set_size(alloc.width,alloc.height);
1017 _this.rooview.el.set_size(alloc.width-50,
1022 _this.clutterfiles.set_size(alloc.width-50,
1024 _this.projecteditview.el.set_size(alloc.width-50,
1025 alloc.height / 2.0f);
1027 _this.objectview.el.set_size((alloc.width -50)/2.0f,
1030 _this.addpropsview.el.set_size((alloc.width -50)/2.0f,
1033 _this.codeeditview.el.set_size((alloc.width -50)/2.0f,
1038 // userdefined functions
1040 // skip |xns - no return type
1042 public class Xcls_rooview : Object
1044 public GtkClutter.Actor el;
1045 private Xcls_MainWindow _this;
1051 public Xcls_rooview(Xcls_MainWindow _owner )
1054 _this.rooview = this;
1055 this.el = new GtkClutter.Actor();
1059 // set gobject values
1065 this.el.add_constraint(
1066 new Clutter.AlignConstraint(
1067 _this.clutterembed.el.get_stage(),
1068 Clutter.AlignAxis.X_AXIS,
1073 //this.el.set_position(100,100);
1074 this.el.set_pivot_point(1.0f,1.0f);
1076 this.el.set_size(_this.clutterembed.el.get_stage().width-50,
1077 _this.clutterembed.el.get_stage().height);
1082 // userdefined functions
1084 // skip |xns - no return type
1086 public class Xcls_objectview : Object
1088 public GtkClutter.Actor el;
1089 private Xcls_MainWindow _this;
1095 public Xcls_objectview(Xcls_MainWindow _owner )
1098 _this.objectview = this;
1099 this.el = new GtkClutter.Actor();
1103 // set gobject values
1109 this.el.add_constraint(
1110 new Clutter.AlignConstraint(
1111 _this.clutterembed.el.get_stage(),
1112 Clutter.AlignAxis.X_AXIS,
1117 this.el.fixed_x = 50.0f;
1118 this.el.fixed_y = 0.0f;
1119 //this.el.set_position(100,100);
1120 this.el.set_pivot_point(0.0f,0.0f);
1121 this.el.set_scale(0.0f,1.0f);
1122 this.el.set_size((_this.clutterembed.el.get_stage().width-50)/2,
1123 _this.clutterembed.el.get_stage().height);
1128 // userdefined functions
1130 // skip |xns - no return type
1132 public class Xcls_codeeditview : Object
1134 public GtkClutter.Actor el;
1135 private Xcls_MainWindow _this;
1141 public Xcls_codeeditview(Xcls_MainWindow _owner )
1144 _this.codeeditview = this;
1145 this.el = new GtkClutter.Actor();
1149 // set gobject values
1155 this.el.add_constraint(
1156 new Clutter.AlignConstraint(
1157 _this.clutterembed.el.get_stage(),
1158 Clutter.AlignAxis.X_AXIS,
1163 this.el.fixed_x = 50.0f;
1164 this.el.fixed_y = 0.0f;
1165 //this.el.set_position(100,100);
1166 this.el.set_pivot_point(0.0f,0.0f);
1167 this.el.set_scale(0.0f,1.0f);
1168 this.el.set_size((_this.clutterembed.el.get_stage().width-50)/2,
1169 _this.clutterembed.el.get_stage().height);
1174 // userdefined functions
1176 // skip |xns - no return type
1178 public class Xcls_addpropsview : Object
1180 public GtkClutter.Actor el;
1181 private Xcls_MainWindow _this;
1187 public Xcls_addpropsview(Xcls_MainWindow _owner )
1190 _this.addpropsview = this;
1191 this.el = new GtkClutter.Actor();
1195 // 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);
1220 // userdefined functions
1222 // skip |xns - no return type
1224 public class Xcls_projecteditview : Object
1226 public GtkClutter.Actor el;
1227 private Xcls_MainWindow _this;
1233 public Xcls_projecteditview(Xcls_MainWindow _owner )
1236 _this.projecteditview = this;
1237 this.el = new GtkClutter.Actor();
1241 // set gobject values
1247 this.el.add_constraint(
1248 new Clutter.AlignConstraint(
1249 _this.clutterembed.el.get_stage(),
1250 Clutter.AlignAxis.X_AXIS,
1255 //this.el.set_position(100,100);
1256 this.el.set_pivot_point(0.0f,0.0f);
1257 this.el.set_scale(1.0f,0.0f);
1258 this.el.set_size(_this.clutterembed.el.get_stage().width-50,
1259 _this.clutterembed.el.get_stage().height /2);
1264 // userdefined functions
1266 // skip |xns - no return type
1268 public class Xcls_buttonlayout : Object
1270 public Clutter.Actor el;
1271 private Xcls_MainWindow _this;
1277 public Xcls_buttonlayout(Xcls_MainWindow _owner )
1280 _this.buttonlayout = this;
1281 this.el = new Clutter.Actor();
1285 // set gobject values
1286 var child_0 = new Xcls_BoxLayout17( _this );
1288 this.el.layout_manager = child_0.el;
1289 var child_1 = new Xcls_projectbutton( _this );
1291 this.el.add_child ( child_1.el );
1292 var child_2 = new Xcls_projecteditbutton( _this );
1294 this.el.add_child ( child_2.el );
1295 var child_3 = new Xcls_objectshowbutton( _this );
1297 this.el.add_child ( child_3.el );
1298 var child_4 = new Xcls_addpropbutton( _this );
1300 this.el.add_child ( child_4.el );
1301 var child_5 = new Xcls_addlistenerbutton( _this );
1303 this.el.add_child ( child_5.el );
1308 this.el.add_constraint(
1309 new Clutter.AlignConstraint(
1310 _this.clutterembed.el.get_stage(),
1311 Clutter.AlignAxis.X_AXIS,
1317 //this.el.set_position(100,100);
1318 this.el.set_pivot_point(0.5f,0.5f);
1319 this.el.set_size(50,
1320 _this.clutterembed.el.get_stage().height);
1325 // userdefined functions
1327 // skip |xns - no return type
1329 public class Xcls_BoxLayout17 : Object
1331 public Clutter.BoxLayout el;
1332 private Xcls_MainWindow _this;
1338 public Xcls_BoxLayout17(Xcls_MainWindow _owner )
1341 this.el = new Clutter.BoxLayout();
1345 // set gobject values
1346 this.el.orientation = Clutter.Orientation.VERTICAL;
1349 // userdefined functions
1351 // skip |xns - no return type
1353 public class Xcls_projectbutton : Object
1355 public Clutter.Actor el;
1356 private Xcls_MainWindow _this;
1362 public Xcls_projectbutton(Xcls_MainWindow _owner )
1365 _this.projectbutton = this;
1366 this.el = new Clutter.Actor();
1370 // set gobject values
1371 this.el.reactive = true;
1372 var child_0 = new Xcls_Text19( _this );
1374 this.el.add_child ( child_0.el );
1377 this.el.set_size(50,50);
1380 this.el.enter_event.connect( ( event) => {
1381 this.el.background_color = new Clutter.Color.from_string("#333");
1384 this.el.leave_event.connect( ( event) => {
1385 this.el.background_color = new Clutter.Color.from_string("#000");
1388 this.el.button_press_event.connect( ( ) => {
1389 switch (_this.state) {
1392 _this.hideViewEditing();
1395 _this.showViewEditing();
1399 _this.hideAddProp();
1400 _this.hideViewEditing();
1403 _this.hideAddListener();
1404 _this.hideViewEditing();
1409 _this.hideViewEditing();
1420 // userdefined functions
1422 // skip |xns - no return type
1424 public class Xcls_Text19 : Object
1426 public Clutter.Text el;
1427 private Xcls_MainWindow _this;
1433 public Xcls_Text19(Xcls_MainWindow _owner )
1436 this.el = new Clutter.Text.full("Sans 10px","Open\nFiles",new Clutter.Color.from_string("#fff"));
1440 // set gobject values
1441 this.el.line_alignment = Pango.Alignment.CENTER;
1442 this.el.x_align = Clutter.ActorAlign.CENTER;
1443 this.el.x_expand = false;
1444 this.el.y_align = Clutter.ActorAlign.CENTER;
1445 this.el.y_expand = false;
1448 // userdefined functions
1450 // skip |xns - no return type
1452 public class Xcls_projecteditbutton : Object
1454 public Clutter.Actor el;
1455 private Xcls_MainWindow _this;
1461 public Xcls_projecteditbutton(Xcls_MainWindow _owner )
1464 _this.projecteditbutton = this;
1465 this.el = new Clutter.Actor();
1469 // set gobject values
1470 this.el.reactive = true;
1471 var child_0 = new Xcls_Text21( _this );
1473 this.el.add_child ( child_0.el );
1476 this.el.set_size(50,50);
1479 this.el.enter_event.connect( ( event) => {
1480 this.el.background_color = new Clutter.Color.from_string("#333");
1483 this.el.leave_event.connect( ( event) => {
1484 this.el.background_color = new Clutter.Color.from_string("#000");
1487 this.el.button_press_event.connect( ( ) => {
1488 switch (_this.state) {
1490 _this.showProjectEdit();
1493 // _this.showViewEditing();
1496 _this.hideProjectEdit();
1502 _this.hideAddProp();
1503 _this.showProjectEdit();
1506 _this.hideAddListener();
1507 _this.showProjectEdit();
1512 _this.showProjectEdit();
1523 // userdefined functions
1525 // skip |xns - no return type
1527 public class Xcls_Text21 : Object
1529 public Clutter.Text el;
1530 private Xcls_MainWindow _this;
1536 public Xcls_Text21(Xcls_MainWindow _owner )
1539 this.el = new Clutter.Text.full("Sans 10px","Edit\nProject\nDetails",new Clutter.Color.from_string("#fff"));
1543 // set gobject values
1544 this.el.line_alignment = Pango.Alignment.CENTER;
1545 this.el.x_align = Clutter.ActorAlign.CENTER;
1546 this.el.x_expand = false;
1547 this.el.y_align = Clutter.ActorAlign.CENTER;
1548 this.el.y_expand = false;
1551 // userdefined functions
1553 // skip |xns - no return type
1555 public class Xcls_objectshowbutton : Object
1557 public Clutter.Actor el;
1558 private Xcls_MainWindow _this;
1564 public Xcls_objectshowbutton(Xcls_MainWindow _owner )
1567 _this.objectshowbutton = this;
1568 this.el = new Clutter.Actor();
1572 // set gobject values
1573 this.el.reactive = true;
1574 var child_0 = new Xcls_Text23( _this );
1576 this.el.add_child ( child_0.el );
1579 this.el.set_size(50,50);
1582 this.el.enter_event.connect( ( event) => {
1583 this.el.background_color = new Clutter.Color.from_string("#333");
1586 this.el.leave_event.connect( ( event) => {
1587 this.el.background_color = new Clutter.Color.from_string("#000");
1590 this.el.button_press_event.connect( ( ) => {
1594 switch (_this.state) {
1598 _this.hideAddProp();
1602 _this.hideAddListener();
1618 print("unhandled add objects from %s\n",_this.state);
1627 // userdefined functions
1629 // skip |xns - no return type
1631 public class Xcls_Text23 : Object
1633 public Clutter.Text el;
1634 private Xcls_MainWindow _this;
1640 public Xcls_Text23(Xcls_MainWindow _owner )
1643 this.el = new Clutter.Text.full("Sans 10px","Show\nPalate",new Clutter.Color.from_string("#fff"));
1647 // set gobject values
1648 this.el.line_alignment = Pango.Alignment.CENTER;
1649 this.el.x_align = Clutter.ActorAlign.CENTER;
1650 this.el.x_expand = false;
1651 this.el.y_align = Clutter.ActorAlign.CENTER;
1652 this.el.y_expand = false;
1655 // userdefined functions
1657 // skip |xns - no return type
1659 public class Xcls_addpropbutton : Object
1661 public Clutter.Actor el;
1662 private Xcls_MainWindow _this;
1668 public Xcls_addpropbutton(Xcls_MainWindow _owner )
1671 _this.addpropbutton = this;
1672 this.el = new Clutter.Actor();
1676 // set gobject values
1677 this.el.reactive = true;
1678 var child_0 = new Xcls_Text25( _this );
1680 this.el.add_child ( child_0.el );
1683 this.el.set_size(50,50);
1686 this.el.enter_event.connect( ( event) => {
1687 this.el.background_color = new Clutter.Color.from_string("#333");
1690 this.el.leave_event.connect( ( event) => {
1691 this.el.background_color = new Clutter.Color.from_string("#000");
1694 this.el.button_press_event.connect( ( ) => {
1698 switch (_this.state) {
1700 _this.showAddProp();
1705 _this.showAddProp();
1709 _this.hideAddListener();
1710 _this.showAddProp();
1715 _this.hideAddProp();
1719 print("unhandled add property from %s\n",_this.state);
1729 // userdefined functions
1731 // skip |xns - no return type
1733 public class Xcls_Text25 : Object
1735 public Clutter.Text el;
1736 private Xcls_MainWindow _this;
1742 public Xcls_Text25(Xcls_MainWindow _owner )
1745 this.el = new Clutter.Text.full("Sans 10px","Add\nProperty",new Clutter.Color.from_string("#fff"));
1749 // set gobject values
1750 this.el.line_alignment = Pango.Alignment.CENTER;
1751 this.el.x_align = Clutter.ActorAlign.CENTER;
1752 this.el.x_expand = false;
1753 this.el.y_align = Clutter.ActorAlign.CENTER;
1754 this.el.y_expand = false;
1757 // userdefined functions
1759 // skip |xns - no return type
1761 public class Xcls_addlistenerbutton : Object
1763 public Clutter.Actor el;
1764 private Xcls_MainWindow _this;
1770 public Xcls_addlistenerbutton(Xcls_MainWindow _owner )
1773 _this.addlistenerbutton = this;
1774 this.el = new Clutter.Actor();
1778 // set gobject values
1779 this.el.reactive = true;
1780 var child_0 = new Xcls_Text27( _this );
1782 this.el.add_child ( child_0.el );
1785 this.el.set_size(50,50);
1788 this.el.enter_event.connect( ( event) => {
1789 this.el.background_color = new Clutter.Color.from_string("#333");
1792 this.el.leave_event.connect( ( event) => {
1793 this.el.background_color = new Clutter.Color.from_string("#000");
1796 this.el.button_press_event.connect( ( ) => {
1800 switch (_this.state) {
1802 _this.showAddListener();
1807 _this.hideAddListener();
1812 _this.hideAddProp();
1813 _this.showAddListener();
1817 _this.showAddListener();
1821 print("unhandled add listener from %s\n",_this.state);
1832 // userdefined functions
1834 // skip |xns - no return type
1836 public class Xcls_Text27 : Object
1838 public Clutter.Text el;
1839 private Xcls_MainWindow _this;
1845 public Xcls_Text27(Xcls_MainWindow _owner )
1848 this.el = new Clutter.Text.full("Sans 10px","Add\nListener",new Clutter.Color.from_string("#fff"));
1852 // set gobject values
1853 this.el.line_alignment = Pango.Alignment.CENTER;
1854 this.el.x_align = Clutter.ActorAlign.CENTER;
1855 this.el.x_expand = false;
1856 this.el.y_align = Clutter.ActorAlign.CENTER;
1857 this.el.y_expand = false;
1860 // userdefined functions
1862 // skip |xns - no return type