.. index:: pair: class; EE::Graphics::DrawableResource .. _doxid-class_e_e_1_1_graphics_1_1_drawable_resource: class EE::Graphics::DrawableResource ==================================== .. toctree:: :hidden: enum_EE_Graphics_DrawableResource_Event.rst Overview ~~~~~~~~ .. ref-code-block:: cpp :class: doxyrest-overview-code-block #include class DrawableResource: public :ref:`EE::Graphics::Drawable` { public: // typedefs typedef std::function`, :ref:`Event`, DrawableResource*)> :target:`OnResourceChangeCallback`; // enums enum :ref:`Event`; // construction virtual :target:`~DrawableResource`(); // methods const :ref:`String::HashType`& :ref:`getId`() const; const std::string :ref:`getName`() const; void :ref:`setName`(const std::string& name); virtual bool :ref:`isDrawableResource`() const; :ref:`Uint32` :ref:`pushResourceChangeCallback`(const :ref:`OnResourceChangeCallback`& cb); bool :ref:`popResourceChangeCallback`(const :ref:`Uint32`& callbackId); }; Inherited Members ----------------- .. ref-code-block:: cpp :class: doxyrest-overview-inherited-code-block public: // enums enum :ref:`Type`; // methods virtual :ref:`Sizef` :ref:`getSize`() = 0; virtual :ref:`Sizef` :ref:`getPixelsSize`() = 0; virtual void :ref:`draw`() = 0; virtual void :ref:`draw`(const :ref:`Vector2f`& position) = 0; virtual void :ref:`draw`(const :ref:`Vector2f`& position, const :ref:`Sizef`& size) = 0; virtual bool :ref:`isStateful`() = 0; void :ref:`setAlpha`(:ref:`Uint8` alpha); const :ref:`Uint8`& :ref:`getAlpha`(); void :ref:`setColor`(const :ref:`Color`& color); const :ref:`Color`& :ref:`getColor`() const; void :ref:`setColorFilter`(const :ref:`Color`& color); :ref:`RGB` :ref:`getColorFilter`(); void :ref:`clearColor`(); void :ref:`clearColorFilter`(); void :ref:`resetAlpha`(); :ref:`Type` :ref:`getDrawableType`() const; const :ref:`Vector2f`& :ref:`getPosition`() const; void :ref:`setPosition`(const :ref:`Vector2f`& position); virtual bool :ref:`isDrawableResource`() const; .. _details-class_e_e_1_1_graphics_1_1_drawable_resource: Detailed Documentation ~~~~~~~~~~~~~~~~~~~~~~ Methods ------- .. index:: pair: function; getId .. _doxid-class_e_e_1_1_graphics_1_1_drawable_resource_1a6485b8e25b4ef0125452aaa7b454afcc: .. ref-code-block:: cpp :class: doxyrest-title-code-block const :ref:`String::HashType`& getId() const .. rubric:: Returns: The :ref:`DrawableResource ` Id. The Id is the :ref:`String::hash ` of the name. .. index:: pair: function; getName .. _doxid-class_e_e_1_1_graphics_1_1_drawable_resource_1a1a6d9675cb55da00aeadb7be9f7380dc: .. ref-code-block:: cpp :class: doxyrest-title-code-block const std::string getName() const .. rubric:: Returns: The :ref:`DrawableResource ` Name. .. index:: pair: function; setName .. _doxid-class_e_e_1_1_graphics_1_1_drawable_resource_1a9db72bfca70eb6698564bf8e92c82ecc: .. ref-code-block:: cpp :class: doxyrest-title-code-block void setName(const std::string& name) Sets the :ref:`DrawableResource ` Name, it will also change the Id. .. index:: pair: function; isDrawableResource .. _doxid-class_e_e_1_1_graphics_1_1_drawable_resource_1ad89e7c32a999165bcc7b70a9df5d503b: .. ref-code-block:: cpp :class: doxyrest-title-code-block virtual bool isDrawableResource() const Always true .. index:: pair: function; pushResourceChangeCallback .. _doxid-class_e_e_1_1_graphics_1_1_drawable_resource_1a55be55eda8a2f5efc31cc9d5b2951a5e: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`Uint32` pushResourceChangeCallback(const :ref:`OnResourceChangeCallback`& cb) Push a new on resource change callback. .. rubric:: Returns: The Callback Id .. index:: pair: function; popResourceChangeCallback .. _doxid-class_e_e_1_1_graphics_1_1_drawable_resource_1a17f7aa7de639380d5f1830cc2764bb13: .. ref-code-block:: cpp :class: doxyrest-title-code-block bool popResourceChangeCallback(const :ref:`Uint32`& callbackId) Pop the on resource change callback id indicated.