Attribute changed old-javascript
[app.Builder.js] / old-javascript / Builder4 / MainWindow.bjs
1 {
2     "name" : "MainWindow",
3     "parent" : "",
4     "title" : "",
5     "path" : "/home/alan/gitlive/app.Builder.js/Builder4/MainWindow.bjs",
6     "permname" : "",
7     "modOrder" : "",
8     "items" : [
9         {
10             "listeners" : {
11                 "delete_event" : "  (   event) => {\n    return false;\n}",
12                 "destroy" : "() =>  {\n Xcls_MainWindow.singleton().no_windows--;\n \n if (Xcls_MainWindow.singleton().no_windows < 1) {\n\n     Gtk.main_quit();\n }\n}",
13                 "show" : "  ( ) => {\n    // hide the file editing..\n   \n    //this.hideViewEditing();\n}"
14             },
15             "|             void hideAddListener" : "() {\n      _this.backbutton.el.hide();\n     _this.projectbutton.el.show(); \n          _this.projecteditbutton.el.show();\n         _this.editfilebutton.el.show();   \n     _this.addpropsview.el.save_easing_state();\n    var el = _this.rooview.el;\n    el.save_easing_state();\n\n    \n    el.set_scale(1.0f,1.0f);\n    _this.addpropsview.el.set_scale(0.0f,0.0f);\n    _this.state = \"edit\";\n\n \n    //_this.clutterfiles.loadProject(_this.project);\n\n    el.restore_easing_state();\n     _this.addpropsview.el.restore_easing_state();  \n  }",
16             "|        void initChildren" : " () {\n    // this needs putting in a better place..\n    \n    print(\"init children\");\n    this.left_tree = new Xcls_WindowLeftTree();\n    this.left_tree.ref();\n    this.left_tree.main_window = _this;\n    this.tree.el.pack_start(this.left_tree.el,true, true,0);\n    this.left_tree.el.show_all();\n   \n    this.left_tree.before_node_change.connect(() => {\n        if (this.state != \"codeedit\") {\n            this.left_props.finish_editing();\n            return true;\n        }\n        if (!this.code_editor.saveContents()) {\n            return false;\n        }\n        return false;\n    \n    });\n    \n    this.left_tree.node_selected.connect((sel) => {\n        \n        print(\"node_selected called %s\\n\", (sel == null) ? \"NULL\" : \"a value\");\n        \n        if (sel == null) {\n            this.left_props.el.hide();\n        } \n        this.left_props.el.show();\n        this.left_props.load(this.left_tree.getActiveFile(), sel);\n        switch (this.state) {\n            case \"object\": \n                  \n                 if (sel == null) {\n                    this.rightpalete.clear();\n                    break;\n                }\n                this.rightpalete.load(_this.left_tree.getActiveFile().palete(), sel.fqn());\n                break;\n                 \n                \n           case \"addprop\":\n                if (sel == null) {\n                    this.add_props.clear();\n                    break;\n                }\n                this.add_props.show(_this.left_tree.getActiveFile().palete(), \"props\", sel.fqn());\n                break;\n                \n           case \"addlistener\":\n                if (sel == null) {\n                    this.add_props.clear();\n                    break;\n                }\n                this.add_props.show(_this.left_tree.getActiveFile().palete(), \"signals\", sel.fqn());\n                break;\n\n           case \"codeedit\":\n               \n                this.hideCodeEdit();\n                break;\n               \n                                \n        }\n        return  ;\n          \n    });\n    \n     this.left_tree.changed.connect(() => {\n       this.window_rooview.requestRedraw();\n       this.left_tree.model.file.save();\n    });\n     \n    \n\n    // left properties\n\n    this.left_props =new Xcls_LeftProps();\n    this.left_props.ref();\n    this.left_props.main_window = _this;\n    this.props.el.pack_start(this.left_props.el,true, true,0);\n    this.left_props.el.show_all();\n    \n    this.left_props.show_editor.connect( (file, node, type,  key) => {\n        this.showCodeEdit(file, node, type,  key);\n    });\n    this.left_props.stop_editor.connect( () => {\n        if (this.state != \"codeedit\") {\n            return true;\n        }\n    \n        var ret =  this.code_editor.saveContents();\n        if (!ret) {\n            return false;\n        }\n        this.hideCodeEdit();\n        return ret;\n    });\n     this.left_props.changed.connect(() => {\n          if (this.left_tree.getActiveFile().xtype == \"Roo\" ) {\n               this.window_rooview.requestRedraw();\n               \n           } else {\n              this.window_gladeview.loadFile(this.left_tree.getActiveFile());\n          }\n          this.left_tree.model.updateSelected();\n          this.left_tree.model.file.save();\n    });\n    \n\n\n\n    // left projects..\n     this.left_projects = new Xcls_WindowLeftProjects();\n     this.left_projects.ref();\n     this.leftpane.el.pack_start(this.left_projects.el,true, true,0);\n     this.left_projects.el.show_all();\n     this.left_projects.project_selected.connect((proj) => {\n        proj.scanDirs();\n        _this.clutterfiles.loadProject(proj);\n    \n     });\n    \n   \n    // project edit..\n    this.projectsettings  =new Xcls_ProjectSettings();\n    this.projectsettings.ref();  /// really?\n    \n    this.vala_projectsettings  =new ValaProjectSettings();\n    this.vala_projectsettings.ref();\n    this.vala_projectsettings.window = this;\n    \n    ((Gtk.Container)(this.projecteditview.el.get_widget())).add(this.projectsettings.el);\n    //this.projectsettings.el.show_all();\n\n    var stage = _this.projecteditview.el.get_stage();\n    stage.set_background_color(  Clutter.Color.from_string(\"#000\"));\n    \n     this.projectsettings.buttonPressed.connect((btn) => {\n         if (this.left_tree.getActiveFile().xtype == \"Roo\" ) {\n         \n            if (btn == \"save\") {\n                 _this.window_rooview.view.renderJS(true);\n            }\n            if (btn == \"apply\") {\n                _this.window_rooview.view.renderJS(true);\n                return;\n            }\n        } else {\n            // do nothing for gtk..\n        }\n        if (btn == \"save\" || btn == \"apply\") {\n            _this.project.save();\n \n        }\n        \n        this.hideProjectEdit();\n         \n     });\n    \n    \n    // objects (palate..)\n    this.rightpalete  = new Xcls_RightPalete();\n    this.rightpalete.ref();  /// really?\n    ((Gtk.Container)(this.objectview.el.get_widget())).add(this.rightpalete.el);\n    //this.projectsettings.el.show_all();\n\n    stage = _this.objectview.el.get_stage();\n    stage.set_background_color(  Clutter.Color.from_string(\"#000\"));\n    \n    /*this.projectsettings.buttonPressed.connect((btn) => {\n        if (btn == \"save\") {\n             _this.window_rooview.view.renderJS(true);\n        }\n        if (btn == \"apply\") {\n            _this.window_rooview.view.renderJS(true);\n            return;\n        }\n        this.hideProjectEdit();\n         \n     });\n    */\n    \n    \n      \n    // Add properties\n    this.add_props  = new Xcls_WindowAddProp();\n    this.add_props.ref();  /// really?\n    ((Gtk.Container)(this.addpropsview.el.get_widget())).add(this.add_props.el);\n    //this.projectsettings.el.show_all();\n\n    stage = _this.addpropsview.el.get_stage();\n    stage.set_background_color(  Clutter.Color.from_string(\"#000\"));\n    \n    \n    _this.add_props.select.connect( (key,type,skel, etype) => {\n        this.left_props.addProp(etype, key, skel, type);\n    });\n    \n    // editor\n    \n    \n    this.code_editor  = new  Editor();\n    this.code_editor.ref();  /// really?\n    ((Gtk.Container)(this.codeeditview.el.get_widget())).add(this.code_editor.el);\n    //this.projectsettings.el.show_all();\n\n    stage = _this.codeeditview.el.get_stage();\n    stage.set_background_color(  Clutter.Color.from_string(\"#000\"));\n    // editor.save...\n\n    _this.code_editor.save.connect( () => {\n        this.left_tree.model.file.save();\n         this.left_tree.model.updateSelected();\n    });\n    \n     \n    \n    \n    //  roo view\n    \n     this.window_rooview  =new Xcls_WindowRooView();\n    this.window_rooview.ref();\n    ((Gtk.Container)(this.rooview.el.get_widget())).add(this.window_rooview.el);\n    this.window_rooview.el.show_all();\n\n    stage = _this.rooview.el.get_stage();\n    stage.set_background_color(  Clutter.Color.from_string(\"#000\"));\n    \n      \n    //  glade view\n    \n    this.window_gladeview  =new Xcls_GtkView();\n    this.window_gladeview.ref();\n\n    //((Gtk.Container)(this.rooview.el.get_widget())).add(this.window_gladeview.el);\n    ///this.window_gladeview.el.hide();\n\n   \n    \n    // clutter files\n    \n    \n    this.clutterfiles = new Xcls_ClutterFiles();\n    this.clutterfiles.ref();\n    stage.add_child(this.clutterfiles.el);\n    this.clutterfiles.el.show_all();\n\n\n    this.clutterfiles.open.connect((file) => { \n        _this.project = file.project;\n        _this.showViewEditing();\n        this.left_tree.model.loadFile(file);\n        var ctr= ((Gtk.Container)(this.rooview.el.get_widget()));\n        var ctr_p= ((Gtk.Container)(this.projecteditview.el.get_widget()));\n        if (file.xtype == \"Roo\" ) { \n            ctr.foreach( (w) => { ctr.remove(w); });\n            ctr_p.foreach( (w) => { ctr_p.remove(w); });\n            ctr.add(this.window_rooview.el);\n            ctr_p.add(this.projectsettings.el);            \n            this.window_rooview.loadFile(file);\n            this.window_rooview.el.show_all();\n            this.projectsettings.el.show_all();            \n            \n        } else {\n            ctr.foreach( (w) => { ctr.remove(w); });\n            ctr_p.foreach( (w) => { ctr_p.remove(w); });            \n            ctr.add(this.window_gladeview.el);\n            ctr_p.add(this.vala_projectsettings.el);\n            this.window_gladeview.loadFile(file);\n            this.window_gladeview.el.show_all();\n            this.vala_projectsettings.el.show_all();\n        }\n        print(\"OPEN : \" + file.name);\n        _this.editpane.el.set_position(_this.editpane.el.max_position);\n         \n\n    });\n\n    // new file dialog\n    this.new_file_dialog = new Xcls_DialogNewComponent();\n    // force it modal to the main window..\n    this.new_file_dialog.el.set_transient_for(this.el);\n    this.new_file_dialog.el.set_modal(true);\n    \n    this.new_file_dialog.success.connect((project,file) =>\n    {\n        _this.project = project;\n        _this.showViewEditing();\n        this.left_tree.model.loadFile(file);\n        var ctr= ((Gtk.Container)(this.rooview.el.get_widget()));\n        var ctr_p= ((Gtk.Container)(this.projecteditview.el.get_widget()));\n        if (file.xtype == \"Roo\" ) { \n            ctr.foreach( (w) => { ctr.remove(w); });\n            ctr_p.foreach( (w) => { ctr_p.remove(w); });\n            ctr.add(this.window_rooview.el);\n            ctr_p.add(this.projectsettings.el);            \n            this.window_rooview.loadFile(file);\n            this.window_rooview.el.show_all();\n            this.projectsettings.el.show_all();  \n            \n            \n        } else {\n            ctr.foreach( (w) => { ctr.remove(w); });\n            ctr_p.foreach( (w) => { ctr_p.remove(w); });            \n            ctr.add(this.window_gladeview.el);\n            ctr_p.add(this.vala_projectsettings.el);\n            this.window_gladeview.loadFile(file);\n            this.window_gladeview.el.show_all();\n            this.vala_projectsettings.el.show_all();\n        }\n    \n    });\n    \n     \n\n    //w.el.show_all();\n    var tl = new Clutter.Timeline(6000);\n    tl.set_repeat_count(-1);\n    tl.start();\n    tl.ref();\n\n    this.children_loaded = true;\n\n\n\n\n}\n",
17             "# int no_windows" : 1,
18             "# Project.Project project" : "null",
19             "# bool children_loaded" : false,
20             "|             void hideCodeEdit" : "() {\n    //this.code_editor.saveContents();\n     _this.backbutton.el.hide();\n      _this.projectbutton.el.show(); \n       _this.projecteditbutton.el.show();\n       _this.editfilebutton.el.show();   \n     _this.codeeditview.el.save_easing_state();\n    var el = _this.rooview.el;\n    el.save_easing_state();\n\n    \n    el.set_scale(1.0f,1.0f);\n    _this.codeeditview.el.set_scale(0.0f,0.0f);\n    _this.state = \"edit\";\n\n \n    //_this.clutterfiles.loadProject(_this.project);\n\n    el.restore_easing_state();\n     _this.codeeditview.el.restore_easing_state();  \n }",
21             "|             void showAddProp" : "() {\n\n     \n     var ae =      this.left_tree.getActiveElement();\n    if (ae == null) {\n        return;\n    }\n     _this.backbutton.el.show();\n       _this.projectbutton.el.hide();\n    _this.editfilebutton.el.hide();\n    _this.projecteditbutton.el.hide();    \n    \n     \n     \n    //this.rooview.el.hide();\n    this.add_props.el.show_all();\n    this.add_props.show(\n        Palete.factory(this.project.xtype), \n        \"props\",\n        ae.fqn()\n    );\n\n    _this.addpropsview.el.save_easing_state();\n        \n    var el = _this.rooview.el;\n    el.save_easing_state();\n    _this.clutterembed.setSizesAlloc(\"addprop\");\n     \n     \n\n    _this.addpropsview.el.set_scale(1.0f,1.0f);\n   \n   \n \n    //_this.clutterfiles.loadProject(_this.project);\n\n    el.restore_easing_state();\n    _this.addpropsview.el.restore_easing_state();\n    this.state = \"addprop\";\n}",
22             "|             void showViewEditing" : "  ( )  {\n     this.editpane.el.show();\n  //   this.rooview.el.show();\n     this.left_projects.el.hide();\n    \n    _this.addprojectbutton.el.hide();   \n    _this.delprojectbutton.el.hide();\n    _this.addfilebutton.el.hide();       \n    _this.backbutton.el.hide();\n   _this.new_window.el.hide();      \n        \n        \n      _this.projectbutton.el.show();         \n    _this.editfilebutton.el.show();   \n   _this.projecteditbutton.el.show();\n  _this.objectshowbutton.el.show();\n  _this.addpropbutton.el.show();      \n  _this.addlistenerbutton.el.show();   \n\n      \n    var el = _this.rooview.el;\n        el.save_easing_state();\n  \n    \n        el.set_rotation_angle(Clutter.RotateAxis.Y_AXIS, 0.0f);\n        el.set_scale(1.0f,1.0f);\n        _this.state = \"edit\";\n       // _this.mainpane.el.set_position(_this.leftpane.lastWidth);\n        _this.clutterfiles.el.hide();\n    \n    el.restore_easing_state();\n        \n    print(\"show view editing\");\n}",
23             "border_width" : 0,
24             "|             void hideProjectEdit" : " () {\n    // return to editing state..\n       \n      _this.projectbutton.el.show();\n     _this.projecteditbutton.el.show();\n      _this.backbutton.el.hide();\n         _this.editfilebutton.el.show();   \n\n     \n       if (this.project.xtype == \"Roo\") {\n        \n        //this.projectsettings.show(this.project);\n    } else {\n\n        this.vala_projectsettings.project.writeConfig();\n    }\n    _this.projecteditview.el.save_easing_state();\n    var el = _this.rooview.el;\n    el.save_easing_state();\n\n    \n    el.set_scale(1.0f,1.0f);\n       _this.projecteditview.el.set_scale(1.0f,0.0f);\n    _this.state = \"edit\";\n\n \n    //_this.clutterfiles.loadProject(_this.project);\n\n    el.restore_easing_state();\n      _this.projecteditview.el.restore_easing_state();  \n  \n}\n",
25             "default_height" : 500,
26             "# Xcls_WindowLeftProjects left_projects" : "null",
27             "id" : "MainWindow",
28             "|             void showProjectEdit" : " () {\n    // make the browser smaller, and show the edit dialog\n    \n    \n     _this.projectbutton.el.hide();\n     _this.projecteditbutton.el.hide();\n     _this.editfilebutton.el.hide();\n     \n    _this.backbutton.el.show();\n     \n    //this.rooview.el.hide();\n    \n    \n    if (this.project.xtype == \"Roo\") {\n        this.projectsettings.el.show_all();\n        this.projectsettings.show(this.project);\n    } else {\n        this.vala_projectsettings.el.show_all();\n        this.vala_projectsettings.show((Project.Gtk)this.project);\n    }\n    _this.projecteditview.el.save_easing_state();\n        \n    var el = _this.rooview.el;\n    el.save_easing_state();\n   \n    \n    el.set_scale(0.5f,0.5f);\n\n    _this.projecteditview.el.set_scale(1.0f,1.0f);\n   \n    _this.state = \"projectedit\";\n     \n \n    //_this.clutterfiles.loadProject(_this.project);\n\n    el.restore_easing_state();\n    _this.projecteditview.el.restore_easing_state();\n  //  print(\"show view browsing\");\n    \n}\n",
29             "# Xcls_WindowRooView window_rooview" : "null",
30             "|             void showAddListener" : "() {\n\n     \n     \n    var ae =      this.left_tree.getActiveElement();\n    if (ae == null) {\n        return;\n    }\n     \n   _this.backbutton.el.show();\n    _this.projectbutton.el.hide();\n    _this.editfilebutton.el.hide();\n    _this.projecteditbutton.el.hide();    \n    \n    \n    //this.rooview.el.hide();\n    this.add_props.el.show_all();\n    this.add_props.show(\n        Palete.factory(this.project.xtype), \n        \"signals\",\n        ae.fqn()\n    );\n    //this.rightpalete.show(this.project);\n\n    _this.addpropsview.el.save_easing_state();\n        \n    var el = _this.rooview.el;\n    el.save_easing_state();\n   \n      _this.clutterembed.setSizesAlloc(\"addlistener\");\n\n    \n  \n\n    _this.addpropsview.el.set_scale(1.0f,1.0f);\n   \n   \n \n    //_this.clutterfiles.loadProject(_this.project);\n\n    el.restore_easing_state();\n    _this.addpropsview.el.restore_easing_state();\n    this.state = \"addlistener\";\n}",
31             "default_width" : 800,
32             "xtype" : "Window",
33             "$ type" : "Gtk.WindowType.TOPLEVEL",
34             "|             void hideAddProp" : "() {\n      _this.backbutton.el.hide();\n     _this.projectbutton.el.show(); \n          _this.projecteditbutton.el.show();\n         _this.editfilebutton.el.show();   \n     _this.addpropsview.el.save_easing_state();\n     \n    var el = _this.rooview.el;\n    el.save_easing_state();\n\n    \n    el.set_scale(1.0f,1.0f);\n    _this.addpropsview.el.set_scale(0.0f,0.0f);\n    _this.state = \"edit\";\n\n \n    //_this.clutterfiles.loadProject(_this.project);\n\n    el.restore_easing_state();\n     _this.addpropsview.el.restore_easing_state();  \n }",
35             "# Xcls_WindowLeftTree left_tree" : "null",
36             "# Editor code_editor" : "null",
37             "|             void showCodeEdit" : "(JsRender.JsRender file, JsRender.Node node, string ptype, string key)\n{\n    // this is a bit different,\n    // it's not called via a button - but triggered by the prop edit class signal.\n    // so it has to hide any other state..\n    \n    switch(this.state) {\n        case \"object\":\n            this.hideObject();\n            break;\n        case \"addprop\":\n            this.hideAddProp();\n            break;\n        case \"addlistener\":\n            this.hideAddListener();\n            break;\n    }\n \n   _this.backbutton.el.show();\n   \n    _this.projectbutton.el.hide();\n    _this.editfilebutton.el.hide();\n    _this.projecteditbutton.el.hide();    \n   // more?? \n     \n    //this.rooview.el.hide();\n    this.code_editor.el.show_all();\n    this.code_editor.show(\n        file,\n        node,\n        ptype,\n        key\n    );\n\n    _this.codeeditview.el.save_easing_state();\n        \n    var el = _this.rooview.el;\n    el.save_easing_state();\n    _this.clutterembed.setSizesAlloc(\"codedit\");\n   \n    _this.codeeditview.el.set_scale(1.0f,1.0f);\n   \n   \n \n    //_this.clutterfiles.loadProject(_this.project);\n\n    el.restore_easing_state();\n    _this.codeeditview.el.restore_easing_state();\n    this.state = \"codeedit\";\n}\n",
38             "# Xcls_DialogNewComponent new_file_dialog" : "null",
39             "# Xcls_ProjectSettings projectsettings" : "null",
40             "|             void setTitle" : " (string str) {\n    this.el.set_title(this.title + \" - \" + str);\n}\n",
41             "|             void show" : "() {\n    this.left_tree =new Xcls_WindowLeftTree();\n    _this.vbox.el.pack_start(this.left_tree.el,true, true,0);\n    this.el.show_all();\n\n}",
42             "$ xns" : "Gtk",
43             "# Xcls_ClutterFiles clutterfiles" : "null",
44             "# Xcls_LeftProps left_props" : "null",
45             "# string state" : "",
46             "|             void hideViewEditing" : "  ( )   {\n\n// show the file navigation...\n  \n    if (this.left_tree.getActiveFile() != null) {\n         if (this.left_tree.getActiveFile().xtype == \"Roo\" ) {\n             this.window_rooview.createThumb();\n         } else {\n              this.window_gladeview.createThumb();\n          }\n      }\n      \n    _this.addprojectbutton.el.show();   \n    _this.addfilebutton.el.show();       \n      _this.backbutton.el.show();\n    _this.delprojectbutton.el.show();\n      _this.new_window.el.show();  \n          \n      _this.editfilebutton.el.hide();   \n      _this.projectbutton.el.hide();         \n      _this.projecteditbutton.el.hide();\n      _this.objectshowbutton.el.hide();\n      _this.addpropbutton.el.hide();      \n      _this.addlistenerbutton.el.hide();  \n\n\n\n\n          \n    // show the add file button..\n    \n          \n      \n     this.editpane.el.hide();\n    //this.rooview.el.hide();\n     this.left_projects.el.show();\n    \n    var el = _this.rooview.el;\n    el.save_easing_state();\n      el.set_easing_duration(1000);\n    // show project / file view..\n    //_this.mainpane.lastWidth = _this.leftpane.el.get_position();\n    //_this.mainpane.el.set_position(0);\n    // rotate y 180..\n    el.set_rotation_angle(Clutter.RotateAxis.Y_AXIS, 360.0f);\n    el.set_scale(0.0f,0.0f);\n   \n        _this.state = \"files\";\n    if (_this.project != null) {\n        _this.left_projects.selectProject(_this.project);\n        }\n    //_this.clutterfiles.loadProject(_this.project);\n\n    el.restore_easing_state();\n        \n    print(\"show view browsing\");\n}",
47             "# Xcls_RightPalete rightpalete" : "null",
48             "# string title" : "\"Application Builder\"",
49             "# ValaProjectSettings vala_projectsettings" : "null",
50             "# Xcls_WindowAddProp add_props" : "null",
51             "|             void showObject" : "() {\n\n     \n    // what's the active node on the left hand side..\n    \n    var n = _this.left_tree.getActiveElement();\n\n    if (_this.left_tree.model.file == null) {\n        return;\n    }\n    \n    if (n == null && _this.left_tree.model.file.tree != null) {\n        return;\n    }\n    \n     _this.backbutton.el.show();\n       _this.projectbutton.el.hide();\n    _this.editfilebutton.el.hide();\n    _this.projecteditbutton.el.hide();    \n    \n     \n    //this.rooview.el.hide();\n    this.rightpalete.el.show_all();\n    this.rightpalete.load(_this.left_tree.getActiveFile().palete(), n == null ? \"*top\" : n.fqn());\n\n    \n    //this.rightpalete.show(this.project);\n\n    _this.objectview.el.save_easing_state();\n        \n    var el = _this.rooview.el;\n    el.save_easing_state();\n   \n     _this.clutterembed.setSizesAlloc(\"object\");\n    \n\n    _this.objectview.el.set_scale(1.0f,1.0f);\n   \n   \n \n    //_this.clutterfiles.loadProject(_this.project);\n\n    el.restore_easing_state();\n    _this.objectview.el.restore_easing_state();\n    this.state = \"object\";\n}",
52             "* init" : " this.state = \"files\";\n\t  \n    //this.el.show_all();\n    \n    ",
53             "|             void hideObject" : "() {\n      // return to editing state..\n       \n          _this.projecteditbutton.el.show();\n      _this.backbutton.el.hide();\n     _this.projectbutton.el.show(); \n         _this.editfilebutton.el.show();   \n     _this.objectview.el.save_easing_state();\n    var el = _this.rooview.el;\n    el.save_easing_state();\n\n    \n    el.set_scale(1.0f,1.0f);\n    _this.objectview.el.set_scale(0.0f,0.0f);\n    _this.state = \"edit\";\n\n \n    //_this.clutterfiles.loadProject(_this.project);\n\n    el.restore_easing_state();\n     _this.objectview.el.restore_easing_state();  \n \n\n}",
54             "# Xcls_GtkView window_gladeview" : "null",
55             "items" : [
56                 {
57                     "id" : "vbox",
58                     "* pack" : "add",
59                     "xtype" : "VBox",
60                     "$ xns" : "Gtk",
61                     "$ homogeneous" : false,
62                     "items" : [
63                         {
64                             "id" : "mainpane",
65                             "position" : 400,
66                             "* pack" : "pack_end,true,true,0",
67                             "# int lastWidth" : 0,
68                             "xtype" : "HPaned",
69                             "$ xns" : "Gtk",
70                             "items" : [
71                                 {
72                                     "id" : "leftpane",
73                                     "xtype" : "VBox",
74                                     "* pack" : "add1",
75                                     "$ xns" : "Gtk",
76                                     "items" : [
77                                         {
78                                             "id" : "editpane",
79                                             "xtype" : "VPaned",
80                                             "* pack" : "pack_start,false,true,0",
81                                             "$ xns" : "Gtk",
82                                             "items" : [
83                                                 {
84                                                     "id" : "tree",
85                                                     "xtype" : "VBox",
86                                                     "* pack" : "add1",
87                                                     "$ xns" : "Gtk"
88                                                 },
89                                                 {
90                                                     "id" : "props",
91                                                     "xtype" : "VBox",
92                                                     "* pack" : "add2",
93                                                     "$ xns" : "Gtk"
94                                                 }
95                                             ]
96                                         }
97                                     ]
98                                 },
99                                 {
100                                     "* pack" : "add2",
101                                     "xtype" : "VBox",
102                                     "$ xns" : "Gtk",
103                                     "items" : [
104                                         {
105                                             "listeners" : {
106                                                 "size_allocate" : "  (  alloc) => {\n    this.setSizes(alloc, _this.state); \n        \n}"
107                                             },
108                                             "id" : "clutterembed",
109                                             "* init" : "    var stage = this.el.get_stage();\n    stage.set_background_color(  Clutter.Color.from_string(\"#000\"));\n    \n    \n",
110                                             "xtype" : "Embed",
111                                             "* pack" : "pack_start,true,true,0",
112                                             "|           void setSizes" : "  (  Gtk.Allocation alloc, string state) {\n    if (!_this.children_loaded) {  return; }\n     \n    _this.clutterfiles.set_size(alloc.width-50, alloc.height);\n    \n    // project view appears at top...\n    \n    _this.projecteditview.el.set_size(alloc.width-50, alloc.height / 2.0f);\n           \n           \n    \n    var avail = alloc.width < 50.0f ? 0 :  alloc.width - 50.0f;\n \n    \n    var palsize = avail < 300.0f ? avail : 300.0f;\n    print(\"set palsize size %f\\n\", palsize);\n   // palate / props : fixed 300 pix\n            \n    _this.objectview.el.set_size(palsize, alloc.height);    \n    _this.addpropsview.el.set_size(palsize, alloc.height);\n    \n     \n    \n    // code edit min 600\n    \n    var codesize = avail < 800.0f ? avail : 800.0f;\n    print(\"set code size %f\\n\", codesize);\n\n    _this.codeeditview.el.set_size(codesize, alloc.height);\n    _this.rooview.el.set_size(alloc.width-50, alloc.height);    \n   \n    switch ( state) {\n        case \"codeedit\": \n\n\tvar scale = avail > 0.0f ? (avail - codesize -10 ) / avail : 0.0f;\n\t\n\t\n           _this.rooview.el.set_scale(scale,scale);\n           break;\n        case \"addprop\":\n        case \"addlistener\":        \n          case \"object\":   \n\tvar scale = avail > 0.0f ? (avail - palsize -10 ) / avail : 0.0f;\n           _this.rooview.el.set_scale(scale,scale);\n           break;\n    }\n        \n}",
113                                             "$ xns" : "GtkClutter",
114                                             "|           void setSizesAlloc" : "(string state) {\n\n    Gtk.Allocation alloc;\n    this.el.get_allocation(out alloc);\n    this.setSizes(alloc, state);\n}\n",
115                                             "items" : [
116                                                 {
117                                                     "id" : "rooview",
118                                                     "* init" : "{\n   \n   \n    this.el.add_constraint(\n        new Clutter.AlignConstraint(\n            _this.clutterembed.el.get_stage(), \n            Clutter.AlignAxis.X_AXIS,\n            1.0f\n        )\n    );\n        \n    //this.el.set_position(100,100);\n    this.el.set_pivot_point(1.0f,1.0f);\n    \n    this.el.set_size(_this.clutterembed.el.get_stage().width-50,\n            _this.clutterembed.el.get_stage().height);\n            \n}",
119                                                     "xtype" : "Actor",
120                                                     "* pack" : "get_stage().add_child",
121                                                     "$ xns" : "GtkClutter"
122                                                 },
123                                                 {
124                                                     "id" : "objectview",
125                                                     "* init" : "{\n   \n   /*\n    this.el.add_constraint(\n        new Clutter.AlignConstraint(\n            _this.clutterembed.el.get_stage(), \n            Clutter.AlignAxis.X_AXIS,\n            0.0f\n        )\n    );\n    */\n    this.el.fixed_x = 50.0f;\n    this.el.fixed_y = 0.0f;\n    //this.el.set_position(100,100);\n    this.el.set_pivot_point(0.0f,0.0f);\n    this.el.set_scale(0.0f,1.0f);\n    this.el.set_size((_this.clutterembed.el.get_stage().width-50)/2,\n            _this.clutterembed.el.get_stage().height);\n            \n}",
126                                                     "xtype" : "Actor",
127                                                     "* pack" : "get_stage().add_child",
128                                                     "$ xns" : "GtkClutter"
129                                                 },
130                                                 {
131                                                     "id" : "codeeditview",
132                                                     "* init" : "{\n   \n   /*\n    this.el.add_constraint(\n        new Clutter.AlignConstraint(\n            _this.clutterembed.el.get_stage(), \n            Clutter.AlignAxis.X_AXIS,\n            0.0f\n        )\n    );\n    */\n    this.el.fixed_x = 50.0f;\n    this.el.fixed_y = 0.0f;\n    //this.el.set_position(100,100);\n    this.el.set_pivot_point(0.0f,0.0f);\n    this.el.set_scale(0.0f,1.0f);\n    this.el.set_size((_this.clutterembed.el.get_stage().width-50)/2,\n            _this.clutterembed.el.get_stage().height);\n            \n}",
133                                                     "xtype" : "Actor",
134                                                     "* pack" : "get_stage().add_child",
135                                                     "$ xns" : "GtkClutter"
136                                                 },
137                                                 {
138                                                     "id" : "addpropsview",
139                                                     "* init" : "{\n   \n   /*\n    this.el.add_constraint(\n        new Clutter.AlignConstraint(\n            _this.clutterembed.el.get_stage(), \n            Clutter.AlignAxis.X_AXIS,\n            0.0f\n        )\n    );\n    */\n    this.el.fixed_x = 50.0f;\n    this.el.fixed_y = 0.0f;\n    //this.el.set_position(100,100);\n    this.el.set_pivot_point(0.0f,0.0f);\n    this.el.set_scale(0.0f,1.0f);\n    this.el.set_size((_this.clutterembed.el.get_stage().width-50)/2,\n            _this.clutterembed.el.get_stage().height);\n            \n}",
140                                                     "xtype" : "Actor",
141                                                     "* pack" : "get_stage().add_child",
142                                                     "$ xns" : "GtkClutter"
143                                                 },
144                                                 {
145                                                     "id" : "projecteditview",
146                                                     "* init" : "{\n   \n   \n    this.el.add_constraint(\n        new Clutter.AlignConstraint(\n            _this.clutterembed.el.get_stage(), \n            Clutter.AlignAxis.X_AXIS,\n            1.0f\n        )\n    );\n        \n    //this.el.set_position(100,100);\n    this.el.set_pivot_point(0.0f,0.0f);\n    this.el.set_scale(1.0f,0.0f);\n    this.el.set_size(_this.clutterembed.el.get_stage().width-50,\n            _this.clutterembed.el.get_stage().height /2);\n            \n}",
147                                                     "xtype" : "Actor",
148                                                     "* pack" : "get_stage().add_child",
149                                                     "$ xns" : "GtkClutter"
150                                                 },
151                                                 {
152                                                     "id" : "buttonlayout",
153                                                     "* init" : "{\n    \n    this.el.add_constraint(\n        new Clutter.AlignConstraint(\n            _this.clutterembed.el.get_stage(), \n            Clutter.AlignAxis.X_AXIS,\n            0.0f\n        )\n    );\n     \n    \n    //this.el.set_position(100,100);\n    this.el.set_pivot_point(0.5f,0.5f);\n     this.el.set_size(50,\n           _this.clutterembed.el.get_stage().height);\n     \n}",
154                                                     "xtype" : "Actor",
155                                                     "* pack" : "get_stage().add_child",
156                                                     "$ xns" : "Clutter",
157                                                     "items" : [
158                                                         {
159                                                             "$ orientation" : "Clutter.Orientation.VERTICAL",
160                                                             "xtype" : "BoxLayout",
161                                                             "$ xns" : "Clutter",
162                                                             "* prop" : "layout_manager"
163                                                         },
164                                                         {
165                                                             "id" : "backbutton",
166                                                             "* init" : "this.el.set_size(50,50);",
167                                                             "xtype" : "Actor",
168                                                             "* pack" : "add_child",
169                                                             "$ xns" : "Clutter",
170                                                             "items" : [
171                                                                 {
172                                                                     "* init" : "((Gtk.Container)(this.el.get_widget())).add ( child_0.el);",
173                                                                     "xtype" : "Actor",
174                                                                     "* pack" : "add_child",
175                                                                     "$ xns" : "GtkClutter",
176                                                                     "items" : [
177                                                                         {
178                                                                             "listeners" : {
179                                                                                 "clicked" : "  ( ) => {\n    switch (_this.state) {\n        case \"edit\":\n        \n            _this.hideViewEditing();\n            break;  \n        case \"files\":\n            // should only occur if there is an active file..\n            _this.showViewEditing();\n            break; \n            \n          case \"addprop\":\n            _this.hideAddProp();\n\n            break;\n        case \"addlistener\":\n            _this.hideAddListener();\n\n            break;\n             \n         case \"object\":\n            _this.hideObject();\n            break;    \n         \n         case \"codeedit\":\n            \n            _this.hideCodeEdit();  \n            break;\n            \n         case  \"projectedit\":\n         // save?\n            _this.hideProjectEdit();\n            break;\n            \n        default:\n            break;\n    }\n    return  ;    \n\n}"
180                                                                             },
181                                                                             "utf8 tooltip_text" : "Back",
182                                                                             "* pack" : false,
183                                                                             "xtype" : "Button",
184                                                                             "width_request" : 50,
185                                                                             "$ xns" : "Gtk",
186                                                                             "height_request" : 50,
187                                                                             "items" : [
188                                                                                 {
189                                                                                     "xtype" : "Image",
190                                                                                     "utf8 icon_name" : "go-previous",
191                                                                                     "* pack" : "set_image",
192                                                                                     "$ xns" : "Gtk"
193                                                                                 }
194                                                                             ]
195                                                                         }
196                                                                     ]
197                                                                 }
198                                                             ]
199                                                         },
200                                                         {
201                                                             "id" : "projectbutton",
202                                                             "* init" : "this.el.set_size(50,50);",
203                                                             "xtype" : "Actor",
204                                                             "* pack" : "add_child",
205                                                             "$ xns" : "Clutter",
206                                                             "items" : [
207                                                                 {
208                                                                     "* init" : "((Gtk.Container)(this.el.get_widget())).add ( child_0.el);",
209                                                                     "* pack" : "add_child",
210                                                                     "xtype" : "Actor",
211                                                                     "$ xns" : "GtkClutter",
212                                                                     "items" : [
213                                                                         {
214                                                                             "listeners" : {
215                                                                                 "clicked" : "  ( ) => {\n    switch (_this.state) {\n        case \"edit\":\n        \n            _this.hideViewEditing();\n            break;  \n        case \"files\":\n            _this.showViewEditing();\n            break; \n            \n          case \"addprop\":\n            _this.hideAddProp();\n            _this.hideViewEditing();\n            break;\n        case \"addlistener\":\n            _this.hideAddListener();\n            _this.hideViewEditing();\n            break;\n             \n         case \"object\":\n            _this.hideObject();\n            _this.hideViewEditing();\n            break;    \n            \n        default:\n            break;\n    }\n    return  ;    \n\n}"
216                                                                             },
217                                                                             "* pack" : false,
218                                                                             "xtype" : "Button",
219                                                                             "width_request" : 50,
220                                                                             "$ xns" : "Gtk",
221                                                                             "height_request" : 50,
222                                                                             "$ tooltop_text" : "\"Open File\"",
223                                                                             "items" : [
224                                                                                 {
225                                                                                     "* pack" : "set_image",
226                                                                                     "xtype" : "Image",
227                                                                                     "utf8 icon_name" : "document-open",
228                                                                                     "$ xns" : "Gtk"
229                                                                                 }
230                                                                             ]
231                                                                         }
232                                                                     ]
233                                                                 }
234                                                             ]
235                                                         },
236                                                         {
237                                                             "id" : "editfilebutton",
238                                                             "* init" : "this.el.set_size(50.0f,50.0f);",
239                                                             "xtype" : "Actor",
240                                                             "* pack" : "add_child",
241                                                             "$ xns" : "Clutter",
242                                                             "items" : [
243                                                                 {
244                                                                     "* init" : "((Gtk.Container)(this.el.get_widget())).add ( child_0.el);",
245                                                                     "* pack" : "add_child",
246                                                                     "xtype" : "Actor",
247                                                                     "$ xns" : "GtkClutter",
248                                                                     "items" : [
249                                                                         {
250                                                                             "listeners" : {
251                                                                                 "clicked" : "  ( ) => {\n  \n    // create a new file in project..\n    if (_this.project == null || _this.left_tree.model.file == null) {\n        return  ;\n    }\n     \n    _this.new_file_dialog.show(_this.left_tree.model.file);\n    \n    return  ;    \n\n\n}"
252                                                                             },
253                                                                             "* pack" : false,
254                                                                             "xtype" : "Button",
255                                                                             "width_request" : 50,
256                                                                             "$ xns" : "Gtk",
257                                                                             "$ tooltip_text" : "\"File Details\"",
258                                                                             "height_request" : 50,
259                                                                             "items" : [
260                                                                                 {
261                                                                                     "utf8 icon_name" : "document-properties",
262                                                                                     "* pack" : "set_image",
263                                                                                     "xtype" : "Image",
264                                                                                     "$ xns" : "Gtk"
265                                                                                 }
266                                                                             ]
267                                                                         }
268                                                                     ]
269                                                                 }
270                                                             ]
271                                                         },
272                                                         {
273                                                             "id" : "projecteditbutton",
274                                                             "* init" : "this.el.set_size(50,50);",
275                                                             "xtype" : "Actor",
276                                                             "* pack" : "add_child",
277                                                             "$ xns" : "Clutter",
278                                                             "items" : [
279                                                                 {
280                                                                     "* init" : "((Gtk.Container)(this.el.get_widget())).add ( child_0.el);",
281                                                                     "* pack" : "add_child",
282                                                                     "xtype" : "Actor",
283                                                                     "$ xns" : "GtkClutter",
284                                                                     "items" : [
285                                                                         {
286                                                                             "listeners" : {
287                                                                                 "clicked" : "  ( ) => {\n    switch (_this.state) {\n        case \"edit\":\n            _this.showProjectEdit();\n            break;  \n        case \"files\":\n            // _this.showViewEditing();\n            break; \n        case \"projectedit\":\n            _this.hideProjectEdit();\n            break;\n            \n            \n              \n        case \"addprop\":\n            _this.hideAddProp();\n            _this.showProjectEdit();\n            break;\n        case \"addlistener\":\n            _this.hideAddListener();\n            _this.showProjectEdit();\n            break;\n             \n         case \"object\":\n            _this.hideObject();\n            _this.showProjectEdit();    \n            break;\n        default:\n            break;\n    }\n    return  ;    \n\n\n}"
288                                                                             },
289                                                                             "* pack" : false,
290                                                                             "xtype" : "Button",
291                                                                             "width_request" : 50,
292                                                                             "$ xns" : "Gtk",
293                                                                             "$ tooltip_text" : "\"Project Details\"",
294                                                                             "height_request" : 50,
295                                                                             "items" : [
296                                                                                 {
297                                                                                     "xtype" : "Image",
298                                                                                     "utf8 icon_name" : "emblem-system",
299                                                                                     "* pack" : "set_image",
300                                                                                     "$ xns" : "Gtk"
301                                                                                 }
302                                                                             ]
303                                                                         }
304                                                                     ]
305                                                                 }
306                                                             ]
307                                                         },
308                                                         {
309                                                             "listeners" : {
310                                                                 "button_press_event" : "  ( ) => {\n    \n    \n    \n    switch (_this.state) {\n\n \n        case \"addprop\":\n            _this.hideAddProp();\n            _this.showObject();\n            break;\n    case \"addlistener\":\n            _this.hideAddListener();\n            _this.showObject();\n            break;\n\n// show            \n        case \"edit\":\n            _this.showObject();\n            break;\n            \n// hide            \n        case \"object\":\n            _this.hideObject();\n            break;\n            break;\n                        \n        default:\n            print(\"unhandled add objects from %s\\n\",_this.state);\n            break;\n    }\n    return false;    \n\n\n}",
311                                                                 "enter_event" : "(  event)  => {\n    this.el.background_color = new Clutter.Color.from_string(\"#333\");\n        return false;\n}",
312                                                                 "leave_event" : "(  event)  => {\n    this.el.background_color = new Clutter.Color.from_string(\"#000\");\n    return false;\n}"
313                                                             },
314                                                             "id" : "objectshowbutton",
315                                                             "* init" : "this.el.set_size(50,50);",
316                                                             "xtype" : "Actor",
317                                                             "* pack" : "add_child",
318                                                             "$ xns" : "Clutter",
319                                                             "items" : [
320                                                                 {
321                                                                     "* init" : "((Gtk.Container)(this.el.get_widget())).add ( child_0.el);",
322                                                                     "* pack" : "add_child",
323                                                                     "xtype" : "Actor",
324                                                                     "$ xns" : "GtkClutter",
325                                                                     "items" : [
326                                                                         {
327                                                                             "listeners" : {
328                                                                                 "clicked" : "  ( ) => {\n    \n    \n    \n    switch (_this.state) {\n\n \n        case \"addprop\":\n            _this.hideAddProp();\n            _this.showObject();\n            break;\n    case \"addlistener\":\n            _this.hideAddListener();\n            _this.showObject();\n            break;\n\n// show            \n        case \"edit\":\n            _this.showObject();\n            break;\n            \n// hide            \n        case \"object\":\n            _this.hideObject();\n            break;\n            break;\n                        \n        default:\n            print(\"unhandled add objects from %s\\n\",_this.state);\n            break;\n    }\n    return  ;    \n\n\n}"
329                                                                             },
330                                                                             "* pack" : false,
331                                                                             "xtype" : "Button",
332                                                                             "width_request" : 50,
333                                                                             "$ xns" : "Gtk",
334                                                                             "$ tooltip_text" : "\"Add Child Element\"",
335                                                                             "height_request" : 50,
336                                                                             "items" : [
337                                                                                 {
338                                                                                     "* pack" : "set_image",
339                                                                                     "xtype" : "Image",
340                                                                                     "utf8 icon_name" : "list-add",
341                                                                                     "$ xns" : "Gtk"
342                                                                                 }
343                                                                             ]
344                                                                         }
345                                                                     ]
346                                                                 }
347                                                             ]
348                                                         },
349                                                         {
350                                                             "id" : "addpropbutton",
351                                                             "* init" : "this.el.set_size(50,50);",
352                                                             "xtype" : "Actor",
353                                                             "* pack" : "add_child",
354                                                             "$ xns" : "Clutter",
355                                                             "items" : [
356                                                                 {
357                                                                     "* init" : "((Gtk.Container)(this.el.get_widget())).add ( child_0.el);",
358                                                                     "* pack" : "add_child",
359                                                                     "xtype" : "Actor",
360                                                                     "$ xns" : "GtkClutter",
361                                                                     "items" : [
362                                                                         {
363                                                                             "listeners" : {
364                                                                                 "clicked" : "  ( ) => {\n    \n    \n    \n    switch (_this.state) {\n        case \"edit\":\n            _this.showAddProp();\n            break;\n            \n        case \"object\":\n            _this.hideObject();\n            _this.showAddProp();\n            break;\n       \n        case \"addlistener\":\n            _this.hideAddListener();\n            _this.showAddProp();            \n            break;\n            \n            \n        case \"addprop\":\n            _this.hideAddProp();\n            break;\n            \n        default:\n            print(\"unhandled add property from %s\\n\",_this.state);\n            break;\n            \n    }\n    return  ;    \n\n\n}"
365                                                                             },
366                                                                             "* pack" : false,
367                                                                             "xtype" : "Button",
368                                                                             "width_request" : 50,
369                                                                             "$ xns" : "Gtk",
370                                                                             "$ tooltip_text" : "\"Add Property\"",
371                                                                             "height_request" : 50,
372                                                                             "items" : [
373                                                                                 {
374                                                                                     "utf8 icon_name" : "format-justify-left",
375                                                                                     "* pack" : "set_image",
376                                                                                     "xtype" : "Image",
377                                                                                     "$ xns" : "Gtk"
378                                                                                 }
379                                                                             ]
380                                                                         }
381                                                                     ]
382                                                                 }
383                                                             ]
384                                                         },
385                                                         {
386                                                             "id" : "addlistenerbutton",
387                                                             "* init" : "this.el.set_size(50,50);",
388                                                             "xtype" : "Actor",
389                                                             "* pack" : "add_child",
390                                                             "$ xns" : "Clutter",
391                                                             "items" : [
392                                                                 {
393                                                                     "* init" : "((Gtk.Container)(this.el.get_widget())).add ( child_0.el);",
394                                                                     "* pack" : "add_child",
395                                                                     "xtype" : "Actor",
396                                                                     "$ xns" : "GtkClutter",
397                                                                     "items" : [
398                                                                         {
399                                                                             "listeners" : {
400                                                                                 "clicked" : "  ( ) => {\n    \n    \n    \n    switch (_this.state) {\n        case \"edit\":\n            _this.showAddListener();\n            break;\n            \n       \n        case \"addlistener\":\n            _this.hideAddListener();\n            break;\n\n            \n        case \"addprop\":\n            _this.hideAddProp();\n            _this.showAddListener();\n            break;\n         case \"object\":\n            _this.hideObject();\n            _this.showAddListener();\n            break;\n    \n          default:\n            print(\"unhandled add listener from %s\\n\",_this.state);\n\n            break;\n            \n    }\n    return  ;    \n\n\n}"
401                                                                             },
402                                                                             "* pack" : false,
403                                                                             "xtype" : "Button",
404                                                                             "width_request" : 50,
405                                                                             "$ xns" : "Gtk",
406                                                                             "$ tooltip_text" : "\"Add Event Code\"",
407                                                                             "height_request" : 50,
408                                                                             "items" : [
409                                                                                 {
410                                                                                     "xtype" : "Image",
411                                                                                     "utf8 icon_name" : "appointment-new",
412                                                                                     "* pack" : "set_image",
413                                                                                     "$ xns" : "Gtk"
414                                                                                 }
415                                                                             ]
416                                                                         }
417                                                                     ]
418                                                                 }
419                                                             ]
420                                                         },
421                                                         {
422                                                             "id" : "addprojectbutton",
423                                                             "* init" : "this.el.set_size(50.0f,50.0f);",
424                                                             "xtype" : "Actor",
425                                                             "* pack" : "add_child",
426                                                             "$ xns" : "Clutter",
427                                                             "items" : [
428                                                                 {
429                                                                     "* init" : "((Gtk.Container)(this.el.get_widget())).add ( child_0.el);",
430                                                                     "* pack" : "add_child",
431                                                                     "xtype" : "Actor",
432                                                                     "$ xns" : "GtkClutter",
433                                                                     "items" : [
434                                                                         {
435                                                                             "listeners" : {
436                                                                                 "clicked" : "  ( ) => {\n  \n    // create a new file in project..\n    //Xcls_DialogNewComponent.singleton().show(\n   var  pe =     Xcls_EditProject.singleton();\n    pe.el.set_transient_for(_this.el);\n    pe.el.set_modal(true);   \n   \n    var p  = pe.show();\n\n    if (p == null) {\n        return;\n    }\n    _this.left_projects.is_loaded = false;    \n    _this.left_projects.load();\n    _this.left_projects.selectProject(p);\n    return  ;    \n\n\n}"
437                                                                             },
438                                                                             "* pack" : false,
439                                                                             "xtype" : "Button",
440                                                                             "width_request" : 50,
441                                                                             "$ xns" : "Gtk",
442                                                                             "$ tooltip_text" : "\"New\\nProj.\"",
443                                                                             "height_request" : 50,
444                                                                             "items" : [
445                                                                                 {
446                                                                                     "utf8 icon_name" : "folder-new",
447                                                                                     "* pack" : "set_image",
448                                                                                     "xtype" : "Image",
449                                                                                     "$ xns" : "Gtk"
450                                                                                 }
451                                                                             ]
452                                                                         }
453                                                                     ]
454                                                                 }
455                                                             ]
456                                                         },
457                                                         {
458                                                             "id" : "addfilebutton",
459                                                             "* init" : "this.el.set_size(50.0f,50.0f);",
460                                                             "xtype" : "Actor",
461                                                             "* pack" : "add_child",
462                                                             "$ xns" : "Clutter",
463                                                             "items" : [
464                                                                 {
465                                                                     "* init" : "((Gtk.Container)(this.el.get_widget())).add ( child_0.el);",
466                                                                     "* pack" : "add_child",
467                                                                     "xtype" : "Actor",
468                                                                     "$ xns" : "GtkClutter",
469                                                                     "items" : [
470                                                                         {
471                                                                             "listeners" : {
472                                                                                 "clicked" : " () => {\n    // create a new file in project..\n    \n    // what's the currently selected project...\n    var proj = _this.left_projects.getSelectedProject();\n    \n    if (proj == null) {\n        return  ;\n    }\n    \n    \n    \n    var f = JsRender.JsRender.factory(proj.xtype,  proj, \"\");\n    _this.project = proj;\n    _this.new_file_dialog.show(f);\n    \n    return  ;    \n}"
473                                                                             },
474                                                                             "* pack" : false,
475                                                                             "xtype" : "Button",
476                                                                             "width_request" : 50,
477                                                                             "$ xns" : "Gtk",
478                                                                             "$ tooltip_text" : "\"Add File\"",
479                                                                             "height_request" : 50,
480                                                                             "items" : [
481                                                                                 {
482                                                                                     "* pack" : "set_image",
483                                                                                     "xtype" : "Image",
484                                                                                     "utf8 icon_name" : "document-new",
485                                                                                     "$ xns" : "Gtk"
486                                                                                 }
487                                                                             ]
488                                                                         }
489                                                                     ]
490                                                                 }
491                                                             ]
492                                                         },
493                                                         {
494                                                             "id" : "delprojectbutton",
495                                                             "* init" : "this.el.set_size(50,50);",
496                                                             "xtype" : "Actor",
497                                                             "* pack" : "add_child",
498                                                             "$ xns" : "Clutter",
499                                                             "items" : [
500                                                                 {
501                                                                     "* init" : "((Gtk.Container)(this.el.get_widget())).add ( child_0.el);",
502                                                                     "* pack" : "add_child",
503                                                                     "xtype" : "Actor",
504                                                                     "$ xns" : "GtkClutter",
505                                                                     "items" : [
506                                                                         {
507                                                                             "listeners" : {
508                                                                                 "clicked" : "  ( ) => {\n     \n     var cd = DialogConfirm.singleton();\n     cd.el.set_transient_for(_this.el);\n    cd.el.set_modal(true);\n\n     var project =   _this.left_projects.getSelectedProject();\n    if (project == null) {\n        print(\"SKIP - no project\\n\");\n        return;\n    }\n    \n        \n     if (Gtk.ResponseType.YES != cd.show(\"Confirm\", \n        \"Are you sure you want to delete project %s\".printf(project.name))) {\n        return;\n    }\n     \n\n    // confirm?\n    Project.Project.remove(project);\n    _this.project = null;\n    \n    _this.left_projects.is_loaded =  false;\n    _this.left_projects.load();\n    _this.clutterfiles.clearFiles();\n\n}"
509                                                                             },
510                                                                             "* pack" : false,
511                                                                             "xtype" : "Button",
512                                                                             "width_request" : 50,
513                                                                             "$ xns" : "Gtk",
514                                                                             "$ tooltip_text" : "\"Delelte Project\"",
515                                                                             "height_request" : 50,
516                                                                             "items" : [
517                                                                                 {
518                                                                                     "utf8 icon_name" : "user-trash",
519                                                                                     "* pack" : "set_image",
520                                                                                     "xtype" : "Image",
521                                                                                     "$ xns" : "Gtk"
522                                                                                 }
523                                                                             ]
524                                                                         }
525                                                                     ]
526                                                                 }
527                                                             ]
528                                                         },
529                                                         {
530                                                             "id" : "new_window",
531                                                             "* init" : "this.el.set_size(50,50);",
532                                                             "xtype" : "Actor",
533                                                             "* pack" : "add_child",
534                                                             "$ xns" : "Clutter",
535                                                             "items" : [
536                                                                 {
537                                                                     "* init" : "((Gtk.Container)(this.el.get_widget())).add ( child_0.el);",
538                                                                     "* pack" : "add_child",
539                                                                     "xtype" : "Actor",
540                                                                     "$ xns" : "GtkClutter",
541                                                                     "items" : [
542                                                                         {
543                                                                             "listeners" : {
544                                                                                 "clicked" : "  ( ) => {\n        Xcls_MainWindow.singleton().no_windows++;\n        var w = new Xcls_MainWindow();\n        w.ref();\n\n        w.el.show_all();\n        w.initChildren();\n        w.hideViewEditing();\n}"
545                                                                             },
546                                                                             "utf8 tooltip_text" : "Open New Window",
547                                                                             "* pack" : false,
548                                                                             "xtype" : "Button",
549                                                                             "width_request" : 50,
550                                                                             "$ xns" : "Gtk",
551                                                                             "height_request" : 50,
552                                                                             "items" : [
553                                                                                 {
554                                                                                     "utf8 icon_name" : "window-new",
555                                                                                     "* pack" : "set_image",
556                                                                                     "xtype" : "Image",
557                                                                                     "$ xns" : "Gtk"
558                                                                                 }
559                                                                             ]
560                                                                         }
561                                                                     ]
562                                                                 }
563                                                             ]
564                                                         }
565                                                     ]
566                                                 }
567                                             ]
568                                         }
569                                     ]
570                                 }
571                             ]
572                         }
573                     ]
574                 }
575             ]
576         }
577     ]
578 }