src/Builder4/GtkView.bjs
authorAlan Knowles <alan@roojs.com>
Tue, 2 Jun 2015 12:24:58 +0000 (20:24 +0800)
committerAlan Knowles <alan@roojs.com>
Tue, 2 Jun 2015 12:24:58 +0000 (20:24 +0800)
src/Builder4/GtkView.vala

src/Builder4/GtkView.bjs
src/Builder4/GtkView.vala

index 7c265df..ef8512a 100644 (file)
@@ -11,7 +11,7 @@
    "listeners" : {
     "size_allocate" : "(aloc) => {\n\n    this.width = aloc.width;\n    this.height =aloc.height;\n    }\n"
    },
-   "| Gee.ArrayList<int> search" : "(string txt) {\n  var ret =  new Gee.ArrayList<int>();\n  \n  return ret;\n}\n",
+   "| Gee.ArrayList<int> search" : "(string txt) {\n  var ret =  new Gee.ArrayList<int>();\n  var str = this.sourceview.toString();\n  \n  \n  return ret;\n}\n",
    "id" : "GtkView",
    "| void scroll_to_line" : "(int line) {\n   this.notebook.el.page = 1;// code preview...\n   \n   GLib.Timeout.add(500, () => {\n   \n   \n\t   \n\t   \n\t\t  var buf = this.sourceview.el.get_buffer();\n\t \n\t\tvar sbuf = (Gtk.SourceBuffer) buf;\n\n\n\t\tGtk.TextIter iter;   \n\t\tsbuf.get_iter_at_line(out iter,  line);\n\t\tthis.sourceview.el.scroll_to_iter(iter,  0.1f, true, 0.0f, 0.5f);\n\t\treturn false;\n\t});   \n\n   \n}\n",
    "# Gtk.Widget lastObj" : "null",
index 11c446d..6061b6e 100644 (file)
@@ -55,6 +55,8 @@ public class Xcls_GtkView : Object
     // user defined functions
     public Gee.ArrayList<int> search (string txt) {
       var ret =  new Gee.ArrayList<int>();
+      var str = this.sourceview.toString();
+      
       
       return ret;
     }