src/Builder4/MainWindow.bjs
[app.Builder.js] / src / Builder4 / MainWindow.bjs
1 {
2  "name" : "MainWindow",
3  "parent" : "",
4  "title" : "",
5  "path" : "/home/alan/gitlive/app.Builder.js/src/Builder4/MainWindow.bjs",
6  "permname" : "",
7  "modOrder" : "",
8  "build_module" : "builder",
9  "items" : [
10   {
11    "listeners" : {
12     "delete_event" : "  (   event) => {\n    return false;\n}",
13     "destroy" : "() =>  {\n Xcls_MainWindow.singleton().no_windows--;\n \n if (Xcls_MainWindow.singleton().no_windows < 1) {\n\n     Gtk.main_quit();\n }\n}",
14     "show" : "  ( ) => {\n    // hide the file editing..\n   \n    //this.hideViewEditing();\n    _this.statusbar.el.hide();\n    Resources.singleton().checkResources();\n\n}"
15    },
16    "id" : "MainWindow",
17    "default_width" : 800,
18    "* init" : " \n\t  \n    //this.el.show_all();\n    \n    ",
19    "# Project.Project project" : "null",
20    "# string title" : "\"Application Builder\"",
21    "xtype" : "Window",
22    "# int no_windows" : 1,
23    "default_height" : 500,
24    "|        void initChildren" : " () {\n    // this needs putting in a better place..\n    this.windowstate = new WindowState(this);\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    \n\n\n\n}\n",
25    "$ xns" : "Gtk",
26    "|             void show" : "() {\n   \n    this.el.show_all();\n\n}",
27    "# WindowState windowstate" : "null",
28    "border_width" : 0,
29    "$ type" : "Gtk.WindowType.TOPLEVEL",
30    "|             void setTitle" : " (string str) {\n    this.headerbar.el.set_title(this.title + \" - \" + str);\n} \n",
31    "items" : [
32     {
33      "id" : "headerbar",
34      "xtype" : "HeaderBar",
35      "* pack" : "set_titlebar",
36      "bool show_close_button" : true,
37      "$ xns" : "Gtk",
38      "string title" : "Application Builder",
39      "items" : [
40       {
41        "* pack" : "pack_start",
42        "xtype" : "HBox",
43        "$ xns" : "Gtk",
44        "items" : [
45         {
46          "bool use_popover" : false,
47          "xtype" : "MenuButton",
48          "* pack" : "add",
49          "$ xns" : "Gtk",
50          "items" : [
51           {
52            "id" : "topbarmenu",
53            "* init" : "{\n    this.el.show_all();\n}\n",
54            "xtype" : "Menu",
55            "* pack" : "set_popup",
56            "$ xns" : "Gtk",
57            "items" : [
58             {
59              "listeners" : {
60               "activate" : "() => {\n    About.singleton().el.show();\n    }"
61              },
62              "string label" : "About the Builder",
63              "* pack" : "append",
64              "xtype" : "MenuItem",
65              "$ xns" : "Gtk"
66             }
67            ]
68           },
69           {
70            "* pack" : "set_image",
71            "xtype" : "Image",
72            "utf8 icon_name" : "help-about",
73            "$ xns" : "Gtk"
74           }
75          ]
76         }
77        ]
78       }
79      ]
80     },
81     {
82      "id" : "vbox",
83      "* pack" : "add",
84      "xtype" : "VBox",
85      "$ xns" : "Gtk",
86      "$ homogeneous" : false,
87      "items" : [
88       {
89        "id" : "mainpane",
90        "position" : 400,
91        "* pack" : "pack_start,true,true,0",
92        "# int lastWidth" : 0,
93        "xtype" : "HPaned",
94        "$ xns" : "Gtk",
95        "items" : [
96         {
97          "id" : "leftpane",
98          "xtype" : "VBox",
99          "* pack" : "add1",
100          "$ xns" : "Gtk",
101          "items" : [
102           {
103            "id" : "editpane",
104            "xtype" : "VPaned",
105            "* pack" : "pack_start,false,true,0",
106            "$ xns" : "Gtk",
107            "items" : [
108             {
109              "id" : "tree",
110              "xtype" : "VBox",
111              "* pack" : "add1",
112              "$ xns" : "Gtk"
113             },
114             {
115              "id" : "props",
116              "xtype" : "VBox",
117              "* pack" : "add2",
118              "$ xns" : "Gtk"
119             }
120            ]
121           }
122          ]
123         },
124         {
125          "* pack" : "add2",
126          "xtype" : "VBox",
127          "$ xns" : "Gtk",
128          "items" : [
129           {
130            "listeners" : {
131             "size_allocate" : "  (  alloc) => {\n    if (_this.windowstate == null) {\n        return;\n    }\n    _this.windowstate.resizeCanvas(); \n        \n}"
132            },
133            "id" : "clutterembed",
134            "* init" : "    var stage = this.el.get_stage();\n    stage.set_background_color(  Clutter.Color.from_string(\"#000\"));\n    \n    \n",
135            "xtype" : "Embed",
136            "* pack" : "pack_start,true,true,0",
137            "$ xns" : "GtkClutter",
138            "items" : [
139             {
140              "id" : "rooview",
141              "* 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}",
142              "xtype" : "Actor",
143              "* pack" : "get_stage().add_child",
144              "$ xns" : "GtkClutter"
145             },
146             {
147              "id" : "objectview",
148              "* 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}",
149              "xtype" : "Actor",
150              "* pack" : "get_stage().add_child",
151              "$ xns" : "GtkClutter"
152             },
153             {
154              "id" : "codeeditview",
155              "* 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}",
156              "xtype" : "Actor",
157              "* pack" : "get_stage().add_child",
158              "$ xns" : "GtkClutter"
159             },
160             {
161              "id" : "addpropsview",
162              "* 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}",
163              "xtype" : "Actor",
164              "* pack" : "get_stage().add_child",
165              "$ xns" : "GtkClutter"
166             },
167             {
168              "id" : "projecteditview",
169              "* 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}",
170              "xtype" : "Actor",
171              "* pack" : "get_stage().add_child",
172              "$ xns" : "GtkClutter"
173             },
174             {
175              "id" : "buttonlayout",
176              "* 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}",
177              "xtype" : "Actor",
178              "* pack" : "get_stage().add_child",
179              "$ xns" : "Clutter",
180              "items" : [
181               {
182                "$ orientation" : "Clutter.Orientation.VERTICAL",
183                "xtype" : "BoxLayout",
184                "$ xns" : "Clutter",
185                "* prop" : "layout_manager"
186               },
187               {
188                "id" : "backbutton",
189                "* init" : "this.el.set_size(50,50);",
190                "xtype" : "Actor",
191                "* pack" : "add_child",
192                "$ xns" : "Clutter",
193                "items" : [
194                 {
195                  "* init" : "((Gtk.Container)(this.el.get_widget())).add ( child_0.el);",
196                  "xtype" : "Actor",
197                  "* pack" : "add_child",
198                  "$ xns" : "GtkClutter",
199                  "items" : [
200                   {
201                    "listeners" : {
202                     "clicked" : "  ( ) => {\n  \n    _this.windowstate.switchState(WindowState.State.PREVIEW);\n    \n\n}"
203                    },
204                    "utf8 tooltip_text" : "Back",
205                    "* pack" : false,
206                    "xtype" : "Button",
207                    "width_request" : 50,
208                    "$ xns" : "Gtk",
209                    "height_request" : 50,
210                    "items" : [
211                     {
212                      "utf8 icon_name" : "go-previous",
213                      "* pack" : "set_image",
214                      "xtype" : "Image",
215                      "$ xns" : "Gtk"
216                     }
217                    ]
218                   }
219                  ]
220                 }
221                ]
222               },
223               {
224                "id" : "projectbutton",
225                "* init" : "this.el.set_size(50,50);",
226                "xtype" : "Actor",
227                "* pack" : "add_child",
228                "$ xns" : "Clutter",
229                "items" : [
230                 {
231                  "* init" : "((Gtk.Container)(this.el.get_widget())).add ( child_0.el);",
232                  "* pack" : "add_child",
233                  "xtype" : "Actor",
234                  "$ xns" : "GtkClutter",
235                  "items" : [
236                   {
237                    "listeners" : {
238                     "clicked" : "  ( ) => {\n   _this.windowstate.switchState(WindowState.State.FILES);\n      \n\n}"
239                    },
240                    "* pack" : false,
241                    "xtype" : "Button",
242                    "width_request" : 50,
243                    "$ xns" : "Gtk",
244                    "height_request" : 50,
245                    "$ tooltop_text" : "\"Open File\"",
246                    "items" : [
247                     {
248                      "xtype" : "Image",
249                      "utf8 icon_name" : "document-open",
250                      "* pack" : "set_image",
251                      "$ xns" : "Gtk"
252                     }
253                    ]
254                   }
255                  ]
256                 }
257                ]
258               },
259               {
260                "id" : "editfilebutton",
261                "* init" : "this.el.set_size(50.0f,50.0f);",
262                "xtype" : "Actor",
263                "* pack" : "add_child",
264                "$ xns" : "Clutter",
265                "items" : [
266                 {
267                  "* init" : "((Gtk.Container)(this.el.get_widget())).add ( child_0.el);",
268                  "* pack" : "add_child",
269                  "xtype" : "Actor",
270                  "$ xns" : "GtkClutter",
271                  "items" : [
272                   {
273                    "listeners" : {
274                     "clicked" : "  ( ) => {\n  \n    // create a new file in project..\n    if (_this.project == null || _this.windowstate.left_tree.model.file == null) {\n        return  ;\n    }\n     _this.windowstate.new_file_dialog.show(_this.windowstate.left_tree.model.file);\n     \n    return  ;    \n\n\n}"
275                    },
276                    "* pack" : false,
277                    "xtype" : "Button",
278                    "width_request" : 50,
279                    "$ xns" : "Gtk",
280                    "$ tooltip_text" : "\"File Details\"",
281                    "height_request" : 50,
282                    "items" : [
283                     {
284                      "* pack" : "set_image",
285                      "xtype" : "Image",
286                      "utf8 icon_name" : "document-properties",
287                      "$ xns" : "Gtk"
288                     }
289                    ]
290                   }
291                  ]
292                 }
293                ]
294               },
295               {
296                "id" : "projecteditbutton",
297                "* init" : "this.el.set_size(50,50);",
298                "xtype" : "Actor",
299                "* pack" : "add_child",
300                "$ xns" : "Clutter",
301                "items" : [
302                 {
303                  "* init" : "((Gtk.Container)(this.el.get_widget())).add ( child_0.el);",
304                  "* pack" : "add_child",
305                  "xtype" : "Actor",
306                  "$ xns" : "GtkClutter",
307                  "items" : [
308                   {
309                    "listeners" : {
310                     "clicked" : "  ( ) => {\n     _this.windowstate.switchState(WindowState.State.PROJECT);\n   \n\n\n}"
311                    },
312                    "* pack" : false,
313                    "xtype" : "Button",
314                    "width_request" : 50,
315                    "$ xns" : "Gtk",
316                    "$ tooltip_text" : "\"Project Details\"",
317                    "height_request" : 50,
318                    "items" : [
319                     {
320                      "utf8 icon_name" : "emblem-system",
321                      "* pack" : "set_image",
322                      "xtype" : "Image",
323                      "$ xns" : "Gtk"
324                     }
325                    ]
326                   }
327                  ]
328                 }
329                ]
330               },
331               {
332                "listeners" : {
333                 "enter_event" : "(  event)  => {\n    this.el.background_color = new Clutter.Color.from_string(\"#333\");\n        return false;\n}",
334                 "leave_event" : "(  event)  => {\n    this.el.background_color = new Clutter.Color.from_string(\"#000\");\n    return false;\n}"
335                },
336                "id" : "objectshowbutton",
337                "* init" : "this.el.set_size(50,50);",
338                "xtype" : "Actor",
339                "* pack" : "add_child",
340                "$ xns" : "Clutter",
341                "items" : [
342                 {
343                  "* init" : "((Gtk.Container)(this.el.get_widget())).add ( child_0.el);",
344                  "* pack" : "add_child",
345                  "xtype" : "Actor",
346                  "$ xns" : "GtkClutter",
347                  "items" : [
348                   {
349                    "listeners" : {
350                     "clicked" : "  ( ) => {\n    \n     _this.windowstate.switchState(WindowState.State.OBJECT);\n  \n \n}"
351                    },
352                    "* pack" : false,
353                    "xtype" : "Button",
354                    "width_request" : 50,
355                    "$ xns" : "Gtk",
356                    "$ tooltip_text" : "\"Add Child Element\"",
357                    "height_request" : 50,
358                    "items" : [
359                     {
360                      "xtype" : "Image",
361                      "utf8 icon_name" : "list-add",
362                      "* pack" : "set_image",
363                      "$ xns" : "Gtk"
364                     }
365                    ]
366                   }
367                  ]
368                 }
369                ]
370               },
371               {
372                "id" : "addpropbutton",
373                "* init" : "this.el.set_size(50,50);",
374                "xtype" : "Actor",
375                "* pack" : "add_child",
376                "$ xns" : "Clutter",
377                "items" : [
378                 {
379                  "* init" : "((Gtk.Container)(this.el.get_widget())).add ( child_0.el);",
380                  "* pack" : "add_child",
381                  "xtype" : "Actor",
382                  "$ xns" : "GtkClutter",
383                  "items" : [
384                   {
385                    "listeners" : {
386                     "clicked" : "  ( ) => {\n    \n     _this.windowstate.switchState(WindowState.State.PROP);\n \n\n}"
387                    },
388                    "* pack" : false,
389                    "xtype" : "Button",
390                    "width_request" : 50,
391                    "$ xns" : "Gtk",
392                    "$ tooltip_text" : "\"Add Property\"",
393                    "height_request" : 50,
394                    "items" : [
395                     {
396                      "* pack" : "set_image",
397                      "xtype" : "Image",
398                      "utf8 icon_name" : "format-justify-left",
399                      "$ xns" : "Gtk"
400                     }
401                    ]
402                   }
403                  ]
404                 }
405                ]
406               },
407               {
408                "id" : "addlistenerbutton",
409                "* init" : "this.el.set_size(50,50);",
410                "xtype" : "Actor",
411                "* pack" : "add_child",
412                "$ xns" : "Clutter",
413                "items" : [
414                 {
415                  "* init" : "((Gtk.Container)(this.el.get_widget())).add ( child_0.el);",
416                  "* pack" : "add_child",
417                  "xtype" : "Actor",
418                  "$ xns" : "GtkClutter",
419                  "items" : [
420                   {
421                    "listeners" : {
422                     "clicked" : "  ( ) => {\n    \n    _this.windowstate.switchState(WindowState.State.LISTENER);\n  \n\n\n}"
423                    },
424                    "* pack" : false,
425                    "xtype" : "Button",
426                    "width_request" : 50,
427                    "$ xns" : "Gtk",
428                    "$ tooltip_text" : "\"Add Event Code\"",
429                    "height_request" : 50,
430                    "items" : [
431                     {
432                      "utf8 icon_name" : "appointment-new",
433                      "* pack" : "set_image",
434                      "xtype" : "Image",
435                      "$ xns" : "Gtk"
436                     }
437                    ]
438                   }
439                  ]
440                 }
441                ]
442               },
443               {
444                "id" : "addprojectbutton",
445                "* init" : "this.el.set_size(50.0f,50.0f);",
446                "xtype" : "Actor",
447                "* pack" : "add_child",
448                "$ xns" : "Clutter",
449                "items" : [
450                 {
451                  "* init" : "((Gtk.Container)(this.el.get_widget())).add ( child_0.el);",
452                  "* pack" : "add_child",
453                  "xtype" : "Actor",
454                  "$ xns" : "GtkClutter",
455                  "items" : [
456                   {
457                    "listeners" : {
458                     "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    \n    \n    _this.windowstate.left_projects.is_loaded = false;    \n    _this.windowstate.left_projects.load();\n    _this.windowstate.left_projects.selectProject(p);\n    return  ;    \n\n\n}"
459                    },
460                    "* pack" : false,
461                    "xtype" : "Button",
462                    "width_request" : 50,
463                    "$ xns" : "Gtk",
464                    "$ tooltip_text" : "\"New\\nProj.\"",
465                    "height_request" : 50,
466                    "items" : [
467                     {
468                      "* pack" : "set_image",
469                      "xtype" : "Image",
470                      "utf8 icon_name" : "folder-new",
471                      "$ xns" : "Gtk"
472                     }
473                    ]
474                   }
475                  ]
476                 }
477                ]
478               },
479               {
480                "id" : "addfilebutton",
481                "* init" : "this.el.set_size(50.0f,50.0f);",
482                "xtype" : "Actor",
483                "* pack" : "add_child",
484                "$ xns" : "Clutter",
485                "items" : [
486                 {
487                  "* init" : "((Gtk.Container)(this.el.get_widget())).add ( child_0.el);",
488                  "* pack" : "add_child",
489                  "xtype" : "Actor",
490                  "$ xns" : "GtkClutter",
491                  "items" : [
492                   {
493                    "listeners" : {
494                     "clicked" : " () => {\n    // create a new file in project..\n    \n    // what's the currently selected project...\n    var proj = _this.windowstate.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.windowstate.new_file_dialog.show(f);\n    \n    return  ;    \n}"
495                    },
496                    "* pack" : false,
497                    "xtype" : "Button",
498                    "width_request" : 50,
499                    "$ xns" : "Gtk",
500                    "$ tooltip_text" : "\"Add File\"",
501                    "height_request" : 50,
502                    "items" : [
503                     {
504                      "xtype" : "Image",
505                      "utf8 icon_name" : "document-new",
506                      "* pack" : "set_image",
507                      "$ xns" : "Gtk"
508                     }
509                    ]
510                   }
511                  ]
512                 }
513                ]
514               },
515               {
516                "id" : "delprojectbutton",
517                "* init" : "this.el.set_size(50,50);",
518                "xtype" : "Actor",
519                "* pack" : "add_child",
520                "$ xns" : "Clutter",
521                "items" : [
522                 {
523                  "* init" : "((Gtk.Container)(this.el.get_widget())).add ( child_0.el);",
524                  "* pack" : "add_child",
525                  "xtype" : "Actor",
526                  "$ xns" : "GtkClutter",
527                  "items" : [
528                   {
529                    "listeners" : {
530                     "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.windowstate.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.windowstate.left_projects.is_loaded =  false;\n    _this.windowstate.left_projects.load();\n    _this.windowstate.clutterfiles.clearFiles();\n\n}"
531                    },
532                    "* pack" : false,
533                    "xtype" : "Button",
534                    "width_request" : 50,
535                    "$ xns" : "Gtk",
536                    "$ tooltip_text" : "\"Delete Project\"",
537                    "height_request" : 50,
538                    "items" : [
539                     {
540                      "* pack" : "set_image",
541                      "xtype" : "Image",
542                      "utf8 icon_name" : "user-trash",
543                      "$ xns" : "Gtk"
544                     }
545                    ]
546                   }
547                  ]
548                 }
549                ]
550               },
551               {
552                "id" : "reload_resources",
553                "* init" : "this.el.set_size(50,50);",
554                "xtype" : "Actor",
555                "* pack" : "add_child",
556                "$ xns" : "Clutter",
557                "items" : [
558                 {
559                  "* init" : "((Gtk.Container)(this.el.get_widget())).add ( child_0.el);",
560                  "xtype" : "Actor",
561                  "* pack" : "add_child",
562                  "$ xns" : "GtkClutter",
563                  "items" : [
564                   {
565                    "listeners" : {
566                     "clicked" : " ( ) => {\n         Resources.singleton().fetchStart();\n}"
567                    },
568                    "* pack" : false,
569                    "xtype" : "Button",
570                    "width_request" : 50,
571                    "$ xns" : "Gtk",
572                    "$ utf8 tooltip_text" : "\"Download latest resourse files\\nlike the object tree and object properties\"",
573                    "height_request" : 50,
574                    "items" : [
575                     {
576                      "utf8 icon_name" : "go-bottom",
577                      "* pack" : "set_image",
578                      "xtype" : "Image",
579                      "$ xns" : "Gtk"
580                     }
581                    ]
582                   }
583                  ]
584                 }
585                ]
586               },
587               {
588                "id" : "new_window",
589                "* init" : "this.el.set_size(50,50);",
590                "xtype" : "Actor",
591                "* pack" : "add_child",
592                "$ xns" : "Clutter",
593                "items" : [
594                 {
595                  "* init" : "((Gtk.Container)(this.el.get_widget())).add ( child_0.el);",
596                  "* pack" : "add_child",
597                  "xtype" : "Actor",
598                  "$ xns" : "GtkClutter",
599                  "items" : [
600                   {
601                    "listeners" : {
602                     "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.windowstate.switchState(WindowState.State.FILES);\n}"
603                    },
604                    "utf8 tooltip_text" : "Open New Window",
605                    "* pack" : false,
606                    "xtype" : "Button",
607                    "width_request" : 50,
608                    "$ xns" : "Gtk",
609                    "height_request" : 50,
610                    "items" : [
611                     {
612                      "* pack" : "set_image",
613                      "xtype" : "Image",
614                      "utf8 icon_name" : "window-new",
615                      "$ xns" : "Gtk"
616                     }
617                    ]
618                   }
619                  ]
620                 }
621                ]
622               },
623               {
624                "id" : "about",
625                "* init" : "this.el.set_size(50,50);",
626                "xtype" : "Actor",
627                "* pack" : "add_child",
628                "$ xns" : "Clutter",
629                "items" : [
630                 {
631                  "* init" : "((Gtk.Container)(this.el.get_widget())).add ( child_0.el);",
632                  "xtype" : "Actor",
633                  "* pack" : "add_child",
634                  "$ xns" : "GtkClutter",
635                  "items" : [
636                   {
637                    "listeners" : {
638                     "clicked" : "  ( ) => {\n         About.singleton().el.show();\n}"
639                    },
640                    "utf8 tooltip_text" : "About the builder",
641                    "xtype" : "Button",
642                    "* pack" : false,
643                    "width_request" : 50,
644                    "$ xns" : "Gtk",
645                    "height_request" : 50,
646                    "items" : [
647                     {
648                      "utf8 icon_name" : "help-about",
649                      "* pack" : "set_image",
650                      "xtype" : "Image",
651                      "$ xns" : "Gtk"
652                     }
653                    ]
654                   }
655                  ]
656                 }
657                ]
658               }
659              ]
660             }
661            ]
662           }
663          ]
664         }
665        ]
666       },
667       {
668        "id" : "statusbar",
669        "* init" : "{\n     Resources.singleton().updateProgress.connect((pos) => {\n        if (pos < 1) {\n            this.el.hide();\n            _this.mainpane.el.set_sensitive(true);\n            \n            return;\n        }\n         _this.mainpane.el.set_sensitive(false);\n           \n        this.el.show();\n        var cid = this.el.get_context_id(\"resources\");\n        this.el.remove_all(cid);\n        this.el.push(cid,\"Fetching Resource : %s/7\".printf(pos.to_string()));\n     });\n}\n",
670        "xtype" : "Statusbar",
671        "* pack" : "pack_end,false,true,0",
672        "$ xns" : "Gtk"
673       }
674      ]
675     }
676    ]
677   }
678  ]
679 }