1 static Xcls_GtkView _GtkView;
3 public class Xcls_GtkView : Object
6 private Xcls_GtkView _this;
8 public static Xcls_GtkView singleton()
10 if (_GtkView == null) {
11 _GtkView= new Xcls_GtkView();
15 public Xcls_notebook notebook;
16 public Xcls_label_preview label_preview;
17 public Xcls_label_code label_code;
18 public Xcls_view_layout view_layout;
19 public Xcls_container container;
20 public Xcls_sourceview sourceview;
21 public Xcls_buffer buffer;
22 public Xcls_search_entry search_entry;
23 public Xcls_search_results search_results;
24 public Xcls_nextBtn nextBtn;
25 public Xcls_backBtn backBtn;
26 public Xcls_search_settings search_settings;
27 public Xcls_case_sensitive case_sensitive;
28 public Xcls_regex regex;
29 public Xcls_multiline multiline;
32 public Gtk.Widget lastObj;
33 public Xcls_MainWindow main_window;
34 public Gtk.SourceSearchContext searchcontext;
35 public int last_search_end;
37 public JsRender.JsRender file;
44 this.el = new Gtk.Box( Gtk.Orientation.VERTICAL, 0 );
48 this.last_search_end = 0;
54 this.el.hexpand = true;
55 this.el.vexpand = true;
56 var child_0 = new Xcls_notebook( _this );
58 this.el.pack_start ( child_0.el , true,true,0 );
61 this.el.size_allocate.connect( (aloc) => {
63 this.width = aloc.width;
64 this.height =aloc.height;
68 // user defined functions
69 public void loadFile (JsRender.JsRender file)
73 if (file.tree == null) {
76 this.notebook.el.page = 0;// gtk preview
81 this.sourceview.loadFile();
82 this.searchcontext = null;
85 if (this.lastObj != null) {
86 this.container.el.remove(this.lastObj);
89 // hide the compile view at present..
95 print("ALLOC SET SIZES %d, %d\n", w,h);
97 // set the container size min to 500/500 or 20 px less than max..
98 w = int.max (w-20, 500);
99 h = int.max (h-20, 500);
101 print("SET SIZES %d, %d\n", w,h);
102 _this.container.el.set_size_request(w,h);
104 _this.view_layout.el.set_size(w,h); // should be baded on calc.. -- see update_scrolled.
105 var rgba = Gdk.RGBA ();
107 _this.view_layout.el.override_background_color(Gtk.StateFlags.NORMAL, rgba);
110 var x = new JsRender.NodeToGtk((Project.Gtk) file.project, file.tree);
111 var obj = x.munge() as Gtk.Widget;
118 this.container.el.add(obj);
124 public void highlightNodeAtLine (int ln) {
131 var node = _this.file.lineToNode(ln+1);
134 //print("can not find node\n");
137 var prop = node.lineToProp(ln+1);
138 print("prop : %s", prop == null ? "???" : prop);
141 // ---------- this selects the tree's node...
143 var ltree = _this.main_window.windowstate.left_tree;
144 var tp = ltree.model.treePathFromNode(node);
145 print("got tree path %s\n", tp);
149 //_this.sourceview.allow_node_scroll = false; /// block node scrolling..
152 //print("changing cursor on tree..\n");
156 // let's try allowing editing on the methods.
157 // a little klunky at present..
158 _this.sourceview.prop_selected = "";
160 //see if we can find it..
161 var kv = prop.split(":");
164 //var k = prop.get_key(kv[1]);
165 // fixme -- need to determine if it's an editable property...
166 _this.sourceview.prop_selected = prop;
168 } else if (kv[0] == "l") {
169 _this.sourceview.prop_selected = prop;
173 ltree.view.setCursor(tp, "editor");
174 // ltree.view.el.set_cursor(new Gtk.TreePath.from_string(tp), null, false);
175 _this.sourceview.nodeSelected(node,false);
177 // scrolling is disabled... as node selection calls scroll 10ms after it changes.
178 // GLib.Timeout.add_full(GLib.Priority.DEFAULT,100 , () => {
179 // this.allow_node_scroll = true;
195 public void forwardSearch (bool change_focus) {
197 if (this.searchcontext == null) {
200 this.notebook.el.page = 1;
201 Gtk.TextIter beg, st,en, stl;
203 var buf = this.sourceview.el.get_buffer();
204 buf.get_iter_at_offset(out beg, this.last_search_end);
205 if (!this.searchcontext.forward(beg, out st, out en)) {
206 this.last_search_end = 0;
209 this.last_search_end = en.get_offset();
211 this.sourceview.el.grab_focus();
213 buf.place_cursor(st);
217 this.sourceview.el.scroll_to_iter(st, 0.0f, true, 0.0f, 0.5f);
220 var ln = st.get_line();
222 this.highlightNodeAtLine(ln);
224 public void backSearch (bool change_focus) {
226 if (this.searchcontext == null) {
230 Gtk.TextIter beg, st,en;
231 bool has_wrapped_around;
232 this.buffer.el.get_iter_at_offset(out beg, this.last_search_end -1 );
234 if (!this.searchcontext.backward2(beg, out st, out en, out has_wrapped_around)) {
236 this.last_search_end = 0;
239 this.last_search_end = en.get_offset();
241 this.sourceview.el.grab_focus();
243 this.buffer.el.place_cursor(st);
244 this.sourceview.el.scroll_to_iter(st, 0.1f, true, 0.0f, 0.5f);
245 var ln = st.get_line();
246 this.highlightNodeAtLine(ln);
250 public int search (string in_txt) {
251 this.notebook.el.page = 1;
255 var s = new Gtk.SourceSearchSettings();
256 s.case_sensitive = _this.case_sensitive.el.active;
257 s.regex_enabled = _this.regex.el.active;
258 s.wrap_around = false;
260 this.searchcontext = new Gtk.SourceSearchContext(this.buffer.el,s);
261 this.searchcontext.set_highlight(true);
264 if (_this.multiline.el.active) {
265 txt = in_txt.replace("\\n", "\n");
268 s.set_search_text(txt);
269 Gtk.TextIter beg, st,en;
271 this.buffer.el.get_start_iter(out beg);
272 this.searchcontext.forward(beg, out st, out en);
273 this.last_search_end = 0;
275 return this.searchcontext.get_occurrences_count();
281 public void createThumb () {
284 if (this.file == null) {
287 // only screenshot the gtk preview..
288 if (this.notebook.el.page > 0 ) {
293 var filename = this.file.getIconFileName(false);
295 var win = this.el.get_parent_window();
296 var width = win.get_width();
297 var height = win.get_height();
299 Gdk.Pixbuf screenshot = Gdk.pixbuf_get_from_window(win, 0, 0, width, height); // this.el.position?
300 screenshot.save(filename,"png");
312 // should we hold until it's printed...
323 public void scroll_to_line (int line) {
326 GLib.Timeout.add(100, () => {
329 this.notebook.el.set_current_page(1);
331 var buf = this.sourceview.el.get_buffer();
333 var sbuf = (Gtk.SourceBuffer) buf;
337 sbuf.get_iter_at_line(out iter, line);
338 this.sourceview.el.scroll_to_iter(iter, 0.1f, true, 0.0f, 0.5f);
344 public class Xcls_notebook : Object
346 public Gtk.Notebook el;
347 private Xcls_GtkView _this;
353 public Xcls_notebook(Xcls_GtkView _owner )
356 _this.notebook = this;
357 this.el = new Gtk.Notebook();
361 // set gobject values
362 var child_0 = new Xcls_label_preview( _this );
364 var child_1 = new Xcls_label_code( _this );
366 var child_2 = new Xcls_ScrolledWindow5( _this );
368 this.el.append_page ( child_2.el , _this.label_preview.el );
369 var child_3 = new Xcls_Box8( _this );
371 this.el.append_page ( child_3.el , _this.label_code.el );
374 // user defined functions
376 public class Xcls_label_preview : Object
379 private Xcls_GtkView _this;
385 public Xcls_label_preview(Xcls_GtkView _owner )
388 _this.label_preview = this;
389 this.el = new Gtk.Label( "Preview" );
393 // set gobject values
396 // user defined functions
399 public class Xcls_label_code : Object
402 private Xcls_GtkView _this;
408 public Xcls_label_code(Xcls_GtkView _owner )
411 _this.label_code = this;
412 this.el = new Gtk.Label( "Preview Generated Code" );
416 // set gobject values
419 // user defined functions
422 public class Xcls_ScrolledWindow5 : Object
424 public Gtk.ScrolledWindow el;
425 private Xcls_GtkView _this;
431 public Xcls_ScrolledWindow5(Xcls_GtkView _owner )
434 this.el = new Gtk.ScrolledWindow( null, null );
438 // set gobject values
439 var child_0 = new Xcls_view_layout( _this );
441 this.el.add ( child_0.el );
444 // user defined functions
446 public class Xcls_view_layout : Object
448 public Gtk.Layout el;
449 private Xcls_GtkView _this;
455 public Xcls_view_layout(Xcls_GtkView _owner )
458 _this.view_layout = this;
459 this.el = new Gtk.Layout( null, null );
463 // set gobject values
464 var child_0 = new Xcls_container( _this );
466 this.el.put ( child_0.el , 10,10 );
469 // user defined functions
471 public class Xcls_container : Object
474 private Xcls_GtkView _this;
480 public Xcls_container(Xcls_GtkView _owner )
483 _this.container = this;
484 this.el = new Gtk.Box( Gtk.Orientation.HORIZONTAL, 0 );
488 // set gobject values
491 // user defined functions
496 public class Xcls_Box8 : Object
499 private Xcls_GtkView _this;
505 public Xcls_Box8(Xcls_GtkView _owner )
508 this.el = new Gtk.Box( Gtk.Orientation.VERTICAL, 0 );
512 // set gobject values
513 var child_0 = new Xcls_ScrolledWindow9( _this );
515 this.el.add( child_0.el );
516 var child_1 = new Xcls_Box12( _this );
518 this.el.add( child_1.el );
521 // user defined functions
523 public class Xcls_ScrolledWindow9 : Object
525 public Gtk.ScrolledWindow el;
526 private Xcls_GtkView _this;
532 public Xcls_ScrolledWindow9(Xcls_GtkView _owner )
535 this.el = new Gtk.ScrolledWindow( null, null );
539 // set gobject values
540 this.el.vexpand = true;
541 var child_0 = new Xcls_sourceview( _this );
543 this.el.add ( child_0.el );
546 // user defined functions
548 public class Xcls_sourceview : Object
550 public Gtk.SourceView el;
551 private Xcls_GtkView _this;
556 public string prop_selected;
557 public bool allow_node_scroll;
558 public JsRender.Node? node_selected;
561 public Xcls_sourceview(Xcls_GtkView _owner )
564 _this.sourceview = this;
565 this.el = new Gtk.SourceView();
569 this.prop_selected = "";
570 this.allow_node_scroll = true;
572 // set gobject values
573 this.el.editable = false;
574 this.el.show_line_marks = true;
575 this.el.show_line_numbers = true;
576 var child_0 = new Xcls_buffer( _this );
578 this.el.set_buffer ( child_0.el );
584 var description = Pango.FontDescription.from_string("monospace");
585 description.set_size(8000);
586 this.el.override_font(description);
589 var buf = this.el.get_buffer();
590 buf.notify.connect((ps) => {
594 if (ps.name != "cursor-position") {
597 print("cursor changed : %d\n", buf.cursor_position);
599 buf.get_iter_at_offset(out cpos, buf.cursor_position);
601 var ln = cpos.get_line();
603 var node = _this.file.lineToNode(ln);
606 print("can not find node\n");
609 var ltree = _this.main_window.windowstate.left_tree;
610 var tp = ltree.model.treePathFromNode(node);
611 print("got tree path %s\n", tp);
613 this.allow_node_scroll = false;
614 print("changing cursor on tree..\n");
615 ltree.view.el.set_cursor(new Gtk.TreePath.from_string(tp), null, false);
616 // scrolling is disabled... as node selection calls scroll 10ms after it changes.
617 GLib.Timeout.add_full(GLib.Priority.DEFAULT,100 , () => {
618 this.allow_node_scroll = true;
623 // highlight the node..
629 var attrs = new Gtk.SourceMarkAttributes();
630 var pink = Gdk.RGBA();
631 pink.parse ( "pink");
632 attrs.set_background ( pink);
633 attrs.set_icon_name ( "process-stop");
634 attrs.query_tooltip_text.connect(( mark) => {
635 //print("tooltip query? %s\n", mark.name);
639 this.el.set_mark_attributes ("ERR", attrs, 1);
641 var wattrs = new Gtk.SourceMarkAttributes();
642 var blue = Gdk.RGBA();
643 blue.parse ( "#ABF4EB");
644 wattrs.set_background ( blue);
645 wattrs.set_icon_name ( "process-stop");
646 wattrs.query_tooltip_text.connect(( mark) => {
647 //print("tooltip query? %s\n", mark.name);
651 this.el.set_mark_attributes ("WARN", wattrs, 1);
655 var dattrs = new Gtk.SourceMarkAttributes();
656 var purple = Gdk.RGBA();
657 purple.parse ( "#EEA9FF");
658 dattrs.set_background ( purple);
659 dattrs.set_icon_name ( "process-stop");
660 dattrs.query_tooltip_text.connect(( mark) => {
661 //print("tooltip query? %s\n", mark.name);
665 this.el.set_mark_attributes ("DEPR", dattrs, 1);
668 var gattrs = new Gtk.SourceMarkAttributes();
669 var grey = Gdk.RGBA();
670 grey.parse ( "#ccc");
671 gattrs.set_background ( grey);
674 this.el.set_mark_attributes ("grey", gattrs, 1);
684 this.el.key_press_event.connect( (event) => {
686 if (event.keyval == Gdk.Key.g && (event.state & Gdk.ModifierType.CONTROL_MASK ) > 0 ) {
687 GLib.debug("SAVE: ctrl-g pressed");
688 _this.forwardSearch(true);
691 if (event.keyval == Gdk.Key.f && (event.state & Gdk.ModifierType.CONTROL_MASK ) > 0 ) {
692 GLib.debug("SAVE: ctrl-f pressed");
693 _this.search_entry.el.grab_focus();
701 // user defined functions
702 public void loadFile ( ) {
704 var buf = this.el.get_buffer();
706 var sbuf = (Gtk.SourceBuffer) buf;
710 if (_this.file == null || _this.file.xtype != "Gtk") {
711 print("xtype != Gtk");
712 this.loading = false;
718 var regex = new Regex("\\.bjs$");
721 valafn = regex.replace(_this.file.path,_this.file.path.length , 0 , ".vala");
722 } catch (GLib.RegexError e) {
723 this.loading = false;
728 if (!FileUtils.test(valafn,FileTest.IS_REGULAR) ) {
729 print("File path has no errors\n");
730 this.loading = false;
737 GLib.FileUtils.get_contents (valafn, out str);
739 this.loading = false;
743 // print("setting str %d\n", str.length);
744 buf.set_text(str, str.length);
745 var lm = Gtk.SourceLanguageManager.get_default();
747 //?? is javascript going to work as js?
749 ((Gtk.SourceBuffer)(buf)) .set_language(lm.get_language(_this.file.language));
755 sbuf.get_bounds (out start, out end);
756 sbuf.remove_source_marks (start, end, null); // remove all marks..
759 if (_this.main_window.windowstate.last_compile_result != null) {
760 var obj = _this.main_window.windowstate.last_compile_result;
761 this.highlightErrorsJson("ERR", obj);
762 this.highlightErrorsJson("WARN", obj);
763 this.highlightErrorsJson("DEPR", obj);
765 //while (Gtk.events_pending()) {
766 // Gtk.main_iteration();
769 this.loading = false;
771 public void nodeSelected (JsRender.Node? sel, bool scroll) {
775 // this is connected in widnowstate
776 print("Roo-view - node selected\n");
777 var buf = this.el.get_buffer();
779 var sbuf = (Gtk.SourceBuffer) buf;
782 while(Gtk.events_pending()) {
783 Gtk.main_iteration();
787 // clear all the marks..
791 sbuf.get_bounds (out start, out end);
792 sbuf.remove_source_marks (start, end, "grey");
794 this.node_selected = sel;
800 sbuf.get_iter_at_line(out iter, sel.line_start);
803 Gtk.TextIter cur_iter;
804 sbuf.get_iter_at_offset(out cur_iter, sbuf.cursor_position);
806 //var cur_line = cur_iter.get_line();
807 //if (cur_line > sel.line_start && cur_line < sel.line_end) {
810 if (this.allow_node_scroll) {
812 this.el.scroll_to_iter(iter, 0.1f, true, 0.0f, 0.5f);
817 for (var i = 0; i < buf.get_line_count();i++) {
818 if (i < sel.line_start || i > sel.line_end) {
820 sbuf.get_iter_at_line(out iter, i);
821 sbuf.create_source_mark(null, "grey", iter);
829 public void highlightErrorsJson (string type, Json.Object obj) {
833 var buf = this.el.get_buffer();
834 var sbuf = (Gtk.SourceBuffer)buf;
835 buf.get_bounds (out start, out end);
837 sbuf.remove_source_marks (start, end, type);
840 // we should highlight other types of errors..
842 if (!obj.has_member(type)) {
843 print("Return has no errors\n");
846 var err = obj.get_object_member(type);
848 if (_this.file == null) {
849 return; // just in case the file has not loaded yet?
855 var regex = new Regex("\\.bjs$");
858 valafn = regex.replace(_this.file.path,_this.file.path.length , 0 , ".vala");
859 } catch (GLib.RegexError e) {
863 if (!err.has_member(valafn)) {
864 print("File path has no errors\n");
867 var lines = err.get_object_member(valafn);
871 var tlines = buf.get_line_count () +1;
873 lines.foreach_member((obj, line, node) => {
876 // print("get inter\n");
877 var eline = int.parse(line) -1 ;
878 print("GOT ERROR on line %s -- converted to %d\n", line,eline);
881 if (eline > tlines || eline < 0) {
884 sbuf.get_iter_at_line( out iter, eline);
885 //print("mark line\n");
886 var msg = type + " on line: %d - %s".printf(eline+1, valafn);
887 var ar = lines.get_array_member(line);
888 for (var i = 0 ; i < ar.get_length(); i++) {
889 msg += (msg.length > 0) ? "\n" : "";
890 msg += ar.get_string_element(i);
894 sbuf.create_source_mark(msg, type, iter);
902 public string toString () {
905 this.el.get_buffer().get_start_iter(out s);
906 this.el.get_buffer().get_end_iter(out e);
907 var ret = this.el.get_buffer().get_text(s,e,true);
908 //print("TO STRING? " + ret);
912 public class Xcls_buffer : Object
914 public Gtk.SourceBuffer el;
915 private Xcls_GtkView _this;
919 public int error_line;
923 public Xcls_buffer(Xcls_GtkView _owner )
927 this.el = new Gtk.SourceBuffer( null );
930 this.error_line = -1;
933 // set gobject values
936 // user defined functions
941 public class Xcls_Box12 : Object
944 private Xcls_GtkView _this;
950 public Xcls_Box12(Xcls_GtkView _owner )
953 this.el = new Gtk.Box( Gtk.Orientation.HORIZONTAL, 0 );
957 // set gobject values
958 this.el.homogeneous = false;
959 this.el.vexpand = false;
960 var child_0 = new Xcls_search_entry( _this );
962 this.el.add( child_0.el );
963 var child_1 = new Xcls_MenuBar14( _this );
965 this.el.add ( child_1.el );
966 var child_2 = new Xcls_nextBtn( _this );
968 this.el.add( child_2.el );
969 var child_3 = new Xcls_backBtn( _this );
971 this.el.add( child_3.el );
972 var child_4 = new Xcls_MenuButton20( _this );
974 this.el.add( child_4.el );
977 // user defined functions
979 public class Xcls_search_entry : Object
981 public Gtk.SearchEntry el;
982 private Xcls_GtkView _this;
988 public Xcls_search_entry(Xcls_GtkView _owner )
991 _this.search_entry = this;
992 this.el = new Gtk.SearchEntry();
996 // set gobject values
997 this.el.width_request = 300;
998 this.el.hexpand = true;
999 this.el.placeholder_text = "Press enter to search";
1003 var description = Pango.FontDescription.from_string("monospace");
1004 description.set_size(8000);
1005 this.el.override_font(description);
1008 this.el.key_press_event.connect( (event) => {
1009 if (event.keyval == Gdk.Key.g && (event.state & Gdk.ModifierType.CONTROL_MASK ) > 0 ) {
1010 GLib.debug("SAVE: ctrl-g pressed");
1011 _this.forwardSearch(true);
1016 if (event.keyval == Gdk.Key.Return && this.el.text.length > 0) {
1017 var res = _this.search(this.el.text);
1018 _this.search_results.updateResults();
1020 GLib.Timeout.add_seconds(2,() => {
1021 _this.search_results.updateResults();
1029 // print(event.key.keyval)
1034 this.el.changed.connect( () => {
1036 if (this.el.text == "") {
1037 _this.search_results.el.hide();
1041 switch(_this.windowstate.state) {
1042 case WindowState.State.CODEONLY:
1043 ///case WindowState.State.CODE:
1044 // search the code being edited..
1045 res = _this.windowstate.code_editor_tab.search(this.el.text);
1048 case WindowState.State.PREVIEW:
1049 if (_this.windowstate.file.xtype == "Gtk") {
1050 res = _this.windowstate.window_gladeview.search(this.el.text);
1052 res = _this.windowstate.window_rooview.search(this.el.text);
1058 _this.search_results.el.show();
1060 _this.search_results.el.label = "%d Matches".printf(res);
1062 _this.search_results.el.label = "No Matches";
1070 // user defined functions
1071 public void forwardSearch (bool change_focus) {
1074 _this.forwardSearch(change_focus);
1078 switch(_this.windowstate.state) {
1079 case WindowState.State.CODEONLY:
1080 //case WindowState.State.CODE:
1081 // search the code being edited..
1082 _this.windowstate.code_editor_tab.forwardSearch(change_focus);
1085 case WindowState.State.PREVIEW:
1086 if (_this.windowstate.file.xtype == "Gtk") {
1087 _this.windowstate.window_gladeview.forwardSearch(change_focus);
1089 _this.windowstate.window_rooview.forwardSearch(change_focus);
1099 public class Xcls_MenuBar14 : Object
1101 public Gtk.MenuBar el;
1102 private Xcls_GtkView _this;
1108 public Xcls_MenuBar14(Xcls_GtkView _owner )
1111 this.el = new Gtk.MenuBar();
1115 // set gobject values
1116 var child_0 = new Xcls_search_results( _this );
1118 this.el.add ( child_0.el );
1121 // user defined functions
1123 public class Xcls_search_results : Object
1125 public Gtk.ImageMenuItem el;
1126 private Xcls_GtkView _this;
1132 public Xcls_search_results(Xcls_GtkView _owner )
1135 _this.search_results = this;
1136 this.el = new Gtk.ImageMenuItem();
1140 // set gobject values
1141 this.el.always_show_image = true;
1142 this.el.visible = false;
1145 this.el.button_press_event.connect( () => {
1147 if (this.popup == null) {
1148 this.popup = new Xcls_ValaCompileErrors();
1149 this.popup.window = _this;
1153 this.popup.show(this.notices, this.el);
1159 // user defined functions
1160 public void updateResults () {
1161 this.el.visible = true;
1163 var res = _this.searchcontext.get_occurrences_count();
1165 _this.search_results.el.label = "??? Matches";
1169 _this.nextBtn.el.sensitive = false;
1170 _this.backBtn.el.sensitive = false;
1173 _this.search_results.el.label = "%d Matches".printf(res);
1174 _this.nextBtn.el.sensitive = true;
1175 _this.backBtn.el.sensitive = true;
1178 _this.search_results.el.label = "No Matches";
1184 public class Xcls_nextBtn : Object
1186 public Gtk.Button el;
1187 private Xcls_GtkView _this;
1193 public Xcls_nextBtn(Xcls_GtkView _owner )
1196 _this.nextBtn = this;
1197 this.el = new Gtk.Button();
1201 // set gobject values
1202 this.el.always_show_image = true;
1203 this.el.label = "Next";
1204 this.el.sensitive = false;
1205 var child_0 = new Xcls_Image17( _this );
1207 this.el.image = child_0.el;
1210 this.el.button_press_event.connect( (event) => {
1212 _this.forwardSearch(true);
1218 // user defined functions
1220 public class Xcls_Image17 : Object
1222 public Gtk.Image el;
1223 private Xcls_GtkView _this;
1229 public Xcls_Image17(Xcls_GtkView _owner )
1232 this.el = new Gtk.Image();
1236 // set gobject values
1237 this.el.icon_name = "go-down";
1240 // user defined functions
1244 public class Xcls_backBtn : Object
1246 public Gtk.Button el;
1247 private Xcls_GtkView _this;
1253 public Xcls_backBtn(Xcls_GtkView _owner )
1256 _this.backBtn = this;
1257 this.el = new Gtk.Button();
1261 // set gobject values
1262 this.el.always_show_image = true;
1263 this.el.label = "Previous";
1264 this.el.sensitive = false;
1265 var child_0 = new Xcls_Image19( _this );
1267 this.el.image = child_0.el;
1270 this.el.button_press_event.connect( (event) => {
1272 _this.backSearch(true);
1278 // user defined functions
1280 public class Xcls_Image19 : Object
1282 public Gtk.Image el;
1283 private Xcls_GtkView _this;
1289 public Xcls_Image19(Xcls_GtkView _owner )
1292 this.el = new Gtk.Image();
1296 // set gobject values
1297 this.el.icon_name = "go-up";
1300 // user defined functions
1304 public class Xcls_MenuButton20 : Object
1306 public Gtk.MenuButton el;
1307 private Xcls_GtkView _this;
1313 public Xcls_MenuButton20(Xcls_GtkView _owner )
1316 this.el = new Gtk.MenuButton();
1320 // set gobject values
1321 this.el.always_show_image = true;
1322 this.el.label = "Settings";
1323 var child_0 = new Xcls_Image21( _this );
1325 this.el.image = child_0.el;
1326 var child_1 = new Xcls_search_settings( _this );
1328 this.el.popup = child_1.el;
1331 // user defined functions
1333 public class Xcls_Image21 : Object
1335 public Gtk.Image el;
1336 private Xcls_GtkView _this;
1342 public Xcls_Image21(Xcls_GtkView _owner )
1345 this.el = new Gtk.Image();
1349 // set gobject values
1350 this.el.icon_name = "emblem-system";
1353 // user defined functions
1356 public class Xcls_search_settings : Object
1359 private Xcls_GtkView _this;
1365 public Xcls_search_settings(Xcls_GtkView _owner )
1368 _this.search_settings = this;
1369 this.el = new Gtk.Menu();
1373 // set gobject values
1374 var child_0 = new Xcls_case_sensitive( _this );
1376 this.el.append( child_0.el );
1377 var child_1 = new Xcls_regex( _this );
1379 this.el.append( child_1.el );
1380 var child_2 = new Xcls_multiline( _this );
1382 this.el.append( child_2.el );
1385 // user defined functions
1387 public class Xcls_case_sensitive : Object
1389 public Gtk.CheckMenuItem el;
1390 private Xcls_GtkView _this;
1396 public Xcls_case_sensitive(Xcls_GtkView _owner )
1399 _this.case_sensitive = this;
1400 this.el = new Gtk.CheckMenuItem();
1404 // set gobject values
1405 this.el.label = "Case Sensitive";
1414 // user defined functions
1417 public class Xcls_regex : Object
1419 public Gtk.CheckMenuItem el;
1420 private Xcls_GtkView _this;
1426 public Xcls_regex(Xcls_GtkView _owner )
1430 this.el = new Gtk.CheckMenuItem();
1434 // set gobject values
1435 this.el.label = "Regex";
1444 // user defined functions
1447 public class Xcls_multiline : Object
1449 public Gtk.CheckMenuItem el;
1450 private Xcls_GtkView _this;
1456 public Xcls_multiline(Xcls_GtkView _owner )
1459 _this.multiline = this;
1460 this.el = new Gtk.CheckMenuItem();
1464 // set gobject values
1465 this.el.label = "Multi-line (add \\n)";
1474 // user defined functions