LazyWidget.cpp 399 B

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