blob: d67d984b5d921be5b27517b789cbf8a5c177dda1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
/*
* 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);
public:
explicit EvaluateExpressionDialog(Window* parent_window);
private:
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;
};
}
|