Simple SFML GUI  0.2a
HaveHover.hpp
1 /*
2  * HaveHover.hpp
3  *
4  * Created on: 17.03.2017
5  * Author: jakub
6  */
7 
8 #ifndef HAVEHOVER_HPP_
9 #define HAVEHOVER_HPP_
10 
11 #include <SFML/Graphics.hpp>
12 #include "ColorProvider.hpp"
13 
14 class Element;
15 
16 class HaveHover {
17 public:
18  friend Element;
19  HaveHover(ColorProvider& colorProvider, bool h = false);
20  virtual ~HaveHover();
21  bool isHover() const;
22  void setHover(bool hover);
23  virtual bool updateHover(const sf::Vector2f& pointer, const sf::FloatRect& clippedArea);
24  void setTooltip(const sf::String& value);
25 
26 protected:
27  bool hover;
28  sf::String tooltip;
29 
30 };
31 
32 #endif /* HAVEHOVER_HPP_ */
Definition: HaveHover.hpp:16
Definition: ColorProvider.hpp:15
Definition: Element.hpp:22