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) {",
674 "\t//\t\"searcj key release %d, %d, %d ?= %d\" , ",
675 "\t//\t\t(int) keyval, (int) keycode, state,",
676 "\t//\t\t(int)Gdk.Key.Return",
678 "\tif (!_this.treescroll.el.visible || _this.treeselmodel.el.get_n_items() < 0) {",
684 "\tif (keyval == Gdk.Key.Return) {",
685 "\t\tvar tr = (Gtk.TreeListRow)_this.treeselmodel.el.selected_item;",
686 "\t\tGLib.debug(\"SELECTED = %s\", tr.item.get_type().name());",
687 "\t\tvar f = (JsRender.JsRender) tr.item;",
688 "\t\tGLib.debug(\"Click %s\", f.name);",
689 "\t\tif (f.xtype == \"Dir\") {",
694 "\t \t_this.windowstate.fileViewOpen(f,",
695 "\t \t\t_this.keystate.is_shift != 1 ",
698 "\t\t_this.splitview.el.show_sidebar = false;",
703 "\tif (keyval == Gdk.Key.Up) {",
705 "\t}if (keyval == Gdk.Key.Down) {",
711 "\tvar ns = _this.treeselmodel.el.selected + dir;",
715 "\tif (ns >= _this.treeselmodel.el.get_n_items()) {",
716 "\t\tns = _this.treeselmodel.el.get_n_items()-1;",
718 "\t_this.treeselmodel.el.selected = ns;",
723 "xtype" : "EventControllerKey"
730 "\t_this.windowsearch.el.set_search(this.el.get_text());",
731 "\tif (this.el.text == \"\") {",
732 "\t\t_this.treescroll.el.visible = false;",
735 "\t_this.treescroll.el.visible = true;",
736 "\t_this.treefilter.el.changed(Gtk.FilterChange.DIFFERENT);",
741 "string placeholder_text" : "Search for file",
742 "string tooltip_text" : [
743 "up/down arrow to select file from lower file list",
744 "enter opens selected in new window",
745 "shift+enter opens it in this window "
747 "xtype" : "SearchEntry"
751 "Gtk.Orientation orientation" : "Gtk.Orientation.HORIZONTAL",
752 "bool hexpand" : true,
757 "bool hexpand" : true,
758 "id" : "open_projects_btn",
763 "Gtk.Orientation orientation" : "Gtk.Orientation.HORIZONTAL",
768 "int margin_end" : 4,
769 "string icon_name" : "document-open",
774 "string label" : "Open File",
784 " \t_this.splitview.el.show_sidebar = false;",
785 " \t_this.windowstate.showPopoverFiles(this.el, _this.project, false);",
789 "tooltop_text" : "\"Open File\"",
794 "bool hexpand" : true,
799 "Gtk.Orientation orientation" : "Gtk.Orientation.HORIZONTAL",
804 "int margin_end" : 4,
805 "string icon_name" : "window-new",
810 "string label" : "New Window",
820 "\t_this.splitview.el.show_sidebar = false;",
821 "\t_this.windowstate.showPopoverFiles(_this.el, _this.project, true);",
832 "Gtk.Orientation orientation" : "Gtk.Orientation.VERTICAL",
833 "bool vexpand" : true,
837 "* prop" : "start_child",
838 "bool has_frame" : true,
847 "bool autoselect" : false,
848 "bool can_unselect" : false,
849 "bool selecting" : false,
864 "id" : "windowsearch",
868 "* prop" : "expression",
869 "GLib.Type this_type" : "typeof(WindowState)",
870 "string property_name" : "file_name",
871 "xtype" : "PropertyExpression"
874 "xtype" : "StringFilter"
879 "GLib.Type item_type" : "typeof(WindowState)",
881 "xtype" : "ListStore"
884 "xtype" : "FilterListModel"
889 "bool ignore_case" : true,
893 "* prop" : "expression",
894 "GLib.Type this_type" : "typeof(WindowState)",
895 "string property_name" : "file_name",
896 "xtype" : "PropertyExpression"
899 "xtype" : "StringSorter"
902 "xtype" : "SortListModel"
906 "notify[\"selected\"]" : [
908 "\tif (_this.winloading || this.selecting || this.el.selected == Gtk.INVALID_LIST_POSITION) {",
911 "\tvar ws = this.el.selected_item as WindowState;",
912 "\tif (ws == null) {",
915 "\tif (ws.file.path != _this.windowstate.file.path) {",
916 "\t\t_this.windowstate.fileViewOpen(ws.file, ws.file_details.new_window, -1);",
917 "\t\t_this.splitview.el.show_sidebar = false;",
920 "\tthis.selectCurrent();",
924 "xtype" : "SingleSelection",
925 "| void selectCurrent" : [
927 "\tthis.selecting = true;",
929 "\tfor(var i = 0;i < this.el.get_n_items(); i++) {",
930 "\t\tvar ws = this.el.get_item(i) as WindowState;",
931 "\t\tif (ws.file.path == _this.windowstate.file.path) {",
932 "\t\t \tthis.el.selected = i;",
936 "\tthis.selecting = false;",
944 "bool expand" : true,
945 "bool resizable" : true,
950 "* prop" : "factory",
954 "\tvar li = (listitem as Gtk.ListItem);",
955 "\tif (li == null) {",
958 "\t var lb = (Gtk.Label) li.get_child() as Gtk.Label;",
959 "\t if (lb == null) {",
962 "\t var item = li.get_item() as WindowState;",
963 "\t if (item == null) {",
966 "\t lb.label = item.project.name;",
977 "\tvar li = (listitem as Gtk.ListItem);",
978 "\tif (li == null) {",
982 "\tvar lbl = new Gtk.Label(\"\");",
983 " \tli.set_child(lbl);",
984 " \tlbl.justify = Gtk.Justification.LEFT;",
985 " \tlbl.xalign = 0;",
986 " \tlbl.use_markup = true;",
987 "\tlbl.ellipsize = Pango.EllipsizeMode.START;",
989 "\tli.activatable = true;",
994 "xtype" : "SignalListItemFactory"
998 "xtype" : "ColumnViewColumn"
1002 "* pack" : "append_column",
1003 "bool expand" : true,
1004 "bool resizable" : true,
1009 "* prop" : "factory",
1013 "\tvar li = (listitem as Gtk.ListItem);",
1014 "\tif (li == null) {",
1017 "\t var lb = (Gtk.Label) li.get_child() as Gtk.Label;",
1018 "\t if (lb == null) {",
1021 "\t var item = li.get_item() as WindowState;",
1022 "\t if (item == null) {",
1028 " \tlb.label = item.file.relpath;",
1038 "\tvar li = (listitem as Gtk.ListItem);",
1039 "\tif (li == null) {",
1042 "\tvar lbl = new Gtk.Label(\"\");",
1043 " \tli.set_child(lbl);",
1044 " \tlbl.justify = Gtk.Justification.LEFT;",
1045 " \tlbl.xalign = 0;",
1046 " \tlbl.use_markup = true;",
1047 "\tlbl.ellipsize = Pango.EllipsizeMode.START;",
1049 "\tli.activatable = true;",
1054 "xtype" : "SignalListItemFactory"
1058 "xtype" : "ColumnViewColumn"
1061 "xtype" : "ColumnView"
1064 "xtype" : "ScrolledWindow"
1067 "* prop" : "end_child",
1068 "bool has_frame" : true,
1069 "bool hexpand" : true,
1070 "bool vexpand" : true,
1071 "bool visible" : false,
1072 "id" : "treescroll",
1077 "bool hexpand" : true,
1078 "bool vexpand" : true,
1085 "(n_press, x, y) => {",
1086 "\tif (n_press == 2) {",
1087 "\t\tGLib.debug(\"double cliced\");",
1091 "\tvar tr = (Gtk.TreeListRow)_this.treeselmodel.el.selected_item;",
1092 "\tGLib.debug(\"SELECTED = %s\", tr.item.get_type().name());",
1093 "\tvar f = (JsRender.JsRender) tr.item;",
1094 "\tGLib.debug(\"Click %s\", f.name);",
1095 "\tif (f.xtype == \"Dir\") {",
1100 " \t_this.windowstate.fileViewOpen(f,",
1101 " \t\t_this.keystate.is_shift != 1 ",
1104 "\t_this.splitview.el.show_sidebar = false;",
1112 "xtype" : "GestureClick"
1117 "bool autoselect" : true,
1118 "bool can_unselect" : true,
1119 "id" : "treeselmodel",
1128 "bool incremental" : true,
1129 "id" : "treelistsort",
1134 "Gtk.TreeListModelCreateModelFunc create_func" : [
1136 "\t//GLib.debug(\"liststore got %s\", item.get_type().name());",
1137 "\treturn ((JsRender.JsRender)item).childfiles;",
1140 "bool autoexpand" : true,
1141 "bool passthrough" : false,
1142 "id" : "treelistmodel",
1147 "GLib.Type item_type" : "typeof(JsRender.JsRender)",
1149 "xtype" : "ListStore"
1152 "xtype" : "TreeListModel"
1156 "* prop" : "sorter",
1160 "* prop" : "sorter",
1161 "bool ignore_case" : true,
1165 "* prop" : "expression",
1166 "GLib.Type this_type" : "typeof(JsRender.JsRender) ",
1167 "string property_name" : "name",
1168 "xtype" : "PropertyExpression"
1171 "xtype" : "StringSorter"
1174 "xtype" : "TreeListRowSorter"
1177 "xtype" : "SortListModel"
1181 "* prop" : "filter",
1182 "Gtk.CustomFilterFunc match_func" : [
1184 "\tvar tr = ((Gtk.TreeListRow)item).get_item();",
1185 "\t//GLib.debug(\"filter %s\", tr.get_type().name());",
1186 "\tvar j = (JsRender.JsRender) tr;",
1187 "\tif (j.xtype == \"Dir\" && j.childfiles.n_items < 1) {",
1188 "\t\treturn false;",
1190 "\tvar str = _this.filesearch.el.text.down();\t",
1191 "\tif (j.xtype == \"Dir\") {",
1194 "\t\tfor (var i =0 ; i < j.childfiles.n_items; i++) {",
1195 "\t\t\tvar f = (JsRender.JsRender) j.childfiles.get_item(i);",
1196 "\t\t\t//if (f.xtype != \"PlainFile\") {",
1197 "\t\t\t//\tcontinue;",
1199 "\t\t\tif (f.content_type.contains(\"image\")) {",
1200 "\t\t\t\tcontinue;",
1202 "\t\t\tif (str.length < 1) {",
1203 "\t\t\t\treturn true;",
1205 "\t\t\tif (f.name.down().contains(str)) {",
1206 "\t\t\t\treturn true;",
1211 "\t\treturn false;",
1213 "\t//if (j.xtype != \"PlainFile\") {",
1214 "\t//\treturn false;",
1216 " \tif (j.content_type.contains(\"image\")) {",
1217 "\t\treturn false;",
1220 "\tif (str.length < 1) { // no search.",
1223 "\tif (j.name.down().contains(str)) {",
1230 "id" : "treefilter",
1231 "xtype" : "CustomFilter"
1234 "xtype" : "FilterListModel"
1237 "xtype" : "SingleSelection"
1243 "\t// this.el.set_sorter( new Gtk.StringSorter(",
1244 "\t// \tnew Gtk.PropertyExpression(typeof(JsRender.NodeProp), null, \"name\")",
1250 "* pack" : "append_column",
1251 "bool expand" : true,
1252 "bool resizable" : true,
1257 "* prop" : "factory",
1262 "\t //GLib.debug(\"listitme is is %s\", ((Gtk.ListItem)listitem).get_type().name());",
1266 " \t//var expand = (Gtk.TreeExpander) ((Gtk.ListItem)listitem).get_child();",
1267 " \tvar expand = (Gtk.TreeExpander) ((Gtk.ListItem)listitem).get_child();",
1269 " \tvar hbox = (Gtk.Box) expand.child;",
1272 "\t\tvar img = (Gtk.Image) hbox.get_first_child();",
1273 "\t\tvar lbl = (Gtk.Label) img.get_next_sibling();",
1277 " \t if (lbl == null || lbl.label != \"\") { // do not update",
1280 " \tvar lr = (Gtk.TreeListRow)((Gtk.ListItem)listitem).get_item();",
1281 " \t//GLib.debug(\"LR = %s\", lr.get_type().name());",
1284 " \tvar jr =(JsRender.JsRender) lr.get_item();",
1285 " \t//GLib.debug(\"JR = %s\", jr.get_type().name());\t\t",
1287 " \t if (jr == null) {",
1288 " \t\t GLib.debug(\"Problem getting item\"); ",
1292 "\t\tjr.bind_property(\"icon\",",
1294 " GLib.BindingFlags.SYNC_CREATE);",
1296 " \t//GLib.debug(\"change %s to %s\", lbl.label, np.name);",
1297 " \tlbl.label = jr.name; // for dir's we could hsow the sub path..",
1298 " \tlbl.tooltip_markup = jr.path;",
1300 " expand.set_hide_expander( jr.xtype != \"Dir\" );",
1301 " \t expand.set_list_row(lr);",
1304 " \t// bind image...",
1311 "\tvar expand = new Gtk.TreeExpander();",
1313 "\texpand.set_indent_for_depth(true);",
1314 "\texpand.set_indent_for_icon(true);",
1315 "\tvar hbox = new Gtk.Box(Gtk.Orientation.HORIZONTAL,0);",
1316 "\tvar icon = new Gtk.Image();",
1317 "\ticon.margin_end = 4;",
1318 "\tvar lbl = new Gtk.Label(\"\");",
1319 "\tlbl.use_markup = true;",
1322 " \tlbl.justify = Gtk.Justification.LEFT;",
1323 " \tlbl.xalign = 0;",
1325 " \thbox.append(icon);",
1326 "\thbox.append(lbl);",
1327 "\texpand.set_child(hbox);",
1328 "\t((Gtk.ListItem)listitem).set_child(expand);",
1329 "\t((Gtk.ListItem)listitem).activatable = false;",
1334 "xtype" : "SignalListItemFactory"
1337 "string title" : "All Project Files",
1338 "xtype" : "ColumnViewColumn"
1341 "xtype" : "ColumnView"
1344 "string tooltip_text" : [
1345 "dbl-click - opens in NEW window ",
1346 "shift--dbl-click opens in this window"
1348 "string xns" : "Gtk",
1349 "string xtype" : "ScrolledWindow"
1358 "\t_this.splitview.el.show_sidebar = true;",
1360 "\t_this.filesearch.el.grab_focus();",
1361 "\t_this.winloading = true;",
1362 "\t_this.winmodel.el.remove_all();",
1363 "\t_this.filesearch.el.set_text(\"\");",
1364 "\tfor(var i = 0;i < BuilderApplication.windowlist.get_n_items(); i++) {",
1365 "\t\t_this.winmodel.el.append( BuilderApplication.windowlist.get_item(i));",
1367 "\t_this.winsel.selectCurrent();",
1368 "\t_this.winloading = false;",
1370 "\t _this.treeview.el.set_model(new Gtk.SingleSelection(null));",
1372 "\t_this.windowstate.project.loadDirsIntoStore(_this.treemodel.el);",
1374 "\t_this.treeview.el.set_model(_this.treeselmodel.el);",
1376 " \t_this.treeselmodel.el.selected = Gtk.INVALID_LIST_POSITION;",
1387 "(keyval, keycode, state) => {",
1389 " \tif (keyval == Gdk.Key.Shift_L || keyval == Gdk.Key.Shift_R) {",
1390 " \t\tthis.is_shift = 1;",
1401 "(keyval, keycode, state) => {",
1403 "\t//\t\"key release %d, %d, %d ?= %d %d\" , ",
1404 "\t//\t\t(int) keyval, (int) keycode, state,",
1405 "\t//\t\t(int)Gdk.Key.O, Gdk.ModifierType.CONTROL_MASK",
1407 " \tif (keyval == Gdk.Key.Shift_L || keyval == Gdk.Key.Shift_R) {",
1408 " \t\tthis.is_shift = 0;",
1410 "\t//GLib.debug(\"set state %d , shift = %d\", (int)this.el.get_current_event_state(), Gdk.ModifierType.SHIFT_MASK);",
1411 "\tif (keyval == Gdk.Key.o && (state & Gdk.ModifierType.CONTROL_MASK) != 0) {",
1412 "\t\t// ctrl O pressed",
1413 "\t\tif (!_this.splitview.el.show_sidebar) {",
1414 "\t \t\t_this.sidebar.show(); ",
1423 "xtype" : "EventControllerKey"
1426 "xtype" : "OverlaySplitView"
1432 "\t Resources.singleton().disconnect(_this.statusbar.handler_id);",
1435 "\t this.windowstate.file.getLanguageServer().document_close(",
1436 "\t \tthis.windowstate.file",
1439 "\t BuilderApplication.removeWindow(this);",
1441 "\t if (BuilderApplication.windows.size < 1) {",
1443 "\t\t\tthis.windowstate.file.getLanguageServer().exit();",
1444 "\t\t} catch(Error e) {}",
1446 "\t\tBuilderApplication.singleton( null ).quit();",
1462 " // hide the file editing..",
1464 " //this.hideViewEditing();",
1465 " // this is updated by windowstate - we try and fill it in..",
1466 " _this.statusbar.el.hide();",
1467 " //_this.statusbar_errors.el.hide();",
1468 " //_this.statusbar_warnings.el.hide();",
1469 " //_this.statusbar_depricated.el.hide();",
1470 " _this.statusbar_compile_spinner.el.hide();",
1472 " Resources.singleton().checkResources();",
1479 "string title" : "Roo Application Builder",
1480 "xtype" : "ApplicationWindow",
1481 "| void initChildren" : [
1483 " // this needs putting in a better place..",
1484 " if (this.windowstate == null) {",
1485 " \tthis.windowstate = new WindowState(this);",
1499 "| void openNewWindow" : [
1502 " var w = new Xcls_MainWindow();",
1504 "\tBuilderApplication.addWindow(w);",
1506 " w.initChildren();",
1507 " w.windowstate.showPopoverFiles(w.open_projects_btn.el, _this.project, false);",
1512 "| void setTitle" : [
1514 " if (_this.windowstate.project == null || ",
1515 "\t _this.windowstate.file == null",
1517 " \tthis.el.set_title(\"Select File\");",
1520 " _this.el.set_title(",
1521 " \t_this.windowstate.project.name + ",
1523 "\t\t_this.windowstate.file.relpath);",
1530 " if (this.windowstate.file == null) {",
1531 " \tthis.windowstate.showPopoverFiles(this.open_projects_btn.el, null, false);",
1535 "| void updateErrors" : [
1539 " \tGLib.debug(\"updateErrors\");",
1541 "\tvar pr = this.windowstate.project.getErrors(\"ERR\");",
1543 "\tthis.statusbar_errors.setNotices(",
1545 "\t\tthis.windowstate.file.getErrorsTotal(\"ERR\")",
1548 "\tthis.statusbar_warnings.setNotices(",
1549 "\t\tthis.windowstate.project.getErrors(\"WARN\"),",
1550 "\t\tthis.windowstate.file.getErrorsTotal(\"WARN\")",
1552 "\tthis.statusbar_depricated.setNotices(",
1553 "\t\tthis.windowstate.project.getErrors(\"DEPR\"),",
1554 "\t\tthis.windowstate.file.getErrorsTotal(\"DEPR\")",
1557 "\t_this.statusbar_run.el.hide();",
1559 "\tif (pr.get_n_items() < 1) {",
1560 "\t\t_this.statusbar_run.el.show();",
1567 "name" : "MainWindow"