1 goog.provide('xrx.richxml.cursor');
  2 
  3 
  4 
  5 goog.require('xrx.richxml');
  6 
  7 
  8 
  9 /**
 10  * @constructor
 11  */
 12 xrx.richxml.cursor = function(richxml) {
 13 
 14 
 15 
 16 
 17   this.richxml_ = richxml;
 18 
 19 
 20 
 21   this.codemirror_ = richxml.codemirror_;
 22 };
 23 
 24 
 25 
 26 xrx.richxml.cursor.prototype.getNode = function() {
 27   return this.richxml_.getNode();
 28 };
 29 
 30 
 31 
 32 xrx.richxml.cursor.prototype.leftIndex = function() {
 33   return this.codemirror_.indexFromPos(this.leftPosition());
 34 };
 35 
 36 
 37 
 38 xrx.richxml.cursor.prototype.leftPosition = function() {
 39   return this.codemirror_.getCursor(true);
 40 };
 41 
 42 
 43 
 44 xrx.richxml.cursor.prototype.leftTokenInside = function() {
 45   var cm = this.codemirror_;
 46   return cm.getTokenAt(cm.posFromIndex(this.leftIndex() + 1));
 47 };
 48 
 49 
 50 
 51 xrx.richxml.cursor.prototype.leftTokenOutside = function() {
 52   return this.codemirror_.getTokenAt(this.leftPosition());
 53 };
 54 
 55 
 56 
 57 xrx.richxml.cursor.prototype.leftPlace = function() {
 58   
 59 };
 60 
 61 
 62 
 63 xrx.richxml.cursor.prototype.leftAtStartPosition = function() {
 64   
 65 };
 66 
 67 
 68 
 69 xrx.richxml.cursor.prototype.leftAtEndPosition = function() {
 70   
 71 };
 72 
 73 
 74 
 75 xrx.richxml.cursor.prototype.rightIndex = function() {
 76   
 77 };
 78 
 79 
 80 
 81 xrx.richxml.cursor.prototype.rightPosition = function() {
 82   
 83 };
 84 
 85 
 86 
 87 xrx.richxml.cursor.prototype.rightTokenInside = function() {
 88   
 89 };
 90 
 91 
 92 
 93 xrx.richxml.cursor.prototype.rightTokenOutside = function() {
 94   
 95 };
 96 
 97 
 98 
 99 xrx.richxml.cursor.prototype.rightPlace = function() {
100   
101 };
102 
103 
104 
105 xrx.richxml.cursor.prototype.rightAtStartPosition = function() {
106   
107 };
108 
109 
110 
111 xrx.richxml.cursor.prototype.rightAtEndPosition = function() {
112   
113 };
114