ladybird/Userland/Libraries/LibGUI/LazyWidget.cpp

25 lines
422 B
C++
Raw Normal View History

/*
* 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>
2022-03-18 23:28:06 +01:00
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);
}
}