/* * Copyright (c) 2021, Matthew Olsson * * SPDX-License-Identifier: BSD-2-Clause */ #pragma once #include "NumericInput.h" #include "PDFViewer.h" #include "SidebarWidget.h" #include #include #include class PDFViewer; class PDFViewerWidget final : public GUI::Widget { C_OBJECT(PDFViewerWidget) public: ~PDFViewerWidget() override = default; void initialize_menubar(GUI::Menubar&); void create_toolbar(); void open_file(const String& path); private: PDFViewerWidget(); RefPtr m_viewer; RefPtr m_sidebar; RefPtr m_page_text_box; RefPtr m_total_page_label; RefPtr m_go_to_prev_page_action; RefPtr m_go_to_next_page_action; RefPtr m_toggle_sidebar_action; bool m_sidebar_open { false }; ByteBuffer m_buffer; };