send_mouse_down_eventT_send_mouse_down_eventSendMouseDownEventSendMouseDownEventsend_mouse_down_event (算子名称)

名称

send_mouse_down_eventT_send_mouse_down_eventSendMouseDownEventSendMouseDownEventsend_mouse_down_event — Send an event to a window buffer signaling a mouse down event.

参数签名

send_mouse_down_event( : : WindowHandle, Row, Column, Button : Processed)

Herror T_send_mouse_down_event(const Htuple WindowHandle, const Htuple Row, const Htuple Column, const Htuple Button, Htuple* Processed)

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

HString HWindow::SendMouseDownEvent(const HTuple& Row, const HTuple& Column, Hlong Button) const

HString HWindow::SendMouseDownEvent(Hlong Row, Hlong Column, Hlong Button) const

static HString HDrawingObject::SendMouseDownEvent(const HWindow& WindowHandle, const HTuple& Row, const HTuple& Column, Hlong Button)

static HString HDrawingObject::SendMouseDownEvent(const HWindow& WindowHandle, Hlong Row, Hlong Column, Hlong Button)

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

string HWindow.SendMouseDownEvent(HTuple row, HTuple column, int button)

string HWindow.SendMouseDownEvent(int row, int column, int button)

static string HDrawingObject.SendMouseDownEvent(HWindow windowHandle, HTuple row, HTuple column, int button)

static string HDrawingObject.SendMouseDownEvent(HWindow windowHandle, int row, int column, int button)

def send_mouse_down_event(window_handle: HHandle, row: Union[float, int], column: Union[float, int], button: int) -> str

描述

send_mouse_down_eventsend_mouse_down_eventSendMouseDownEventSendMouseDownEventSendMouseDownEventsend_mouse_down_event sends an event at the position (RowRowRowRowrowrow, ColumnColumnColumnColumncolumncolumn) to the buffer window WindowHandleWindowHandleWindowHandleWindowHandlewindowHandlewindow_handle, signaling that the mouse button encoded by ButtonButtonButtonButtonbuttonbutton has been pressed. Please refer to get_mbuttonget_mbuttonGetMbuttonGetMbuttonGetMbuttonget_mbutton to see how to encode ButtonButtonButtonButtonbuttonbutton.

The purpose of this operator is to manipulate drawing objects in a buffer window. If the coordinates RowRowRowRowrowrow and ColumnColumnColumnColumncolumncolumn are pointing on a drawing object, it is activated and can be moved or changed by sending more events with the send_mouse_down_eventsend_mouse_down_eventSendMouseDownEventSendMouseDownEventSendMouseDownEventsend_mouse_down_event operator. To simplify the interaction with the drawing object, the coordinates RowRowRowRowrowrow and ColumnColumnColumnColumncolumncolumn are given in the image coordinate system. To convert window coordinates into image coordinates, 该算子 convert_coordinates_window_to_imageconvert_coordinates_window_to_imageConvertCoordinatesWindowToImageConvertCoordinatesWindowToImageConvertCoordinatesWindowToImageconvert_coordinates_window_to_image can be used.

If the event could be processed, send_mouse_down_eventsend_mouse_down_eventSendMouseDownEventSendMouseDownEventSendMouseDownEventsend_mouse_down_event returns 'true'"true""true""true""true""true" in ProcessedProcessedProcessedProcessedprocessedprocessed. If no action for the event could be determined (e.g., because there is no drawing object below the mouse position), 'false'"false""false""false""false""false" is returned in ProcessedProcessedProcessedProcessedprocessedprocessed. In this case the caller may determine an action for the event.

该算子s send_mouse_down_eventsend_mouse_down_eventSendMouseDownEventSendMouseDownEventSendMouseDownEventsend_mouse_down_event, send_mouse_up_eventsend_mouse_up_eventSendMouseUpEventSendMouseUpEventSendMouseUpEventsend_mouse_up_event, send_mouse_drag_eventsend_mouse_drag_eventSendMouseDragEventSendMouseDragEventSendMouseDragEventsend_mouse_drag_event and send_mouse_double_click_eventsend_mouse_double_click_eventSendMouseDoubleClickEventSendMouseDoubleClickEventSendMouseDoubleClickEventsend_mouse_double_click_event are the only means to manipulate drawing objects in buffer windows.

注意

send_mouse_down_eventsend_mouse_down_eventSendMouseDownEventSendMouseDownEventSendMouseDownEventsend_mouse_down_event depends on the library libcanvas, which might not be available on embedded systems.

运行信息

参数表

WindowHandleWindowHandleWindowHandleWindowHandlewindowHandlewindow_handle (input_control)  window HWindow, HTupleHHandleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)

Window handle of the buffer window.

RowRowRowRowrowrow (input_control)  point.y HTupleUnion[float, int]HTupleHtuple (integer / real) (int / long / double) (Hlong / double) (Hlong / double)

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

ColumnColumnColumnColumncolumncolumn (input_control)  point.x HTupleUnion[float, int]HTupleHtuple (integer / real) (int / long / double) (Hlong / double) (Hlong / double)

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

ButtonButtonButtonButtonbuttonbutton (input_control)  integer HTupleintHTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Mouse button(s) pressed.

ProcessedProcessedProcessedProcessedprocessedprocessed (output_control)  string HTuplestrHTupleHtuple (string) (string) (HString) (char*)

'true', if HALCON processed the event.

结果

send_mouse_down_eventsend_mouse_down_eventSendMouseDownEventSendMouseDownEventSendMouseDownEventsend_mouse_down_event 返回值 2 ( H_MSG_TRUE) if the window handle WindowHandleWindowHandleWindowHandleWindowHandlewindowHandlewindow_handle corresponds to a window of valid type, and the event is properly encoded. Otherwise, an exception is raised.

可能的前置算子

open_windowopen_windowOpenWindowOpenWindowOpenWindowopen_window

参考其它

send_mouse_up_eventsend_mouse_up_eventSendMouseUpEventSendMouseUpEventSendMouseUpEventsend_mouse_up_event, send_mouse_double_click_eventsend_mouse_double_click_eventSendMouseDoubleClickEventSendMouseDoubleClickEventSendMouseDoubleClickEventsend_mouse_double_click_event, open_windowopen_windowOpenWindowOpenWindowOpenWindowopen_window

模块

Foundation