.. index:: pair: class; EE::UI::UIIcon .. _doxid-class_e_e_1_1_u_i_1_1_u_i_icon: class EE::UI::UIIcon ==================== .. toctree:: :hidden: Overview ~~~~~~~~ .. ref-code-block:: cpp :class: doxyrest-overview-code-block #include class UIIcon { public: // construction virtual :target:`~UIIcon`(); // methods static :ref:`UIIconPtr` :target:`New`(const std::string& name); const std::string& :target:`getName`() const; virtual const :ref:`DrawablePtr`& :ref:`getSource`(const int& size) const; :ref:`DrawablePtr` :ref:`createDrawable`(const int& size) const; virtual void :target:`setSource`(const int& size, :ref:`DrawablePtr` drawable); }; .. _details-class_e_e_1_1_u_i_1_1_u_i_icon: Detailed Documentation ~~~~~~~~~~~~~~~~~~~~~~ Methods ------- .. index:: pair: function; getSource .. _doxid-class_e_e_1_1_u_i_1_1_u_i_icon_1ab6da2bdac5e34112b40216d361695791: .. ref-code-block:: cpp :class: doxyrest-title-code-block virtual const :ref:`DrawablePtr`& getSource(const int& size) const Returns the icon source closest to the requested size. The returned drawable is shared icon data and must not be mutated by consumers. Use :ref:`createDrawable() ` when a consumer needs its own mutable drawable instance. .. index:: pair: function; createDrawable .. _doxid-class_e_e_1_1_u_i_1_1_u_i_icon_1aa07c7365121ad2188cd59b01ef824059: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`DrawablePtr` createDrawable(const int& size) const Creates a private drawable instance for a consumer. This must not be called from a rendering loop; retain the returned instance instead.