25#ifndef TGUI_BITMAP_BUTTON_HPP
26#define TGUI_BITMAP_BUTTON_HPP
28#include <TGUI/Widgets/Button.hpp>
37 class TGUI_API BitmapButton :
public Button
40 using Ptr = std::shared_ptr<BitmapButton>;
41 using ConstPtr = std::shared_ptr<const BitmapButton>;
52 explicit BitmapButton(
const char* typeName =
StaticWidgetType,
bool initRenderer =
true);
72 BitmapButton&
operator=(BitmapButton&& other)
noexcept;
137 [[nodiscard]] std::unique_ptr<DataIO::Node>
save(SavingRenderersMap& renderers)
const override;
142 void load(
const std::unique_ptr<DataIO::Node>& node,
const LoadingRenderersMap& renderers)
override;
147 void updateSize()
override;
152 void initComponentsBitmapButton();
157 void updateTextPosition()
override;
170 void recalculateGlyphSize();
175 priv::dev::StyleProperty<Texture> icon;
178 std::shared_ptr<priv::dev::ImageComponent> m_imageComponent;
180 float m_relativeGlyphHeight = 0;
Class to store the position or size of a widget.
Definition Layout.hpp:320
Wrapper class to store strings.
Definition String.hpp:94
Texture wrapper that internally reuses resources when multiple Texture objects are loaded from the sa...
Definition Texture.hpp:53
Namespace that contains all TGUI functions and classes.
Definition AbsoluteOrRelativeValue.hpp:37