26#ifndef TGUI_WIDGETS_HPP
27#define TGUI_WIDGETS_HPP
30#include <TGUI/Global.hpp>
31#include <TGUI/Signal.hpp>
32#include <TGUI/Transformable.hpp>
33#include <TGUI/Texture.hpp>
34#include <TGUI/Color.hpp>
35#include <TGUI/Font.hpp>
36#include <TGUI/Loading/Deserializer.hpp>
75 typedef std::shared_ptr<Widget>
Ptr;
76 typedef std::shared_ptr<const Widget>
ConstPtr;
269 virtual void disable(
bool blockMouseEvents =
true);
329 return m_callback.widgetType;
449 return m_primaryLoadingParameter;
461 return m_secondaryLoadingParameter;
475 return sf::Vector2f{0, 0};
484 virtual void setParent(
Container* parent);
491 virtual void update(sf::Time elapsedTime);
497 virtual bool mouseOnWidget(
float x,
float y)
const = 0;
502 virtual void leftMousePressed(
float x,
float y);
507 virtual void leftMouseReleased(
float x,
float y);
512 virtual void mouseMoved(
float x,
float y);
517 virtual void keyPressed(
const sf::Event::KeyEvent& event);
522 virtual void textEntered(sf::Uint32 key);
527 virtual void mouseWheelMoved(
int delta,
int x,
int y);
532 virtual void widgetFocused();
537 virtual void widgetUnfocused();
542 virtual void mouseNoLongerOnWidget();
547 virtual void mouseNoLongerDown();
556 virtual Widget::Ptr askToolTip(sf::Vector2f mousePos);
597 virtual void reload(
const std::string& primary =
"",
const std::string& secondary =
"",
bool force =
false);
603 virtual void mouseEnteredWidget();
609 virtual void mouseLeftWidget();
615 bool isDisabledBlockingMouseEvents()
const;
622 bool m_disabledBlockingMouseEvents =
true;
625 bool m_enabled =
true;
628 bool m_visible =
true;
637 bool m_mouseHover =
false;
638 bool m_mouseDown =
false;
641 bool m_focused =
false;
644 bool m_allowFocus =
false;
647 sf::Time m_animationTimeElapsed;
650 bool m_draggableWidget =
false;
653 bool m_containerWidget =
false;
659 std::shared_ptr<sf::Font> m_font =
nullptr;
662 std::shared_ptr<WidgetRenderer> m_renderer =
nullptr;
665 std::shared_ptr<BaseTheme> m_theme =
nullptr;
666 std::string m_primaryLoadingParameter;
667 std::string m_secondaryLoadingParameter;
670 std::vector<std::shared_ptr<priv::Animation>> m_showAnimations;
702 virtual void setProperty(std::string property,
const std::string& value);
745 virtual std::shared_ptr<WidgetRenderer> clone(
Widget* widget) = 0;
Base class for the Theme classes.
Definition: Theme.hpp:43
Container widget.
Definition: Container.hpp:48
Class to store the position or size of a widget.
Definition: Layout.hpp:255
Implicit converter for settable properties.
Definition: ObjectConverter.hpp:43
Namespace that contains all TGUI functions and classes.
Definition: Animation.hpp:34
ShowAnimationType
Type of animation to show/hide widget.
Definition: Animation.hpp:39