EN
RU
Portals
0.7.0 · dev
0.7.0 · dev (544a5c68c72e · 2026-11-28 UTC)
Toggle main menu visibility
Loading...
Searching...
No Matches
editor_command.hpp
1
// Copyright (c) 2026 ttldtor.
2
// SPDX-License-Identifier: BSL-1.0
3
#pragma once
4
5
#include <portals/widget.hpp>
6
7
#include <memory>
8
9
namespace
portals
{
10
class
ManagedScene
;
11
12
namespace
ui::detail {
13
struct
RefAccess;
14
struct
ActionAccess;
15
struct
AsyncAccess;
16
struct
EditAccess;
17
}
// namespace ui::detail
18
23
class
EditorCommandResult {
24
public
:
26
std::expected<void, TreeError>
result
() const noexcept {
27
return
result_;
28
}
29
31
explicit
operator
bool() const noexcept {
32
return
result_.has_value();
33
}
34
35
private
:
36
friend
class
ManagedScene
;
37
friend
struct
ui::detail::RefAccess;
38
friend
struct
ui::detail::ActionAccess;
39
friend
struct
ui::detail::AsyncAccess;
40
friend
struct
ui::detail::EditAccess;
41
42
EditorCommandResult
(std::expected<void, TreeError>
result
, std::weak_ptr<const void> collector,
bool
reported)
43
: result_(
result
), collector_(std::move(collector)), reported_(reported) {
44
}
45
46
std::expected<void, TreeError> result_;
47
std::weak_ptr<const void> collector_;
48
49
bool
reported_{};
50
};
51
}
// namespace portals
portals::EditorCommandResult
Owning checked editor command, preserving exactly its collector reporting receipt....
Definition
editor_command.hpp:23
portals::EditorCommandResult::result
std::expected< void, TreeError > result() const noexcept
Definition
editor_command.hpp:26
portals::ManagedScene
Additive lifecycle owner over one existing Application subtree. UI affine and nonmovable....
Definition
managed.hpp:530
portals
Public Portals API.
Definition
action.hpp:8
include
portals
editor_command.hpp