ttx 0.1.0
Loading...
Searching...
No Matches
ttx::Renderer Class Reference

#include <ttx/renderer.h>

Public Member Functions

 Renderer ()
auto setup (dius::SyncFile &output, Feature features) -> di::Result<>
auto cleanup (dius::SyncFile &output) -> di::Result<>
void start (Size const &size, terminal::Palette const &outer_terminal_palette)
auto finish (dius::SyncFile &output, RenderedCursor const &cursor_in, di::Optional< di::String > window_title, di::Optional< terminal::Color > bg_color) -> di::Result<>
void flush_palette_color_state ()
void put_text (di::StringView text, u32 row, u32 col, terminal::GraphicsRendition const &rendition={}, di::Optional< terminal::Hyperlink const & > hyperlink={})
void put_text (c32 text, u32 row, u32 col, terminal::GraphicsRendition const &rendition={}, di::Optional< terminal::Hyperlink const & > hyperlink={})
void put_cell (di::StringView text, u32 row, u32 col, terminal::GraphicsRendition const &rendition, di::Optional< terminal::Hyperlink const & > hyperlink, terminal::MultiCellInfo const &multi_cell_info, bool explicitly_sized, bool complex_grapheme_cluster)
void clear_row (u32 row, terminal::GraphicsRendition const &graphics_rendition={}, di::Optional< terminal::Hyperlink const & > hyperlink={})
void set_bound (u32 row, u32 col, u32 width, u32 height)
auto set_local_palette (terminal::Palette const &palette) -> di::ScopeExit< di::Function< void()> >
void reset_local_palette ()
auto set_global_palette (terminal::Palette const &palette) -> di::ScopeExit< di::Function< void()> >
void reset_global_palette ()
auto set_dim_factor (u32 dim_factor) -> di::ScopeExit< di::Function< void()> >
void reset_dim_factor ()
auto resolve_color (terminal::PaletteIndex index) const -> terminal::Color
auto resolve_color (terminal::Color color) const -> terminal::Color
auto resolve_foreground (terminal::Color color) const -> terminal::Color
auto resolve_background (terminal::Color color) const -> terminal::Color
auto resolve_cursor_color () const -> terminal::Color
auto resolve_cursor_text_color () const -> terminal::Color
auto dimmed (terminal::Color color) const -> terminal::Color

Constructor & Destructor Documentation

◆ Renderer()

ttx::Renderer::Renderer ( )
inline

Member Function Documentation

◆ cleanup()

auto ttx::Renderer::cleanup ( dius::SyncFile & output) -> di::Result<>

◆ clear_row()

void ttx::Renderer::clear_row ( u32 row,
terminal::GraphicsRendition const & graphics_rendition = {},
di::Optional< terminal::Hyperlink const & > hyperlink = {} )

◆ dimmed()

auto ttx::Renderer::dimmed ( terminal::Color color) const -> terminal::Color

◆ finish()

auto ttx::Renderer::finish ( dius::SyncFile & output,
RenderedCursor const & cursor_in,
di::Optional< di::String > window_title,
di::Optional< terminal::Color > bg_color ) -> di::Result<>

◆ flush_palette_color_state()

void ttx::Renderer::flush_palette_color_state ( )

◆ put_cell()

void ttx::Renderer::put_cell ( di::StringView text,
u32 row,
u32 col,
terminal::GraphicsRendition const & rendition,
di::Optional< terminal::Hyperlink const & > hyperlink,
terminal::MultiCellInfo const & multi_cell_info,
bool explicitly_sized,
bool complex_grapheme_cluster )

◆ put_text() [1/2]

void ttx::Renderer::put_text ( c32 text,
u32 row,
u32 col,
terminal::GraphicsRendition const & rendition = {},
di::Optional< terminal::Hyperlink const & > hyperlink = {} )

◆ put_text() [2/2]

void ttx::Renderer::put_text ( di::StringView text,
u32 row,
u32 col,
terminal::GraphicsRendition const & rendition = {},
di::Optional< terminal::Hyperlink const & > hyperlink = {} )

◆ reset_dim_factor()

void ttx::Renderer::reset_dim_factor ( )
inline

◆ reset_global_palette()

void ttx::Renderer::reset_global_palette ( )
inline

◆ reset_local_palette()

void ttx::Renderer::reset_local_palette ( )
inline

◆ resolve_background()

auto ttx::Renderer::resolve_background ( terminal::Color color) const -> terminal::Color

◆ resolve_color() [1/2]

auto ttx::Renderer::resolve_color ( terminal::Color color) const -> terminal::Color

◆ resolve_color() [2/2]

auto ttx::Renderer::resolve_color ( terminal::PaletteIndex index) const -> terminal::Color

◆ resolve_cursor_color()

auto ttx::Renderer::resolve_cursor_color ( ) const -> terminal::Color

◆ resolve_cursor_text_color()

auto ttx::Renderer::resolve_cursor_text_color ( ) const -> terminal::Color

◆ resolve_foreground()

auto ttx::Renderer::resolve_foreground ( terminal::Color color) const -> terminal::Color

◆ set_bound()

void ttx::Renderer::set_bound ( u32 row,
u32 col,
u32 width,
u32 height )

◆ set_dim_factor()

auto ttx::Renderer::set_dim_factor ( u32 dim_factor) -> di::ScopeExit< di::Function< void()> >
inlinenodiscard

◆ set_global_palette()

auto ttx::Renderer::set_global_palette ( terminal::Palette const & palette) -> di::ScopeExit< di::Function< void()> >
inlinenodiscard

◆ set_local_palette()

auto ttx::Renderer::set_local_palette ( terminal::Palette const & palette) -> di::ScopeExit< di::Function< void()> >
inlinenodiscard

◆ setup()

auto ttx::Renderer::setup ( dius::SyncFile & output,
Feature features ) -> di::Result<>

◆ start()

void ttx::Renderer::start ( Size const & size,
terminal::Palette const & outer_terminal_palette )

The documentation for this class was generated from the following files: