Move the virtual cursor.

        Args:
            x (int): x-coordinate to place the cursor.
            y (int): y-coordinate to place the cursor.

        .. seealso:: :any:`get_cursor`, :any:`print_str`, :any:`write`
559642
def move(self, x, y):
        
        self._cursor = self._normalizePoint(x, y)
1357532
def click(self, x, y):
        '''
        
        '''
        self.shell('input', 'tap', str(x), str(y))
159490
def move_to(x, y):
    
    _make_cnc_request("coord/{0}/{1}".format(x, y))
    state['turtle'].goto(x, y)
985114
def move(self, loc, yoff=None):
        
        from .Geometry import Location
        self._lock.acquire()
        if isinstance(loc, Location):
            mouse.move(loc.x, loc.y)
        elif yoff is not None:
            xoff = loc
            mouse.move(xoff, yoff)
        else:
            raise ValueError("Invalid argument. Expected either move(loc) or move(xoff, yoff).")
        self._last_position = loc
        self._lock.release()
320618
def _set_position(self, value):
        
        pX, pY = self.position
        x, y = value
        dX = x - pX
        dY = y - pY
        self.moveBy((dX, dY))
410811
def moveCursor(self, cursorAction, modifiers):
        
        # moves to the next index
        if cursorAction not in (self.MoveNext,
                                self.MoveRight,
                                self.MovePrevious,
                                self.MoveLeft,
                                self.MoveHome,
                                self.MoveEnd):
            return super(XTreeWidget, self).moveCursor(cursorAction, modifiers)
        
        header = self.header()
        index = self.currentIndex()
        row  = index.row()
        col  = index.column()
        vcol = None
        
        if cursorAction == self.MoveEnd:
            vcol = header.count() - 1
            delta = -1
        elif cursorAction == self.MoveHome:
            vcol = 0
            delta = +1
        elif cursorAction in (self.MoveNext, self.MoveRight):
            delta = +1
        elif cursorAction in (self.MovePrevious, self.MoveLeft):
            delta = -1
        
        if vcol is None:
            vcol = header.visualIndex(col) + delta
        
        ncol = header.count()
        lcol = header.logicalIndex(vcol)
        
        while 0 <= vcol and vcol < ncol and self.isColumnHidden(lcol):
            vcol += delta
            lcol = header.logicalIndex(vcol)
        
        sibling = index.sibling(index.row(), lcol)
        if sibling and sibling.isValid():
            return sibling
        elif delta < 0:
            return index.sibling(index.row() - 1, header.logicalIndex(ncol - 1))
        else:
            return index.sibling(index.row() + 1, header.visualIndex(0))
746908
def cursor_up(self, count=None):
        
        top, _bottom = self.margins or Margins(0, self.lines - 1)
        self.cursor.y = max(self.cursor.y - (count or 1), top)
1097126
def touchPoint(self, x, y):
        '''
        
        '''

        if DEBUG:
            print >> sys.stderr, 'touchPoint(%d, %d)' % (x, y)
            print >> sys.stderr, 'touchPoint:', type(x), type(y)
        if self.areEventsDisabled:
            if DEBUG:
                print >> sys.stderr, "Ignoring event"
            self.canvas.update_idletasks()
            return
        if DEBUG:
            print >> sys.stderr, "Is touching point:", self.isTouchingPoint
        if self.isTouchingPoint:
            self.showVignette()
            if self.vc:
                self.vc.touch(x, y)
            if self.coordinatesUnit == Unit.DIP:
                x = round(x / self.device.display['density'], 2)
                y = round(y / self.device.display['density'], 2)
            self.printOperation(None, Operation.TOUCH_POINT, x, y, self.coordinatesUnit,
                                self.device.display['orientation'])
            self.printOperation(None, Operation.SLEEP, Operation.DEFAULT)
            # FIXME: can we reduce this sleep? (was 5)
            time.sleep(1)
            self.isTouchingPoint = self.vc is None
            self.takeScreenshotAndShowItOnWindow()
            # self.hideVignette()
            self.statusBar.clear()
            return
1303824
def _on_move(self, event):
        """"""
        w = self.winfo_width()
        x = min(max(event.x, 0), w)
        self.coords('cursor', x, 0, x, self.winfo_height())
        self._variable.set(round2((360. * x) / w))
52062
def get_cursor_position(event)
      if (event.page_x && event.page_y)
        x = event.page_x
        y = event.page_y
      else
        doc = Opal.Document[0]
        x = event[:clientX] + doc.scrollLeft +
              doc.documentElement.scrollLeft
        y = event[:clientY] + doc.body.scrollTop +
              doc.documentElement.scrollTop
      end
      x -= `#{@canvas.canvas}.offsetLeft`
      y -= `#{@canvas.canvas}.offsetTop`
      Coordinates.new(x: x, y: y)
    end
488263
public void setLocation(double x, double y)
    {
        final double dx = x - (mover.getX() + offset.getX());
        final double dy = y - (mover.getY() + offset.getY());
        moveLocation(1, dx, dy);
    }
1027387
def drag(*args, function = move):
    

    x, y = win32api.GetCursorPos()
    win32api.mouse_event(win32con.MOUSEEVENTF_LEFTDOWN, x, y, 0, 0)
    function(*args)
    x, y = win32api.GetCursorPos()
    win32api.mouse_event(win32con.MOUSEEVENTF_LEFTUP, x, y, 0, 0)
736911
def move_line(x, y, speed = 1):
    

    _x, _y = win32api.GetCursorPos()
    if x - _x:
        m = (y - _y) / (x - _x)
        c = y - (m * x)
        for a in range(_x, x + 1, speed) if _x < x else range(_x, x - 1, -speed):
            b = int(m * a + c)
            move(a, b)
            time.sleep(0.01)
    else:
        for b in range(_y, y + 1, speed) if _y <= y else range(_y, y - 1, -speed):
            move(x, b)
            time.sleep(0.01)
    move(x, y)
169243
def set_location(self, obj, cursor):
        
        if (hasattr(cursor, 'location') and cursor.location is not None and
                cursor.location.file is not None):
            obj.location = (cursor.location.file.name, cursor.location.line)
        return
1037490
def set_position(self, x, y, speed=None):
        ''' '''
        if speed:
            self._intf.write('MoveChuckSubsite %1.1f %1.1f R Y %d' % (x, y, speed))
        else:
            self._intf.write('MoveChuckSubsite %1.1f %1.1f R Y' % (x, y))
1343816
def placeCursor(self, pos):
        
        if pos > len(self.qteWidget.toPlainText()):
            pos = len(self.qteWidget.toPlainText())

        tc = self.qteWidget.textCursor()
        tc.setPosition(pos)
        self.qteWidget.setTextCursor(tc)
54762
def click(self, x: int, y: int) -> None:
        ''''''
        self._execute('-s', self.device_sn, 'shell',
                      'input', 'tap', str(x), str(y))