![]() |
EMath++
Classes for mathematical concepts
|
Terminal class to manage the terminal through curses. More...
Public Member Functions | |
| void | flush () |
| Function for flushin all the Terminal's Windows. | |
| void | set_ltitle (const ::std::string title) noexcept |
| Function for setting the title of the left Window. | |
| void | set_rtitle (const ::std::string title) noexcept |
| Function for setting the title of the right Window. | |
| void | set_prompt (const ::std::string prompt) noexcept |
| Function for setting the prompt of the bottom Window. | |
| void | set_ldata (::std::vector<::std::string > data) noexcept |
| Function for setting data vector of the left Window. | |
| void | set_rdata (::std::vector<::std::string > data) noexcept |
| Function for setting data vector of the right Window. | |
| const int | get_short_input () const |
| Function for getting short single char input from the Terminal. | |
| const ::std::string | get_long_input () const |
| Function for getting long single string input from the Terminal. | |
| void | scroll_down (const unsigned int id) noexcept |
| Function for scrolling down the left or right window depending on the provided id. | |
| void | scroll_up (const unsigned int id) noexcept |
| Function for scrolling up the left or right window depending on the provided id. | |
| void | echo_result (const ::std::string &result) |
| Echoes the provided result to the prompt and waits for a key press. | |
| void | swap_active (const unsigned int id) noexcept |
| Swaps the active window to the one matching the provide id. | |
| ~Terminal () noexcept | |
| Default destructor, it deletes the Window pointers, sets the singleton instance to nullptr, stops the signal listener and stops curses. | |
Static Public Member Functions | |
| static Terminal * | init () noexcept |
| Static function for building the singleton static instance. | |
Terminal class to manage the terminal through curses.
It works as a singleton. Not generic in any way.
Definition at line 259 of file interface.cpp.
|
inlinenoexcept |
Default destructor, it deletes the Window pointers, sets the singleton instance to nullptr, stops the signal listener and stops curses.
Definition at line 438 of file interface.cpp.
|
inline |
Echoes the provided result to the prompt and waits for a key press.
| result | The result to echo as a const ::std::string& |
Definition at line 416 of file interface.cpp.
References efc::Window::get_title(), and efc::Window::o.
|
inline |
Function for flushin all the Terminal's Windows.
Definition at line 347 of file interface.cpp.
References efc::Window::o.
|
inline |
Function for getting long single string input from the Terminal.
Definition at line 391 of file interface.cpp.
References efc::Window::o.
|
inline |
Function for getting short single char input from the Terminal.
Definition at line 377 of file interface.cpp.
References efc::Window::o.
|
inlinestaticnoexcept |
Static function for building the singleton static instance.
Definition at line 340 of file interface.cpp.
|
inlinenoexcept |
Function for scrolling down the left or right window depending on the provided id.
| id | The id of the window as a const unsigned int |
Definition at line 396 of file interface.cpp.
References efc::OWindow::scroll_down().
|
inlinenoexcept |
Function for scrolling up the left or right window depending on the provided id.
| id | The id of the window as a const unsigned int |
Definition at line 406 of file interface.cpp.
References efc::OWindow::scroll_up().
|
inlinenoexcept |
Function for setting data vector of the left Window.
| data | The data as a std::vector of std::string |
Definition at line 367 of file interface.cpp.
References efc::OWindow::set_data().
|
inlinenoexcept |
Function for setting the title of the left Window.
| title | The title as a std::string |
Definition at line 352 of file interface.cpp.
References efc::Window::set_title().
|
inlinenoexcept |
Function for setting the prompt of the bottom Window.
| prompt | The prompt as a std::string |
Definition at line 362 of file interface.cpp.
References efc::Window::set_title().
|
inlinenoexcept |
Function for setting data vector of the right Window.
| data | The data as a std::vector of std::string |
Definition at line 372 of file interface.cpp.
References efc::OWindow::set_data().
|
inlinenoexcept |
Function for setting the title of the right Window.
| title | The title as a std::string |
Definition at line 357 of file interface.cpp.
References efc::Window::set_title().
|
inlinenoexcept |
Swaps the active window to the one matching the provide id.
| id | The id of the window as a const unsigned int |
Definition at line 427 of file interface.cpp.