diff options
author | kleines Filmröllchen <filmroellchen@serenityos.org> | 2022-07-13 00:20:27 +0200 |
---|---|---|
committer | Linus Groh <mail@linusgroh.de> | 2022-12-11 16:05:23 +0000 |
commit | ad6a55e1f088f525b1bd2ee7e926fcafedead4c1 (patch) | |
tree | 792679e2cb56a14ac5e2b176c07668be20888960 /Userland/Libraries/LibManual/Node.h | |
parent | 78353ec184b8fb5feeaafeba1ded99ca2d102282 (diff) | |
download | serenity-ad6a55e1f088f525b1bd2ee7e926fcafedead4c1.zip |
Help+LibManual: Move non-UI-specific manual handling to LibManual
This is a first step in deduplicating code within and across Help and
man.
Because LibManual also doesn't contain any DeprecatedString, some
adjustments to Help's string handling is included, just to interoperate
with LibManual better. Further work in this area mostly requires String
APIs in LibGUI.
Diffstat (limited to 'Userland/Libraries/LibManual/Node.h')
-rw-r--r-- | Userland/Libraries/LibManual/Node.h | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/Userland/Libraries/LibManual/Node.h b/Userland/Libraries/LibManual/Node.h new file mode 100644 index 0000000000..232a7c3094 --- /dev/null +++ b/Userland/Libraries/LibManual/Node.h @@ -0,0 +1,30 @@ +/* + * Copyright (c) 2019-2020, Sergey Bugaev <bugaevc@serenityos.org> + * Copyright (c) 2022, the SerenityOS developers. + * + * SPDX-License-Identifier: BSD-2-Clause + */ + +#pragma once + +#include <AK/NonnullRefPtrVector.h> +#include <AK/RefCounted.h> +#include <AK/String.h> +#include <AK/StringView.h> + +namespace Manual { + +class PageNode; + +class Node : public RefCounted<Node> { +public: + virtual ~Node() = default; + + virtual NonnullRefPtrVector<Node>& children() const = 0; + virtual Node const* parent() const = 0; + virtual String name() const = 0; + virtual bool is_page() const { return false; } + virtual bool is_open() const { return false; } +}; + +} |