5 "path" : "/home/alan/gitlive/roobuilder/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 _this.statusbar_compile_spinner.el.hide();\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 //try {\n this.el.set_icon_name(\"roobuilder\");\n\t//} catch (Exception e) {\n\t//\tprint(\"no icon found\");\n//\t}",
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" : "\"Roo 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}"
66 "string label" : "Open a new Window",
72 "xtype" : "SeparatorMenuItem",
77 "activate" : " ( ) => {\n Resources.singleton().fetchStart();\n}"
81 "string label" : "Download updated Resources",
86 "activate" : "() => {\n About.singleton().el.show();\n }"
88 "string label" : "About the Builder",
97 "utf8 icon_name" : "help-about",
98 "* pack" : "set_image",
105 "clicked" : " ( ) => {\n _this.windowstate.switchState(WindowState.State.FILES);\n \n\n}"
111 "$ tooltop_text" : "\"Open File\"",
114 "* pack" : "set_image",
116 "utf8 icon_name" : "document-open",
123 "clicked" : " ( ) => {\n \n _this.windowstate.switchState(WindowState.State.PREVIEW);\n \n\n}"
125 "id" : "openbackbtn",
126 "utf8 tooltip_text" : "Back",
130 "bool visible" : false,
133 "utf8 icon_name" : "go-previous",
134 "* pack" : "set_image",
149 "Gtk.Orientation orientation" : "Gtk.Orientation.VERTICAL",
150 "$ homogeneous" : false,
155 "* pack" : "pack_start,true,true,0",
156 "# int lastWidth" : 0,
159 "Gtk.Orientation orientation" : "Gtk.Orientation.HORIZONTAL",
166 "Gtk.Orientation orientation" : "Gtk.Orientation.VERTICAL",
171 "* pack" : "pack_start,true,true,0",
173 "Gtk.Orientation orientation" : "Gtk.Orientation.VERTICAL",
180 "Gtk.Orientation orientation" : "Gtk.Orientation.VERTICAL"
187 "Gtk.Orientation orientation" : "Gtk.Orientation.VERTICAL"
197 "Gtk.Orientation orientation" : "Gtk.Orientation.VERTICAL",
201 "size_allocate" : " ( alloc) => {\n if (_this.windowstate == null) {\n return;\n }\n _this.windowstate.resizeCanvas(); \n \n}"
203 "id" : "clutterembed",
204 "* init" : " var stage = this.el.get_stage();\n stage.set_background_color( Clutter.Color.from_string(\"#000\"));\n \n \n",
206 "* pack" : "pack_start,true,true,0",
207 "$ xns" : "GtkClutter",
211 "* 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}",
213 "* pack" : "get_stage().add_child",
214 "$ xns" : "GtkClutter"
218 "* 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}",
220 "* pack" : "get_stage().add_child",
221 "$ xns" : "GtkClutter"
224 "id" : "codeeditview",
225 "* 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}",
227 "* pack" : "get_stage().add_child",
228 "$ xns" : "GtkClutter"
231 "id" : "addpropsview",
232 "* 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}",
234 "* pack" : "get_stage().add_child",
235 "$ xns" : "GtkClutter"
238 "id" : "buttonlayout",
239 "* 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}",
241 "* pack" : "get_stage().add_child",
245 "$ orientation" : "Clutter.Orientation.VERTICAL",
246 "xtype" : "BoxLayout",
248 "* prop" : "layout_manager"
252 "* init" : "this.el.set_size(50,50);",
254 "* pack" : "add_child",
258 "* init" : "((Gtk.Container)(this.el.get_widget())).add ( child_0.el);",
260 "* pack" : "add_child",
261 "$ xns" : "GtkClutter",
265 "clicked" : " ( ) => {\n // if (_this.windowstate.state == WindowState.State.FILEPROJECT) {\n \n//\t _this.windowstate.switchState(WindowState.State.FILES);\n // } else { \n\t _this.windowstate.switchState(WindowState.State.PREVIEW);\n // }\n \n\n}"
267 "utf8 tooltip_text" : "Back",
270 "width_request" : 50,
272 "height_request" : 50,
275 "* pack" : "set_image",
277 "utf8 icon_name" : "go-previous",
287 "id" : "editfilebutton",
288 "* init" : "this.el.set_size(50.0f,50.0f);",
290 "* pack" : "add_child",
294 "* init" : "((Gtk.Container)(this.el.get_widget())).add ( child_0.el);",
295 "* pack" : "add_child",
297 "$ xns" : "GtkClutter",
301 "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}"
305 "width_request" : 50,
307 "$ tooltip_text" : "\"File Details\"",
308 "height_request" : 50,
312 "utf8 icon_name" : "document-properties",
313 "* pack" : "set_image",
323 "id" : "projecteditbutton",
324 "* init" : "this.el.set_size(50,50);",
326 "* pack" : "add_child",
330 "* init" : "((Gtk.Container)(this.el.get_widget())).add ( child_0.el);",
331 "* pack" : "add_child",
333 "$ xns" : "GtkClutter",
337 "clicked" : " ( ) => {\n \n _this.windowstate.projectPopoverShow(this.el);\n \n \n}"
341 "width_request" : 50,
343 "$ tooltip_text" : "\"Project Details\"",
344 "height_request" : 50,
347 "* pack" : "set_image",
349 "utf8 icon_name" : "emblem-system",
360 "enter_event" : "( event) => {\n this.el.background_color = Clutter.Color.from_string(\"#333\");\n return false;\n}",
361 "leave_event" : "( event) => {\n this.el.background_color = Clutter.Color.from_string(\"#000\");\n return false;\n}"
363 "id" : "objectshowbutton",
364 "* init" : "this.el.set_size(50,50);",
366 "* pack" : "add_child",
370 "* init" : "((Gtk.Container)(this.el.get_widget())).add ( child_0.el);",
371 "* pack" : "add_child",
373 "$ xns" : "GtkClutter",
377 "clicked" : " ( ) => {\n \n _this.windowstate.switchState(WindowState.State.OBJECT);\n \n \n}"
381 "width_request" : 50,
383 "$ tooltip_text" : "\"Add Child Element\"",
384 "height_request" : 50,
387 "utf8 icon_name" : "list-add",
388 "* pack" : "set_image",
399 "id" : "addpropbutton",
400 "* init" : "this.el.set_size(50,50);",
402 "* pack" : "add_child",
406 "* init" : "((Gtk.Container)(this.el.get_widget())).add ( child_0.el);",
407 "* pack" : "add_child",
409 "$ xns" : "GtkClutter",
413 "clicked" : " ( ) => {\n \n _this.windowstate.switchState(WindowState.State.PROP);\n \n\n}"
417 "width_request" : 50,
419 "$ tooltip_text" : "\"Add Property\"",
420 "height_request" : 50,
424 "utf8 icon_name" : "format-justify-left",
425 "* pack" : "set_image",
435 "id" : "addlistenerbutton",
436 "* init" : "this.el.set_size(50,50);",
438 "* pack" : "add_child",
442 "* init" : "((Gtk.Container)(this.el.get_widget())).add ( child_0.el);",
443 "* pack" : "add_child",
445 "$ xns" : "GtkClutter",
449 "clicked" : " ( ) => {\n \n _this.windowstate.switchState(WindowState.State.LISTENER);\n \n\n\n}"
453 "width_request" : 50,
455 "$ tooltip_text" : "\"Add Event Code\"",
456 "height_request" : 50,
459 "* pack" : "set_image",
461 "utf8 icon_name" : "appointment-new",
471 "id" : "addprojectbutton",
472 "* init" : "this.el.set_size(50.0f,50.0f);",
474 "* pack" : "add_child",
478 "* init" : "((Gtk.Container)(this.el.get_widget())).add ( child_0.el);",
479 "* pack" : "add_child",
481 "$ xns" : "GtkClutter",
485 "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}"
489 "width_request" : 50,
491 "$ tooltip_text" : "\"New\\nProj.\"",
492 "height_request" : 50,
496 "utf8 icon_name" : "folder-new",
497 "* pack" : "set_image",
507 "id" : "addfilebutton",
508 "* init" : "this.el.set_size(50.0f,50.0f);",
510 "* pack" : "add_child",
514 "* init" : "((Gtk.Container)(this.el.get_widget())).add ( child_0.el);",
515 "* pack" : "add_child",
517 "$ xns" : "GtkClutter",
521 "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}"
525 "width_request" : 50,
527 "$ tooltip_text" : "\"Add File\"",
528 "height_request" : 50,
531 "utf8 icon_name" : "document-new",
532 "* pack" : "set_image",
543 "id" : "delprojectbutton",
544 "* init" : "this.el.set_size(50,50);",
546 "* pack" : "add_child",
550 "* init" : "((Gtk.Container)(this.el.get_widget())).add ( child_0.el);",
551 "* pack" : "add_child",
553 "$ xns" : "GtkClutter",
557 "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}"
561 "width_request" : 50,
563 "$ tooltip_text" : "\"Delete Project\"",
564 "height_request" : 50,
568 "utf8 icon_name" : "user-trash",
569 "* pack" : "set_image",
587 "bool homogeneous" : false,
589 "* pack" : "pack_end,false,true,0",
591 "Gtk.Orientation orientation" : "Gtk.Orientation.HORIZONTAL",
594 "string label" : " ",
595 "* pack" : "pack_start,true,true,0",
600 "bool show_text" : true,
602 "ulong handler_id" : "-1",
603 "* 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",
604 "xtype" : "ProgressBar",
605 "* pack" : "pack_start,true,true,0",
610 "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} ",
611 "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"
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",
616 "xtype" : "SearchEntry",
618 "| 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 "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}"
629 "bool always_show_image" : true,
630 "id" : "search_results",
631 "Xcls_ValaCompileErrors popup" : "",
632 "string label" : "Matches",
634 "xtype" : "ImageMenuItem",
638 "utf8 icon_name" : "system-search",
639 "* pack" : "set_image",
641 "bool sensitive" : false,
647 "id" : "statusbar_compilestatus_label",
648 "xtype" : "MenuItem",
650 "string label" : "Compile Status:",
655 "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}"
657 "bool always_show_image" : true,
658 "id" : "statusbar_errors",
659 "| 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",
660 "Xcls_ValaCompileErrors popup" : "",
661 "string label" : "Errors",
663 "xtype" : "ImageMenuItem",
664 "# Json.Object notices" : "new Json.Object() ",
668 "* pack" : "set_image",
670 "utf8 icon_name" : "dialog-error",
677 "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}"
679 "bool always_show_image" : true,
680 "id" : "statusbar_warnings",
681 "| 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",
682 "Xcls_ValaCompileErrors popup" : "",
684 "string label" : "Warnings",
685 "xtype" : "ImageMenuItem",
686 "# Json.Object notices" : "new Json.Object()",
690 "utf8 icon_name" : "dialog-warning",
691 "* pack" : "set_image",
699 "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}"
701 "bool always_show_image" : true,
702 "id" : "statusbar_depricated",
703 "| 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",
704 "Xcls_ValaCompileErrors popup" : "",
705 "string label" : "Depricated",
707 "xtype" : "ImageMenuItem",
708 "# Json.Object notices" : "new Json.Object()",
713 "utf8 icon_name" : "dialog-information",
714 "* pack" : "set_image",
721 "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}"
723 "bool always_show_image" : true,
724 "id" : "statusbar_run",
725 "Xcls_ValaCompileErrors popup" : "",
726 "string label" : "Run",
728 "xtype" : "ImageMenuItem",
732 "utf8 icon_name" : "media-playback-start",
733 "* pack" : "set_image",
742 "id" : "statusbar_compile_spinner",
745 "| void stop" : "() {\n this.el.stop();\n this.el.hide();\n}\n",
746 "string tooltip_text" : "Compiling",
748 "| void start" : "() {\n this.el.show();\n this.el.start(); \n}\n"