mirror of
https://github.com/RGBCube/serenity
synced 2025-05-14 05:44:58 +00:00

In 7c5e30daaa
, the focus was "only" on
Userland/Libraries/, whereas this commit cleans up the remaining
headers in the repo, and any new badly-formatted include.
40 lines
1.1 KiB
C++
40 lines
1.1 KiB
C++
/*
|
|
* Copyright (c) 2022, kleines Filmröllchen <filmroellchen@serenityos.org>
|
|
*
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include "Presentation.h"
|
|
#include <LibGUI/Action.h>
|
|
#include <LibGUI/Event.h>
|
|
#include <LibGUI/UIDimensions.h>
|
|
#include <LibGUI/Widget.h>
|
|
|
|
// Title, Author
|
|
constexpr StringView const title_template = "{} ({}) — Presenter"sv;
|
|
|
|
class PresenterWidget : public GUI::Widget {
|
|
C_OBJECT(PresenterWidget);
|
|
|
|
public:
|
|
PresenterWidget();
|
|
ErrorOr<void> initialize_menubar();
|
|
|
|
virtual ~PresenterWidget() override = default;
|
|
|
|
// Errors that happen here are directly displayed to the user.
|
|
void set_file(StringView file_name);
|
|
|
|
protected:
|
|
virtual void paint_event(GUI::PaintEvent&) override;
|
|
virtual void keydown_event(GUI::KeyEvent&) override;
|
|
virtual void drag_enter_event(GUI::DragEvent&) override;
|
|
virtual void drop_event(GUI::DropEvent&) override;
|
|
|
|
private:
|
|
OwnPtr<Presentation> m_current_presentation;
|
|
RefPtr<GUI::Action> m_next_slide_action;
|
|
RefPtr<GUI::Action> m_previous_slide_action;
|
|
};
|