Skip to content

PointerView

A transparent view reporting clicks and hover positions.

<PointerView ... />

Overview

onClick(view, x, y, clickCount) and onHover(view, x, y) receive top-left coordinates; hover reports nil coordinates when the pointer leaves. Charts place one over their marks to hit test in Lua.

Topics

Properties

Name Type Required Description
onClick function optional Click callback.
onHover function optional Hover callback.
onDrag function optional onDrag(view, x, y) -> path: dragging from that point drags the file.
onKey function optional onKey(view, key) -> handled; the view takes keyboard focus when clicked.

Platform notes

  • AppKit uses the AppKit implementation.

Source: lua/embedded/AppKit.lua:2206 (AppKit.PointerView)