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
6namespace ttx::terminal {
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
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}
Definition capability.h:8
constexpr friend auto tag_invoke(di::Tag< di::reflect >, di::InPlaceType< ScrollRegion >)
Definition scroll_region.h:31
u32 end_row
Represents the last row in the scroll region (exclusive!).
Definition scroll_region.h:20
constexpr ScrollRegion(u32 start_row, u32 end_row)
Definition scroll_region.h:26
u32 start_row
Represents the first row in the scroll region.
Definition scroll_region.h:19
auto operator==(ScrollRegion const &) const -> bool=default
auto operator<=>(ScrollRegion const &) const =default