cpp-terminal 1.0.0
Small C++ library for writing multiplatform terminal applications
Loading...
Searching...
No Matches
terminal_impl.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
15
16#include <cstddef>
17
18namespace Term
19{
20
22{
23public:
24 friend class Private::Signals;
25 ~Terminal() noexcept;
26 Terminal() noexcept;
27 Terminal(const Terminal&) = delete;
28 Terminal(Terminal&&) = delete;
29 Terminal& operator=(Terminal&&) = delete;
30 Terminal& operator=(const Terminal&) = delete;
31 template<typename... Args> void setOptions(const Args&&... args)
32 {
33 m_options = {args...};
35 }
36 Term::Options getOptions() const noexcept;
37
38private:
42 static void store_and_restore() noexcept;
43
48 void setMode() const;
49
50 void setOptions();
51 void applyOptions() const;
52
53 static std::size_t setMouseEvents();
54 static std::size_t unsetMouseEvents();
55 static std::size_t setFocusEvents();
56 static std::size_t unsetFocusEvents();
57
58 static void set_unset_utf8();
60 void clean();
61};
62
63} // namespace Term
void setMode() const
Set mode raw/cooked.
static void set_unset_utf8()
static void store_and_restore() noexcept
Store and restore the default state of the terminal.
void applyOptions() const
static std::size_t setFocusEvents()
static std::size_t setMouseEvents()
static std::size_t unsetMouseEvents()
~Terminal() noexcept
Term::Options getOptions() const noexcept
Term::Options m_options
static std::size_t unsetFocusEvents()
Definition args.cpp:13