EN
RU
Portals
0.7.0 · dev
0.7.0 · dev (544a5c68c72e · 2026-11-28 UTC)
Toggle main menu visibility
Loading...
Searching...
No Matches
legacy.hpp
1
// Copyright (c) 2026 ttldtor.
2
// SPDX-License-Identifier: BSL-1.0
3
#pragma once
4
5
#include <portals/terminal.hpp>
6
7
#include <cstddef>
8
#include <expected>
9
#include <string>
10
15
namespace
portals::legacy
{
16
21
struct
VirtualTerminal
{
31
static
std::expected<void, TerminalError>
tryEnable
() noexcept;
32
36
static
bool
enable
() noexcept;
37
};
38
46
std::
string
moveTo
(std::
size_t
line, std::
size_t
column);
47
52
std::
string
hideCursor
();
53
58
std::
string
showCursor
();
59
60
}
// namespace portals::legacy
portals::legacy
Minimal streaming compatibility for the original MarketDepthModelSample. This API does not run an App...
Definition
legacy.hpp:15
portals::legacy::hideCursor
std::string hideCursor()
Return the VT cursor-hide sequence; ignoring the result has no effect.
portals::legacy::moveTo
std::string moveTo(std::size_t line, std::size_t column)
Return a cursor-position sequence without performing I/O.
portals::legacy::showCursor
std::string showCursor()
Return the VT cursor-show sequence; ignoring the result has no effect.
portals::legacy::VirtualTerminal
Enable VT interpretation on the process's existing standard output. This stateless compatibility util...
Definition
legacy.hpp:21
portals::legacy::VirtualTerminal::enable
static bool enable() noexcept
Historical bool form, without retaining or printing an error.
portals::legacy::VirtualTerminal::tryEnable
static std::expected< void, TerminalError > tryEnable() noexcept
Checked form of the historical output-mode switch. On Windows, preserve other mode bits and enable EN...
include
portals
legacy.hpp