ttx 0.1.0
Loading...
Searching...
No Matches
ttx::terminal::ScrollRegion Struct Reference

Represents the scrolling region for a terminal. More...

#include <ttx/terminal/scroll_region.h>

Public Member Functions

 ScrollRegion ()=delete
 
constexpr ScrollRegion (u32 start_row, u32 end_row)
 
auto operator== (ScrollRegion const &) const -> bool=default
 
auto operator<=> (ScrollRegion const &) const =default
 

Public Attributes

u32 start_row { 0 }
 Represents the first row in the scroll region.
 
u32 end_row { 0 }
 Represents the last row in the scroll region (exclusive!).
 

Friends

constexpr friend auto tag_invoke (di::Tag< di::reflect >, di::InPlaceType< ScrollRegion >)
 

Detailed Description

Represents the scrolling region for a terminal.

The vertical scroll region is set via DECSTBM, while the horizontal margin is set via DECSLRM. Currently, only vertical margins are supported, since they are significantly more common. By default, the scroll region is the entire screen.

The scroll region affects how commands like insert lines and delete lines function, as well as scrolling induced via text auto-wrapping or cursor movement (C0 reverse index and line feed). Lines outside the scroll region are not affected by scrolling.

Constructor & Destructor Documentation

◆ ScrollRegion() [1/2]

ttx::terminal::ScrollRegion::ScrollRegion ( )
delete

◆ ScrollRegion() [2/2]

ttx::terminal::ScrollRegion::ScrollRegion ( u32 start_row,
u32 end_row )
inlineconstexpr

Member Function Documentation

◆ operator<=>()

auto ttx::terminal::ScrollRegion::operator<=> ( ScrollRegion const & ) const
default

◆ operator==()

auto ttx::terminal::ScrollRegion::operator== ( ScrollRegion const & ) const -> bool=default
default

Friends And Related Symbol Documentation

◆ tag_invoke

friend auto tag_invoke ( di::Tag< di::reflect > ,
di::InPlaceType< ScrollRegion >  )
friend

Member Data Documentation

◆ end_row

u32 ttx::terminal::ScrollRegion::end_row { 0 }

Represents the last row in the scroll region (exclusive!).

◆ start_row

u32 ttx::terminal::ScrollRegion::start_row { 0 }

Represents the first row in the scroll region.


The documentation for this struct was generated from the following file: