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