ladybird/Userland/Libraries/LibManual/SubsectionNode.h
kleines Filmröllchen 201c9d7c77 Help+LibManual: Open sibling page for subsections
Clicking on a subsection now displays the sibling page, which is
intended to be the main page for that section.
2023-01-02 06:15:13 -07:00

28 lines
683 B
C++

/*
* Copyright (c) 2022, kleines Filmröllchen <filmroellchen@serenityos.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#pragma once
#include <LibManual/SectionNode.h>
namespace Manual {
// A non-toplevel (i.e. not numbered) manual section.
class SubsectionNode : public SectionNode {
public:
SubsectionNode(NonnullRefPtr<SectionNode> parent, StringView name);
virtual ~SubsectionNode() = default;
virtual Node const* parent() const override;
virtual ErrorOr<String> path() const override;
virtual ErrorOr<String> name() const override;
virtual PageNode const* document() const override;
protected:
NonnullRefPtr<SectionNode> m_parent;
};
}