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