mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 21:52:45 +00:00 
			
		
		
		
	 3796d417e0
			
		
	
	
		3796d417e0
		
	
	
	
	
		
			
			Derivatives of Core::Object should be constructed through ClassName::construct(), to avoid handling ref-counted objects with refcount zero. Fixing the visibility means that misuses like this are more difficult.
		
			
				
	
	
		
			32 lines
		
	
	
	
		
			804 B
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			32 lines
		
	
	
	
		
			804 B
		
	
	
	
		
			C++
		
	
	
	
	
	
| /*
 | |
|  * Copyright (c) 2021, Hunter Salyer <thefalsehonesty@gmail.com>
 | |
|  *
 | |
|  * SPDX-License-Identifier: BSD-2-Clause
 | |
|  */
 | |
| 
 | |
| #pragma once
 | |
| 
 | |
| #include <LibGUI/Dialog.h>
 | |
| #include <LibWeb/InProcessWebView.h>
 | |
| 
 | |
| namespace HackStudio {
 | |
| 
 | |
| class EvaluateExpressionDialog : public GUI::Dialog {
 | |
|     C_OBJECT(EvaluateExpressionDialog);
 | |
| 
 | |
| private:
 | |
|     explicit EvaluateExpressionDialog(Window* parent_window);
 | |
| 
 | |
|     void build(Window* parent_window);
 | |
|     void handle_evaluation(const String& expression);
 | |
|     void set_output(const StringView& html);
 | |
| 
 | |
|     NonnullOwnPtr<JS::Interpreter> m_interpreter;
 | |
|     RefPtr<GUI::TextBox> m_text_editor;
 | |
|     RefPtr<Web::InProcessWebView> m_output_view;
 | |
|     RefPtr<Web::DOM::Element> m_output_container;
 | |
|     RefPtr<GUI::Button> m_evaluate_button;
 | |
|     RefPtr<GUI::Button> m_close_button;
 | |
| };
 | |
| 
 | |
| }
 |