Set cursor on canvas
491326
function _setCursor($canvas, layer, eventType) {
	var cursor;
	if (layer.cursors) {
		// Retrieve cursor from cursors object if it exists
		cursor = layer.cursors[eventType];
	}
	// Prefix any CSS3 cursor
	if ($.inArray(cursor, css.cursors) !== -1) {
		cursor = css.prefix + cursor;
	}
	// If cursor is defined
	if (cursor) {
		// Set canvas cursor
		$canvas.css({
			cursor: cursor
		});
	}
}
165337
def cursor(self, pos):
        
        index = self.splitAt(pos)

        if len(self._rects[index[0]])-1 < index[1]:
            if index[1] == 0:
                # empty row
                x = 0
            else:
                rect = self._rects[index[0]][index[1]-1]
                x = rect.x() + rect.width()
        else:
            rect = self._rects[index[0]][index[1]]
            x = rect.x()

        y0 = index[0]*(ROW_HEIGHT + ROW_SPACE) + ROW_SPACE
        y1 = y0 + ROW_HEIGHT

        # adjust for scrolled viewport
        x -= self.horizontalScrollBar().value()
        y0 -= self.verticalScrollBar().value()
        y1 -= self.verticalScrollBar().value()
        
        return QtCore.QLine(x,y0,x,y1)
79748
def move_cursor(self, chars=0):
        """"""
        direction = QTextCursor.Right if chars > 0 else QTextCursor.Left
        for _i in range(abs(chars)):
            self.moveCursor(direction, QTextCursor.MoveAnchor)
101883
function(e) {
      var p = this._getMouseEvtPos(e);
		var lx = p[0], ly = p[1], n = this.wires.length, w;
		for(var i = 0 ; i < n ; i++) {
			w = this.wires[i];
			var elx = w.element.offsetLeft, ely = w.element.offsetTop;
			// Check if the mouse is within the canvas boundaries
			if( lx >= elx && lx < elx+w.element.width && ly >= ely && ly < ely+w.element.height ) {
				var rx = lx-elx, ry = ly-ely; // relative to the canvas
				w.onClick(rx,ry);
			}
		}
	}
788979
def set_editor_cursor(self, editor, cursor):
        """"""
        pos = cursor.position()
        anchor = cursor.anchor()

        new_cursor = QTextCursor()
        if pos == anchor:
            new_cursor.movePosition(pos)
        else:
            new_cursor.movePosition(anchor)
            new_cursor.movePosition(pos, QTextCursor.KeepAnchor)
        editor.setTextCursor(cursor)
1334458
void reset(Cursor cursor)
    {
        super.reset(cursor);
        GVRSceneObject assetSceneObject = sceneObjectArray.get(cursor.getId());
        assetSceneObject.setEnable(false);
    }
99394
public void setCursor(Object object, String cursor) {
		if (isAttached()) {
			helper.setCursor(object, cursor);
		}
	}
1171049
def set(self, hue):
        """"""
        x = hue / 360. * self.winfo_width()
        self.coords('cursor', x, 0, x, self.winfo_height())
        self._variable.set(hue)
1343465
def set_current(self, value):
        '''
        
        '''
        self.current = value
        self.cursor = 0
        self.limit = len(self.current)
        self.limit_backward = 0
        self.bra = self.cursor
        self.ket = self.limit
388224
def cursor_position(self, value):
        
        assert isinstance(value, int)
        assert value <= len(self.text)

        changed = self._set_cursor_position(value)

        if changed:
            self._cursor_position_changed()
1183361
def cursor(lcd, row, col):
    
    warnings.warn('The `cursor` context manager is deprecated', DeprecationWarning)
    lcd.cursor_pos = (row, col)
    yield
27401
function(self, callback) {
  // Cursor is dead but not marked killed, return null
  if (self.cursorState.dead && !self.cursorState.killed) {
    self.cursorState.killed = true;
    setCursorNotified(self, callback);
    return true;
  }

  return false;
}
143299
function (cursor) {
            var cs = this.lineCursors;
            for (var i = 0; i < cs.length; i++) {
                if (cs[i].position > cursor.position) {
                    return i - 1;
                }
            }
            return i;
        }
1246980
function (enabled) {
    var sceneEl = this.el.sceneEl;

    function enableGrabCursor () { sceneEl.canvas.classList.add('a-grab-cursor'); }
    function disableGrabCursor () { sceneEl.canvas.classList.remove('a-grab-cursor'); }

    if (!sceneEl.canvas) {
      if (enabled) {
        sceneEl.addEventListener('render-target-loaded', enableGrabCursor);
      } else {
        sceneEl.addEventListener('render-target-loaded', disableGrabCursor);
      }
      return;
    }

    if (enabled) {
      enableGrabCursor();
      return;
    }
    disableGrabCursor();
  }
158772
def set_cursor_y(self, y):
        

        if y >= 0 and y <= self.server.server_info.get("screen_height"):
            self.cursor_y = y
            self.server.request("screen_set %s cursor_y %i" % (self.ref, self.cursor_y))
256357
function onHover( evt ) {
								evt = evt.data.$;
								if ( textRng ) {
									// Read the current cursor.
									var rngEnd = body.$.createTextRange();

									moveRangeToPoint( rngEnd, evt.clientX, evt.clientY );

									// Handle drag directions.
									textRng.setEndPoint(
										startRng.compareEndPoints( 'StartToStart', rngEnd ) < 0 ?
										'EndToEnd' : 'StartToStart', rngEnd );

									// Update selection with new range.
									textRng.select();
								}
							}
880000
def _add_decoration(self, cursor):
        
        if self.select_word(cursor):
            self.editor.set_mouse_cursor(Qt.PointingHandCursor)
        else:
            self.editor.set_mouse_cursor(Qt.IBeamCursor)