class EE::Window::CursorManager¶
Overview¶
#include <cursormanager.hpp> class CursorManager { public: // classes class GlobalCursor; // construction CursorManager(EE::Window::Window* window); virtual ~CursorManager(); // methods virtual Cursor* create(Texture* tex, const Vector2i& hotspot, const std::string& name) = 0; virtual Cursor* create(Image* img, const Vector2i& hotspot, const std::string& name) = 0; virtual Cursor* create(const std::string& path, const Vector2i& hotspot, const std::string& name) = 0; virtual Cursor* add(Cursor* cursor); virtual void remove(Cursor* cursor, bool Delete = false) = 0; virtual void remove(const std::string& name, bool Delete = false); virtual void remove(const String::HashType& id, bool Delete = false); virtual Cursor* get(const std::string& name); virtual Cursor* getById(const String::HashType& id); virtual void set(const std::string& name); virtual void setById(const String::HashType& id); virtual void set(Cursor* cursor) = 0; virtual void set(Cursor::SysType syscurid) = 0; virtual void set(Cursor::Type cursor); virtual void setGlobalCursor(Cursor::Type cursor, Cursor* fromCursor); virtual void setGlobalCursor(Cursor::Type cursor, Cursor::SysType fromCursor); virtual void show() = 0; virtual void hide() = 0; virtual void reload() = 0; virtual void setVisible(bool visible) = 0; virtual bool getVisible(); Cursor* getCurrent() const; Cursor::SysType getCurrentSysCursor() const; bool currentIsSysCursor() const; };
Detailed Documentation¶
Methods¶
virtual Cursor* create(Texture* tex, const Vector2i& hotspot, const std::string& name) = 0
Creates a cursor from a texture
Parameters:
tex |
The texture pointer to use as cursor |
hotspot |
The hotspot where the mouse click is taken |
name |
The name of the cursor |
virtual Cursor* create(Image* img, const Vector2i& hotspot, const std::string& name) = 0
Creates a cursor from a image
Parameters:
img |
The image path |
hotspot |
The hotspot where the mouse click is taken |
name |
The name of the cursor |
virtual Cursor* create(const std::string& path, const Vector2i& hotspot, const std::string& name) = 0
Creates a cursor from a image path
Parameters:
path |
The image pointer to use as cursor |
hotspot |
The hotspot where the mouse click is taken |
name |
The name of the cursor |
virtual Cursor* add(Cursor* cursor)
Adds the cursor to the cursor manager
virtual void remove(Cursor* cursor, bool Delete = false) = 0
Removes the cursor from the cursor manager
Parameters:
cursor |
The cursor pointer |
Delete |
Indicates if the cursor must be delete after being removed from the cursor manager |
virtual void remove(const std::string& name, bool Delete = false)
Removes the cursor by its name
Parameters:
name |
The cursor name |
Delete |
Indicates if the cursor must be delete after being removed from the cursor manager |
virtual void remove(const String::HashType& id, bool Delete = false)
Removes the cursor by its id
Parameters:
id |
The cursor pointer id |
Delete |
Indicates if the cursor must be delete after being removed from the cursor manager |
virtual Cursor* get(const std::string& name)
Returns:
The cursor pointer by its name
virtual Cursor* getById(const String::HashType& id)
Returns:
The cursor pointer by its id
virtual void set(const std::string& name)
Set the the current cursor by its name
virtual void setById(const String::HashType& id)
Set the the current cursor by its id
virtual void set(Cursor* cursor) = 0
Set the the current cursor by its cursor pointer
virtual void set(Cursor::SysType syscurid) = 0
Set the cursor using a system cursor
virtual void set(Cursor::Type cursor)
Set the cursor as the global cursor used in eepp
See also:
SetGlobalCursor
virtual void setGlobalCursor(Cursor::Type cursor, Cursor* fromCursor)
A Global Cursor is a cursor setted to be used in eepp. It’s the system cursor of the engine. The global cursor can be a Cursor ( user created cursor ) or a system cursor ( the OS cursor ). * The system cursor is used by default, but can be override it with this function.
virtual void setGlobalCursor(Cursor::Type cursor, Cursor::SysType fromCursor)
See also:
SetGlobalCursor
virtual void show() = 0
Force to show the cursor
virtual void hide() = 0
Hides the cursor
virtual void reload() = 0
Force to reset the state of the current seted cursor
virtual void setVisible(bool visible) = 0
Set to show/hide the cursor
virtual bool getVisible()
Returns:
If the cursor is visible in the window
Cursor* getCurrent() const
Returns:
A pointer to the curent cursor
Cursor::SysType getCurrentSysCursor() const
Returns:
The current system cursor
bool currentIsSysCursor() const
Returns:
True if the current cursor seted is a system cursor