2 "build_module" : "builder",
5 "# Project.Project project" : "null",
6 "# WindowState windowstate" : "",
7 "# string title" : "\"Roo Application Builder\"",
8 "$ type" : "Gtk.WindowType.TOPLEVEL",
13 " this.el.set_icon_name(\"roobuilder\");",
17 "default_height" : 850,
18 "default_width" : 1200,
23 "* pack" : "set_titlebar",
24 "bool show_close_button" : true,
29 "* pack" : "pack_start",
30 "Gtk.Orientation orientation" : "Gtk.Orientation.HORIZONTAL",
33 "# Gee.ArrayList<Gtk.MenuItem> mitems" : "",
34 "$ Gtk.Align halign" : "Gtk.Align.START",
35 "$ Gtk.ArrowType direction" : "Gtk.ArrowType.DOWN",
39 "\tthis.mitems = new Gee.ArrayList<Gtk.MenuItem>();",
44 "bool always_show_image" : true,
45 "bool use_popover" : false,
51 "* pack" : "set_image",
52 "utf8 icon_name" : "window-new",
59 " this.el.show_all();",
71 "\t_this.windowstate.showPopoverFiles(_this.windowbtn.el, _this.project, true);",
76 "string label" : "New Window",
82 "xtype" : "SeparatorMenuItem"
88 "string label" : "Windows",
89 "xtype" : "MenuButton",
90 "| void updateMenu" : [
92 "\t foreach(var m in this.mitems) {",
93 "\t \t this.el.popup.remove(m);",
95 "\t this.mitems.clear();",
97 "\t foreach(var w in BuilderApplication.windows) {",
98 "\t \tvar wid = BuilderApplication.windows.index_of(w);",
99 "\t \t// fixme find a better way to display this.",
100 " \t\tif (w.windowstate == null ||",
101 " \t\t\t w.windowstate.file == null || ",
102 " \t\t\t _this.windowstate == null ||",
103 " \t\t\t _this.windowstate.file == null",
108 "\t \tif (w.windowstate.file.path == _this.windowstate.file.path) {",
112 " \t\tGLib.debug(\"add menuitem %s\", w.windowstate.file.path);",
113 "\t \tvar m = new Gtk.MenuItem.with_label(w.windowstate.file.path);",
114 "\t \tm.activate.connect(() => {",
115 "\t \t\t BuilderApplication.windows.get(wid).el.present();",
117 "\t \tthis.el.popup.append(m);",
119 "\t \tthis.mitems.add(m);",
125 "$ tooltop_text" : "\"Open File\"",
128 "bool always_show_image" : true,
129 "id" : "open_projects_btn",
133 "* pack" : "set_image",
134 "utf8 icon_name" : "system-file-manager",
141 " \t_this.windowstate.showPopoverFiles(this.el, _this.project, false);",
146 "string label" : "Files / Projects",
153 "string title" : "Application Builder",
154 "xtype" : "HeaderBar"
157 "$ homogeneous" : false,
160 "Gtk.Orientation orientation" : "Gtk.Orientation.VERTICAL",
164 "# int lastWidth" : 0,
166 "* pack" : "pack_start,true,true,0",
167 "Gtk.Orientation orientation" : "Gtk.Orientation.HORIZONTAL",
173 "Gtk.Orientation orientation" : "Gtk.Orientation.HORIZONTAL",
178 "* pack" : "pack_start,true,true,0",
179 "Gtk.Orientation orientation" : "Gtk.Orientation.HORIZONTAL",
185 "Gtk.Orientation orientation" : "Gtk.Orientation.VERTICAL",
192 "Gtk.Orientation orientation" : "Gtk.Orientation.VERTICAL",
198 "accept_position" : [
200 "\tGLib.debug(\"Accept postion\");",
206 "\tGLib.debug(\"Move handle\");",
219 "Gtk.Orientation orientation" : "Gtk.Orientation.VERTICAL",
224 "Gtk.Orientation orientation" : "Gtk.Orientation.VERTICAL",
225 "bool vexpand" : true,
232 "Gtk.Orientation orientation" : "Gtk.Orientation.VERTICAL",
233 "bool vexpand" : true,
234 "id" : "codeeditviewbox",
246 "* pack" : "pack_end,false,true,0",
247 "Gtk.Orientation orientation" : "Gtk.Orientation.HORIZONTAL",
248 "bool homogeneous" : false,
251 "$ tooltip_text" : "\"Project Details\"",
254 "bool always_show_image" : true,
258 "* pack" : "set_image",
259 "utf8 icon_name" : "emblem-system",
267 " _this.windowstate.projectPopoverShow(this.el, _this.project);",
273 "string label" : "Edit Project Settings",
277 "$ tooltip_text" : "\"File Details\"",
280 "bool always_show_image" : true,
284 "* pack" : "set_image",
285 "utf8 icon_name" : "document-properties",
293 " // create a new file in project..",
294 " if (_this.project == null || _this.windowstate.file == null) {",
297 " _this.windowstate.file_details.show(",
298 " _this.windowstate.file, this.el, false",
307 "string label" : "Edit File Properties",
313 "bool always_show_image" : true,
319 " this.el.show_all();",
323 "* pack" : "set_popup",
332 " Resources.singleton().fetchStart();",
336 "string label" : "Download updated Resources",
345 " About.singleton().el.show();",
349 "string label" : "About the Builder",
357 "* pack" : "set_image",
358 "utf8 icon_name" : "dialog-information",
362 "string label" : "About",
363 "xtype" : "MenuButton"
367 "* pack" : "pack_start,true,true,0",
368 "string label" : " ",
375 " this.handler_id = Resources.singleton().updateProgress.connect((pos,total) => {",
378 " _this.mainpane.el.set_sensitive(true);",
382 " _this.mainpane.el.set_sensitive(false);",
384 " this.el.set_fraction ((1.0f * pos) / (1.0f * total));",
385 " this.el.set_text(\"Fetching Resource : %s/%s\".printf(pos.to_string(), total.to_string()));",
391 "* pack" : "pack_start,true,true,0",
392 "bool show_text" : true,
394 "ulong handler_id" : "-1",
395 "xtype" : "ProgressBar"
404 "id" : "statusbar_compilestatus_label",
405 "string label" : "Compile Status:",
409 "# Json.Object notices" : "new Json.Object() ",
412 "Xcls_ValaCompileErrors popup" : "",
413 "id" : "statusbar_errors",
417 "Gtk.Orientation orientation" : "Gtk.Orientation.HORIZONTAL",
422 "utf8 icon_name" : "dialog-error",
427 "id" : "statusbar_errors_label",
428 "string label" : "Errors",
436 "button_press_event" : [
438 " if (this.popup == null) {",
439 " this.popup = new Xcls_ValaCompileErrors();",
440 " this.popup.window = _this;",
444 " this.popup.show(this.notices, this.el);",
449 "xtype" : "MenuItem",
450 "| void setNotices" : [
451 "(Json.Object nots, int qty) {",
452 " this.el.show_all();",
453 " _this.statusbar_errors_label.el.label = qty.to_string() + \" Errors\";",
454 " this.notices = nots;",
461 "# Json.Object notices" : "new Json.Object()",
464 "Xcls_ValaCompileErrors popup" : "",
465 "id" : "statusbar_warnings",
469 "Gtk.Orientation orientation" : "Gtk.Orientation.HORIZONTAL",
474 "utf8 icon_name" : "dialog-warning",
479 "id" : "statusbar_warnings_label",
480 "string label" : "Errors",
488 "button_press_event" : [
490 " if (this.popup == null) {",
491 " this.popup = new Xcls_ValaCompileErrors();",
492 " this.popup.window = _this;",
495 " this.popup.show(this.notices, this.el);",
500 "xtype" : "MenuItem",
501 "| void setNotices" : [
502 "(Json.Object nots, int qty) {",
503 " this.el.show_all();",
504 " _this.statusbar_warnings_label.el.label = qty.to_string() + \" Warnings\";",
505 " this.notices = nots;",
512 "# Json.Object notices" : "new Json.Object()",
515 "Xcls_ValaCompileErrors popup" : "",
516 "id" : "statusbar_depricated",
520 "Gtk.Orientation orientation" : "Gtk.Orientation.HORIZONTAL",
525 "utf8 icon_name" : "dialog-information",
530 "id" : "statusbar_depricated_label",
531 "string label" : "Errors",
539 "button_press_event" : [
541 " if (this.popup == null) {",
542 " this.popup = new Xcls_ValaCompileErrors();",
543 " this.popup.window = _this;",
547 " this.popup.show(this.notices, this.el);",
552 "xtype" : "MenuItem",
553 "| void setNotices" : [
554 "(Json.Object nots, int qty) {",
555 " this.el.show_all();",
556 " _this.statusbar_depricated_label.el.label = qty.to_string() + \" Depricated\";",
557 " this.notices = nots;",
566 "Xcls_ValaCompileErrors popup" : "",
567 "id" : "statusbar_run",
571 "Gtk.Orientation orientation" : "Gtk.Orientation.HORIZONTAL",
576 "utf8 icon_name" : "media-playback-start",
581 "string label" : "Run",
589 "button_press_event" : [
591 "\tif (_this.windowstate.file == null) {",
594 "\tBuilderApplication.valasource.spawnExecute(_this.windowstate.file);",
596 "\t_this.windowstate.compile_results.show(this.el,true);",
610 "id" : "statusbar_compile_spinner",
611 "string tooltip_text" : "Compiling",
616 " this.el.start(); ",
645 " Resources.singleton().disconnect(_this.statusbar.handler_id);",
647 " BuilderApplication.removeWindow(this);",
649 " if (BuilderApplication.windows.size < 1) {",
655 "key_release_event" : [
660 "\tif (event.keyval == Gdk.Key.n && (event.state & Gdk.ModifierType.CONTROL_MASK ) > 0 ) {",
661 "\t\tprint(\"SAVE: ctrl-n pressed\");",
662 "\t\t_this.windowstate.showPopoverFiles(_this.windowbtn.el, _this.project, true);",
666 " // print(event.key.keyval)",
676 " // hide the file editing..",
678 " //this.hideViewEditing();",
679 " _this.statusbar.el.hide();",
680 " _this.statusbar_errors.el.hide();",
681 " _this.statusbar_warnings.el.hide();",
682 " _this.statusbar_depricated.el.hide();",
683 " _this.statusbar_compile_spinner.el.hide();",
685 " Resources.singleton().checkResources();",
691 "| void initChildren" : [
693 " // this needs putting in a better place..",
694 " this.windowstate = new WindowState(this);",
706 "| void openNewWindow" : [
709 " var w = new Xcls_MainWindow();",
711 "\tBuilderApplication.addWindow(w);",
713 " w.initChildren();",
714 " w.windowstate.showPopoverFiles(w.open_projects_btn.el, _this.project, false);",
719 "| void setTitle" : [
721 " this.headerbar.el.set_title(this.title + \" - \" + str);",
728 " this.el.show_all();",
735 "name" : "MainWindow",
737 "path" : "/home/alan/gitlive/roobuilder/src/Builder4/MainWindow.bjs",