Button.hpp 698 B

12345678910111213141516171819202122232425262728293031323334353637
  1. /*
  2. * Author: Patrick-Christopher Mattulat
  3. * Company: Lynar Studios
  4. * E-Mail: webmaster@lynarstudios.com
  5. * Created: 2024-05-16
  6. * Changed: 2024-05-30
  7. *
  8. * */
  9. #ifndef LS_STD_BUTTON_HPP
  10. #define LS_STD_BUTTON_HPP
  11. #include <ls-std/ls-std-event.hpp>
  12. #include <string>
  13. namespace test::event
  14. {
  15. class Button : public ls::std::event::EventListener
  16. {
  17. public:
  18. explicit Button();
  19. ~Button() noexcept override;
  20. [[nodiscard]] ::std::string getColor() const;
  21. [[nodiscard]] bool isClicked() const;
  22. void onChangeColorEvent();
  23. void onClickEvent();
  24. private:
  25. bool clicked{};
  26. ::std::string color{};
  27. };
  28. }
  29. #endif