41 using Ptr = std::shared_ptr<BitmapButton>;
42 using ConstPtr = std::shared_ptr<const BitmapButton>;
44 static constexpr const char StaticWidgetType[] =
"BitmapButton";
53 BitmapButton(
const char* typeName = StaticWidgetType,
bool initRenderer =
true);
108 TGUI_NODISCARD const
Texture& getImage() const;
116 void setImageScaling(
float relativeHeight);
123 TGUI_NODISCARD
float getImageScaling() const;
133 void rendererChanged(const
String& property) override;
138 TGUI_NODISCARD std::unique_ptr<DataIO::Node> save(SavingRenderersMap& renderers) const override;
143 void load(const std::unique_ptr<DataIO::Node>& node, const LoadingRenderersMap& renderers) override;
148 void updateSize() override;
153 void initComponentsBitmapButton();
158 void updateTextPosition() override;
171 void recalculateGlyphSize();
176 priv::dev::StyleProperty<
Texture> icon;
179 std::shared_ptr<priv::dev::ImageComponent> m_imageComponent;
181 float m_relativeGlyphHeight = 0;
Texture wrapper that internally reuses resources when multiple Texture objects are loaded from the sa...
Definition Texture.hpp:57