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\tthis.openNewWindow();\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 "| 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\"",
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",
28 "| void show" : "() {\n \n this.el.show_all();\n\n}",
29 "# WindowState windowstate" : "null",
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 "bool hexpand" : true,
53 "xtype" : "MenuButton",
58 "* init" : "{\n this.el.show_all();\n}\n",
60 "* pack" : "set_popup",
65 "activate" : "( ) => {\n _this.openNewWindow();\n}"
68 "string label" : "Open a new Window",
74 "xtype" : "SeparatorMenuItem",
79 "activate" : " ( ) => {\n Resources.singleton().fetchStart();\n}"
83 "string label" : "Download updated Resources",
88 "activate" : "() => {\n About.singleton().el.show();\n }"
90 "string label" : "About the Builder",
99 "utf8 icon_name" : "help-about",
100 "* pack" : "set_image",
107 "clicked" : " ( ) => {\n _this.windowstate.switchState(WindowState.State.FILES);\n \n\n}"
112 "width_request" : 50,
114 "height_request" : 50,
115 "$ tooltop_text" : "\"Open File\"",
118 "* pack" : "set_image",
120 "utf8 icon_name" : "document-open",
127 "clicked" : " ( ) => {\n \n _this.windowstate.switchState(WindowState.State.PREVIEW);\n \n\n}"
129 "id" : "openbackbtn",
130 "utf8 tooltip_text" : "Back",
133 "width_request" : 50,
135 "height_request" : 50,
136 "bool visible" : false,
139 "utf8 icon_name" : "go-previous",
140 "* pack" : "set_image",
155 "Gtk.Orientation orientation" : "Gtk.Orientation.VERTICAL",
156 "$ homogeneous" : false,
161 "* pack" : "pack_start,true,true,0",
162 "# int lastWidth" : 0,
165 "Gtk.Orientation orientation" : "Gtk.Orientation.HORIZONTAL",
172 "Gtk.Orientation orientation" : "Gtk.Orientation.VERTICAL",
176 "* pack" : "pack_start,true,true,0",
179 "Gtk.Orientation orientation" : "Gtk.Orientation.VERTICAL",
186 "Gtk.Orientation orientation" : "Gtk.Orientation.VERTICAL"
193 "Gtk.Orientation orientation" : "Gtk.Orientation.VERTICAL"
203 "Gtk.Orientation orientation" : "Gtk.Orientation.VERTICAL",
207 "size_allocate" : " ( alloc) => {\n if (_this.windowstate == null) {\n return;\n }\n _this.windowstate.resizeCanvas(); \n \n}"
209 "id" : "clutterembed",
210 "* init" : " var stage = this.el.get_stage();\n stage.set_background_color( Clutter.Color.from_string(\"#000\"));\n \n \n",
212 "* pack" : "pack_start,true,true,0",
213 "$ xns" : "GtkClutter",
217 "* 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}",
219 "* pack" : "get_stage().add_child",
220 "$ xns" : "GtkClutter"
224 "* 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 "* pack" : "get_stage().add_child",
227 "$ xns" : "GtkClutter"
230 "id" : "codeeditview",
231 "* 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 "* pack" : "get_stage().add_child",
234 "$ xns" : "GtkClutter"
237 "id" : "addpropsview",
238 "* 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}",
240 "* pack" : "get_stage().add_child",
241 "$ xns" : "GtkClutter"
244 "id" : "projecteditview",
245 "* 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}",
247 "* pack" : "get_stage().add_child",
248 "$ xns" : "GtkClutter"
251 "id" : "buttonlayout",
252 "* 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}",
254 "* pack" : "get_stage().add_child",
258 "$ orientation" : "Clutter.Orientation.VERTICAL",
259 "xtype" : "BoxLayout",
261 "* prop" : "layout_manager"
265 "* init" : "this.el.set_size(50,50);",
267 "* pack" : "add_child",
271 "* init" : "((Gtk.Container)(this.el.get_widget())).add ( child_0.el);",
272 "* pack" : "add_child",
274 "$ xns" : "GtkClutter",
278 "clicked" : " ( ) => {\n \n _this.windowstate.switchState(WindowState.State.PREVIEW);\n \n\n}"
280 "utf8 tooltip_text" : "Back",
283 "width_request" : 50,
285 "height_request" : 50,
288 "* pack" : "set_image",
290 "utf8 icon_name" : "go-previous",
300 "id" : "editfilebutton",
301 "* init" : "this.el.set_size(50.0f,50.0f);",
303 "* pack" : "add_child",
307 "* init" : "((Gtk.Container)(this.el.get_widget())).add ( child_0.el);",
309 "* pack" : "add_child",
310 "$ xns" : "GtkClutter",
314 "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}"
318 "width_request" : 50,
320 "$ tooltip_text" : "\"File Details\"",
321 "height_request" : 50,
325 "utf8 icon_name" : "document-properties",
326 "* pack" : "set_image",
336 "id" : "projecteditbutton",
337 "* init" : "this.el.set_size(50,50);",
339 "* pack" : "add_child",
343 "* init" : "((Gtk.Container)(this.el.get_widget())).add ( child_0.el);",
345 "* pack" : "add_child",
346 "$ xns" : "GtkClutter",
350 "clicked" : " ( ) => {\n _this.windowstate.switchState(WindowState.State.PROJECT);\n \n\n\n}"
354 "width_request" : 50,
356 "$ tooltip_text" : "\"Project Details\"",
357 "height_request" : 50,
360 "* pack" : "set_image",
362 "utf8 icon_name" : "emblem-system",
373 "enter_event" : "( event) => {\n this.el.background_color = Clutter.Color.from_string(\"#333\");\n return false;\n}",
374 "leave_event" : "( event) => {\n this.el.background_color = Clutter.Color.from_string(\"#000\");\n return false;\n}"
376 "id" : "objectshowbutton",
377 "* init" : "this.el.set_size(50,50);",
379 "* pack" : "add_child",
383 "* init" : "((Gtk.Container)(this.el.get_widget())).add ( child_0.el);",
385 "* pack" : "add_child",
386 "$ xns" : "GtkClutter",
390 "clicked" : " ( ) => {\n \n _this.windowstate.switchState(WindowState.State.OBJECT);\n \n \n}"
394 "width_request" : 50,
396 "$ tooltip_text" : "\"Add Child Element\"",
397 "height_request" : 50,
400 "utf8 icon_name" : "list-add",
401 "* pack" : "set_image",
412 "id" : "addpropbutton",
413 "* init" : "this.el.set_size(50,50);",
415 "* pack" : "add_child",
419 "* init" : "((Gtk.Container)(this.el.get_widget())).add ( child_0.el);",
421 "* pack" : "add_child",
422 "$ xns" : "GtkClutter",
426 "clicked" : " ( ) => {\n \n _this.windowstate.switchState(WindowState.State.PROP);\n \n\n}"
430 "width_request" : 50,
432 "$ tooltip_text" : "\"Add Property\"",
433 "height_request" : 50,
437 "utf8 icon_name" : "format-justify-left",
438 "* pack" : "set_image",
448 "id" : "addlistenerbutton",
449 "* init" : "this.el.set_size(50,50);",
451 "* pack" : "add_child",
455 "* init" : "((Gtk.Container)(this.el.get_widget())).add ( child_0.el);",
457 "* pack" : "add_child",
458 "$ xns" : "GtkClutter",
462 "clicked" : " ( ) => {\n \n _this.windowstate.switchState(WindowState.State.LISTENER);\n \n\n\n}"
466 "width_request" : 50,
468 "$ tooltip_text" : "\"Add Event Code\"",
469 "height_request" : 50,
472 "* pack" : "set_image",
474 "utf8 icon_name" : "appointment-new",
484 "id" : "addprojectbutton",
485 "* init" : "this.el.set_size(50.0f,50.0f);",
487 "* pack" : "add_child",
491 "* init" : "((Gtk.Container)(this.el.get_widget())).add ( child_0.el);",
493 "* pack" : "add_child",
494 "$ xns" : "GtkClutter",
498 "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}"
502 "width_request" : 50,
504 "$ tooltip_text" : "\"New\\nProj.\"",
505 "height_request" : 50,
509 "utf8 icon_name" : "folder-new",
510 "* pack" : "set_image",
520 "id" : "addfilebutton",
521 "* init" : "this.el.set_size(50.0f,50.0f);",
523 "* pack" : "add_child",
527 "* init" : "((Gtk.Container)(this.el.get_widget())).add ( child_0.el);",
529 "* pack" : "add_child",
530 "$ xns" : "GtkClutter",
534 "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}"
538 "width_request" : 50,
540 "$ tooltip_text" : "\"Add File\"",
541 "height_request" : 50,
544 "utf8 icon_name" : "document-new",
545 "* pack" : "set_image",
556 "id" : "delprojectbutton",
557 "* init" : "this.el.set_size(50,50);",
559 "* pack" : "add_child",
563 "* init" : "((Gtk.Container)(this.el.get_widget())).add ( child_0.el);",
565 "* pack" : "add_child",
566 "$ xns" : "GtkClutter",
570 "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}"
574 "width_request" : 50,
576 "$ tooltip_text" : "\"Delete Project\"",
577 "height_request" : 50,
581 "utf8 icon_name" : "user-trash",
582 "* pack" : "set_image",
600 "bool homogeneous" : false,
601 "* pack" : "pack_end,false,true,0",
604 "Gtk.Orientation orientation" : "Gtk.Orientation.HORIZONTAL",
607 "string label" : " ",
608 "* pack" : "pack_start,true,true,0",
613 "bool show_text" : true,
614 "ulong handler_id" : "-1",
616 "* 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",
617 "xtype" : "ProgressBar",
618 "* pack" : "pack_start,true,true,0",
623 "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} ",
624 "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"
626 "id" : "search_entry",
627 "* init" : "var description = Pango.FontDescription.from_string(\"monospace\");\n\tdescription.set_size(8000);\n\t this.el.override_font(description);\n\n",
628 "* pack" : "pack_start,false,true,0",
629 "xtype" : "SearchEntry",
631 "| 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"
634 "* pack" : "pack_end,false,true,0",
640 "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}"
642 "bool always_show_image" : true,
643 "id" : "search_results",
644 "Xcls_ValaCompileErrors popup" : "",
645 "string label" : "Matches",
647 "xtype" : "ImageMenuItem",
651 "utf8 icon_name" : "system-search",
652 "* pack" : "set_image",
654 "bool sensitive" : false,
660 "id" : "statusbar_compilestatus_label",
661 "xtype" : "MenuItem",
663 "string label" : "Compile Status:",
668 "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}"
670 "bool always_show_image" : true,
671 "id" : "statusbar_errors",
672 "| 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",
673 "Xcls_ValaCompileErrors popup" : "",
674 "string label" : "Errors",
676 "xtype" : "ImageMenuItem",
677 "# Json.Object notices" : "new Json.Object() ",
681 "* pack" : "set_image",
683 "utf8 icon_name" : "dialog-error",
690 "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}"
692 "bool always_show_image" : true,
693 "id" : "statusbar_warnings",
694 "| 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",
695 "Xcls_ValaCompileErrors popup" : "",
697 "string label" : "Warnings",
698 "xtype" : "ImageMenuItem",
699 "# Json.Object notices" : "new Json.Object()",
703 "utf8 icon_name" : "dialog-warning",
704 "* pack" : "set_image",
712 "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}"
714 "bool always_show_image" : true,
715 "id" : "statusbar_depricated",
716 "| 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",
717 "Xcls_ValaCompileErrors popup" : "",
718 "string label" : "Depricated",
720 "xtype" : "ImageMenuItem",
721 "# Json.Object notices" : "new Json.Object()",
726 "utf8 icon_name" : "dialog-information",
727 "* pack" : "set_image",
734 "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}"
736 "bool always_show_image" : true,
737 "id" : "statusbar_run",
738 "Xcls_ValaCompileErrors popup" : "",
739 "string label" : "Run",
741 "xtype" : "ImageMenuItem",
745 "utf8 icon_name" : "media-playback-start",
746 "* pack" : "set_image",