1 #ifndef TERMOX_TERMINAL_DETAIL_SCREEN_BUFFERS_HPP
2 #define TERMOX_TERMINAL_DETAIL_SCREEN_BUFFERS_HPP
3 #include <termox/terminal/detail/canvas.hpp>
4 #include <termox/widget/area.hpp>
25 [[nodiscard]]
auto area()
const -> Area;
Color numbers [0 - 180] are valid.
Definition: color.hpp:16
A 2D field of Glyphs, useful as a screen buffer.
Definition: canvas.hpp:18
std::vector< std::pair< ox::Point, ox::Glyph > > Diff
Type used to model differences between two Canvas objects.
Definition: canvas.hpp:24
Holds the current and next screen buffers as Canvas objects.
Definition: screen_buffers.hpp:11
Screen_buffers(ox::Area a)
Construct with both Canvas objects having Area a.
Definition: screen_buffers.cpp:8
auto current_screen_as_diff() -> Canvas::Diff const &
Returns the entire current screen as a Diff. Used on Window Resize.
Definition: screen_buffers.cpp:32
auto merge_and_diff() -> Canvas::Diff const &
Merges the next Canvas into the current Canvas and returns the changes.
Definition: screen_buffers.cpp:20
auto area() const -> Area
Return the current size of the screen buffers.
Definition: screen_buffers.cpp:16
auto generate_color_diff(Color c) -> Canvas::Diff const &
Generates a Canvas::Diff, with every Glyph from current that has c.
Definition: screen_buffers.cpp:26
void resize(ox::Area a)
Resizes both current and next Canvas objects to a.
Definition: screen_buffers.cpp:10
void merge()
Merges the next Canvas into the current Canvas.
Definition: screen_buffers.cpp:18