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