43 using Ptr = std::shared_ptr<BitmapButton>;
44 using ConstPtr = std::shared_ptr<const BitmapButton>;
46 static constexpr const char StaticWidgetType[] =
"BitmapButton";
56 BitmapButton(
const char* typeName = StaticWidgetType,
bool initRenderer =
true);
117 TGUI_NODISCARD const
Texture& getImage() const;
126 void setImageScaling(
float relativeHeight);
134 TGUI_NODISCARD
float getImageScaling() const;
145 void rendererChanged(const
String& property) override;
151 TGUI_NODISCARD std::unique_ptr<DataIO::Node> save(SavingRenderersMap& renderers) const override;
157 void load(const std::unique_ptr<DataIO::Node>& node, const LoadingRenderersMap& renderers) override;
163 void updateSize() override;
169 void initComponentsBitmapButton();
175 void updateTextPosition() override;
190 void recalculateGlyphSize();
196 priv::dev::StyleProperty<
Texture> icon;
199 std::shared_ptr<priv::dev::ImageComponent> m_imageComponent;
201 float m_relativeGlyphHeight = 0;
Texture wrapper that internally reuses resources when multiple Texture objects are loaded from the sa...
Definition Texture.hpp:58