mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 01:02:45 +00:00 
			
		
		
		
	 34d0e96aec
			
		
	
	
		34d0e96aec
		
	
	
	
	
		
			
			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. :^)
		
			
				
	
	
		
			30 lines
		
	
	
	
		
			529 B
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			30 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 };
 | |
| };
 |