26#ifndef TGUI_BUTTON_HPP
27#define TGUI_BUTTON_HPP
30#include <TGUI/Widgets/Label.hpp>
54 typedef std::shared_ptr<Button>
Ptr;
55 typedef std::shared_ptr<const Button>
ConstPtr;
94 return std::static_pointer_cast<ButtonRenderer>(m_renderer);
185 return m_text.getTextSize();
212 virtual void leftMousePressed(
float x,
float y)
override;
217 virtual void leftMouseReleased(
float x,
float y)
override;
222 virtual void keyPressed(
const sf::Event::KeyEvent& event)
override;
227 virtual void widgetFocused()
override;
245 virtual void reload(
const std::string& primary =
"",
const std::string& secondary =
"",
bool force =
false)
override;
253 return std::make_shared<Button>(*
this);
260 virtual void mouseEnteredWidget()
override;
266 virtual void mouseLeftWidget()
override;
272 virtual void draw(sf::RenderTarget& target, sf::RenderStates states)
const override;
282 unsigned int m_textSize = 0;
312 virtual void setProperty(std::string property,
const std::string& value)
override;
498 void draw(sf::RenderTarget& target, sf::RenderStates states)
const;
507 virtual std::shared_ptr<WidgetRenderer> clone(
Widget* widget)
override;
515 sf::Color m_textColorNormal;
516 sf::Color m_textColorHover;
517 sf::Color m_textColorDown;
519 sf::Color m_backgroundColorNormal;
520 sf::Color m_backgroundColorHover;
521 sf::Color m_backgroundColorDown;
523 sf::Color m_borderColor;
Definition: ChildWindow.hpp:587
Child window widget.
Definition: ChildWindow.hpp:61
Implicit converter for colors.
Definition: Color.hpp:40
Label widget.
Definition: Label.hpp:50
Class to store the position or size of a widget.
Definition: Layout.hpp:255
Message box widget.
Definition: MessageBox.hpp:52
Implicit converter for settable properties.
Definition: ObjectConverter.hpp:43
Definition: Texture.hpp:45
Namespace that contains all TGUI functions and classes.
Definition: Animation.hpp:34