mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 08:02:44 +00:00 
			
		
		
		
	 f88e550998
			
		
	
	
		f88e550998
		
	
	
	
	
		
			
			- If the GInputBox has a parent and the parent is a GWindow, center the input box window within the parent window. This looks quite nice. - Stop processing events in a nested event loop immediately after it's been asked to quit. - Fix GWidget::parent_widget() behavior for non-widget parents.
		
			
				
	
	
		
			23 lines
		
	
	
	
		
			442 B
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			23 lines
		
	
	
	
		
			442 B
		
	
	
	
		
			C++
		
	
	
	
	
	
| #pragma once
 | |
| 
 | |
| #include <LibGUI/GWindow.h>
 | |
| #include <LibGUI/GEventLoop.h>
 | |
| 
 | |
| class GDialog : public GWindow {
 | |
| public:
 | |
|     enum ExecResult { ExecOK = 0, ExecCancel = 1, ExecAborted = 2 };
 | |
| 
 | |
|     virtual ~GDialog() override;
 | |
| 
 | |
|     int exec();
 | |
| 
 | |
|     int result() const { return m_result; }
 | |
|     void done(int result);
 | |
| 
 | |
| protected:
 | |
|     explicit GDialog(GObject* parent);
 | |
| 
 | |
| private:
 | |
|     OwnPtr<GEventLoop> m_event_loop;
 | |
|     int m_result { ExecAborted };
 | |
| };
 |