ladybird/Libraries/LibGUI/GDialog.h
Andreas Kling 34d0e96aec LibCore+LibGUI: Remove GEventLoop and use CEventLoop everywhere
GEventLoop was just a dummy subclass of CEventLoop anyway. The only
thing it actually did was make sure a GWindowServerConnectionw was
instantiated. We now take care of that in GApplication instead.

CEventLoop is now non-virtual and a little less confusing. :^)
2019-09-22 20:50:39 +02:00

31 lines
529 B
C++

#pragma once
#include <LibCore/CEventLoop.h>
#include <LibGUI/GWindow.h>
class GDialog : public GWindow {
C_OBJECT(GDialog)
public:
enum ExecResult {
ExecOK = 0,
ExecCancel = 1,
ExecAborted = 2
};
virtual ~GDialog() override;
int exec();
int result() const { return m_result; }
void done(int result);
virtual void close() override;
protected:
explicit GDialog(CObject* parent);
private:
OwnPtr<CEventLoop> m_event_loop;
int m_result { ExecAborted };
};