1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 22:57:44 +00:00

PDFViewer: Add a tab bar with outlines and thumbnails

Outlines are in theory implemented (though I'm having trouble finding
a simple PDF with outlines to test it on), and thumbnails are not.
This commit is contained in:
Matthew Olsson 2021-05-23 21:34:06 -07:00 committed by Ali Mohammad Pur
parent 67b65dffa8
commit cea7dbce42
7 changed files with 250 additions and 7 deletions

View file

@ -7,21 +7,28 @@
#pragma once
#include "PDFViewer.h"
#include "SidebarWidget.h"
#include <LibGUI/Action.h>
#include <LibGUI/Widget.h>
class PDFViewer;
class PDFViewerWidget final : public GUI::Widget {
C_OBJECT(PDFViewerWidget)
public:
~PDFViewerWidget() override;
~PDFViewerWidget() override = default;
void open_file(const String& path);
void initialize_menubar(GUI::Menubar&);
private:
PDFViewerWidget();
RefPtr<GUI::Action> m_open_outline_action;
RefPtr<PDFViewer> m_viewer;
RefPtr<SidebarWidget> m_sidebar;
bool m_sidebar_open { false };
ByteBuffer m_buffer;
RefPtr<GUI::Action> m_open_action;
};