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) => {
115 // userdefined functions
116 public void hideAddListener() {
117 _this.addpropsview.el.save_easing_state();
118 var el = _this.rooview.el;
119 el.save_easing_state();
122 el.set_scale(1.0f,1.0f);
123 _this.addpropsview.el.set_scale(0.0f,0.0f);
124 _this.state = "edit";
127 //_this.clutterfiles.loadProject(_this.project);
129 el.restore_easing_state();
130 _this.addpropsview.el.restore_easing_state();
132 public void hideAddProp() {
133 _this.addpropsview.el.save_easing_state();
134 var el = _this.rooview.el;
135 el.save_easing_state();
138 el.set_scale(1.0f,1.0f);
139 _this.addpropsview.el.set_scale(0.0f,0.0f);
140 _this.state = "edit";
143 //_this.clutterfiles.loadProject(_this.project);
145 el.restore_easing_state();
146 _this.addpropsview.el.restore_easing_state();
148 public void hideCodeEdit() {
149 //this.code_editor.saveContents();
151 _this.codeeditview.el.save_easing_state();
152 var el = _this.rooview.el;
153 el.save_easing_state();
156 el.set_scale(1.0f,1.0f);
157 _this.codeeditview.el.set_scale(0.0f,0.0f);
158 _this.state = "edit";
161 //_this.clutterfiles.loadProject(_this.project);
163 el.restore_easing_state();
164 _this.codeeditview.el.restore_easing_state();
166 public void hideObject() {
167 // return to editing state..
173 _this.objectview.el.save_easing_state();
174 var el = _this.rooview.el;
175 el.save_easing_state();
178 el.set_scale(1.0f,1.0f);
179 _this.objectview.el.set_scale(0.0f,0.0f);
180 _this.state = "edit";
183 //_this.clutterfiles.loadProject(_this.project);
185 el.restore_easing_state();
186 _this.objectview.el.restore_easing_state();
190 public void hideProjectEdit () {
191 // return to editing state..
193 _this.projectbutton.el.show();
194 _this.projecteditbutton.el.show();
197 //this.rooview.el.hide();
198 //this.edit_project.el.show();
199 _this.projecteditview.el.save_easing_state();
200 var el = _this.rooview.el;
201 el.save_easing_state();
204 el.set_scale(1.0f,1.0f);
205 _this.projecteditview.el.set_scale(1.0f,0.0f);
206 _this.state = "edit";
209 //_this.clutterfiles.loadProject(_this.project);
211 el.restore_easing_state();
212 _this.projecteditview.el.restore_easing_state();
215 public void hideViewEditing ( ) {
217 if (this.left_tree.getActiveFile() != null) {
218 if (this.left_tree.getActiveFile().xtype == "Roo" ) {
219 this.window_rooview.createThumb();
221 this.window_gladeview.createThumb();
224 _this.projecteditbutton.el.hide();
225 this.editpane.el.hide();
226 //this.rooview.el.hide();
227 this.left_projects.el.show();
229 var el = _this.rooview.el;
230 el.save_easing_state();
231 el.set_easing_duration(1000);
232 // show project / file view..
233 //_this.mainpane.lastWidth = _this.leftpane.el.get_position();
234 //_this.mainpane.el.set_position(0);
236 el.set_rotation_angle(Clutter.RotateAxis.Y_AXIS, 360.0f);
237 el.set_scale(0.0f,0.0f);
239 _this.state = "files";
241 _this.left_projects.selectProject(_this.project);
242 //_this.clutterfiles.loadProject(_this.project);
244 el.restore_easing_state();
246 print("show view browsing");
248 public void initChildren () {
249 // this needs putting in a better place..
251 print("init children");
252 this.left_tree = new Xcls_WindowLeftTree();
253 this.left_tree.ref();
254 this.tree.el.pack_start(this.left_tree.el,true, true,0);
255 this.left_tree.el.show_all();
257 this.left_tree.before_node_change.connect(() => {
258 if (this.state != "codeedit") {
259 this.left_props.finish_editing();
262 if (!this.code_editor.saveContents()) {
269 this.left_tree.node_selected.connect((sel) => {
271 print("node_selected called %s\n", (sel == null) ? "NULL" : "a value");
274 this.left_props.el.hide();
276 this.left_props.el.show();
277 this.left_props.load(this.left_tree.getActiveFile(), sel);
278 switch (this.state) {
282 this.rightpalete.clear();
285 this.rightpalete.load(_this.left_tree.getActiveFile().palete(), sel.fqn());
291 this.add_props.clear();
294 this.add_props.show(_this.left_tree.getActiveFile().palete(), "props", sel.fqn());
299 this.add_props.clear();
302 this.add_props.show(_this.left_tree.getActiveFile().palete(), "signals", sel.fqn());
316 this.left_tree.changed.connect(() => {
317 this.window_rooview.requestRedraw();
324 this.left_props =new Xcls_LeftProps();
325 this.left_props.ref();
326 this.props.el.pack_start(this.left_props.el,true, true,0);
327 this.left_props.el.show_all();
329 this.left_props.show_editor.connect( (file, node, type, key) => {
330 this.showCodeEdit(node, type, key);
332 this.left_props.stop_editor.connect( () => {
333 if (this.state != "codeedit") {
337 var ret = this.code_editor.saveContents();
344 this.left_props.changed.connect(() => {
345 if (this.left_tree.getActiveFile().xtype == "Roo" ) {
346 this.window_rooview.requestRedraw();
348 this.window_gladeview.loadFile(this.left_tree.getActiveFile());
356 this.left_projects = new Xcls_WindowLeftProjects();
357 this.left_projects.ref();
358 this.leftpane.el.pack_start(this.left_projects.el,true, true,0);
359 this.left_projects.el.show_all();
360 this.left_projects.project_selected.connect((proj) => {
362 _this.clutterfiles.loadProject(proj);
368 this.projectsettings =new Xcls_ProjectSettings();
369 this.projectsettings.ref(); /// really?
370 ((Gtk.Container)(this.projecteditview.el.get_widget())).add(this.projectsettings.el);
371 //this.projectsettings.el.show_all();
373 var stage = _this.projecteditview.el.get_stage();
374 stage.set_background_color( Clutter.Color.from_string("#000"));
376 this.projectsettings.buttonPressed.connect((btn) => {
377 if (this.left_tree.getActiveFile().xtype == "Roo" ) {
380 _this.window_rooview.view.renderJS(true);
382 if (btn == "apply") {
383 _this.window_rooview.view.renderJS(true);
387 // do nothing for gtk..
389 this.hideProjectEdit();
394 // objects (palate..)
395 this.rightpalete = new Xcls_RightPalete();
396 this.rightpalete.ref(); /// really?
397 ((Gtk.Container)(this.objectview.el.get_widget())).add(this.rightpalete.el);
398 //this.projectsettings.el.show_all();
400 stage = _this.objectview.el.get_stage();
401 stage.set_background_color( Clutter.Color.from_string("#000"));
403 /*this.projectsettings.buttonPressed.connect((btn) => {
405 _this.window_rooview.view.renderJS(true);
407 if (btn == "apply") {
408 _this.window_rooview.view.renderJS(true);
411 this.hideProjectEdit();
419 this.add_props = new Xcls_WindowAddProp();
420 this.add_props.ref(); /// really?
421 ((Gtk.Container)(this.addpropsview.el.get_widget())).add(this.add_props.el);
422 //this.projectsettings.el.show_all();
424 stage = _this.addpropsview.el.get_stage();
425 stage.set_background_color( Clutter.Color.from_string("#000"));
428 _this.add_props.select.connect( (key,type,skel, etype) => {
429 this.left_props.addProp(etype, key, skel, type);
435 this.code_editor = new Xcls_Editor();
436 this.code_editor.ref(); /// really?
437 ((Gtk.Container)(this.codeeditview.el.get_widget())).add(this.code_editor.el);
438 //this.projectsettings.el.show_all();
440 stage = _this.codeeditview.el.get_stage();
441 stage.set_background_color( Clutter.Color.from_string("#000"));
451 this.window_rooview =new Xcls_WindowRooView();
452 this.window_rooview.ref();
453 ((Gtk.Container)(this.rooview.el.get_widget())).add(this.window_rooview.el);
454 this.window_rooview.el.show_all();
456 stage = _this.rooview.el.get_stage();
457 stage.set_background_color( Clutter.Color.from_string("#000"));
462 this.window_gladeview =new Xcls_GladeView();
463 this.window_gladeview.ref();
465 //((Gtk.Container)(this.rooview.el.get_widget())).add(this.window_gladeview.el);
466 ///this.window_gladeview.el.hide();
473 this.clutterfiles = new Xcls_ClutterFiles();
474 this.clutterfiles.ref();
475 stage.add_child(this.clutterfiles.el);
476 this.clutterfiles.el.show_all();
479 this.clutterfiles.open.connect((file) => {
480 _this.project = file.project;
481 _this.showViewEditing();
482 this.left_tree.model.loadFile(file);
483 var ctr= ((Gtk.Container)(this.rooview.el.get_widget()));
484 if (file.xtype == "Roo" ) {
485 ctr.foreach( (w) => { ctr.remove(w); });
486 ctr.add(this.window_rooview.el);
487 this.window_rooview.loadFile(file);
489 this.window_rooview.el.show_all();
491 ctr.foreach( (w) => { ctr.remove(w); });
492 ctr.add(this.window_gladeview.el);
493 this.window_gladeview.loadFile(file);
494 this.window_gladeview.el.show_all();
496 print("OPEN : " + file.name);
506 var tl = new Clutter.Timeline(6000);
507 tl.set_repeat_count(-1);
511 this.children_loaded = true;
517 public void setTitle (string str) {
518 this.el.set_title(this.title + " - " + str);
521 this.left_tree =new Xcls_WindowLeftTree();
522 _this.vbox.el.pack_start(this.left_tree.el,true, true,0);
526 public void showAddListener() {
530 var ae = this.left_tree.getActiveElement();
535 //this.rooview.el.hide();
536 this.add_props.el.show_all();
538 Palete.factory(this.project.xtype),
542 //this.rightpalete.show(this.project);
544 _this.addpropsview.el.save_easing_state();
546 var el = _this.rooview.el;
547 el.save_easing_state();
550 el.set_scale(0.5f,0.5f);
552 _this.addpropsview.el.set_scale(1.0f,1.0f);
556 //_this.clutterfiles.loadProject(_this.project);
558 el.restore_easing_state();
559 _this.addpropsview.el.restore_easing_state();
560 this.state = "addlistener";
562 public void showAddProp() {
565 var ae = this.left_tree.getActiveElement();
573 //this.rooview.el.hide();
574 this.add_props.el.show_all();
576 Palete.factory(this.project.xtype),
581 _this.addpropsview.el.save_easing_state();
583 var el = _this.rooview.el;
584 el.save_easing_state();
587 el.set_scale(0.5f,0.5f);
589 _this.addpropsview.el.set_scale(1.0f,1.0f);
593 //_this.clutterfiles.loadProject(_this.project);
595 el.restore_easing_state();
596 _this.addpropsview.el.restore_easing_state();
597 this.state = "addprop";
599 public void showCodeEdit(JsRender.Node node, string ptype, string key)
601 // this is a bit different,
602 // it's not called via a button - but triggered by the prop edit class signal.
603 // so it has to hide any other state..
613 this.hideAddListener();
620 //this.rooview.el.hide();
621 this.code_editor.el.show_all();
622 this.code_editor.show(
628 _this.codeeditview.el.save_easing_state();
630 var el = _this.rooview.el;
631 el.save_easing_state();
634 el.set_scale(0.5f,0.5f);
636 _this.codeeditview.el.set_scale(1.0f,1.0f);
640 //_this.clutterfiles.loadProject(_this.project);
642 el.restore_easing_state();
643 _this.codeeditview.el.restore_easing_state();
644 this.state = "codeedit";
646 public void showObject() {
649 // what's the active node on the left hand side..
651 var n = _this.left_tree.getActiveElement();
659 //this.rooview.el.hide();
660 this.rightpalete.el.show_all();
661 this.rightpalete.load(_this.left_tree.getActiveFile().palete(), n.fqn());
664 //this.rightpalete.show(this.project);
666 _this.objectview.el.save_easing_state();
668 var el = _this.rooview.el;
669 el.save_easing_state();
672 el.set_scale(0.5f,0.5f);
674 _this.objectview.el.set_scale(1.0f,1.0f);
678 //_this.clutterfiles.loadProject(_this.project);
680 el.restore_easing_state();
681 _this.objectview.el.restore_easing_state();
682 this.state = "object";
684 public void showProjectEdit () {
685 // make the browser smaller, and show the edit dialog
688 _this.projectbutton.el.hide();
689 _this.projecteditbutton.el.hide();
692 //this.rooview.el.hide();
693 this.projectsettings.el.show_all();
694 this.projectsettings.show(this.project);
695 _this.projecteditview.el.save_easing_state();
697 var el = _this.rooview.el;
698 el.save_easing_state();
701 el.set_scale(0.5f,0.5f);
703 _this.projecteditview.el.set_scale(1.0f,1.0f);
705 _this.state = "projectedit";
708 //_this.clutterfiles.loadProject(_this.project);
710 el.restore_easing_state();
711 _this.projecteditview.el.restore_easing_state();
712 // print("show view browsing");
715 public void showViewEditing ( ) {
716 this.editpane.el.show();
717 // this.rooview.el.show();
718 this.left_projects.el.hide();
720 _this.projecteditbutton.el.show();
722 var el = _this.rooview.el;
723 el.save_easing_state();
726 el.set_rotation_angle(Clutter.RotateAxis.Y_AXIS, 0.0f);
727 el.set_scale(1.0f,1.0f);
728 _this.state = "edit";
729 // _this.mainpane.el.set_position(_this.leftpane.lastWidth);
730 _this.clutterfiles.el.hide();
732 el.restore_easing_state();
734 print("show view editing");
737 // skip |xns - no return type
738 public class Xcls_vbox : Object
741 private Xcls_MainWindow _this;
747 public Xcls_vbox(Xcls_MainWindow _owner )
751 this.el = new Gtk.VBox( false, 0 );
755 // set gobject values
756 var child_0 = new Xcls_topbar( _this );
758 this.el.pack_start ( child_0.el , false,true,0 );
759 var child_1 = new Xcls_mainpane( _this );
761 this.el.pack_end ( child_1.el , true,true,0 );
764 // userdefined functions
766 // skip |xns - no return type
768 public class Xcls_topbar : Object
771 private Xcls_MainWindow _this;
777 public Xcls_topbar(Xcls_MainWindow _owner )
781 this.el = new Gtk.HBox( true, 0 );
785 // set gobject values
786 this.el.height_request = 20;
787 this.el.vexpand = false ;
790 // userdefined functions
792 // skip |xns - no return type
794 public class Xcls_mainpane : Object
796 public Gtk.HPaned el;
797 private Xcls_MainWindow _this;
801 public int lastWidth;
804 public Xcls_mainpane(Xcls_MainWindow _owner )
807 _this.mainpane = this;
808 this.el = new Gtk.HPaned();
813 // set gobject values
814 this.el.position = 400;
815 var child_0 = new Xcls_leftpane( _this );
817 this.el.add1 ( child_0.el );
818 var child_1 = new Xcls_VBox9( _this );
820 this.el.add2 ( child_1.el );
823 // userdefined functions
825 // skip |xns - no return type
827 public class Xcls_leftpane : Object
830 private Xcls_MainWindow _this;
836 public Xcls_leftpane(Xcls_MainWindow _owner )
839 _this.leftpane = this;
840 this.el = new Gtk.VBox( true, 0 );
844 // set gobject values
845 var child_0 = new Xcls_editpane( _this );
847 this.el.pack_start ( child_0.el , false,true,0 );
850 // userdefined functions
852 // skip |xns - no return type
854 public class Xcls_editpane : Object
856 public Gtk.VPaned el;
857 private Xcls_MainWindow _this;
863 public Xcls_editpane(Xcls_MainWindow _owner )
866 _this.editpane = this;
867 this.el = new Gtk.VPaned();
871 // set gobject values
872 var child_0 = new Xcls_tree( _this );
874 this.el.add1 ( child_0.el );
875 var child_1 = new Xcls_props( _this );
877 this.el.add2 ( child_1.el );
880 // userdefined functions
882 // skip |xns - no return type
884 public class Xcls_tree : Object
887 private Xcls_MainWindow _this;
893 public Xcls_tree(Xcls_MainWindow _owner )
897 this.el = new Gtk.VBox( true, 0 );
901 // set gobject values
904 // userdefined functions
906 // skip |xns - no return type
908 public class Xcls_props : Object
911 private Xcls_MainWindow _this;
917 public Xcls_props(Xcls_MainWindow _owner )
921 this.el = new Gtk.VBox( true, 0 );
925 // set gobject values
928 // userdefined functions
930 // skip |xns - no return type
932 public class Xcls_VBox9 : Object
935 private Xcls_MainWindow _this;
941 public Xcls_VBox9(Xcls_MainWindow _owner )
944 this.el = new Gtk.VBox( true, 0 );
948 // set gobject values
949 var child_0 = new Xcls_clutterembed( _this );
951 this.el.pack_start ( child_0.el , true,true,0 );
954 // userdefined functions
956 // skip |xns - no return type
958 public class Xcls_clutterembed : Object
960 public GtkClutter.Embed el;
961 private Xcls_MainWindow _this;
967 public Xcls_clutterembed(Xcls_MainWindow _owner )
970 _this.clutterembed = this;
971 this.el = new GtkClutter.Embed();
975 // set gobject values
976 var child_0 = new Xcls_rooview( _this );
978 this.el.get_stage().add_child ( child_0.el );
979 var child_1 = new Xcls_objectview( _this );
981 this.el.get_stage().add_child ( child_1.el );
982 var child_2 = new Xcls_codeeditview( _this );
984 this.el.get_stage().add_child ( child_2.el );
985 var child_3 = new Xcls_addpropsview( _this );
987 this.el.get_stage().add_child ( child_3.el );
988 var child_4 = new Xcls_projecteditview( _this );
990 this.el.get_stage().add_child ( child_4.el );
991 var child_5 = new Xcls_buttonlayout( _this );
993 this.el.get_stage().add_child ( child_5.el );
996 var stage = this.el.get_stage();
997 stage.set_background_color( Clutter.Color.from_string("#000"));
1002 this.el.size_allocate.connect( ( alloc) => {
1003 if (!_this.children_loaded) { return; }
1004 //print("size_allocation %d,%d\n".printf(alloc.width, alloc.height));
1006 /* _this.rooview.el.set_size(this.el.get_stage().width-50,
1007 this.el.get_stage().height);
1008 _this.clutterfiles.set_size(this.el.get_stage().width-50,
1009 this.el.get_stage().height);
1011 // this.el.set_size_request(alloc.width,alloc.height);
1012 // this.el.get_stage().set_size(alloc.width,alloc.height);
1013 _this.rooview.el.set_size(alloc.width-50,
1018 _this.clutterfiles.set_size(alloc.width-50,
1020 _this.projecteditview.el.set_size(alloc.width-50,
1021 alloc.height / 2.0f);
1023 _this.objectview.el.set_size((alloc.width -50)/2.0f,
1026 _this.addpropsview.el.set_size((alloc.width -50)/2.0f,
1029 _this.codeeditview.el.set_size((alloc.width -50)/2.0f,
1034 // userdefined functions
1036 // skip |xns - no return type
1038 public class Xcls_rooview : Object
1040 public GtkClutter.Actor el;
1041 private Xcls_MainWindow _this;
1047 public Xcls_rooview(Xcls_MainWindow _owner )
1050 _this.rooview = this;
1051 this.el = new GtkClutter.Actor();
1055 // set gobject values
1061 this.el.add_constraint(
1062 new Clutter.AlignConstraint(
1063 _this.clutterembed.el.get_stage(),
1064 Clutter.AlignAxis.X_AXIS,
1069 //this.el.set_position(100,100);
1070 this.el.set_pivot_point(1.0f,1.0f);
1072 this.el.set_size(_this.clutterembed.el.get_stage().width-50,
1073 _this.clutterembed.el.get_stage().height);
1078 // userdefined functions
1080 // skip |xns - no return type
1082 public class Xcls_objectview : Object
1084 public GtkClutter.Actor el;
1085 private Xcls_MainWindow _this;
1091 public Xcls_objectview(Xcls_MainWindow _owner )
1094 _this.objectview = this;
1095 this.el = new GtkClutter.Actor();
1099 // set gobject values
1105 this.el.add_constraint(
1106 new Clutter.AlignConstraint(
1107 _this.clutterembed.el.get_stage(),
1108 Clutter.AlignAxis.X_AXIS,
1113 this.el.fixed_x = 50.0f;
1114 this.el.fixed_y = 0.0f;
1115 //this.el.set_position(100,100);
1116 this.el.set_pivot_point(0.0f,0.0f);
1117 this.el.set_scale(0.0f,1.0f);
1118 this.el.set_size((_this.clutterembed.el.get_stage().width-50)/2,
1119 _this.clutterembed.el.get_stage().height);
1124 // userdefined functions
1126 // skip |xns - no return type
1128 public class Xcls_codeeditview : Object
1130 public GtkClutter.Actor el;
1131 private Xcls_MainWindow _this;
1137 public Xcls_codeeditview(Xcls_MainWindow _owner )
1140 _this.codeeditview = this;
1141 this.el = new GtkClutter.Actor();
1145 // set gobject values
1151 this.el.add_constraint(
1152 new Clutter.AlignConstraint(
1153 _this.clutterembed.el.get_stage(),
1154 Clutter.AlignAxis.X_AXIS,
1159 this.el.fixed_x = 50.0f;
1160 this.el.fixed_y = 0.0f;
1161 //this.el.set_position(100,100);
1162 this.el.set_pivot_point(0.0f,0.0f);
1163 this.el.set_scale(0.0f,1.0f);
1164 this.el.set_size((_this.clutterembed.el.get_stage().width-50)/2,
1165 _this.clutterembed.el.get_stage().height);
1170 // userdefined functions
1172 // skip |xns - no return type
1174 public class Xcls_addpropsview : Object
1176 public GtkClutter.Actor el;
1177 private Xcls_MainWindow _this;
1183 public Xcls_addpropsview(Xcls_MainWindow _owner )
1186 _this.addpropsview = this;
1187 this.el = new GtkClutter.Actor();
1191 // set gobject values
1197 this.el.add_constraint(
1198 new Clutter.AlignConstraint(
1199 _this.clutterembed.el.get_stage(),
1200 Clutter.AlignAxis.X_AXIS,
1205 this.el.fixed_x = 50.0f;
1206 this.el.fixed_y = 0.0f;
1207 //this.el.set_position(100,100);
1208 this.el.set_pivot_point(0.0f,0.0f);
1209 this.el.set_scale(0.0f,1.0f);
1210 this.el.set_size((_this.clutterembed.el.get_stage().width-50)/2,
1211 _this.clutterembed.el.get_stage().height);
1216 // userdefined functions
1218 // skip |xns - no return type
1220 public class Xcls_projecteditview : Object
1222 public GtkClutter.Actor el;
1223 private Xcls_MainWindow _this;
1229 public Xcls_projecteditview(Xcls_MainWindow _owner )
1232 _this.projecteditview = this;
1233 this.el = new GtkClutter.Actor();
1237 // set gobject values
1243 this.el.add_constraint(
1244 new Clutter.AlignConstraint(
1245 _this.clutterembed.el.get_stage(),
1246 Clutter.AlignAxis.X_AXIS,
1251 //this.el.set_position(100,100);
1252 this.el.set_pivot_point(0.0f,0.0f);
1253 this.el.set_scale(1.0f,0.0f);
1254 this.el.set_size(_this.clutterembed.el.get_stage().width-50,
1255 _this.clutterembed.el.get_stage().height /2);
1260 // userdefined functions
1262 // skip |xns - no return type
1264 public class Xcls_buttonlayout : Object
1266 public Clutter.Actor el;
1267 private Xcls_MainWindow _this;
1273 public Xcls_buttonlayout(Xcls_MainWindow _owner )
1276 _this.buttonlayout = this;
1277 this.el = new Clutter.Actor();
1281 // set gobject values
1282 var child_0 = new Xcls_BoxLayout17( _this );
1284 this.el.layout_manager = child_0.el;
1285 var child_1 = new Xcls_projectbutton( _this );
1287 this.el.add_child ( child_1.el );
1288 var child_2 = new Xcls_projecteditbutton( _this );
1290 this.el.add_child ( child_2.el );
1291 var child_3 = new Xcls_objectshowbutton( _this );
1293 this.el.add_child ( child_3.el );
1294 var child_4 = new Xcls_addpropbutton( _this );
1296 this.el.add_child ( child_4.el );
1297 var child_5 = new Xcls_addlistenerbutton( _this );
1299 this.el.add_child ( child_5.el );
1304 this.el.add_constraint(
1305 new Clutter.AlignConstraint(
1306 _this.clutterembed.el.get_stage(),
1307 Clutter.AlignAxis.X_AXIS,
1313 //this.el.set_position(100,100);
1314 this.el.set_pivot_point(0.5f,0.5f);
1315 this.el.set_size(50,
1316 _this.clutterembed.el.get_stage().height);
1321 // userdefined functions
1323 // skip |xns - no return type
1325 public class Xcls_BoxLayout17 : Object
1327 public Clutter.BoxLayout el;
1328 private Xcls_MainWindow _this;
1334 public Xcls_BoxLayout17(Xcls_MainWindow _owner )
1337 this.el = new Clutter.BoxLayout();
1341 // set gobject values
1342 this.el.orientation = Clutter.Orientation.VERTICAL;
1345 // userdefined functions
1347 // skip |xns - no return type
1349 public class Xcls_projectbutton : Object
1351 public Clutter.Actor el;
1352 private Xcls_MainWindow _this;
1358 public Xcls_projectbutton(Xcls_MainWindow _owner )
1361 _this.projectbutton = this;
1362 this.el = new Clutter.Actor();
1366 // set gobject values
1367 this.el.reactive = true;
1368 var child_0 = new Xcls_Text19( _this );
1370 this.el.add_child ( child_0.el );
1373 this.el.set_size(50,50);
1376 this.el.enter_event.connect( ( event) => {
1377 this.el.background_color = new Clutter.Color.from_string("#333");
1380 this.el.leave_event.connect( ( event) => {
1381 this.el.background_color = new Clutter.Color.from_string("#000");
1384 this.el.button_press_event.connect( ( ) => {
1385 switch (_this.state) {
1388 _this.hideViewEditing();
1391 _this.showViewEditing();
1395 _this.hideAddProp();
1396 _this.hideViewEditing();
1399 _this.hideAddListener();
1400 _this.hideViewEditing();
1405 _this.hideViewEditing();
1416 // userdefined functions
1418 // skip |xns - no return type
1420 public class Xcls_Text19 : Object
1422 public Clutter.Text el;
1423 private Xcls_MainWindow _this;
1429 public Xcls_Text19(Xcls_MainWindow _owner )
1432 this.el = new Clutter.Text.full("Sans 10px","Open\nFiles",new Clutter.Color.from_string("#fff"));
1436 // set gobject values
1437 this.el.line_alignment = Pango.Alignment.CENTER;
1438 this.el.x_align = Clutter.ActorAlign.CENTER;
1439 this.el.x_expand = false;
1440 this.el.y_align = Clutter.ActorAlign.CENTER;
1441 this.el.y_expand = false;
1444 // userdefined functions
1446 // skip |xns - no return type
1448 public class Xcls_projecteditbutton : Object
1450 public Clutter.Actor el;
1451 private Xcls_MainWindow _this;
1457 public Xcls_projecteditbutton(Xcls_MainWindow _owner )
1460 _this.projecteditbutton = this;
1461 this.el = new Clutter.Actor();
1465 // set gobject values
1466 this.el.reactive = true;
1467 var child_0 = new Xcls_Text21( _this );
1469 this.el.add_child ( child_0.el );
1472 this.el.set_size(50,50);
1475 this.el.enter_event.connect( ( event) => {
1476 this.el.background_color = new Clutter.Color.from_string("#333");
1479 this.el.leave_event.connect( ( event) => {
1480 this.el.background_color = new Clutter.Color.from_string("#000");
1483 this.el.button_press_event.connect( ( ) => {
1484 switch (_this.state) {
1486 _this.showProjectEdit();
1489 // _this.showViewEditing();
1492 _this.hideProjectEdit();
1498 _this.hideAddProp();
1499 _this.showProjectEdit();
1502 _this.hideAddListener();
1503 _this.showProjectEdit();
1508 _this.showProjectEdit();
1519 // userdefined functions
1521 // skip |xns - no return type
1523 public class Xcls_Text21 : Object
1525 public Clutter.Text el;
1526 private Xcls_MainWindow _this;
1532 public Xcls_Text21(Xcls_MainWindow _owner )
1535 this.el = new Clutter.Text.full("Sans 10px","Edit\nProject\nDetails",new Clutter.Color.from_string("#fff"));
1539 // set gobject values
1540 this.el.line_alignment = Pango.Alignment.CENTER;
1541 this.el.x_align = Clutter.ActorAlign.CENTER;
1542 this.el.x_expand = false;
1543 this.el.y_align = Clutter.ActorAlign.CENTER;
1544 this.el.y_expand = false;
1547 // userdefined functions
1549 // skip |xns - no return type
1551 public class Xcls_objectshowbutton : Object
1553 public Clutter.Actor el;
1554 private Xcls_MainWindow _this;
1560 public Xcls_objectshowbutton(Xcls_MainWindow _owner )
1563 _this.objectshowbutton = this;
1564 this.el = new Clutter.Actor();
1568 // set gobject values
1569 this.el.reactive = true;
1570 var child_0 = new Xcls_Text23( _this );
1572 this.el.add_child ( child_0.el );
1575 this.el.set_size(50,50);
1578 this.el.enter_event.connect( ( event) => {
1579 this.el.background_color = new Clutter.Color.from_string("#333");
1582 this.el.leave_event.connect( ( event) => {
1583 this.el.background_color = new Clutter.Color.from_string("#000");
1586 this.el.button_press_event.connect( ( ) => {
1590 switch (_this.state) {
1594 _this.hideAddProp();
1598 _this.hideAddListener();
1614 print("unhandled add objects from %s\n",_this.state);
1623 // userdefined functions
1625 // skip |xns - no return type
1627 public class Xcls_Text23 : Object
1629 public Clutter.Text el;
1630 private Xcls_MainWindow _this;
1636 public Xcls_Text23(Xcls_MainWindow _owner )
1639 this.el = new Clutter.Text.full("Sans 10px","Show\nPalate",new Clutter.Color.from_string("#fff"));
1643 // set gobject values
1644 this.el.line_alignment = Pango.Alignment.CENTER;
1645 this.el.x_align = Clutter.ActorAlign.CENTER;
1646 this.el.x_expand = false;
1647 this.el.y_align = Clutter.ActorAlign.CENTER;
1648 this.el.y_expand = false;
1651 // userdefined functions
1653 // skip |xns - no return type
1655 public class Xcls_addpropbutton : Object
1657 public Clutter.Actor el;
1658 private Xcls_MainWindow _this;
1664 public Xcls_addpropbutton(Xcls_MainWindow _owner )
1667 _this.addpropbutton = this;
1668 this.el = new Clutter.Actor();
1672 // set gobject values
1673 this.el.reactive = true;
1674 var child_0 = new Xcls_Text25( _this );
1676 this.el.add_child ( child_0.el );
1679 this.el.set_size(50,50);
1682 this.el.enter_event.connect( ( event) => {
1683 this.el.background_color = new Clutter.Color.from_string("#333");
1686 this.el.leave_event.connect( ( event) => {
1687 this.el.background_color = new Clutter.Color.from_string("#000");
1690 this.el.button_press_event.connect( ( ) => {
1694 switch (_this.state) {
1696 _this.showAddProp();
1701 _this.showAddProp();
1705 _this.hideAddListener();
1706 _this.showAddProp();
1711 _this.hideAddProp();
1715 print("unhandled add property from %s\n",_this.state);
1725 // userdefined functions
1727 // skip |xns - no return type
1729 public class Xcls_Text25 : Object
1731 public Clutter.Text el;
1732 private Xcls_MainWindow _this;
1738 public Xcls_Text25(Xcls_MainWindow _owner )
1741 this.el = new Clutter.Text.full("Sans 10px","Add\nProperty",new Clutter.Color.from_string("#fff"));
1745 // set gobject values
1746 this.el.line_alignment = Pango.Alignment.CENTER;
1747 this.el.x_align = Clutter.ActorAlign.CENTER;
1748 this.el.x_expand = false;
1749 this.el.y_align = Clutter.ActorAlign.CENTER;
1750 this.el.y_expand = false;
1753 // userdefined functions
1755 // skip |xns - no return type
1757 public class Xcls_addlistenerbutton : Object
1759 public Clutter.Actor el;
1760 private Xcls_MainWindow _this;
1766 public Xcls_addlistenerbutton(Xcls_MainWindow _owner )
1769 _this.addlistenerbutton = this;
1770 this.el = new Clutter.Actor();
1774 // set gobject values
1775 this.el.reactive = true;
1776 var child_0 = new Xcls_Text27( _this );
1778 this.el.add_child ( child_0.el );
1781 this.el.set_size(50,50);
1784 this.el.enter_event.connect( ( event) => {
1785 this.el.background_color = new Clutter.Color.from_string("#333");
1788 this.el.leave_event.connect( ( event) => {
1789 this.el.background_color = new Clutter.Color.from_string("#000");
1792 this.el.button_press_event.connect( ( ) => {
1796 switch (_this.state) {
1798 _this.showAddListener();
1803 _this.hideAddListener();
1808 _this.hideAddProp();
1809 _this.showAddListener();
1813 _this.showAddListener();
1817 print("unhandled add listener from %s\n",_this.state);
1828 // userdefined functions
1830 // skip |xns - no return type
1832 public class Xcls_Text27 : Object
1834 public Clutter.Text el;
1835 private Xcls_MainWindow _this;
1841 public Xcls_Text27(Xcls_MainWindow _owner )
1844 this.el = new Clutter.Text.full("Sans 10px","Add\nListener",new Clutter.Color.from_string("#fff"));
1848 // set gobject values
1849 this.el.line_alignment = Pango.Alignment.CENTER;
1850 this.el.x_align = Clutter.ActorAlign.CENTER;
1851 this.el.x_expand = false;
1852 this.el.y_align = Clutter.ActorAlign.CENTER;
1853 this.el.y_expand = false;
1856 // userdefined functions
1858 // skip |xns - no return type