ladybird/Widgets/Label.h

23 lines
453 B
C
Raw Normal View History

2018-10-10 16:49:36 +02:00
#pragma once
#include "Widget.h"
#include <AK/String.h>
2018-10-10 16:49:36 +02:00
class Label final : public Widget {
public:
explicit Label(Widget* parent);
virtual ~Label() override;
String text() const { return m_text; }
void setText(String&&);
2018-10-10 16:49:36 +02:00
private:
virtual void paintEvent(PaintEvent&) override;
virtual void mouseMoveEvent(MouseEvent&) override;
2018-10-10 16:49:36 +02:00
virtual const char* className() const override { return "Label"; }
String m_text;
2018-10-10 16:49:36 +02:00
};