ttx
0.1.0
Loading...
Searching...
No Matches
scroll_region.h
Go to the documentation of this file.
1
#pragma once
2
3
#include "di/reflect/prelude.h"
4
#include "di/types/prelude.h"
5
6
namespace
ttx::terminal
{
18
struct
ScrollRegion
{
19
u32
start_row
{ 0 };
20
u32
end_row
{ 0 };
21
22
// Delete the default constructor because the default scroll region depends on the
23
// terminal size.
24
ScrollRegion
() =
delete
;
25
26
constexpr
ScrollRegion
(u32
start_row
, u32
end_row
) :
start_row
(
start_row
),
end_row
(
end_row
) {}
27
28
auto
operator==
(
ScrollRegion
const
&)
const
->
bool
=
default
;
29
auto
operator<=>
(
ScrollRegion
const
&)
const
=
default
;
30
31
constexpr
friend
auto
tag_invoke
(di::Tag<di::reflect>, di::InPlaceType<ScrollRegion>) {
32
return
di::make_fields<
"ScrollRegion"
>(di::field<
"start_row"
, &
ScrollRegion::start_row
>,
33
di::field<
"end_row"
, &
ScrollRegion::end_row
>);
34
}
35
};
36
}
ttx::terminal
Definition
capability.h:8
ttx::terminal::ScrollRegion::tag_invoke
constexpr friend auto tag_invoke(di::Tag< di::reflect >, di::InPlaceType< ScrollRegion >)
Definition
scroll_region.h:31
ttx::terminal::ScrollRegion::ScrollRegion
ScrollRegion()=delete
ttx::terminal::ScrollRegion::end_row
u32 end_row
Represents the last row in the scroll region (exclusive!).
Definition
scroll_region.h:20
ttx::terminal::ScrollRegion::ScrollRegion
constexpr ScrollRegion(u32 start_row, u32 end_row)
Definition
scroll_region.h:26
ttx::terminal::ScrollRegion::start_row
u32 start_row
Represents the first row in the scroll region.
Definition
scroll_region.h:19
ttx::terminal::ScrollRegion::operator==
auto operator==(ScrollRegion const &) const -> bool=default
ttx::terminal::ScrollRegion::operator<=>
auto operator<=>(ScrollRegion const &) const =default
ttx
terminal
scroll_region.h
Generated by
1.13.2