summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibGUI/LazyWidget.cpp
blob: 17cb248e7104a48baab9794c88dbe7bd0a6bc82d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
/*
 * Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org>
 * Copyright (c) 2022, the SerenityOS developers.
 *
 * SPDX-License-Identifier: BSD-2-Clause
 */

#include <LibGUI/LazyWidget.h>

REGISTER_WIDGET(GUI, LazyWidget)

namespace GUI {

void LazyWidget::show_event(ShowEvent&)
{
    if (m_has_been_shown)
        return;
    m_has_been_shown = true;

    VERIFY(on_first_show);
    on_first_show(*this);
}

}