檢視原始碼 wxSetCursorEvent (wx v2.4.3)
當滑鼠游標因滑鼠移動而即將被設定時,會從 wxWindow
產生一個 wxSetCursorEvent
。
這個事件讓應用程式有機會根據滑鼠在視窗內的目前位置執行特定的滑鼠游標處理。使用 setCursor/2
來指定您想要顯示的游標。
請參閱
這個類別繼承自,並且可以使用以下類別中的函式:
wxWidgets 文件: wxSetCursorEvent
事件
使用 wxEvtHandler:connect/3
以及 wxSetCursorEventType
來訂閱此類型的事件。
摘要
型別
-type wxSetCursor() :: #wxSetCursor{type :: wxSetCursorEvent:wxSetCursorEventType(), x :: integer(), y :: integer(), cursor :: wxCursor:wxCursor()}.
-type wxSetCursorEvent() :: wx:wx_object().
-type wxSetCursorEventType() :: set_cursor.
函式
-spec getCursor(This) -> wxCursor:wxCursor() when This :: wxSetCursorEvent().
傳回此事件指定的游標的參考。
-spec getX(This) -> integer() when This :: wxSetCursorEvent().
傳回滑鼠在客戶端座標中的 X 座標。
-spec getY(This) -> integer() when This :: wxSetCursorEvent().
傳回滑鼠在客戶端座標中的 Y 座標。
-spec hasCursor(This) -> boolean() when This :: wxSetCursorEvent().
如果此事件指定的游標是有效的游標,則傳回 true。
備註:您無法使用此事件指定 wxNullCursor,因為它不被視為有效的游標。
-spec setCursor(This, Cursor) -> ok when This :: wxSetCursorEvent(), Cursor :: wxCursor:wxCursor().
設定與此事件關聯的游標。