UNPKG

@nodegui/nodegui

Version:

A cross-platform library to build native desktop apps.

35 lines (34 loc) 1.22 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.QSinglePointEvent = void 0; const QInputEvent_1 = require("./QInputEvent"); class QSinglePointEvent extends QInputEvent_1.QInputEvent { button() { return this.native.button(); } buttons() { return this.native.buttons(); } /** * Returns the position of the mouse cursor relative to the widget that received the event. * If you move your widgets around in response to mouse events, use globalPosition() instead of this function. * This function was introduced in Qt 5.14 */ position() { return this.native.position(); } /** * Returns the global position of the mouse pointer at the time of * the event. This is important on asynchronous window systems such * as X11; whenever you move your widgets around in response to mouse * events, globalPosition() can differ a lot from the current cursor * position returned by QCursor::pos(). */ globalPosition() { return this.native.globalPosition(); } scenePosition() { return this.native.scenePosition(); } } exports.QSinglePointEvent = QSinglePointEvent;