2022-10-20 23:30:39 +03:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2022, kleines Filmröllchen <filmroellchen@serenityos.org>
|
2023-01-09 02:44:32 +03:00
|
|
|
* Copyright (c) 2023, Andreas Kling <kling@serenityos.org>
|
2022-10-20 23:30:39 +03:00
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
|
|
*/
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "SlideObject.h"
|
2022-12-04 21:02:33 +03:00
|
|
|
#include <AK/DeprecatedString.h>
|
2022-10-20 23:30:39 +03:00
|
|
|
#include <AK/Forward.h>
|
|
|
|
|
|
|
|
// A single slide of a presentation.
|
|
|
|
class Slide final {
|
|
|
|
public:
|
2023-03-21 06:56:55 +03:00
|
|
|
static ErrorOr<Slide> parse_slide(JsonObject const& slide_json, unsigned slide_index);
|
2022-10-20 23:30:39 +03:00
|
|
|
|
2023-03-21 06:56:55 +03:00
|
|
|
unsigned frame_count() const { return m_frame_count; }
|
2022-10-20 23:30:39 +03:00
|
|
|
StringView title() const { return m_title; }
|
|
|
|
|
2023-01-09 02:44:32 +03:00
|
|
|
ErrorOr<HTMLElement> render(Presentation const&) const;
|
2022-10-20 23:30:39 +03:00
|
|
|
|
|
|
|
private:
|
2023-03-21 06:56:55 +03:00
|
|
|
Slide(unsigned frame_count, Vector<NonnullRefPtr<SlideObject>> slide_objects, DeprecatedString title);
|
2022-10-20 23:30:39 +03:00
|
|
|
|
2023-03-21 06:56:55 +03:00
|
|
|
unsigned m_frame_count;
|
2023-03-06 16:17:01 +03:00
|
|
|
Vector<NonnullRefPtr<SlideObject>> m_slide_objects;
|
2022-12-04 21:02:33 +03:00
|
|
|
DeprecatedString m_title;
|
2022-10-20 23:30:39 +03:00
|
|
|
};
|