2 "build_module" : "builder",
3 "gen_extended" : false,
6 "# Project.Project project" : "null",
7 "# WindowState windowstate" : "",
8 "# bool winloading" : false,
9 "$ type" : "Gtk.WindowType.TOPLEVEL",
11 "* ctor" : "new Gtk.ApplicationWindow(BuilderApplication.singleton({}))",
14 "this.el.set_icon_name(\"roobuilder\");",
18 "default_height" : 850,
19 "default_width" : 1200,
24 "* pack" : "set_titlebar",
25 "bool show_close_button" : true,
30 "* pack" : "pack_start",
31 "Gtk.Orientation orientation" : "Gtk.Orientation.HORIZONTAL",
36 "bool has_frame" : false,
37 "bool has_tooltip" : true,
42 "string icon_name" : "preferences-system-windows",
43 "string label" : " Files",
44 "xtype" : "ButtonContent"
50 " \t_this.splitview.el.show_sidebar = !_this.splitview.el.show_sidebar;",
51 " \tif (_this.splitview.el.show_sidebar) {",
52 " \t\t_this.sidebar.show(); ",
57 "string tooltip_text" : "Manage Windows (Ctrl-O)",
69 "bool collapsed" : true,
70 "bool show_sidebar" : false,
71 "double sidebar_width_fraction" : 0.40000000000000002,
77 "Gtk.Orientation orientation" : "Gtk.Orientation.VERTICAL",
78 "bool hexpand" : true,
79 "bool homogeneous" : false,
80 "bool vexpand" : false,
85 "# int lastWidth" : 0,
87 "Gtk.Orientation orientation" : "Gtk.Orientation.HORIZONTAL",
88 "bool hexpand" : true,
89 "bool vexpand" : true,
94 "* prop" : "start_child",
95 "Gtk.Orientation orientation" : "Gtk.Orientation.HORIZONTAL",
96 "bool hexpand" : true,
97 "bool vexpand" : true,
102 "Gtk.Orientation orientation" : "Gtk.Orientation.HORIZONTAL",
107 "* prop" : "start_child",
108 "Gtk.Orientation orientation" : "Gtk.Orientation.VERTICAL",
109 "bool hexpand" : true,
110 "bool vexpand" : true,
116 "* prop" : "end_child",
117 "Gtk.Orientation orientation" : "Gtk.Orientation.VERTICAL",
118 "bool hexpand" : true,
119 "bool vexpand" : true,
125 "accept_position" : [
127 "\t_this.windowstate.left_tree.onresize();",
134 "\tGLib.debug(\"Move handle\");",
146 "* prop" : "end_child",
147 "Gtk.Orientation orientation" : "Gtk.Orientation.VERTICAL",
148 "bool hexpand" : true,
149 "bool vexpand" : true,
153 "Gtk.Orientation orientation" : "Gtk.Orientation.VERTICAL",
154 "bool hexpand" : true,
155 "bool vexpand" : true,
161 "Gtk.Orientation orientation" : "Gtk.Orientation.VERTICAL",
162 "bool hexpand" : true,
163 "bool vexpand" : true,
164 "id" : "codeeditviewbox",
172 "accept_position" : [
174 "\t_this.windowstate.left_tree.onresize();",
185 "Gtk.Orientation orientation" : "Gtk.Orientation.HORIZONTAL",
186 "bool homogeneous" : false,
187 "bool vexpand" : false,
190 "$ tooltip_text" : "\"Project Details\"",
192 "bool always_show_image" : true,
197 " _this.windowstate.projectPopoverShow(_this.el, null, null);",
203 "string icon_name" : "emblem-system",
204 "string label" : "Edit Project Settings",
208 "$ tooltip_text" : "\"File Details\"",
210 "bool always_show_image" : true,
215 " // create a new file in project..",
216 " if (_this.project == null || _this.windowstate.file == null) {",
219 " _this.windowstate.file_details.show(",
220 " _this.windowstate.file, _this.el, false",
229 "string icon_name" : "document-properties",
230 "string label" : "Edit File Properties",
235 "bool always_show_image" : true,
239 "* ctor" : "new Gtk.PopoverMenu.from_model(null)",
242 " // this.el.show();",
246 "* prop" : "popover",
251 "* pack" : "set_child",
252 "Gtk.Orientation orientation" : "Gtk.Orientation.VERTICAL",
260 " Resources.singleton().fetchStart();",
264 "string label" : "Download updated Resources",
272 " About.singleton().el.show();",
276 "string label" : "About the Builder",
283 "xtype" : "PopoverMenu"
286 "string icon_name" : "dialog-information",
287 "string label" : "About",
288 "xtype" : "MenuButton"
292 "bool hexpand" : true,
293 "string label" : " ",
300 " this.handler_id = Resources.singleton().updateProgress.connect((pos,total) => {",
303 " _this.mainpane.el.set_sensitive(true);",
307 " _this.mainpane.el.set_sensitive(false);",
309 " this.el.set_fraction ((1.0f * pos) / (1.0f * total));",
310 " this.el.set_text(\"Fetching Resource : %s/%s\".printf(pos.to_string(), total.to_string()));",
316 "bool show_text" : true,
318 "ulong handler_id" : "-1",
319 "xtype" : "ProgressBar"
322 "$ Gtk.Orientation orientation" : "Gtk.Orientation.HORIZONTAL",
327 "id" : "statusbar_compilestatus_label",
328 "int margin_end" : 4,
329 "int margin_start" : 4,
330 "string label" : "Compile Status:",
335 "Xcls_ValaCompileErrors popup" : "",
336 "id" : "statusbar_errors",
341 "\tif (this.popup == null) {",
345 " this.popup.show();",
350 "string icon_name" : "dialog-error",
351 "string label" : "0 Errors",
353 "| void setNotices" : [
354 "(GLib.ListStore nots, int ferrors ) {",
355 " BuilderApplication.showSpinner(\"\");",
356 " if (nots.get_n_items() < 1 ) {",
357 " \tthis.el.hide();",
358 " \tif (this.popup != null) {",
359 " \t\tthis.popup.el.hide();",
365 " this.el.label = \"%d/%d Errors\".printf(ferrors,(int)nots.get_n_items());",
369 "\tif (this.popup == null) {",
370 " this.popup = new Xcls_ValaCompileErrors();",
371 " this.popup.window = _this;",
372 " // this.popup.el.set_transient_for( _this.el );",
373 " this.popup.el.set_parent(this.el);",
376 "\tthis.popup.updateNotices(nots);",
384 "Xcls_ValaCompileErrors popup" : "",
385 "id" : "statusbar_warnings",
390 "\tif (this.popup == null) {",
394 " this.popup.show();",
399 "string icon_name" : "dialog-warning",
400 "string label" : "0 Warnings",
402 "| void setNotices" : [
403 "(GLib.ListStore nots, int ferrs ) {",
405 " if (nots.get_n_items() < 1 ) {",
406 " \tthis.el.hide();",
407 " \tif (this.popup != null) {",
408 " \t\tthis.popup.el.hide();",
414 " this.el.label = \"%d/%d Warnings\".printf(ferrs,(int)nots.get_n_items());",
418 "\tif (this.popup == null) {",
419 " this.popup = new Xcls_ValaCompileErrors();",
420 " this.popup.window = _this;",
421 " // this.popup.el.set_transient_for( _this.el );",
422 " this.popup.el.set_parent(this.el);",
424 "\tthis.popup.updateNotices(nots);",
431 "# GLib.ListStore notices" : "null",
433 "Xcls_ValaCompileErrors popup" : "",
434 "id" : "statusbar_depricated",
439 "\tif (this.popup == null) {",
443 " this.popup.show();",
448 "string icon_name" : "dialog-information",
449 "string label" : "0 Depricated",
451 "| void setNotices" : [
453 "(GLib.ListStore nots, int ferrs ) {",
455 " if (nots.get_n_items() < 1 ) {",
456 " \tthis.el.hide();",
457 " \tif (this.popup != null) {",
458 " \t\tthis.popup.el.hide();",
464 " this.el.label = \"%d/%d Depricated\".printf(ferrs,(int)nots.get_n_items());",
468 "\tif (this.popup == null) {",
469 " this.popup = new Xcls_ValaCompileErrors();",
470 " this.popup.window = _this;",
471 " // this.popup.el.set_transient_for( _this.el );",
472 " this.popup.el.set_parent(this.el);",
474 "\tthis.popup.updateNotices(nots);",
482 "Palete.ValaCompileRequest? last_request" : "null",
483 "Xcls_ValaCompileErrors popup" : "",
484 "bool visible" : false,
485 "id" : "statusbar_run",
490 " if (_this.windowstate.file == null) {",
493 " if (_this.statusbar_compile_spinner.el.spinning) {",
494 " \t_this.windowstate.compile_results.el.set_parent(this.el);",
495 "\t _this.windowstate.compile_results.el.show(); // show currently running.",
499 "\tif (this.last_request != null) {",
500 "\t\tthis.last_request.cancel();",
501 "\t\tif (this.last_request.terminal_pid > 0) {",
502 "\t\t\tthis.last_request.killChildren(this.last_request.terminal_pid);",
505 "\tvar pr = _this.windowstate.project as Project.Gtk;",
506 "\tif (pr == null) {",
511 "\tthis.last_request= new Palete.ValaCompileRequest(",
513 "\t\tpr.firstBuildModuleWith(_this.windowstate.file)",
515 "\tthis.last_request.onOutput.connect( ( str) => {",
516 "\t\t_this.windowstate.compile_results.addLine(str);",
518 "\tthis.last_request.run.begin( ( a, r) => {",
519 "\t\tthis.last_request.run.end(r);",
521 "\t if (_this.windowstate.compile_results.el.parent == null) {",
522 "\t\t_this.windowstate.compile_results.el.set_parent(this.el);",
524 "\t_this.windowstate.compile_results.show(this.el,true);",
529 "string icon_name" : "media-playback-start",
530 "string label" : "Run",
538 "id" : "statusbar_compile_spinner",
539 "int margin_end" : 4,
540 "int margin_start" : 4,
541 "string tooltip_text" : "Compiling",
544 "(string icon, string tooltip) {",
546 "\tif (icon == \"spinner\") {",
547 "\t this.el.show();",
548 "\t this.el.start(); ",
549 "\t this.el.tooltip_text = tooltip;",
550 "\t _this.statusbar_compile_icon.el.hide();",
552 "\t this.el.hide();",
553 "\t// GLib.debug(\"set status icon %s, %s\", icon, tooltip);",
554 "\t _this.statusbar_compile_icon.el.tooltip_text = tooltip;",
555 "\t _this.statusbar_compile_icon.el.icon_name = icon;",
556 "\t _this.statusbar_compile_icon.el.show();\t ",
567 " _this.statusbar_compile_icon.el.hide(); ",
574 "Gtk.IconSize icon_size" : "Gtk.IconSize.NORMAL",
575 "id" : "statusbar_compile_icon",
576 "int margin_end" : 4,
577 "int margin_start" : 4,
588 "* prop" : "sidebar",
589 "Gtk.Orientation orientation" : "Gtk.Orientation.VERTICAL",
596 "bool has_tooltip" : true,
597 "bool hexpand" : true,
604 "(keyval, keycode, state) => {",
605 "\tif (!_this.treescroll.el.visible || _this.treeselmodel.el.get_n_items() < 0) {",
610 "\t\t\"searcj key release %d, %d, %d ?= %d\" , ",
611 "\t\t\t(int) keyval, (int) keycode, state,",
612 "\t\t\t(int)Gdk.Key.Return",
614 "\tif (!_this.treescroll.el.visible || _this.treeselmodel.el.get_n_items() < 0) {",
620 "\tif (keyval == Gdk.Key.Return) {",
621 "\t\tvar tr = (Gtk.TreeListRow)_this.treeselmodel.el.selected_item;",
622 "\t\tGLib.debug(\"SELECTED = %s\", tr.item.get_type().name());",
623 "\t\tvar f = (JsRender.JsRender) tr.item;",
624 "\t\tGLib.debug(\"Click %s\", f.name);",
625 "\t\tif (f.xtype == \"Dir\") {",
630 "\t \t_this.windowstate.fileViewOpen(f,",
631 "\t \t\t_this.keystate.is_shift != 1 ",
634 "\t\t_this.splitview.el.show_sidebar = false;",
639 "\tif (keyval == Gdk.Key.Up) {",
641 "\t}if (keyval == Gdk.Key.Down) {",
647 "\tvar ns = _this.treeselmodel.el.selected + dir;",
651 "\tif (ns >= _this.treeselmodel.el.get_n_items()) {",
652 "\t\tns = _this.treeselmodel.el.get_n_items()-1;",
654 "\t_this.treeselmodel.el.selected = ns;",
659 "xtype" : "EventControllerKey"
666 "\t_this.windowsearch.el.set_search(this.el.get_text());",
667 "\tif (this.el.text == \"\") {",
668 "\t\t_this.treescroll.el.visible = false;",
671 "\t_this.treescroll.el.visible = true;",
672 "\t_this.treefilter.el.changed(Gtk.FilterChange.DIFFERENT);",
677 "string placeholder_text" : "Search for file",
678 "string tooltip_text" : [
679 "up/down arrow to select file from lower file list",
680 "enter opens selected in new window",
681 "shift+enter opens it in this window "
683 "xtype" : "SearchEntry"
687 "Gtk.Orientation orientation" : "Gtk.Orientation.HORIZONTAL",
688 "bool hexpand" : true,
693 "bool hexpand" : true,
694 "id" : "open_projects_btn",
699 "Gtk.Orientation orientation" : "Gtk.Orientation.HORIZONTAL",
704 "int margin_end" : 4,
705 "string icon_name" : "document-open",
710 "string label" : "Open File",
720 " \t_this.windowstate.showPopoverFiles(this.el, _this.project, false);",
724 "tooltop_text" : "\"Open File\"",
729 "bool hexpand" : true,
734 "Gtk.Orientation orientation" : "Gtk.Orientation.HORIZONTAL",
739 "int margin_end" : 4,
740 "string icon_name" : "window-new",
745 "string label" : "New Window",
755 "\t_this.splitview.el.show_sidebar = false;",
756 "\t_this.windowstate.showPopoverFiles(_this.el, _this.project, true);",
767 "Gtk.Orientation orientation" : "Gtk.Orientation.VERTICAL",
768 "bool vexpand" : true,
772 "* prop" : "start_child",
773 "bool has_frame" : true,
782 "bool autoselect" : false,
783 "bool can_unselect" : false,
784 "bool selecting" : false,
799 "id" : "windowsearch",
803 "* prop" : "expression",
804 "GLib.Type this_type" : "typeof(WindowState)",
805 "string property_name" : "file_name",
806 "xtype" : "PropertyExpression"
809 "xtype" : "StringFilter"
814 "GLib.Type item_type" : "typeof(WindowState)",
816 "xtype" : "ListStore"
819 "xtype" : "FilterListModel"
824 "bool ignore_case" : true,
828 "* prop" : "expression",
829 "GLib.Type this_type" : "typeof(WindowState)",
830 "string property_name" : "file_name",
831 "xtype" : "PropertyExpression"
834 "xtype" : "StringSorter"
837 "xtype" : "SortListModel"
841 "notify[\"selected\"]" : [
843 "\tif (_this.winloading || this.selecting || this.el.selected == Gtk.INVALID_LIST_POSITION) {",
846 "\tvar ws = this.el.selected_item as WindowState;",
847 "\tif (ws == null) {",
850 "\tif (ws.file.path != _this.windowstate.file.path) {",
851 "\t\t_this.windowstate.fileViewOpen(ws.file, ws.file_details.new_window, -1);",
852 "\t\t_this.splitview.el.show_sidebar = false;",
855 "\tthis.selectCurrent();",
859 "xtype" : "SingleSelection",
860 "| void selectCurrent" : [
862 "\tthis.selecting = true;",
864 "\tfor(var i = 0;i < this.el.get_n_items(); i++) {",
865 "\t\tvar ws = this.el.get_item(i) as WindowState;",
866 "\t\tif (ws.file.path == _this.windowstate.file.path) {",
867 "\t\t \tthis.el.selected = i;",
871 "\tthis.selecting = false;",
879 "bool expand" : true,
880 "bool resizable" : true,
885 "* prop" : "factory",
889 "\t var lb = (Gtk.Label) (listitem as Gtk.ListItem).get_child();",
890 "\t var item = (listitem as Gtk.ListItem).get_item() as WindowState;",
892 "\t lb.label = item.project.name;",
902 "\tvar lbl = new Gtk.Label(\"\");",
903 " \t(listitem as Gtk.ListItem).set_child(lbl);",
904 " \tlbl.justify = Gtk.Justification.LEFT;",
905 " \tlbl.xalign = 0;",
906 " \tlbl.use_markup = true;",
907 "\tlbl.ellipsize = Pango.EllipsizeMode.START;",
909 "\t(listitem as Gtk.ListItem).activatable = true;",
914 "xtype" : "SignalListItemFactory"
918 "xtype" : "ColumnViewColumn"
922 "* pack" : "append_column",
923 "bool expand" : true,
924 "bool resizable" : true,
929 "* prop" : "factory",
933 " var lb = (Gtk.Label) (listitem as Gtk.ListItem).get_child();",
934 " var item = (listitem as Gtk.ListItem).get_item() as WindowState;",
936 " lb.label = item.file.relpath;",
946 "\tvar lbl = new Gtk.Label(\"\");",
947 " \t(listitem as Gtk.ListItem).set_child(lbl);",
948 " \tlbl.justify = Gtk.Justification.LEFT;",
949 " \tlbl.xalign = 0;",
950 " \tlbl.use_markup = true;",
951 "\tlbl.ellipsize = Pango.EllipsizeMode.START;",
953 "\t(listitem as Gtk.ListItem).activatable = true;",
958 "xtype" : "SignalListItemFactory"
962 "xtype" : "ColumnViewColumn"
965 "xtype" : "ColumnView"
968 "xtype" : "ScrolledWindow"
971 "* prop" : "end_child",
972 "bool has_frame" : true,
973 "bool hexpand" : true,
974 "bool vexpand" : true,
975 "bool visible" : false,
981 "bool hexpand" : true,
982 "bool vexpand" : true,
989 "(n_press, x, y) => {",
990 "\tif (n_press == 2) {",
991 "\t\tGLib.debug(\"double cliced\");",
995 "\tvar tr = (Gtk.TreeListRow)_this.treeselmodel.el.selected_item;",
996 "\tGLib.debug(\"SELECTED = %s\", tr.item.get_type().name());",
997 "\tvar f = (JsRender.JsRender) tr.item;",
998 "\tGLib.debug(\"Click %s\", f.name);",
999 "\tif (f.xtype == \"Dir\") {",
1004 " \t_this.windowstate.fileViewOpen(f,",
1005 " \t\t_this.keystate.is_shift != 1 ",
1008 "\t_this.splitview.el.show_sidebar = false;",
1016 "xtype" : "GestureClick"
1021 "bool autoselect" : true,
1022 "bool can_unselect" : true,
1023 "id" : "treeselmodel",
1032 "bool incremental" : true,
1033 "id" : "treelistsort",
1038 "Gtk.TreeListModelCreateModelFunc create_func" : [
1040 "\t//GLib.debug(\"liststore got %s\", item.get_type().name());",
1041 "\treturn ((JsRender.JsRender)item).childfiles;",
1044 "bool autoexpand" : true,
1045 "bool passthrough" : false,
1046 "id" : "treelistmodel",
1051 "GLib.Type item_type" : "typeof(JsRender.JsRender)",
1053 "xtype" : "ListStore"
1056 "xtype" : "TreeListModel"
1060 "* prop" : "sorter",
1064 "* prop" : "sorter",
1065 "bool ignore_case" : true,
1069 "* prop" : "expression",
1070 "GLib.Type this_type" : "typeof(JsRender.JsRender) ",
1071 "string property_name" : "name",
1072 "xtype" : "PropertyExpression"
1075 "xtype" : "StringSorter"
1078 "xtype" : "TreeListRowSorter"
1081 "xtype" : "SortListModel"
1085 "* prop" : "filter",
1086 "Gtk.CustomFilterFunc match_func" : [
1088 "\tvar tr = ((Gtk.TreeListRow)item).get_item();",
1089 "\t//GLib.debug(\"filter %s\", tr.get_type().name());",
1090 "\tvar j = (JsRender.JsRender) tr;",
1091 "\tif (j.xtype == \"Dir\" && j.childfiles.n_items < 1) {",
1092 "\t\treturn false;",
1094 "\tvar str = _this.filesearch.el.text.down();\t",
1095 "\tif (j.xtype == \"Dir\") {",
1098 "\t\tfor (var i =0 ; i < j.childfiles.n_items; i++) {",
1099 "\t\t\tvar f = (JsRender.JsRender) j.childfiles.get_item(i);",
1100 "\t\t\t//if (f.xtype != \"PlainFile\") {",
1101 "\t\t\t//\tcontinue;",
1103 "\t\t\tif (f.content_type.contains(\"image\")) {",
1104 "\t\t\t\tcontinue;",
1106 "\t\t\tif (str.length < 1) {",
1107 "\t\t\t\treturn true;",
1109 "\t\t\tif (f.name.down().contains(str)) {",
1110 "\t\t\t\treturn true;",
1115 "\t\treturn false;",
1117 "\t//if (j.xtype != \"PlainFile\") {",
1118 "\t//\treturn false;",
1120 " \tif (j.content_type.contains(\"image\")) {",
1121 "\t\treturn false;",
1124 "\tif (str.length < 1) { // no search.",
1127 "\tif (j.name.down().contains(str)) {",
1134 "id" : "treefilter",
1135 "xtype" : "CustomFilter"
1138 "xtype" : "FilterListModel"
1141 "xtype" : "SingleSelection"
1147 "\t// this.el.set_sorter( new Gtk.StringSorter(",
1148 "\t// \tnew Gtk.PropertyExpression(typeof(JsRender.NodeProp), null, \"name\")",
1154 "* pack" : "append_column",
1155 "bool expand" : true,
1156 "bool resizable" : true,
1161 "* prop" : "factory",
1166 "\t //GLib.debug(\"listitme is is %s\", ((Gtk.ListItem)listitem).get_type().name());",
1170 " \t//var expand = (Gtk.TreeExpander) ((Gtk.ListItem)listitem).get_child();",
1171 " \tvar expand = (Gtk.TreeExpander) ((Gtk.ListItem)listitem).get_child();",
1173 " \tvar hbox = (Gtk.Box) expand.child;",
1176 "\t\tvar img = (Gtk.Image) hbox.get_first_child();",
1177 "\t\tvar lbl = (Gtk.Label) img.get_next_sibling();",
1181 " \t if (lbl == null || lbl.label != \"\") { // do not update",
1184 " \tvar lr = (Gtk.TreeListRow)((Gtk.ListItem)listitem).get_item();",
1185 " \t//GLib.debug(\"LR = %s\", lr.get_type().name());",
1188 " \tvar jr =(JsRender.JsRender) lr.get_item();",
1189 " \t//GLib.debug(\"JR = %s\", jr.get_type().name());\t\t",
1191 " \t if (jr == null) {",
1192 " \t\t GLib.debug(\"Problem getting item\"); ",
1196 "\t\tjr.bind_property(\"icon\",",
1198 " GLib.BindingFlags.SYNC_CREATE);",
1200 " \t//GLib.debug(\"change %s to %s\", lbl.label, np.name);",
1201 " \tlbl.label = jr.name; // for dir's we could hsow the sub path..",
1202 " \tlbl.tooltip_markup = jr.path;",
1204 " expand.set_hide_expander( jr.xtype != \"Dir\" );",
1205 " \t expand.set_list_row(lr);",
1208 " \t// bind image...",
1215 "\tvar expand = new Gtk.TreeExpander();",
1217 "\texpand.set_indent_for_depth(true);",
1218 "\texpand.set_indent_for_icon(true);",
1219 "\tvar hbox = new Gtk.Box(Gtk.Orientation.HORIZONTAL,0);",
1220 "\tvar icon = new Gtk.Image();",
1221 "\ticon.margin_end = 4;",
1222 "\tvar lbl = new Gtk.Label(\"\");",
1223 "\tlbl.use_markup = true;",
1226 " \tlbl.justify = Gtk.Justification.LEFT;",
1227 " \tlbl.xalign = 0;",
1229 " \thbox.append(icon);",
1230 "\thbox.append(lbl);",
1231 "\texpand.set_child(hbox);",
1232 "\t((Gtk.ListItem)listitem).set_child(expand);",
1233 "\t((Gtk.ListItem)listitem).activatable = false;",
1238 "xtype" : "SignalListItemFactory"
1241 "string title" : "All Project Files",
1242 "xtype" : "ColumnViewColumn"
1245 "xtype" : "ColumnView"
1248 "string tooltip_text" : [
1249 "dbl-click - opens in NEW window ",
1250 "shift--dbl-click opens in this window"
1252 "string xns" : "Gtk",
1253 "string xtype" : "ScrolledWindow"
1262 "\t_this.splitview.el.show_sidebar = true;",
1264 "\t_this.filesearch.el.grab_focus();",
1265 "\t_this.winloading = true;",
1266 "\t_this.winmodel.el.remove_all();",
1267 "\t_this.filesearch.el.set_text(\"\");",
1268 "\tfor(var i = 0;i < BuilderApplication.windowlist.get_n_items(); i++) {",
1269 "\t\t_this.winmodel.el.append( BuilderApplication.windowlist.get_item(i));",
1271 "\t_this.winsel.selectCurrent();",
1272 "\t_this.winloading = false;",
1274 "\t _this.treeview.el.set_model(new Gtk.SingleSelection(null));",
1276 "\t_this.windowstate.project.loadDirsIntoStore(_this.treemodel.el);",
1278 "\t_this.treeview.el.set_model(_this.treeselmodel.el);",
1280 " \t _this.treeselmodel.el.selected = Gtk.INVALID_LIST_POSITION;",
1292 "(keyval, keycode, state) => {",
1294 " \tif (keyval == Gdk.Key.Shift_L || keyval == Gdk.Key.Shift_R) {",
1295 " \t\tthis.is_shift = 1;",
1306 "(keyval, keycode, state) => {",
1309 "\t\t\"key release %d, %d, %d ?= %d %d\" , ",
1310 "\t\t\t(int) keyval, (int) keycode, state,",
1311 "\t\t\t(int)Gdk.Key.O, Gdk.ModifierType.CONTROL_MASK",
1313 " \tif (keyval == Gdk.Key.Shift_L || keyval == Gdk.Key.Shift_R) {",
1314 " \t\tthis.is_shift = 0;",
1316 "\t//GLib.debug(\"set state %d , shift = %d\", (int)this.el.get_current_event_state(), Gdk.ModifierType.SHIFT_MASK);",
1317 "\tif (keyval == Gdk.Key.o && (state & Gdk.ModifierType.CONTROL_MASK) != 0) {",
1318 "\t\t// ctrl O pressed",
1319 "\t\tif (!_this.splitview.el.show_sidebar) {",
1320 "\t \t\t_this.sidebar.show(); ",
1329 "xtype" : "EventControllerKey"
1332 "xtype" : "OverlaySplitView"
1338 "\t Resources.singleton().disconnect(_this.statusbar.handler_id);",
1341 "\t this.windowstate.file.getLanguageServer().document_close(",
1342 "\t \tthis.windowstate.file",
1345 "\t BuilderApplication.removeWindow(this);",
1347 "\t if (BuilderApplication.windows.size < 1) {",
1348 "\t\tthis.windowstate.file.getLanguageServer().exit();",
1349 "\t\tBuilderApplication.singleton( null ).quit();",
1365 " // hide the file editing..",
1367 " //this.hideViewEditing();",
1368 " // this is updated by windowstate - we try and fill it in..",
1369 " _this.statusbar.el.hide();",
1370 " //_this.statusbar_errors.el.hide();",
1371 " //_this.statusbar_warnings.el.hide();",
1372 " //_this.statusbar_depricated.el.hide();",
1373 " _this.statusbar_compile_spinner.el.hide();",
1375 " Resources.singleton().checkResources();",
1382 "string title" : "Roo Application Builder",
1383 "xtype" : "ApplicationWindow",
1384 "| void initChildren" : [
1386 " // this needs putting in a better place..",
1387 " if (this.windowstate == null) {",
1388 " \tthis.windowstate = new WindowState(this);",
1402 "| void openNewWindow" : [
1405 " var w = new Xcls_MainWindow();",
1407 "\tBuilderApplication.addWindow(w);",
1409 " w.initChildren();",
1410 " w.windowstate.showPopoverFiles(w.open_projects_btn.el, _this.project, false);",
1415 "| void setTitle" : [
1417 " if (_this.windowstate.project == null || ",
1418 "\t _this.windowstate.file == null",
1420 " \tthis.el.set_title(\"Select File\");",
1423 " _this.el.set_title(",
1424 " \t_this.windowstate.project.name + ",
1426 "\t\t_this.windowstate.file.relpath);",
1433 " if (this.windowstate.file == null) {",
1434 " \tthis.windowstate.showPopoverFiles(this.open_projects_btn.el, null, false);",
1438 "| void updateErrors" : [
1442 " \tGLib.debug(\"updateErrors\");",
1444 "\tvar pr = this.windowstate.project.getErrors(\"ERR\");",
1446 "\tthis.statusbar_errors.setNotices(",
1448 "\t\tthis.windowstate.file.getErrorsTotal(\"ERR\")",
1451 "\tthis.statusbar_warnings.setNotices(",
1452 "\t\tthis.windowstate.project.getErrors(\"WARN\"),",
1453 "\t\tthis.windowstate.file.getErrorsTotal(\"WARN\")",
1455 "\tthis.statusbar_depricated.setNotices(",
1456 "\t\tthis.windowstate.project.getErrors(\"DEPR\"),",
1457 "\t\tthis.windowstate.file.getErrorsTotal(\"DEPR\")",
1460 "\t_this.statusbar_run.el.hide();",
1462 "\tif (pr.get_n_items() < 1) {",
1463 "\t\t_this.statusbar_run.el.show();",
1470 "name" : "MainWindow"