RadioButton.h 747 B

12345678910111213141516171819202122232425262728293031323334
  1. /*
  2. * Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org>
  3. * Copyright (c) 2022, the SerenityOS developers.
  4. *
  5. * SPDX-License-Identifier: BSD-2-Clause
  6. */
  7. #pragma once
  8. #include <LibGUI/AbstractButton.h>
  9. namespace GUI {
  10. class RadioButton : public AbstractButton {
  11. C_OBJECT(RadioButton);
  12. public:
  13. virtual ~RadioButton() override = default;
  14. virtual void click(unsigned modifiers = 0) override;
  15. protected:
  16. explicit RadioButton(String text = {});
  17. virtual void paint_event(PaintEvent&) override;
  18. private:
  19. // These don't make sense for a radio button, so hide them.
  20. using AbstractButton::auto_repeat_interval;
  21. using AbstractButton::set_auto_repeat_interval;
  22. static Gfx::IntSize circle_size();
  23. };
  24. }