| 
									
										
										
										
											2019-03-19 00:01:02 +01:00
										 |  |  | #pragma once
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | #include <LibGUI/GDialog.h>
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | class GMessageBox : public GDialog { | 
					
						
							|  |  |  | public: | 
					
						
							| 
									
										
										
										
											2019-06-07 17:13:23 +02:00
										 |  |  |     enum class Type { | 
					
						
							| 
									
										
										
										
											2019-05-08 20:13:39 +02:00
										 |  |  |         None, | 
					
						
							|  |  |  |         Information, | 
					
						
							|  |  |  |         Warning, | 
					
						
							|  |  |  |         Error, | 
					
						
							|  |  |  |     }; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-06-02 14:58:02 +02:00
										 |  |  |     explicit GMessageBox(const StringView& text, const StringView& title, Type type = Type::None, CObject* parent = nullptr); | 
					
						
							| 
									
										
										
										
											2019-03-19 00:01:02 +01:00
										 |  |  |     virtual ~GMessageBox() override; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-06-02 14:58:02 +02:00
										 |  |  |     static void show(const StringView& text, const StringView& title, Type type = Type::None, CObject* parent = nullptr); | 
					
						
							| 
									
										
										
										
											2019-05-08 20:13:39 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-05-08 22:10:00 +02:00
										 |  |  |     virtual const char* class_name() const override { return "GMessageBox"; } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-03-19 01:41:00 +01:00
										 |  |  | private: | 
					
						
							| 
									
										
										
										
											2019-03-19 00:01:02 +01:00
										 |  |  |     void build(); | 
					
						
							| 
									
										
										
										
											2019-05-08 20:13:39 +02:00
										 |  |  |     RetainPtr<GraphicsBitmap> icon() const; | 
					
						
							| 
									
										
										
										
											2019-03-19 00:01:02 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  |     String m_text; | 
					
						
							| 
									
										
										
										
											2019-05-08 20:13:39 +02:00
										 |  |  |     Type m_type { Type::None }; | 
					
						
							| 
									
										
										
										
											2019-03-19 00:01:02 +01:00
										 |  |  | }; |