26#ifndef TGUI_BITMAP_BUTTON_HPP
27#define TGUI_BITMAP_BUTTON_HPP
30#include <TGUI/Widgets/Button.hpp>
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);
126 void setImageScaling(
float relativeHeight);
134 float getImageScaling() const;
145 void rendererChanged(const
String& property) override;
151 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;
Class to store the position or size of a widget.
Definition: Layout.hpp:284
Wrapper class to store strings.
Definition: String.hpp:79
Definition: Texture.hpp:52
Namespace that contains all TGUI functions and classes.
Definition: AbsoluteOrRelativeValue.hpp:36