summaryrefslogtreecommitdiff
path: root/Widgets/Label.h
blob: 266d78b3c7886f1ee38050285b8e00157b4ae844 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#pragma once

#include "Widget.h"
#include <AK/String.h>

class Label final : public Widget {
public:
    explicit Label(Widget* parent);
    virtual ~Label() override;

    String text() const { return m_text; }
    void setText(String&&);

private:
    virtual void paintEvent(PaintEvent&) override;
    virtual void mouseMoveEvent(MouseEvent&) override;

    virtual const char* className() const override { return "Label"; }

    String m_text;
};