EMath++
Classes for mathematical concepts
|
Window class extension for output. More...
Public Member Functions | |
OWindow () noexcept | |
Default constructor. | |
const unsigned int & | get_scroll_index () const noexcept |
Gets if the scroll index. | |
const ::std::vector<::std::string > & | get_data () const noexcept |
Gets the data vector. | |
const unsigned int | get_data_size () const noexcept |
Gets the data vector size. | |
const unsigned int | get_title_y () const noexcept override |
Gets the title y coordinate. | |
const unsigned int | get_title_x () const noexcept override |
Gets the title x coordinate. | |
void | set_data (::std::vector<::std::string > &&data) noexcept |
Sets the data vector. | |
void | scroll_up () noexcept |
Scrolls up, internally substracts from the scroll index within certain bounds. | |
void | scroll_down () noexcept |
Scrolls down, internally adds to the scroll index within certain bounds. | |
~OWindow () noexcept=default | |
Default destructor. | |
Public Member Functions inherited from efc::Window | |
Window () noexcept | |
Generic constructor with default values. | |
const char * | get_title () const noexcept |
Returns the c_str() const char pointer of the title std::string. | |
const unsigned int & | get_y () const noexcept |
Returns the y coordinate. | |
const unsigned int & | get_x () const noexcept |
Returns the x coordinate. | |
const unsigned int & | get_height () const noexcept |
Returns the height value. | |
const unsigned int & | get_width () const noexcept |
Returns the width value. | |
const unsigned int | get_title_size () const noexcept |
Returns the title size. | |
void | set_title (const ::std::string &&title) noexcept |
Sets the title. | |
void | set_coords (const unsigned int y, const unsigned int x) noexcept |
Sets the y and x coordinates. | |
void | set_size (const unsigned int h, const unsigned int w) noexcept |
Sets the size. | |
void | set_active (const bool active) noexcept |
Sets the active boolean to the provided value. | |
virtual const unsigned int | get_title_y () const noexcept |
Gets the title y coordinate. | |
virtual const unsigned int | get_title_x () const noexcept |
Gets the title x coordinate. | |
const bool | needs_update () noexcept |
Gets if the window needs a redraw. | |
const bool | is_active () const noexcept |
Gets if the window is active/focused. | |
void | place () |
Deletes the WINDOW pointer and creates a new WINDOW at the class coordinates. | |
virtual | ~Window () noexcept |
Calls curses delwin() function on the curses WINDOW object and returns. | |
Additional Inherited Members | |
Public Attributes inherited from efc::Window | |
WINDOW * | o |
Pointer to the curses WINDOW object. | |
Protected Attributes inherited from efc::Window | |
bool | c |
Two booleans: c for knowing if contents changed, and a for knowing if window is active. | |
bool | a |
::std::string | t |
String t: window title. | |
unsigned int | y |
Four unsigned ints: x and y for the coordinates relative to the console window, w and h for the size of the window. | |
unsigned int | x |
unsigned int | h |
unsigned int | w |
Window class extension for output.
Window class implementation that focuses on showin data. Comes with the ability to scroll through an std::vector of std::string
Definition at line 169 of file interface.cpp.
|
inlinenoexcept |
Default constructor.
Definition at line 183 of file interface.cpp.
|
inlinenoexcept |
Gets the data vector.
Definition at line 193 of file interface.cpp.
|
inlinenoexcept |
Gets the data vector size.
Definition at line 198 of file interface.cpp.
|
inlinenoexcept |
Gets if the scroll index.
Definition at line 188 of file interface.cpp.
|
inlineoverridevirtualnoexcept |
Gets the title x coordinate.
Reimplemented from efc::Window.
Definition at line 208 of file interface.cpp.
References efc::Window::t.
|
inlineoverridevirtualnoexcept |
Gets the title y coordinate.
Reimplemented from efc::Window.
Definition at line 203 of file interface.cpp.
|
inlinenoexcept |
Scrolls down, internally adds to the scroll index within certain bounds.
Definition at line 221 of file interface.cpp.
References efc::Window::c.
|
inlinenoexcept |
Scrolls up, internally substracts from the scroll index within certain bounds.
Definition at line 217 of file interface.cpp.
References efc::Window::c.
|
inlinenoexcept |
Sets the data vector.
data | The data vector to replace with |
Definition at line 213 of file interface.cpp.
References efc::Window::c.