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_search_settings search_settings;
23 public Xcls_case_sensitive case_sensitive;
24 public Xcls_regex regex;
25 public Xcls_multiline multiline;
28 public Xcls_MainWindow window;
29 public int pos_root_x;
31 public int pos_root_y;
33 public Gtk.SourceSearchContext searchcontext;
34 public int last_search_end;
35 public JsRender.NodeProp? prop;
36 public JsRender.JsRender? file;
37 public JsRender.Node node;
38 public signal void save ();
39 public string activeEditor;
45 this.el = new Gtk.Box( Gtk.Orientation.VERTICAL, 0 );
51 this.searchcontext = null;
52 this.last_search_end = 0;
56 this.activeEditor = "";
59 this.el.homogeneous = false;
60 this.el.hexpand = true;
61 this.el.vexpand = true;
62 var child_0 = new Xcls_Box2( _this );
64 this.el.pack_start ( child_0.el , false,true );
65 var child_1 = new Xcls_RightEditor( _this );
67 this.el.add( child_1.el );
68 var child_2 = new Xcls_Box12( _this );
70 this.el.add( child_2.el );
73 // user defined functions
74 public bool saveContents () {
77 if (_this.file == null) {
83 var str = _this.buffer.toString();
85 _this.buffer.checkSyntax();
89 // LeftPanel.model.changed( str , false);
91 _this.save_button.el.sensitive = false;
93 // find the text for the node..
94 if (_this.file.xtype != "PlainFile") {
95 // in theory these properties have to exist!?!
97 this.window.windowstate.left_props.reload();
99 _this.file.setSource( str );
108 public void forwardSearch (bool change_focus) {
110 if (this.searchcontext == null) {
114 Gtk.TextIter beg, st,en;
115 bool has_wrapped_around;
116 this.buffer.el.get_iter_at_offset(out beg, this.last_search_end);
117 if (!this.searchcontext.forward2(beg, out st, out en, out has_wrapped_around)) {
119 this.last_search_end = 0; // not sure if this should happen
121 if (has_wrapped_around) {
125 this.last_search_end = en.get_offset();
127 this.view.el.grab_focus();
129 this.buffer.el.place_cursor(st);
130 this.view.el.scroll_to_iter(st, 0.1f, true, 0.0f, 0.5f);
134 public void show (JsRender.JsRender file, JsRender.Node? node, JsRender.NodeProp? prop)
139 if (file.xtype != "PlainFile") {
143 // find the text for the node..
144 this.view.load( prop.val );
145 this.close_btn.el.show();
148 this.view.load( file.toSource() );
149 this.close_btn.el.hide();
153 public void backSearch (bool change_focus) {
155 if (this.searchcontext == null) {
159 Gtk.TextIter beg, st,en;
160 bool has_wrapped_around;
161 this.buffer.el.get_iter_at_offset(out beg, this.last_search_end -1 );
163 if (!this.searchcontext.backward2(beg, out st, out en, out has_wrapped_around)) {
165 this.last_search_end = 0;
167 this.last_search_end = en.get_offset();
169 this.view.el.grab_focus();
171 this.buffer.el.place_cursor(st);
172 this.view.el.scroll_to_iter(st, 0.1f, true, 0.0f, 0.5f);
176 public int search (string in_txt) {
178 var s = new Gtk.SourceSearchSettings();
179 s.case_sensitive = _this.case_sensitive.el.active;
180 s.regex_enabled = _this.regex.el.active;
181 s.wrap_around = false;
183 this.searchcontext = new Gtk.SourceSearchContext(this.buffer.el,s);
184 this.searchcontext.set_highlight(true);
187 if (_this.multiline.el.active) {
188 txt = in_txt.replace("\\n", "\n");
191 s.set_search_text(txt);
192 Gtk.TextIter beg, st,en;
194 this.buffer.el.get_start_iter(out beg);
195 this.searchcontext.forward(beg, out st, out en);
196 this.last_search_end = 0;
198 return this.searchcontext.get_occurrences_count();
204 public void reset () {
209 this.searchcontext = null;
212 public void scroll_to_line (int line) {
214 GLib.Timeout.add(500, () => {
216 var buf = this.view.el.get_buffer();
218 var sbuf = (Gtk.SourceBuffer) buf;
222 sbuf.get_iter_at_line(out iter, line);
223 this.view.el.scroll_to_iter(iter, 0.1f, true, 0.0f, 0.5f);
227 public class Xcls_Box2 : Object
230 private Editor _this;
236 public Xcls_Box2(Editor _owner )
239 this.el = new Gtk.Box( Gtk.Orientation.HORIZONTAL, 0 );
243 // set gobject values
244 this.el.homogeneous = false;
245 var child_0 = new Xcls_save_button( _this );
247 this.el.add ( child_0.el );
248 var child_1 = new Xcls_Label5( _this );
250 this.el.add ( child_1.el );
251 var child_2 = new Xcls_HScale6( _this );
253 this.el.add ( child_2.el );
254 var child_3 = new Xcls_close_btn( _this );
256 this.el.add ( child_3.el );
259 // user defined functions
261 public class Xcls_save_button : Object
263 public Gtk.Button el;
264 private Editor _this;
270 public Xcls_save_button(Editor _owner )
273 _this.save_button = this;
274 this.el = new Gtk.Button();
278 // set gobject values
279 this.el.always_show_image = true;
280 this.el.label = "Save";
281 var child_0 = new Xcls_Image4( _this );
283 this.el.image = child_0.el;
286 this.el.clicked.connect( () => {
287 _this.saveContents();
291 // user defined functions
293 public class Xcls_Image4 : Object
296 private Editor _this;
302 public Xcls_Image4(Editor _owner )
305 this.el = new Gtk.Image();
309 // set gobject values
310 this.el.icon_name = "document-save";
313 // user defined functions
317 public class Xcls_Label5 : Object
320 private Editor _this;
326 public Xcls_Label5(Editor _owner )
329 this.el = new Gtk.Label( null );
333 // set gobject values
334 this.el.hexpand = true;
337 // user defined functions
340 public class Xcls_HScale6 : Object
342 public Gtk.HScale el;
343 private Editor _this;
349 public Xcls_HScale6(Editor _owner )
352 this.el = new Gtk.HScale.with_range (6, 30, 1);
356 // set gobject values
357 this.el.width_request = 200;
358 this.el.has_origin = true;
359 this.el.draw_value = true;
361 this.el.sensitive = true;
366 this.el.set_range(6,30);
367 this.el.set_value(8);
371 this.el.change_value.connect( (st, val ) => {
373 var description = Pango.FontDescription.from_string("monospace");
374 print("resize to %d", (int)val*1000);
375 description.set_size((int)val*1000);
376 _this.view.el.override_font(description);
381 // user defined functions
384 public class Xcls_close_btn : Object
386 public Gtk.Button el;
387 private Editor _this;
393 public Xcls_close_btn(Editor _owner )
396 _this.close_btn = this;
397 this.el = new Gtk.Button();
401 // set gobject values
402 this.el.always_show_image = true;
403 var child_0 = new Xcls_Image8( _this );
405 this.el.image = child_0.el;
408 this.el.clicked.connect( () => {
409 _this.saveContents();
410 _this.window.windowstate.switchState(WindowState.State.PREVIEW);
414 // user defined functions
416 public class Xcls_Image8 : Object
419 private Editor _this;
425 public Xcls_Image8(Editor _owner )
428 this.el = new Gtk.Image();
432 // set gobject values
433 this.el.icon_name = "window-close";
436 // user defined functions
441 public class Xcls_RightEditor : Object
443 public Gtk.ScrolledWindow el;
444 private Editor _this;
450 public Xcls_RightEditor(Editor _owner )
453 _this.RightEditor = this;
454 this.el = new Gtk.ScrolledWindow( null, null );
458 // set gobject values
459 this.el.vexpand = true;
460 var child_0 = new Xcls_view( _this );
462 this.el.add ( child_0.el );
466 this.el.set_policy(Gtk.PolicyType.AUTOMATIC, Gtk.PolicyType.AUTOMATIC);
469 // user defined functions
471 public class Xcls_view : Object
473 public Gtk.SourceView el;
474 private Editor _this;
480 public Xcls_view(Editor _owner )
484 this.el = new Gtk.SourceView();
488 // set gobject values
489 this.el.auto_indent = true;
490 this.el.indent_width = 4;
491 this.el.show_line_marks = true;
492 this.el.insert_spaces_instead_of_tabs = true;
493 this.el.show_line_numbers = true;
494 this.el.draw_spaces = Gtk.SourceDrawSpacesFlags.LEADING + Gtk.SourceDrawSpacesFlags.TRAILING + Gtk.SourceDrawSpacesFlags.TAB + Gtk.SourceDrawSpacesFlags.SPACE;
495 this.el.tab_width = 4;
496 this.el.highlight_current_line = true;
497 var child_0 = new Xcls_buffer( _this );
499 this.el.set_buffer ( child_0.el );
503 var description = Pango.FontDescription.from_string("monospace");
504 description.set_size(8000);
506 this.el.override_font(description);
509 this.el.completion.add_provider(new Palete.CompletionProvider(_this));
510 } catch (GLib.Error e) {}
512 this.el.completion.unblock_interactive();
513 this.el.completion.select_on_show = true; // select
514 this.el.completion.show_headers = false;
515 this.el.completion.remember_info_visibility = true;
518 var attrs = new Gtk.SourceMarkAttributes();
519 var pink = Gdk.RGBA();
520 pink.parse ( "pink");
521 attrs.set_background ( pink);
522 attrs.set_icon_name ( "process-stop");
523 attrs.query_tooltip_text.connect(( mark) => {
524 //print("tooltip query? %s\n", mark.name);
528 this.el.set_mark_attributes ("ERR", attrs, 1);
530 var wattrs = new Gtk.SourceMarkAttributes();
531 var blue = Gdk.RGBA();
532 blue.parse ( "#ABF4EB");
533 wattrs.set_background ( blue);
534 wattrs.set_icon_name ( "process-stop");
535 wattrs.query_tooltip_text.connect(( mark) => {
536 //print("tooltip query? %s\n", mark.name);
540 this.el.set_mark_attributes ("WARN", wattrs, 1);
544 var dattrs = new Gtk.SourceMarkAttributes();
545 var purple = Gdk.RGBA();
546 purple.parse ( "#EEA9FF");
547 dattrs.set_background ( purple);
548 dattrs.set_icon_name ( "process-stop");
549 dattrs.query_tooltip_text.connect(( mark) => {
550 //print("tooltip query? %s\n", mark.name);
554 this.el.set_mark_attributes ("DEPR", dattrs, 1);
557 this.el.key_release_event.connect( (event) => {
559 if (event.keyval == Gdk.Key.s && (event.state & Gdk.ModifierType.CONTROL_MASK ) > 0 ) {
560 GLib.debug("SAVE: ctrl-S pressed");
561 _this.saveContents();
565 if (event.keyval == Gdk.Key.g && (event.state & Gdk.ModifierType.CONTROL_MASK ) > 0 ) {
566 GLib.debug("SAVE: ctrl-g pressed");
567 _this.forwardSearch(true);
571 // print(event.key.keyval)
578 // user defined functions
579 public void load (string str) {
581 // show the help page for the active node..
582 //this.get('/Help').show();
585 // this.get('/BottomPane').el.set_current_page(0);
586 var buf = (Gtk.SourceBuffer)this.el.get_buffer();
587 buf.set_text(str, str.length);
588 buf.set_undo_manager(null);
590 var lm = Gtk.SourceLanguageManager.get_default();
592 if (_this.file != null) {
593 lang = _this.file.language;
595 print("lang=%s, content_type = %s\n", lang, _this.file.content_type);
596 var lg = _this.file.content_type.length > 0 ?
597 lm.guess_language(_this.file.path, _this.file.content_type) :
598 lm.get_language(lang);
601 ((Gtk.SourceBuffer)(this.el.get_buffer())) .set_language(lg);
603 this.el.insert_spaces_instead_of_tabs = true;
605 print("sourcelanguage = %s\n", lg.name);
606 if (lg.name == "Vala") {
607 this.el.insert_spaces_instead_of_tabs = false;
611 this.el.grab_focus();
612 _this.save_button.el.sensitive = false;
615 public class Xcls_buffer : Object
617 public Gtk.SourceBuffer el;
618 private Editor _this;
622 public int error_line;
623 public bool check_queued;
624 public bool check_running;
627 public Xcls_buffer(Editor _owner )
631 this.el = new Gtk.SourceBuffer( null );
634 this.error_line = -1;
635 this.check_queued = false;
636 this.check_running = false;
638 // set gobject values
641 this.el.changed.connect( () => {
644 _this.save_button.el.sensitive = true;
645 print("EDITOR CHANGED");
650 // this.get('/LeftPanel.model').changed( str , false);
655 // user defined functions
656 public bool checkSyntax () {
658 if (this.check_running) {
659 print("Check is running\n");
660 if (this.check_queued) {
661 print("Check is already queued");
664 this.check_queued = true;
665 print("Adding queued Check ");
666 GLib.Timeout.add_seconds(1, () => {
667 this.check_queued = false;
676 var str = this.toString();
679 if (this.error_line > 0) {
682 this.el.get_bounds (out start, out end);
684 this.el.remove_source_marks (start, end, null);
686 if (str.length < 1) {
687 print("checkSyntax - empty string?\n");
691 if (_this.file.xtype == "PlainFile") {
693 // assume it's gtk...
694 this.check_running = true;
696 if (!BuilderApplication.valasource.checkPlainFileSpawn(
700 this.check_running = false;
706 if (_this.file == null) {
709 var p = _this.file.project.palete;
713 this.check_running = true;
716 if (_this.file.language == "js") {
717 this.check_running = false;
718 print("calling validate javascript\n");
719 Gee.HashMap<int,string> errors;
720 p.javascriptHasErrors(
721 _this.window.windowstate,
724 _this.file, // no reference not node?
727 return this.highlightErrors(errors);
732 print("calling validate vala\n");
733 // clear the buttons.
736 if (! BuilderApplication.valasource.checkFileWithNodePropChange(
742 this.check_running = false;
747 //print("done mark line\n");
749 return true; // at present allow saving - even if it's invalid..
751 public bool highlightErrorsJson (string type, Json.Object obj) {
754 this.el.get_bounds (out start, out end);
756 this.el.remove_source_marks (start, end, type);
759 // we should highlight other types of errors..
761 if (!obj.has_member(type)) {
762 print("Return has no errors\n");
766 if (_this.window.windowstate.state != WindowState.State.CODEONLY
773 var err = obj.get_object_member(type);
776 if (_this.file == null) {
780 var valafn = _this.file.path;
782 if (_this.file.xtype != "PlainFile") {
789 var regex = new Regex("\\.bjs$");
793 valafn = regex.replace(_this.file.path,_this.file.path.length , 0 , ".vala");
794 } catch (GLib.RegexError e) {
801 if (!err.has_member(valafn)) {
802 print("File path has no errors\n");
806 var lines = err.get_object_member(valafn);
809 if (obj.has_member("line_offset")) {
810 offset = (int)obj.get_int_member("line_offset") + 1;
816 var tlines = this.el.get_line_count () +1;
818 lines.foreach_member((obj, line, node) => {
821 // print("get inter\n");
822 var eline = int.parse(line) - offset;
823 print("GOT ERROR on line %s -- converted to %d\n", line,eline);
826 if (eline > tlines || eline < 0) {
829 this.el.get_iter_at_line( out iter, eline);
830 //print("mark line\n");
831 var msg = "Line: %d".printf(eline+1);
832 var ar = lines.get_array_member(line);
833 for (var i = 0 ; i < ar.get_length(); i++) {
834 msg += (msg.length > 0) ? "\n" : "";
835 msg += ar.get_string_element(i);
839 this.el.create_source_mark(msg, type, iter);
848 public bool highlightErrors ( Gee.HashMap<int,string> validate_res) {
850 this.error_line = validate_res.size;
852 if (this.error_line < 1) {
855 var tlines = this.el.get_line_count ();
857 var valiter = validate_res.map_iterator();
858 while (valiter.next()) {
860 // print("get inter\n");
861 var eline = valiter.get_key();
862 if (eline > tlines) {
865 this.el.get_iter_at_line( out iter, eline);
866 //print("mark line\n");
867 this.el.create_source_mark(valiter.get_value(), "ERR", iter);
871 public string toString () {
875 this.el.get_start_iter(out s);
876 this.el.get_end_iter(out e);
877 var ret = this.el.get_text(s,e,true);
878 //print("TO STRING? " + ret);
885 public class Xcls_Box12 : Object
888 private Editor _this;
894 public Xcls_Box12(Editor _owner )
897 this.el = new Gtk.Box( Gtk.Orientation.HORIZONTAL, 0 );
901 // set gobject values
902 this.el.homogeneous = false;
903 this.el.vexpand = false;
904 var child_0 = new Xcls_search_entry( _this );
906 this.el.add( child_0.el );
907 var child_1 = new Xcls_MenuBar14( _this );
909 this.el.add ( child_1.el );
910 var child_2 = new Xcls_Button17( _this );
912 this.el.add( child_2.el );
913 var child_3 = new Xcls_Button19( _this );
915 this.el.add( child_3.el );
916 var child_4 = new Xcls_MenuButton21( _this );
918 this.el.add( child_4.el );
921 // user defined functions
923 public class Xcls_search_entry : Object
925 public Gtk.SearchEntry el;
926 private Editor _this;
932 public Xcls_search_entry(Editor _owner )
935 _this.search_entry = this;
936 this.el = new Gtk.SearchEntry();
940 // set gobject values
941 this.el.width_request = 300;
942 this.el.hexpand = true;
943 this.el.placeholder_text = "Press enter to search";
947 var description = Pango.FontDescription.from_string("monospace");
948 description.set_size(8000);
949 this.el.override_font(description);
952 this.el.key_press_event.connect( (event) => {
953 if (event.keyval == Gdk.Key.g && (event.state & Gdk.ModifierType.CONTROL_MASK ) > 0 ) {
954 GLib.debug("SAVE: ctrl-g pressed");
955 _this.forwardSearch(true);
960 if (event.keyval == Gdk.Key.Return && this.el.text.length > 0) {
961 var res = _this.search(this.el.text);
963 _this.search_results.el.label = "%d Matches".printf(res);
965 _this.search_results.el.label = "No Matches";
971 // print(event.key.keyval)
976 this.el.changed.connect( () => {
978 if (this.el.text == "") {
979 _this.search_results.el.hide();
983 switch(_this.windowstate.state) {
984 case WindowState.State.CODEONLY:
985 ///case WindowState.State.CODE:
986 // search the code being edited..
987 res = _this.windowstate.code_editor_tab.search(this.el.text);
990 case WindowState.State.PREVIEW:
991 if (_this.windowstate.file.xtype == "Gtk") {
992 res = _this.windowstate.window_gladeview.search(this.el.text);
994 res = _this.windowstate.window_rooview.search(this.el.text);
1000 _this.search_results.el.show();
1002 _this.search_results.el.label = "%d Matches".printf(res);
1004 _this.search_results.el.label = "No Matches";
1012 // user defined functions
1013 public void forwardSearch (bool change_focus) {
1016 _this.forwardSearch(change_focus);
1020 switch(_this.windowstate.state) {
1021 case WindowState.State.CODEONLY:
1022 //case WindowState.State.CODE:
1023 // search the code being edited..
1024 _this.windowstate.code_editor_tab.forwardSearch(change_focus);
1027 case WindowState.State.PREVIEW:
1028 if (_this.windowstate.file.xtype == "Gtk") {
1029 _this.windowstate.window_gladeview.forwardSearch(change_focus);
1031 _this.windowstate.window_rooview.forwardSearch(change_focus);
1041 public class Xcls_MenuBar14 : Object
1043 public Gtk.MenuBar el;
1044 private Editor _this;
1050 public Xcls_MenuBar14(Editor _owner )
1053 this.el = new Gtk.MenuBar();
1057 // set gobject values
1058 var child_0 = new Xcls_search_results( _this );
1060 this.el.add ( child_0.el );
1063 // user defined functions
1065 public class Xcls_search_results : Object
1067 public Gtk.ImageMenuItem el;
1068 private Editor _this;
1072 public Xcls_ValaCompileErrors popup;
1075 public Xcls_search_results(Editor _owner )
1078 _this.search_results = this;
1079 this.el = new Gtk.ImageMenuItem();
1083 // set gobject values
1084 this.el.always_show_image = true;
1085 this.el.label = "Matches";
1086 var child_0 = new Xcls_Image16( _this );
1088 this.el.set_image ( child_0.el );
1091 this.el.button_press_event.connect( () => {
1093 if (this.popup == null) {
1094 this.popup = new Xcls_ValaCompileErrors();
1095 this.popup.window = _this;
1099 this.popup.show(this.notices, this.el);
1105 // user defined functions
1107 public class Xcls_Image16 : Object
1109 public Gtk.Image el;
1110 private Editor _this;
1116 public Xcls_Image16(Editor _owner )
1119 this.el = new Gtk.Image();
1123 // set gobject values
1124 this.el.icon_name = "system-search";
1125 this.el.sensitive = false;
1128 // user defined functions
1133 public class Xcls_Button17 : Object
1135 public Gtk.Button el;
1136 private Editor _this;
1142 public Xcls_Button17(Editor _owner )
1145 this.el = new Gtk.Button();
1149 // set gobject values
1150 this.el.always_show_image = true;
1151 this.el.label = "Next";
1152 var child_0 = new Xcls_Image18( _this );
1154 this.el.image = child_0.el;
1157 this.el.button_press_event.connect( (event) => {
1159 _this.forwardSearch(true);
1165 // user defined functions
1167 public class Xcls_Image18 : Object
1169 public Gtk.Image el;
1170 private Editor _this;
1176 public Xcls_Image18(Editor _owner )
1179 this.el = new Gtk.Image();
1183 // set gobject values
1184 this.el.icon_name = "go-down";
1187 // user defined functions
1191 public class Xcls_Button19 : Object
1193 public Gtk.Button el;
1194 private Editor _this;
1200 public Xcls_Button19(Editor _owner )
1203 this.el = new Gtk.Button();
1207 // set gobject values
1208 this.el.always_show_image = true;
1209 this.el.label = "Previous";
1210 var child_0 = new Xcls_Image20( _this );
1212 this.el.image = child_0.el;
1215 this.el.button_press_event.connect( (event) => {
1217 _this.backSearch(true);
1223 // user defined functions
1225 public class Xcls_Image20 : Object
1227 public Gtk.Image el;
1228 private Editor _this;
1234 public Xcls_Image20(Editor _owner )
1237 this.el = new Gtk.Image();
1241 // set gobject values
1242 this.el.icon_name = "go-up";
1245 // user defined functions
1249 public class Xcls_MenuButton21 : Object
1251 public Gtk.MenuButton el;
1252 private Editor _this;
1258 public Xcls_MenuButton21(Editor _owner )
1261 this.el = new Gtk.MenuButton();
1265 // set gobject values
1266 this.el.always_show_image = true;
1267 this.el.label = "Settings";
1268 var child_0 = new Xcls_Image22( _this );
1270 this.el.image = child_0.el;
1271 var child_1 = new Xcls_search_settings( _this );
1273 this.el.popup = child_1.el;
1276 // user defined functions
1278 public class Xcls_Image22 : Object
1280 public Gtk.Image el;
1281 private Editor _this;
1287 public Xcls_Image22(Editor _owner )
1290 this.el = new Gtk.Image();
1294 // set gobject values
1295 this.el.icon_name = "emblem-system";
1298 // user defined functions
1301 public class Xcls_search_settings : Object
1304 private Editor _this;
1310 public Xcls_search_settings(Editor _owner )
1313 _this.search_settings = this;
1314 this.el = new Gtk.Menu();
1318 // set gobject values
1319 var child_0 = new Xcls_case_sensitive( _this );
1321 this.el.append( child_0.el );
1322 var child_1 = new Xcls_regex( _this );
1324 this.el.append( child_1.el );
1325 var child_2 = new Xcls_multiline( _this );
1327 this.el.append( child_2.el );
1330 // user defined functions
1332 public class Xcls_case_sensitive : Object
1334 public Gtk.CheckMenuItem el;
1335 private Editor _this;
1341 public Xcls_case_sensitive(Editor _owner )
1344 _this.case_sensitive = this;
1345 this.el = new Gtk.CheckMenuItem();
1349 // set gobject values
1350 this.el.label = "Case Sensitive";
1359 // user defined functions
1362 public class Xcls_regex : Object
1364 public Gtk.CheckMenuItem el;
1365 private Editor _this;
1371 public Xcls_regex(Editor _owner )
1375 this.el = new Gtk.CheckMenuItem();
1379 // set gobject values
1380 this.el.label = "Regex";
1389 // user defined functions
1392 public class Xcls_multiline : Object
1394 public Gtk.CheckMenuItem el;
1395 private Editor _this;
1401 public Xcls_multiline(Editor _owner )
1404 _this.multiline = this;
1405 this.el = new Gtk.CheckMenuItem();
1409 // set gobject values
1410 this.el.label = "Multi-line (add \\n)";
1419 // user defined functions