GLazyWidget.h 367 B

12345678910111213141516171819
  1. #pragma once
  2. #include <LibGUI/GWidget.h>
  3. class GLazyWidget : public GWidget {
  4. C_OBJECT(GLazyWidget)
  5. public:
  6. virtual ~GLazyWidget() override;
  7. Function<void(GLazyWidget&)> on_first_show;
  8. protected:
  9. explicit GLazyWidget(GWidget* parent = nullptr);
  10. private:
  11. virtual void show_event(GShowEvent&) override;
  12. bool m_has_been_shown { false };
  13. };