2 "build_module" : "builder",
3 "gen_extended" : false,
6 "# Gtk.Widget lastObj" : "null",
7 "# GtkSource.SearchContext searchcontext" : "",
8 "# JsRender.JsRender file" : "null",
9 "# Xcls_MainWindow main_window" : "",
14 "\tthis.css = new Gtk.CssProvider();",
16 "\tthis.css.load_from_string(",
17 "\t\t\"#gtkview-view-layout { background-color: #ccc; }\"",
20 "\tGtk.StyleContext.add_provider_for_display(",
21 "\t\tthis.el.get_display(),",
23 "\t\tGtk.STYLE_PROVIDER_PRIORITY_APPLICATION",
30 "Gtk.CssProvider css" : "",
31 "Gtk.Orientation orientation" : "Gtk.Orientation.VERTICAL",
32 "bool hexpand" : true,
33 "bool vexpand" : true,
35 "int last_search_end" : 0,
39 "Gtk.Overflow overflow" : "Gtk.Overflow.VISIBLE",
45 "id" : "label_preview",
46 "utf8 label" : "Preview",
53 "utf8 label" : "Preview Generated Code",
58 "* pack" : "append_page,_this.label_preview.el",
62 "* pack" : "set_child",
67 "* pack" : "put,10,10",
68 "Gtk.Orientation orientation" : "Gtk.Orientation.HORIZONTAL",
73 "string name" : "gtkview-view-layout",
77 "xtype" : "ScrolledWindow"
81 "* pack" : "append_page,_this.label_code.el",
82 "Gtk.Orientation orientation" : "Gtk.Orientation.VERTICAL",
87 "bool vexpand" : true,
88 "id" : "sourceviewscroll",
91 "# JsRender.Node? node_selected" : "",
92 "# string prop_selected" : "\"\"",
93 "$ xns" : "GtkSource",
98 " \tthis.css = new Gtk.CssProvider();",
100 "\tthis.css.load_from_string(\"#gtkview-view { font: 10px monospace ;}\");",
102 "\tGtk.StyleContext.add_provider_for_display(",
103 "\t\tthis.el.get_display(),",
105 "\t\tGtk.STYLE_PROVIDER_PRIORITY_APPLICATION",
109 " this.loading = true;",
113 " var attrs = new GtkSource.MarkAttributes();",
114 " var pink = Gdk.RGBA();",
115 " pink.parse ( \"pink\");",
116 " attrs.set_background ( pink);",
117 " attrs.set_icon_name ( \"process-stop\"); ",
118 " attrs.query_tooltip_text.connect(( mark) => {",
119 " //print(\"tooltip query? %s\\n\", mark.name);",
120 " return mark.name;",
123 " this.el.set_mark_attributes (\"ERR\", attrs, 1);",
125 " var wattrs = new GtkSource.MarkAttributes();",
126 " var blue = Gdk.RGBA();",
127 " blue.parse ( \"#ABF4EB\");",
128 " wattrs.set_background ( blue);",
129 " wattrs.set_icon_name ( \"process-stop\"); ",
130 " wattrs.query_tooltip_text.connect(( mark) => {",
131 " //print(\"tooltip query? %s\\n\", mark.name);",
132 " return mark.name;",
135 " this.el.set_mark_attributes (\"WARN\", wattrs, 1);",
139 " var dattrs = new GtkSource.MarkAttributes();",
140 " var purple = Gdk.RGBA();",
141 " purple.parse ( \"#EEA9FF\");",
142 " dattrs.set_background ( purple);",
143 " dattrs.set_icon_name ( \"process-stop\"); ",
144 " dattrs.query_tooltip_text.connect(( mark) => {",
145 " //print(\"tooltip query? %s\\n\", mark.name);",
146 " return mark.name;",
149 " this.el.set_mark_attributes (\"DEPR\", dattrs, 1);",
152 " var gattrs = new GtkSource.MarkAttributes();",
153 " var grey = Gdk.RGBA();",
154 " grey.parse ( \"#ccc\");",
155 " gattrs.set_background ( grey);",
158 " this.el.set_mark_attributes (\"grey\", gattrs, 1);",
168 "* pack" : "set_child",
169 "Gtk.CssProvider css" : "",
170 "bool allow_node_scroll" : true,
171 "bool loading" : true,
172 "gboolean editable" : false,
173 "gboolean show_line_marks" : true,
174 "gboolean show_line_numbers" : true,
178 "$ xns" : "GtkSource",
179 "* pack" : "set_buffer",
180 "bool dirty" : false,
182 "int error_line" : "-1",
184 "notify[\"cursor_position\"]" : [
188 " if (_this.sourceview.loading) {",
192 " GLib.debug(\"cursor changed : %d\", this.el.cursor_position);",
193 " Gtk.TextIter cpos;",
194 " this.el.get_iter_at_offset(out cpos, this.el.cursor_position);",
196 " var ln = cpos.get_line();",
198 " var node = _this.file.lineToNode(ln);",
200 " if (node == null) {",
201 " print(\"can not find node\\n\");",
204 " _this.sourceview.loading = true;",
205 " var ltree = _this.main_window.windowstate.left_tree;",
206 " ltree.model.selectNode(node);",
207 " _this.sourceview.loading = false;",
209 " //print(\"got tree path %s\\n\", tp);",
210 " //if (tp != \"\") {",
211 " // this.allow_node_scroll = false; ",
212 " // print(\"changing cursor on tree..\\n\");",
213 " //ltree.view.el.set_cursor(new Gtk.TreePath.from_string(tp), null, false);",
214 " // scrolling is disabled... as node selection calls scroll 10ms after it changes.",
215 " ///GLib.Timeout.add_full(GLib.Priority.DEFAULT,100 , () => {",
216 " // this.allow_node_scroll = true;",
221 " // highlight the node..",
234 "(keyval, keycode, state) => {",
238 "\t if (keyval == Gdk.Key.g && (state & Gdk.ModifierType.CONTROL_MASK ) > 0 ) {",
239 "\t GLib.debug(\"SAVE: ctrl-g pressed\");",
240 "\t\t_this.forwardSearch(true);",
243 " if (keyval == Gdk.Key.f && (state & Gdk.ModifierType.CONTROL_MASK ) > 0 ) {",
244 "\t GLib.debug(\"SAVE: ctrl-f pressed\");",
245 "\t\t_this.search_entry.el.grab_focus();",
254 "xtype" : "EventControllerKey"
259 "(x, y, keyboard_tooltip, tooltip) => {",
261 "\t//GLib.debug(\"query tooltip\");",
262 "\tGtk.TextIter iter;",
265 "\tvar yoff = (int) _this.sourceviewscroll.el.vadjustment.value;",
267 "\tthis.el.get_iter_at_position (out iter, out trailing, x, y + yoff);",
269 "\tvar l = iter.get_line();",
270 "\t// GLib.debug(\"query tooltip line %d\", (int) l);",
271 "\tvar marks = _this.buffer.el.get_source_marks_at_line(l, \"ERR\");",
272 "\tif (marks.is_empty()) {",
273 "\t\tmarks = _this.buffer.el.get_source_marks_at_line(l, \"WARN\");",
275 "\tif (marks.is_empty()) {",
276 "\t\tmarks = _this.buffer.el.get_source_marks_at_line(l, \"DEPR\");",
279 "\t// GLib.debug(\"query tooltip line marks %d\", (int) marks.length());",
281 "\tmarks.@foreach((m) => { ",
282 "\t\t//GLib.debug(\"got mark %s\", m.name);",
283 "\t\tstr += (str.length > 0 ? \"\\n\" : \"\") + m.name;",
286 "\t// true if there is a mark..",
287 "\ttooltip.set_text( str);",
288 "\treturn str.length > 0 ? true : false;",
294 "string name" : "gtkview-view",
296 "| string toString" : [
300 " this.el.get_buffer().get_start_iter(out s);",
301 " this.el.get_buffer().get_end_iter(out e);",
302 " var ret = this.el.get_buffer().get_text(s,e,true);",
303 " //print(\"TO STRING? \" + ret);",
308 "| void highlightErrorsJson" : [
309 " (string type, Json.Object obj) {",
310 " Gtk.TextIter start;",
311 " Gtk.TextIter end; ",
313 " var buf = this.el.get_buffer();",
314 " var sbuf = (GtkSource.Buffer)buf;",
315 " buf.get_bounds (out start, out end);",
317 " sbuf.remove_source_marks (start, end, type);",
320 " // we should highlight other types of errors..",
322 " if (!obj.has_member(type)) {",
323 " GLib.debug(\"Return has no errors\\n\");",
326 " var err = obj.get_object_member(type);",
328 " if (_this.file == null) { ",
330 " return; // just in case the file has not loaded yet?",
334 " var valafn = \"\";",
336 " var regex = new Regex(\"\\\\.bjs$\");",
339 " valafn = regex.replace(_this.file.path,_this.file.path.length , 0 , \".vala\");",
340 " } catch (GLib.RegexError e) {",
344 " if (!err.has_member(valafn)) {",
345 " GLib.debug(\"File path has no errors\\n\");",
348 " var lines = err.get_object_member(valafn);",
352 " var tlines = buf.get_line_count () +1;",
354 " lines.foreach_member((obj, line, node) => {",
356 " Gtk.TextIter iter;",
357 " // print(\"get inter\\n\");",
358 " var eline = int.parse(line) -1 ;",
359 " GLib.debug(\"GOT ERROR on line %s -- converted to %d\\n\", line,eline);",
362 " if (eline > tlines || eline < 0) {",
365 " sbuf.get_iter_at_line( out iter, eline);",
366 " //print(\"mark line\\n\");",
367 " var msg = type + \" on line: %d - %s\".printf(eline+1, valafn);",
368 " var ar = lines.get_array_member(line);",
369 " for (var i = 0 ; i < ar.get_length(); i++) {",
370 "\t\t msg += (msg.length > 0) ? \"\\n\" : \"\";",
371 "\t\t msg += ar.get_string_element(i);",
375 " sbuf.create_source_mark(msg, type, iter);",
384 "| void loadFile" : [
386 " this.loading = true;",
387 " var buf = this.el.get_buffer();",
388 " buf.set_text(\"\",0);",
389 " var sbuf = (GtkSource.Buffer) buf;",
393 " if (_this.file == null || _this.file.xtype != \"Gtk\") {",
394 " print(\"xtype != Gtk\");",
395 " this.loading = false;",
399 " var valafn = \"\";",
401 " var regex = new Regex(\"\\\\.bjs$\");",
404 " valafn = regex.replace(_this.file.path,_this.file.path.length , 0 , \".vala\");",
405 " } catch (GLib.RegexError e) {",
406 " this.loading = false;",
411 " if (!FileUtils.test(valafn,FileTest.IS_REGULAR) ) {",
412 " print(\"File path has no errors\\n\");",
413 " this.loading = false;",
420 " GLib.FileUtils.get_contents (valafn, out str);",
421 " } catch (Error e) {",
422 " this.loading = false;",
426 "// print(\"setting str %d\\n\", str.length);",
427 " buf.set_text(str, str.length);",
428 " var lm = GtkSource.LanguageManager.get_default();",
430 " //?? is javascript going to work as js?",
432 " ((GtkSource.Buffer)(buf)) .set_language(lm.get_language(_this.file.language));",
435 " Gtk.TextIter start;",
436 " Gtk.TextIter end; ",
438 " sbuf.get_bounds (out start, out end);",
439 " sbuf.remove_source_marks (start, end, null); // remove all marks..",
442 " if (_this.main_window.windowstate.last_compile_result != null) {",
443 " var obj = _this.main_window.windowstate.last_compile_result;",
444 " this.highlightErrorsJson(\"ERR\", obj);",
445 " this.highlightErrorsJson(\"WARN\", obj);",
446 " this.highlightErrorsJson(\"DEPR\", obj);\t\t\t",
448 " // while (Gtk.events_pending()) {",
449 " // Gtk.main_iteration();",
452 " this.loading = false; ",
456 "| void nodeSelected" : [
457 "(JsRender.Node? sel, bool scroll) {",
460 " if (this.loading) {",
463 " // this is connected in widnowstate",
464 " print(\"Roo-view - node selected\\n\");",
465 " var buf = this.el.get_buffer();",
467 " var sbuf = (GtkSource.Buffer) buf;",
470 " // while(Gtk.events_pending()) {",
471 " // Gtk.main_iteration();",
475 " // clear all the marks..",
476 " Gtk.TextIter start;",
477 " Gtk.TextIter end; ",
479 " sbuf.get_bounds (out start, out end);",
480 " sbuf.remove_source_marks (start, end, \"grey\");",
482 " this.node_selected = sel;",
483 " if (sel == null) {",
484 " // no highlighting..",
487 " Gtk.TextIter iter; ",
488 " sbuf.get_iter_at_line(out iter, sel.line_start);",
491 " Gtk.TextIter cur_iter;",
492 " sbuf.get_iter_at_offset(out cur_iter, sbuf.cursor_position);",
494 " //var cur_line = cur_iter.get_line();",
495 " //if (cur_line > sel.line_start && cur_line < sel.line_end) {",
498 " if (this.allow_node_scroll) {",
500 " \tthis.el.scroll_to_iter(iter, 0.1f, true, 0.0f, 0.5f);",
505 " for (var i = 0; i < buf.get_line_count();i++) {",
506 " if (i < sel.line_start || i > sel.line_end) {",
508 " sbuf.get_iter_at_line(out iter, i);",
509 " sbuf.create_source_mark(null, \"grey\", iter);",
521 "xtype" : "ScrolledWindow"
525 "Gtk.Orientation orientation" : "Gtk.Orientation.HORIZONTAL",
526 "bool homogeneous" : false,
527 "bool vexpand" : false,
534 "this.css = new Gtk.CssProvider();",
536 "this.css.load_from_string(\"",
537 "\t#gtkview-search-entry { font: 10px monospace ;}\"",
540 "Gtk.StyleContext.add_provider_for_display(",
541 "\tthis.el.get_display(),",
543 "\tGtk.STYLE_PROVIDER_PRIORITY_APPLICATION",
549 "Gtk.CssProvider css" : "",
550 "bool hexpand" : true,
551 "id" : "search_entry",
557 "(keyval, keycode, state) => {",
559 "\tif (keyval == Gdk.Key.g && (state & Gdk.ModifierType.CONTROL_MASK ) > 0 ) {",
560 "\t GLib.debug(\"SAVE: ctrl-g pressed\");",
561 "\t\t_this.forwardSearch(true);",
566 " \tif (keyval == Gdk.Key.Return && _this.search_entry.el.text.length > 0) {",
567 "\t\t_this.forwardSearch(true);",
573 " // print(event.key.keyval)",
580 "xtype" : "EventControllerKey"
587 "\t_this.search(_this.search_entry.el.text);",
588 "\t _this.search_results.updateResults();",
590 "\tGLib.Timeout.add_seconds(1,() => {",
591 "\t\t _this.search_results.updateResults();",
592 "\t\t return false;",
600 "string name" : "gtkview-search-entry",
601 "string placeholder_text" : "Press enter to search",
602 "uint search_delay" : 3,
603 "xtype" : "SearchEntry",
604 "| void forwardSearch" : [
605 "(bool change_focus) {",
608 "\t_this.forwardSearch(change_focus);",
612 "\tswitch(_this.windowstate.state) {",
613 "\t\tcase WindowState.State.CODEONLY:",
614 "\t\t//case WindowState.State.CODE:",
615 "\t\t\t// search the code being edited..",
616 "\t\t\t_this.windowstate.code_editor_tab.forwardSearch(change_focus);",
619 "\t\tcase WindowState.State.PREVIEW:",
620 "\t\t\tif (_this.windowstate.file.xtype == \"Gtk\") {",
621 "\t\t\t\t_this.windowstate.window_gladeview.forwardSearch(change_focus);",
623 "\t\t\t\t _this.windowstate.window_rooview.forwardSearch(change_focus);",
636 "id" : "search_results",
637 "int margin_end" : 4,
638 "int margin_start" : 4,
639 "string label" : "No Results",
641 "| void updateResults" : [
643 "\tthis.el.visible = true;",
645 "\tvar res = _this.searchcontext.get_occurrences_count();",
647 "\t\t_this.search_results.el.label = \"??? Matches\";\t\t",
651 "\t_this.nextBtn.el.sensitive = false;",
652 "\t_this.backBtn.el.sensitive = false;\t",
655 "\t\t_this.search_results.el.label = \"%d Matches\".printf(res);",
656 "\t\t_this.nextBtn.el.sensitive = true;",
657 "\t\t_this.backBtn.el.sensitive = true;",
660 "\t_this.search_results.el.label = \"No Matches\";",
667 "bool always_show_image" : true,
668 "bool sensitive" : false,
673 "_this.forwardSearch(true);",
680 "string icon_name" : "go-down",
685 "bool always_show_image" : true,
686 "bool sensitive" : false,
692 "_this.backSearch(true);",
698 "string icon_name" : "go-up",
703 "bool always_show_arrow" : true,
704 "bool always_show_image" : true,
708 "* ctor" : "new Gtk.PopoverMenu.from_model(null)",
709 "* prop" : "popover",
710 "id" : "search_settings",
714 "* pack" : "set_child",
715 "Gtk.Orientation orientation" : "Gtk.Orientation.VERTICAL",
720 "id" : "case_sensitive",
721 "string label" : "Case Sensitive",
722 "xtype" : "CheckButton"
727 "string label" : "Regex",
728 "xtype" : "CheckButton"
733 "string label" : "Multi-line (add \\n)",
734 "xtype" : "CheckButton"
740 "xtype" : "PopoverMenu"
743 "string icon_name" : "emblem-system",
744 "xtype" : "MenuButton"
759 "\tthis.notebook.el.page = 1;",
763 "\tvar s = new GtkSource.SearchSettings();",
764 "\ts.case_sensitive = _this.case_sensitive.el.active;",
765 "\ts.regex_enabled = _this.regex.el.active;\t",
766 "\ts.wrap_around = false;",
768 "\tthis.searchcontext = new GtkSource.SearchContext(this.buffer.el,s);",
769 "\tthis.searchcontext.set_highlight(true);",
770 "\tvar txt = in_txt;",
772 "\tif (_this.multiline.el.active) {",
773 "\t\ttxt = in_txt.replace(\"\\\\n\", \"\\n\");",
776 "\ts.set_search_text(txt);",
777 "\tGtk.TextIter beg, st,en;",
778 "\tbool has_wrapped_around;",
779 "\tthis.buffer.el.get_start_iter(out beg);",
780 "\tthis.searchcontext.forward(beg, out st, out en, out has_wrapped_around);",
781 "\tthis.last_search_end = 0;",
783 "\treturn this.searchcontext.get_occurrences_count();",
791 "| void backSearch" : [
792 "(bool change_focus) {",
794 "\tif (this.searchcontext == null) {",
798 "\tGtk.TextIter beg, st,en;",
799 "\tbool has_wrapped_around;",
800 "\tthis.buffer.el.get_iter_at_offset(out beg, this.last_search_end -1 );",
802 "\tif (!this.searchcontext.backward(beg, out st, out en, out has_wrapped_around)) {",
804 "\t\tthis.last_search_end = 0;",
807 "\tthis.last_search_end = en.get_offset();",
808 "\tif (change_focus) {",
809 "\t\tthis.sourceview.el.grab_focus();",
811 "\tthis.buffer.el.place_cursor(st);",
812 "\tthis.sourceview.el.scroll_to_iter(st, 0.1f, true, 0.0f, 0.5f);",
813 "\tvar ln = st.get_line();",
814 "\tthis.highlightNodeAtLine(ln);",
819 "| void createThumb" : [
823 " if (this.file == null) {",
826 " // only screenshot the gtk preview..",
827 " if (this.notebook.el.page > 0 ) {",
832 " \tthis.file.widgetToIcon(this.container.el); ",
841 " // should we hold until it's printed...",
849 "| void forwardSearch" : [
850 "(bool change_focus) {",
852 "\tif (this.searchcontext == null) {",
855 "\tthis.notebook.el.page = 1;",
856 "\tGtk.TextIter beg, st,en;",
857 "\tbool has_wrapped_around;",
858 "\tvar buf = this.sourceview.el.get_buffer();",
859 "\tbuf.get_iter_at_offset(out beg, this.last_search_end);",
860 "\tif (!this.searchcontext.forward(beg, out st, out en, out has_wrapped_around)) {",
861 "\t\tthis.last_search_end = 0;",
864 "\tthis.last_search_end = en.get_offset();",
865 "\tif (change_focus) {",
866 "\t\tthis.sourceview.el.grab_focus();",
868 "\tbuf.place_cursor(st);",
872 "\tthis.sourceview.el.scroll_to_iter(st, 0.0f, true, 0.0f, 0.5f);",
875 "\tvar ln = st.get_line();",
877 "\tthis.highlightNodeAtLine(ln);",
881 "| void highlightNodeAtLine" : [
884 "\t// this is done from clicking on the editor..",
886 "\t// highlight node...",
889 " var node = _this.file.lineToNode(ln+1);",
891 " if (node == null) {",
892 " //print(\"can not find node\\n\");",
895 " var prop = node.lineToProp(ln+1);",
896 " print(\"prop : %s\", prop == null ? \"???\" : prop.name);",
899 " // ---------- this selects the tree's node...",
901 " var ltree = _this.main_window.windowstate.left_tree;",
902 " ltree.model.selectNode(node);",
903 " //var tp = ltree.model.treePathFromNode(node);",
905 " //print(\"got tree path %s\\n\", tp);",
906 " //if (tp == \"\") {",
909 " //_this.sourceview.allow_node_scroll = false; /// block node scrolling..",
912 " //print(\"changing cursor on tree..\\n\");",
916 " // let's try allowing editing on the methods.",
917 " // a little klunky at present..",
918 "\t_this.sourceview.prop_selected = \"\";",
920 " if (prop != null) {",
921 "\t\t//see if we can find it..",
922 "\t\tvar kv = prop.split(\":\");",
923 "\t\tif (kv[0] == \"p\") {",
925 " \t\t//var k = prop.get_key(kv[1]);",
926 " \t\t// fixme -- need to determine if it's an editable property...",
927 " \t\t_this.sourceview.prop_selected = prop;",
929 "\t\t} else if (kv[0] == \"l\") {",
930 "\t\t\t _this.sourceview.prop_selected = prop;",
935 " //ltree.view.setCursor(tp, \"editor\");",
936 " // ltree.view.el.set_cursor(new Gtk.TreePath.from_string(tp), null, false); ",
937 " _this.sourceview.nodeSelected(node,false);",
939 " // scrolling is disabled... as node selection calls scroll 10ms after it changes.",
940 " // GLib.Timeout.add_full(GLib.Priority.DEFAULT,100 , () => {",
941 "\t // this.allow_node_scroll = true;",
942 "\t // return false;",
959 "| void loadFile" : [
960 "(JsRender.JsRender file) ",
962 " this.file = null;",
964 " if (file.tree == null) {",
967 " this.notebook.el.page = 0;// gtk preview ",
971 " this.file = file; ",
972 " this.sourceview.loadFile();",
973 " this.searchcontext = null;",
976 " if (this.lastObj != null) {",
977 " this.container.el.remove(this.lastObj);",
980 " // hide the compile view at present..",
983 " var w = this.el.get_width();",
984 " var h = this.el.get_height();",
986 " print(\"ALLOC SET SIZES %d, %d\\n\", w,h); ",
988 " // set the container size min to 500/500 or 20 px less than max..",
989 " w = int.max (w-20, 500);",
990 " h = int.max (h-20, 500); ",
992 " print(\"SET SIZES %d, %d\\n\", w,h); ",
993 " _this.container.el.set_size_request(w,h);",
995 " _this.view_layout.el.set_size_request(w,h); ",
996 " // should be baded on calc.. -- see update_scrolled.",
998 " var fc = this.container.el.get_first_child();",
999 " if (fc != null) {",
1000 " \t\tthis.container.el.remove(fc);",
1003 " \t\tvar xmlstr = JsRender.NodeToGlade.mungeFile( file);",
1004 " \t\tvar builder = new Gtk.Builder.from_string (xmlstr, xmlstr.length);",
1005 " \t\tvar obj = (Gtk.Widget) builder.get_object(\"w\"+ file.tree.oid.to_string());",
1006 " \t\t this.container.el.append(obj);",
1008 " this.createThumb();",
1012 "\tvar x = new JsRender.NodeToGtk((Project.Gtk) file.project, file.tree);",
1013 " var obj = x.munge() as Gtk.Widget;",
1014 " this.lastObj = null;",
1015 "\tif (obj == null) {",
1018 "\tthis.lastObj = obj;",
1020 " this.container.el.append(obj);",
1028 "| void scroll_to_line" : [
1030 " // code preview...",
1032 " GLib.Timeout.add(100, () => {",
1035 "\t this.notebook.el.set_current_page(1);",
1037 "\t\t var buf = this.sourceview.el.get_buffer();",
1039 "\t\tvar sbuf = (GtkSource.Buffer) buf;",
1042 "\t\tGtk.TextIter iter; ",
1043 "\t\tsbuf.get_iter_at_line(out iter, line);",
1044 "\t\tthis.sourceview.el.scroll_to_iter(iter, 0.1f, true, 0.0f, 0.5f);",
1045 "\t\treturn false;",