User's Guide > Graphics > Getting Mouse Input
Getting Mouse Input
The following methods are used to read the mouse position in screen coordinates when the mouse button is pressed. Each method outputs the position and an enumerated type description of which mouse button was pressed when the mouse was at that position. These values are contained in the class pfcMouseStatus.
The enumerated values are defined in pfcMouseButton and are as follows:
MOUSE_BTN_LEFT
MOUSE_BTN_RIGHT
MOUSE_BTN_MIDDLE
MOUSE_BTN_LEFT_DOUBLECLICK
Methods Introduced:
The method pfcSession.UIGetNextMousePick() returns the mouse position when you press a mouse button. The input argument is the mouse button that you expect the user to select.
The method pfcSession.UIGetCurrentMouseStatus() returns a value whenever the mouse is moved or a button is pressed. With this method a button does not have to be pressed for a value to be returned. You can use an input argument to flag whether or not the returned positions are snapped to the window grid.
Was this helpful?