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 "\t var lb = (Gtk.Label) (listitem as Gtk.ListItem).get_child();",
956 "\t var item = (listitem as Gtk.ListItem).get_item() as WindowState;",
958 "\t lb.label = item.project.name;",
968 "\tvar lbl = new Gtk.Label(\"\");",
969 " \t(listitem as Gtk.ListItem).set_child(lbl);",
970 " \tlbl.justify = Gtk.Justification.LEFT;",
971 " \tlbl.xalign = 0;",
972 " \tlbl.use_markup = true;",
973 "\tlbl.ellipsize = Pango.EllipsizeMode.START;",
975 "\t(listitem as Gtk.ListItem).activatable = true;",
980 "xtype" : "SignalListItemFactory"
984 "xtype" : "ColumnViewColumn"
988 "* pack" : "append_column",
989 "bool expand" : true,
990 "bool resizable" : true,
995 "* prop" : "factory",
999 " var lb = (Gtk.Label) (listitem as Gtk.ListItem).get_child();",
1000 " var item = (listitem as Gtk.ListItem).get_item() as WindowState;",
1002 " lb.label = item.file.relpath;",
1012 "\tvar lbl = new Gtk.Label(\"\");",
1013 " \t(listitem as Gtk.ListItem).set_child(lbl);",
1014 " \tlbl.justify = Gtk.Justification.LEFT;",
1015 " \tlbl.xalign = 0;",
1016 " \tlbl.use_markup = true;",
1017 "\tlbl.ellipsize = Pango.EllipsizeMode.START;",
1019 "\t(listitem as Gtk.ListItem).activatable = true;",
1024 "xtype" : "SignalListItemFactory"
1028 "xtype" : "ColumnViewColumn"
1031 "xtype" : "ColumnView"
1034 "xtype" : "ScrolledWindow"
1037 "* prop" : "end_child",
1038 "bool has_frame" : true,
1039 "bool hexpand" : true,
1040 "bool vexpand" : true,
1041 "bool visible" : false,
1042 "id" : "treescroll",
1047 "bool hexpand" : true,
1048 "bool vexpand" : true,
1055 "(n_press, x, y) => {",
1056 "\tif (n_press == 2) {",
1057 "\t\tGLib.debug(\"double cliced\");",
1061 "\tvar tr = (Gtk.TreeListRow)_this.treeselmodel.el.selected_item;",
1062 "\tGLib.debug(\"SELECTED = %s\", tr.item.get_type().name());",
1063 "\tvar f = (JsRender.JsRender) tr.item;",
1064 "\tGLib.debug(\"Click %s\", f.name);",
1065 "\tif (f.xtype == \"Dir\") {",
1070 " \t_this.windowstate.fileViewOpen(f,",
1071 " \t\t_this.keystate.is_shift != 1 ",
1074 "\t_this.splitview.el.show_sidebar = false;",
1082 "xtype" : "GestureClick"
1087 "bool autoselect" : true,
1088 "bool can_unselect" : true,
1089 "id" : "treeselmodel",
1098 "bool incremental" : true,
1099 "id" : "treelistsort",
1104 "Gtk.TreeListModelCreateModelFunc create_func" : [
1106 "\t//GLib.debug(\"liststore got %s\", item.get_type().name());",
1107 "\treturn ((JsRender.JsRender)item).childfiles;",
1110 "bool autoexpand" : true,
1111 "bool passthrough" : false,
1112 "id" : "treelistmodel",
1117 "GLib.Type item_type" : "typeof(JsRender.JsRender)",
1119 "xtype" : "ListStore"
1122 "xtype" : "TreeListModel"
1126 "* prop" : "sorter",
1130 "* prop" : "sorter",
1131 "bool ignore_case" : true,
1135 "* prop" : "expression",
1136 "GLib.Type this_type" : "typeof(JsRender.JsRender) ",
1137 "string property_name" : "name",
1138 "xtype" : "PropertyExpression"
1141 "xtype" : "StringSorter"
1144 "xtype" : "TreeListRowSorter"
1147 "xtype" : "SortListModel"
1151 "* prop" : "filter",
1152 "Gtk.CustomFilterFunc match_func" : [
1154 "\tvar tr = ((Gtk.TreeListRow)item).get_item();",
1155 "\t//GLib.debug(\"filter %s\", tr.get_type().name());",
1156 "\tvar j = (JsRender.JsRender) tr;",
1157 "\tif (j.xtype == \"Dir\" && j.childfiles.n_items < 1) {",
1158 "\t\treturn false;",
1160 "\tvar str = _this.filesearch.el.text.down();\t",
1161 "\tif (j.xtype == \"Dir\") {",
1164 "\t\tfor (var i =0 ; i < j.childfiles.n_items; i++) {",
1165 "\t\t\tvar f = (JsRender.JsRender) j.childfiles.get_item(i);",
1166 "\t\t\t//if (f.xtype != \"PlainFile\") {",
1167 "\t\t\t//\tcontinue;",
1169 "\t\t\tif (f.content_type.contains(\"image\")) {",
1170 "\t\t\t\tcontinue;",
1172 "\t\t\tif (str.length < 1) {",
1173 "\t\t\t\treturn true;",
1175 "\t\t\tif (f.name.down().contains(str)) {",
1176 "\t\t\t\treturn true;",
1181 "\t\treturn false;",
1183 "\t//if (j.xtype != \"PlainFile\") {",
1184 "\t//\treturn false;",
1186 " \tif (j.content_type.contains(\"image\")) {",
1187 "\t\treturn false;",
1190 "\tif (str.length < 1) { // no search.",
1193 "\tif (j.name.down().contains(str)) {",
1200 "id" : "treefilter",
1201 "xtype" : "CustomFilter"
1204 "xtype" : "FilterListModel"
1207 "xtype" : "SingleSelection"
1213 "\t// this.el.set_sorter( new Gtk.StringSorter(",
1214 "\t// \tnew Gtk.PropertyExpression(typeof(JsRender.NodeProp), null, \"name\")",
1220 "* pack" : "append_column",
1221 "bool expand" : true,
1222 "bool resizable" : true,
1227 "* prop" : "factory",
1232 "\t //GLib.debug(\"listitme is is %s\", ((Gtk.ListItem)listitem).get_type().name());",
1236 " \t//var expand = (Gtk.TreeExpander) ((Gtk.ListItem)listitem).get_child();",
1237 " \tvar expand = (Gtk.TreeExpander) ((Gtk.ListItem)listitem).get_child();",
1239 " \tvar hbox = (Gtk.Box) expand.child;",
1242 "\t\tvar img = (Gtk.Image) hbox.get_first_child();",
1243 "\t\tvar lbl = (Gtk.Label) img.get_next_sibling();",
1247 " \t if (lbl == null || lbl.label != \"\") { // do not update",
1250 " \tvar lr = (Gtk.TreeListRow)((Gtk.ListItem)listitem).get_item();",
1251 " \t//GLib.debug(\"LR = %s\", lr.get_type().name());",
1254 " \tvar jr =(JsRender.JsRender) lr.get_item();",
1255 " \t//GLib.debug(\"JR = %s\", jr.get_type().name());\t\t",
1257 " \t if (jr == null) {",
1258 " \t\t GLib.debug(\"Problem getting item\"); ",
1262 "\t\tjr.bind_property(\"icon\",",
1264 " GLib.BindingFlags.SYNC_CREATE);",
1266 " \t//GLib.debug(\"change %s to %s\", lbl.label, np.name);",
1267 " \tlbl.label = jr.name; // for dir's we could hsow the sub path..",
1268 " \tlbl.tooltip_markup = jr.path;",
1270 " expand.set_hide_expander( jr.xtype != \"Dir\" );",
1271 " \t expand.set_list_row(lr);",
1274 " \t// bind image...",
1281 "\tvar expand = new Gtk.TreeExpander();",
1283 "\texpand.set_indent_for_depth(true);",
1284 "\texpand.set_indent_for_icon(true);",
1285 "\tvar hbox = new Gtk.Box(Gtk.Orientation.HORIZONTAL,0);",
1286 "\tvar icon = new Gtk.Image();",
1287 "\ticon.margin_end = 4;",
1288 "\tvar lbl = new Gtk.Label(\"\");",
1289 "\tlbl.use_markup = true;",
1292 " \tlbl.justify = Gtk.Justification.LEFT;",
1293 " \tlbl.xalign = 0;",
1295 " \thbox.append(icon);",
1296 "\thbox.append(lbl);",
1297 "\texpand.set_child(hbox);",
1298 "\t((Gtk.ListItem)listitem).set_child(expand);",
1299 "\t((Gtk.ListItem)listitem).activatable = false;",
1304 "xtype" : "SignalListItemFactory"
1307 "string title" : "All Project Files",
1308 "xtype" : "ColumnViewColumn"
1311 "xtype" : "ColumnView"
1314 "string tooltip_text" : [
1315 "dbl-click - opens in NEW window ",
1316 "shift--dbl-click opens in this window"
1318 "string xns" : "Gtk",
1319 "string xtype" : "ScrolledWindow"
1328 "\t_this.splitview.el.show_sidebar = true;",
1330 "\t_this.filesearch.el.grab_focus();",
1331 "\t_this.winloading = true;",
1332 "\t_this.winmodel.el.remove_all();",
1333 "\t_this.filesearch.el.set_text(\"\");",
1334 "\tfor(var i = 0;i < BuilderApplication.windowlist.get_n_items(); i++) {",
1335 "\t\t_this.winmodel.el.append( BuilderApplication.windowlist.get_item(i));",
1337 "\t_this.winsel.selectCurrent();",
1338 "\t_this.winloading = false;",
1340 "\t _this.treeview.el.set_model(new Gtk.SingleSelection(null));",
1342 "\t_this.windowstate.project.loadDirsIntoStore(_this.treemodel.el);",
1344 "\t_this.treeview.el.set_model(_this.treeselmodel.el);",
1346 " \t_this.treeselmodel.el.selected = Gtk.INVALID_LIST_POSITION;",
1358 "(keyval, keycode, state) => {",
1360 " \tif (keyval == Gdk.Key.Shift_L || keyval == Gdk.Key.Shift_R) {",
1361 " \t\tthis.is_shift = 1;",
1372 "(keyval, keycode, state) => {",
1375 "\t\t\"key release %d, %d, %d ?= %d %d\" , ",
1376 "\t\t\t(int) keyval, (int) keycode, state,",
1377 "\t\t\t(int)Gdk.Key.O, Gdk.ModifierType.CONTROL_MASK",
1379 " \tif (keyval == Gdk.Key.Shift_L || keyval == Gdk.Key.Shift_R) {",
1380 " \t\tthis.is_shift = 0;",
1382 "\t//GLib.debug(\"set state %d , shift = %d\", (int)this.el.get_current_event_state(), Gdk.ModifierType.SHIFT_MASK);",
1383 "\tif (keyval == Gdk.Key.o && (state & Gdk.ModifierType.CONTROL_MASK) != 0) {",
1384 "\t\t// ctrl O pressed",
1385 "\t\tif (!_this.splitview.el.show_sidebar) {",
1386 "\t \t\t_this.sidebar.show(); ",
1395 "xtype" : "EventControllerKey"
1398 "xtype" : "OverlaySplitView"
1404 "\t Resources.singleton().disconnect(_this.statusbar.handler_id);",
1407 "\t this.windowstate.file.getLanguageServer().document_close(",
1408 "\t \tthis.windowstate.file",
1411 "\t BuilderApplication.removeWindow(this);",
1413 "\t if (BuilderApplication.windows.size < 1) {",
1414 "\t\tthis.windowstate.file.getLanguageServer().exit();",
1415 "\t\tBuilderApplication.singleton( null ).quit();",
1431 " // hide the file editing..",
1433 " //this.hideViewEditing();",
1434 " // this is updated by windowstate - we try and fill it in..",
1435 " _this.statusbar.el.hide();",
1436 " //_this.statusbar_errors.el.hide();",
1437 " //_this.statusbar_warnings.el.hide();",
1438 " //_this.statusbar_depricated.el.hide();",
1439 " _this.statusbar_compile_spinner.el.hide();",
1441 " Resources.singleton().checkResources();",
1448 "string title" : "Roo Application Builder",
1449 "xtype" : "ApplicationWindow",
1450 "| void initChildren" : [
1452 " // this needs putting in a better place..",
1453 " if (this.windowstate == null) {",
1454 " \tthis.windowstate = new WindowState(this);",
1468 "| void openNewWindow" : [
1471 " var w = new Xcls_MainWindow();",
1473 "\tBuilderApplication.addWindow(w);",
1475 " w.initChildren();",
1476 " w.windowstate.showPopoverFiles(w.open_projects_btn.el, _this.project, false);",
1481 "| void setTitle" : [
1483 " if (_this.windowstate.project == null || ",
1484 "\t _this.windowstate.file == null",
1486 " \tthis.el.set_title(\"Select File\");",
1489 " _this.el.set_title(",
1490 " \t_this.windowstate.project.name + ",
1492 "\t\t_this.windowstate.file.relpath);",
1499 " if (this.windowstate.file == null) {",
1500 " \tthis.windowstate.showPopoverFiles(this.open_projects_btn.el, null, false);",
1504 "| void updateErrors" : [
1508 " \tGLib.debug(\"updateErrors\");",
1510 "\tvar pr = this.windowstate.project.getErrors(\"ERR\");",
1512 "\tthis.statusbar_errors.setNotices(",
1514 "\t\tthis.windowstate.file.getErrorsTotal(\"ERR\")",
1517 "\tthis.statusbar_warnings.setNotices(",
1518 "\t\tthis.windowstate.project.getErrors(\"WARN\"),",
1519 "\t\tthis.windowstate.file.getErrorsTotal(\"WARN\")",
1521 "\tthis.statusbar_depricated.setNotices(",
1522 "\t\tthis.windowstate.project.getErrors(\"DEPR\"),",
1523 "\t\tthis.windowstate.file.getErrorsTotal(\"DEPR\")",
1526 "\t_this.statusbar_run.el.hide();",
1528 "\tif (pr.get_n_items() < 1) {",
1529 "\t\t_this.statusbar_run.el.show();",
1536 "name" : "MainWindow"