mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 10:38:11 +00:00
27 lines
666 B
C++
27 lines
666 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 set_caption(String&&);
|
|
|
|
bool is_checked() const { return m_checked; }
|
|
void set_checked(bool);
|
|
|
|
private:
|
|
virtual void paint_event(GPaintEvent&) override;
|
|
virtual void mousedown_event(GMouseEvent&) override;
|
|
|
|
virtual const char* class_name() const override { return "GCheckBox"; }
|
|
virtual bool accepts_focus() const override { return true; }
|
|
|
|
String m_caption;
|
|
bool m_checked { false };
|
|
};
|
|
|