send_mouse_drag_eventT_send_mouse_drag_eventSendMouseDragEventSendMouseDragEventsend_mouse_drag_event (算子)
名称
send_mouse_drag_eventT_send_mouse_drag_eventSendMouseDragEventSendMouseDragEventsend_mouse_drag_event — 向缓冲窗口发送一个事件,表示鼠标拖动事件。
签名
void SendMouseDragEvent(const HTuple& WindowHandle, const HTuple& Row, const HTuple& Column, const HTuple& Button, HTuple* Processed)
HString HWindow::SendMouseDragEvent(const HTuple& Row, const HTuple& Column, Hlong Button) const
HString HWindow::SendMouseDragEvent(Hlong Row, Hlong Column, Hlong Button) const
static HString HDrawingObject::SendMouseDragEvent(const HWindow& WindowHandle, const HTuple& Row, const HTuple& Column, Hlong Button)
static HString HDrawingObject::SendMouseDragEvent(const HWindow& WindowHandle, Hlong Row, Hlong Column, Hlong Button)
static void HOperatorSet.SendMouseDragEvent(HTuple windowHandle, HTuple row, HTuple column, HTuple button, out HTuple processed)
string HWindow.SendMouseDragEvent(HTuple row, HTuple column, int button)
string HWindow.SendMouseDragEvent(int row, int column, int button)
static string HDrawingObject.SendMouseDragEvent(HWindow windowHandle, HTuple row, HTuple column, int button)
static string HDrawingObject.SendMouseDragEvent(HWindow windowHandle, int row, int column, int button)
描述
send_mouse_drag_eventsend_mouse_drag_eventSendMouseDragEventSendMouseDragEventSendMouseDragEventsend_mouse_drag_event sends an event
at the position (RowRowRowRowrowrow, ColumnColumnColumnColumncolumncolumn) to the buffer window
WindowHandleWindowHandleWindowHandleWindowHandlewindowHandlewindow_handle, signaling that the mouse button encoded by
ButtonButtonButtonButtonbuttonbutton is been dragged. Please refer to
get_mbuttonget_mbuttonGetMbuttonGetMbuttonGetMbuttonget_mbutton to see how to encode ButtonButtonButtonButtonbuttonbutton。
If the event could be processed, send_mouse_drag_eventsend_mouse_drag_eventSendMouseDragEventSendMouseDragEventSendMouseDragEventsend_mouse_drag_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.
The operators 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_drag_eventsend_mouse_drag_eventSendMouseDragEventSendMouseDragEventSendMouseDragEventsend_mouse_drag_event 依赖于 libcanvas 库,该库在嵌入式系统上可能不可用。
执行信息
- 多线程类型:可重入(与非独占算子并行运行)。
- 多线程作用域:全局(可从任何线程调用)。
- 未采用并行化处理。
参数
WindowHandleWindowHandleWindowHandleWindowHandlewindowHandlewindow_handle (输入控制) window → HWindow, HTupleHHandleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)
Window handle of the buffer window.
RowRowRowRowrowrow (输入控制) 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 (输入控制) 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 (输入控制) integer → HTupleintHTupleHtuple (integer) (int / long) (Hlong) (Hlong)
Mouse button(s) pressed.
ProcessedProcessedProcessedProcessedprocessedprocessed (输出控制) string → HTuplestrHTupleHtuple (string) (string) (HString) (char*)
'true', if HALCON processed the event.
结果
send_mouse_drag_eventsend_mouse_drag_eventSendMouseDragEventSendMouseDragEventSendMouseDragEventsend_mouse_drag_event 返回值 2 (
H_MSG_TRUE)
if the window
handle WindowHandleWindowHandleWindowHandleWindowHandlewindowHandlewindow_handle corresponds to a window of valid type, and the
event is properly encoded.否则,将抛出异常。
可能的前趋
open_windowopen_windowOpenWindowOpenWindowOpenWindowopen_window
另见
send_mouse_up_eventsend_mouse_up_eventSendMouseUpEventSendMouseUpEventSendMouseUpEventsend_mouse_up_event,
send_mouse_down_eventsend_mouse_down_eventSendMouseDownEventSendMouseDownEventSendMouseDownEventsend_mouse_down_event,
send_mouse_double_click_eventsend_mouse_double_click_eventSendMouseDoubleClickEventSendMouseDoubleClickEventSendMouseDoubleClickEventsend_mouse_double_click_event,
open_windowopen_windowOpenWindowOpenWindowOpenWindowopen_window
模块
基础