mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-10 13:00:29 +03:00
27 lines
591 B
C++
27 lines
591 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* class_name() const override { return "CheckBox"; }
|
|
|
|
String m_caption;
|
|
bool m_isChecked { false };
|
|
};
|
|
|