mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 15:40:19 +00:00
26 lines
590 B
C++
26 lines
590 B
C++
#pragma once
|
|
|
|
#include "Widget.h"
|
|
#include <AK/String.h>
|
|
|
|
class CheckBox final : public Widget {
|
|
public:
|
|
explicit CheckBox(Widget* parent);
|
|
virtual ~CheckBox() override;
|
|
|
|
String caption() const { return m_caption; }
|
|
void setCaption(String&&);
|
|
|
|
bool isChecked() const { return m_isChecked; }
|
|
void setIsChecked(bool);
|
|
|
|
private:
|
|
virtual void paintEvent(PaintEvent&) override;
|
|
virtual void mouseDownEvent(MouseEvent&) override;
|
|
|
|
virtual const char* className() const override { return "CheckBox"; }
|
|
|
|
String m_caption;
|
|
bool m_isChecked { false };
|
|
};
|
|
|