summaryrefslogtreecommitdiff
path: root/Userland/Applications/Help/ManualPageNode.h
blob: c73ee917ae566589471381e70977ac7a34d99267 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
/*
 * Copyright (c) 2019-2020, Sergey Bugaev <bugaevc@serenityos.org>
 *
 * SPDX-License-Identifier: BSD-2-Clause
 */

#pragma once

#include "ManualNode.h"

class ManualSectionNode;

class ManualPageNode : public ManualNode {
public:
    virtual ~ManualPageNode() override { }

    ManualPageNode(const ManualSectionNode& section, const StringView& page)
        : m_section(section)
        , m_page(page)
    {
    }

    virtual NonnullOwnPtrVector<ManualNode>& children() const override;
    virtual const ManualNode* parent() const override;
    virtual String name() const override { return m_page; };
    virtual bool is_page() const override { return true; }

    String path() const;

private:
    const ManualSectionNode& m_section;
    String m_page;
};