5#include <portals/log_navigation.hpp>
6#include <portals/log_view.hpp>
7#include <portals/ui_description.hpp>
20namespace portals::ui {
22template <
class T>
class Ref;
26struct ExternalLogAccess;
54 std::shared_ptr<FileLogModel>
fileModel() const noexcept;
56 std::optional<std::uint64_t>
rowCount() const noexcept;
63 friend struct detail::ExternalLogAccess;
66 : data_(std::move(data)), error_(error) {
69 std::shared_ptr<detail::LogSourceData> data_;
80LogSource logFile(std::string_view path,
const FileLogOptions &options, std::shared_ptr<SourceBudget> budget = {});
85LogSource logSource(std::shared_ptr<WindowProvider<LogLine>> provider, std::shared_ptr<SourceBudget> budget = {});
90LogSource logSource(std::shared_ptr<WindowProvider<LogLine>> provider, std::shared_ptr<LogBookmarkProvider> bookmarks,
91 std::shared_ptr<SourceBudget> budget = {});
95LogSource finiteLogSource(std::shared_ptr<WindowProvider<LogLine>> provider, std::uint64_t rows, std::uint64_t revision,
96 std::shared_ptr<SourceBudget> budget);
108 ControlStyle style = {});
112Description<LogView> logView(std::string_view initial = {}, LogViewConfig config = {}, ControlStyle style = {});
124 ControlStyle style = {});
File-backed rich model with optional bounded WindowSource delivery. Creation owns the path without op...
Definition log_file.hpp:74
Bounded worker extension for log positions; unrelated to total extent. The provider owns its logical ...
Definition log_navigation.hpp:26
Weak UI-affine checkpoint session owned by an existing scene. Removing a view leaves this session ali...
Definition log_navigation.hpp:105
Additive lifecycle owner over one existing Application subtree. UI affine and nonmovable....
Definition managed.hpp:530
Copyable typed observer; never owns or exposes an unchecked widget pointer.
Definition widget.hpp:92
Thread-safe credit ledger; final page/worker release may happen on any thread.
Definition source_budget.hpp:119
Worker provider; the source captures capabilities once and never calls load on UI.
Definition window_source.hpp:323
Single-use owning construction recipe; no mounted widget ownership.
Definition ui_description.hpp:48
Owning deferred external log binding; construction performs no file I/O. Copies share the provider an...
Definition ui_log_view.hpp:48
std::shared_ptr< FileLogModel > fileModel() const noexcept
std::shared_ptr< SourceBudget > budget() const noexcept
LogSource()=default
Empty descriptor; mounting reports INVALID_ARGUMENT.
std::shared_ptr< LogBookmarkProvider > bookmarks() const noexcept
std::optional< std::uint64_t > rowCount() const noexcept
Typed Widget observation; explicit composite specializations reuse their existing weak facades.
Definition ui_ref.hpp:761
Public Portals API.
Definition action.hpp:8
std::expected< void, SourceError > seekLogByte(WidgetTree &tree, Node< LogView > node, std::uint64_t byteOffset)
std::expected< void, SourceError > seekLogRow(WidgetTree &tree, Node< LogView > node, std::uint64_t ordinal)
std::expected< LogNavigation, SourceError > logNavigation(WidgetTree &tree, Node< LogView > node)
SourceError
Source protocol and admission failures, independent of a provider's storage format.
Definition source_budget.hpp:14
std::expected< void, ManagedError > setLogModel(ManagedScene &scene, Node< LogView > node, ui::LogSource source)
Fixed bounds independent of file length; no row index is constructed.
Definition log_file.hpp:29
Configurable metadata bounds; no source-count limit or LRU eviction.
Definition log_navigation.hpp:89
Immutable UTF-8 record with its original byte position; separators are excluded.
Definition log_file.hpp:18
Original error plus independent runner/restoration and cleanup failures.
Definition managed_diagnostics.hpp:62
Positive external-source display caps; independent of rolling-log append limits.
Definition ui_log_view.hpp:30
std::size_t maxRecords
Maximum logical records retained in one local prepared window.
Definition ui_log_view.hpp:31
std::size_t maxRecordBytes
Maximum single source record, including rich finite strings.
Definition ui_log_view.hpp:33
std::size_t maxBytes
Maximum retained record payload bytes before display expansion.
Definition ui_log_view.hpp:32
External log presentation and native navigation settings.
Definition ui_log_view.hpp:37
bool readOnly
Disable user navigation; checked programmatic navigation remains available.
Definition ui_log_view.hpp:40
LogCheckpointOptions checkpoints
Metadata bounds used when creating the default session.
Definition ui_log_view.hpp:42
LogSourceLimits limits
Bounded display payload caps, additionally constrained by the shared source ledger.
Definition ui_log_view.hpp:38
LogNavigation navigation
Optional explicit session reuse; omitted creates an independent scene-owned session.
Definition ui_log_view.hpp:41
bool followTail
Start at and follow the available tail when the provider supports it.
Definition ui_log_view.hpp:39