Queries and manipulates the mouse cursor; creates custom cursors. 更多...
#include <Mouse.h>
Public 成员函数 | |
| Module_REG (Mouse) | |
| virtual | ~Mouse () |
| Releases cursors owned by this module. | |
| virtual Cursor * | newCursor (eve::image::ImageData *data, int hotx, int hoty)=0 |
| Builds a custom cursor from image pixels with hotspot (hotx, hoty). | |
| virtual Cursor * | getSystemCursor (std::string cursortype)=0 |
| Returns a named system cursor (e.g. "arrow", "ibeam"); may cache. | |
| virtual void | setCursor (Cursor *cursor)=0 |
| Installs a cursor as the active OS cursor. | |
| virtual void | setCursor ()=0 |
| Restores the default system arrow cursor. | |
| virtual Cursor * | getCursor () const =0 |
| Currently installed cursor, or null for the default. | |
| virtual bool | isCursorSupported () const =0 |
| True when the platform supports software/hardware cursors. | |
| virtual double | getX () const =0 |
| Cursor X in window logical coordinates. | |
| virtual double | getY () const =0 |
| Cursor Y in window logical coordinates. | |
| virtual void | getPosition (double &x, double &y) const =0 |
| Writes cursor position in window logical coordinates. | |
| virtual void | setX (double x)=0 |
| Warps the cursor X while keeping Y. | |
| virtual void | setY (double y)=0 |
| Warps the cursor Y while keeping X. | |
| virtual void | setPosition (double x, double y)=0 |
| Warps the cursor to a logical window position. | |
| virtual void | setVisible (bool visible)=0 |
| Shows or hides the OS cursor. | |
| virtual bool | isDown (const std::vector< int > &buttons) const =0 |
| True if any listed mouse button index is currently down. | |
| virtual bool | isVisible () const =0 |
| True when the OS cursor is visible. | |
| virtual void | setGrabbed (bool grab)=0 |
| Confines the cursor to the window when grab is true. | |
| virtual bool | isGrabbed () const =0 |
| True when cursor grab is active. | |
| virtual bool | setRelativeMode (bool relative)=0 |
| Enables relative mouse mode (hidden cursor, motion deltas). | |
| virtual bool | getRelativeMode () const =0 |
| True when relative mouse mode is active. | |
| virtual double | getMovementX ()=0 |
| Pixel delta since the last getMovementX() (also latches Y for getMovementY). | |
| virtual double | getMovementY () const =0 |
| Pixel delta latched by the most recent getMovementX(); call X then Y each frame. | |
| float | getWheelX () const |
| Horizontal scroll from the latest platform pump; event-thread read, non-consuming. | |
| float | getWheelY () const |
| Vertical scroll from the latest platform pump; event-thread read, non-consuming. | |
Public 成员函数 继承自 eve::Module | |
| virtual | ~Module () |
| Module. | |
| virtual std::string | getName () const =0 |
| Returns the name. | |
详细描述
构造及析构函数说明
◆ ~Mouse()
|
virtual |
成员函数说明
◆ getCursor()
|
pure virtual |
Currently installed cursor, or null for the default.
在 eve::mouse::sdl::Mouse 内被实现.
◆ getMovementX()
|
pure virtual |
Pixel delta since the last getMovementX() (also latches Y for getMovementY).
在 eve::mouse::sdl::Mouse 内被实现.
◆ getMovementY()
|
pure virtual |
Pixel delta latched by the most recent getMovementX(); call X then Y each frame.
在 eve::mouse::sdl::Mouse 内被实现.
◆ getPosition()
|
pure virtual |
Writes cursor position in window logical coordinates.
在 eve::mouse::sdl::Mouse 内被实现.
◆ getRelativeMode()
|
pure virtual |
True when relative mouse mode is active.
在 eve::mouse::sdl::Mouse 内被实现.
◆ getSystemCursor()
|
pure virtual |
Returns a named system cursor (e.g. "arrow", "ibeam"); may cache.
在 eve::mouse::sdl::Mouse 内被实现.
◆ getWheelX()
| float eve::mouse::Mouse::getWheelX | ( | ) | const |
Horizontal scroll from the latest platform pump; event-thread read, non-consuming.
在文件 WheelInput.cpp 第 51 行定义.
◆ getWheelY()
| float eve::mouse::Mouse::getWheelY | ( | ) | const |
Vertical scroll from the latest platform pump; event-thread read, non-consuming.
在文件 WheelInput.cpp 第 52 行定义.
◆ getX()
|
pure virtual |
Cursor X in window logical coordinates.
在 eve::mouse::sdl::Mouse 内被实现.
◆ getY()
|
pure virtual |
Cursor Y in window logical coordinates.
在 eve::mouse::sdl::Mouse 内被实现.
◆ isCursorSupported()
|
pure virtual |
True when the platform supports software/hardware cursors.
在 eve::mouse::sdl::Mouse 内被实现.
◆ isDown()
|
pure virtual |
True if any listed mouse button index is currently down.
在 eve::mouse::sdl::Mouse 内被实现.
◆ isGrabbed()
|
pure virtual |
True when cursor grab is active.
在 eve::mouse::sdl::Mouse 内被实现.
◆ isVisible()
|
pure virtual |
True when the OS cursor is visible.
在 eve::mouse::sdl::Mouse 内被实现.
◆ Module_REG()
| eve::mouse::Mouse::Module_REG | ( | Mouse | ) |
◆ newCursor()
|
pure virtual |
Builds a custom cursor from image pixels with hotspot (hotx, hoty).
在 eve::mouse::sdl::Mouse 内被实现.
◆ setCursor() [1/2]
|
pure virtual |
Restores the default system arrow cursor.
在 eve::mouse::sdl::Mouse 内被实现.
◆ setCursor() [2/2]
|
pure virtual |
Installs a cursor as the active OS cursor.
在 eve::mouse::sdl::Mouse 内被实现.
◆ setGrabbed()
|
pure virtual |
Confines the cursor to the window when grab is true.
在 eve::mouse::sdl::Mouse 内被实现.
◆ setPosition()
|
pure virtual |
Warps the cursor to a logical window position.
在 eve::mouse::sdl::Mouse 内被实现.
◆ setRelativeMode()
|
pure virtual |
Enables relative mouse mode (hidden cursor, motion deltas).
在 eve::mouse::sdl::Mouse 内被实现.
◆ setVisible()
|
pure virtual |
Shows or hides the OS cursor.
在 eve::mouse::sdl::Mouse 内被实现.
◆ setX()
|
pure virtual |
Warps the cursor X while keeping Y.
在 eve::mouse::sdl::Mouse 内被实现.
◆ setY()
|
pure virtual |
Warps the cursor Y while keeping X.
在 eve::mouse::sdl::Mouse 内被实现.
该类的文档由以下文件生成:
- src/modules/mouse/Mouse.h
- src/modules/mouse/Mouse.cpp
- src/modules/mouse/sdl/WheelInput.cpp
Public 成员函数 继承自