MouseEventArgs.viewportPosition Property

Parent Object: MouseEventArgs
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/MouseEventArgs.h>

Description

Gets the coordinate of the mouse in viewport space, if the mouse is within a viewport. If the mouse is not over a viewport this property will return null.

Syntax

"mouseEventArgs_var" is a variable referencing a MouseEventArgs object.

# Get the value of the property.
propertyValue = mouseEventArgs_var.viewportPosition
"mouseEventArgs_var" is a variable referencing a MouseEventArgs object.
#include <Core/UserInterface/MouseEventArgs.h>

// Get the value of the property.
Ptr<Point2D> propertyValue = mouseEventArgs_var->viewportPosition();

Property Value

This is a read only property whose value is a Point2D.

Version

Introduced in version March 2017