serenity/LibGUI/GRadioButton.h
Andreas Kling 21c56477b0 LibGUI: Add a GAbstractButton base class for button widgets.
This patch moves GButton and GRadioButton to inherit from it. This allows
them to share code for mouse event handling, etc.
2019-05-24 16:32:20 +02:00

22 lines
554 B
C++

#pragma once
#include <LibGUI/GAbstractButton.h>
class GRadioButton : public GAbstractButton {
public:
GRadioButton(const String& text, GWidget* parent);
virtual ~GRadioButton() override;
virtual const char* class_name() const override { return "GRadioButton"; }
virtual void click() override;
protected:
virtual void paint_event(GPaintEvent&) override;
private:
virtual bool is_radio_button() const final { return true; }
template<typename Callback> void for_each_in_group(Callback);
static Size circle_size();
};