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) {
324 this.notebook.el.page = 1;// code preview...
326 GLib.Timeout.add(500, () => {
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);
697 // user defined functions
698 public void loadFile ( ) {
700 var buf = this.el.get_buffer();
702 var sbuf = (Gtk.SourceBuffer) buf;
706 if (_this.file == null || _this.file.xtype != "Gtk") {
707 print("xtype != Gtk");
708 this.loading = false;
714 var regex = new Regex("\\.bjs$");
717 valafn = regex.replace(_this.file.path,_this.file.path.length , 0 , ".vala");
718 } catch (GLib.RegexError e) {
719 this.loading = false;
724 if (!FileUtils.test(valafn,FileTest.IS_REGULAR) ) {
725 print("File path has no errors\n");
726 this.loading = false;
733 GLib.FileUtils.get_contents (valafn, out str);
735 this.loading = false;
739 // print("setting str %d\n", str.length);
740 buf.set_text(str, str.length);
741 var lm = Gtk.SourceLanguageManager.get_default();
743 //?? is javascript going to work as js?
745 ((Gtk.SourceBuffer)(buf)) .set_language(lm.get_language(_this.file.language));
751 sbuf.get_bounds (out start, out end);
752 sbuf.remove_source_marks (start, end, null); // remove all marks..
755 if (_this.main_window.windowstate.last_compile_result != null) {
756 var obj = _this.main_window.windowstate.last_compile_result;
757 this.highlightErrorsJson("ERR", obj);
758 this.highlightErrorsJson("WARN", obj);
759 this.highlightErrorsJson("DEPR", obj);
761 //while (Gtk.events_pending()) {
762 // Gtk.main_iteration();
765 this.loading = false;
767 public void nodeSelected (JsRender.Node? sel, bool scroll) {
771 // this is connected in widnowstate
772 print("Roo-view - node selected\n");
773 var buf = this.el.get_buffer();
775 var sbuf = (Gtk.SourceBuffer) buf;
778 while(Gtk.events_pending()) {
779 Gtk.main_iteration();
783 // clear all the marks..
787 sbuf.get_bounds (out start, out end);
788 sbuf.remove_source_marks (start, end, "grey");
790 this.node_selected = sel;
796 sbuf.get_iter_at_line(out iter, sel.line_start);
799 Gtk.TextIter cur_iter;
800 sbuf.get_iter_at_offset(out cur_iter, sbuf.cursor_position);
802 //var cur_line = cur_iter.get_line();
803 //if (cur_line > sel.line_start && cur_line < sel.line_end) {
806 if (this.allow_node_scroll) {
808 this.el.scroll_to_iter(iter, 0.1f, true, 0.0f, 0.5f);
813 for (var i = 0; i < buf.get_line_count();i++) {
814 if (i < sel.line_start || i > sel.line_end) {
816 sbuf.get_iter_at_line(out iter, i);
817 sbuf.create_source_mark(null, "grey", iter);
825 public void highlightErrorsJson (string type, Json.Object obj) {
829 var buf = this.el.get_buffer();
830 var sbuf = (Gtk.SourceBuffer)buf;
831 buf.get_bounds (out start, out end);
833 sbuf.remove_source_marks (start, end, type);
836 // we should highlight other types of errors..
838 if (!obj.has_member(type)) {
839 print("Return has no errors\n");
842 var err = obj.get_object_member(type);
844 if (_this.file == null) {
845 return; // just in case the file has not loaded yet?
851 var regex = new Regex("\\.bjs$");
854 valafn = regex.replace(_this.file.path,_this.file.path.length , 0 , ".vala");
855 } catch (GLib.RegexError e) {
859 if (!err.has_member(valafn)) {
860 print("File path has no errors\n");
863 var lines = err.get_object_member(valafn);
867 var tlines = buf.get_line_count () +1;
869 lines.foreach_member((obj, line, node) => {
872 // print("get inter\n");
873 var eline = int.parse(line) -1 ;
874 print("GOT ERROR on line %s -- converted to %d\n", line,eline);
877 if (eline > tlines || eline < 0) {
880 sbuf.get_iter_at_line( out iter, eline);
881 //print("mark line\n");
882 var msg = type + " on line: %d - %s".printf(eline+1, valafn);
883 var ar = lines.get_array_member(line);
884 for (var i = 0 ; i < ar.get_length(); i++) {
885 msg += (msg.length > 0) ? "\n" : "";
886 msg += ar.get_string_element(i);
890 sbuf.create_source_mark(msg, type, iter);
898 public string toString () {
901 this.el.get_buffer().get_start_iter(out s);
902 this.el.get_buffer().get_end_iter(out e);
903 var ret = this.el.get_buffer().get_text(s,e,true);
904 //print("TO STRING? " + ret);
908 public class Xcls_buffer : Object
910 public Gtk.SourceBuffer el;
911 private Xcls_GtkView _this;
915 public int error_line;
919 public Xcls_buffer(Xcls_GtkView _owner )
923 this.el = new Gtk.SourceBuffer( null );
926 this.error_line = -1;
929 // set gobject values
932 // user defined functions
937 public class Xcls_Box12 : Object
940 private Xcls_GtkView _this;
946 public Xcls_Box12(Xcls_GtkView _owner )
949 this.el = new Gtk.Box( Gtk.Orientation.HORIZONTAL, 0 );
953 // set gobject values
954 this.el.homogeneous = false;
955 this.el.vexpand = false;
956 var child_0 = new Xcls_search_entry( _this );
958 this.el.add( child_0.el );
959 var child_1 = new Xcls_MenuBar14( _this );
961 this.el.add ( child_1.el );
962 var child_2 = new Xcls_nextBtn( _this );
964 this.el.add( child_2.el );
965 var child_3 = new Xcls_backBtn( _this );
967 this.el.add( child_3.el );
968 var child_4 = new Xcls_MenuButton20( _this );
970 this.el.add( child_4.el );
973 // user defined functions
975 public class Xcls_search_entry : Object
977 public Gtk.SearchEntry el;
978 private Xcls_GtkView _this;
984 public Xcls_search_entry(Xcls_GtkView _owner )
987 _this.search_entry = this;
988 this.el = new Gtk.SearchEntry();
992 // set gobject values
993 this.el.width_request = 300;
994 this.el.hexpand = true;
995 this.el.placeholder_text = "Press enter to search";
999 var description = Pango.FontDescription.from_string("monospace");
1000 description.set_size(8000);
1001 this.el.override_font(description);
1004 this.el.key_press_event.connect( (event) => {
1005 if (event.keyval == Gdk.Key.g && (event.state & Gdk.ModifierType.CONTROL_MASK ) > 0 ) {
1006 GLib.debug("SAVE: ctrl-g pressed");
1007 _this.forwardSearch(true);
1012 if (event.keyval == Gdk.Key.Return && this.el.text.length > 0) {
1013 var res = _this.search(this.el.text);
1014 _this.search_results.updateResults();
1016 GLib.Timeout.add_seconds(2,() => {
1017 _this.search_results.updateResults();
1025 // print(event.key.keyval)
1030 this.el.changed.connect( () => {
1032 if (this.el.text == "") {
1033 _this.search_results.el.hide();
1037 switch(_this.windowstate.state) {
1038 case WindowState.State.CODEONLY:
1039 ///case WindowState.State.CODE:
1040 // search the code being edited..
1041 res = _this.windowstate.code_editor_tab.search(this.el.text);
1044 case WindowState.State.PREVIEW:
1045 if (_this.windowstate.file.xtype == "Gtk") {
1046 res = _this.windowstate.window_gladeview.search(this.el.text);
1048 res = _this.windowstate.window_rooview.search(this.el.text);
1054 _this.search_results.el.show();
1056 _this.search_results.el.label = "%d Matches".printf(res);
1058 _this.search_results.el.label = "No Matches";
1066 // user defined functions
1067 public void forwardSearch (bool change_focus) {
1070 _this.forwardSearch(change_focus);
1074 switch(_this.windowstate.state) {
1075 case WindowState.State.CODEONLY:
1076 //case WindowState.State.CODE:
1077 // search the code being edited..
1078 _this.windowstate.code_editor_tab.forwardSearch(change_focus);
1081 case WindowState.State.PREVIEW:
1082 if (_this.windowstate.file.xtype == "Gtk") {
1083 _this.windowstate.window_gladeview.forwardSearch(change_focus);
1085 _this.windowstate.window_rooview.forwardSearch(change_focus);
1095 public class Xcls_MenuBar14 : Object
1097 public Gtk.MenuBar el;
1098 private Xcls_GtkView _this;
1104 public Xcls_MenuBar14(Xcls_GtkView _owner )
1107 this.el = new Gtk.MenuBar();
1111 // set gobject values
1112 var child_0 = new Xcls_search_results( _this );
1114 this.el.add ( child_0.el );
1117 // user defined functions
1119 public class Xcls_search_results : Object
1121 public Gtk.ImageMenuItem el;
1122 private Xcls_GtkView _this;
1128 public Xcls_search_results(Xcls_GtkView _owner )
1131 _this.search_results = this;
1132 this.el = new Gtk.ImageMenuItem();
1136 // set gobject values
1137 this.el.always_show_image = true;
1138 this.el.visible = false;
1141 this.el.button_press_event.connect( () => {
1143 if (this.popup == null) {
1144 this.popup = new Xcls_ValaCompileErrors();
1145 this.popup.window = _this;
1149 this.popup.show(this.notices, this.el);
1155 // user defined functions
1156 public void updateResults () {
1157 this.el.visible = true;
1159 var res = _this.searchcontext.get_occurrences_count();
1161 _this.search_results.el.label = "??? Matches";
1165 _this.nextBtn.el.sensitive = false;
1166 _this.backBtn.el.sensitive = false;
1169 _this.search_results.el.label = "%d Matches".printf(res);
1170 _this.nextBtn.el.sensitive = true;
1171 _this.backBtn.el.sensitive = true;
1174 _this.search_results.el.label = "No Matches";
1180 public class Xcls_nextBtn : Object
1182 public Gtk.Button el;
1183 private Xcls_GtkView _this;
1189 public Xcls_nextBtn(Xcls_GtkView _owner )
1192 _this.nextBtn = this;
1193 this.el = new Gtk.Button();
1197 // set gobject values
1198 this.el.always_show_image = true;
1199 this.el.label = "Next";
1200 this.el.sensitive = false;
1201 var child_0 = new Xcls_Image17( _this );
1203 this.el.image = child_0.el;
1206 this.el.button_press_event.connect( (event) => {
1208 _this.forwardSearch(true);
1214 // user defined functions
1216 public class Xcls_Image17 : Object
1218 public Gtk.Image el;
1219 private Xcls_GtkView _this;
1225 public Xcls_Image17(Xcls_GtkView _owner )
1228 this.el = new Gtk.Image();
1232 // set gobject values
1233 this.el.icon_name = "go-down";
1236 // user defined functions
1240 public class Xcls_backBtn : Object
1242 public Gtk.Button el;
1243 private Xcls_GtkView _this;
1249 public Xcls_backBtn(Xcls_GtkView _owner )
1252 _this.backBtn = this;
1253 this.el = new Gtk.Button();
1257 // set gobject values
1258 this.el.always_show_image = true;
1259 this.el.label = "Previous";
1260 this.el.sensitive = false;
1261 var child_0 = new Xcls_Image19( _this );
1263 this.el.image = child_0.el;
1266 this.el.button_press_event.connect( (event) => {
1268 _this.backSearch(true);
1274 // user defined functions
1276 public class Xcls_Image19 : Object
1278 public Gtk.Image el;
1279 private Xcls_GtkView _this;
1285 public Xcls_Image19(Xcls_GtkView _owner )
1288 this.el = new Gtk.Image();
1292 // set gobject values
1293 this.el.icon_name = "go-up";
1296 // user defined functions
1300 public class Xcls_MenuButton20 : Object
1302 public Gtk.MenuButton el;
1303 private Xcls_GtkView _this;
1309 public Xcls_MenuButton20(Xcls_GtkView _owner )
1312 this.el = new Gtk.MenuButton();
1316 // set gobject values
1317 this.el.always_show_image = true;
1318 this.el.label = "Settings";
1319 var child_0 = new Xcls_Image21( _this );
1321 this.el.image = child_0.el;
1322 var child_1 = new Xcls_search_settings( _this );
1324 this.el.popup = child_1.el;
1327 // user defined functions
1329 public class Xcls_Image21 : Object
1331 public Gtk.Image el;
1332 private Xcls_GtkView _this;
1338 public Xcls_Image21(Xcls_GtkView _owner )
1341 this.el = new Gtk.Image();
1345 // set gobject values
1346 this.el.icon_name = "emblem-system";
1349 // user defined functions
1352 public class Xcls_search_settings : Object
1355 private Xcls_GtkView _this;
1361 public Xcls_search_settings(Xcls_GtkView _owner )
1364 _this.search_settings = this;
1365 this.el = new Gtk.Menu();
1369 // set gobject values
1370 var child_0 = new Xcls_case_sensitive( _this );
1372 this.el.append( child_0.el );
1373 var child_1 = new Xcls_regex( _this );
1375 this.el.append( child_1.el );
1376 var child_2 = new Xcls_multiline( _this );
1378 this.el.append( child_2.el );
1381 // user defined functions
1383 public class Xcls_case_sensitive : Object
1385 public Gtk.CheckMenuItem el;
1386 private Xcls_GtkView _this;
1392 public Xcls_case_sensitive(Xcls_GtkView _owner )
1395 _this.case_sensitive = this;
1396 this.el = new Gtk.CheckMenuItem();
1400 // set gobject values
1401 this.el.label = "Case Sensitive";
1410 // user defined functions
1413 public class Xcls_regex : Object
1415 public Gtk.CheckMenuItem el;
1416 private Xcls_GtkView _this;
1422 public Xcls_regex(Xcls_GtkView _owner )
1426 this.el = new Gtk.CheckMenuItem();
1430 // set gobject values
1431 this.el.label = "Regex";
1440 // user defined functions
1443 public class Xcls_multiline : Object
1445 public Gtk.CheckMenuItem el;
1446 private Xcls_GtkView _this;
1452 public Xcls_multiline(Xcls_GtkView _owner )
1455 _this.multiline = this;
1456 this.el = new Gtk.CheckMenuItem();
1460 // set gobject values
1461 this.el.label = "Multi-line (add \\n)";
1470 // user defined functions