#pragma once #include class GRadioButton : public GAbstractButton { public: GRadioButton(const StringView& 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 void for_each_in_group(Callback); static Size circle_size(); }; template<> inline bool is(const CObject& object) { if (!is(object)) return false; return to(object).is_radio_button(); }