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}",
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\t\n\t\treturn false;\n\t}\n\t\n // print(event.key.keyval)\n \n return false;\n\n} \n\n"
18 "default_width" : 800,
19 "* init" : " \n\t \n //this.el.show_all();\n \n ",
20 "# Project.Project project" : "null",
21 "# string title" : "\"Application Builder\"",
23 "# int no_windows" : 1,
24 "default_height" : 500,
25 "| 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 "| void show" : "() {\n \n this.el.show_all();\n\n}",
28 "# WindowState windowstate" : "null",
29 "| return_type openNewWindow" : "() {\n\n}\n",
31 "$ type" : "Gtk.WindowType.TOPLEVEL",
32 "| void setTitle" : " (string str) {\n this.headerbar.el.set_title(this.title + \" - \" + str);\n} \n",
36 "* pack" : "set_titlebar",
37 "xtype" : "HeaderBar",
38 "bool show_close_button" : true,
40 "string title" : "Application Builder",
43 "* pack" : "pack_start",
46 "Gtk.Orientation orientation" : "Gtk.Orientation.HORIZONTAL",
49 "bool use_popover" : false,
51 "xtype" : "MenuButton",
56 "* init" : "{\n this.el.show_all();\n}\n",
58 "* pack" : "set_popup",
63 "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}"
67 "string label" : "Open a new Window",
72 "xtype" : "SeparatorMenuItem",
77 "activate" : " ( ) => {\n Resources.singleton().fetchStart();\n}"
79 "string label" : "Download updated Resources",
86 "activate" : "() => {\n About.singleton().el.show();\n }"
89 "string label" : "About the Builder",
96 "* pack" : "set_image",
98 "utf8 icon_name" : "help-about",
112 "Gtk.Orientation orientation" : "Gtk.Orientation.VERTICAL",
113 "$ homogeneous" : false,
118 "* pack" : "pack_start,true,true,0",
119 "# int lastWidth" : 0,
122 "Gtk.Orientation orientation" : "Gtk.Orientation.HORIZONTAL",
129 "Gtk.Orientation orientation" : "Gtk.Orientation.VERTICAL",
133 "* pack" : "pack_start,true,true,0",
136 "Gtk.Orientation orientation" : "Gtk.Orientation.VERTICAL",
143 "Gtk.Orientation orientation" : "Gtk.Orientation.VERTICAL"
150 "Gtk.Orientation orientation" : "Gtk.Orientation.VERTICAL"
160 "Gtk.Orientation orientation" : "Gtk.Orientation.VERTICAL",
164 "size_allocate" : " ( alloc) => {\n if (_this.windowstate == null) {\n return;\n }\n _this.windowstate.resizeCanvas(); \n \n}"
166 "id" : "clutterembed",
167 "* init" : " var stage = this.el.get_stage();\n stage.set_background_color( Clutter.Color.from_string(\"#000\"));\n \n \n",
169 "* pack" : "pack_start,true,true,0",
170 "$ xns" : "GtkClutter",
174 "* init" : "{\n \n \n this.el.add_constraint(\n new Clutter.AlignConstraint(\n _this.clutterembed.el.get_stage(), \n Clutter.AlignAxis.X_AXIS,\n 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}",
176 "* pack" : "get_stage().add_child",
177 "$ xns" : "GtkClutter"
181 "* init" : "{\n \n /*\n this.el.add_constraint(\n new Clutter.AlignConstraint(\n _this.clutterembed.el.get_stage(), \n Clutter.AlignAxis.X_AXIS,\n 0.0f\n )\n );\n */\n this.el.fixed_x = 50.0f;\n this.el.fixed_y = 0.0f;\n //this.el.set_position(100,100);\n this.el.set_pivot_point(0.0f,0.0f);\n this.el.set_scale(0.0f,1.0f);\n this.el.set_size((_this.clutterembed.el.get_stage().width-50)/2,\n _this.clutterembed.el.get_stage().height);\n \n}",
183 "* pack" : "get_stage().add_child",
184 "$ xns" : "GtkClutter"
187 "id" : "codeeditview",
188 "* init" : "{\n \n /*\n this.el.add_constraint(\n new Clutter.AlignConstraint(\n _this.clutterembed.el.get_stage(), \n Clutter.AlignAxis.X_AXIS,\n 0.0f\n )\n );\n */\n this.el.fixed_x = 50.0f;\n this.el.fixed_y = 0.0f;\n //this.el.set_position(100,100);\n this.el.set_pivot_point(0.0f,0.0f);\n this.el.set_scale(0.0f,1.0f);\n this.el.set_size((_this.clutterembed.el.get_stage().width-50)/2,\n _this.clutterembed.el.get_stage().height);\n \n}",
190 "* pack" : "get_stage().add_child",
191 "$ xns" : "GtkClutter"
194 "id" : "addpropsview",
195 "* init" : "{\n \n /*\n this.el.add_constraint(\n new Clutter.AlignConstraint(\n _this.clutterembed.el.get_stage(), \n Clutter.AlignAxis.X_AXIS,\n 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}",
197 "* pack" : "get_stage().add_child",
198 "$ xns" : "GtkClutter"
201 "id" : "projecteditview",
202 "* 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}",
204 "* pack" : "get_stage().add_child",
205 "$ xns" : "GtkClutter"
208 "id" : "buttonlayout",
209 "* 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}",
211 "* pack" : "get_stage().add_child",
215 "$ orientation" : "Clutter.Orientation.VERTICAL",
216 "xtype" : "BoxLayout",
218 "* prop" : "layout_manager"
222 "* init" : "this.el.set_size(50,50);",
224 "* pack" : "add_child",
228 "* init" : "((Gtk.Container)(this.el.get_widget())).add ( child_0.el);",
229 "* pack" : "add_child",
231 "$ xns" : "GtkClutter",
235 "clicked" : " ( ) => {\n \n _this.windowstate.switchState(WindowState.State.PREVIEW);\n \n\n}"
237 "utf8 tooltip_text" : "Back",
240 "width_request" : 50,
242 "height_request" : 50,
245 "utf8 icon_name" : "go-previous",
246 "* pack" : "set_image",
257 "id" : "projectbutton",
258 "* init" : "this.el.set_size(50,50);",
260 "* pack" : "add_child",
264 "* init" : "((Gtk.Container)(this.el.get_widget())).add ( child_0.el);",
266 "* pack" : "add_child",
267 "$ xns" : "GtkClutter",
271 "clicked" : " ( ) => {\n _this.windowstate.switchState(WindowState.State.FILES);\n \n\n}"
275 "width_request" : 50,
277 "height_request" : 50,
278 "$ tooltop_text" : "\"Open File\"",
282 "utf8 icon_name" : "document-open",
283 "* pack" : "set_image",
293 "id" : "editfilebutton",
294 "* init" : "this.el.set_size(50.0f,50.0f);",
296 "* pack" : "add_child",
300 "* init" : "((Gtk.Container)(this.el.get_widget())).add ( child_0.el);",
302 "* pack" : "add_child",
303 "$ xns" : "GtkClutter",
307 "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}"
311 "width_request" : 50,
313 "$ tooltip_text" : "\"File Details\"",
314 "height_request" : 50,
317 "* pack" : "set_image",
319 "utf8 icon_name" : "document-properties",
329 "id" : "projecteditbutton",
330 "* init" : "this.el.set_size(50,50);",
332 "* pack" : "add_child",
336 "* init" : "((Gtk.Container)(this.el.get_widget())).add ( child_0.el);",
338 "* pack" : "add_child",
339 "$ xns" : "GtkClutter",
343 "clicked" : " ( ) => {\n _this.windowstate.switchState(WindowState.State.PROJECT);\n \n\n\n}"
347 "width_request" : 50,
349 "$ tooltip_text" : "\"Project Details\"",
350 "height_request" : 50,
353 "utf8 icon_name" : "emblem-system",
354 "* pack" : "set_image",
366 "enter_event" : "( event) => {\n this.el.background_color = Clutter.Color.from_string(\"#333\");\n return false;\n}",
367 "leave_event" : "( event) => {\n this.el.background_color = Clutter.Color.from_string(\"#000\");\n return false;\n}"
369 "id" : "objectshowbutton",
370 "* init" : "this.el.set_size(50,50);",
372 "* pack" : "add_child",
376 "* init" : "((Gtk.Container)(this.el.get_widget())).add ( child_0.el);",
378 "* pack" : "add_child",
379 "$ xns" : "GtkClutter",
383 "clicked" : " ( ) => {\n \n _this.windowstate.switchState(WindowState.State.OBJECT);\n \n \n}"
387 "width_request" : 50,
389 "$ tooltip_text" : "\"Add Child Element\"",
390 "height_request" : 50,
394 "utf8 icon_name" : "list-add",
395 "* pack" : "set_image",
405 "id" : "addpropbutton",
406 "* init" : "this.el.set_size(50,50);",
408 "* pack" : "add_child",
412 "* init" : "((Gtk.Container)(this.el.get_widget())).add ( child_0.el);",
414 "* pack" : "add_child",
415 "$ xns" : "GtkClutter",
419 "clicked" : " ( ) => {\n \n _this.windowstate.switchState(WindowState.State.PROP);\n \n\n}"
423 "width_request" : 50,
425 "$ tooltip_text" : "\"Add Property\"",
426 "height_request" : 50,
429 "* pack" : "set_image",
431 "utf8 icon_name" : "format-justify-left",
441 "id" : "addlistenerbutton",
442 "* init" : "this.el.set_size(50,50);",
444 "* pack" : "add_child",
448 "* init" : "((Gtk.Container)(this.el.get_widget())).add ( child_0.el);",
450 "* pack" : "add_child",
451 "$ xns" : "GtkClutter",
455 "clicked" : " ( ) => {\n \n _this.windowstate.switchState(WindowState.State.LISTENER);\n \n\n\n}"
459 "width_request" : 50,
461 "$ tooltip_text" : "\"Add Event Code\"",
462 "height_request" : 50,
465 "utf8 icon_name" : "appointment-new",
466 "* pack" : "set_image",
477 "id" : "addprojectbutton",
478 "* init" : "this.el.set_size(50.0f,50.0f);",
480 "* pack" : "add_child",
484 "* init" : "((Gtk.Container)(this.el.get_widget())).add ( child_0.el);",
486 "* pack" : "add_child",
487 "$ xns" : "GtkClutter",
491 "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}"
495 "width_request" : 50,
497 "$ tooltip_text" : "\"New\\nProj.\"",
498 "height_request" : 50,
501 "* pack" : "set_image",
503 "utf8 icon_name" : "folder-new",
513 "id" : "addfilebutton",
514 "* init" : "this.el.set_size(50.0f,50.0f);",
516 "* pack" : "add_child",
520 "* init" : "((Gtk.Container)(this.el.get_widget())).add ( child_0.el);",
522 "* pack" : "add_child",
523 "$ xns" : "GtkClutter",
527 "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}"
531 "width_request" : 50,
533 "$ tooltip_text" : "\"Add File\"",
534 "height_request" : 50,
538 "utf8 icon_name" : "document-new",
539 "* pack" : "set_image",
549 "id" : "delprojectbutton",
550 "* init" : "this.el.set_size(50,50);",
552 "* pack" : "add_child",
556 "* init" : "((Gtk.Container)(this.el.get_widget())).add ( child_0.el);",
558 "* pack" : "add_child",
559 "$ xns" : "GtkClutter",
563 "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}"
567 "width_request" : 50,
569 "$ tooltip_text" : "\"Delete Project\"",
570 "height_request" : 50,
573 "* pack" : "set_image",
575 "utf8 icon_name" : "user-trash",
593 "bool homogeneous" : false,
594 "* pack" : "pack_end,false,true,0",
597 "Gtk.Orientation orientation" : "Gtk.Orientation.HORIZONTAL",
601 "string label" : " ",
602 "* pack" : "pack_start,true,true,0",
606 "bool show_text" : true,
607 "ulong handler_id" : "-1",
609 "* 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",
610 "xtype" : "ProgressBar",
611 "* pack" : "pack_start,true,true,0",
616 "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} ",
617 "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 "id" : "search_entry",
620 "* init" : "var description = Pango.FontDescription.from_string(\"monospace\");\n\tdescription.set_size(8000);\n\t this.el.override_font(description);\n\n",
621 "* pack" : "pack_start,false,true,0",
622 "xtype" : "SearchEntry",
624 "| 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"
627 "* pack" : "pack_end,false,true,0",
633 "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 "bool always_show_image" : true,
636 "id" : "search_results",
637 "Xcls_ValaCompileErrors popup" : "",
638 "string label" : "Matches",
640 "xtype" : "ImageMenuItem",
645 "utf8 icon_name" : "system-search",
646 "* pack" : "set_image",
647 "bool sensitive" : false,
653 "id" : "statusbar_compilestatus_label",
654 "xtype" : "MenuItem",
656 "string label" : "Compile Status:",
661 "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 "bool always_show_image" : true,
664 "id" : "statusbar_errors",
665 "| 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",
666 "Xcls_ValaCompileErrors popup" : "",
667 "string label" : "Errors",
669 "xtype" : "ImageMenuItem",
670 "# Json.Object notices" : "new Json.Object() ",
674 "utf8 icon_name" : "dialog-error",
675 "* pack" : "set_image",
683 "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 "bool always_show_image" : true,
686 "id" : "statusbar_warnings",
687 "| 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",
688 "Xcls_ValaCompileErrors popup" : "",
690 "string label" : "Warnings",
691 "xtype" : "ImageMenuItem",
692 "# Json.Object notices" : "new Json.Object()",
697 "utf8 icon_name" : "dialog-warning",
698 "* pack" : "set_image",
705 "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 "bool always_show_image" : true,
708 "id" : "statusbar_depricated",
709 "| 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",
710 "Xcls_ValaCompileErrors popup" : "",
711 "string label" : "Depricated",
713 "xtype" : "ImageMenuItem",
714 "# Json.Object notices" : "new Json.Object()",
718 "* pack" : "set_image",
720 "utf8 icon_name" : "dialog-information",
727 "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 "bool always_show_image" : true,
730 "id" : "statusbar_run",
731 "Xcls_ValaCompileErrors popup" : "",
732 "string label" : "Run",
734 "xtype" : "ImageMenuItem",
739 "utf8 icon_name" : "media-playback-start",
740 "* pack" : "set_image",