cpp-terminal 1.0.0
Small C++ library for writing multiplatform terminal applications
Loading...
Searching...
No Matches
screen.hpp
Go to the documentation of this file.
1/*
2* cpp-terminal
3* C++ library for writing multi-platform terminal applications.
4*
5* SPDX-FileCopyrightText: 2019-2024 cpp-terminal
6*
7* SPDX-License-Identifier: MIT
8*/
9
10#pragma once
11
12#include "cpp-terminal/size.hpp"
13
14#include <string>
15
16namespace Term
17{
18
19class Screen
20{
21public:
22 Screen() = default;
23 explicit Screen(const Size& size);
24 const Rows& rows() const noexcept;
25 const Columns& columns() const noexcept;
26 bool empty() const;
27 bool operator==(const Term::Screen& screen) const;
28 bool operator!=(const Term::Screen& screen) const;
29
30private:
32};
33
34// clear the screen
35std::string clear_screen();
36// save the current terminal state
37std::string screen_save();
38// load a previously saved terminal state
39std::string screen_load();
40// get the terminal size
42
43} // namespace Term
Screen()=default
Size m_size
Definition screen.hpp:31
const Columns & columns() const noexcept
Definition screen.cpp:16
const Rows & rows() const noexcept
Definition screen.cpp:14
bool empty() const
Definition screen.cpp:18
Definition args.cpp:13
std::string clear_screen()
Definition screen.cpp:20
std::string screen_save()
Definition screen.cpp:22
std::string screen_load()
Definition screen.cpp:27
Screen screen_size()
Definition screen.cpp:24