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_HScale6( _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_HScale6 : Object
344 public Gtk.HScale el;
345 private Editor _this;
351 public Xcls_HScale6(Editor _owner )
354 this.el = new Gtk.HScale.with_range (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 ) => {
375 var description = Pango.FontDescription.from_string("monospace");
376 print("resize to %d", (int)val*1000);
377 description.set_size((int)val*1000);
378 _this.view.el.override_font(description);
383 // user defined functions
386 public class Xcls_close_btn : Object
388 public Gtk.Button el;
389 private Editor _this;
395 public Xcls_close_btn(Editor _owner )
398 _this.close_btn = this;
399 this.el = new Gtk.Button();
403 // set gobject values
404 this.el.always_show_image = true;
405 var child_0 = new Xcls_Image8( _this );
407 this.el.image = child_0.el;
410 this.el.clicked.connect( () => {
411 _this.saveContents();
412 _this.window.windowstate.switchState(WindowState.State.PREVIEW);
416 // user defined functions
418 public class Xcls_Image8 : Object
421 private Editor _this;
427 public Xcls_Image8(Editor _owner )
430 this.el = new Gtk.Image();
434 // set gobject values
435 this.el.icon_name = "window-close";
438 // user defined functions
443 public class Xcls_RightEditor : Object
445 public Gtk.ScrolledWindow el;
446 private Editor _this;
452 public Xcls_RightEditor(Editor _owner )
455 _this.RightEditor = this;
456 this.el = new Gtk.ScrolledWindow( null, null );
460 // set gobject values
461 this.el.vexpand = true;
462 var child_0 = new Xcls_view( _this );
464 this.el.add ( child_0.el );
468 this.el.set_policy(Gtk.PolicyType.AUTOMATIC, Gtk.PolicyType.AUTOMATIC);
471 // user defined functions
473 public class Xcls_view : Object
475 public Gtk.SourceView el;
476 private Editor _this;
482 public Xcls_view(Editor _owner )
486 this.el = new Gtk.SourceView();
490 // set gobject values
491 this.el.auto_indent = true;
492 this.el.indent_width = 4;
493 this.el.show_line_marks = true;
494 this.el.insert_spaces_instead_of_tabs = true;
495 this.el.show_line_numbers = true;
496 this.el.draw_spaces = Gtk.SourceDrawSpacesFlags.LEADING + Gtk.SourceDrawSpacesFlags.TRAILING + Gtk.SourceDrawSpacesFlags.TAB + Gtk.SourceDrawSpacesFlags.SPACE;
497 this.el.tab_width = 4;
498 this.el.highlight_current_line = true;
499 var child_0 = new Xcls_buffer( _this );
501 this.el.set_buffer ( child_0.el );
505 var description = Pango.FontDescription.from_string("monospace");
506 description.set_size(8000);
508 this.el.override_font(description);
511 this.el.completion.add_provider(new Palete.CompletionProvider(_this));
512 } catch (GLib.Error e) {}
514 this.el.completion.unblock_interactive();
515 this.el.completion.select_on_show = true; // select
516 this.el.completion.show_headers = false;
517 this.el.completion.remember_info_visibility = true;
520 var attrs = new Gtk.SourceMarkAttributes();
521 var pink = Gdk.RGBA();
522 pink.parse ( "pink");
523 attrs.set_background ( pink);
524 attrs.set_icon_name ( "process-stop");
525 attrs.query_tooltip_text.connect(( mark) => {
526 //print("tooltip query? %s\n", mark.name);
530 this.el.set_mark_attributes ("ERR", attrs, 1);
532 var wattrs = new Gtk.SourceMarkAttributes();
533 var blue = Gdk.RGBA();
534 blue.parse ( "#ABF4EB");
535 wattrs.set_background ( blue);
536 wattrs.set_icon_name ( "process-stop");
537 wattrs.query_tooltip_text.connect(( mark) => {
538 //print("tooltip query? %s\n", mark.name);
542 this.el.set_mark_attributes ("WARN", wattrs, 1);
546 var dattrs = new Gtk.SourceMarkAttributes();
547 var purple = Gdk.RGBA();
548 purple.parse ( "#EEA9FF");
549 dattrs.set_background ( purple);
550 dattrs.set_icon_name ( "process-stop");
551 dattrs.query_tooltip_text.connect(( mark) => {
552 //print("tooltip query? %s\n", mark.name);
556 this.el.set_mark_attributes ("DEPR", dattrs, 1);
559 this.el.key_release_event.connect( (event) => {
561 if (event.keyval == Gdk.Key.s && (event.state & Gdk.ModifierType.CONTROL_MASK ) > 0 ) {
562 GLib.debug("SAVE: ctrl-S pressed");
563 _this.saveContents();
567 if (event.keyval == Gdk.Key.g && (event.state & Gdk.ModifierType.CONTROL_MASK ) > 0 ) {
568 GLib.debug("SAVE: ctrl-g pressed");
569 _this.forwardSearch(true);
572 if (event.keyval == Gdk.Key.f && (event.state & Gdk.ModifierType.CONTROL_MASK ) > 0 ) {
573 GLib.debug("SAVE: ctrl-f pressed");
574 _this.search_entry.el.grab_focus();
578 // print(event.key.keyval)
585 // user defined functions
586 public void load (string str) {
588 // show the help page for the active node..
589 //this.get('/Help').show();
592 // this.get('/BottomPane').el.set_current_page(0);
593 var buf = (Gtk.SourceBuffer)this.el.get_buffer();
594 buf.set_text(str, str.length);
595 buf.set_undo_manager(null);
597 var lm = Gtk.SourceLanguageManager.get_default();
599 if (_this.file != null) {
600 lang = _this.file.language;
602 print("lang=%s, content_type = %s\n", lang, _this.file.content_type);
603 var lg = _this.file.content_type.length > 0 ?
604 lm.guess_language(_this.file.path, _this.file.content_type) :
605 lm.get_language(lang);
608 ((Gtk.SourceBuffer)(this.el.get_buffer())) .set_language(lg);
610 this.el.insert_spaces_instead_of_tabs = true;
612 print("sourcelanguage = %s\n", lg.name);
613 if (lg.name == "Vala") {
614 this.el.insert_spaces_instead_of_tabs = false;
618 this.el.grab_focus();
619 _this.save_button.el.sensitive = false;
622 public class Xcls_buffer : Object
624 public Gtk.SourceBuffer el;
625 private Editor _this;
629 public int error_line;
630 public bool check_queued;
631 public bool check_running;
634 public Xcls_buffer(Editor _owner )
638 this.el = new Gtk.SourceBuffer( null );
641 this.error_line = -1;
642 this.check_queued = false;
643 this.check_running = false;
645 // set gobject values
648 this.el.changed.connect( () => {
651 _this.save_button.el.sensitive = true;
652 print("EDITOR CHANGED");
657 // this.get('/LeftPanel.model').changed( str , false);
662 // user defined functions
663 public bool checkSyntax () {
665 if (this.check_running) {
666 print("Check is running\n");
667 if (this.check_queued) {
668 print("Check is already queued");
671 this.check_queued = true;
672 print("Adding queued Check ");
673 GLib.Timeout.add_seconds(1, () => {
674 this.check_queued = false;
683 var str = this.toString();
686 if (this.error_line > 0) {
689 this.el.get_bounds (out start, out end);
691 this.el.remove_source_marks (start, end, null);
693 if (str.length < 1) {
694 print("checkSyntax - empty string?\n");
698 if (_this.file.xtype == "PlainFile") {
700 // assume it's gtk...
701 this.check_running = true;
703 if (!BuilderApplication.valasource.checkPlainFileSpawn(
707 this.check_running = false;
713 if (_this.file == null) {
716 var p = _this.file.project.palete;
720 this.check_running = true;
723 if (_this.file.language == "js") {
724 this.check_running = false;
725 print("calling validate javascript\n");
726 Gee.HashMap<int,string> errors;
727 p.javascriptHasErrors(
728 _this.window.windowstate,
731 _this.file, // no reference not node?
734 return this.highlightErrors(errors);
739 print("calling validate vala\n");
740 // clear the buttons.
743 if (! BuilderApplication.valasource.checkFileWithNodePropChange(
749 this.check_running = false;
754 //print("done mark line\n");
756 return true; // at present allow saving - even if it's invalid..
758 public bool highlightErrorsJson (string type, Json.Object obj) {
761 this.el.get_bounds (out start, out end);
763 this.el.remove_source_marks (start, end, type);
766 // we should highlight other types of errors..
768 if (!obj.has_member(type)) {
769 print("Return has no errors\n");
773 if (_this.window.windowstate.state != WindowState.State.CODEONLY
780 var err = obj.get_object_member(type);
783 if (_this.file == null) {
787 var valafn = _this.file.path;
789 if (_this.file.xtype != "PlainFile") {
796 var regex = new Regex("\\.bjs$");
800 valafn = regex.replace(_this.file.path,_this.file.path.length , 0 , ".vala");
801 } catch (GLib.RegexError e) {
808 if (!err.has_member(valafn)) {
809 print("File path has no errors\n");
813 var lines = err.get_object_member(valafn);
816 if (obj.has_member("line_offset")) {
817 offset = (int)obj.get_int_member("line_offset") + 1;
823 var tlines = this.el.get_line_count () +1;
825 lines.foreach_member((obj, line, node) => {
828 // print("get inter\n");
829 var eline = int.parse(line) - offset;
830 print("GOT ERROR on line %s -- converted to %d\n", line,eline);
833 if (eline > tlines || eline < 0) {
836 this.el.get_iter_at_line( out iter, eline);
837 //print("mark line\n");
838 var msg = "Line: %d".printf(eline+1);
839 var ar = lines.get_array_member(line);
840 for (var i = 0 ; i < ar.get_length(); i++) {
841 msg += (msg.length > 0) ? "\n" : "";
842 msg += ar.get_string_element(i);
846 this.el.create_source_mark(msg, type, iter);
855 public bool highlightErrors ( Gee.HashMap<int,string> validate_res) {
857 this.error_line = validate_res.size;
859 if (this.error_line < 1) {
862 var tlines = this.el.get_line_count ();
864 var valiter = validate_res.map_iterator();
865 while (valiter.next()) {
867 // print("get inter\n");
868 var eline = valiter.get_key();
869 if (eline > tlines) {
872 this.el.get_iter_at_line( out iter, eline);
873 //print("mark line\n");
874 this.el.create_source_mark(valiter.get_value(), "ERR", iter);
878 public string toString () {
882 this.el.get_start_iter(out s);
883 this.el.get_end_iter(out e);
884 var ret = this.el.get_text(s,e,true);
885 //print("TO STRING? " + ret);
892 public class Xcls_Box12 : Object
895 private Editor _this;
901 public Xcls_Box12(Editor _owner )
904 this.el = new Gtk.Box( Gtk.Orientation.HORIZONTAL, 0 );
908 // set gobject values
909 this.el.homogeneous = false;
910 this.el.vexpand = false;
911 var child_0 = new Xcls_search_entry( _this );
913 this.el.add( child_0.el );
914 var child_1 = new Xcls_MenuBar14( _this );
916 this.el.add ( child_1.el );
917 var child_2 = new Xcls_nextBtn( _this );
919 this.el.add( child_2.el );
920 var child_3 = new Xcls_backBtn( _this );
922 this.el.add( child_3.el );
923 var child_4 = new Xcls_MenuButton20( _this );
925 this.el.add( child_4.el );
928 // user defined functions
930 public class Xcls_search_entry : Object
932 public Gtk.SearchEntry el;
933 private Editor _this;
939 public Xcls_search_entry(Editor _owner )
942 _this.search_entry = this;
943 this.el = new Gtk.SearchEntry();
947 // set gobject values
948 this.el.width_request = 300;
949 this.el.hexpand = true;
950 this.el.placeholder_text = "Press enter to search";
954 var description = Pango.FontDescription.from_string("monospace");
955 description.set_size(8000);
956 this.el.override_font(description);
959 this.el.key_press_event.connect( (event) => {
960 if (event.keyval == Gdk.Key.g && (event.state & Gdk.ModifierType.CONTROL_MASK ) > 0 ) {
961 GLib.debug("SAVE: ctrl-g pressed");
962 _this.forwardSearch(true);
967 if (event.keyval == Gdk.Key.Return && this.el.text.length > 0) {
968 var res = _this.search(this.el.text);
969 _this.search_results.updateResults();
971 GLib.Timeout.add_seconds(2,() => {
972 _this.search_results.updateResults();
980 // print(event.key.keyval)
985 this.el.changed.connect( () => {
987 if (this.el.text == "") {
988 _this.search_results.el.hide();
992 switch(_this.windowstate.state) {
993 case WindowState.State.CODEONLY:
994 ///case WindowState.State.CODE:
995 // search the code being edited..
996 res = _this.windowstate.code_editor_tab.search(this.el.text);
999 case WindowState.State.PREVIEW:
1000 if (_this.windowstate.file.xtype == "Gtk") {
1001 res = _this.windowstate.window_gladeview.search(this.el.text);
1003 res = _this.windowstate.window_rooview.search(this.el.text);
1009 _this.search_results.el.show();
1011 _this.search_results.el.label = "%d Matches".printf(res);
1013 _this.search_results.el.label = "No Matches";
1021 // user defined functions
1022 public void forwardSearch (bool change_focus) {
1025 _this.forwardSearch(change_focus);
1029 switch(_this.windowstate.state) {
1030 case WindowState.State.CODEONLY:
1031 //case WindowState.State.CODE:
1032 // search the code being edited..
1033 _this.windowstate.code_editor_tab.forwardSearch(change_focus);
1036 case WindowState.State.PREVIEW:
1037 if (_this.windowstate.file.xtype == "Gtk") {
1038 _this.windowstate.window_gladeview.forwardSearch(change_focus);
1040 _this.windowstate.window_rooview.forwardSearch(change_focus);
1050 public class Xcls_MenuBar14 : Object
1052 public Gtk.MenuBar el;
1053 private Editor _this;
1059 public Xcls_MenuBar14(Editor _owner )
1062 this.el = new Gtk.MenuBar();
1066 // set gobject values
1067 var child_0 = new Xcls_search_results( _this );
1069 this.el.add ( child_0.el );
1072 // user defined functions
1074 public class Xcls_search_results : Object
1076 public Gtk.ImageMenuItem el;
1077 private Editor _this;
1083 public Xcls_search_results(Editor _owner )
1086 _this.search_results = this;
1087 this.el = new Gtk.ImageMenuItem();
1091 // set gobject values
1092 this.el.always_show_image = true;
1093 this.el.visible = false;
1096 this.el.button_press_event.connect( () => {
1098 if (this.popup == null) {
1099 this.popup = new Xcls_ValaCompileErrors();
1100 this.popup.window = _this;
1104 this.popup.show(this.notices, this.el);
1110 // user defined functions
1111 public void updateResults () {
1112 this.el.visible = true;
1114 var res = _this.searchcontext.get_occurrences_count();
1116 _this.search_results.el.label = "??? Matches";
1120 _this.nextBtn.el.sensitive = false;
1121 _this.backBtn.el.sensitive = false;
1124 _this.search_results.el.label = "%d Matches".printf(res);
1125 _this.nextBtn.el.sensitive = true;
1126 _this.backBtn.el.sensitive = true;
1129 _this.search_results.el.label = "No Matches";
1135 public class Xcls_nextBtn : Object
1137 public Gtk.Button el;
1138 private Editor _this;
1144 public Xcls_nextBtn(Editor _owner )
1147 _this.nextBtn = this;
1148 this.el = new Gtk.Button();
1152 // set gobject values
1153 this.el.always_show_image = true;
1154 this.el.label = "Next";
1155 this.el.sensitive = false;
1156 var child_0 = new Xcls_Image17( _this );
1158 this.el.image = child_0.el;
1161 this.el.button_press_event.connect( (event) => {
1163 _this.forwardSearch(true);
1169 // user defined functions
1171 public class Xcls_Image17 : Object
1173 public Gtk.Image el;
1174 private Editor _this;
1180 public Xcls_Image17(Editor _owner )
1183 this.el = new Gtk.Image();
1187 // set gobject values
1188 this.el.icon_name = "go-down";
1191 // user defined functions
1195 public class Xcls_backBtn : Object
1197 public Gtk.Button el;
1198 private Editor _this;
1204 public Xcls_backBtn(Editor _owner )
1207 _this.backBtn = this;
1208 this.el = new Gtk.Button();
1212 // set gobject values
1213 this.el.always_show_image = true;
1214 this.el.label = "Previous";
1215 this.el.sensitive = false;
1216 var child_0 = new Xcls_Image19( _this );
1218 this.el.image = child_0.el;
1221 this.el.button_press_event.connect( (event) => {
1223 _this.backSearch(true);
1229 // user defined functions
1231 public class Xcls_Image19 : Object
1233 public Gtk.Image el;
1234 private Editor _this;
1240 public Xcls_Image19(Editor _owner )
1243 this.el = new Gtk.Image();
1247 // set gobject values
1248 this.el.icon_name = "go-up";
1251 // user defined functions
1255 public class Xcls_MenuButton20 : Object
1257 public Gtk.MenuButton el;
1258 private Editor _this;
1264 public Xcls_MenuButton20(Editor _owner )
1267 this.el = new Gtk.MenuButton();
1271 // set gobject values
1272 this.el.always_show_image = true;
1273 this.el.label = "Settings";
1274 var child_0 = new Xcls_Image21( _this );
1276 this.el.image = child_0.el;
1277 var child_1 = new Xcls_search_settings( _this );
1279 this.el.popup = child_1.el;
1282 // user defined functions
1284 public class Xcls_Image21 : Object
1286 public Gtk.Image el;
1287 private Editor _this;
1293 public Xcls_Image21(Editor _owner )
1296 this.el = new Gtk.Image();
1300 // set gobject values
1301 this.el.icon_name = "emblem-system";
1304 // user defined functions
1307 public class Xcls_search_settings : Object
1310 private Editor _this;
1316 public Xcls_search_settings(Editor _owner )
1319 _this.search_settings = this;
1320 this.el = new Gtk.Menu();
1324 // set gobject values
1325 var child_0 = new Xcls_case_sensitive( _this );
1327 this.el.append( child_0.el );
1328 var child_1 = new Xcls_regex( _this );
1330 this.el.append( child_1.el );
1331 var child_2 = new Xcls_multiline( _this );
1333 this.el.append( child_2.el );
1336 // user defined functions
1338 public class Xcls_case_sensitive : Object
1340 public Gtk.CheckMenuItem el;
1341 private Editor _this;
1347 public Xcls_case_sensitive(Editor _owner )
1350 _this.case_sensitive = this;
1351 this.el = new Gtk.CheckMenuItem();
1355 // set gobject values
1356 this.el.label = "Case Sensitive";
1365 // user defined functions
1368 public class Xcls_regex : Object
1370 public Gtk.CheckMenuItem el;
1371 private Editor _this;
1377 public Xcls_regex(Editor _owner )
1381 this.el = new Gtk.CheckMenuItem();
1385 // set gobject values
1386 this.el.label = "Regex";
1395 // user defined functions
1398 public class Xcls_multiline : Object
1400 public Gtk.CheckMenuItem el;
1401 private Editor _this;
1407 public Xcls_multiline(Editor _owner )
1410 _this.multiline = this;
1411 this.el = new Gtk.CheckMenuItem();
1415 // set gobject values
1416 this.el.label = "Multi-line (add \\n)";
1425 // user defined functions