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\t if (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} \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",
30 "$ type" : "Gtk.WindowType.TOPLEVEL",
31 "| void setTitle" : " (string str) {\n this.headerbar.el.set_title(this.title + \" - \" + str);\n} \n",
35 "xtype" : "HeaderBar",
36 "* pack" : "set_titlebar",
37 "bool show_close_button" : true,
39 "string title" : "Application Builder",
42 "* pack" : "pack_start",
45 "Gtk.Orientation orientation" : "Gtk.Orientation.HORIZONTAL",
48 "bool use_popover" : false,
49 "xtype" : "MenuButton",
55 "* init" : "{\n this.el.show_all();\n}\n",
57 "* pack" : "set_popup",
62 "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}"
65 "string label" : "Open a new Window",
71 "xtype" : "SeparatorMenuItem",
76 "activate" : " ( ) => {\n Resources.singleton().fetchStart();\n}"
80 "string label" : "Download updated Resources",
85 "activate" : "() => {\n About.singleton().el.show();\n }"
87 "string label" : "About the Builder",
96 "utf8 icon_name" : "help-about",
97 "* pack" : "set_image",
111 "Gtk.Orientation orientation" : "Gtk.Orientation.VERTICAL",
112 "$ homogeneous" : false,
117 "* pack" : "pack_start,true,true,0",
118 "# int lastWidth" : 0,
121 "Gtk.Orientation orientation" : "Gtk.Orientation.HORIZONTAL",
128 "Gtk.Orientation orientation" : "Gtk.Orientation.VERTICAL",
133 "* pack" : "pack_start,true,true,0",
135 "Gtk.Orientation orientation" : "Gtk.Orientation.VERTICAL",
142 "Gtk.Orientation orientation" : "Gtk.Orientation.VERTICAL"
149 "Gtk.Orientation orientation" : "Gtk.Orientation.VERTICAL"
159 "Gtk.Orientation orientation" : "Gtk.Orientation.VERTICAL",
163 "size_allocate" : " ( alloc) => {\n if (_this.windowstate == null) {\n return;\n }\n _this.windowstate.resizeCanvas(); \n \n}"
165 "id" : "clutterembed",
166 "* init" : " var stage = this.el.get_stage();\n stage.set_background_color( Clutter.Color.from_string(\"#000\"));\n \n \n",
168 "* pack" : "pack_start,true,true,0",
169 "$ xns" : "GtkClutter",
173 "* 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}",
175 "* pack" : "get_stage().add_child",
176 "$ xns" : "GtkClutter"
180 "* 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}",
182 "* pack" : "get_stage().add_child",
183 "$ xns" : "GtkClutter"
186 "id" : "codeeditview",
187 "* 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}",
189 "* pack" : "get_stage().add_child",
190 "$ xns" : "GtkClutter"
193 "id" : "addpropsview",
194 "* 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}",
196 "* pack" : "get_stage().add_child",
197 "$ xns" : "GtkClutter"
200 "id" : "projecteditview",
201 "* 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}",
203 "* pack" : "get_stage().add_child",
204 "$ xns" : "GtkClutter"
207 "id" : "buttonlayout",
208 "* 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}",
210 "* pack" : "get_stage().add_child",
214 "$ orientation" : "Clutter.Orientation.VERTICAL",
215 "xtype" : "BoxLayout",
217 "* prop" : "layout_manager"
221 "* init" : "this.el.set_size(50,50);",
223 "* pack" : "add_child",
227 "* init" : "((Gtk.Container)(this.el.get_widget())).add ( child_0.el);",
229 "* pack" : "add_child",
230 "$ xns" : "GtkClutter",
234 "clicked" : " ( ) => {\n \n _this.windowstate.switchState(WindowState.State.PREVIEW);\n \n\n}"
236 "utf8 tooltip_text" : "Back",
239 "width_request" : 50,
241 "height_request" : 50,
244 "* pack" : "set_image",
246 "utf8 icon_name" : "go-previous",
256 "id" : "projectbutton",
257 "* init" : "this.el.set_size(50,50);",
259 "* pack" : "add_child",
263 "* init" : "((Gtk.Container)(this.el.get_widget())).add ( child_0.el);",
264 "* pack" : "add_child",
266 "$ xns" : "GtkClutter",
270 "clicked" : " ( ) => {\n _this.windowstate.switchState(WindowState.State.FILES);\n \n\n}"
274 "width_request" : 50,
276 "height_request" : 50,
277 "$ tooltop_text" : "\"Open File\"",
280 "utf8 icon_name" : "document-open",
281 "* pack" : "set_image",
292 "id" : "editfilebutton",
293 "* init" : "this.el.set_size(50.0f,50.0f);",
295 "* pack" : "add_child",
299 "* init" : "((Gtk.Container)(this.el.get_widget())).add ( child_0.el);",
300 "* pack" : "add_child",
302 "$ xns" : "GtkClutter",
306 "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}"
310 "width_request" : 50,
312 "$ tooltip_text" : "\"File Details\"",
313 "height_request" : 50,
317 "utf8 icon_name" : "document-properties",
318 "* pack" : "set_image",
328 "id" : "projecteditbutton",
329 "* init" : "this.el.set_size(50,50);",
331 "* pack" : "add_child",
335 "* init" : "((Gtk.Container)(this.el.get_widget())).add ( child_0.el);",
336 "* pack" : "add_child",
338 "$ xns" : "GtkClutter",
342 "clicked" : " ( ) => {\n _this.windowstate.switchState(WindowState.State.PROJECT);\n \n\n\n}"
346 "width_request" : 50,
348 "$ tooltip_text" : "\"Project Details\"",
349 "height_request" : 50,
352 "* pack" : "set_image",
354 "utf8 icon_name" : "emblem-system",
365 "enter_event" : "( event) => {\n this.el.background_color = Clutter.Color.from_string(\"#333\");\n return false;\n}",
366 "leave_event" : "( event) => {\n this.el.background_color = Clutter.Color.from_string(\"#000\");\n return false;\n}"
368 "id" : "objectshowbutton",
369 "* init" : "this.el.set_size(50,50);",
371 "* pack" : "add_child",
375 "* init" : "((Gtk.Container)(this.el.get_widget())).add ( child_0.el);",
376 "* pack" : "add_child",
378 "$ xns" : "GtkClutter",
382 "clicked" : " ( ) => {\n \n _this.windowstate.switchState(WindowState.State.OBJECT);\n \n \n}"
386 "width_request" : 50,
388 "$ tooltip_text" : "\"Add Child Element\"",
389 "height_request" : 50,
392 "utf8 icon_name" : "list-add",
393 "* pack" : "set_image",
404 "id" : "addpropbutton",
405 "* init" : "this.el.set_size(50,50);",
407 "* pack" : "add_child",
411 "* init" : "((Gtk.Container)(this.el.get_widget())).add ( child_0.el);",
412 "* pack" : "add_child",
414 "$ xns" : "GtkClutter",
418 "clicked" : " ( ) => {\n \n _this.windowstate.switchState(WindowState.State.PROP);\n \n\n}"
422 "width_request" : 50,
424 "$ tooltip_text" : "\"Add Property\"",
425 "height_request" : 50,
429 "utf8 icon_name" : "format-justify-left",
430 "* pack" : "set_image",
440 "id" : "addlistenerbutton",
441 "* init" : "this.el.set_size(50,50);",
443 "* pack" : "add_child",
447 "* init" : "((Gtk.Container)(this.el.get_widget())).add ( child_0.el);",
448 "* pack" : "add_child",
450 "$ xns" : "GtkClutter",
454 "clicked" : " ( ) => {\n \n _this.windowstate.switchState(WindowState.State.LISTENER);\n \n\n\n}"
458 "width_request" : 50,
460 "$ tooltip_text" : "\"Add Event Code\"",
461 "height_request" : 50,
464 "* pack" : "set_image",
466 "utf8 icon_name" : "appointment-new",
476 "id" : "addprojectbutton",
477 "* init" : "this.el.set_size(50.0f,50.0f);",
479 "* pack" : "add_child",
483 "* init" : "((Gtk.Container)(this.el.get_widget())).add ( child_0.el);",
484 "* pack" : "add_child",
486 "$ xns" : "GtkClutter",
490 "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}"
494 "width_request" : 50,
496 "$ tooltip_text" : "\"New\\nProj.\"",
497 "height_request" : 50,
501 "utf8 icon_name" : "folder-new",
502 "* pack" : "set_image",
512 "id" : "addfilebutton",
513 "* init" : "this.el.set_size(50.0f,50.0f);",
515 "* pack" : "add_child",
519 "* init" : "((Gtk.Container)(this.el.get_widget())).add ( child_0.el);",
520 "* pack" : "add_child",
522 "$ xns" : "GtkClutter",
526 "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}"
530 "width_request" : 50,
532 "$ tooltip_text" : "\"Add File\"",
533 "height_request" : 50,
536 "utf8 icon_name" : "document-new",
537 "* pack" : "set_image",
548 "id" : "delprojectbutton",
549 "* init" : "this.el.set_size(50,50);",
551 "* pack" : "add_child",
555 "* init" : "((Gtk.Container)(this.el.get_widget())).add ( child_0.el);",
556 "* pack" : "add_child",
558 "$ xns" : "GtkClutter",
562 "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}"
566 "width_request" : 50,
568 "$ tooltip_text" : "\"Delete Project\"",
569 "height_request" : 50,
573 "utf8 icon_name" : "user-trash",
574 "* pack" : "set_image",
592 "bool homogeneous" : false,
594 "* pack" : "pack_end,false,true,0",
596 "Gtk.Orientation orientation" : "Gtk.Orientation.HORIZONTAL",
599 "string label" : " ",
600 "* pack" : "pack_start,true,true,0",
605 "bool show_text" : true,
607 "ulong handler_id" : "-1",
608 "* 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",
609 "xtype" : "ProgressBar",
610 "* pack" : "pack_start,true,true,0",
615 "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} ",
616 "changed" : "() => {\n\tif (this.el.text == \"\") {\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\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"
618 "id" : "search_entry",
619 "* init" : "var description = Pango.FontDescription.from_string(\"monospace\");\n\tdescription.set_size(8000);\n\t this.el.override_font(description);\n\n",
620 "* pack" : "pack_start,false,true,0",
621 "xtype" : "SearchEntry",
623 "| 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 "* pack" : "pack_end,false,true,0",
632 "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}"
634 "bool always_show_image" : true,
635 "id" : "search_results",
636 "Xcls_ValaCompileErrors popup" : "",
637 "string label" : "Matches",
639 "xtype" : "ImageMenuItem",
643 "utf8 icon_name" : "system-search",
644 "* pack" : "set_image",
646 "bool sensitive" : false,
652 "id" : "statusbar_compilestatus_label",
654 "xtype" : "MenuItem",
655 "string label" : "Compile Status:",
657 "bool visible" : false
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 "* pack" : "set_image",
676 "utf8 icon_name" : "dialog-error",
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()",
696 "utf8 icon_name" : "dialog-warning",
697 "* 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()",
719 "utf8 icon_name" : "dialog-information",
720 "* pack" : "set_image",
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",
738 "utf8 icon_name" : "media-playback-start",
739 "* pack" : "set_image",