ladybird/Widgets/Label.h

23 lines
447 B
C
Raw Normal View History

2018-10-10 17:49:36 +03:00
#pragma once
#include "Widget.h"
#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;
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"; }
String m_text;
2018-10-10 17:49:36 +03:00
};