Simple SFML GUI  0.2a
HavePressed.hpp
1 /*
2  * HavePressed.hpp
3  *
4  * Created on: 17.03.2017
5  * Author: jakub
6  */
7 
8 #ifndef HAVEPRESSED_HPP_
9 #define HAVEPRESSED_HPP_
10 
11 #include "ColorProvider.hpp"
12 #include "Element.hpp"
13 
14 class HavePressed {
15 public:
16  friend Element;
17  HavePressed(ColorProvider& colorProvider, bool p = false, bool pa = false);
18  virtual ~HavePressed() {}
19  virtual bool isPressed() const;
20  virtual bool setPressed(bool pressed);
21  virtual bool isPressedAlt() const;
22  virtual bool setPressedAlt(bool value);
23 
24 protected:
25  bool pressed = false;
26  bool lastPressLeft = false;
27  bool pressedAlt = false;
28  bool lastPressRight = false;
29 
30 };
31 
32 #endif /* HAVEPRESSED_HPP_ */
Definition: ColorProvider.hpp:15
Definition: Element.hpp:22
Definition: HavePressed.hpp:14