5 "path" : "/home/alan/gitlive/app.Builder.js/src/Builder4/MainWindow.bjs",
8 "build_module" : "builder",
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}"
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\"",
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",
26 "| void show" : "() {\n \n this.el.show_all();\n\n}",
27 "# WindowState windowstate" : "null",
29 "$ type" : "Gtk.WindowType.TOPLEVEL",
30 "| void setTitle" : " (string str) {\n this.headerbar.el.set_title(this.title + \" - \" + str);\n} \n",
34 "* pack" : "set_titlebar",
35 "xtype" : "HeaderBar",
36 "bool show_close_button" : true,
38 "string title" : "Application Builder",
41 "* pack" : "pack_start",
44 "Gtk.Orientation orientation" : "Gtk.Orientation.HORIZONTAL",
47 "bool use_popover" : false,
49 "xtype" : "MenuButton",
54 "* init" : "{\n this.el.show_all();\n}\n",
56 "* pack" : "set_popup",
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}"
64 "string label" : "Open a new Window",
70 "xtype" : "SeparatorMenuItem",
75 "activate" : " ( ) => {\n Resources.singleton().fetchStart();\n}"
79 "string label" : "Download updated Resources",
84 "activate" : "() => {\n About.singleton().el.show();\n }"
86 "string label" : "About the Builder",
95 "utf8 icon_name" : "help-about",
96 "* pack" : "set_image",
110 "Gtk.Orientation orientation" : "Gtk.Orientation.VERTICAL",
111 "$ homogeneous" : false,
116 "* pack" : "pack_start,true,true,0",
117 "# int lastWidth" : 0,
120 "Gtk.Orientation orientation" : "Gtk.Orientation.HORIZONTAL",
127 "Gtk.Orientation orientation" : "Gtk.Orientation.VERTICAL",
131 "* pack" : "pack_start,true,true,0",
134 "Gtk.Orientation orientation" : "Gtk.Orientation.VERTICAL",
141 "Gtk.Orientation orientation" : "Gtk.Orientation.VERTICAL"
148 "Gtk.Orientation orientation" : "Gtk.Orientation.VERTICAL"
158 "Gtk.Orientation orientation" : "Gtk.Orientation.VERTICAL",
162 "size_allocate" : " ( alloc) => {\n if (_this.windowstate == null) {\n return;\n }\n _this.windowstate.resizeCanvas(); \n \n}"
164 "id" : "clutterembed",
165 "* init" : " var stage = this.el.get_stage();\n stage.set_background_color( Clutter.Color.from_string(\"#000\"));\n \n \n",
167 "* pack" : "pack_start,true,true,0",
168 "$ xns" : "GtkClutter",
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}",
174 "* pack" : "get_stage().add_child",
175 "$ xns" : "GtkClutter"
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}",
181 "* pack" : "get_stage().add_child",
182 "$ xns" : "GtkClutter"
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}",
188 "* pack" : "get_stage().add_child",
189 "$ xns" : "GtkClutter"
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}",
195 "* pack" : "get_stage().add_child",
196 "$ xns" : "GtkClutter"
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}",
202 "* pack" : "get_stage().add_child",
203 "$ xns" : "GtkClutter"
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}",
209 "* pack" : "get_stage().add_child",
213 "$ orientation" : "Clutter.Orientation.VERTICAL",
214 "xtype" : "BoxLayout",
216 "* prop" : "layout_manager"
220 "* init" : "this.el.set_size(50,50);",
222 "* pack" : "add_child",
226 "* init" : "((Gtk.Container)(this.el.get_widget())).add ( child_0.el);",
227 "* pack" : "add_child",
229 "$ xns" : "GtkClutter",
233 "clicked" : " ( ) => {\n \n _this.windowstate.switchState(WindowState.State.PREVIEW);\n \n\n}"
235 "utf8 tooltip_text" : "Back",
238 "width_request" : 50,
240 "height_request" : 50,
243 "* pack" : "set_image",
245 "utf8 icon_name" : "go-previous",
255 "id" : "projectbutton",
256 "* init" : "this.el.set_size(50,50);",
258 "* pack" : "add_child",
262 "* init" : "((Gtk.Container)(this.el.get_widget())).add ( child_0.el);",
264 "* pack" : "add_child",
265 "$ xns" : "GtkClutter",
269 "clicked" : " ( ) => {\n _this.windowstate.switchState(WindowState.State.FILES);\n \n\n}"
273 "width_request" : 50,
275 "height_request" : 50,
276 "$ tooltop_text" : "\"Open File\"",
279 "utf8 icon_name" : "document-open",
280 "* pack" : "set_image",
291 "id" : "editfilebutton",
292 "* init" : "this.el.set_size(50.0f,50.0f);",
294 "* pack" : "add_child",
298 "* init" : "((Gtk.Container)(this.el.get_widget())).add ( child_0.el);",
300 "* pack" : "add_child",
301 "$ xns" : "GtkClutter",
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}"
309 "width_request" : 50,
311 "$ tooltip_text" : "\"File Details\"",
312 "height_request" : 50,
316 "utf8 icon_name" : "document-properties",
317 "* pack" : "set_image",
327 "id" : "projecteditbutton",
328 "* init" : "this.el.set_size(50,50);",
330 "* pack" : "add_child",
334 "* init" : "((Gtk.Container)(this.el.get_widget())).add ( child_0.el);",
336 "* pack" : "add_child",
337 "$ xns" : "GtkClutter",
341 "clicked" : " ( ) => {\n _this.windowstate.switchState(WindowState.State.PROJECT);\n \n\n\n}"
345 "width_request" : 50,
347 "$ tooltip_text" : "\"Project Details\"",
348 "height_request" : 50,
351 "* pack" : "set_image",
353 "utf8 icon_name" : "emblem-system",
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}"
367 "id" : "objectshowbutton",
368 "* init" : "this.el.set_size(50,50);",
370 "* pack" : "add_child",
374 "* init" : "((Gtk.Container)(this.el.get_widget())).add ( child_0.el);",
376 "* pack" : "add_child",
377 "$ xns" : "GtkClutter",
381 "clicked" : " ( ) => {\n \n _this.windowstate.switchState(WindowState.State.OBJECT);\n \n \n}"
385 "width_request" : 50,
387 "$ tooltip_text" : "\"Add Child Element\"",
388 "height_request" : 50,
391 "utf8 icon_name" : "list-add",
392 "* pack" : "set_image",
403 "id" : "addpropbutton",
404 "* init" : "this.el.set_size(50,50);",
406 "* pack" : "add_child",
410 "* init" : "((Gtk.Container)(this.el.get_widget())).add ( child_0.el);",
412 "* pack" : "add_child",
413 "$ xns" : "GtkClutter",
417 "clicked" : " ( ) => {\n \n _this.windowstate.switchState(WindowState.State.PROP);\n \n\n}"
421 "width_request" : 50,
423 "$ tooltip_text" : "\"Add Property\"",
424 "height_request" : 50,
428 "utf8 icon_name" : "format-justify-left",
429 "* pack" : "set_image",
439 "id" : "addlistenerbutton",
440 "* init" : "this.el.set_size(50,50);",
442 "* pack" : "add_child",
446 "* init" : "((Gtk.Container)(this.el.get_widget())).add ( child_0.el);",
448 "* pack" : "add_child",
449 "$ xns" : "GtkClutter",
453 "clicked" : " ( ) => {\n \n _this.windowstate.switchState(WindowState.State.LISTENER);\n \n\n\n}"
457 "width_request" : 50,
459 "$ tooltip_text" : "\"Add Event Code\"",
460 "height_request" : 50,
463 "* pack" : "set_image",
465 "utf8 icon_name" : "appointment-new",
475 "id" : "addprojectbutton",
476 "* init" : "this.el.set_size(50.0f,50.0f);",
478 "* pack" : "add_child",
482 "* init" : "((Gtk.Container)(this.el.get_widget())).add ( child_0.el);",
484 "* pack" : "add_child",
485 "$ xns" : "GtkClutter",
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}"
493 "width_request" : 50,
495 "$ tooltip_text" : "\"New\\nProj.\"",
496 "height_request" : 50,
500 "utf8 icon_name" : "folder-new",
501 "* pack" : "set_image",
511 "id" : "addfilebutton",
512 "* init" : "this.el.set_size(50.0f,50.0f);",
514 "* pack" : "add_child",
518 "* init" : "((Gtk.Container)(this.el.get_widget())).add ( child_0.el);",
520 "* pack" : "add_child",
521 "$ xns" : "GtkClutter",
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}"
529 "width_request" : 50,
531 "$ tooltip_text" : "\"Add File\"",
532 "height_request" : 50,
535 "utf8 icon_name" : "document-new",
536 "* pack" : "set_image",
547 "id" : "delprojectbutton",
548 "* init" : "this.el.set_size(50,50);",
550 "* pack" : "add_child",
554 "* init" : "((Gtk.Container)(this.el.get_widget())).add ( child_0.el);",
556 "* pack" : "add_child",
557 "$ xns" : "GtkClutter",
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}"
565 "width_request" : 50,
567 "$ tooltip_text" : "\"Delete Project\"",
568 "height_request" : 50,
572 "utf8 icon_name" : "user-trash",
573 "* pack" : "set_image",
591 "bool homogeneous" : false,
592 "* pack" : "pack_end,false,true,0",
595 "Gtk.Orientation orientation" : "Gtk.Orientation.HORIZONTAL",
598 "string label" : " ",
599 "* pack" : "pack_start,true,true,0",
604 "bool show_text" : true,
605 "ulong handler_id" : "-1",
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",
613 "id" : "search_entry",
614 "* init" : "var description = Pango.FontDescription.from_string(\"monospace\");\n\tdescription.set_size(8000);\n\t this.el.override_font(description);\n\n",
615 "* pack" : "pack_start,false,true,0",
620 "* pack" : "pack_end,false,true,0",
626 "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}"
628 "bool always_show_image" : true,
629 "id" : "search_results",
630 "Xcls_ValaCompileErrors popup" : "",
631 "string label" : "Matches",
633 "xtype" : "ImageMenuItem",
637 "utf8 icon_name" : "system-search",
638 "* pack" : "set_image",
640 "bool sensitive" : false,
647 "xtype" : "MenuItem",
648 "string label" : "Compile Status:",
653 "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}"
655 "bool always_show_image" : true,
656 "id" : "statusbar_errors",
657 "| 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",
658 "Xcls_ValaCompileErrors popup" : "",
659 "string label" : "Errors",
661 "xtype" : "ImageMenuItem",
662 "# Json.Object notices" : "new Json.Object() ",
666 "* pack" : "set_image",
668 "utf8 icon_name" : "dialog-error",
675 "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}"
677 "bool always_show_image" : true,
678 "id" : "statusbar_warnings",
679 "| 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",
680 "Xcls_ValaCompileErrors popup" : "",
682 "string label" : "Warnings",
683 "xtype" : "ImageMenuItem",
684 "# Json.Object notices" : "new Json.Object()",
688 "utf8 icon_name" : "dialog-warning",
689 "* pack" : "set_image",
697 "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}"
699 "bool always_show_image" : true,
700 "id" : "statusbar_depricated",
701 "| 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",
702 "Xcls_ValaCompileErrors popup" : "",
703 "string label" : "Depricated",
705 "xtype" : "ImageMenuItem",
706 "# Json.Object notices" : "new Json.Object()",
711 "utf8 icon_name" : "dialog-information",
712 "* pack" : "set_image",
719 "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}"
721 "bool always_show_image" : true,
722 "id" : "statusbar_run",
723 "Xcls_ValaCompileErrors popup" : "",
724 "string label" : "Run",
726 "xtype" : "ImageMenuItem",
730 "utf8 icon_name" : "media-playback-start",
731 "* pack" : "set_image",