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