mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 10:42:45 +00:00 
			
		
		
		
	 04b9dc2d30
			
		
	
	
		04b9dc2d30
		
	
	
	
	
		
			
			Things were getting a little crowded in the project root, so this patch moves the Lib*/ directories into Libraries/.
		
			
				
	
	
		
			31 lines
		
	
	
	
		
			732 B
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			31 lines
		
	
	
	
		
			732 B
		
	
	
	
		
			C++
		
	
	
	
	
	
| #pragma once
 | |
| 
 | |
| #include <LibGUI/GAbstractButton.h>
 | |
| 
 | |
| 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<typename Callback>
 | |
|     void for_each_in_group(Callback);
 | |
|     static Size circle_size();
 | |
| };
 | |
| 
 | |
| template<>
 | |
| inline bool is<GRadioButton>(const CObject& object)
 | |
| {
 | |
|     if (!is<GWidget>(object))
 | |
|         return false;
 | |
|     return to<GWidget>(object).is_radio_button();
 | |
| }
 |