mirror of
				https://github.com/LadybirdBrowser/ladybird.git
				synced 2025-10-31 13:20:59 +00:00 
			
		
		
		
	
		
			
	
	
		
			27 lines
		
	
	
	
		
			602 B
		
	
	
	
		
			C
		
	
	
	
	
	
		
		
			
		
	
	
			27 lines
		
	
	
	
		
			602 B
		
	
	
	
		
			C
		
	
	
	
	
	
|   | #pragma once
 | ||
|  | 
 | ||
|  | #include "GWidget.h"
 | ||
|  | #include <AK/AKString.h>
 | ||
|  | 
 | ||
|  | class GCheckBox final : public GWidget { | ||
|  | public: | ||
|  |     explicit GCheckBox(GWidget* parent); | ||
|  |     virtual ~GCheckBox() override; | ||
|  | 
 | ||
|  |     String caption() const { return m_caption; } | ||
|  |     void setCaption(String&&); | ||
|  | 
 | ||
|  |     bool isChecked() const { return m_isChecked; } | ||
|  |     void setIsChecked(bool); | ||
|  | 
 | ||
|  | private: | ||
|  |     virtual void paintEvent(GPaintEvent&) override; | ||
|  |     virtual void mouseDownEvent(GMouseEvent&) override; | ||
|  | 
 | ||
|  |     virtual const char* class_name() const override { return "GCheckBox"; } | ||
|  | 
 | ||
|  |     String m_caption; | ||
|  |     bool m_isChecked { false }; | ||
|  | }; | ||
|  | 
 |