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