Builder4/MainWindow.bjs
[app.Builder.js] / Builder4 / MainWindow.bjs
1 {
2     "id": "file-gtk-147",
3     "name": "MainWindow",
4     "parent": "",
5     "title": false,
6     "path": "/home/alan/gitlive/app.Builder.js/Builder4/MainWindow.bjs",
7     "items": [
8         {
9             "listeners": {
10                 "show": "  ( ) => {\n    // hide the file editing..\n   \n    //this.hideViewEditing();\n}",
11                 "delete_event": "  (   event) => {\n    return false;\n}",
12                 "destroy": "() =>  {\n Gtk.main_quit();\n}"
13             },
14             ".Project.Project:project": "null",
15             ".Xcls_ClutterFiles:clutterfiles": "null",
16             ".Xcls_Editor:code_editor": "null",
17             ".Xcls_GladeView:window_gladeview": "null",
18             ".Xcls_LeftProps:left_props": "null",
19             ".Xcls_ProjectSettings:projectsettings": "null",
20             ".Xcls_RightPalete:rightpalete": "null",
21             ".Xcls_WindowAddProp:add_props": "null",
22             ".Xcls_WindowLeftProjects:left_projects": "null",
23             ".Xcls_WindowLeftTree:left_tree": "null",
24             ".Xcls_WindowRooView:window_rooview": "null",
25             ".bool:children_loaded": "false",
26             ".string:state": "",
27             ".string:title": "\"Application Builder\"",
28             "border_width": 0,
29             "default_height": 500,
30             "default_width": 800,
31             "id": "MainWindow",
32             "xtype": "Window",
33             "|init": " this.state = \"files\";\n\t  \n    //this.el.show_all();\n    \n    ",
34             "|type": "Gtk.WindowType.TOPLEVEL",
35             "|void:hideAddListener": "() {\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  }",
36             "|void:hideAddProp": "() {\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 }",
37             "|void:hideCodeEdit": "() {\n    //this.code_editor.saveContents();\n   \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 }",
38             "|void:hideObject": "() {\n      // return to editing state..\n       \n     \n\n\n     \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}",
39             "|void:hideProjectEdit": " () {\n    // return to editing state..\n       \n      _this.projectbutton.el.show();\n     _this.projecteditbutton.el.show();\n     \n     \n    //this.rooview.el.hide();\n     //this.edit_project.el.show();\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",
40             "|void:hideViewEditing": "  ( )   {\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      _this.projecteditbutton.el.hide();\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\n    _this.left_projects.selectProject(_this.project);\n    //_this.clutterfiles.loadProject(_this.project);\n\n    el.restore_easing_state();\n        \n    print(\"show view browsing\");\n}",
41             "|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.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    });\n     \n    \n\n    // left properties\n\n    this.left_props =new Xcls_LeftProps();\n    this.left_props.ref();\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(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           } else {\n              this.window_gladeview.loadFile(this.left_tree.getActiveFile());\n          }\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    ((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        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 Xcls_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    \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_GladeView();\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        if (file.xtype == \"Roo\" ) { \n            ctr.foreach( (w) => { ctr.remove(w); });\n            ctr.add(this.window_rooview.el);\n            this.window_rooview.loadFile(file);\n            \n            this.window_rooview.el.show_all();\n        } else {\n            ctr.foreach( (w) => { ctr.remove(w); });\n            ctr.add(this.window_gladeview.el);\n            this.window_gladeview.loadFile(file);\n            this.window_gladeview.el.show_all();\n        }\n        print(\"OPEN : \" + file.name);\n\n    });\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",
42             "|void:setTitle": " (string str) {\n    this.el.set_title(this.title + \" - \" + str);\n}\n",
43             "|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}",
44             "|void:showAddListener": "() {\n\n     \n     \n    var ae =      this.left_tree.getActiveElement();\n    if (ae == null) {\n        return;\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    \n    el.set_scale(0.5f,0.5f);\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}",
45             "|void:showAddProp": "() {\n\n     \n     var ae =      this.left_tree.getActiveElement();\n    if (ae == null) {\n        return;\n    }\n     \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   \n    \n    el.set_scale(0.5f,0.5f);\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}",
46             "|void:showCodeEdit": "(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 \n     \n     \n    //this.rooview.el.hide();\n    this.code_editor.el.show_all();\n    this.code_editor.show(\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   \n    \n    el.set_scale(0.5f,0.5f);\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",
47             "|void:showObject": "() {\n\n     \n    // what's the active node on the left hand side..\n    \n    var n = _this.left_tree.getActiveElement();\n    if (n == null) {\n        return;\n    }\n    \n     \n     \n     \n    //this.rooview.el.hide();\n    this.rightpalete.el.show_all();\n    this.rightpalete.load(_this.left_tree.getActiveFile().palete(), 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    \n    el.set_scale(0.5f,0.5f);\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}",
48             "|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     \n     \n    //this.rooview.el.hide();\n    this.projectsettings.el.show_all();\n    this.projectsettings.show(this.project);\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",
49             "|void:showViewEditing": "  ( )  {\n     this.editpane.el.show();\n  //   this.rooview.el.show();\n     this.left_projects.el.hide();\n    \n       _this.projecteditbutton.el.show();\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}",
50             "|xns": "Gtk",
51             "items": [
52                 {
53                     "|homogeneous": "false",
54                     "id": "vbox",
55                     "pack": "add",
56                     "xtype": "VBox",
57                     "|xns": "Gtk",
58                     "items": [
59                         {
60                             "|homogeneous": "true",
61                             "id": "topbar",
62                             "pack": "pack_start,false,true,0",
63                             "xtype": "HBox",
64                             "|height_request": 20,
65                             "|vexpand": "false  ",
66                             "|xns": "Gtk"
67                         },
68                         {
69                             ".int:lastWidth": 0,
70                             "id": "mainpane",
71                             "pack": "pack_end,true,true,0",
72                             "position": 400,
73                             "xtype": "HPaned",
74                             "|xns": "Gtk",
75                             "items": [
76                                 {
77                                     "id": "leftpane",
78                                     "pack": "add1",
79                                     "xtype": "VBox",
80                                     "|xns": "Gtk",
81                                     "items": [
82                                         {
83                                             "id": "editpane",
84                                             "pack": "pack_start,false,true,0",
85                                             "xtype": "VPaned",
86                                             "|xns": "Gtk",
87                                             "items": [
88                                                 {
89                                                     "id": "tree",
90                                                     "pack": "add1",
91                                                     "xtype": "VBox",
92                                                     "|xns": "Gtk"
93                                                 },
94                                                 {
95                                                     "id": "props",
96                                                     "pack": "add2",
97                                                     "xtype": "VBox",
98                                                     "|xns": "Gtk"
99                                                 }
100                                             ]
101                                         }
102                                     ]
103                                 },
104                                 {
105                                     "pack": "add2",
106                                     "xtype": "VBox",
107                                     "|xns": "Gtk",
108                                     "items": [
109                                         {
110                                             "listeners": {
111                                                 "size_allocate": "  (  alloc) => {\n    if (!_this.children_loaded) {  return; }\n    //print(\"size_allocation %d,%d\\n\".printf(alloc.width, alloc.height));\n\n/*    _this.rooview.el.set_size(this.el.get_stage().width-50,\n            this.el.get_stage().height);\n    _this.clutterfiles.set_size(this.el.get_stage().width-50,\n           this.el.get_stage().height);\n*/\n   // this.el.set_size_request(alloc.width,alloc.height);\n   // this.el.get_stage().set_size(alloc.width,alloc.height);\n    _this.rooview.el.set_size(alloc.width-50,\n            alloc.height);\n            \n             \n            \n    _this.clutterfiles.set_size(alloc.width-50,\n           alloc.height);\n    _this.projecteditview.el.set_size(alloc.width-50,\n           alloc.height / 2.0f);\n           \n    _this.objectview.el.set_size((alloc.width -50)/2.0f,\n           alloc.height);\n           \n    _this.addpropsview.el.set_size((alloc.width -50)/2.0f,\n           alloc.height);\n    \n    _this.codeeditview.el.set_size((alloc.width -50)/2.0f,\n           alloc.height);\n}"
112                                             },
113                                             "id": "clutterembed",
114                                             "pack": "pack_start,true,true,0",
115                                             "xtype": "Embed",
116                                             "|init": "    var stage = this.el.get_stage();\n    stage.set_background_color(  Clutter.Color.from_string(\"#000\"));\n    \n    \n",
117                                             "|xns": "GtkClutter",
118                                             "items": [
119                                                 {
120                                                     "id": "rooview",
121                                                     "pack": "get_stage().add_child",
122                                                     "xtype": "Actor",
123                                                     "|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}",
124                                                     "|xns": "GtkClutter"
125                                                 },
126                                                 {
127                                                     "id": "objectview",
128                                                     "pack": "get_stage().add_child",
129                                                     "xtype": "Actor",
130                                                     "|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}",
131                                                     "|xns": "GtkClutter"
132                                                 },
133                                                 {
134                                                     "id": "codeeditview",
135                                                     "pack": "get_stage().add_child",
136                                                     "xtype": "Actor",
137                                                     "|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}",
138                                                     "|xns": "GtkClutter"
139                                                 },
140                                                 {
141                                                     "id": "addpropsview",
142                                                     "pack": "get_stage().add_child",
143                                                     "xtype": "Actor",
144                                                     "|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}",
145                                                     "|xns": "GtkClutter"
146                                                 },
147                                                 {
148                                                     "id": "projecteditview",
149                                                     "pack": "get_stage().add_child",
150                                                     "xtype": "Actor",
151                                                     "|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}",
152                                                     "|xns": "GtkClutter"
153                                                 },
154                                                 {
155                                                     "id": "buttonlayout",
156                                                     "pack": "get_stage().add_child",
157                                                     "xtype": "Actor",
158                                                     "|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}",
159                                                     "|xns": "Clutter",
160                                                     "items": [
161                                                         {
162                                                             "|orientation": "Clutter.Orientation.VERTICAL",
163                                                             "*prop": "layout_manager",
164                                                             "xtype": "BoxLayout",
165                                                             "|xns": "Clutter"
166                                                         },
167                                                         {
168                                                             "listeners": {
169                                                                 "enter_event": "(  event)  => {\n    this.el.background_color = new Clutter.Color.from_string(\"#333\");\n        return false;\n}",
170                                                                 "leave_event": "(  event)  => {\n    this.el.background_color = new Clutter.Color.from_string(\"#000\");\n    return false;\n}",
171                                                                 "button_press_event": "  ( ) => {\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 false;    \n\n}"
172                                                             },
173                                                             "id": "projectbutton",
174                                                             "pack": "add_child",
175                                                             "xtype": "Actor",
176                                                             "|init": "this.el.set_size(50,50);",
177                                                             "|reactive": "true",
178                                                             "|xns": "Clutter",
179                                                             "items": [
180                                                                 {
181                                                                     ".ctor": "new Clutter.Text.full(\"Sans 10px\",\"Open\\nFiles\",new Clutter.Color.from_string(\"#fff\"))",
182                                                                     "pack": "add_child",
183                                                                     "xtype": "Text",
184                                                                     "|line_alignment": "Pango.Alignment.CENTER",
185                                                                     "|x_align": "Clutter.ActorAlign.CENTER",
186                                                                     "|x_expand": "false",
187                                                                     "|xns": "Clutter",
188                                                                     "|y_align": "Clutter.ActorAlign.CENTER",
189                                                                     "|y_expand": "false"
190                                                                 }
191                                                             ]
192                                                         },
193                                                         {
194                                                             "listeners": {
195                                                                 "enter_event": "(  event)  => {\n    this.el.background_color = new Clutter.Color.from_string(\"#333\");\n        return false;\n}",
196                                                                 "leave_event": "(  event)  => {\n    this.el.background_color = new Clutter.Color.from_string(\"#000\");\n    return false;\n}",
197                                                                 "button_press_event": "  ( ) => {\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 false;    \n\n\n}"
198                                                             },
199                                                             "id": "projecteditbutton",
200                                                             "pack": "add_child",
201                                                             "xtype": "Actor",
202                                                             "|init": "this.el.set_size(50,50);",
203                                                             "|reactive": "true",
204                                                             "|xns": "Clutter",
205                                                             "items": [
206                                                                 {
207                                                                     ".ctor": "new Clutter.Text.full(\"Sans 10px\",\"Edit\\nProject\\nDetails\",new Clutter.Color.from_string(\"#fff\"))",
208                                                                     "|line_alignment": "Pango.Alignment.CENTER",
209                                                                     "pack": "add_child",
210                                                                     "xtype": "Text",
211                                                                     "|x_align": "Clutter.ActorAlign.CENTER",
212                                                                     "|x_expand": "false",
213                                                                     "|xns": "Clutter",
214                                                                     "|y_align": "Clutter.ActorAlign.CENTER",
215                                                                     "|y_expand": "false"
216                                                                 }
217                                                             ]
218                                                         },
219                                                         {
220                                                             "listeners": {
221                                                                 "enter_event": "(  event)  => {\n    this.el.background_color = new Clutter.Color.from_string(\"#333\");\n        return false;\n}",
222                                                                 "leave_event": "(  event)  => {\n    this.el.background_color = new Clutter.Color.from_string(\"#000\");\n    return false;\n}",
223                                                                 "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}"
224                                                             },
225                                                             "id": "objectshowbutton",
226                                                             "pack": "add_child",
227                                                             "xtype": "Actor",
228                                                             "|init": "this.el.set_size(50,50);",
229                                                             "|reactive": "true",
230                                                             "|xns": "Clutter",
231                                                             "items": [
232                                                                 {
233                                                                     ".ctor": "new Clutter.Text.full(\"Sans 10px\",\"Show\\nPalate\",new Clutter.Color.from_string(\"#fff\"))",
234                                                                     "pack": "add_child",
235                                                                     "xtype": "Text",
236                                                                     "|line_alignment": "Pango.Alignment.CENTER",
237                                                                     "|x_align": "Clutter.ActorAlign.CENTER",
238                                                                     "|x_expand": "false",
239                                                                     "|xns": "Clutter",
240                                                                     "|y_align": "Clutter.ActorAlign.CENTER",
241                                                                     "|y_expand": "false"
242                                                                 }
243                                                             ]
244                                                         },
245                                                         {
246                                                             "listeners": {
247                                                                 "enter_event": "(  event)  => {\n    this.el.background_color = new Clutter.Color.from_string(\"#333\");\n        return false;\n}",
248                                                                 "leave_event": "(  event)  => {\n    this.el.background_color = new Clutter.Color.from_string(\"#000\");\n    return false;\n}",
249                                                                 "button_press_event": "  ( ) => {\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 false;    \n\n\n}"
250                                                             },
251                                                             "id": "addpropbutton",
252                                                             "pack": "add_child",
253                                                             "xtype": "Actor",
254                                                             "|init": "this.el.set_size(50,50);",
255                                                             "|reactive": "true",
256                                                             "|xns": "Clutter",
257                                                             "items": [
258                                                                 {
259                                                                     ".ctor": "new Clutter.Text.full(\"Sans 10px\",\"Add\\nProperty\",new Clutter.Color.from_string(\"#fff\"))",
260                                                                     "pack": "add_child",
261                                                                     "xtype": "Text",
262                                                                     "|line_alignment": "Pango.Alignment.CENTER",
263                                                                     "|x_align": "Clutter.ActorAlign.CENTER",
264                                                                     "|x_expand": "false",
265                                                                     "|xns": "Clutter",
266                                                                     "|y_align": "Clutter.ActorAlign.CENTER",
267                                                                     "|y_expand": "false"
268                                                                 }
269                                                             ]
270                                                         },
271                                                         {
272                                                             "listeners": {
273                                                                 "enter_event": "(  event)  => {\n    this.el.background_color = new Clutter.Color.from_string(\"#333\");\n        return false;\n}",
274                                                                 "leave_event": "(  event)  => {\n    this.el.background_color = new Clutter.Color.from_string(\"#000\");\n    return false;\n}",
275                                                                 "button_press_event": "  ( ) => {\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 false;    \n\n\n}"
276                                                             },
277                                                             "id": "addlistenerbutton",
278                                                             "pack": "add_child",
279                                                             "xtype": "Actor",
280                                                             "|init": "this.el.set_size(50,50);",
281                                                             "|reactive": "true",
282                                                             "|xns": "Clutter",
283                                                             "items": [
284                                                                 {
285                                                                     ".ctor": "new Clutter.Text.full(\"Sans 10px\",\"Add\\nListener\",new Clutter.Color.from_string(\"#fff\"))",
286                                                                     "pack": "add_child",
287                                                                     "xtype": "Text",
288                                                                     "|line_alignment": "Pango.Alignment.CENTER",
289                                                                     "|x_align": "Clutter.ActorAlign.CENTER",
290                                                                     "|x_expand": "false",
291                                                                     "|xns": "Clutter",
292                                                                     "|y_align": "Clutter.ActorAlign.CENTER",
293                                                                     "|y_expand": "false"
294                                                                 }
295                                                             ]
296                                                         }
297                                                     ]
298                                                 }
299                                             ]
300                                         }
301                                     ]
302                                 }
303                             ]
304                         }
305                     ]
306                 }
307             ]
308         }
309     ],
310     "permname": "",
311     "modOrder": ""
312 }