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