1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-18 21:45:08 +00:00
serenity/Userland/DevTools/HackStudio/Debugger/EvaluateExpressionDialog.h
Ben Wiederhake 3796d417e0 Demos+DevTools+Games: Fix visibility of Object-derivative constructors
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.
2021-11-02 22:56:53 +01:00

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;
};
}