The position in pixels of the cursor
487204
def value_px(self):
        """"""
        step = self.w / (self.max - self.min)
        return self.x + step * (self.get() - self.min)
1035600
def pixel_width(self):
        
        return self.zoom_factor * ((self._finish - self._start) / self._resolution)
1058931
def position(self):
        """"""
        position = ffi.new('int[]', 2)
        lib.SDL_GetWindowPosition(self._ptr, position + 0, position + 1)
        return (position[0], position[1])
1306642
def cursor_down(self, count=None):
        
        _top, bottom = self.margins or Margins(0, self.lines - 1)
        self.cursor.y = min(self.cursor.y + (count or 1), bottom)
838984
def scenePos( self ):
        
        pos     = self.pos()
        pitem   = self.parentItem()
        
        while (pitem):
            pos     = pitem.pos() + pos
            pitem   = pitem.parentItem()
        
        return pos
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
145549
def cursor_pos(self):
        """"""
        if len(self) == 0:
            return self.left + self.default_text.get_width()

        papy = self._surface.get_width()
        if papy > self.w:
            shift = papy - self.width
        else:
            shift = 0

        return self.left + self.font.size(self.shawn_text[:self.cursor])[0] - shift
839192
function(x, y){
            var pos = this.canvas.getBoundingClientRect(),
                mx = x - pos.left,
                my = y - pos.top;
            return this.pixelToTileCoords(mx, my);
        }
241794
def cursor_up(self, stats):
        """"""
        if 0 <= self.cursor_position - 1:
            self.cursor_position -= 1
        else:
            if self._current_page - 1 < 0 :
                self._current_page = self._page_max - 1
                self.cursor_position = (len(stats) - 1) % self._page_max_lines 
            else:
                self._current_page -= 1
                self.cursor_position = self._page_max_lines - 1
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)
64206
private double pixelsToUnits(int pixels) {
		Coordinate c1 = mapPresenter.getViewPort().getTransformationService()
				.transform(new Coordinate(0, 0), RenderSpace.SCREEN, RenderSpace.WORLD);
		Coordinate c2 = mapPresenter.getViewPort().getTransformationService()
				.transform(new Coordinate(pixels, 0), RenderSpace.SCREEN, RenderSpace.WORLD);
		return MathService.distance(c1, c2);
	}
696305
def get_position(self, row, col):
        """"""
        result = col
        self.log.debug('%s %s', row, col)
        lines = self.editor.getlines()[:row - 1]
        result += sum([len(l) + 1 for l in lines])
        self.log.debug(result)
        return result
330570
@Override
    public void setCursorPosition(TerminalPosition position) {
        if(position == null) {
            //Skip any validation checks if we just want to hide the cursor
            this.cursorPosition = null;
            return;
        }
        if(position.getColumn() < 0) {
            position = position.withColumn(0);
        }
        if(position.getRow() < 0) {
            position = position.withRow(0);
        }
        if(position.getColumn() >= terminalSize.getColumns()) {
            position = position.withColumn(terminalSize.getColumns() - 1);
        }
        if(position.getRow() >= terminalSize.getRows()) {
            position = position.withRow(terminalSize.getRows() - 1);
        }
        this.cursorPosition = position;
    }
262893
def set_cursor(self, x, y):
        
        curses.curs_set(1)
        self.screen.move(y, x)
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)
1183361
def cursor(lcd, row, col):
    
    warnings.warn('The `cursor` context manager is deprecated', DeprecationWarning)
    lcd.cursor_pos = (row, col)
    yield
1322347
def _cursor_position_changed(self):
        
        cursor = self._text_edit.textCursor()
        position = cursor.position()
        document = self._text_edit.document()
        char = to_text_string(document.characterAt(position - 1))
        if position <= self._start_position:
            self.hide()
        elif char == ')':
            pos, _ = self._find_parenthesis(position - 1, forward=False)
            if pos == -1:
                self.hide()