Skip to content

get_mbutton_sub_pixGetMbuttonSubPixGetMbuttonSubPixget_mbutton_sub_pixT_get_mbutton_sub_pix🔗

Short description🔗

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

Signature🔗

get_mbutton_sub_pix( window WindowHandle, out point.y Row, out point.x Column, out integer Button )void GetMbuttonSubPix( const HTuple& WindowHandle, HTuple* Row, HTuple* Column, HTuple* Button )static void HOperatorSet.GetMbuttonSubPix( HTuple windowHandle, out HTuple row, out HTuple column, out HTuple button )def get_mbutton_sub_pix( window_handle: HHandle ) -> Tuple[float, float, int]

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

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

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

Description🔗

get_mbutton_sub_pixGetMbuttonSubPix 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 keys added to the value of the pressed mouse button is returned in Buttonbuttonbutton.

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

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

Attention🔗

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

Execution information🔗

Execution information
  • Multithreading type: reentrant (runs in parallel with non-exclusive operators).

  • Multithreading scope: global (may be called from any thread).

  • Processed without parallelization.

Parameters🔗

WindowHandlewindowHandlewindow_handle (input_control) window → (handle)HTuple (HHandle)HWindow, HTuple (IntPtr)HHandleHtuple (handle)

Window handle.

Rowrowrow (output_control) point.y → (real)HTuple (double)HTuple (double)floatHtuple (double)

Row coordinate of the mouse cursor in the image coordinate system.

Columncolumncolumn (output_control) point.x → (real)HTuple (double)HTuple (double)floatHtuple (double)

Column coordinate of the mouse cursor in the image coordinate system.

Buttonbuttonbutton (output_control) integer → (integer)HTuple (Hlong)HTuple (int / long)intHtuple (Hlong)

Mouse button(s) pressed.

Result🔗

get_mbutton_sub_pixGetMbuttonSubPix returns the value 2 (H_MSG_TRUE).

Combinations with other operators🔗

Combinations

Possible predecessors

open_windowOpenWindow

Alternatives

get_mbuttonGetMbutton, get_mpositionGetMposition, get_mposition_sub_pixGetMpositionSubPix

See also

open_windowOpenWindow

Module🔗

Foundation