summaryrefslogtreecommitdiff
path: root/Widgets/Label.h
blob: 062c14a99aa35439925f80a564e51731386118fb (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/AKString.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* class_name() const override { return "Label"; }

    String m_text;
};