EN
RU
Portals
0.7.0 · dev
0.7.0 · dev (544a5c68c72e · 2026-11-28 UTC)
Toggle main menu visibility
Loading...
Searching...
No Matches
frame.hpp
1
// Copyright (c) 2026 ttldtor.
2
// SPDX-License-Identifier: BSL-1.0
3
#pragma once
4
5
#include <portals/layout.hpp>
6
7
namespace
portals
{
9
enum class
FramePattern
{
10
SINGLE,
11
PLAIN
= SINGLE,
12
ROUNDED
,
13
DOUBLE,
14
HEAVY
,
15
ASCII
16
};
17
19
struct
FrameSides
{
20
bool
top
{
true
};
21
bool
right
{
true
};
22
bool
bottom
{
true
};
23
bool
left
{
true
};
24
26
constexpr
LayoutPadding
insets
() const noexcept {
27
return
{
left
? 1 : 0,
top
? 1 : 0,
right
? 1 : 0,
bottom
? 1 : 0};
28
}
29
};
30
32
enum class
FrameTitleAlignment
{
33
START
,
34
CENTER
,
35
END
36
};
37
39
enum class
TitleDecoration
{
40
NONE
,
41
SPACED
,
42
SQUARE
,
43
ANGLE
,
44
ROUND
,
45
PROFILE
46
};
47
48
}
// namespace portals
portals
Public Portals API.
Definition
action.hpp:8
portals::FramePattern
FramePattern
Built-in frame line patterns, independent of terminal width policy.
Definition
frame.hpp:9
portals::FramePattern::HEAVY
@ HEAVY
Heavy lines and square corners.
Definition
frame.hpp:14
portals::FramePattern::ROUNDED
@ ROUNDED
Single lines and rounded corners.
Definition
frame.hpp:12
portals::DocumentLanguage::PLAIN
@ PLAIN
Source bytes have the normal role.
Definition
document_highlight_types.hpp:12
portals::TitleDecoration
TitleDecoration
Optional top-title break decoration; NONE preserves literal legacy titles.
Definition
frame.hpp:39
portals::TitleDecoration::SQUARE
@ SQUARE
Square brackets and inner spaces.
Definition
frame.hpp:42
portals::TitleDecoration::ROUND
@ ROUND
Parentheses and inner spaces.
Definition
frame.hpp:44
portals::TitleDecoration::PROFILE
@ PROFILE
Explicit selected profile caps; customTitleDecoration still wins.
Definition
frame.hpp:45
portals::TitleDecoration::SPACED
@ SPACED
One space on either side.
Definition
frame.hpp:41
portals::TitleDecoration::ANGLE
@ ANGLE
Angle brackets and inner spaces.
Definition
frame.hpp:43
portals::ChartGlyphSet::ASCII
@ ASCII
Portable vertical bar and hash brushes.
Definition
chart.hpp:56
portals::FrameTitleAlignment
FrameTitleAlignment
Alignment of the maximal whole-grapheme title prefix fitting the top edge.
Definition
frame.hpp:32
portals::DialogPlacement::CENTER
@ CENTER
Center in the usable viewport, rounding down.
Definition
dialog.hpp:22
portals::ButtonChrome::NONE
@ NONE
Caption only, including a single-glyph action button.
Definition
controls.hpp:157
portals::DialogClosePlacement::START
@ START
Immediately after the leading corner.
Definition
dialog.hpp:35
portals::FrameSides
Present frame sides, also defining one-cell content insets.
Definition
frame.hpp:19
portals::FrameSides::right
bool right
Reserve and paint the right column.
Definition
frame.hpp:21
portals::FrameSides::top
bool top
Reserve and paint the top row.
Definition
frame.hpp:20
portals::FrameSides::bottom
bool bottom
Reserve and paint the bottom row.
Definition
frame.hpp:22
portals::FrameSides::insets
constexpr LayoutPadding insets() const noexcept
Definition
frame.hpp:26
portals::FrameSides::left
bool left
Reserve and paint the left column.
Definition
frame.hpp:23
portals::LayoutPadding
Owning nonnegative padding in terminal cells.
Definition
layout.hpp:185
include
portals
frame.hpp