25 #ifndef GRAPHICS_AURORA_CURSORMAN_H 26 #define GRAPHICS_AURORA_CURSORMAN_H 61 const Common::UString &state =
"",
int hotspotX = -1,
int hotspotY = -1);
101 typedef std::map<Common::UString, Cursor *>
StateMap;
129 #define CursorMan Graphics::Aurora::CursorManager::instance() 131 #endif // GRAPHICS_AURORA_CURSORMAN_H
bool add(const Common::UString &name, const Common::UString &group, const Common::UString &state="", int hotspotX=-1, int hotspotY=-1)
Add a cursor.
Class and macro for implementing singletons.
void setPosition(int x, int y)
Move the cursor to a specific position.
const Common::UString & getCurrentGroup() const
Return the current group.
Common::UString _currentState
A class holding an UTF-8 string.
void reset()
Reset the cursor to the system's default.
void setGroup(const Common::UString &group)
Set the cursor to another group, using the current state name.
void setState(const Common::UString &state)
Set the cursor to a different state within the current group.
Common::UString _currentGroup
const Common::UString & getCurrentState() const
Return the current state.
void clear()
Remove all managed cursors.
Generic template base class for implementing the singleton design pattern.
void toScreenCoordinates(int x, int y, float &sX, float &sY)
Convert cursor position to screen position.
bool isVisible() const
Is a cursor current visible?
Cursor * find(Common::UString &group, Common::UString &state, bool def=false) const
Common::UString _defaultState
void hideCursor()
Hide the cursor completely.
Low-level type definitions to handle fixed width types portably.
void setDefault(const Common::UString &group, const Common::UString &state="")
Register this cursor as the default cursor.
The global Aurora cursor manager.
Common::UString _defaultGroup
void fromScreenCoordinates(float sX, float sY, int &x, int &y)
Convert screen position to cursor position.
std::map< Common::UString, Cursor * > StateMap
std::map< Common::UString, StateMap > CursorMap
A cursor as used in the Aurora engines.
void showCursor()
Unhide the cursor.
uint8 getPosition(int &x, int &y) const
Get the current cursor position.