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 ) {
294 var win = this.el.get_parent_window();
295 var width = win.get_width();
296 var height = win.get_height();
298 Gdk.Pixbuf screenshot = Gdk.pixbuf_get_from_window(win, 0, 0, width, height); // this.el.position?
299 this.file.writeIcon(screenshot);
311 // should we hold until it's printed...
322 public void scroll_to_line (int line) {
325 GLib.Timeout.add(100, () => {
328 this.notebook.el.set_current_page(1);
330 var buf = this.sourceview.el.get_buffer();
332 var sbuf = (Gtk.SourceBuffer) buf;
336 sbuf.get_iter_at_line(out iter, line);
337 this.sourceview.el.scroll_to_iter(iter, 0.1f, true, 0.0f, 0.5f);
343 public class Xcls_notebook : Object
345 public Gtk.Notebook el;
346 private Xcls_GtkView _this;
352 public Xcls_notebook(Xcls_GtkView _owner )
355 _this.notebook = this;
356 this.el = new Gtk.Notebook();
360 // set gobject values
361 var child_0 = new Xcls_label_preview( _this );
363 var child_1 = new Xcls_label_code( _this );
365 var child_2 = new Xcls_ScrolledWindow5( _this );
367 this.el.append_page ( child_2.el , _this.label_preview.el );
368 var child_3 = new Xcls_Box8( _this );
370 this.el.append_page ( child_3.el , _this.label_code.el );
373 // user defined functions
375 public class Xcls_label_preview : Object
378 private Xcls_GtkView _this;
384 public Xcls_label_preview(Xcls_GtkView _owner )
387 _this.label_preview = this;
388 this.el = new Gtk.Label( "Preview" );
392 // set gobject values
395 // user defined functions
398 public class Xcls_label_code : Object
401 private Xcls_GtkView _this;
407 public Xcls_label_code(Xcls_GtkView _owner )
410 _this.label_code = this;
411 this.el = new Gtk.Label( "Preview Generated Code" );
415 // set gobject values
418 // user defined functions
421 public class Xcls_ScrolledWindow5 : Object
423 public Gtk.ScrolledWindow el;
424 private Xcls_GtkView _this;
430 public Xcls_ScrolledWindow5(Xcls_GtkView _owner )
433 this.el = new Gtk.ScrolledWindow( null, null );
437 // set gobject values
438 var child_0 = new Xcls_view_layout( _this );
440 this.el.add ( child_0.el );
443 // user defined functions
445 public class Xcls_view_layout : Object
447 public Gtk.Layout el;
448 private Xcls_GtkView _this;
454 public Xcls_view_layout(Xcls_GtkView _owner )
457 _this.view_layout = this;
458 this.el = new Gtk.Layout( null, null );
462 // set gobject values
463 var child_0 = new Xcls_container( _this );
465 this.el.put ( child_0.el , 10,10 );
468 // user defined functions
470 public class Xcls_container : Object
473 private Xcls_GtkView _this;
479 public Xcls_container(Xcls_GtkView _owner )
482 _this.container = this;
483 this.el = new Gtk.Box( Gtk.Orientation.HORIZONTAL, 0 );
487 // set gobject values
490 // user defined functions
495 public class Xcls_Box8 : Object
498 private Xcls_GtkView _this;
504 public Xcls_Box8(Xcls_GtkView _owner )
507 this.el = new Gtk.Box( Gtk.Orientation.VERTICAL, 0 );
511 // set gobject values
512 var child_0 = new Xcls_ScrolledWindow9( _this );
514 this.el.add( child_0.el );
515 var child_1 = new Xcls_Box12( _this );
517 this.el.add( child_1.el );
520 // user defined functions
522 public class Xcls_ScrolledWindow9 : Object
524 public Gtk.ScrolledWindow el;
525 private Xcls_GtkView _this;
531 public Xcls_ScrolledWindow9(Xcls_GtkView _owner )
534 this.el = new Gtk.ScrolledWindow( null, null );
538 // set gobject values
539 this.el.vexpand = true;
540 var child_0 = new Xcls_sourceview( _this );
542 this.el.add ( child_0.el );
545 // user defined functions
547 public class Xcls_sourceview : Object
549 public Gtk.SourceView el;
550 private Xcls_GtkView _this;
555 public string prop_selected;
556 public bool allow_node_scroll;
557 public JsRender.Node? node_selected;
560 public Xcls_sourceview(Xcls_GtkView _owner )
563 _this.sourceview = this;
564 this.el = new Gtk.SourceView();
568 this.prop_selected = "";
569 this.allow_node_scroll = true;
571 // set gobject values
572 this.el.editable = false;
573 this.el.show_line_marks = true;
574 this.el.show_line_numbers = true;
575 var child_0 = new Xcls_buffer( _this );
577 this.el.set_buffer ( child_0.el );
583 var description = Pango.FontDescription.from_string("monospace");
584 description.set_size(8000);
585 this.el.override_font(description);
588 var buf = this.el.get_buffer();
589 buf.notify.connect((ps) => {
593 if (ps.name != "cursor-position") {
596 print("cursor changed : %d\n", buf.cursor_position);
598 buf.get_iter_at_offset(out cpos, buf.cursor_position);
600 var ln = cpos.get_line();
602 var node = _this.file.lineToNode(ln);
605 print("can not find node\n");
608 var ltree = _this.main_window.windowstate.left_tree;
609 var tp = ltree.model.treePathFromNode(node);
610 print("got tree path %s\n", tp);
612 this.allow_node_scroll = false;
613 print("changing cursor on tree..\n");
614 ltree.view.el.set_cursor(new Gtk.TreePath.from_string(tp), null, false);
615 // scrolling is disabled... as node selection calls scroll 10ms after it changes.
616 GLib.Timeout.add_full(GLib.Priority.DEFAULT,100 , () => {
617 this.allow_node_scroll = true;
622 // highlight the node..
628 var attrs = new Gtk.SourceMarkAttributes();
629 var pink = Gdk.RGBA();
630 pink.parse ( "pink");
631 attrs.set_background ( pink);
632 attrs.set_icon_name ( "process-stop");
633 attrs.query_tooltip_text.connect(( mark) => {
634 //print("tooltip query? %s\n", mark.name);
638 this.el.set_mark_attributes ("ERR", attrs, 1);
640 var wattrs = new Gtk.SourceMarkAttributes();
641 var blue = Gdk.RGBA();
642 blue.parse ( "#ABF4EB");
643 wattrs.set_background ( blue);
644 wattrs.set_icon_name ( "process-stop");
645 wattrs.query_tooltip_text.connect(( mark) => {
646 //print("tooltip query? %s\n", mark.name);
650 this.el.set_mark_attributes ("WARN", wattrs, 1);
654 var dattrs = new Gtk.SourceMarkAttributes();
655 var purple = Gdk.RGBA();
656 purple.parse ( "#EEA9FF");
657 dattrs.set_background ( purple);
658 dattrs.set_icon_name ( "process-stop");
659 dattrs.query_tooltip_text.connect(( mark) => {
660 //print("tooltip query? %s\n", mark.name);
664 this.el.set_mark_attributes ("DEPR", dattrs, 1);
667 var gattrs = new Gtk.SourceMarkAttributes();
668 var grey = Gdk.RGBA();
669 grey.parse ( "#ccc");
670 gattrs.set_background ( grey);
673 this.el.set_mark_attributes ("grey", gattrs, 1);
683 this.el.key_press_event.connect( (event) => {
685 if (event.keyval == Gdk.Key.g && (event.state & Gdk.ModifierType.CONTROL_MASK ) > 0 ) {
686 GLib.debug("SAVE: ctrl-g pressed");
687 _this.forwardSearch(true);
690 if (event.keyval == Gdk.Key.f && (event.state & Gdk.ModifierType.CONTROL_MASK ) > 0 ) {
691 GLib.debug("SAVE: ctrl-f pressed");
692 _this.search_entry.el.grab_focus();
700 // user defined functions
701 public void loadFile ( ) {
703 var buf = this.el.get_buffer();
705 var sbuf = (Gtk.SourceBuffer) buf;
709 if (_this.file == null || _this.file.xtype != "Gtk") {
710 print("xtype != Gtk");
711 this.loading = false;
717 var regex = new Regex("\\.bjs$");
720 valafn = regex.replace(_this.file.path,_this.file.path.length , 0 , ".vala");
721 } catch (GLib.RegexError e) {
722 this.loading = false;
727 if (!FileUtils.test(valafn,FileTest.IS_REGULAR) ) {
728 print("File path has no errors\n");
729 this.loading = false;
736 GLib.FileUtils.get_contents (valafn, out str);
738 this.loading = false;
742 // print("setting str %d\n", str.length);
743 buf.set_text(str, str.length);
744 var lm = Gtk.SourceLanguageManager.get_default();
746 //?? is javascript going to work as js?
748 ((Gtk.SourceBuffer)(buf)) .set_language(lm.get_language(_this.file.language));
754 sbuf.get_bounds (out start, out end);
755 sbuf.remove_source_marks (start, end, null); // remove all marks..
758 if (_this.main_window.windowstate.last_compile_result != null) {
759 var obj = _this.main_window.windowstate.last_compile_result;
760 this.highlightErrorsJson("ERR", obj);
761 this.highlightErrorsJson("WARN", obj);
762 this.highlightErrorsJson("DEPR", obj);
764 //while (Gtk.events_pending()) {
765 // Gtk.main_iteration();
768 this.loading = false;
770 public void nodeSelected (JsRender.Node? sel, bool scroll) {
774 // this is connected in widnowstate
775 print("Roo-view - node selected\n");
776 var buf = this.el.get_buffer();
778 var sbuf = (Gtk.SourceBuffer) buf;
781 while(Gtk.events_pending()) {
782 Gtk.main_iteration();
786 // clear all the marks..
790 sbuf.get_bounds (out start, out end);
791 sbuf.remove_source_marks (start, end, "grey");
793 this.node_selected = sel;
799 sbuf.get_iter_at_line(out iter, sel.line_start);
802 Gtk.TextIter cur_iter;
803 sbuf.get_iter_at_offset(out cur_iter, sbuf.cursor_position);
805 //var cur_line = cur_iter.get_line();
806 //if (cur_line > sel.line_start && cur_line < sel.line_end) {
809 if (this.allow_node_scroll) {
811 this.el.scroll_to_iter(iter, 0.1f, true, 0.0f, 0.5f);
816 for (var i = 0; i < buf.get_line_count();i++) {
817 if (i < sel.line_start || i > sel.line_end) {
819 sbuf.get_iter_at_line(out iter, i);
820 sbuf.create_source_mark(null, "grey", iter);
828 public void highlightErrorsJson (string type, Json.Object obj) {
832 var buf = this.el.get_buffer();
833 var sbuf = (Gtk.SourceBuffer)buf;
834 buf.get_bounds (out start, out end);
836 sbuf.remove_source_marks (start, end, type);
839 // we should highlight other types of errors..
841 if (!obj.has_member(type)) {
842 print("Return has no errors\n");
845 var err = obj.get_object_member(type);
847 if (_this.file == null) {
848 return; // just in case the file has not loaded yet?
854 var regex = new Regex("\\.bjs$");
857 valafn = regex.replace(_this.file.path,_this.file.path.length , 0 , ".vala");
858 } catch (GLib.RegexError e) {
862 if (!err.has_member(valafn)) {
863 print("File path has no errors\n");
866 var lines = err.get_object_member(valafn);
870 var tlines = buf.get_line_count () +1;
872 lines.foreach_member((obj, line, node) => {
875 // print("get inter\n");
876 var eline = int.parse(line) -1 ;
877 print("GOT ERROR on line %s -- converted to %d\n", line,eline);
880 if (eline > tlines || eline < 0) {
883 sbuf.get_iter_at_line( out iter, eline);
884 //print("mark line\n");
885 var msg = type + " on line: %d - %s".printf(eline+1, valafn);
886 var ar = lines.get_array_member(line);
887 for (var i = 0 ; i < ar.get_length(); i++) {
888 msg += (msg.length > 0) ? "\n" : "";
889 msg += ar.get_string_element(i);
893 sbuf.create_source_mark(msg, type, iter);
901 public string toString () {
904 this.el.get_buffer().get_start_iter(out s);
905 this.el.get_buffer().get_end_iter(out e);
906 var ret = this.el.get_buffer().get_text(s,e,true);
907 //print("TO STRING? " + ret);
911 public class Xcls_buffer : Object
913 public Gtk.SourceBuffer el;
914 private Xcls_GtkView _this;
918 public int error_line;
922 public Xcls_buffer(Xcls_GtkView _owner )
926 this.el = new Gtk.SourceBuffer( null );
929 this.error_line = -1;
932 // set gobject values
935 // user defined functions
940 public class Xcls_Box12 : Object
943 private Xcls_GtkView _this;
949 public Xcls_Box12(Xcls_GtkView _owner )
952 this.el = new Gtk.Box( Gtk.Orientation.HORIZONTAL, 0 );
956 // set gobject values
957 this.el.homogeneous = false;
958 this.el.vexpand = false;
959 var child_0 = new Xcls_search_entry( _this );
961 this.el.add( child_0.el );
962 var child_1 = new Xcls_MenuBar14( _this );
964 this.el.add ( child_1.el );
965 var child_2 = new Xcls_nextBtn( _this );
967 this.el.add( child_2.el );
968 var child_3 = new Xcls_backBtn( _this );
970 this.el.add( child_3.el );
971 var child_4 = new Xcls_MenuButton20( _this );
973 this.el.add( child_4.el );
976 // user defined functions
978 public class Xcls_search_entry : Object
980 public Gtk.SearchEntry el;
981 private Xcls_GtkView _this;
987 public Xcls_search_entry(Xcls_GtkView _owner )
990 _this.search_entry = this;
991 this.el = new Gtk.SearchEntry();
995 // set gobject values
996 this.el.width_request = 300;
997 this.el.hexpand = true;
998 this.el.placeholder_text = "Press enter to search";
1002 var description = Pango.FontDescription.from_string("monospace");
1003 description.set_size(8000);
1004 this.el.override_font(description);
1007 this.el.key_press_event.connect( (event) => {
1008 if (event.keyval == Gdk.Key.g && (event.state & Gdk.ModifierType.CONTROL_MASK ) > 0 ) {
1009 GLib.debug("SAVE: ctrl-g pressed");
1010 _this.forwardSearch(true);
1015 if (event.keyval == Gdk.Key.Return && this.el.text.length > 0) {
1016 var res = _this.search(this.el.text);
1017 _this.search_results.updateResults();
1019 GLib.Timeout.add_seconds(2,() => {
1020 _this.search_results.updateResults();
1028 // print(event.key.keyval)
1033 this.el.changed.connect( () => {
1035 if (this.el.text == "") {
1036 _this.search_results.el.hide();
1040 switch(_this.windowstate.state) {
1041 case WindowState.State.CODEONLY:
1042 ///case WindowState.State.CODE:
1043 // search the code being edited..
1044 res = _this.windowstate.code_editor_tab.search(this.el.text);
1047 case WindowState.State.PREVIEW:
1048 if (_this.windowstate.file.xtype == "Gtk") {
1049 res = _this.windowstate.window_gladeview.search(this.el.text);
1051 res = _this.windowstate.window_rooview.search(this.el.text);
1057 _this.search_results.el.show();
1059 _this.search_results.el.label = "%d Matches".printf(res);
1061 _this.search_results.el.label = "No Matches";
1069 // user defined functions
1070 public void forwardSearch (bool change_focus) {
1073 _this.forwardSearch(change_focus);
1077 switch(_this.windowstate.state) {
1078 case WindowState.State.CODEONLY:
1079 //case WindowState.State.CODE:
1080 // search the code being edited..
1081 _this.windowstate.code_editor_tab.forwardSearch(change_focus);
1084 case WindowState.State.PREVIEW:
1085 if (_this.windowstate.file.xtype == "Gtk") {
1086 _this.windowstate.window_gladeview.forwardSearch(change_focus);
1088 _this.windowstate.window_rooview.forwardSearch(change_focus);
1098 public class Xcls_MenuBar14 : Object
1100 public Gtk.MenuBar el;
1101 private Xcls_GtkView _this;
1107 public Xcls_MenuBar14(Xcls_GtkView _owner )
1110 this.el = new Gtk.MenuBar();
1114 // set gobject values
1115 var child_0 = new Xcls_search_results( _this );
1117 this.el.add ( child_0.el );
1120 // user defined functions
1122 public class Xcls_search_results : Object
1124 public Gtk.ImageMenuItem el;
1125 private Xcls_GtkView _this;
1131 public Xcls_search_results(Xcls_GtkView _owner )
1134 _this.search_results = this;
1135 this.el = new Gtk.ImageMenuItem();
1139 // set gobject values
1140 this.el.always_show_image = true;
1141 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";
1415 // user defined functions
1418 public class Xcls_regex : Object
1420 public Gtk.CheckMenuItem el;
1421 private Xcls_GtkView _this;
1427 public Xcls_regex(Xcls_GtkView _owner )
1431 this.el = new Gtk.CheckMenuItem();
1435 // set gobject values
1436 this.el.label = "Regex";
1446 // user defined functions
1449 public class Xcls_multiline : Object
1451 public Gtk.CheckMenuItem el;
1452 private Xcls_GtkView _this;
1458 public Xcls_multiline(Xcls_GtkView _owner )
1461 _this.multiline = this;
1462 this.el = new Gtk.CheckMenuItem();
1466 // set gobject values
1467 this.el.label = "Multi-line (add \\n)";
1477 // user defined functions