3 public class Editor : Object
8 public static Editor singleton()
10 if (_Editor == null) {
11 _Editor= new Editor();
15 public Xcls_save_button save_button;
16 public Xcls_close_btn close_btn;
17 public Xcls_RightEditor RightEditor;
18 public Xcls_view view;
19 public Xcls_buffer buffer;
20 public Xcls_search_entry search_entry;
21 public Xcls_search_results search_results;
22 public Xcls_nextBtn nextBtn;
23 public Xcls_backBtn backBtn;
24 public Xcls_search_settings search_settings;
25 public Xcls_case_sensitive case_sensitive;
26 public Xcls_regex regex;
27 public Xcls_multiline multiline;
30 public Xcls_MainWindow window;
31 public int pos_root_x;
33 public int pos_root_y;
35 public Gtk.SourceSearchContext searchcontext;
36 public int last_search_end;
37 public JsRender.NodeProp? prop;
38 public JsRender.JsRender? file;
39 public JsRender.Node node;
40 public signal void save ();
41 public string activeEditor;
47 this.el = new Gtk.Box( Gtk.Orientation.VERTICAL, 0 );
53 this.searchcontext = null;
54 this.last_search_end = 0;
58 this.activeEditor = "";
61 this.el.homogeneous = false;
62 this.el.hexpand = true;
63 this.el.vexpand = true;
64 var child_0 = new Xcls_Box2( _this );
66 this.el.pack_start ( child_0.el , false,true );
67 var child_1 = new Xcls_RightEditor( _this );
69 this.el.add( child_1.el );
70 var child_2 = new Xcls_Box12( _this );
72 this.el.add( child_2.el );
75 // user defined functions
76 public bool saveContents () {
79 if (_this.file == null) {
85 var str = _this.buffer.toString();
87 _this.buffer.checkSyntax();
91 // LeftPanel.model.changed( str , false);
93 _this.save_button.el.sensitive = false;
95 // find the text for the node..
96 if (_this.file.xtype != "PlainFile") {
97 // in theory these properties have to exist!?!
99 this.window.windowstate.left_props.reload();
101 _this.file.setSource( str );
110 public void forwardSearch (bool change_focus) {
112 if (this.searchcontext == null) {
116 Gtk.TextIter beg, st,en;
117 bool has_wrapped_around;
118 this.buffer.el.get_iter_at_offset(out beg, this.last_search_end);
119 if (!this.searchcontext.forward2(beg, out st, out en, out has_wrapped_around)) {
121 this.last_search_end = 0; // not sure if this should happen
123 if (has_wrapped_around) {
127 this.last_search_end = en.get_offset();
129 this.view.el.grab_focus();
131 this.buffer.el.place_cursor(st);
132 this.view.el.scroll_to_iter(st, 0.1f, true, 0.0f, 0.5f);
136 public void show (JsRender.JsRender file, JsRender.Node? node, JsRender.NodeProp? prop)
141 if (file.xtype != "PlainFile") {
145 // find the text for the node..
146 this.view.load( prop.val );
147 this.close_btn.el.show();
150 this.view.load( file.toSource() );
151 this.close_btn.el.hide();
155 public void backSearch (bool change_focus) {
157 if (this.searchcontext == null) {
161 Gtk.TextIter beg, st,en;
162 bool has_wrapped_around;
163 this.buffer.el.get_iter_at_offset(out beg, this.last_search_end -1 );
165 if (!this.searchcontext.backward2(beg, out st, out en, out has_wrapped_around)) {
167 this.last_search_end = 0;
169 this.last_search_end = en.get_offset();
171 this.view.el.grab_focus();
173 this.buffer.el.place_cursor(st);
174 this.view.el.scroll_to_iter(st, 0.1f, true, 0.0f, 0.5f);
178 public int search (string in_txt) {
180 var s = new Gtk.SourceSearchSettings();
181 s.case_sensitive = _this.case_sensitive.el.active;
182 s.regex_enabled = _this.regex.el.active;
183 s.wrap_around = false;
185 this.searchcontext = new Gtk.SourceSearchContext(this.buffer.el,s);
186 this.searchcontext.set_highlight(true);
189 if (_this.multiline.el.active) {
190 txt = in_txt.replace("\\n", "\n");
193 s.set_search_text(txt);
194 Gtk.TextIter beg, st,en;
196 this.buffer.el.get_start_iter(out beg);
197 this.searchcontext.forward(beg, out st, out en);
198 this.last_search_end = 0;
200 return this.searchcontext.get_occurrences_count();
206 public void reset () {
211 this.searchcontext = null;
214 public void scroll_to_line (int line) {
216 GLib.Timeout.add(500, () => {
218 var buf = this.view.el.get_buffer();
220 var sbuf = (Gtk.SourceBuffer) buf;
224 sbuf.get_iter_at_line(out iter, line);
225 this.view.el.scroll_to_iter(iter, 0.1f, true, 0.0f, 0.5f);
229 public class Xcls_Box2 : Object
232 private Editor _this;
238 public Xcls_Box2(Editor _owner )
241 this.el = new Gtk.Box( Gtk.Orientation.HORIZONTAL, 0 );
245 // set gobject values
246 this.el.homogeneous = false;
247 var child_0 = new Xcls_save_button( _this );
249 this.el.add ( child_0.el );
250 var child_1 = new Xcls_Label5( _this );
252 this.el.add ( child_1.el );
253 var child_2 = new Xcls_Scale6( _this );
255 this.el.add ( child_2.el );
256 var child_3 = new Xcls_close_btn( _this );
258 this.el.add ( child_3.el );
261 // user defined functions
263 public class Xcls_save_button : Object
265 public Gtk.Button el;
266 private Editor _this;
272 public Xcls_save_button(Editor _owner )
275 _this.save_button = this;
276 this.el = new Gtk.Button();
280 // set gobject values
281 this.el.always_show_image = true;
282 this.el.label = "Save";
283 var child_0 = new Xcls_Image4( _this );
285 this.el.image = child_0.el;
288 this.el.clicked.connect( () => {
289 _this.saveContents();
293 // user defined functions
295 public class Xcls_Image4 : Object
298 private Editor _this;
304 public Xcls_Image4(Editor _owner )
307 this.el = new Gtk.Image();
311 // set gobject values
312 this.el.icon_name = "document-save";
315 // user defined functions
319 public class Xcls_Label5 : Object
322 private Editor _this;
328 public Xcls_Label5(Editor _owner )
331 this.el = new Gtk.Label( null );
335 // set gobject values
336 this.el.hexpand = true;
339 // user defined functions
342 public class Xcls_Scale6 : Object
345 private Editor _this;
351 public Xcls_Scale6(Editor _owner )
354 this.el = new Gtk.Scale.with_range (Gtk.Orientation.HORIZONTAL,6, 30, 1);
358 // set gobject values
359 this.el.width_request = 200;
360 this.el.has_origin = true;
361 this.el.draw_value = true;
363 this.el.sensitive = true;
368 this.el.set_range(6,30);
369 this.el.set_value(8);
373 this.el.change_value.connect( (st, val ) => {
376 _this.view.css.load_from_data(
377 "#editor-view { font: %dpx Monospace; }".printf((int)val)
384 // user defined functions
387 public class Xcls_close_btn : Object
389 public Gtk.Button el;
390 private Editor _this;
396 public Xcls_close_btn(Editor _owner )
399 _this.close_btn = this;
400 this.el = new Gtk.Button();
404 // set gobject values
405 this.el.always_show_image = true;
406 var child_0 = new Xcls_Image8( _this );
408 this.el.image = child_0.el;
411 this.el.clicked.connect( () => {
412 _this.saveContents();
413 _this.window.windowstate.switchState(WindowState.State.PREVIEW);
417 // user defined functions
419 public class Xcls_Image8 : Object
422 private Editor _this;
428 public Xcls_Image8(Editor _owner )
431 this.el = new Gtk.Image();
435 // set gobject values
436 this.el.icon_name = "window-close";
439 // user defined functions
444 public class Xcls_RightEditor : Object
446 public Gtk.ScrolledWindow el;
447 private Editor _this;
453 public Xcls_RightEditor(Editor _owner )
456 _this.RightEditor = this;
457 this.el = new Gtk.ScrolledWindow( null, null );
461 // set gobject values
462 this.el.vexpand = true;
463 var child_0 = new Xcls_view( _this );
465 this.el.add ( child_0.el );
469 this.el.set_policy(Gtk.PolicyType.AUTOMATIC, Gtk.PolicyType.AUTOMATIC);
472 // user defined functions
474 public class Xcls_view : Object
476 public Gtk.SourceView el;
477 private Editor _this;
481 public Gtk.CssProvider css;
484 public Xcls_view(Editor _owner )
488 this.el = new Gtk.SourceView();
493 // set gobject values
494 this.el.auto_indent = true;
495 this.el.indent_width = 4;
496 this.el.name = "editor-view";
497 this.el.show_line_marks = true;
498 this.el.insert_spaces_instead_of_tabs = true;
499 this.el.show_line_numbers = true;
500 this.el.tab_width = 4;
501 this.el.highlight_current_line = true;
502 var child_0 = new Xcls_buffer( _this );
504 this.el.set_buffer ( child_0.el );
508 this.css = new Gtk.CssProvider();
510 this.css.load_from_data("#editor-view { font: 10px Monospace;}");
512 this.el.get_style_context().add_provider(this.css,Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION);
517 this.el.completion.add_provider(new Palete.CompletionProvider(_this));
518 } catch (GLib.Error e) {}
520 this.el.completion.unblock_interactive();
521 this.el.completion.select_on_show = true; // select
522 this.el.completion.show_headers = false;
523 this.el.completion.remember_info_visibility = true;
526 var attrs = new Gtk.SourceMarkAttributes();
527 var pink = Gdk.RGBA();
528 pink.parse ( "pink");
529 attrs.set_background ( pink);
530 attrs.set_icon_name ( "process-stop");
531 attrs.query_tooltip_text.connect(( mark) => {
532 //print("tooltip query? %s\n", mark.name);
536 this.el.set_mark_attributes ("ERR", attrs, 1);
538 var wattrs = new Gtk.SourceMarkAttributes();
539 var blue = Gdk.RGBA();
540 blue.parse ( "#ABF4EB");
541 wattrs.set_background ( blue);
542 wattrs.set_icon_name ( "process-stop");
543 wattrs.query_tooltip_text.connect(( mark) => {
544 //print("tooltip query? %s\n", mark.name);
548 this.el.set_mark_attributes ("WARN", wattrs, 1);
552 var dattrs = new Gtk.SourceMarkAttributes();
553 var purple = Gdk.RGBA();
554 purple.parse ( "#EEA9FF");
555 dattrs.set_background ( purple);
556 dattrs.set_icon_name ( "process-stop");
557 dattrs.query_tooltip_text.connect(( mark) => {
558 //print("tooltip query? %s\n", mark.name);
562 this.el.set_mark_attributes ("DEPR", dattrs, 1);
565 this.el.get_space_drawer().set_matrix(null);
566 this.el.get_space_drawer().set_types_for_locations(
567 Gtk.SourceSpaceLocationFlags.ALL,
568 Gtk.SourceSpaceTypeFlags.ALL
570 this.el.get_space_drawer().set_enable_matrix(true);
572 Gtk.SourceDrawSpacesFlags.LEADING +
573 Gtk.SourceDrawSpacesFlags.TRAILING +
574 Gtk.SourceDrawSpacesFlags.TAB +
575 Gtk.SourceDrawSpacesFlags.SPACE
579 this.el.key_release_event.connect( (event) => {
581 if (event.keyval == Gdk.Key.s && (event.state & Gdk.ModifierType.CONTROL_MASK ) > 0 ) {
582 GLib.debug("SAVE: ctrl-S pressed");
583 _this.saveContents();
587 if (event.keyval == Gdk.Key.g && (event.state & Gdk.ModifierType.CONTROL_MASK ) > 0 ) {
588 GLib.debug("SAVE: ctrl-g pressed");
589 _this.forwardSearch(true);
592 if (event.keyval == Gdk.Key.f && (event.state & Gdk.ModifierType.CONTROL_MASK ) > 0 ) {
593 GLib.debug("SAVE: ctrl-f pressed");
594 _this.search_entry.el.grab_focus();
598 // print(event.key.keyval)
605 // user defined functions
606 public void load (string str) {
608 // show the help page for the active node..
609 //this.get('/Help').show();
612 // this.get('/BottomPane').el.set_current_page(0);
613 var buf = (Gtk.SourceBuffer)this.el.get_buffer();
614 buf.set_text(str, str.length);
615 buf.set_undo_manager(null);
617 var lm = Gtk.SourceLanguageManager.get_default();
619 if (_this.file != null) {
620 lang = _this.file.language;
622 print("lang=%s, content_type = %s\n", lang, _this.file.content_type);
623 var lg = _this.file.content_type.length > 0 ?
624 lm.guess_language(_this.file.path, _this.file.content_type) :
625 lm.get_language(lang);
628 ((Gtk.SourceBuffer)(this.el.get_buffer())) .set_language(lg);
630 this.el.insert_spaces_instead_of_tabs = true;
632 print("sourcelanguage = %s\n", lg.name);
633 if (lg.name == "Vala") {
634 this.el.insert_spaces_instead_of_tabs = false;
638 this.el.grab_focus();
639 _this.save_button.el.sensitive = false;
642 public class Xcls_buffer : Object
644 public Gtk.SourceBuffer el;
645 private Editor _this;
649 public int error_line;
650 public bool check_queued;
651 public bool check_running;
654 public Xcls_buffer(Editor _owner )
658 this.el = new Gtk.SourceBuffer( null );
661 this.error_line = -1;
662 this.check_queued = false;
663 this.check_running = false;
665 // set gobject values
668 this.el.changed.connect( () => {
671 _this.save_button.el.sensitive = true;
672 print("EDITOR CHANGED");
677 // this.get('/LeftPanel.model').changed( str , false);
682 // user defined functions
683 public bool checkSyntax () {
685 if (this.check_running) {
686 print("Check is running\n");
687 if (this.check_queued) {
688 print("Check is already queued");
691 this.check_queued = true;
692 print("Adding queued Check ");
693 GLib.Timeout.add_seconds(1, () => {
694 this.check_queued = false;
703 var str = this.toString();
706 if (this.error_line > 0) {
709 this.el.get_bounds (out start, out end);
711 this.el.remove_source_marks (start, end, null);
713 if (str.length < 1) {
714 print("checkSyntax - empty string?\n");
718 if (_this.file.xtype == "PlainFile") {
720 // assume it's gtk...
721 this.check_running = true;
723 if (!BuilderApplication.valasource.checkPlainFileSpawn(
727 this.check_running = false;
733 if (_this.file == null) {
736 var p = _this.file.project.palete;
740 this.check_running = true;
743 if (_this.file.language == "js") {
744 this.check_running = false;
745 print("calling validate javascript\n");
746 Gee.HashMap<int,string> errors;
747 p.javascriptHasErrors(
748 _this.window.windowstate,
751 _this.file, // no reference not node?
754 return this.highlightErrors(errors);
759 print("calling validate vala\n");
760 // clear the buttons.
763 if (! BuilderApplication.valasource.checkFileWithNodePropChange(
769 this.check_running = false;
774 //print("done mark line\n");
776 return true; // at present allow saving - even if it's invalid..
778 public bool highlightErrorsJson (string type, Json.Object obj) {
781 this.el.get_bounds (out start, out end);
783 this.el.remove_source_marks (start, end, type);
786 // we should highlight other types of errors..
788 if (!obj.has_member(type)) {
789 print("Return has no errors\n");
793 if (_this.window.windowstate.state != WindowState.State.CODEONLY
800 var err = obj.get_object_member(type);
803 if (_this.file == null) {
807 var valafn = _this.file.path;
809 if (_this.file.xtype != "PlainFile") {
816 var regex = new Regex("\\.bjs$");
820 valafn = regex.replace(_this.file.path,_this.file.path.length , 0 , ".vala");
821 } catch (GLib.RegexError e) {
828 if (!err.has_member(valafn)) {
829 print("File path has no errors\n");
833 var lines = err.get_object_member(valafn);
836 if (obj.has_member("line_offset")) {
837 offset = (int)obj.get_int_member("line_offset") + 1;
843 var tlines = this.el.get_line_count () +1;
845 lines.foreach_member((obj, line, node) => {
848 // print("get inter\n");
849 var eline = int.parse(line) - offset;
850 print("GOT ERROR on line %s -- converted to %d\n", line,eline);
853 if (eline > tlines || eline < 0) {
856 this.el.get_iter_at_line( out iter, eline);
857 //print("mark line\n");
858 var msg = "Line: %d".printf(eline+1);
859 var ar = lines.get_array_member(line);
860 for (var i = 0 ; i < ar.get_length(); i++) {
861 msg += (msg.length > 0) ? "\n" : "";
862 msg += ar.get_string_element(i);
866 this.el.create_source_mark(msg, type, iter);
875 public bool highlightErrors ( Gee.HashMap<int,string> validate_res) {
877 this.error_line = validate_res.size;
879 if (this.error_line < 1) {
882 var tlines = this.el.get_line_count ();
884 var valiter = validate_res.map_iterator();
885 while (valiter.next()) {
887 // print("get inter\n");
888 var eline = valiter.get_key();
889 if (eline > tlines) {
892 this.el.get_iter_at_line( out iter, eline);
893 //print("mark line\n");
894 this.el.create_source_mark(valiter.get_value(), "ERR", iter);
898 public string toString () {
902 this.el.get_start_iter(out s);
903 this.el.get_end_iter(out e);
904 var ret = this.el.get_text(s,e,true);
905 //print("TO STRING? " + ret);
912 public class Xcls_Box12 : Object
915 private Editor _this;
921 public Xcls_Box12(Editor _owner )
924 this.el = new Gtk.Box( Gtk.Orientation.HORIZONTAL, 0 );
928 // set gobject values
929 this.el.homogeneous = false;
930 this.el.vexpand = false;
931 var child_0 = new Xcls_search_entry( _this );
933 this.el.add( child_0.el );
934 var child_1 = new Xcls_MenuBar14( _this );
936 this.el.add ( child_1.el );
937 var child_2 = new Xcls_nextBtn( _this );
939 this.el.add( child_2.el );
940 var child_3 = new Xcls_backBtn( _this );
942 this.el.add( child_3.el );
943 var child_4 = new Xcls_MenuButton20( _this );
945 this.el.add( child_4.el );
948 // user defined functions
950 public class Xcls_search_entry : Object
952 public Gtk.SearchEntry el;
953 private Editor _this;
959 public Xcls_search_entry(Editor _owner )
962 _this.search_entry = this;
963 this.el = new Gtk.SearchEntry();
967 // set gobject values
968 this.el.width_request = 300;
969 this.el.hexpand = true;
970 this.el.placeholder_text = "Press enter to search";
974 var description = Pango.FontDescription.from_string("monospace");
975 description.set_size(8000);
976 this.el.set_property("font-desc",description);
979 this.el.key_press_event.connect( (event) => {
980 if (event.keyval == Gdk.Key.g && (event.state & Gdk.ModifierType.CONTROL_MASK ) > 0 ) {
981 GLib.debug("SAVE: ctrl-g pressed");
982 _this.forwardSearch(true);
987 if (event.keyval == Gdk.Key.Return && this.el.text.length > 0) {
989 _this.search(this.el.text);
990 _this.search_results.updateResults();
992 GLib.Timeout.add_seconds(2,() => {
993 _this.search_results.updateResults();
1001 // print(event.key.keyval)
1006 this.el.changed.connect( () => {
1008 if (this.el.text == "") {
1009 _this.search_results.el.hide();
1013 switch(_this.windowstate.state) {
1014 case WindowState.State.CODEONLY:
1015 ///case WindowState.State.CODE:
1016 // search the code being edited..
1017 res = _this.windowstate.code_editor_tab.search(this.el.text);
1020 case WindowState.State.PREVIEW:
1021 if (_this.windowstate.file.xtype == "Gtk") {
1022 res = _this.windowstate.window_gladeview.search(this.el.text);
1024 res = _this.windowstate.window_rooview.search(this.el.text);
1030 _this.search_results.el.show();
1032 _this.search_results.el.label = "%d Matches".printf(res);
1034 _this.search_results.el.label = "No Matches";
1042 // user defined functions
1043 public void forwardSearch (bool change_focus) {
1046 _this.forwardSearch(change_focus);
1050 switch(_this.windowstate.state) {
1051 case WindowState.State.CODEONLY:
1052 //case WindowState.State.CODE:
1053 // search the code being edited..
1054 _this.windowstate.code_editor_tab.forwardSearch(change_focus);
1057 case WindowState.State.PREVIEW:
1058 if (_this.windowstate.file.xtype == "Gtk") {
1059 _this.windowstate.window_gladeview.forwardSearch(change_focus);
1061 _this.windowstate.window_rooview.forwardSearch(change_focus);
1071 public class Xcls_MenuBar14 : Object
1073 public Gtk.MenuBar el;
1074 private Editor _this;
1080 public Xcls_MenuBar14(Editor _owner )
1083 this.el = new Gtk.MenuBar();
1087 // set gobject values
1088 var child_0 = new Xcls_search_results( _this );
1090 this.el.add ( child_0.el );
1093 // user defined functions
1095 public class Xcls_search_results : Object
1097 public Gtk.MenuItem el;
1098 private Editor _this;
1102 public bool always_show_image;
1105 public Xcls_search_results(Editor _owner )
1108 _this.search_results = this;
1109 this.el = new Gtk.MenuItem();
1112 this.always_show_image = true;
1114 // set gobject values
1115 this.el.visible = false;
1119 this.el.button_press_event.connect( () => {
1121 if (this.popup == null) {
1122 this.popup = new Xcls_ValaCompileErrors();
1123 this.popup.window = _this;
1127 this.popup.show(this.notices, this.el);
1133 // user defined functions
1134 public void updateResults () {
1135 this.el.visible = true;
1137 var res = _this.searchcontext.get_occurrences_count();
1139 _this.search_results.el.label = "??? Matches";
1143 _this.nextBtn.el.sensitive = false;
1144 _this.backBtn.el.sensitive = false;
1147 _this.search_results.el.label = "%d Matches".printf(res);
1148 _this.nextBtn.el.sensitive = true;
1149 _this.backBtn.el.sensitive = true;
1152 _this.search_results.el.label = "No Matches";
1158 public class Xcls_nextBtn : Object
1160 public Gtk.Button el;
1161 private Editor _this;
1167 public Xcls_nextBtn(Editor _owner )
1170 _this.nextBtn = this;
1171 this.el = new Gtk.Button();
1175 // set gobject values
1176 this.el.always_show_image = true;
1177 this.el.label = "Next";
1178 this.el.sensitive = false;
1179 var child_0 = new Xcls_Image17( _this );
1181 this.el.image = child_0.el;
1184 this.el.button_press_event.connect( (event) => {
1186 _this.forwardSearch(true);
1192 // user defined functions
1194 public class Xcls_Image17 : Object
1196 public Gtk.Image el;
1197 private Editor _this;
1203 public Xcls_Image17(Editor _owner )
1206 this.el = new Gtk.Image();
1210 // set gobject values
1211 this.el.icon_name = "go-down";
1214 // user defined functions
1218 public class Xcls_backBtn : Object
1220 public Gtk.Button el;
1221 private Editor _this;
1227 public Xcls_backBtn(Editor _owner )
1230 _this.backBtn = this;
1231 this.el = new Gtk.Button();
1235 // set gobject values
1236 this.el.always_show_image = true;
1237 this.el.label = "Previous";
1238 this.el.sensitive = false;
1239 var child_0 = new Xcls_Image19( _this );
1241 this.el.image = child_0.el;
1244 this.el.button_press_event.connect( (event) => {
1246 _this.backSearch(true);
1252 // user defined functions
1254 public class Xcls_Image19 : Object
1256 public Gtk.Image el;
1257 private Editor _this;
1263 public Xcls_Image19(Editor _owner )
1266 this.el = new Gtk.Image();
1270 // set gobject values
1271 this.el.icon_name = "go-up";
1274 // user defined functions
1278 public class Xcls_MenuButton20 : Object
1280 public Gtk.MenuButton el;
1281 private Editor _this;
1287 public Xcls_MenuButton20(Editor _owner )
1290 this.el = new Gtk.MenuButton();
1294 // set gobject values
1295 this.el.always_show_image = true;
1296 this.el.label = "Settings";
1297 var child_0 = new Xcls_Image21( _this );
1299 this.el.image = child_0.el;
1300 var child_1 = new Xcls_search_settings( _this );
1302 this.el.popup = child_1.el;
1305 // user defined functions
1307 public class Xcls_Image21 : Object
1309 public Gtk.Image el;
1310 private Editor _this;
1316 public Xcls_Image21(Editor _owner )
1319 this.el = new Gtk.Image();
1323 // set gobject values
1324 this.el.icon_name = "emblem-system";
1327 // user defined functions
1330 public class Xcls_search_settings : Object
1333 private Editor _this;
1339 public Xcls_search_settings(Editor _owner )
1342 _this.search_settings = this;
1343 this.el = new Gtk.Menu();
1347 // set gobject values
1348 var child_0 = new Xcls_case_sensitive( _this );
1350 this.el.append( child_0.el );
1351 var child_1 = new Xcls_regex( _this );
1353 this.el.append( child_1.el );
1354 var child_2 = new Xcls_multiline( _this );
1356 this.el.append( child_2.el );
1359 // user defined functions
1361 public class Xcls_case_sensitive : Object
1363 public Gtk.CheckMenuItem el;
1364 private Editor _this;
1370 public Xcls_case_sensitive(Editor _owner )
1373 _this.case_sensitive = this;
1374 this.el = new Gtk.CheckMenuItem();
1378 // set gobject values
1379 this.el.label = "Case Sensitive";
1389 // user defined functions
1392 public class Xcls_regex : Object
1394 public Gtk.CheckMenuItem el;
1395 private Editor _this;
1401 public Xcls_regex(Editor _owner )
1405 this.el = new Gtk.CheckMenuItem();
1409 // set gobject values
1410 this.el.label = "Regex";
1420 // user defined functions
1423 public class Xcls_multiline : Object
1425 public Gtk.CheckMenuItem el;
1426 private Editor _this;
1432 public Xcls_multiline(Editor _owner )
1435 _this.multiline = this;
1436 this.el = new Gtk.CheckMenuItem();
1440 // set gobject values
1441 this.el.label = "Multi-line (add \\n)";
1451 // user defined functions