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 "xtype" : "HeaderBar",
37 "* pack" : "set_titlebar",
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,
50 "xtype" : "MenuButton",
56 "* init" : "{\n this.el.show_all();\n}\n",
58 "* pack" : "set_popup",
63 "activate" : "( ) => {\n _this.openNewWindow();\n}"
65 "string label" : "Open a new Window",
72 "xtype" : "SeparatorMenuItem",
77 "activate" : " ( ) => {\n Resources.singleton().fetchStart();\n}"
80 "string label" : "Download updated Resources",
86 "activate" : "() => {\n About.singleton().el.show();\n }"
90 "string label" : "About the Builder",
96 "utf8 icon_name" : "help-about",
97 "* pack" : "set_image",
107 "clicked" : " ( ) => {\n _this.windowstate.switchState(WindowState.State.FILES);\n \n\n}"
111 "width_request" : 50,
113 "height_request" : 50,
114 "$ tooltop_text" : "\"Open File\"",
118 "utf8 icon_name" : "document-open",
119 "* pack" : "set_image",
131 "Gtk.Orientation orientation" : "Gtk.Orientation.VERTICAL",
132 "$ homogeneous" : false,
137 "* pack" : "pack_start,true,true,0",
138 "# int lastWidth" : 0,
141 "Gtk.Orientation orientation" : "Gtk.Orientation.HORIZONTAL",
148 "Gtk.Orientation orientation" : "Gtk.Orientation.VERTICAL",
153 "* pack" : "pack_start,true,true,0",
155 "Gtk.Orientation orientation" : "Gtk.Orientation.VERTICAL",
162 "Gtk.Orientation orientation" : "Gtk.Orientation.VERTICAL"
169 "Gtk.Orientation orientation" : "Gtk.Orientation.VERTICAL"
179 "Gtk.Orientation orientation" : "Gtk.Orientation.VERTICAL",
183 "size_allocate" : " ( alloc) => {\n if (_this.windowstate == null) {\n return;\n }\n _this.windowstate.resizeCanvas(); \n \n}"
185 "id" : "clutterembed",
186 "* init" : " var stage = this.el.get_stage();\n stage.set_background_color( Clutter.Color.from_string(\"#000\"));\n \n \n",
188 "* pack" : "pack_start,true,true,0",
189 "$ xns" : "GtkClutter",
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 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}",
195 "* pack" : "get_stage().add_child",
196 "$ xns" : "GtkClutter"
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 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}",
202 "* pack" : "get_stage().add_child",
203 "$ xns" : "GtkClutter"
206 "id" : "codeeditview",
207 "* 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}",
209 "* pack" : "get_stage().add_child",
210 "$ xns" : "GtkClutter"
213 "id" : "addpropsview",
214 "* 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}",
216 "* pack" : "get_stage().add_child",
217 "$ xns" : "GtkClutter"
220 "id" : "projecteditview",
221 "* 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}",
223 "* pack" : "get_stage().add_child",
224 "$ xns" : "GtkClutter"
227 "id" : "buttonlayout",
228 "* 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}",
230 "* pack" : "get_stage().add_child",
234 "$ orientation" : "Clutter.Orientation.VERTICAL",
235 "xtype" : "BoxLayout",
237 "* prop" : "layout_manager"
241 "* init" : "this.el.set_size(50,50);",
243 "* pack" : "add_child",
247 "* init" : "((Gtk.Container)(this.el.get_widget())).add ( child_0.el);",
249 "* pack" : "add_child",
250 "$ xns" : "GtkClutter",
254 "clicked" : " ( ) => {\n \n _this.windowstate.switchState(WindowState.State.PREVIEW);\n \n\n}"
256 "utf8 tooltip_text" : "Back",
259 "width_request" : 50,
261 "height_request" : 50,
265 "utf8 icon_name" : "go-previous",
266 "* pack" : "set_image",
276 "id" : "projectbutton",
277 "* init" : "this.el.set_size(50,50);",
279 "* pack" : "add_child",
283 "* init" : "((Gtk.Container)(this.el.get_widget())).add ( child_0.el);",
284 "* pack" : "add_child",
286 "$ xns" : "GtkClutter",
290 "clicked" : " ( ) => {\n _this.windowstate.switchState(WindowState.State.FILES);\n \n\n}"
294 "width_request" : 50,
296 "height_request" : 50,
297 "$ tooltop_text" : "\"Open File\"",
300 "* pack" : "set_image",
302 "utf8 icon_name" : "document-open",
312 "id" : "editfilebutton",
313 "* init" : "this.el.set_size(50.0f,50.0f);",
315 "* pack" : "add_child",
319 "* init" : "((Gtk.Container)(this.el.get_widget())).add ( child_0.el);",
320 "* pack" : "add_child",
322 "$ xns" : "GtkClutter",
326 "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}"
330 "width_request" : 50,
332 "$ tooltip_text" : "\"File Details\"",
333 "height_request" : 50,
336 "utf8 icon_name" : "document-properties",
337 "* pack" : "set_image",
348 "id" : "projecteditbutton",
349 "* init" : "this.el.set_size(50,50);",
351 "* pack" : "add_child",
355 "* init" : "((Gtk.Container)(this.el.get_widget())).add ( child_0.el);",
356 "* pack" : "add_child",
358 "$ xns" : "GtkClutter",
362 "clicked" : " ( ) => {\n _this.windowstate.switchState(WindowState.State.PROJECT);\n \n\n\n}"
366 "width_request" : 50,
368 "$ tooltip_text" : "\"Project Details\"",
369 "height_request" : 50,
373 "utf8 icon_name" : "emblem-system",
374 "* pack" : "set_image",
385 "enter_event" : "( event) => {\n this.el.background_color = Clutter.Color.from_string(\"#333\");\n return false;\n}",
386 "leave_event" : "( event) => {\n this.el.background_color = Clutter.Color.from_string(\"#000\");\n return false;\n}"
388 "id" : "objectshowbutton",
389 "* init" : "this.el.set_size(50,50);",
391 "* pack" : "add_child",
395 "* init" : "((Gtk.Container)(this.el.get_widget())).add ( child_0.el);",
396 "* pack" : "add_child",
398 "$ xns" : "GtkClutter",
402 "clicked" : " ( ) => {\n \n _this.windowstate.switchState(WindowState.State.OBJECT);\n \n \n}"
406 "width_request" : 50,
408 "$ tooltip_text" : "\"Add Child Element\"",
409 "height_request" : 50,
412 "* pack" : "set_image",
414 "utf8 icon_name" : "list-add",
424 "id" : "addpropbutton",
425 "* init" : "this.el.set_size(50,50);",
427 "* pack" : "add_child",
431 "* init" : "((Gtk.Container)(this.el.get_widget())).add ( child_0.el);",
432 "* pack" : "add_child",
434 "$ xns" : "GtkClutter",
438 "clicked" : " ( ) => {\n \n _this.windowstate.switchState(WindowState.State.PROP);\n \n\n}"
442 "width_request" : 50,
444 "$ tooltip_text" : "\"Add Property\"",
445 "height_request" : 50,
448 "utf8 icon_name" : "format-justify-left",
449 "* pack" : "set_image",
460 "id" : "addlistenerbutton",
461 "* init" : "this.el.set_size(50,50);",
463 "* pack" : "add_child",
467 "* init" : "((Gtk.Container)(this.el.get_widget())).add ( child_0.el);",
468 "* pack" : "add_child",
470 "$ xns" : "GtkClutter",
474 "clicked" : " ( ) => {\n \n _this.windowstate.switchState(WindowState.State.LISTENER);\n \n\n\n}"
478 "width_request" : 50,
480 "$ tooltip_text" : "\"Add Event Code\"",
481 "height_request" : 50,
485 "utf8 icon_name" : "appointment-new",
486 "* pack" : "set_image",
496 "id" : "addprojectbutton",
497 "* init" : "this.el.set_size(50.0f,50.0f);",
499 "* pack" : "add_child",
503 "* init" : "((Gtk.Container)(this.el.get_widget())).add ( child_0.el);",
504 "* pack" : "add_child",
506 "$ xns" : "GtkClutter",
510 "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}"
514 "width_request" : 50,
516 "$ tooltip_text" : "\"New\\nProj.\"",
517 "height_request" : 50,
520 "utf8 icon_name" : "folder-new",
521 "* pack" : "set_image",
532 "id" : "addfilebutton",
533 "* init" : "this.el.set_size(50.0f,50.0f);",
535 "* pack" : "add_child",
539 "* init" : "((Gtk.Container)(this.el.get_widget())).add ( child_0.el);",
540 "* pack" : "add_child",
542 "$ xns" : "GtkClutter",
546 "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}"
550 "width_request" : 50,
552 "$ tooltip_text" : "\"Add File\"",
553 "height_request" : 50,
556 "* pack" : "set_image",
558 "utf8 icon_name" : "document-new",
568 "id" : "delprojectbutton",
569 "* init" : "this.el.set_size(50,50);",
571 "* pack" : "add_child",
575 "* init" : "((Gtk.Container)(this.el.get_widget())).add ( child_0.el);",
576 "* pack" : "add_child",
578 "$ xns" : "GtkClutter",
582 "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}"
586 "width_request" : 50,
588 "$ tooltip_text" : "\"Delete Project\"",
589 "height_request" : 50,
592 "utf8 icon_name" : "user-trash",
593 "* pack" : "set_image",
612 "bool homogeneous" : false,
614 "* pack" : "pack_end,false,true,0",
616 "Gtk.Orientation orientation" : "Gtk.Orientation.HORIZONTAL",
619 "* pack" : "pack_start,true,true,0",
621 "string label" : " ",
625 "bool show_text" : true,
627 "ulong handler_id" : "-1",
628 "* 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",
629 "xtype" : "ProgressBar",
630 "* pack" : "pack_start,true,true,0",
635 "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} ",
636 "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"
638 "id" : "search_entry",
639 "* init" : "var description = Pango.FontDescription.from_string(\"monospace\");\n\tdescription.set_size(8000);\n\t this.el.override_font(description);\n\n",
640 "* pack" : "pack_start,false,true,0",
641 "xtype" : "SearchEntry",
643 "| 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"
646 "* pack" : "pack_end,false,true,0",
652 "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}"
654 "bool always_show_image" : true,
655 "id" : "search_results",
656 "Xcls_ValaCompileErrors popup" : "",
657 "string label" : "Matches",
659 "xtype" : "ImageMenuItem",
663 "* pack" : "set_image",
665 "utf8 icon_name" : "system-search",
666 "bool sensitive" : false,
672 "id" : "statusbar_compilestatus_label",
674 "xtype" : "MenuItem",
675 "string label" : "Compile Status:",
680 "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}"
682 "bool always_show_image" : true,
683 "id" : "statusbar_errors",
684 "| 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",
685 "Xcls_ValaCompileErrors popup" : "",
686 "string label" : "Errors",
688 "xtype" : "ImageMenuItem",
689 "# Json.Object notices" : "new Json.Object() ",
694 "utf8 icon_name" : "dialog-error",
695 "* pack" : "set_image",
702 "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}"
704 "bool always_show_image" : true,
705 "id" : "statusbar_warnings",
706 "| 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",
707 "Xcls_ValaCompileErrors popup" : "",
709 "string label" : "Warnings",
710 "xtype" : "ImageMenuItem",
711 "# Json.Object notices" : "new Json.Object()",
715 "* pack" : "set_image",
717 "utf8 icon_name" : "dialog-warning",
724 "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}"
726 "bool always_show_image" : true,
727 "id" : "statusbar_depricated",
728 "| 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",
729 "Xcls_ValaCompileErrors popup" : "",
730 "string label" : "Depricated",
732 "xtype" : "ImageMenuItem",
733 "# Json.Object notices" : "new Json.Object()",
737 "utf8 icon_name" : "dialog-information",
738 "* pack" : "set_image",
746 "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}"
748 "bool always_show_image" : true,
749 "id" : "statusbar_run",
750 "Xcls_ValaCompileErrors popup" : "",
751 "string label" : "Run",
753 "xtype" : "ImageMenuItem",
757 "* pack" : "set_image",
759 "utf8 icon_name" : "media-playback-start",