TurtleBrains  0.3.5
High quality, portable, C++ framework for rapid 2D game development.
tbx_interface_button.hpp
1 
9 #ifndef TurtleBrainsExpress_InterfaceButton_hpp
10 #define TurtleBrainsExpress_InterfaceButton_hpp
11 
12 #include <turtle_brains/express/interface/tbx_interface.hpp>
13 #include <turtle_brains/express/interface/tbx_interface_element.hpp>
14 
15 #include <functional>
16 
17 namespace TurtleBrainsExpress
18 {
19  namespace Interface
20  {
21  namespace Unstable
22  {
30  class Button : public Element
31  {
32  public:
33  Button(void);
34  virtual ~Button(void) = 0;
35 
36  protected:
37  virtual void OnHandleUserEvent(const UserEvent& userEvent) override;
38  virtual void OnHandleActiveUserEvent(const UserEvent& userEvent) override;
39  virtual void OnActivate(void) override;
40 
41  private:
42  };
43 
44 
49  class SimpleButton : public Button
50  {
51  public:
52  SimpleButton(const tbCore::tbString& labelString, const tbGraphics::PixelSpace& width, const tbGraphics::PixelSpace& height);
53  virtual ~SimpleButton(void);
54 
55  protected:
56  virtual void OnActivate(void) override;
57 
58  private:
59  const tbCore::tbString mLabelString;
60  };
61 
62  };
63  }; /* namespace Interface */
64 }; /* namespace TurtleBrainsExpress */
65 
67 
68 #endif /* TurtleBrainsExpress_InterfaceButton_hpp */
A collection of objects and functions to express games quickly.
Definition: tbx_interface_button.hpp:49
Definition: tbx_interface.hpp:18
tbCore::uint16 PixelSpace
Definition: tb_texture_manager.hpp:36
Definition: tbx_interface_element.hpp:28
Definition: tbx_interface_button.hpp:30
std::string tbString
Definition: tb_string.hpp:335