ClassesClasses | | Operators

get_mbutton_sub_pixget_mbutton_sub_pixGetMbuttonSubPixGetMbuttonSubPix (Operator)

Name

get_mbutton_sub_pixget_mbutton_sub_pixGetMbuttonSubPixGetMbuttonSubPix — Wait until a mouse button is pressed and get the subpixel mouse position.

Signature

get_mbutton_sub_pix( : : WindowHandle : Row, Column, Button)

Herror get_mbutton_sub_pix(const Hlong WindowHandle, double* Row, double* Column, Hlong* Button)

Herror T_get_mbutton_sub_pix(const Htuple WindowHandle, Htuple* Row, Htuple* Column, Htuple* Button)

void GetMbuttonSubPix(const HTuple& WindowHandle, HTuple* Row, HTuple* Column, HTuple* Button)

void HWindow::GetMbuttonSubPix(double* Row, double* Column, Hlong* Button) const

static void HOperatorSet.GetMbuttonSubPix(HTuple windowHandle, out HTuple row, out HTuple column, out HTuple button)

void HWindow.GetMbuttonSubPix(out double row, out double column, out int button)

Description

get_mbutton_sub_pixget_mbutton_sub_pixGetMbuttonSubPixGetMbuttonSubPixGetMbuttonSubPix returns the subpixel accurate image coordinates of the mouse pointer in the output window and the mouse button pressed. In addition the state of the modifier keys is returned. The following values are assigned to the individual buttons and keys:

1:

Left button,

2:

Middle button,

4:

Right button,

8:

Shift key,

16:

Ctrl key,

32:

Alt key.

The sum of the values for all pressed buttons/keys is returned in ButtonButtonButtonButtonbutton.

The operator waits until a button is pressed in the output window. For graphics windows the coordinates RowRowRowRowrow and ColumnColumnColumnColumncolumn are expressed with consideration of the current image part (see set_partset_partSetPartSetPartSetPart).

If only pixel accurate image coordinates are required, you can use the operator get_mbuttonget_mbuttonGetMbuttonGetMbuttonGetMbutton.

Attention

get_mbutton_sub_pixget_mbutton_sub_pixGetMbuttonSubPixGetMbuttonSubPixGetMbuttonSubPix only returns if a mouse button is pressed in the window.

Execution Information

Parameters

WindowHandleWindowHandleWindowHandleWindowHandlewindowHandle (input_control)  window HWindow, HTupleHTupleHtuple (integer) (IntPtr) (Hlong) (Hlong)

Window handle.

RowRowRowRowrow (output_control)  point.y HTupleHTupleHtuple (real) (double) (double) (double)

Row coordinate of the mouse position in the window.

ColumnColumnColumnColumncolumn (output_control)  point.x HTupleHTupleHtuple (real) (double) (double) (double)

Column coordinate of the mouse position in the window.

ButtonButtonButtonButtonbutton (output_control)  integer HTupleHTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Mouse button(s) pressed.

Result

get_mbutton_sub_pixget_mbutton_sub_pixGetMbuttonSubPixGetMbuttonSubPixGetMbuttonSubPix returns the value 2 (H_MSG_TRUE).

Possible Predecessors

open_windowopen_windowOpenWindowOpenWindowOpenWindow

Alternatives

get_mbuttonget_mbuttonGetMbuttonGetMbuttonGetMbutton, get_mpositionget_mpositionGetMpositionGetMpositionGetMposition, get_mposition_sub_pixget_mposition_sub_pixGetMpositionSubPixGetMpositionSubPixGetMpositionSubPix

See also

open_windowopen_windowOpenWindowOpenWindowOpenWindow

Module

Foundation


ClassesClasses | | Operators