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)",
62 "bool has_frame" : false,
67 "\tGLib.debug(\"undo clicked\");",
68 "\tif (_this.windowstate.file.xtype == \"PlainFile\") {",
69 "\t\t_this.windowstate.code_editor_tab.buffer.el.undo();",
71 "\tif (!_this.windowstate.file.undoStep(-1)) {",
76 "\t_this.windowstate.switchState (WindowState.State.PREVIEW); ",
77 "\t// this triggers loadItems..",
78 "\t_this.windowstate.left_tree.model.loadFile(",
79 "\t\t_this.windowstate.file);",
85 "\t// load it everywhere",
90 "string icon_name" : "edit-undo",
95 "bool has_frame" : false,
100 "\tGLib.debug(\"undo clicked\");",
101 "\tif (_this.windowstate.file.xtype == \"PlainFile\") {",
102 "\t\t_this.windowstate.code_editor_tab.buffer.el.redo();",
104 "\tif (!_this.windowstate.file.undoStep(1)) {",
109 "\t_this.windowstate.switchState (WindowState.State.PREVIEW); ",
110 "\t// this triggers loadItems..",
111 "\t_this.windowstate.left_tree.model.loadFile(",
112 "\t\t_this.windowstate.file);",
118 "\t// load it everywhere",
123 "string icon_name" : "edit-redo",
130 "xtype" : "HeaderBar"
135 "bool collapsed" : true,
136 "bool show_sidebar" : false,
137 "double sidebar_width_fraction" : 0.40000000000000002,
142 "* prop" : "content",
143 "Gtk.Orientation orientation" : "Gtk.Orientation.VERTICAL",
144 "bool hexpand" : true,
145 "bool homogeneous" : false,
146 "bool vexpand" : false,
151 "# int lastWidth" : 0,
153 "Gtk.Orientation orientation" : "Gtk.Orientation.HORIZONTAL",
154 "bool hexpand" : true,
155 "bool vexpand" : true,
160 "* prop" : "start_child",
161 "Gtk.Orientation orientation" : "Gtk.Orientation.HORIZONTAL",
162 "bool hexpand" : true,
163 "bool vexpand" : true,
168 "Gtk.Orientation orientation" : "Gtk.Orientation.HORIZONTAL",
173 "* prop" : "start_child",
174 "Gtk.Orientation orientation" : "Gtk.Orientation.VERTICAL",
175 "bool hexpand" : true,
176 "bool vexpand" : true,
182 "* prop" : "end_child",
183 "Gtk.Orientation orientation" : "Gtk.Orientation.VERTICAL",
184 "bool hexpand" : true,
185 "bool vexpand" : true,
191 "accept_position" : [
193 "\t_this.windowstate.left_tree.onresize();",
200 "\tGLib.debug(\"Move handle\");",
212 "* prop" : "end_child",
213 "Gtk.Orientation orientation" : "Gtk.Orientation.VERTICAL",
214 "bool hexpand" : true,
215 "bool vexpand" : true,
219 "Gtk.Orientation orientation" : "Gtk.Orientation.VERTICAL",
220 "bool hexpand" : true,
221 "bool vexpand" : true,
227 "Gtk.Orientation orientation" : "Gtk.Orientation.VERTICAL",
228 "bool hexpand" : true,
229 "bool vexpand" : true,
230 "id" : "codeeditviewbox",
238 "accept_position" : [
240 "\t_this.windowstate.left_tree.onresize();",
251 "Gtk.Orientation orientation" : "Gtk.Orientation.HORIZONTAL",
252 "bool homogeneous" : false,
253 "bool vexpand" : false,
256 "$ tooltip_text" : "\"Project Details\"",
258 "bool always_show_image" : true,
263 " _this.windowstate.projectPopoverShow(_this.el, null, null);",
269 "string icon_name" : "emblem-system",
270 "string label" : "Edit Project Settings",
274 "$ tooltip_text" : "\"File Details\"",
276 "bool always_show_image" : true,
281 " // create a new file in project..",
282 " if (_this.project == null || _this.windowstate.file == null) {",
285 " _this.windowstate.file_details.show(",
286 " _this.windowstate.file, _this.el, false",
295 "string icon_name" : "document-properties",
296 "string label" : "Edit File Properties",
301 "bool always_show_image" : true,
305 "* ctor" : "new Gtk.PopoverMenu.from_model(null)",
308 " // this.el.show();",
312 "* prop" : "popover",
317 "* pack" : "set_child",
318 "Gtk.Orientation orientation" : "Gtk.Orientation.VERTICAL",
326 " Resources.singleton().fetchStart();",
330 "string label" : "Download updated Resources",
338 " About.singleton().el.show();",
342 "string label" : "About the Builder",
349 "xtype" : "PopoverMenu"
352 "string icon_name" : "dialog-information",
353 "string label" : "About",
354 "xtype" : "MenuButton"
358 "bool hexpand" : true,
359 "string label" : " ",
366 " this.handler_id = Resources.singleton().updateProgress.connect((pos,total) => {",
369 " _this.mainpane.el.set_sensitive(true);",
373 " _this.mainpane.el.set_sensitive(false);",
375 " this.el.set_fraction ((1.0f * pos) / (1.0f * total));",
376 " this.el.set_text(\"Fetching Resource : %s/%s\".printf(pos.to_string(), total.to_string()));",
382 "bool show_text" : true,
384 "ulong handler_id" : "-1",
385 "xtype" : "ProgressBar"
388 "$ Gtk.Orientation orientation" : "Gtk.Orientation.HORIZONTAL",
393 "id" : "statusbar_compilestatus_label",
394 "int margin_end" : 4,
395 "int margin_start" : 4,
396 "string label" : "Compile Status:",
401 "Xcls_ValaCompileErrors popup" : "",
402 "id" : "statusbar_errors",
407 "\tif (this.popup == null) {",
411 " this.popup.show();",
416 "string icon_name" : "dialog-error",
417 "string label" : "0 Errors",
419 "| void setNotices" : [
420 "(GLib.ListStore nots, int ferrors ) {",
421 " BuilderApplication.showSpinner(\"\");",
422 " if (nots.get_n_items() < 1 ) {",
423 " \tthis.el.hide();",
424 " \tif (this.popup != null) {",
425 " \t\tthis.popup.el.hide();",
431 " this.el.label = \"%d/%d Errors\".printf(ferrors,(int)nots.get_n_items());",
435 "\tif (this.popup == null) {",
436 " this.popup = new Xcls_ValaCompileErrors();",
437 " this.popup.window = _this;",
438 " // this.popup.el.set_transient_for( _this.el );",
439 " this.popup.el.set_parent(this.el);",
442 "\tthis.popup.updateNotices(nots);",
450 "Xcls_ValaCompileErrors popup" : "",
451 "id" : "statusbar_warnings",
456 "\tif (this.popup == null) {",
460 " this.popup.show();",
465 "string icon_name" : "dialog-warning",
466 "string label" : "0 Warnings",
468 "| void setNotices" : [
469 "(GLib.ListStore nots, int ferrs ) {",
471 " if (nots.get_n_items() < 1 ) {",
472 " \tthis.el.hide();",
473 " \tif (this.popup != null) {",
474 " \t\tthis.popup.el.hide();",
480 " this.el.label = \"%d/%d Warnings\".printf(ferrs,(int)nots.get_n_items());",
484 "\tif (this.popup == null) {",
485 " this.popup = new Xcls_ValaCompileErrors();",
486 " this.popup.window = _this;",
487 " // this.popup.el.set_transient_for( _this.el );",
488 " this.popup.el.set_parent(this.el);",
490 "\tthis.popup.updateNotices(nots);",
497 "# GLib.ListStore notices" : "null",
499 "Xcls_ValaCompileErrors popup" : "",
500 "id" : "statusbar_depricated",
505 "\tif (this.popup == null) {",
509 " this.popup.show();",
514 "string icon_name" : "dialog-information",
515 "string label" : "0 Depricated",
517 "| void setNotices" : [
519 "(GLib.ListStore nots, int ferrs ) {",
521 " if (nots.get_n_items() < 1 ) {",
522 " \tthis.el.hide();",
523 " \tif (this.popup != null) {",
524 " \t\tthis.popup.el.hide();",
530 " this.el.label = \"%d/%d Depricated\".printf(ferrs,(int)nots.get_n_items());",
534 "\tif (this.popup == null) {",
535 " this.popup = new Xcls_ValaCompileErrors();",
536 " this.popup.window = _this;",
537 " // this.popup.el.set_transient_for( _this.el );",
538 " this.popup.el.set_parent(this.el);",
540 "\tthis.popup.updateNotices(nots);",
548 "Palete.ValaCompileRequest? last_request" : "null",
549 "Xcls_ValaCompileErrors popup" : "",
550 "bool visible" : false,
551 "id" : "statusbar_run",
556 " if (_this.windowstate.file == null) {",
559 " if (_this.statusbar_compile_spinner.el.spinning) {",
560 " \t_this.windowstate.compile_results.el.set_parent(this.el);",
561 "\t _this.windowstate.compile_results.el.show(); // show currently running.",
565 "\tif (this.last_request != null) {",
566 "\t\tthis.last_request.cancel();",
567 "\t\tif (this.last_request.terminal_pid > 0) {",
568 "\t\t\tthis.last_request.killChildren(this.last_request.terminal_pid);",
571 "\tvar pr = _this.windowstate.project as Project.Gtk;",
572 "\tif (pr == null) {",
577 "\tthis.last_request= new Palete.ValaCompileRequest(",
579 "\t\tpr.firstBuildModuleWith(_this.windowstate.file)",
581 "\tthis.last_request.onOutput.connect( ( str) => {",
582 "\t\t_this.windowstate.compile_results.addLine(str);",
584 "\tthis.last_request.run.begin( ( a, r) => {",
585 "\t\tthis.last_request.run.end(r);",
587 "\t if (_this.windowstate.compile_results.el.parent == null) {",
588 "\t\t_this.windowstate.compile_results.el.set_parent(this.el);",
590 "\t_this.windowstate.compile_results.show(this.el,true);",
595 "string icon_name" : "media-playback-start",
596 "string label" : "Run",
604 "id" : "statusbar_compile_spinner",
605 "int margin_end" : 4,
606 "int margin_start" : 4,
607 "string tooltip_text" : "Compiling",
610 "(string icon, string tooltip) {",
612 "\tif (icon == \"spinner\") {",
613 "\t this.el.show();",
614 "\t this.el.start(); ",
615 "\t this.el.tooltip_text = tooltip;",
616 "\t _this.statusbar_compile_icon.el.hide();",
618 "\t this.el.hide();",
619 "\t// GLib.debug(\"set status icon %s, %s\", icon, tooltip);",
620 "\t _this.statusbar_compile_icon.el.tooltip_text = tooltip;",
621 "\t _this.statusbar_compile_icon.el.icon_name = icon;",
622 "\t _this.statusbar_compile_icon.el.show();\t ",
633 " _this.statusbar_compile_icon.el.hide(); ",
640 "Gtk.IconSize icon_size" : "Gtk.IconSize.NORMAL",
641 "id" : "statusbar_compile_icon",
642 "int margin_end" : 4,
643 "int margin_start" : 4,
654 "* prop" : "sidebar",
655 "Gtk.Orientation orientation" : "Gtk.Orientation.VERTICAL",
661 "bool has_tooltip" : true,
662 "bool hexpand" : true,
669 "(keyval, keycode, state) => {",
670 "\tif (!_this.treescroll.el.visible || _this.treeselmodel.el.get_n_items() < 0) {",
675 "\t\t\"searcj key release %d, %d, %d ?= %d\" , ",
676 "\t\t\t(int) keyval, (int) keycode, state,",
677 "\t\t\t(int)Gdk.Key.Return",
679 "\tif (!_this.treescroll.el.visible || _this.treeselmodel.el.get_n_items() < 0) {",
685 "\tif (keyval == Gdk.Key.Return) {",
686 "\t\tvar tr = (Gtk.TreeListRow)_this.treeselmodel.el.selected_item;",
687 "\t\tGLib.debug(\"SELECTED = %s\", tr.item.get_type().name());",
688 "\t\tvar f = (JsRender.JsRender) tr.item;",
689 "\t\tGLib.debug(\"Click %s\", f.name);",
690 "\t\tif (f.xtype == \"Dir\") {",
695 "\t \t_this.windowstate.fileViewOpen(f,",
696 "\t \t\t_this.keystate.is_shift != 1 ",
699 "\t\t_this.splitview.el.show_sidebar = false;",
704 "\tif (keyval == Gdk.Key.Up) {",
706 "\t}if (keyval == Gdk.Key.Down) {",
712 "\tvar ns = _this.treeselmodel.el.selected + dir;",
716 "\tif (ns >= _this.treeselmodel.el.get_n_items()) {",
717 "\t\tns = _this.treeselmodel.el.get_n_items()-1;",
719 "\t_this.treeselmodel.el.selected = ns;",
724 "xtype" : "EventControllerKey"
731 "\t_this.windowsearch.el.set_search(this.el.get_text());",
732 "\tif (this.el.text == \"\") {",
733 "\t\t_this.treescroll.el.visible = false;",
736 "\t_this.treescroll.el.visible = true;",
737 "\t_this.treefilter.el.changed(Gtk.FilterChange.DIFFERENT);",
742 "string placeholder_text" : "Search for file",
743 "string tooltip_text" : [
744 "up/down arrow to select file from lower file list",
745 "enter opens selected in new window",
746 "shift+enter opens it in this window "
748 "xtype" : "SearchEntry"
752 "Gtk.Orientation orientation" : "Gtk.Orientation.HORIZONTAL",
753 "bool hexpand" : true,
758 "bool hexpand" : true,
759 "id" : "open_projects_btn",
764 "Gtk.Orientation orientation" : "Gtk.Orientation.HORIZONTAL",
769 "int margin_end" : 4,
770 "string icon_name" : "document-open",
775 "string label" : "Open File",
785 " \t_this.splitview.el.show_sidebar = false;",
786 " \t_this.windowstate.showPopoverFiles(this.el, _this.project, false);",
790 "tooltop_text" : "\"Open File\"",
795 "bool hexpand" : true,
800 "Gtk.Orientation orientation" : "Gtk.Orientation.HORIZONTAL",
805 "int margin_end" : 4,
806 "string icon_name" : "window-new",
811 "string label" : "New Window",
821 "\t_this.splitview.el.show_sidebar = false;",
822 "\t_this.windowstate.showPopoverFiles(_this.el, _this.project, true);",
833 "Gtk.Orientation orientation" : "Gtk.Orientation.VERTICAL",
834 "bool vexpand" : true,
838 "* prop" : "start_child",
839 "bool has_frame" : true,
848 "bool autoselect" : false,
849 "bool can_unselect" : false,
850 "bool selecting" : false,
865 "id" : "windowsearch",
869 "* prop" : "expression",
870 "GLib.Type this_type" : "typeof(WindowState)",
871 "string property_name" : "file_name",
872 "xtype" : "PropertyExpression"
875 "xtype" : "StringFilter"
880 "GLib.Type item_type" : "typeof(WindowState)",
882 "xtype" : "ListStore"
885 "xtype" : "FilterListModel"
890 "bool ignore_case" : true,
894 "* prop" : "expression",
895 "GLib.Type this_type" : "typeof(WindowState)",
896 "string property_name" : "file_name",
897 "xtype" : "PropertyExpression"
900 "xtype" : "StringSorter"
903 "xtype" : "SortListModel"
907 "notify[\"selected\"]" : [
909 "\tif (_this.winloading || this.selecting || this.el.selected == Gtk.INVALID_LIST_POSITION) {",
912 "\tvar ws = this.el.selected_item as WindowState;",
913 "\tif (ws == null) {",
916 "\tif (ws.file.path != _this.windowstate.file.path) {",
917 "\t\t_this.windowstate.fileViewOpen(ws.file, ws.file_details.new_window, -1);",
918 "\t\t_this.splitview.el.show_sidebar = false;",
921 "\tthis.selectCurrent();",
925 "xtype" : "SingleSelection",
926 "| void selectCurrent" : [
928 "\tthis.selecting = true;",
930 "\tfor(var i = 0;i < this.el.get_n_items(); i++) {",
931 "\t\tvar ws = this.el.get_item(i) as WindowState;",
932 "\t\tif (ws.file.path == _this.windowstate.file.path) {",
933 "\t\t \tthis.el.selected = i;",
937 "\tthis.selecting = false;",
945 "bool expand" : true,
946 "bool resizable" : true,
951 "* prop" : "factory",
955 "\tvar li = (listitem as Gtk.ListItem);",
956 "\tif (li == null) {",
959 "\t var lb = (Gtk.Label) li.get_child() as Gtk.Label;",
960 "\t if (lb == null) {",
963 "\t var item = li.get_item() as WindowState;",
964 "\t if (item == null) {",
967 "\t lb.label = item.project.name;",
978 "\tvar li = (listitem as Gtk.ListItem);",
979 "\tif (li == null) {",
983 "\tvar lbl = new Gtk.Label(\"\");",
984 " \tli.set_child(lbl);",
985 " \tlbl.justify = Gtk.Justification.LEFT;",
986 " \tlbl.xalign = 0;",
987 " \tlbl.use_markup = true;",
988 "\tlbl.ellipsize = Pango.EllipsizeMode.START;",
990 "\tli.activatable = true;",
995 "xtype" : "SignalListItemFactory"
999 "xtype" : "ColumnViewColumn"
1003 "* pack" : "append_column",
1004 "bool expand" : true,
1005 "bool resizable" : true,
1010 "* prop" : "factory",
1014 "\tvar li = (listitem as Gtk.ListItem);",
1015 "\tif (li == null) {",
1018 "\t var lb = (Gtk.Label) li.get_child() as Gtk.Label;",
1019 "\t if (lb == null) {",
1022 "\t var item = li.get_item() as WindowState;",
1023 "\t if (item == null) {",
1029 " \tlb.label = item.file.relpath;",
1039 "\tvar li = (listitem as Gtk.ListItem);",
1040 "\tif (li == null) {",
1043 "\tvar lbl = new Gtk.Label(\"\");",
1044 " \tli.set_child(lbl);",
1045 " \tlbl.justify = Gtk.Justification.LEFT;",
1046 " \tlbl.xalign = 0;",
1047 " \tlbl.use_markup = true;",
1048 "\tlbl.ellipsize = Pango.EllipsizeMode.START;",
1050 "\tli.activatable = true;",
1055 "xtype" : "SignalListItemFactory"
1059 "xtype" : "ColumnViewColumn"
1062 "xtype" : "ColumnView"
1065 "xtype" : "ScrolledWindow"
1068 "* prop" : "end_child",
1069 "bool has_frame" : true,
1070 "bool hexpand" : true,
1071 "bool vexpand" : true,
1072 "bool visible" : false,
1073 "id" : "treescroll",
1078 "bool hexpand" : true,
1079 "bool vexpand" : true,
1086 "(n_press, x, y) => {",
1087 "\tif (n_press == 2) {",
1088 "\t\tGLib.debug(\"double cliced\");",
1092 "\tvar tr = (Gtk.TreeListRow)_this.treeselmodel.el.selected_item;",
1093 "\tGLib.debug(\"SELECTED = %s\", tr.item.get_type().name());",
1094 "\tvar f = (JsRender.JsRender) tr.item;",
1095 "\tGLib.debug(\"Click %s\", f.name);",
1096 "\tif (f.xtype == \"Dir\") {",
1101 " \t_this.windowstate.fileViewOpen(f,",
1102 " \t\t_this.keystate.is_shift != 1 ",
1105 "\t_this.splitview.el.show_sidebar = false;",
1113 "xtype" : "GestureClick"
1118 "bool autoselect" : true,
1119 "bool can_unselect" : true,
1120 "id" : "treeselmodel",
1129 "bool incremental" : true,
1130 "id" : "treelistsort",
1135 "Gtk.TreeListModelCreateModelFunc create_func" : [
1137 "\t//GLib.debug(\"liststore got %s\", item.get_type().name());",
1138 "\treturn ((JsRender.JsRender)item).childfiles;",
1141 "bool autoexpand" : true,
1142 "bool passthrough" : false,
1143 "id" : "treelistmodel",
1148 "GLib.Type item_type" : "typeof(JsRender.JsRender)",
1150 "xtype" : "ListStore"
1153 "xtype" : "TreeListModel"
1157 "* prop" : "sorter",
1161 "* prop" : "sorter",
1162 "bool ignore_case" : true,
1166 "* prop" : "expression",
1167 "GLib.Type this_type" : "typeof(JsRender.JsRender) ",
1168 "string property_name" : "name",
1169 "xtype" : "PropertyExpression"
1172 "xtype" : "StringSorter"
1175 "xtype" : "TreeListRowSorter"
1178 "xtype" : "SortListModel"
1182 "* prop" : "filter",
1183 "Gtk.CustomFilterFunc match_func" : [
1185 "\tvar tr = ((Gtk.TreeListRow)item).get_item();",
1186 "\t//GLib.debug(\"filter %s\", tr.get_type().name());",
1187 "\tvar j = (JsRender.JsRender) tr;",
1188 "\tif (j.xtype == \"Dir\" && j.childfiles.n_items < 1) {",
1189 "\t\treturn false;",
1191 "\tvar str = _this.filesearch.el.text.down();\t",
1192 "\tif (j.xtype == \"Dir\") {",
1195 "\t\tfor (var i =0 ; i < j.childfiles.n_items; i++) {",
1196 "\t\t\tvar f = (JsRender.JsRender) j.childfiles.get_item(i);",
1197 "\t\t\t//if (f.xtype != \"PlainFile\") {",
1198 "\t\t\t//\tcontinue;",
1200 "\t\t\tif (f.content_type.contains(\"image\")) {",
1201 "\t\t\t\tcontinue;",
1203 "\t\t\tif (str.length < 1) {",
1204 "\t\t\t\treturn true;",
1206 "\t\t\tif (f.name.down().contains(str)) {",
1207 "\t\t\t\treturn true;",
1212 "\t\treturn false;",
1214 "\t//if (j.xtype != \"PlainFile\") {",
1215 "\t//\treturn false;",
1217 " \tif (j.content_type.contains(\"image\")) {",
1218 "\t\treturn false;",
1221 "\tif (str.length < 1) { // no search.",
1224 "\tif (j.name.down().contains(str)) {",
1231 "id" : "treefilter",
1232 "xtype" : "CustomFilter"
1235 "xtype" : "FilterListModel"
1238 "xtype" : "SingleSelection"
1244 "\t// this.el.set_sorter( new Gtk.StringSorter(",
1245 "\t// \tnew Gtk.PropertyExpression(typeof(JsRender.NodeProp), null, \"name\")",
1251 "* pack" : "append_column",
1252 "bool expand" : true,
1253 "bool resizable" : true,
1258 "* prop" : "factory",
1263 "\t //GLib.debug(\"listitme is is %s\", ((Gtk.ListItem)listitem).get_type().name());",
1267 " \t//var expand = (Gtk.TreeExpander) ((Gtk.ListItem)listitem).get_child();",
1268 " \tvar expand = (Gtk.TreeExpander) ((Gtk.ListItem)listitem).get_child();",
1270 " \tvar hbox = (Gtk.Box) expand.child;",
1273 "\t\tvar img = (Gtk.Image) hbox.get_first_child();",
1274 "\t\tvar lbl = (Gtk.Label) img.get_next_sibling();",
1278 " \t if (lbl == null || lbl.label != \"\") { // do not update",
1281 " \tvar lr = (Gtk.TreeListRow)((Gtk.ListItem)listitem).get_item();",
1282 " \t//GLib.debug(\"LR = %s\", lr.get_type().name());",
1285 " \tvar jr =(JsRender.JsRender) lr.get_item();",
1286 " \t//GLib.debug(\"JR = %s\", jr.get_type().name());\t\t",
1288 " \t if (jr == null) {",
1289 " \t\t GLib.debug(\"Problem getting item\"); ",
1293 "\t\tjr.bind_property(\"icon\",",
1295 " GLib.BindingFlags.SYNC_CREATE);",
1297 " \t//GLib.debug(\"change %s to %s\", lbl.label, np.name);",
1298 " \tlbl.label = jr.name; // for dir's we could hsow the sub path..",
1299 " \tlbl.tooltip_markup = jr.path;",
1301 " expand.set_hide_expander( jr.xtype != \"Dir\" );",
1302 " \t expand.set_list_row(lr);",
1305 " \t// bind image...",
1312 "\tvar expand = new Gtk.TreeExpander();",
1314 "\texpand.set_indent_for_depth(true);",
1315 "\texpand.set_indent_for_icon(true);",
1316 "\tvar hbox = new Gtk.Box(Gtk.Orientation.HORIZONTAL,0);",
1317 "\tvar icon = new Gtk.Image();",
1318 "\ticon.margin_end = 4;",
1319 "\tvar lbl = new Gtk.Label(\"\");",
1320 "\tlbl.use_markup = true;",
1323 " \tlbl.justify = Gtk.Justification.LEFT;",
1324 " \tlbl.xalign = 0;",
1326 " \thbox.append(icon);",
1327 "\thbox.append(lbl);",
1328 "\texpand.set_child(hbox);",
1329 "\t((Gtk.ListItem)listitem).set_child(expand);",
1330 "\t((Gtk.ListItem)listitem).activatable = false;",
1335 "xtype" : "SignalListItemFactory"
1338 "string title" : "All Project Files",
1339 "xtype" : "ColumnViewColumn"
1342 "xtype" : "ColumnView"
1345 "string tooltip_text" : [
1346 "dbl-click - opens in NEW window ",
1347 "shift--dbl-click opens in this window"
1349 "string xns" : "Gtk",
1350 "string xtype" : "ScrolledWindow"
1359 "\t_this.splitview.el.show_sidebar = true;",
1361 "\t_this.filesearch.el.grab_focus();",
1362 "\t_this.winloading = true;",
1363 "\t_this.winmodel.el.remove_all();",
1364 "\t_this.filesearch.el.set_text(\"\");",
1365 "\tfor(var i = 0;i < BuilderApplication.windowlist.get_n_items(); i++) {",
1366 "\t\t_this.winmodel.el.append( BuilderApplication.windowlist.get_item(i));",
1368 "\t_this.winsel.selectCurrent();",
1369 "\t_this.winloading = false;",
1371 "\t _this.treeview.el.set_model(new Gtk.SingleSelection(null));",
1373 "\t_this.windowstate.project.loadDirsIntoStore(_this.treemodel.el);",
1375 "\t_this.treeview.el.set_model(_this.treeselmodel.el);",
1377 " \t_this.treeselmodel.el.selected = Gtk.INVALID_LIST_POSITION;",
1388 "(keyval, keycode, state) => {",
1390 " \tif (keyval == Gdk.Key.Shift_L || keyval == Gdk.Key.Shift_R) {",
1391 " \t\tthis.is_shift = 1;",
1402 "(keyval, keycode, state) => {",
1405 "\t\t\"key release %d, %d, %d ?= %d %d\" , ",
1406 "\t\t\t(int) keyval, (int) keycode, state,",
1407 "\t\t\t(int)Gdk.Key.O, Gdk.ModifierType.CONTROL_MASK",
1409 " \tif (keyval == Gdk.Key.Shift_L || keyval == Gdk.Key.Shift_R) {",
1410 " \t\tthis.is_shift = 0;",
1412 "\t//GLib.debug(\"set state %d , shift = %d\", (int)this.el.get_current_event_state(), Gdk.ModifierType.SHIFT_MASK);",
1413 "\tif (keyval == Gdk.Key.o && (state & Gdk.ModifierType.CONTROL_MASK) != 0) {",
1414 "\t\t// ctrl O pressed",
1415 "\t\tif (!_this.splitview.el.show_sidebar) {",
1416 "\t \t\t_this.sidebar.show(); ",
1425 "xtype" : "EventControllerKey"
1428 "xtype" : "OverlaySplitView"
1434 "\t Resources.singleton().disconnect(_this.statusbar.handler_id);",
1437 "\t this.windowstate.file.getLanguageServer().document_close(",
1438 "\t \tthis.windowstate.file",
1441 "\t BuilderApplication.removeWindow(this);",
1443 "\t if (BuilderApplication.windows.size < 1) {",
1445 "\t\t\tthis.windowstate.file.getLanguageServer().exit();",
1446 "\t\t} catch(Error e) {}",
1448 "\t\tBuilderApplication.singleton( null ).quit();",
1464 " // hide the file editing..",
1466 " //this.hideViewEditing();",
1467 " // this is updated by windowstate - we try and fill it in..",
1468 " _this.statusbar.el.hide();",
1469 " //_this.statusbar_errors.el.hide();",
1470 " //_this.statusbar_warnings.el.hide();",
1471 " //_this.statusbar_depricated.el.hide();",
1472 " _this.statusbar_compile_spinner.el.hide();",
1474 " Resources.singleton().checkResources();",
1481 "string title" : "Roo Application Builder",
1482 "xtype" : "ApplicationWindow",
1483 "| void initChildren" : [
1485 " // this needs putting in a better place..",
1486 " if (this.windowstate == null) {",
1487 " \tthis.windowstate = new WindowState(this);",
1501 "| void openNewWindow" : [
1504 " var w = new Xcls_MainWindow();",
1506 "\tBuilderApplication.addWindow(w);",
1508 " w.initChildren();",
1509 " w.windowstate.showPopoverFiles(w.open_projects_btn.el, _this.project, false);",
1514 "| void setTitle" : [
1516 " if (_this.windowstate.project == null || ",
1517 "\t _this.windowstate.file == null",
1519 " \tthis.el.set_title(\"Select File\");",
1522 " _this.el.set_title(",
1523 " \t_this.windowstate.project.name + ",
1525 "\t\t_this.windowstate.file.relpath);",
1532 " if (this.windowstate.file == null) {",
1533 " \tthis.windowstate.showPopoverFiles(this.open_projects_btn.el, null, false);",
1537 "| void updateErrors" : [
1541 " \tGLib.debug(\"updateErrors\");",
1543 "\tvar pr = this.windowstate.project.getErrors(\"ERR\");",
1545 "\tthis.statusbar_errors.setNotices(",
1547 "\t\tthis.windowstate.file.getErrorsTotal(\"ERR\")",
1550 "\tthis.statusbar_warnings.setNotices(",
1551 "\t\tthis.windowstate.project.getErrors(\"WARN\"),",
1552 "\t\tthis.windowstate.file.getErrorsTotal(\"WARN\")",
1554 "\tthis.statusbar_depricated.setNotices(",
1555 "\t\tthis.windowstate.project.getErrors(\"DEPR\"),",
1556 "\t\tthis.windowstate.file.getErrorsTotal(\"DEPR\")",
1559 "\t_this.statusbar_run.el.hide();",
1561 "\tif (pr.get_n_items() < 1) {",
1562 "\t\t_this.statusbar_run.el.show();",
1569 "name" : "MainWindow"