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}"
17 "default_width" : 800,
18 "* init" : " \n\t \n //this.el.show_all();\n \n ",
19 "# Project.Project project" : "null",
20 "# string title" : "\"Application Builder\"",
22 "# int no_windows" : 1,
23 "default_height" : 500,
24 "| 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",
26 "| void show" : "() {\n \n this.el.show_all();\n\n}",
27 "# WindowState windowstate" : "null",
29 "$ type" : "Gtk.WindowType.TOPLEVEL",
30 "| void setTitle" : " (string str) {\n this.headerbar.el.set_title(this.title + \" - \" + str);\n} \n",
34 "xtype" : "HeaderBar",
35 "* pack" : "set_titlebar",
36 "bool show_close_button" : true,
38 "string title" : "Application Builder",
41 "* pack" : "pack_start",
44 "Gtk.Orientation orientation" : "Gtk.Orientation.HORIZONTAL",
47 "bool use_popover" : false,
48 "xtype" : "MenuButton",
54 "* init" : "{\n this.el.show_all();\n}\n",
56 "* pack" : "set_popup",
61 "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}"
63 "string label" : "Open a new Window",
70 "xtype" : "SeparatorMenuItem",
75 "activate" : " ( ) => {\n Resources.singleton().fetchStart();\n}"
78 "string label" : "Download updated Resources",
84 "activate" : "() => {\n About.singleton().el.show();\n }"
88 "string label" : "About the Builder",
94 "utf8 icon_name" : "help-about",
95 "* pack" : "set_image",
110 "Gtk.Orientation orientation" : "Gtk.Orientation.VERTICAL",
111 "$ homogeneous" : false,
116 "* pack" : "pack_start,true,true,0",
117 "# int lastWidth" : 0,
130 "* pack" : "pack_start,false,true,0",
156 "size_allocate" : " ( alloc) => {\n if (_this.windowstate == null) {\n return;\n }\n _this.windowstate.resizeCanvas(); \n \n}"
158 "id" : "clutterembed",
159 "* init" : " var stage = this.el.get_stage();\n stage.set_background_color( Clutter.Color.from_string(\"#000\"));\n \n \n",
161 "* pack" : "pack_start,true,true,0",
162 "$ xns" : "GtkClutter",
166 "* 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}",
168 "* pack" : "get_stage().add_child",
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 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}",
175 "* pack" : "get_stage().add_child",
176 "$ xns" : "GtkClutter"
179 "id" : "codeeditview",
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" : "addpropsview",
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" : "projecteditview",
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 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}",
196 "* pack" : "get_stage().add_child",
197 "$ xns" : "GtkClutter"
200 "id" : "buttonlayout",
201 "* 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}",
203 "* pack" : "get_stage().add_child",
207 "$ orientation" : "Clutter.Orientation.VERTICAL",
208 "xtype" : "BoxLayout",
210 "* prop" : "layout_manager"
214 "* init" : "this.el.set_size(50,50);",
216 "* pack" : "add_child",
220 "* init" : "((Gtk.Container)(this.el.get_widget())).add ( child_0.el);",
222 "* pack" : "add_child",
223 "$ xns" : "GtkClutter",
227 "clicked" : " ( ) => {\n \n _this.windowstate.switchState(WindowState.State.PREVIEW);\n \n\n}"
229 "utf8 tooltip_text" : "Back",
232 "width_request" : 50,
234 "height_request" : 50,
238 "utf8 icon_name" : "go-previous",
239 "* pack" : "set_image",
249 "id" : "projectbutton",
250 "* init" : "this.el.set_size(50,50);",
252 "* pack" : "add_child",
256 "* init" : "((Gtk.Container)(this.el.get_widget())).add ( child_0.el);",
257 "* pack" : "add_child",
259 "$ xns" : "GtkClutter",
263 "clicked" : " ( ) => {\n _this.windowstate.switchState(WindowState.State.FILES);\n \n\n}"
267 "width_request" : 50,
269 "height_request" : 50,
270 "$ tooltop_text" : "\"Open File\"",
273 "* pack" : "set_image",
275 "utf8 icon_name" : "document-open",
285 "id" : "editfilebutton",
286 "* init" : "this.el.set_size(50.0f,50.0f);",
288 "* pack" : "add_child",
292 "* init" : "((Gtk.Container)(this.el.get_widget())).add ( child_0.el);",
293 "* pack" : "add_child",
295 "$ xns" : "GtkClutter",
299 "clicked" : " ( ) => {\n \n // create a new file in project..\n if (_this.project == null || _this.windowstate.left_tree.model.file == null) {\n return ;\n }\n _this.windowstate.file_details.show(\n _this.windowstate.left_tree.model.file, this.el\n );\n \n return ; \n\n\n}"
303 "width_request" : 50,
305 "$ tooltip_text" : "\"File Details\"",
306 "height_request" : 50,
309 "utf8 icon_name" : "document-properties",
310 "* pack" : "set_image",
321 "id" : "projecteditbutton",
322 "* init" : "this.el.set_size(50,50);",
324 "* pack" : "add_child",
328 "* init" : "((Gtk.Container)(this.el.get_widget())).add ( child_0.el);",
329 "* pack" : "add_child",
331 "$ xns" : "GtkClutter",
335 "clicked" : " ( ) => {\n _this.windowstate.switchState(WindowState.State.PROJECT);\n \n\n\n}"
339 "width_request" : 50,
341 "$ tooltip_text" : "\"Project Details\"",
342 "height_request" : 50,
346 "utf8 icon_name" : "emblem-system",
347 "* pack" : "set_image",
358 "enter_event" : "( event) => {\n this.el.background_color = new Clutter.Color.from_string(\"#333\");\n return false;\n}",
359 "leave_event" : "( event) => {\n this.el.background_color = new Clutter.Color.from_string(\"#000\");\n return false;\n}"
361 "id" : "objectshowbutton",
362 "* init" : "this.el.set_size(50,50);",
364 "* pack" : "add_child",
368 "* init" : "((Gtk.Container)(this.el.get_widget())).add ( child_0.el);",
369 "* pack" : "add_child",
371 "$ xns" : "GtkClutter",
375 "clicked" : " ( ) => {\n \n _this.windowstate.switchState(WindowState.State.OBJECT);\n \n \n}"
379 "width_request" : 50,
381 "$ tooltip_text" : "\"Add Child Element\"",
382 "height_request" : 50,
385 "* pack" : "set_image",
387 "utf8 icon_name" : "list-add",
397 "id" : "addpropbutton",
398 "* init" : "this.el.set_size(50,50);",
400 "* pack" : "add_child",
404 "* init" : "((Gtk.Container)(this.el.get_widget())).add ( child_0.el);",
405 "* pack" : "add_child",
407 "$ xns" : "GtkClutter",
411 "clicked" : " ( ) => {\n \n _this.windowstate.switchState(WindowState.State.PROP);\n \n\n}"
415 "width_request" : 50,
417 "$ tooltip_text" : "\"Add Property\"",
418 "height_request" : 50,
421 "utf8 icon_name" : "format-justify-left",
422 "* pack" : "set_image",
433 "id" : "addlistenerbutton",
434 "* init" : "this.el.set_size(50,50);",
436 "* pack" : "add_child",
440 "* init" : "((Gtk.Container)(this.el.get_widget())).add ( child_0.el);",
441 "* pack" : "add_child",
443 "$ xns" : "GtkClutter",
447 "clicked" : " ( ) => {\n \n _this.windowstate.switchState(WindowState.State.LISTENER);\n \n\n\n}"
451 "width_request" : 50,
453 "$ tooltip_text" : "\"Add Event Code\"",
454 "height_request" : 50,
458 "utf8 icon_name" : "appointment-new",
459 "* pack" : "set_image",
469 "id" : "addprojectbutton",
470 "* init" : "this.el.set_size(50.0f,50.0f);",
472 "* pack" : "add_child",
476 "* init" : "((Gtk.Container)(this.el.get_widget())).add ( child_0.el);",
477 "* pack" : "add_child",
479 "$ xns" : "GtkClutter",
483 "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}"
487 "width_request" : 50,
489 "$ tooltip_text" : "\"New\\nProj.\"",
490 "height_request" : 50,
493 "utf8 icon_name" : "folder-new",
494 "* pack" : "set_image",
505 "id" : "addfilebutton",
506 "* init" : "this.el.set_size(50.0f,50.0f);",
508 "* pack" : "add_child",
512 "* init" : "((Gtk.Container)(this.el.get_widget())).add ( child_0.el);",
513 "* pack" : "add_child",
515 "$ xns" : "GtkClutter",
519 "clicked" : " () => {\n // create a new file in project..\n \n // what's the currently selected project...\n var proj = _this.windowstate.left_projects.getSelectedProject();\n \n if (proj == null) {\n return ;\n }\n \n \n \n var f = JsRender.JsRender.factory(proj.xtype, proj, \"\");\n _this.project = proj;\n \n _this.windowstate.file_details.show(\n f, this.el\n );\n \n \n return ; \n}"
523 "width_request" : 50,
525 "$ tooltip_text" : "\"Add File\"",
526 "height_request" : 50,
529 "* pack" : "set_image",
531 "utf8 icon_name" : "document-new",
541 "id" : "delprojectbutton",
542 "* init" : "this.el.set_size(50,50);",
544 "* pack" : "add_child",
548 "* init" : "((Gtk.Container)(this.el.get_widget())).add ( child_0.el);",
549 "* pack" : "add_child",
551 "$ xns" : "GtkClutter",
555 "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}"
559 "width_request" : 50,
561 "$ tooltip_text" : "\"Delete Project\"",
562 "height_request" : 50,
565 "utf8 icon_name" : "user-trash",
566 "* pack" : "set_image",
585 "bool homogeneous" : false,
587 "* pack" : "pack_end,false,true,0",
591 "* pack" : "pack_start,true,true,0",
593 "string label" : " ",
597 "bool show_text" : true,
599 "ulong handler_id" : "-1",
600 "* 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",
601 "xtype" : "ProgressBar",
602 "* pack" : "pack_start,true,true,0",
606 "* pack" : "pack_end,false,true,0",
611 "xtype" : "MenuItem",
612 "string label" : "Compile Status:",
618 "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}"
620 "bool always_show_image" : true,
621 "id" : "statusbar_errors",
622 "| 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",
623 "Xcls_ValaCompileErrors popup" : "",
624 "string label" : "Errors",
626 "xtype" : "ImageMenuItem",
627 "# Json.Object notices" : "new Json.Object() ",
632 "utf8 icon_name" : "dialog-error",
633 "* pack" : "set_image",
640 "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}"
642 "bool always_show_image" : true,
643 "id" : "statusbar_warnings",
644 "| 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",
645 "Xcls_ValaCompileErrors popup" : "",
647 "string label" : "Warnings",
648 "xtype" : "ImageMenuItem",
649 "# Json.Object notices" : "new Json.Object()",
653 "* pack" : "set_image",
655 "utf8 icon_name" : "dialog-warning",
662 "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}"
664 "bool always_show_image" : true,
665 "id" : "statusbar_depricated",
666 "| 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",
667 "Xcls_ValaCompileErrors popup" : "",
668 "string label" : "Depricated",
670 "xtype" : "ImageMenuItem",
671 "# Json.Object notices" : "new Json.Object()",
675 "utf8 icon_name" : "dialog-information",
676 "* pack" : "set_image",