.. index:: pair: class; EE::Window::CursorManager .. _doxid-class_e_e_1_1_window_1_1_cursor_manager: class EE::Window::CursorManager =============================== .. toctree:: :hidden: class_EE_Window_CursorManager_GlobalCursor.rst Overview ~~~~~~~~ .. ref-code-block:: cpp :class: doxyrest-overview-code-block #include class CursorManager { public: // classes class :ref:`GlobalCursor`; // construction :target:`CursorManager`(:ref:`EE::Window::Window`* window); virtual :target:`~CursorManager`(); // methods virtual :ref:`Cursor`* :ref:`create`(:ref:`Texture`* tex, const :ref:`Vector2i`& hotspot, const std::string& name) = 0; virtual :ref:`Cursor`* :ref:`create`(:ref:`Image`* img, const :ref:`Vector2i`& hotspot, const std::string& name) = 0; virtual :ref:`Cursor`* :ref:`create`(const std::string& path, const :ref:`Vector2i`& hotspot, const std::string& name) = 0; virtual :ref:`Cursor`* :ref:`add`(:ref:`Cursor`* cursor); virtual void :ref:`remove`(:ref:`Cursor`* cursor, bool Delete = false) = 0; virtual void :ref:`remove`(const std::string& name, bool Delete = false); virtual void :ref:`remove`(const :ref:`String::HashType`& id, bool Delete = false); virtual :ref:`Cursor`* :ref:`get`(const std::string& name); virtual :ref:`Cursor`* :ref:`getById`(const :ref:`String::HashType`& id); virtual void :ref:`set`(const std::string& name); virtual void :ref:`setById`(const :ref:`String::HashType`& id); virtual void :ref:`set`(:ref:`Cursor`* cursor) = 0; virtual void :ref:`set`(:ref:`Cursor::SysType` syscurid) = 0; virtual void :ref:`set`(:ref:`Cursor::Type` cursor); virtual void :ref:`setGlobalCursor`(:ref:`Cursor::Type` cursor, :ref:`Cursor`* fromCursor); virtual void :ref:`setGlobalCursor`(:ref:`Cursor::Type` cursor, :ref:`Cursor::SysType` fromCursor); virtual void :ref:`show`() = 0; virtual void :ref:`hide`() = 0; virtual void :ref:`reload`() = 0; virtual void :ref:`setVisible`(bool visible) = 0; virtual bool :ref:`getVisible`(); :ref:`Cursor`* :ref:`getCurrent`() const; :ref:`Cursor::SysType` :ref:`getCurrentSysCursor`() const; bool :ref:`currentIsSysCursor`() const; }; .. _details-class_e_e_1_1_window_1_1_cursor_manager: Detailed Documentation ~~~~~~~~~~~~~~~~~~~~~~ Methods ------- .. index:: pair: function; create .. _doxid-class_e_e_1_1_window_1_1_cursor_manager_1a6d6d49c5642846eb18a75e8c4cfa9eda: .. ref-code-block:: cpp :class: doxyrest-title-code-block virtual :ref:`Cursor`* create(:ref:`Texture`* tex, const :ref:`Vector2i`& hotspot, const std::string& name) = 0 Creates a cursor from a texture .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - tex - The texture pointer to use as cursor * - hotspot - The hotspot where the mouse click is taken * - name - The name of the cursor .. index:: pair: function; create .. _doxid-class_e_e_1_1_window_1_1_cursor_manager_1af4b2319d1c16fd4c2461fe71b95dbd92: .. ref-code-block:: cpp :class: doxyrest-title-code-block virtual :ref:`Cursor`* create(:ref:`Image`* img, const :ref:`Vector2i`& hotspot, const std::string& name) = 0 Creates a cursor from a image .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - img - The image path * - hotspot - The hotspot where the mouse click is taken * - name - The name of the cursor .. index:: pair: function; create .. _doxid-class_e_e_1_1_window_1_1_cursor_manager_1a2fba482f3af2e041ef3cc65fb97fbcc7: .. ref-code-block:: cpp :class: doxyrest-title-code-block virtual :ref:`Cursor`* create(const std::string& path, const :ref:`Vector2i`& hotspot, const std::string& name) = 0 Creates a cursor from a image path .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - path - The image pointer to use as cursor * - hotspot - The hotspot where the mouse click is taken * - name - The name of the cursor .. index:: pair: function; add .. _doxid-class_e_e_1_1_window_1_1_cursor_manager_1a5e143e7c0cf7e9a2eddfa58501fc3399: .. ref-code-block:: cpp :class: doxyrest-title-code-block virtual :ref:`Cursor`* add(:ref:`Cursor`* cursor) Adds the cursor to the cursor manager .. index:: pair: function; remove .. _doxid-class_e_e_1_1_window_1_1_cursor_manager_1a7ea0507d8a22dc94d62f97d9c9ae7ca8: .. ref-code-block:: cpp :class: doxyrest-title-code-block virtual void remove(:ref:`Cursor`* cursor, bool Delete = false) = 0 Removes the cursor from the cursor manager .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - cursor - The cursor pointer * - Delete - Indicates if the cursor must be delete after being removed from the cursor manager .. index:: pair: function; remove .. _doxid-class_e_e_1_1_window_1_1_cursor_manager_1ae8a040593e9faa21a9c54bd6d4108a1d: .. ref-code-block:: cpp :class: doxyrest-title-code-block virtual void remove(const std::string& name, bool Delete = false) Removes the cursor by its name .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - name - The cursor name * - Delete - Indicates if the cursor must be delete after being removed from the cursor manager .. index:: pair: function; remove .. _doxid-class_e_e_1_1_window_1_1_cursor_manager_1a046b3e2436dc3cfbbb70ecec825447fa: .. ref-code-block:: cpp :class: doxyrest-title-code-block virtual void remove(const :ref:`String::HashType`& id, bool Delete = false) Removes the cursor by its id .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - id - The cursor pointer id * - Delete - Indicates if the cursor must be delete after being removed from the cursor manager .. index:: pair: function; get .. _doxid-class_e_e_1_1_window_1_1_cursor_manager_1a63b65d0f18e438d1a687582fedf21ee5: .. ref-code-block:: cpp :class: doxyrest-title-code-block virtual :ref:`Cursor`* get(const std::string& name) .. rubric:: Returns: The cursor pointer by its name .. index:: pair: function; getById .. _doxid-class_e_e_1_1_window_1_1_cursor_manager_1a9d008d53d5139f53e954833f3fa5fe83: .. ref-code-block:: cpp :class: doxyrest-title-code-block virtual :ref:`Cursor`* getById(const :ref:`String::HashType`& id) .. rubric:: Returns: The cursor pointer by its id .. index:: pair: function; set .. _doxid-class_e_e_1_1_window_1_1_cursor_manager_1a507dda6ace35f5bdadfe332cc9b193c7: .. ref-code-block:: cpp :class: doxyrest-title-code-block virtual void set(const std::string& name) Set the the current cursor by its name .. index:: pair: function; setById .. _doxid-class_e_e_1_1_window_1_1_cursor_manager_1af8204adc8d38abbae9f6c1087cc4154b: .. ref-code-block:: cpp :class: doxyrest-title-code-block virtual void setById(const :ref:`String::HashType`& id) Set the the current cursor by its id .. index:: pair: function; set .. _doxid-class_e_e_1_1_window_1_1_cursor_manager_1a73b4f5e0f60ee7e0fbfde6f2a57e8f7e: .. ref-code-block:: cpp :class: doxyrest-title-code-block virtual void set(:ref:`Cursor`* cursor) = 0 Set the the current cursor by its cursor pointer .. index:: pair: function; set .. _doxid-class_e_e_1_1_window_1_1_cursor_manager_1a56497d0357a13afba74db35824dc2348: .. ref-code-block:: cpp :class: doxyrest-title-code-block virtual void set(:ref:`Cursor::SysType` syscurid) = 0 Set the cursor using a system cursor .. index:: pair: function; set .. _doxid-class_e_e_1_1_window_1_1_cursor_manager_1ab80f4ee9486d02768d421add0c5f622e: .. ref-code-block:: cpp :class: doxyrest-title-code-block virtual void set(:ref:`Cursor::Type` cursor) Set the cursor as the global cursor used in eepp .. rubric:: See also: SetGlobalCursor .. index:: pair: function; setGlobalCursor .. _doxid-class_e_e_1_1_window_1_1_cursor_manager_1a83ad4f9e1bceb2671bdaef682750b804: .. ref-code-block:: cpp :class: doxyrest-title-code-block virtual void setGlobalCursor(:ref:`Cursor::Type` cursor, :ref:`Cursor`* fromCursor) A Global :ref:`Cursor ` is a cursor setted to be used in eepp. It's the system cursor of the engine. The global cursor can be a :ref:`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. .. index:: pair: function; setGlobalCursor .. _doxid-class_e_e_1_1_window_1_1_cursor_manager_1a80bb18afcf109d6b5744a3c5bf14b38a: .. ref-code-block:: cpp :class: doxyrest-title-code-block virtual void setGlobalCursor(:ref:`Cursor::Type` cursor, :ref:`Cursor::SysType` fromCursor) .. rubric:: See also: SetGlobalCursor .. index:: pair: function; show .. _doxid-class_e_e_1_1_window_1_1_cursor_manager_1a3747385cda8662a1a637cb82bdbf0502: .. ref-code-block:: cpp :class: doxyrest-title-code-block virtual void show() = 0 Force to show the cursor .. index:: pair: function; hide .. _doxid-class_e_e_1_1_window_1_1_cursor_manager_1a2d9ba331342f9573571804dc41c3659f: .. ref-code-block:: cpp :class: doxyrest-title-code-block virtual void hide() = 0 Hides the cursor .. index:: pair: function; reload .. _doxid-class_e_e_1_1_window_1_1_cursor_manager_1a943f326f0366365d5b43428813881c6d: .. ref-code-block:: cpp :class: doxyrest-title-code-block virtual void reload() = 0 Force to reset the state of the current seted cursor .. index:: pair: function; setVisible .. _doxid-class_e_e_1_1_window_1_1_cursor_manager_1ab3de68a1f18d6bc2c5f990ead80248ea: .. ref-code-block:: cpp :class: doxyrest-title-code-block virtual void setVisible(bool visible) = 0 Set to show/hide the cursor .. index:: pair: function; getVisible .. _doxid-class_e_e_1_1_window_1_1_cursor_manager_1a6af6c1f60ac1469e2c161243489bd16c: .. ref-code-block:: cpp :class: doxyrest-title-code-block virtual bool getVisible() .. rubric:: Returns: If the cursor is visible in the window .. index:: pair: function; getCurrent .. _doxid-class_e_e_1_1_window_1_1_cursor_manager_1ad0b8fd005bfb8d681d0cf3d59d46e304: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`Cursor`* getCurrent() const .. rubric:: Returns: A pointer to the curent cursor .. index:: pair: function; getCurrentSysCursor .. _doxid-class_e_e_1_1_window_1_1_cursor_manager_1a5cf75410a7bb8150e2dfc25d39bd2836: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`Cursor::SysType` getCurrentSysCursor() const .. rubric:: Returns: The current system cursor .. index:: pair: function; currentIsSysCursor .. _doxid-class_e_e_1_1_window_1_1_cursor_manager_1a5fcf01170b1f34fc5c857b4aaa91a937: .. ref-code-block:: cpp :class: doxyrest-title-code-block bool currentIsSysCursor() const .. rubric:: Returns: True if the current cursor seted is a system cursor