1 static Xcls_MainWindow _MainWindow;
3 public class Xcls_MainWindow : Object
5 public Gtk.ApplicationWindow el;
6 private Xcls_MainWindow _this;
8 public static Xcls_MainWindow singleton()
10 if (_MainWindow == null) {
11 _MainWindow= new Xcls_MainWindow();
15 public Xcls_headerbar headerbar;
16 public Xcls_splitview splitview;
17 public Xcls_vbox vbox;
18 public Xcls_mainpane mainpane;
19 public Xcls_leftpane leftpane;
20 public Xcls_editpane editpane;
21 public Xcls_tree tree;
22 public Xcls_props props;
23 public Xcls_rooviewbox rooviewbox;
24 public Xcls_codeeditviewbox codeeditviewbox;
25 public Xcls_topbarmenu topbarmenu;
26 public Xcls_statusbar statusbar;
27 public Xcls_statusbar_compilestatus_label statusbar_compilestatus_label;
28 public Xcls_statusbar_errors statusbar_errors;
29 public Xcls_statusbar_warnings statusbar_warnings;
30 public Xcls_statusbar_depricated statusbar_depricated;
31 public Xcls_statusbar_run statusbar_run;
32 public Xcls_statusbar_compile_spinner statusbar_compile_spinner;
33 public Xcls_statusbar_compile_icon statusbar_compile_icon;
34 public Xcls_filesearch filesearch;
35 public Xcls_open_projects_btn open_projects_btn;
36 public Xcls_winsel winsel;
37 public Xcls_winfilter winfilter;
38 public Xcls_windowsearch windowsearch;
39 public Xcls_winmodel winmodel;
40 public Xcls_projcol projcol;
41 public Xcls_filecol filecol;
42 public Xcls_histmodel histmodel;
43 public Xcls_histsearch histsearch;
46 public WindowState windowstate;
47 public bool winloading;
48 public Project.Project project;
51 public Xcls_MainWindow()
54 this.el = new Gtk.ApplicationWindow(BuilderApplication.singleton({}));
57 this.winloading = false;
61 this.el.title = "Roo Application Builder";
62 this.el.default_height = 850;
63 this.el.default_width = 1200;
64 new Xcls_headerbar( _this );
65 this.el.set_titlebar ( _this.headerbar.el );
66 new Xcls_splitview( _this );
67 this.el.child = _this.splitview.el;
71 this.el.set_icon_name("roobuilder");
74 this.el.close_request.connect( ( ) => {
75 Resources.singleton().disconnect(_this.statusbar.handler_id);
78 this.windowstate.file.getLanguageServer().document_close(
82 BuilderApplication.removeWindow(this);
84 if (BuilderApplication.windows.size < 1) {
85 this.windowstate.file.getLanguageServer().exit();
86 BuilderApplication.singleton( null ).quit();
90 this.el.show.connect( ( ) => {
91 // hide the file editing..
93 //this.hideViewEditing();
94 // this is updated by windowstate - we try and fill it in..
95 _this.statusbar.el.hide();
96 //_this.statusbar_errors.el.hide();
97 //_this.statusbar_warnings.el.hide();
98 //_this.statusbar_depricated.el.hide();
99 _this.statusbar_compile_spinner.el.hide();
101 Resources.singleton().checkResources();
106 this.el.hide.connect( () => {
113 // user defined functions
114 public void updateErrors () {
117 GLib.debug("updateErrors");
119 var pr = this.windowstate.project.getErrors("ERR");
121 this.statusbar_errors.setNotices(
123 this.windowstate.file.getErrorsTotal("ERR")
126 this.statusbar_warnings.setNotices(
127 this.windowstate.project.getErrors("WARN"),
128 this.windowstate.file.getErrorsTotal("WARN")
130 this.statusbar_depricated.setNotices(
131 this.windowstate.project.getErrors("DEPR"),
132 this.windowstate.file.getErrorsTotal("DEPR")
135 _this.statusbar_run.el.hide();
137 if (pr.get_n_items() < 1) {
138 _this.statusbar_run.el.show();
142 public void initChildren () {
143 // this needs putting in a better place..
144 if (this.windowstate == null) {
145 this.windowstate = new WindowState(this);
157 public void show () {
160 if (this.windowstate.file == null) {
161 this.windowstate.showPopoverFiles(this.open_projects_btn.el, null, false);
164 public void setTitle () {
165 if (_this.windowstate.project == null ||
166 _this.windowstate.file == null
168 this.el.set_title("Select File");
172 _this.windowstate.project.name +
174 _this.windowstate.file.relpath);
176 public void openNewWindow () {
178 var w = new Xcls_MainWindow();
180 BuilderApplication.addWindow(w);
183 w.windowstate.showPopoverFiles(w.open_projects_btn.el, _this.project, false);
186 public class Xcls_headerbar : Object
188 public Gtk.HeaderBar el;
189 private Xcls_MainWindow _this;
193 public bool show_close_button;
197 public Xcls_headerbar(Xcls_MainWindow _owner )
200 _this.headerbar = this;
201 this.el = new Gtk.HeaderBar();
204 this.show_close_button = true;
205 this.title = "Application Builder";
207 // set gobject values
208 var child_1 = new Xcls_Box3( _this );
210 this.el.pack_start ( child_1.el );
213 // user defined functions
215 public class Xcls_Box3 : Object
218 private Xcls_MainWindow _this;
224 public Xcls_Box3(Xcls_MainWindow _owner )
227 this.el = new Gtk.Box( Gtk.Orientation.HORIZONTAL, 0 );
231 // set gobject values
232 var child_1 = new Xcls_Button4( _this );
234 this.el.append ( child_1.el );
237 // user defined functions
239 public class Xcls_Button4 : Object
241 public Gtk.Button el;
242 private Xcls_MainWindow _this;
248 public Xcls_Button4(Xcls_MainWindow _owner )
251 this.el = new Gtk.Button();
255 // set gobject values
256 this.el.icon_name = "preferences-system-windows";
257 this.el.has_frame = false;
260 this.el.clicked.connect( ( ) => {
261 _this.splitview.el.show_sidebar = !_this.splitview.el.show_sidebar;
262 if (_this.splitview.el.show_sidebar) {
263 _this.filesearch.el.grab_focus();
264 _this.winloading = true;
265 _this.winmodel.el.remove_all();
266 _this.filesearch.el.set_text("");
267 for(var i = 0;i < BuilderApplication.windowlist.get_n_items(); i++) {
268 _this.winmodel.el.append( BuilderApplication.windowlist.get_item(i));
270 _this.winsel.selectCurrent();
271 _this.winloading = false;
276 // user defined functions
281 public class Xcls_splitview : Object
283 public Adw.OverlaySplitView el;
284 private Xcls_MainWindow _this;
290 public Xcls_splitview(Xcls_MainWindow _owner )
293 _this.splitview = this;
294 this.el = new Adw.OverlaySplitView();
298 // set gobject values
299 this.el.collapsed = true;
300 this.el.sidebar_width_fraction = 0.40000;
301 this.el.show_sidebar = false;
302 new Xcls_vbox( _this );
303 this.el.content = _this.vbox.el;
304 var child_2 = new Xcls_Box33( _this );
305 this.el.sidebar = child_2.el;
308 // user defined functions
310 public class Xcls_vbox : Object
313 private Xcls_MainWindow _this;
319 public Xcls_vbox(Xcls_MainWindow _owner )
323 this.el = new Gtk.Box( Gtk.Orientation.VERTICAL, 0 );
327 // set gobject values
328 this.el.homogeneous = false;
329 this.el.hexpand = true;
330 this.el.vexpand = false;
331 new Xcls_mainpane( _this );
332 this.el.append( _this.mainpane.el );
333 var child_2 = new Xcls_Box15( _this );
335 this.el.append( child_2.el );
338 // user defined functions
340 public class Xcls_mainpane : Object
343 private Xcls_MainWindow _this;
347 public int lastWidth;
350 public Xcls_mainpane(Xcls_MainWindow _owner )
353 _this.mainpane = this;
354 this.el = new Gtk.Paned( Gtk.Orientation.HORIZONTAL );
359 // set gobject values
360 this.el.hexpand = true;
361 this.el.vexpand = true;
362 this.el.position = 400;
363 new Xcls_leftpane( _this );
364 this.el.start_child = _this.leftpane.el;
365 var child_2 = new Xcls_Box12( _this );
366 this.el.end_child = child_2.el;
369 this.el.accept_position.connect( ( ) => {
370 _this.windowstate.left_tree.onresize();
375 // user defined functions
377 public class Xcls_leftpane : Object
380 private Xcls_MainWindow _this;
386 public Xcls_leftpane(Xcls_MainWindow _owner )
389 _this.leftpane = this;
390 this.el = new Gtk.Box( Gtk.Orientation.HORIZONTAL, 0 );
394 // set gobject values
395 this.el.hexpand = true;
396 this.el.vexpand = true;
397 new Xcls_editpane( _this );
398 this.el.append( _this.editpane.el );
401 // user defined functions
403 public class Xcls_editpane : Object
406 private Xcls_MainWindow _this;
412 public Xcls_editpane(Xcls_MainWindow _owner )
415 _this.editpane = this;
416 this.el = new Gtk.Paned( Gtk.Orientation.HORIZONTAL );
420 // set gobject values
421 new Xcls_tree( _this );
422 this.el.start_child = _this.tree.el;
423 new Xcls_props( _this );
424 this.el.end_child = _this.props.el;
427 this.el.accept_position.connect( ( ) => {
428 _this.windowstate.left_tree.onresize();
431 this.el.move_handle.connect( (scroll) => {
432 GLib.debug("Move handle");
437 // user defined functions
439 public class Xcls_tree : Object
442 private Xcls_MainWindow _this;
448 public Xcls_tree(Xcls_MainWindow _owner )
452 this.el = new Gtk.Box( Gtk.Orientation.VERTICAL, 0 );
456 // set gobject values
457 this.el.hexpand = true;
458 this.el.vexpand = true;
461 // user defined functions
464 public class Xcls_props : Object
467 private Xcls_MainWindow _this;
473 public Xcls_props(Xcls_MainWindow _owner )
477 this.el = new Gtk.Box( Gtk.Orientation.VERTICAL, 0 );
481 // set gobject values
482 this.el.hexpand = true;
483 this.el.vexpand = true;
486 // user defined functions
491 public class Xcls_Box12 : Object
494 private Xcls_MainWindow _this;
500 public Xcls_Box12(Xcls_MainWindow _owner )
503 this.el = new Gtk.Box( Gtk.Orientation.VERTICAL, 0 );
507 // set gobject values
508 this.el.hexpand = true;
509 this.el.vexpand = true;
510 new Xcls_rooviewbox( _this );
511 this.el.append( _this.rooviewbox.el );
512 new Xcls_codeeditviewbox( _this );
513 this.el.append( _this.codeeditviewbox.el );
516 // user defined functions
518 public class Xcls_rooviewbox : Object
521 private Xcls_MainWindow _this;
527 public Xcls_rooviewbox(Xcls_MainWindow _owner )
530 _this.rooviewbox = this;
531 this.el = new Gtk.Box( Gtk.Orientation.VERTICAL, 0 );
535 // set gobject values
536 this.el.hexpand = true;
537 this.el.vexpand = true;
540 // user defined functions
543 public class Xcls_codeeditviewbox : Object
546 private Xcls_MainWindow _this;
552 public Xcls_codeeditviewbox(Xcls_MainWindow _owner )
555 _this.codeeditviewbox = this;
556 this.el = new Gtk.Box( Gtk.Orientation.VERTICAL, 0 );
560 // set gobject values
561 this.el.hexpand = true;
562 this.el.vexpand = true;
565 // user defined functions
570 public class Xcls_Box15 : Object
573 private Xcls_MainWindow _this;
579 public Xcls_Box15(Xcls_MainWindow _owner )
582 this.el = new Gtk.Box( Gtk.Orientation.HORIZONTAL, 0 );
586 // set gobject values
587 this.el.homogeneous = false;
588 this.el.vexpand = false;
589 var child_1 = new Xcls_Button16( _this );
591 this.el.append( child_1.el );
592 var child_2 = new Xcls_Button17( _this );
594 this.el.append( child_2.el );
595 var child_3 = new Xcls_MenuButton18( _this );
597 this.el.append( child_3.el );
598 var child_4 = new Xcls_Label23( _this );
600 this.el.append( child_4.el );
601 new Xcls_statusbar( _this );
602 this.el.append( _this.statusbar.el );
603 var child_6 = new Xcls_Box25( _this );
605 this.el.append( child_6.el );
606 new Xcls_statusbar_compile_spinner( _this );
607 this.el.append( _this.statusbar_compile_spinner.el );
608 new Xcls_statusbar_compile_icon( _this );
609 this.el.append( _this.statusbar_compile_icon.el );
612 // user defined functions
614 public class Xcls_Button16 : Object
616 public Gtk.Button el;
617 private Xcls_MainWindow _this;
621 public bool always_show_image;
624 public Xcls_Button16(Xcls_MainWindow _owner )
627 this.el = new Gtk.Button();
630 this.always_show_image = true;
632 // set gobject values
633 this.el.icon_name = "emblem-system";
634 this.el.tooltip_text = "Project Details";
635 this.el.label = "Edit Project Settings";
638 this.el.clicked.connect( ( ) => {
640 _this.windowstate.projectPopoverShow(_this.el, null, null);
646 // user defined functions
649 public class Xcls_Button17 : Object
651 public Gtk.Button el;
652 private Xcls_MainWindow _this;
656 public bool always_show_image;
659 public Xcls_Button17(Xcls_MainWindow _owner )
662 this.el = new Gtk.Button();
665 this.always_show_image = true;
667 // set gobject values
668 this.el.icon_name = "document-properties";
669 this.el.tooltip_text = "File Details";
670 this.el.label = "Edit File Properties";
673 this.el.clicked.connect( ( ) => {
675 // create a new file in project..
676 if (_this.project == null || _this.windowstate.file == null) {
679 _this.windowstate.file_details.show(
680 _this.windowstate.file, _this.el, false
689 // user defined functions
692 public class Xcls_MenuButton18 : Object
694 public Gtk.MenuButton el;
695 private Xcls_MainWindow _this;
699 public bool always_show_image;
702 public Xcls_MenuButton18(Xcls_MainWindow _owner )
705 this.el = new Gtk.MenuButton();
708 this.always_show_image = true;
710 // set gobject values
711 this.el.icon_name = "dialog-information";
712 this.el.label = "About";
713 new Xcls_topbarmenu( _this );
714 this.el.popover = _this.topbarmenu.el;
717 // user defined functions
719 public class Xcls_topbarmenu : Object
721 public Gtk.PopoverMenu el;
722 private Xcls_MainWindow _this;
728 public Xcls_topbarmenu(Xcls_MainWindow _owner )
731 _this.topbarmenu = this;
732 this.el = new Gtk.PopoverMenu.from_model(null);
736 // set gobject values
737 var child_1 = new Xcls_Box20( _this );
739 this.el.set_child ( child_1.el );
748 // user defined functions
750 public class Xcls_Box20 : Object
753 private Xcls_MainWindow _this;
759 public Xcls_Box20(Xcls_MainWindow _owner )
762 this.el = new Gtk.Box( Gtk.Orientation.VERTICAL, 0 );
766 // set gobject values
767 var child_1 = new Xcls_Button21( _this );
769 this.el.append( child_1.el );
770 var child_2 = new Xcls_Button22( _this );
772 this.el.append( child_2.el );
775 // user defined functions
777 public class Xcls_Button21 : Object
779 public Gtk.Button el;
780 private Xcls_MainWindow _this;
786 public Xcls_Button21(Xcls_MainWindow _owner )
789 this.el = new Gtk.Button();
793 // set gobject values
794 this.el.label = "Download updated Resources";
797 this.el.activate.connect( ( ) => {
798 Resources.singleton().fetchStart();
802 // user defined functions
805 public class Xcls_Button22 : Object
807 public Gtk.Button el;
808 private Xcls_MainWindow _this;
814 public Xcls_Button22(Xcls_MainWindow _owner )
817 this.el = new Gtk.Button();
821 // set gobject values
822 this.el.label = "About the Builder";
825 this.el.clicked.connect( () => {
826 About.singleton().el.show();
830 // user defined functions
836 public class Xcls_Label23 : Object
839 private Xcls_MainWindow _this;
845 public Xcls_Label23(Xcls_MainWindow _owner )
848 this.el = new Gtk.Label( " " );
852 // set gobject values
853 this.el.hexpand = true;
856 // user defined functions
859 public class Xcls_statusbar : Object
861 public Gtk.ProgressBar el;
862 private Xcls_MainWindow _this;
866 public ulong handler_id;
869 public Xcls_statusbar(Xcls_MainWindow _owner )
872 _this.statusbar = this;
873 this.el = new Gtk.ProgressBar();
876 this.handler_id = -1;
878 // set gobject values
879 this.el.show_text = true;
884 this.handler_id = Resources.singleton().updateProgress.connect((pos,total) => {
887 _this.mainpane.el.set_sensitive(true);
891 _this.mainpane.el.set_sensitive(false);
893 this.el.set_fraction ((1.0f * pos) / (1.0f * total));
894 this.el.set_text("Fetching Resource : %s/%s".printf(pos.to_string(), total.to_string()));
900 // user defined functions
903 public class Xcls_Box25 : Object
906 private Xcls_MainWindow _this;
912 public Xcls_Box25(Xcls_MainWindow _owner )
915 this.el = new Gtk.Box( Gtk.Orientation.HORIZONTAL, 0 );
919 // set gobject values
920 new Xcls_statusbar_compilestatus_label( _this );
921 this.el.append( _this.statusbar_compilestatus_label.el );
922 new Xcls_statusbar_errors( _this );
923 this.el.append( _this.statusbar_errors.el );
924 new Xcls_statusbar_warnings( _this );
925 this.el.append( _this.statusbar_warnings.el );
926 new Xcls_statusbar_depricated( _this );
927 this.el.append( _this.statusbar_depricated.el );
928 new Xcls_statusbar_run( _this );
929 this.el.append( _this.statusbar_run.el );
932 // user defined functions
934 public class Xcls_statusbar_compilestatus_label : Object
937 private Xcls_MainWindow _this;
943 public Xcls_statusbar_compilestatus_label(Xcls_MainWindow _owner )
946 _this.statusbar_compilestatus_label = this;
947 this.el = new Gtk.Label( "Compile Status:" );
951 // set gobject values
952 this.el.margin_end = 4;
953 this.el.margin_start = 4;
956 // user defined functions
959 public class Xcls_statusbar_errors : Object
961 public Gtk.Button el;
962 private Xcls_MainWindow _this;
966 public Xcls_ValaCompileErrors popup;
969 public Xcls_statusbar_errors(Xcls_MainWindow _owner )
972 _this.statusbar_errors = this;
973 this.el = new Gtk.Button();
977 // set gobject values
978 this.el.icon_name = "dialog-error";
979 this.el.label = "0 Errors";
982 this.el.clicked.connect( () => {
984 if (this.popup == null) {
993 // user defined functions
994 public void setNotices (GLib.ListStore nots, int ferrors ) {
995 BuilderApplication.showSpinner("");
996 if (nots.get_n_items() < 1 ) {
998 if (this.popup != null) {
999 this.popup.el.hide();
1005 this.el.label = "%d/%d Errors".printf(ferrors,(int)nots.get_n_items());
1009 if (this.popup == null) {
1010 this.popup = new Xcls_ValaCompileErrors();
1011 this.popup.window = _this;
1012 // this.popup.el.set_transient_for( _this.el );
1013 this.popup.el.set_parent(this.el);
1016 this.popup.updateNotices(nots);
1021 public class Xcls_statusbar_warnings : Object
1023 public Gtk.Button el;
1024 private Xcls_MainWindow _this;
1028 public Xcls_ValaCompileErrors popup;
1031 public Xcls_statusbar_warnings(Xcls_MainWindow _owner )
1034 _this.statusbar_warnings = this;
1035 this.el = new Gtk.Button();
1039 // set gobject values
1040 this.el.icon_name = "dialog-warning";
1041 this.el.label = "0 Warnings";
1044 this.el.clicked.connect( () => {
1046 if (this.popup == null) {
1055 // user defined functions
1056 public void setNotices (GLib.ListStore nots, int ferrs ) {
1058 if (nots.get_n_items() < 1 ) {
1060 if (this.popup != null) {
1061 this.popup.el.hide();
1067 this.el.label = "%d/%d Warnings".printf(ferrs,(int)nots.get_n_items());
1071 if (this.popup == null) {
1072 this.popup = new Xcls_ValaCompileErrors();
1073 this.popup.window = _this;
1074 // this.popup.el.set_transient_for( _this.el );
1075 this.popup.el.set_parent(this.el);
1077 this.popup.updateNotices(nots);
1082 public class Xcls_statusbar_depricated : Object
1084 public Gtk.Button el;
1085 private Xcls_MainWindow _this;
1089 public Xcls_ValaCompileErrors popup;
1090 public GLib.ListStore notices;
1093 public Xcls_statusbar_depricated(Xcls_MainWindow _owner )
1096 _this.statusbar_depricated = this;
1097 this.el = new Gtk.Button();
1100 this.notices = null;
1102 // set gobject values
1103 this.el.icon_name = "dialog-information";
1104 this.el.label = "0 Depricated";
1107 this.el.clicked.connect( () => {
1109 if (this.popup == null) {
1118 // user defined functions
1119 public void setNotices (GLib.ListStore nots, int ferrs ) {
1121 if (nots.get_n_items() < 1 ) {
1123 if (this.popup != null) {
1124 this.popup.el.hide();
1130 this.el.label = "%d/%d Depricated".printf(ferrs,(int)nots.get_n_items());
1134 if (this.popup == null) {
1135 this.popup = new Xcls_ValaCompileErrors();
1136 this.popup.window = _this;
1137 // this.popup.el.set_transient_for( _this.el );
1138 this.popup.el.set_parent(this.el);
1140 this.popup.updateNotices(nots);
1145 public class Xcls_statusbar_run : Object
1147 public Gtk.Button el;
1148 private Xcls_MainWindow _this;
1152 public Xcls_ValaCompileErrors popup;
1153 public Palete.ValaCompileRequest? last_request;
1156 public Xcls_statusbar_run(Xcls_MainWindow _owner )
1159 _this.statusbar_run = this;
1160 this.el = new Gtk.Button();
1163 this.last_request = null;
1165 // set gobject values
1166 this.el.icon_name = "media-playback-start";
1167 this.el.label = "Run";
1168 this.el.visible = false;
1171 this.el.clicked.connect( () => {
1173 if (_this.windowstate.file == null) {
1176 if (_this.statusbar_compile_spinner.el.spinning) {
1177 _this.windowstate.compile_results.el.set_parent(this.el);
1178 _this.windowstate.compile_results.el.show(); // show currently running.
1182 if (this.last_request != null) {
1183 this.last_request.cancel();
1184 if (this.last_request.terminal_pid > 0) {
1185 this.last_request.killChildren(this.last_request.terminal_pid);
1188 var pr = _this.windowstate.project as Project.Gtk;
1194 this.last_request= new Palete.ValaCompileRequest(
1196 pr.firstBuildModuleWith(_this.windowstate.file)
1198 this.last_request.onOutput.connect( ( str) => {
1199 _this.windowstate.compile_results.addLine(str);
1201 this.last_request.run.begin( ( a, r) => {
1202 this.last_request.run.end(r);
1204 if (_this.windowstate.compile_results.el.parent == null) {
1205 _this.windowstate.compile_results.el.set_parent(this.el);
1207 _this.windowstate.compile_results.show(this.el,true);
1212 // user defined functions
1216 public class Xcls_statusbar_compile_spinner : Object
1218 public Gtk.Spinner el;
1219 private Xcls_MainWindow _this;
1225 public Xcls_statusbar_compile_spinner(Xcls_MainWindow _owner )
1228 _this.statusbar_compile_spinner = this;
1229 this.el = new Gtk.Spinner();
1233 // set gobject values
1234 this.el.margin_end = 4;
1235 this.el.margin_start = 4;
1236 this.el.tooltip_text = "Compiling";
1239 // user defined functions
1240 public void start (string icon, string tooltip) {
1242 if (icon == "spinner") {
1245 this.el.tooltip_text = tooltip;
1246 _this.statusbar_compile_icon.el.hide();
1249 // GLib.debug("set status icon %s, %s", icon, tooltip);
1250 _this.statusbar_compile_icon.el.tooltip_text = tooltip;
1251 _this.statusbar_compile_icon.el.icon_name = icon;
1252 _this.statusbar_compile_icon.el.show();
1257 public void stop () {
1260 _this.statusbar_compile_icon.el.hide();
1264 public class Xcls_statusbar_compile_icon : Object
1266 public Gtk.Image el;
1267 private Xcls_MainWindow _this;
1273 public Xcls_statusbar_compile_icon(Xcls_MainWindow _owner )
1276 _this.statusbar_compile_icon = this;
1277 this.el = new Gtk.Image();
1281 // set gobject values
1282 this.el.margin_end = 4;
1283 this.el.margin_start = 4;
1284 this.el.icon_size = Gtk.IconSize.NORMAL;
1287 // user defined functions
1292 public class Xcls_Box33 : Object
1295 private Xcls_MainWindow _this;
1301 public Xcls_Box33(Xcls_MainWindow _owner )
1304 this.el = new Gtk.Box( Gtk.Orientation.VERTICAL, 0 );
1308 // set gobject values
1309 var child_1 = new Xcls_SearchBar34( _this );
1311 this.el.append( child_1.el );
1312 var child_2 = new Xcls_Box36( _this );
1314 this.el.append( child_2.el );
1315 var child_3 = new Xcls_Paned45( _this );
1317 this.el.append( child_3.el );
1320 // user defined functions
1322 public class Xcls_SearchBar34 : Object
1324 public Gtk.SearchBar el;
1325 private Xcls_MainWindow _this;
1331 public Xcls_SearchBar34(Xcls_MainWindow _owner )
1334 this.el = new Gtk.SearchBar();
1338 // set gobject values
1339 this.el.hexpand = true;
1340 this.el.search_mode_enabled = true;
1341 new Xcls_filesearch( _this );
1342 this.el.child = _this.filesearch.el;
1345 // user defined functions
1347 public class Xcls_filesearch : Object
1349 public Gtk.SearchEntry el;
1350 private Xcls_MainWindow _this;
1356 public Xcls_filesearch(Xcls_MainWindow _owner )
1359 _this.filesearch = this;
1360 this.el = new Gtk.SearchEntry();
1364 // set gobject values
1365 this.el.hexpand = true;
1366 this.el.placeholder_text = "Search for file";
1369 this.el.search_changed.connect( ( ) => {
1371 _this.windowsearch.el.set_search(this.el.get_text());
1375 // user defined functions
1379 public class Xcls_Box36 : Object
1382 private Xcls_MainWindow _this;
1388 public Xcls_Box36(Xcls_MainWindow _owner )
1391 this.el = new Gtk.Box( Gtk.Orientation.HORIZONTAL, 0 );
1395 // set gobject values
1396 this.el.hexpand = true;
1397 new Xcls_open_projects_btn( _this );
1398 this.el.append( _this.open_projects_btn.el );
1399 var child_2 = new Xcls_Button41( _this );
1401 this.el.append( child_2.el );
1404 // user defined functions
1406 public class Xcls_open_projects_btn : Object
1408 public Gtk.Button el;
1409 private Xcls_MainWindow _this;
1415 public Xcls_open_projects_btn(Xcls_MainWindow _owner )
1418 _this.open_projects_btn = this;
1419 this.el = new Gtk.Button();
1423 // set gobject values
1424 this.el.hexpand = true;
1425 var child_1 = new Xcls_Box38( _this );
1426 this.el.child = child_1.el;
1429 this.el.clicked.connect( ( ) => {
1430 _this.windowstate.showPopoverFiles(this.el, _this.project, false);
1434 // user defined functions
1436 public class Xcls_Box38 : Object
1439 private Xcls_MainWindow _this;
1445 public Xcls_Box38(Xcls_MainWindow _owner )
1448 this.el = new Gtk.Box( Gtk.Orientation.HORIZONTAL, 0 );
1452 // set gobject values
1453 var child_1 = new Xcls_Image39( _this );
1455 this.el.append( child_1.el );
1456 var child_2 = new Xcls_Label40( _this );
1458 this.el.append( child_2.el );
1461 // user defined functions
1463 public class Xcls_Image39 : Object
1465 public Gtk.Image el;
1466 private Xcls_MainWindow _this;
1472 public Xcls_Image39(Xcls_MainWindow _owner )
1475 this.el = new Gtk.Image();
1479 // set gobject values
1480 this.el.icon_name = "document-open";
1481 this.el.margin_end = 4;
1484 // user defined functions
1487 public class Xcls_Label40 : Object
1489 public Gtk.Label el;
1490 private Xcls_MainWindow _this;
1496 public Xcls_Label40(Xcls_MainWindow _owner )
1499 this.el = new Gtk.Label( "Open File" );
1503 // set gobject values
1506 // user defined functions
1511 public class Xcls_Button41 : Object
1513 public Gtk.Button el;
1514 private Xcls_MainWindow _this;
1520 public Xcls_Button41(Xcls_MainWindow _owner )
1523 this.el = new Gtk.Button();
1527 // set gobject values
1528 this.el.hexpand = true;
1529 var child_1 = new Xcls_Box42( _this );
1530 this.el.child = child_1.el;
1533 this.el.clicked.connect( ( ) => {
1534 _this.splitview.el.show_sidebar = false;
1535 _this.windowstate.showPopoverFiles(_this.el, _this.project, true);
1539 // user defined functions
1541 public class Xcls_Box42 : Object
1544 private Xcls_MainWindow _this;
1550 public Xcls_Box42(Xcls_MainWindow _owner )
1553 this.el = new Gtk.Box( Gtk.Orientation.HORIZONTAL, 0 );
1557 // set gobject values
1558 var child_1 = new Xcls_Image43( _this );
1560 this.el.append( child_1.el );
1561 var child_2 = new Xcls_Label44( _this );
1563 this.el.append( child_2.el );
1566 // user defined functions
1568 public class Xcls_Image43 : Object
1570 public Gtk.Image el;
1571 private Xcls_MainWindow _this;
1577 public Xcls_Image43(Xcls_MainWindow _owner )
1580 this.el = new Gtk.Image();
1584 // set gobject values
1585 this.el.icon_name = "window-new";
1586 this.el.margin_end = 4;
1589 // user defined functions
1592 public class Xcls_Label44 : Object
1594 public Gtk.Label el;
1595 private Xcls_MainWindow _this;
1601 public Xcls_Label44(Xcls_MainWindow _owner )
1604 this.el = new Gtk.Label( "New Window" );
1608 // set gobject values
1611 // user defined functions
1617 public class Xcls_Paned45 : Object
1619 public Gtk.Paned el;
1620 private Xcls_MainWindow _this;
1626 public Xcls_Paned45(Xcls_MainWindow _owner )
1629 this.el = new Gtk.Paned( Gtk.Orientation.VERTICAL );
1633 // set gobject values
1634 this.el.vexpand = true;
1635 var child_1 = new Xcls_ScrolledWindow46( _this );
1636 this.el.start_child = child_1.el;
1637 var child_2 = new Xcls_ScrolledWindow60( _this );
1638 this.el.end_child = child_2.el;
1641 // user defined functions
1643 public class Xcls_ScrolledWindow46 : Object
1645 public Gtk.ScrolledWindow el;
1646 private Xcls_MainWindow _this;
1652 public Xcls_ScrolledWindow46(Xcls_MainWindow _owner )
1655 this.el = new Gtk.ScrolledWindow();
1659 // set gobject values
1660 var child_1 = new Xcls_ColumnView47( _this );
1661 this.el.child = child_1.el;
1664 // user defined functions
1666 public class Xcls_ColumnView47 : Object
1668 public Gtk.ColumnView el;
1669 private Xcls_MainWindow _this;
1675 public Xcls_ColumnView47(Xcls_MainWindow _owner )
1678 new Xcls_winsel( _this );
1679 this.el = new Gtk.ColumnView( _this.winsel.el );
1683 // set gobject values
1684 new Xcls_projcol( _this );
1685 this.el.append_column( _this.projcol.el );
1686 new Xcls_filecol( _this );
1687 this.el.append_column ( _this.filecol.el );
1690 // user defined functions
1692 public class Xcls_winsel : Object
1694 public Gtk.SingleSelection el;
1695 private Xcls_MainWindow _this;
1699 public bool selecting;
1702 public Xcls_winsel(Xcls_MainWindow _owner )
1705 _this.winsel = this;
1706 var child_1 = new Xcls_SortListModel49( _this );
1708 this.el = new Gtk.SingleSelection( child_1.el );
1711 this.selecting = false;
1713 // set gobject values
1714 this.el.can_unselect = false;
1715 this.el.autoselect = false;
1718 this.el.notify["selected"].connect( () => {
1719 if (_this.winloading || this.selecting || this.el.selected == Gtk.INVALID_LIST_POSITION) {
1722 var ws = this.el.selected_item as WindowState;
1726 if (ws.file.path != _this.windowstate.file.path) {
1727 _this.windowstate.fileViewOpen(ws.file, ws.file_details.new_window, -1);
1728 _this.splitview.el.show_sidebar = false;
1731 this.selectCurrent();
1735 // user defined functions
1736 public void selectCurrent () {
1737 this.selecting = true;
1739 for(var i = 0;i < this.el.get_n_items(); i++) {
1740 var ws = this.el.get_item(i) as WindowState;
1741 if (ws.file.path == _this.windowstate.file.path) {
1742 this.el.selected = i;
1746 this.selecting = false;
1751 public class Xcls_SortListModel49 : Object
1753 public Gtk.SortListModel el;
1754 private Xcls_MainWindow _this;
1760 public Xcls_SortListModel49(Xcls_MainWindow _owner )
1763 new Xcls_winfilter( _this );
1764 var child_2 = new Xcls_StringSorter54( _this );
1766 this.el = new Gtk.SortListModel( _this.winfilter.el, child_2.el );
1770 // set gobject values
1773 // user defined functions
1775 public class Xcls_winfilter : Object
1777 public Gtk.FilterListModel el;
1778 private Xcls_MainWindow _this;
1784 public Xcls_winfilter(Xcls_MainWindow _owner )
1787 _this.winfilter = this;
1788 new Xcls_winmodel( _this );
1789 new Xcls_windowsearch( _this );
1790 this.el = new Gtk.FilterListModel( _this.winmodel.el, _this.windowsearch.el );
1794 // set gobject values
1797 // user defined functions
1799 public class Xcls_windowsearch : Object
1801 public Gtk.StringFilter el;
1802 private Xcls_MainWindow _this;
1808 public Xcls_windowsearch(Xcls_MainWindow _owner )
1811 _this.windowsearch = this;
1812 var child_1 = new Xcls_PropertyExpression52( _this );
1814 this.el = new Gtk.StringFilter( child_1.el );
1818 // set gobject values
1821 // user defined functions
1823 public class Xcls_PropertyExpression52 : Object
1825 public Gtk.PropertyExpression el;
1826 private Xcls_MainWindow _this;
1832 public Xcls_PropertyExpression52(Xcls_MainWindow _owner )
1835 this.el = new Gtk.PropertyExpression( typeof(WindowState), null, "file_name" );
1839 // set gobject values
1842 // user defined functions
1846 public class Xcls_winmodel : Object
1848 public GLib.ListStore el;
1849 private Xcls_MainWindow _this;
1855 public Xcls_winmodel(Xcls_MainWindow _owner )
1858 _this.winmodel = this;
1859 this.el = new GLib.ListStore( typeof(WindowState) );
1863 // set gobject values
1866 // user defined functions
1870 public class Xcls_StringSorter54 : Object
1872 public Gtk.StringSorter el;
1873 private Xcls_MainWindow _this;
1879 public Xcls_StringSorter54(Xcls_MainWindow _owner )
1882 var child_1 = new Xcls_PropertyExpression55( _this );
1884 this.el = new Gtk.StringSorter( child_1.el );
1888 // set gobject values
1889 this.el.ignore_case = true;
1892 // user defined functions
1894 public class Xcls_PropertyExpression55 : Object
1896 public Gtk.PropertyExpression el;
1897 private Xcls_MainWindow _this;
1903 public Xcls_PropertyExpression55(Xcls_MainWindow _owner )
1906 this.el = new Gtk.PropertyExpression( typeof(WindowState), null, "file_name" );
1910 // set gobject values
1913 // user defined functions
1919 public class Xcls_projcol : Object
1921 public Gtk.ColumnViewColumn el;
1922 private Xcls_MainWindow _this;
1928 public Xcls_projcol(Xcls_MainWindow _owner )
1931 _this.projcol = this;
1932 var child_1 = new Xcls_SignalListItemFactory57( _this );
1934 this.el = new Gtk.ColumnViewColumn( "Project", child_1.el );
1938 // set gobject values
1939 this.el.id = "projcol";
1940 this.el.expand = true;
1941 this.el.resizable = true;
1944 // user defined functions
1946 public class Xcls_SignalListItemFactory57 : Object
1948 public Gtk.SignalListItemFactory el;
1949 private Xcls_MainWindow _this;
1955 public Xcls_SignalListItemFactory57(Xcls_MainWindow _owner )
1958 this.el = new Gtk.SignalListItemFactory();
1962 // set gobject values
1965 this.el.setup.connect( (listitem) => {
1966 var lbl = new Gtk.Label("");
1967 (listitem as Gtk.ListItem).set_child(lbl);
1968 lbl.justify = Gtk.Justification.LEFT;
1970 lbl.use_markup = true;
1971 lbl.ellipsize = Pango.EllipsizeMode.START;
1973 (listitem as Gtk.ListItem).activatable = true;
1975 this.el.bind.connect( (listitem) => {
1976 var lb = (Gtk.Label) (listitem as Gtk.ListItem).get_child();
1977 var item = (listitem as Gtk.ListItem).get_item() as WindowState;
1979 lb.label = item.project.name;
1987 // user defined functions
1991 public class Xcls_filecol : Object
1993 public Gtk.ColumnViewColumn el;
1994 private Xcls_MainWindow _this;
2000 public Xcls_filecol(Xcls_MainWindow _owner )
2003 _this.filecol = this;
2004 var child_1 = new Xcls_SignalListItemFactory59( _this );
2006 this.el = new Gtk.ColumnViewColumn( "File", child_1.el );
2010 // set gobject values
2011 this.el.id = "filecol";
2012 this.el.expand = true;
2013 this.el.resizable = true;
2016 // user defined functions
2018 public class Xcls_SignalListItemFactory59 : Object
2020 public Gtk.SignalListItemFactory el;
2021 private Xcls_MainWindow _this;
2027 public Xcls_SignalListItemFactory59(Xcls_MainWindow _owner )
2030 this.el = new Gtk.SignalListItemFactory();
2034 // set gobject values
2037 this.el.setup.connect( (listitem) => {
2038 var lbl = new Gtk.Label("");
2039 (listitem as Gtk.ListItem).set_child(lbl);
2040 lbl.justify = Gtk.Justification.LEFT;
2042 lbl.use_markup = true;
2043 lbl.ellipsize = Pango.EllipsizeMode.START;
2045 (listitem as Gtk.ListItem).activatable = true;
2047 this.el.bind.connect( (listitem) => {
2048 var lb = (Gtk.Label) (listitem as Gtk.ListItem).get_child();
2049 var item = (listitem as Gtk.ListItem).get_item() as WindowState;
2051 lb.label = item.file.relpath;
2059 // user defined functions
2065 public class Xcls_ScrolledWindow60 : Object
2067 public Gtk.ScrolledWindow el;
2068 private Xcls_MainWindow _this;
2074 public Xcls_ScrolledWindow60(Xcls_MainWindow _owner )
2077 this.el = new Gtk.ScrolledWindow();
2081 // set gobject values
2082 this.el.hexpand = true;
2083 this.el.vexpand = true;
2084 var child_1 = new Xcls_ColumnView61( _this );
2085 this.el.child = child_1.el;
2088 // user defined functions
2090 public class Xcls_ColumnView61 : Object
2092 public Gtk.ColumnView el;
2093 private Xcls_MainWindow _this;
2099 public Xcls_ColumnView61(Xcls_MainWindow _owner )
2102 var child_1 = new Xcls_SingleSelection62( _this );
2104 this.el = new Gtk.ColumnView( child_1.el );
2108 // set gobject values
2109 this.el.hexpand = true;
2110 this.el.vexpand = true;
2111 var child_2 = new Xcls_ColumnViewColumn70( _this );
2113 this.el.append_column( child_2.el );
2114 var child_3 = new Xcls_ColumnViewColumn72( _this );
2116 this.el.append_column ( child_3.el );
2119 // user defined functions
2121 public class Xcls_SingleSelection62 : Object
2123 public Gtk.SingleSelection el;
2124 private Xcls_MainWindow _this;
2130 public Xcls_SingleSelection62(Xcls_MainWindow _owner )
2133 var child_1 = new Xcls_SortListModel63( _this );
2135 this.el = new Gtk.SingleSelection( child_1.el );
2139 // set gobject values
2140 this.el.can_unselect = true;
2141 this.el.autoselect = false;
2144 // user defined functions
2146 public class Xcls_SortListModel63 : Object
2148 public Gtk.SortListModel el;
2149 private Xcls_MainWindow _this;
2155 public Xcls_SortListModel63(Xcls_MainWindow _owner )
2158 var child_1 = new Xcls_FilterListModel64( _this );
2160 var child_2 = new Xcls_StringSorter68( _this );
2162 this.el = new Gtk.SortListModel( child_1.el, child_2.el );
2166 // set gobject values
2169 // user defined functions
2171 public class Xcls_FilterListModel64 : Object
2173 public Gtk.FilterListModel el;
2174 private Xcls_MainWindow _this;
2180 public Xcls_FilterListModel64(Xcls_MainWindow _owner )
2183 new Xcls_histmodel( _this );
2184 new Xcls_histsearch( _this );
2185 this.el = new Gtk.FilterListModel( _this.histmodel.el, _this.histsearch.el );
2189 // set gobject values
2192 // user defined functions
2194 public class Xcls_histmodel : Object
2196 public GLib.ListStore el;
2197 private Xcls_MainWindow _this;
2203 public Xcls_histmodel(Xcls_MainWindow _owner )
2206 _this.histmodel = this;
2207 this.el = new GLib.ListStore( typeof(WindowState) );
2211 // set gobject values
2214 // user defined functions
2217 public class Xcls_histsearch : Object
2219 public Gtk.StringFilter el;
2220 private Xcls_MainWindow _this;
2226 public Xcls_histsearch(Xcls_MainWindow _owner )
2229 _this.histsearch = this;
2230 var child_1 = new Xcls_PropertyExpression67( _this );
2232 this.el = new Gtk.StringFilter( child_1.el );
2236 // set gobject values
2239 // user defined functions
2241 public class Xcls_PropertyExpression67 : Object
2243 public Gtk.PropertyExpression el;
2244 private Xcls_MainWindow _this;
2250 public Xcls_PropertyExpression67(Xcls_MainWindow _owner )
2253 this.el = new Gtk.PropertyExpression( typeof(WindowState), null, "file_name" );
2257 // set gobject values
2260 // user defined functions
2265 public class Xcls_StringSorter68 : Object
2267 public Gtk.StringSorter el;
2268 private Xcls_MainWindow _this;
2274 public Xcls_StringSorter68(Xcls_MainWindow _owner )
2277 var child_1 = new Xcls_PropertyExpression69( _this );
2279 this.el = new Gtk.StringSorter( child_1.el );
2283 // set gobject values
2284 this.el.ignore_case = true;
2287 // user defined functions
2289 public class Xcls_PropertyExpression69 : Object
2291 public Gtk.PropertyExpression el;
2292 private Xcls_MainWindow _this;
2298 public Xcls_PropertyExpression69(Xcls_MainWindow _owner )
2301 this.el = new Gtk.PropertyExpression( typeof(WindowState), null, "file_name" );
2305 // set gobject values
2308 // user defined functions
2314 public class Xcls_ColumnViewColumn70 : Object
2316 public Gtk.ColumnViewColumn el;
2317 private Xcls_MainWindow _this;
2323 public Xcls_ColumnViewColumn70(Xcls_MainWindow _owner )
2326 var child_1 = new Xcls_SignalListItemFactory71( _this );
2328 this.el = new Gtk.ColumnViewColumn( "Project", child_1.el );
2332 // set gobject values
2333 this.el.expand = true;
2334 this.el.resizable = true;
2337 // user defined functions
2339 public class Xcls_SignalListItemFactory71 : Object
2341 public Gtk.SignalListItemFactory el;
2342 private Xcls_MainWindow _this;
2348 public Xcls_SignalListItemFactory71(Xcls_MainWindow _owner )
2351 this.el = new Gtk.SignalListItemFactory();
2355 // set gobject values
2358 this.el.setup.connect( (listitem) => {
2359 var lbl = new Gtk.Label("");
2360 (listitem as Gtk.ListItem).set_child(lbl);
2361 lbl.justify = Gtk.Justification.LEFT;
2363 lbl.use_markup = true;
2364 lbl.ellipsize = Pango.EllipsizeMode.START;
2366 (listitem as Gtk.ListItem).activatable = true;
2368 this.el.bind.connect( (listitem) => {
2369 var lb = (Gtk.Label) (listitem as Gtk.ListItem).get_child();
2370 var item = (listitem as Gtk.ListItem).get_item() as WindowState;
2372 lb.label = item.project.name;
2380 // user defined functions
2384 public class Xcls_ColumnViewColumn72 : Object
2386 public Gtk.ColumnViewColumn el;
2387 private Xcls_MainWindow _this;
2393 public Xcls_ColumnViewColumn72(Xcls_MainWindow _owner )
2396 var child_1 = new Xcls_SignalListItemFactory73( _this );
2398 this.el = new Gtk.ColumnViewColumn( "File", child_1.el );
2402 // set gobject values
2403 this.el.expand = true;
2404 this.el.resizable = true;
2407 // user defined functions
2409 public class Xcls_SignalListItemFactory73 : Object
2411 public Gtk.SignalListItemFactory el;
2412 private Xcls_MainWindow _this;
2418 public Xcls_SignalListItemFactory73(Xcls_MainWindow _owner )
2421 this.el = new Gtk.SignalListItemFactory();
2425 // set gobject values
2428 this.el.setup.connect( (listitem) => {
2429 var lbl = new Gtk.Label("");
2430 (listitem as Gtk.ListItem).set_child(lbl);
2431 lbl.justify = Gtk.Justification.LEFT;
2433 lbl.use_markup = true;
2434 lbl.ellipsize = Pango.EllipsizeMode.START;
2436 (listitem as Gtk.ListItem).activatable = true;
2438 this.el.bind.connect( (listitem) => {
2439 var lb = (Gtk.Label) (listitem as Gtk.ListItem).get_child();
2440 var item = (listitem as Gtk.ListItem).get_item() as WindowState;
2442 lb.label = item.file.relpath;
2450 // user defined functions