ViewerEventData
If a script implements the OnViewerEvent event, it receives a ViewerEventData object whenever certain events occur in a standalone image viewer.
event
string
Returns a string indicating the event that occurred. The events currently defined are:
create: A new viewer has been created.
destroy: A viewer window has been destroyed.
load: A new image has been loaded in a viewer. The item property can be used to find out which file was loaded.
setfocus: The viewer window has received focus (gone active).
killfocus: The viewer window has lost focus (gone inactive).
click: The left button was clicked on the image (requires mouse buttons to be set to trigger Script event in Preferences / Viewer / Mouse Buttons).
dblclk: The left button was double-clicked on the image.
mclick: The middle button was clicked on the image.
x
int
For the click events, returns the x coordinate within the viewer window that the click occurred.
y
int
For the click events, returns the y coordinate within the viewer window that the click occurred.
w
int
For the click events, returns the width of the viewer window.
h
int
For the click events, returns the height of the viewer window.
最后更新于