/* * Copyright (c) 2021, the SerenityOS developers. * * SPDX-License-Identifier: BSD-2-Clause */ #pragma once #include #include #include class GoToOffsetDialog : public GUI::Dialog { C_OBJECT(GoToOffsetDialog); public: static int show(GUI::Window* parent_window, int& history_offset, int& out_offset, int selection_offset, int end); private: GoToOffsetDialog(); virtual ~GoToOffsetDialog() override; void update_statusbar(); int process_input(); int calculate_new_offset(int offset); int m_selection_offset { 0 }; int m_buffer_size { 0 }; Vector m_offset_type; Vector m_offset_from; RefPtr m_text_editor; RefPtr m_go_button; RefPtr m_offset_type_box; RefPtr m_offset_from_box; RefPtr m_statusbar; };