5#include <portals/scroll_controls.hpp>
30using LogError = std::variant<TreeError, TextError>;
87 std::expected<CellSize, TreeError>
measureChildren(std::span<const MeasuredChild> children)
const override;
94 friend struct detail::LogViewAccess;
95 std::unique_ptr<detail::LogViewState> log_;
std::expected< CellSize, TreeError > measure(CellSize available) override
LogView(WidthPolicy width={}, LogViewConfig config={}, ControlStyle style={}, SizePolicy policy=DEFAULT_LOG_VIEW_POLICY)
std::expected< CellSize, TreeError > measureChildren(std::span< const MeasuredChild > children) const override
~LogView() override
Destroy bounded owning content on UI after the last tree borrow.
LogView(WidthPolicy width, LogViewConfig config, ControlStyle style, SizePolicy policy, FrameOptions frame)
std::expected< void, TreeError > paint(PaintContext &context) override
Copyable typed observer; never owns or exposes an unchecked widget pointer.
Definition widget.hpp:92
Borrowed synchronous command sink supplied by the frame owner. submit must consume commands immediate...
Definition widget_types.hpp:66
Public Portals API.
Definition action.hpp:8
std::variant< TreeError, TextError > LogError
Exact native admission failure, retaining original UTF-8 diagnostics.
Definition log_view.hpp:30
std::expected< void, TreeError > validateLogLimits(LogLimits limits) noexcept
std::expected< void, TreeError > followLogTail(WidgetTree &tree, Node< LogView > node)
constexpr SizePolicy DEFAULT_LOG_VIEW_POLICY
Native log default: fill both viewport axes from zero flex bases; explicit SizePolicy stays literal.
Definition log_view.hpp:33
std::expected< LogAppendReceipt, LogError > appendLogBatch(WidgetTree &tree, Node< LogView > node, std::string_view bytes)
constexpr SizePolicy DEFAULT_VIEWPORT_POLICY
A bounded data viewport fills both axes without requesting the whole model extent.
Definition layout.hpp:53
std::expected< LogStatus, TreeError > logStatus(WidgetTree &tree, Node< LogView > node)
std::expected< void, TreeError > clearLog(WidgetTree &tree, Node< LogView > node)
An owning available extent in terminal columns/rows.
Definition geometry.hpp:44
Owning paint values; no theme engine or behavior is encoded here.
Definition controls.hpp:24
Owning advanced frame settings; legacy BorderOptions remains a literal value type.
Definition primitives.hpp:62
Owning receipt for one atomic complete batch; drop-oldest is a successful outcome.
Definition log_view.hpp:36
std::size_t droppedLines
Old and new records displaced by this batch.
Definition log_view.hpp:38
std::size_t retainedLines
Records retained after commit.
Definition log_view.hpp:39
std::size_t retainedBytes
Retained payload bytes after commit.
Definition log_view.hpp:40
std::size_t acceptedLines
All parsed records, including records displaced by this same batch.
Definition log_view.hpp:37
Positive plain-log admission and retention bounds; oversized settings are rejected.
Definition log_view.hpp:15
std::size_t maxRecordBytes
One record excluding its separator; ceiling 64 KiB.
Definition log_view.hpp:19
std::size_t maxBatchBytes
Complete input batch including separators; ceiling 256 KiB.
Definition log_view.hpp:18
std::size_t maxLines
Retained records, including empty records; ceiling 8192.
Definition log_view.hpp:16
std::size_t maxBytes
Retained UTF-8 payload without separators; ceiling 4 MiB.
Definition log_view.hpp:17
Owning scalar observation; never retains record payload or widgets.
Definition log_view.hpp:44
std::uint64_t newWhilePaused
Accepted records since following was paused.
Definition log_view.hpp:48
std::size_t retainedLines
Current record count.
Definition log_view.hpp:45
std::uint64_t droppedLines
Cumulative displaced records since clear.
Definition log_view.hpp:47
std::size_t retainedBytes
Current UTF-8 payload bytes, excluding separators.
Definition log_view.hpp:46
bool followTail
Follow the latest visual row during preparation.
Definition log_view.hpp:49
bool droppedSaturated
The displaced count reached its representable ceiling.
Definition log_view.hpp:50
bool newWhilePausedSaturated
The paused count reached its representable ceiling.
Definition log_view.hpp:51
Owning bounded-log settings; frame bars use ON_FRAME without a horizontal gutter.
Definition log_view.hpp:23
bool followTail
Initially follow the latest visual row.
Definition log_view.hpp:25
LogLimits limits
Positive resource limits, checked before mounting or accepting input.
Definition log_view.hpp:24
bool readOnly
Disable user navigation; programmatic append, clear and tail remain allowed.
Definition log_view.hpp:26
Owning independent policies for width and height.
Definition layout.hpp:35
Owning deterministic width policy; no font or terminal matching promise.
Definition text.hpp:42