LazyWidget.cpp 388 B

12345678910111213141516171819202122
  1. /*
  2. * Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org>
  3. * Copyright (c) 2022, the SerenityOS developers.
  4. *
  5. * SPDX-License-Identifier: BSD-2-Clause
  6. */
  7. #include <LibGUI/LazyWidget.h>
  8. namespace GUI {
  9. void LazyWidget::show_event(ShowEvent&)
  10. {
  11. if (m_has_been_shown)
  12. return;
  13. m_has_been_shown = true;
  14. VERIFY(on_first_show);
  15. on_first_show(*this);
  16. }
  17. }