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