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 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 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",
46 "bool use_popover" : false,
47 "xtype" : "MenuButton",
53 "* init" : "{\n this.el.show_all();\n}\n",
55 "* pack" : "set_popup",
60 "activate" : "() => {\n About.singleton().el.show();\n }"
62 "string label" : "About the Builder",
70 "* pack" : "set_image",
72 "utf8 icon_name" : "help-about",
86 "$ homogeneous" : false,
91 "* pack" : "pack_start,true,true,0",
92 "# int lastWidth" : 0,
105 "* pack" : "pack_start,false,true,0",
131 "size_allocate" : " ( alloc) => {\n if (_this.windowstate == null) {\n return;\n }\n _this.windowstate.resizeCanvas(); \n \n}"
133 "id" : "clutterembed",
134 "* init" : " var stage = this.el.get_stage();\n stage.set_background_color( Clutter.Color.from_string(\"#000\"));\n \n \n",
136 "* pack" : "pack_start,true,true,0",
137 "$ xns" : "GtkClutter",
141 "* 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}",
143 "* pack" : "get_stage().add_child",
144 "$ xns" : "GtkClutter"
148 "* 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}",
150 "* pack" : "get_stage().add_child",
151 "$ xns" : "GtkClutter"
154 "id" : "codeeditview",
155 "* 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}",
157 "* pack" : "get_stage().add_child",
158 "$ xns" : "GtkClutter"
161 "id" : "addpropsview",
162 "* 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}",
164 "* pack" : "get_stage().add_child",
165 "$ xns" : "GtkClutter"
168 "id" : "projecteditview",
169 "* 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}",
171 "* pack" : "get_stage().add_child",
172 "$ xns" : "GtkClutter"
175 "id" : "buttonlayout",
176 "* 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}",
178 "* pack" : "get_stage().add_child",
182 "$ orientation" : "Clutter.Orientation.VERTICAL",
183 "xtype" : "BoxLayout",
185 "* prop" : "layout_manager"
189 "* init" : "this.el.set_size(50,50);",
191 "* pack" : "add_child",
195 "* init" : "((Gtk.Container)(this.el.get_widget())).add ( child_0.el);",
197 "* pack" : "add_child",
198 "$ xns" : "GtkClutter",
202 "clicked" : " ( ) => {\n \n _this.windowstate.switchState(WindowState.State.PREVIEW);\n \n\n}"
204 "utf8 tooltip_text" : "Back",
207 "width_request" : 50,
209 "height_request" : 50,
212 "utf8 icon_name" : "go-previous",
213 "* pack" : "set_image",
224 "id" : "projectbutton",
225 "* init" : "this.el.set_size(50,50);",
227 "* pack" : "add_child",
231 "* init" : "((Gtk.Container)(this.el.get_widget())).add ( child_0.el);",
232 "* pack" : "add_child",
234 "$ xns" : "GtkClutter",
238 "clicked" : " ( ) => {\n _this.windowstate.switchState(WindowState.State.FILES);\n \n\n}"
242 "width_request" : 50,
244 "height_request" : 50,
245 "$ tooltop_text" : "\"Open File\"",
249 "utf8 icon_name" : "document-open",
250 "* pack" : "set_image",
260 "id" : "editfilebutton",
261 "* init" : "this.el.set_size(50.0f,50.0f);",
263 "* pack" : "add_child",
267 "* init" : "((Gtk.Container)(this.el.get_widget())).add ( child_0.el);",
268 "* pack" : "add_child",
270 "$ xns" : "GtkClutter",
274 "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.new_file_dialog.show(_this.windowstate.left_tree.model.file);\n \n return ; \n\n\n}"
278 "width_request" : 50,
280 "$ tooltip_text" : "\"File Details\"",
281 "height_request" : 50,
284 "* pack" : "set_image",
286 "utf8 icon_name" : "document-properties",
296 "id" : "projecteditbutton",
297 "* init" : "this.el.set_size(50,50);",
299 "* pack" : "add_child",
303 "* init" : "((Gtk.Container)(this.el.get_widget())).add ( child_0.el);",
304 "* pack" : "add_child",
306 "$ xns" : "GtkClutter",
310 "clicked" : " ( ) => {\n _this.windowstate.switchState(WindowState.State.PROJECT);\n \n\n\n}"
314 "width_request" : 50,
316 "$ tooltip_text" : "\"Project Details\"",
317 "height_request" : 50,
320 "utf8 icon_name" : "emblem-system",
321 "* pack" : "set_image",
333 "enter_event" : "( event) => {\n this.el.background_color = new Clutter.Color.from_string(\"#333\");\n return false;\n}",
334 "leave_event" : "( event) => {\n this.el.background_color = new Clutter.Color.from_string(\"#000\");\n return false;\n}"
336 "id" : "objectshowbutton",
337 "* init" : "this.el.set_size(50,50);",
339 "* pack" : "add_child",
343 "* init" : "((Gtk.Container)(this.el.get_widget())).add ( child_0.el);",
344 "* pack" : "add_child",
346 "$ xns" : "GtkClutter",
350 "clicked" : " ( ) => {\n \n _this.windowstate.switchState(WindowState.State.OBJECT);\n \n \n}"
354 "width_request" : 50,
356 "$ tooltip_text" : "\"Add Child Element\"",
357 "height_request" : 50,
361 "utf8 icon_name" : "list-add",
362 "* pack" : "set_image",
372 "id" : "addpropbutton",
373 "* init" : "this.el.set_size(50,50);",
375 "* pack" : "add_child",
379 "* init" : "((Gtk.Container)(this.el.get_widget())).add ( child_0.el);",
380 "* pack" : "add_child",
382 "$ xns" : "GtkClutter",
386 "clicked" : " ( ) => {\n \n _this.windowstate.switchState(WindowState.State.PROP);\n \n\n}"
390 "width_request" : 50,
392 "$ tooltip_text" : "\"Add Property\"",
393 "height_request" : 50,
396 "* pack" : "set_image",
398 "utf8 icon_name" : "format-justify-left",
408 "id" : "addlistenerbutton",
409 "* init" : "this.el.set_size(50,50);",
411 "* pack" : "add_child",
415 "* init" : "((Gtk.Container)(this.el.get_widget())).add ( child_0.el);",
416 "* pack" : "add_child",
418 "$ xns" : "GtkClutter",
422 "clicked" : " ( ) => {\n \n _this.windowstate.switchState(WindowState.State.LISTENER);\n \n\n\n}"
426 "width_request" : 50,
428 "$ tooltip_text" : "\"Add Event Code\"",
429 "height_request" : 50,
432 "utf8 icon_name" : "appointment-new",
433 "* pack" : "set_image",
444 "id" : "addprojectbutton",
445 "* init" : "this.el.set_size(50.0f,50.0f);",
447 "* pack" : "add_child",
451 "* init" : "((Gtk.Container)(this.el.get_widget())).add ( child_0.el);",
452 "* pack" : "add_child",
454 "$ xns" : "GtkClutter",
458 "clicked" : " ( ) => {\n \n // create a new file in project..\n //Xcls_DialogNewComponent.singleton().show(\n var pe = Xcls_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}"
462 "width_request" : 50,
464 "$ tooltip_text" : "\"New\\nProj.\"",
465 "height_request" : 50,
468 "* pack" : "set_image",
470 "utf8 icon_name" : "folder-new",
480 "id" : "addfilebutton",
481 "* init" : "this.el.set_size(50.0f,50.0f);",
483 "* pack" : "add_child",
487 "* init" : "((Gtk.Container)(this.el.get_widget())).add ( child_0.el);",
488 "* pack" : "add_child",
490 "$ xns" : "GtkClutter",
494 "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 _this.windowstate.new_file_dialog.show(f);\n \n return ; \n}"
498 "width_request" : 50,
500 "$ tooltip_text" : "\"Add File\"",
501 "height_request" : 50,
505 "utf8 icon_name" : "document-new",
506 "* pack" : "set_image",
516 "id" : "delprojectbutton",
517 "* init" : "this.el.set_size(50,50);",
519 "* pack" : "add_child",
523 "* init" : "((Gtk.Container)(this.el.get_widget())).add ( child_0.el);",
524 "* pack" : "add_child",
526 "$ xns" : "GtkClutter",
530 "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}"
534 "width_request" : 50,
536 "$ tooltip_text" : "\"Delete Project\"",
537 "height_request" : 50,
540 "* pack" : "set_image",
542 "utf8 icon_name" : "user-trash",
552 "id" : "reload_resources",
553 "* init" : "this.el.set_size(50,50);",
555 "* pack" : "add_child",
559 "* init" : "((Gtk.Container)(this.el.get_widget())).add ( child_0.el);",
561 "* pack" : "add_child",
562 "$ xns" : "GtkClutter",
566 "clicked" : " ( ) => {\n Resources.singleton().fetchStart();\n}"
570 "width_request" : 50,
572 "$ utf8 tooltip_text" : "\"Download latest resourse files\\nlike the object tree and object properties\"",
573 "height_request" : 50,
576 "utf8 icon_name" : "go-bottom",
577 "* pack" : "set_image",
589 "* init" : "this.el.set_size(50,50);",
591 "* pack" : "add_child",
595 "* init" : "((Gtk.Container)(this.el.get_widget())).add ( child_0.el);",
596 "* pack" : "add_child",
598 "$ xns" : "GtkClutter",
602 "clicked" : " ( ) => {\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}"
604 "utf8 tooltip_text" : "Open New Window",
607 "width_request" : 50,
609 "height_request" : 50,
612 "* pack" : "set_image",
614 "utf8 icon_name" : "window-new",
625 "* init" : "this.el.set_size(50,50);",
627 "* pack" : "add_child",
631 "* init" : "((Gtk.Container)(this.el.get_widget())).add ( child_0.el);",
633 "* pack" : "add_child",
634 "$ xns" : "GtkClutter",
638 "clicked" : " ( ) => {\n About.singleton().el.show();\n}"
640 "utf8 tooltip_text" : "About the builder",
643 "width_request" : 50,
645 "height_request" : 50,
648 "utf8 icon_name" : "help-about",
649 "* pack" : "set_image",
669 "* init" : "{\n Resources.singleton().updateProgress.connect((pos) => {\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 \n this.el.show();\n var cid = this.el.get_context_id(\"resources\");\n this.el.remove_all(cid);\n this.el.push(cid,\"Fetching Resource : %s/7\".printf(pos.to_string()));\n });\n}\n",
670 "xtype" : "Statusbar",
671 "* pack" : "pack_end,false,true,0",