summaryrefslogtreecommitdiff
path: root/Libraries/LibGUI/GLazyWidget.h
blob: 69bc235508433fa6fd43e335c2b586b56337748c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#pragma once

#include <LibGUI/GWidget.h>

class GLazyWidget : public GWidget {
    C_OBJECT(GLazyWidget)
public:
    virtual ~GLazyWidget() override;

    Function<void(GLazyWidget&)> on_first_show;

protected:
    explicit GLazyWidget(GWidget* parent = nullptr);

private:
    virtual void show_event(GShowEvent&) override;

    bool m_has_been_shown { false };
};