mirror of
https://github.com/SerenityOS/serenity.git
synced 2025-01-24 10:22:05 -05:00
6e19ab2bbc
We have a new, improved string type coming up in AK (OOM aware, no null state), and while it's going to use UTF-8, the name UTF8String is a mouthful - so let's free up the String name by renaming the existing class. Making the old one have an annoying name will hopefully also help with quick adoption :^)
31 lines
872 B
C++
31 lines
872 B
C++
/*
|
|
* Copyright (c) 2022, kleines Filmröllchen <filmroellchen@serenityos.org>
|
|
*
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include "SlideObject.h"
|
|
#include <AK/DeprecatedString.h>
|
|
#include <AK/Forward.h>
|
|
#include <AK/NonnullOwnPtrVector.h>
|
|
#include <LibGfx/Forward.h>
|
|
|
|
// A single slide of a presentation.
|
|
class Slide final {
|
|
public:
|
|
static ErrorOr<Slide> parse_slide(JsonObject const& slide_json, NonnullRefPtr<GUI::Window> window);
|
|
|
|
// FIXME: shouldn't be hard-coded to 1.
|
|
unsigned frame_count() const { return 1; }
|
|
StringView title() const { return m_title; }
|
|
|
|
void paint(Gfx::Painter&, unsigned current_frame, Gfx::FloatSize display_scale) const;
|
|
|
|
private:
|
|
Slide(NonnullRefPtrVector<SlideObject> slide_objects, DeprecatedString title);
|
|
|
|
NonnullRefPtrVector<SlideObject> m_slide_objects;
|
|
DeprecatedString m_title;
|
|
};
|