Serenity Operating System
at master 35 lines 657 B view raw
1/* 2 * Copyright (c) 2022, Dylan Katz <dykatz@uw.edu> 3 * 4 * SPDX-License-Identifier: BSD-2-Clause 5 */ 6 7#pragma once 8 9#include <AK/LexicalPath.h> 10#include <LibGUI/TextEditor.h> 11 12namespace SQLStudio { 13 14class ScriptEditor : public GUI::TextEditor { 15 C_OBJECT(ScriptEditor) 16 17public: 18 virtual ~ScriptEditor() = default; 19 20 void new_script_with_temp_name(DeprecatedString); 21 ErrorOr<void> open_script_from_file(LexicalPath const&); 22 23 ErrorOr<bool> save(); 24 ErrorOr<bool> save_as(); 25 ErrorOr<bool> attempt_to_close(); 26 27 DeprecatedString const& path() const { return m_path; } 28 29private: 30 ScriptEditor(); 31 32 DeprecatedString m_path; 33}; 34 35}