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_sourceviewscroll sourceviewscroll;
21 public Xcls_sourceview sourceview;
22 public Xcls_buffer buffer;
23 public Xcls_search_entry search_entry;
24 public Xcls_search_results search_results;
25 public Xcls_nextBtn nextBtn;
26 public Xcls_backBtn backBtn;
27 public Xcls_search_settings search_settings;
28 public Xcls_case_sensitive case_sensitive;
29 public Xcls_regex regex;
30 public Xcls_multiline multiline;
33 public Gtk.Widget lastObj;
34 public Gtk.CssProvider css;
35 public Xcls_MainWindow main_window;
36 public GtkSource.SearchContext searchcontext;
37 public int last_search_end;
38 public JsRender.JsRender file;
44 this.el = new Gtk.Box( Gtk.Orientation.VERTICAL, 0 );
48 this.last_search_end = 0;
52 this.el.hexpand = true;
53 this.el.vexpand = true;
54 new Xcls_notebook( _this );
55 this.el.append( _this.notebook.el );
61 this.css = new Gtk.CssProvider();
63 this.css.load_from_string(
64 "#gtkview-view-layout { background-color: #ccc; }"
67 Gtk.StyleContext.add_provider_for_display(
68 this.el.get_display(),
70 Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION
77 // user defined functions
78 public void loadFile (JsRender.JsRender file)
82 if (file.tree == null) {
85 this.notebook.el.page = 0;// gtk preview
90 this.sourceview.loadFile();
91 this.searchcontext = null;
94 if (this.lastObj != null) {
95 this.container.el.remove(this.lastObj);
98 // hide the compile view at present..
101 var w = this.el.get_width();
102 var h = this.el.get_height();
104 print("ALLOC SET SIZES %d, %d\n", w,h);
106 // set the container size min to 500/500 or 20 px less than max..
107 w = int.max (w-20, 500);
108 h = int.max (h-20, 500);
110 print("SET SIZES %d, %d\n", w,h);
111 _this.container.el.set_size_request(w,h);
113 _this.view_layout.el.set_size_request(w,h);
114 // should be baded on calc.. -- see update_scrolled.
116 var fc = this.container.el.get_first_child();
118 this.container.el.remove(fc);
121 var xmlstr = JsRender.NodeToGlade.mungeFile( file);
122 var builder = new Gtk.Builder.from_string (xmlstr, xmlstr.length);
123 var obj = (Gtk.Widget) builder.get_object("w"+ file.tree.oid.to_string());
124 this.container.el.append(obj);
130 var x = new JsRender.NodeToGtk((Project.Gtk) file.project, file.tree);
131 var obj = x.munge() as Gtk.Widget;
138 this.container.el.append(obj);
144 public void highlightNodeAtLine (int ln) {
146 // this is done from clicking on the editor..
151 var node = _this.file.lineToNode(ln+1);
154 //print("can not find node\n");
157 var prop = node.lineToProp(ln+1);
158 print("prop : %s", prop == null ? "???" : prop.name);
161 // ---------- this selects the tree's node...
163 var ltree = _this.main_window.windowstate.left_tree;
164 ltree.model.selectNode(node);
165 //var tp = ltree.model.treePathFromNode(node);
167 //print("got tree path %s\n", tp);
171 //_this.sourceview.allow_node_scroll = false; /// block node scrolling..
174 //print("changing cursor on tree..\n");
178 // let's try allowing editing on the methods.
179 // a little klunky at present..
180 _this.sourceview.prop_selected = "";
183 //see if we can find it..
184 var kv = prop.split(":");
187 //var k = prop.get_key(kv[1]);
188 // fixme -- need to determine if it's an editable property...
189 _this.sourceview.prop_selected = prop;
191 } else if (kv[0] == "l") {
192 _this.sourceview.prop_selected = prop;
197 //ltree.view.setCursor(tp, "editor");
198 // ltree.view.el.set_cursor(new Gtk.TreePath.from_string(tp), null, false);
199 _this.sourceview.nodeSelected(node,false);
201 // scrolling is disabled... as node selection calls scroll 10ms after it changes.
202 // GLib.Timeout.add_full(GLib.Priority.DEFAULT,100 , () => {
203 // this.allow_node_scroll = true;
219 public void forwardSearch (bool change_focus) {
221 if (this.searchcontext == null) {
224 this.notebook.el.page = 1;
225 Gtk.TextIter beg, st,en;
226 bool has_wrapped_around;
227 var buf = this.sourceview.el.get_buffer();
228 buf.get_iter_at_offset(out beg, this.last_search_end);
229 if (!this.searchcontext.forward(beg, out st, out en, out has_wrapped_around)) {
230 this.last_search_end = 0;
233 this.last_search_end = en.get_offset();
235 this.sourceview.el.grab_focus();
237 buf.place_cursor(st);
241 this.sourceview.el.scroll_to_iter(st, 0.0f, true, 0.0f, 0.5f);
244 var ln = st.get_line();
246 this.highlightNodeAtLine(ln);
248 public void backSearch (bool change_focus) {
250 if (this.searchcontext == null) {
254 Gtk.TextIter beg, st,en;
255 bool has_wrapped_around;
256 this.buffer.el.get_iter_at_offset(out beg, this.last_search_end -1 );
258 if (!this.searchcontext.backward(beg, out st, out en, out has_wrapped_around)) {
260 this.last_search_end = 0;
263 this.last_search_end = en.get_offset();
265 this.sourceview.el.grab_focus();
267 this.buffer.el.place_cursor(st);
268 this.sourceview.el.scroll_to_iter(st, 0.1f, true, 0.0f, 0.5f);
269 var ln = st.get_line();
270 this.highlightNodeAtLine(ln);
273 public int search (string in_txt) {
274 this.notebook.el.page = 1;
278 var s = new GtkSource.SearchSettings();
279 s.case_sensitive = _this.case_sensitive.el.active;
280 s.regex_enabled = _this.regex.el.active;
281 s.wrap_around = false;
283 this.searchcontext = new GtkSource.SearchContext(this.buffer.el,s);
284 this.searchcontext.set_highlight(true);
287 if (_this.multiline.el.active) {
288 txt = in_txt.replace("\\n", "\n");
291 s.set_search_text(txt);
292 Gtk.TextIter beg, st,en;
293 bool has_wrapped_around;
294 this.buffer.el.get_start_iter(out beg);
295 this.searchcontext.forward(beg, out st, out en, out has_wrapped_around);
296 this.last_search_end = 0;
298 return this.searchcontext.get_occurrences_count();
304 public void createThumb () {
307 if (this.file == null) {
310 // only screenshot the gtk preview..
311 if (this.notebook.el.page > 0 ) {
316 this.file.widgetToIcon(this.container.el);
325 // should we hold until it's printed...
331 public void updateErrorMarks (string category) {
335 var buf = _this.buffer.el;
338 buf.get_bounds (out start, out end);
340 buf.remove_source_marks (start, end, category);
342 GLib.debug("highlight errors");
344 // we should highlight other types of errors..
349 if (_this.file == null) {
350 GLib.debug("file is null?");
354 var ar = this.file.getErrors(category);
355 if (ar == null || ar.get_n_items() < 1) {
356 GLib.debug("higjlight %s has no errors", category);
366 var tlines = buf.get_line_count () +1;
370 for (var i = 0; i < ar.get_n_items();i++) {
371 var err = (Palete.CompileError) ar.get_item(i);
374 // print("get inter\n");
375 var eline = err.line - offset;
376 GLib.debug("GOT ERROR on line %d -- converted to %d (offset = %d)",
377 err.line ,eline, offset);
380 if (eline > tlines || eline < 0) {
385 buf.get_iter_at_line( out iter, eline);
388 var msg = "Line: %d %s : %s".printf(eline+1, err.category, err.msg);
389 buf.create_source_mark( msg, err.category, iter);
390 GLib.debug("set line %d to %s", eline, msg);
391 //this.marks.set(eline, msg);
400 public void scroll_to_line (int line) {
403 GLib.Timeout.add(100, () => {
406 this.notebook.el.set_current_page(1);
408 var buf = this.sourceview.el.get_buffer();
410 var sbuf = (GtkSource.Buffer) buf;
414 sbuf.get_iter_at_line(out iter, line);
415 this.sourceview.el.scroll_to_iter(iter, 0.1f, true, 0.0f, 0.5f);
421 public class Xcls_notebook : Object
423 public Gtk.Notebook el;
424 private Xcls_GtkView _this;
430 public Xcls_notebook(Xcls_GtkView _owner )
433 _this.notebook = this;
434 this.el = new Gtk.Notebook();
438 // set gobject values
439 this.el.overflow = Gtk.Overflow.VISIBLE;
440 new Xcls_label_preview( _this );
441 new Xcls_label_code( _this );
442 var child_3 = new Xcls_ScrolledWindow5( _this );
444 this.el.append_page ( child_3.el , _this.label_preview.el );
445 var child_4 = new Xcls_Box8( _this );
447 this.el.append_page ( child_4.el , _this.label_code.el );
450 // user defined functions
452 public class Xcls_label_preview : Object
455 private Xcls_GtkView _this;
461 public Xcls_label_preview(Xcls_GtkView _owner )
464 _this.label_preview = this;
465 this.el = new Gtk.Label( "Preview" );
469 // set gobject values
472 // user defined functions
475 public class Xcls_label_code : Object
478 private Xcls_GtkView _this;
484 public Xcls_label_code(Xcls_GtkView _owner )
487 _this.label_code = this;
488 this.el = new Gtk.Label( "Preview Generated Code" );
492 // set gobject values
495 // user defined functions
498 public class Xcls_ScrolledWindow5 : Object
500 public Gtk.ScrolledWindow el;
501 private Xcls_GtkView _this;
507 public Xcls_ScrolledWindow5(Xcls_GtkView _owner )
510 this.el = new Gtk.ScrolledWindow();
514 // set gobject values
515 new Xcls_view_layout( _this );
516 this.el.set_child ( _this.view_layout.el );
519 // user defined functions
521 public class Xcls_view_layout : Object
524 private Xcls_GtkView _this;
530 public Xcls_view_layout(Xcls_GtkView _owner )
533 _this.view_layout = this;
534 this.el = new Gtk.Fixed();
538 // set gobject values
539 this.el.name = "gtkview-view-layout";
540 new Xcls_container( _this );
541 this.el.put ( _this.container.el , 10,10 );
544 // user defined functions
546 public class Xcls_container : Object
549 private Xcls_GtkView _this;
555 public Xcls_container(Xcls_GtkView _owner )
558 _this.container = this;
559 this.el = new Gtk.Box( Gtk.Orientation.HORIZONTAL, 0 );
563 // set gobject values
566 // user defined functions
571 public class Xcls_Box8 : Object
574 private Xcls_GtkView _this;
580 public Xcls_Box8(Xcls_GtkView _owner )
583 this.el = new Gtk.Box( Gtk.Orientation.VERTICAL, 0 );
587 // set gobject values
588 new Xcls_sourceviewscroll( _this );
589 this.el.append( _this.sourceviewscroll.el );
590 var child_2 = new Xcls_Box13( _this );
592 this.el.append( child_2.el );
595 // user defined functions
597 public class Xcls_sourceviewscroll : Object
599 public Gtk.ScrolledWindow el;
600 private Xcls_GtkView _this;
606 public Xcls_sourceviewscroll(Xcls_GtkView _owner )
609 _this.sourceviewscroll = this;
610 this.el = new Gtk.ScrolledWindow();
614 // set gobject values
615 this.el.vexpand = true;
616 new Xcls_sourceview( _this );
617 this.el.set_child ( _this.sourceview.el );
620 // user defined functions
622 public class Xcls_sourceview : Object
624 public GtkSource.View el;
625 private Xcls_GtkView _this;
630 public string prop_selected;
631 public bool allow_node_scroll;
632 public Gtk.CssProvider css;
633 public JsRender.Node? node_selected;
636 public Xcls_sourceview(Xcls_GtkView _owner )
639 _this.sourceview = this;
640 this.el = new GtkSource.View();
644 this.prop_selected = "";
645 this.allow_node_scroll = true;
647 // set gobject values
648 this.el.name = "gtkview-view";
649 this.el.editable = false;
650 this.el.show_line_marks = true;
651 this.el.show_line_numbers = true;
652 new Xcls_buffer( _this );
653 this.el.set_buffer ( _this.buffer.el );
654 var child_2 = new Xcls_EventControllerKey12( _this );
656 this.el.add_controller( child_2.el );
663 this.css = new Gtk.CssProvider();
665 this.css.load_from_string("#gtkview-view { font: 10px monospace ;}");
667 Gtk.StyleContext.add_provider_for_display(
668 this.el.get_display(),
670 Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION
678 var attrs = new GtkSource.MarkAttributes();
679 var pink = Gdk.RGBA();
680 pink.parse ( "pink");
681 attrs.set_background ( pink);
682 attrs.set_icon_name ( "process-stop");
683 attrs.query_tooltip_text.connect(( mark) => {
684 //print("tooltip query? %s\n", mark.name);
688 this.el.set_mark_attributes ("ERR", attrs, 1);
690 var wattrs = new GtkSource.MarkAttributes();
691 var blue = Gdk.RGBA();
692 blue.parse ( "#ABF4EB");
693 wattrs.set_background ( blue);
694 wattrs.set_icon_name ( "process-stop");
695 wattrs.query_tooltip_text.connect(( mark) => {
696 //print("tooltip query? %s\n", mark.name);
700 this.el.set_mark_attributes ("WARN", wattrs, 1);
704 var dattrs = new GtkSource.MarkAttributes();
705 var purple = Gdk.RGBA();
706 purple.parse ( "#EEA9FF");
707 dattrs.set_background ( purple);
708 dattrs.set_icon_name ( "process-stop");
709 dattrs.query_tooltip_text.connect(( mark) => {
710 //print("tooltip query? %s\n", mark.name);
714 this.el.set_mark_attributes ("DEPR", dattrs, 1);
717 var gattrs = new GtkSource.MarkAttributes();
718 var grey = Gdk.RGBA();
719 grey.parse ( "#ccc");
720 gattrs.set_background ( grey);
723 this.el.set_mark_attributes ("grey", gattrs, 1);
733 this.el.query_tooltip.connect( (x, y, keyboard_tooltip, tooltip) => {
735 //GLib.debug("query tooltip");
739 var yoff = (int) _this.sourceviewscroll.el.vadjustment.value;
741 this.el.get_iter_at_position (out iter, out trailing, x, y + yoff);
743 var l = iter.get_line();
744 // GLib.debug("query tooltip line %d", (int) l);
745 var marks = _this.buffer.el.get_source_marks_at_line(l, "ERR");
746 if (marks.is_empty()) {
747 marks = _this.buffer.el.get_source_marks_at_line(l, "WARN");
749 if (marks.is_empty()) {
750 marks = _this.buffer.el.get_source_marks_at_line(l, "DEPR");
753 // GLib.debug("query tooltip line marks %d", (int) marks.length());
755 marks.@foreach((m) => {
756 //GLib.debug("got mark %s", m.name);
757 str += (str.length > 0 ? "\n" : "") + m.name;
760 // true if there is a mark..
761 tooltip.set_text( str);
762 return str.length > 0 ? true : false;
767 // user defined functions
768 public void loadFile ( ) {
770 var buf = this.el.get_buffer();
772 var sbuf = (GtkSource.Buffer) buf;
776 if (_this.file == null || _this.file.xtype != "Gtk") {
777 print("xtype != Gtk");
778 this.loading = false;
784 var regex = new Regex("\\.bjs$");
787 valafn = regex.replace(_this.file.path,_this.file.path.length , 0 , ".vala");
788 } catch (GLib.RegexError e) {
789 this.loading = false;
794 if (!FileUtils.test(valafn,FileTest.IS_REGULAR) ) {
795 print("File path has no errors\n");
796 this.loading = false;
803 GLib.FileUtils.get_contents (valafn, out str);
805 this.loading = false;
809 // print("setting str %d\n", str.length);
810 buf.set_text(str, str.length);
811 var lm = GtkSource.LanguageManager.get_default();
813 //?? is javascript going to work as js?
815 ((GtkSource.Buffer)(buf)) .set_language(lm.get_language(_this.file.language));
818 _this.main_window.windowstate.updateErrorMarksAll();
822 this.loading = false;
824 public void nodeSelected (JsRender.Node? sel, bool scroll) {
830 // this is connected in widnowstate
831 print("Roo-view - node selected\n");
832 var buf = this.el.get_buffer();
834 var sbuf = (GtkSource.Buffer) buf;
837 // while(Gtk.events_pending()) {
838 // Gtk.main_iteration();
842 // clear all the marks..
846 sbuf.get_bounds (out start, out end);
847 sbuf.remove_source_marks (start, end, "grey");
849 this.node_selected = sel;
855 sbuf.get_iter_at_line(out iter, sel.line_start);
858 Gtk.TextIter cur_iter;
859 sbuf.get_iter_at_offset(out cur_iter, sbuf.cursor_position);
861 //var cur_line = cur_iter.get_line();
862 //if (cur_line > sel.line_start && cur_line < sel.line_end) {
865 if (this.allow_node_scroll) {
867 this.el.scroll_to_iter(iter, 0.1f, true, 0.0f, 0.5f);
872 for (var i = 0; i < buf.get_line_count();i++) {
873 if (i < sel.line_start || i > sel.line_end) {
875 sbuf.get_iter_at_line(out iter, i);
876 sbuf.create_source_mark(null, "grey", iter);
884 public string toString () {
887 this.el.get_buffer().get_start_iter(out s);
888 this.el.get_buffer().get_end_iter(out e);
889 var ret = this.el.get_buffer().get_text(s,e,true);
890 //print("TO STRING? " + ret);
894 public class Xcls_buffer : Object
896 public GtkSource.Buffer el;
897 private Xcls_GtkView _this;
901 public int error_line;
905 public Xcls_buffer(Xcls_GtkView _owner )
909 this.el = new GtkSource.Buffer( null );
912 this.error_line = -1;
915 // set gobject values
918 this.el.notify["cursor_position"].connect( () => {
921 if (_this.sourceview.loading) {
925 GLib.debug("cursor changed : %d", this.el.cursor_position);
927 this.el.get_iter_at_offset(out cpos, this.el.cursor_position);
929 var ln = cpos.get_line();
931 var node = _this.file.lineToNode(ln);
934 print("can not find node\n");
937 _this.sourceview.loading = true;
938 var ltree = _this.main_window.windowstate.left_tree;
939 ltree.model.selectNode(node);
940 _this.sourceview.loading = false;
942 //print("got tree path %s\n", tp);
944 // this.allow_node_scroll = false;
945 // print("changing cursor on tree..\n");
946 //ltree.view.el.set_cursor(new Gtk.TreePath.from_string(tp), null, false);
947 // scrolling is disabled... as node selection calls scroll 10ms after it changes.
948 ///GLib.Timeout.add_full(GLib.Priority.DEFAULT,100 , () => {
949 // this.allow_node_scroll = true;
954 // highlight the node..
961 // user defined functions
964 public class Xcls_EventControllerKey12 : Object
966 public Gtk.EventControllerKey el;
967 private Xcls_GtkView _this;
973 public Xcls_EventControllerKey12(Xcls_GtkView _owner )
976 this.el = new Gtk.EventControllerKey();
980 // set gobject values
983 this.el.key_pressed.connect( (keyval, keycode, state) => {
987 if (keyval == Gdk.Key.g && (state & Gdk.ModifierType.CONTROL_MASK ) > 0 ) {
988 GLib.debug("SAVE: ctrl-g pressed");
989 _this.forwardSearch(true);
992 if (keyval == Gdk.Key.f && (state & Gdk.ModifierType.CONTROL_MASK ) > 0 ) {
993 GLib.debug("SAVE: ctrl-f pressed");
994 _this.search_entry.el.grab_focus();
1002 // user defined functions
1007 public class Xcls_Box13 : Object
1010 private Xcls_GtkView _this;
1016 public Xcls_Box13(Xcls_GtkView _owner )
1019 this.el = new Gtk.Box( Gtk.Orientation.HORIZONTAL, 0 );
1023 // set gobject values
1024 this.el.homogeneous = false;
1025 this.el.vexpand = false;
1026 new Xcls_search_entry( _this );
1027 this.el.append( _this.search_entry.el );
1028 new Xcls_search_results( _this );
1029 this.el.append( _this.search_results.el );
1030 new Xcls_nextBtn( _this );
1031 this.el.append( _this.nextBtn.el );
1032 new Xcls_backBtn( _this );
1033 this.el.append( _this.backBtn.el );
1034 var child_5 = new Xcls_MenuButton19( _this );
1036 this.el.append( child_5.el );
1039 // user defined functions
1041 public class Xcls_search_entry : Object
1043 public Gtk.SearchEntry el;
1044 private Xcls_GtkView _this;
1048 public Gtk.CssProvider css;
1051 public Xcls_search_entry(Xcls_GtkView _owner )
1054 _this.search_entry = this;
1055 this.el = new Gtk.SearchEntry();
1059 // set gobject values
1060 this.el.name = "gtkview-search-entry";
1061 this.el.hexpand = true;
1062 this.el.placeholder_text = "Press enter to search";
1063 this.el.search_delay = 3;
1064 var child_1 = new Xcls_EventControllerKey15( _this );
1066 this.el.add_controller( child_1.el );
1070 this.css = new Gtk.CssProvider();
1072 this.css.load_from_string("
1073 #gtkview-search-entry { font: 10px monospace ;}"
1076 Gtk.StyleContext.add_provider_for_display(
1077 this.el.get_display(),
1079 Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION
1083 this.el.search_changed.connect( () => {
1085 _this.search(_this.search_entry.el.text);
1086 _this.search_results.updateResults();
1088 GLib.Timeout.add_seconds(1,() => {
1089 _this.search_results.updateResults();
1098 // user defined functions
1099 public void forwardSearch (bool change_focus) {
1102 _this.forwardSearch(change_focus);
1106 switch(_this.windowstate.state) {
1107 case WindowState.State.CODEONLY:
1108 //case WindowState.State.CODE:
1109 // search the code being edited..
1110 _this.windowstate.code_editor_tab.forwardSearch(change_focus);
1113 case WindowState.State.PREVIEW:
1114 if (_this.windowstate.file.xtype == "Gtk") {
1115 _this.windowstate.window_gladeview.forwardSearch(change_focus);
1117 _this.windowstate.window_rooview.forwardSearch(change_focus);
1126 public class Xcls_EventControllerKey15 : Object
1128 public Gtk.EventControllerKey el;
1129 private Xcls_GtkView _this;
1135 public Xcls_EventControllerKey15(Xcls_GtkView _owner )
1138 this.el = new Gtk.EventControllerKey();
1142 // set gobject values
1145 this.el.key_pressed.connect( (keyval, keycode, state) => {
1147 if (keyval == Gdk.Key.g && (state & Gdk.ModifierType.CONTROL_MASK ) > 0 ) {
1148 GLib.debug("SAVE: ctrl-g pressed");
1149 _this.forwardSearch(true);
1154 if (keyval == Gdk.Key.Return && _this.search_entry.el.text.length > 0) {
1155 _this.forwardSearch(true);
1161 // print(event.key.keyval)
1167 // user defined functions
1171 public class Xcls_search_results : Object
1173 public Gtk.Label el;
1174 private Xcls_GtkView _this;
1180 public Xcls_search_results(Xcls_GtkView _owner )
1183 _this.search_results = this;
1184 this.el = new Gtk.Label( "No Results" );
1188 // set gobject values
1189 this.el.margin_end = 4;
1190 this.el.margin_start = 4;
1193 // user defined functions
1194 public void updateResults () {
1195 this.el.visible = true;
1197 var res = _this.searchcontext.get_occurrences_count();
1199 _this.search_results.el.label = "??? Matches";
1203 _this.nextBtn.el.sensitive = false;
1204 _this.backBtn.el.sensitive = false;
1207 _this.search_results.el.label = "%d Matches".printf(res);
1208 _this.nextBtn.el.sensitive = true;
1209 _this.backBtn.el.sensitive = true;
1212 _this.search_results.el.label = "No Matches";
1217 public class Xcls_nextBtn : Object
1219 public Gtk.Button el;
1220 private Xcls_GtkView _this;
1224 public bool always_show_image;
1227 public Xcls_nextBtn(Xcls_GtkView _owner )
1230 _this.nextBtn = this;
1231 this.el = new Gtk.Button();
1234 this.always_show_image = true;
1236 // set gobject values
1237 this.el.icon_name = "go-down";
1238 this.el.sensitive = false;
1241 this.el.clicked.connect( ( ) => {
1242 _this.forwardSearch(true);
1248 // user defined functions
1251 public class Xcls_backBtn : Object
1253 public Gtk.Button el;
1254 private Xcls_GtkView _this;
1258 public bool always_show_image;
1261 public Xcls_backBtn(Xcls_GtkView _owner )
1264 _this.backBtn = this;
1265 this.el = new Gtk.Button();
1268 this.always_show_image = true;
1270 // set gobject values
1271 this.el.icon_name = "go-up";
1272 this.el.sensitive = false;
1275 this.el.clicked.connect( ( ) => {
1277 _this.backSearch(true);
1282 // user defined functions
1285 public class Xcls_MenuButton19 : Object
1287 public Gtk.MenuButton el;
1288 private Xcls_GtkView _this;
1292 public bool always_show_image;
1295 public Xcls_MenuButton19(Xcls_GtkView _owner )
1298 this.el = new Gtk.MenuButton();
1301 this.always_show_image = true;
1303 // set gobject values
1304 this.el.icon_name = "emblem-system";
1305 this.el.always_show_arrow = true;
1306 new Xcls_search_settings( _this );
1307 this.el.popover = _this.search_settings.el;
1310 // user defined functions
1312 public class Xcls_search_settings : Object
1314 public Gtk.PopoverMenu el;
1315 private Xcls_GtkView _this;
1321 public Xcls_search_settings(Xcls_GtkView _owner )
1324 _this.search_settings = this;
1325 this.el = new Gtk.PopoverMenu.from_model(null);
1329 // set gobject values
1330 var child_1 = new Xcls_Box21( _this );
1332 this.el.set_child ( child_1.el );
1335 // user defined functions
1337 public class Xcls_Box21 : Object
1340 private Xcls_GtkView _this;
1346 public Xcls_Box21(Xcls_GtkView _owner )
1349 this.el = new Gtk.Box( Gtk.Orientation.VERTICAL, 0 );
1353 // set gobject values
1354 new Xcls_case_sensitive( _this );
1355 this.el.append( _this.case_sensitive.el );
1356 new Xcls_regex( _this );
1357 this.el.append( _this.regex.el );
1358 new Xcls_multiline( _this );
1359 this.el.append( _this.multiline.el );
1362 // user defined functions
1364 public class Xcls_case_sensitive : Object
1366 public Gtk.CheckButton el;
1367 private Xcls_GtkView _this;
1373 public Xcls_case_sensitive(Xcls_GtkView _owner )
1376 _this.case_sensitive = this;
1377 this.el = new Gtk.CheckButton();
1381 // set gobject values
1382 this.el.label = "Case Sensitive";
1385 // user defined functions
1388 public class Xcls_regex : Object
1390 public Gtk.CheckButton el;
1391 private Xcls_GtkView _this;
1397 public Xcls_regex(Xcls_GtkView _owner )
1401 this.el = new Gtk.CheckButton();
1405 // set gobject values
1406 this.el.label = "Regex";
1409 // user defined functions
1412 public class Xcls_multiline : Object
1414 public Gtk.CheckButton el;
1415 private Xcls_GtkView _this;
1421 public Xcls_multiline(Xcls_GtkView _owner )
1424 _this.multiline = this;
1425 this.el = new Gtk.CheckButton();
1429 // set gobject values
1430 this.el.label = "Multi-line (add \\n)";
1433 // user defined functions