Generic class for wrapping a curses WINDOW.
More...
|
| 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.
|
|
|
WINDOW * | o |
| Pointer to the curses WINDOW object.
|
|
|
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 |
|
Generic class for wrapping a curses WINDOW.
It wraps a curses WINDOW in a way that lets it manage some centralized structure.
Definition at line 59 of file interface.cpp.
◆ Window()
Generic constructor with default values.
Definition at line 81 of file interface.cpp.
◆ ~Window()
virtual efc::Window::~Window |
( |
| ) |
|
|
inlinevirtualnoexcept |
Calls curses delwin() function on the curses WINDOW object and returns.
Definition at line 161 of file interface.cpp.
◆ get_height()
const unsigned int & efc::Window::get_height |
( |
| ) |
const |
|
inlinenoexcept |
Returns the height value.
- Returns
- (const unsigned int&) The height value as a const unsigned int&
Definition at line 101 of file interface.cpp.
◆ get_title()
const char * efc::Window::get_title |
( |
| ) |
const |
|
inlinenoexcept |
Returns the c_str() const char pointer of the title std::string.
- Returns
- (const char*) The title as a char array
Definition at line 86 of file interface.cpp.
◆ get_title_size()
const unsigned int efc::Window::get_title_size |
( |
| ) |
const |
|
inlinenoexcept |
Returns the title size.
- Returns
- (const unsigned int) The title size as a const unsigned int
Definition at line 111 of file interface.cpp.
◆ get_title_x()
virtual const unsigned int efc::Window::get_title_x |
( |
| ) |
const |
|
inlinevirtualnoexcept |
◆ get_title_y()
virtual const unsigned int efc::Window::get_title_y |
( |
| ) |
const |
|
inlinevirtualnoexcept |
◆ get_width()
const unsigned int & efc::Window::get_width |
( |
| ) |
const |
|
inlinenoexcept |
Returns the width value.
- Returns
- (const unsigned int&) The width value as a const unsigned int&
Definition at line 106 of file interface.cpp.
◆ get_x()
const unsigned int & efc::Window::get_x |
( |
| ) |
const |
|
inlinenoexcept |
Returns the x coordinate.
- Returns
- (const unsigned int&) The x coordinate as a const unsigned int&
Definition at line 96 of file interface.cpp.
◆ get_y()
const unsigned int & efc::Window::get_y |
( |
| ) |
const |
|
inlinenoexcept |
Returns the y coordinate.
- Returns
- (const unsigned int&) The y coordinate as a const unsigned int&
Definition at line 91 of file interface.cpp.
References y.
◆ is_active()
const bool efc::Window::is_active |
( |
| ) |
const |
|
inlinenoexcept |
Gets if the window is active/focused.
- Returns
- (const bool) True if the window is active, false otherwise
Definition at line 153 of file interface.cpp.
◆ needs_update()
const bool efc::Window::needs_update |
( |
| ) |
|
|
inlinenoexcept |
Gets if the window needs a redraw.
- Returns
- (const bool) True if the window should be redrawed, false otherwise
Definition at line 148 of file interface.cpp.
◆ place()
void efc::Window::place |
( |
| ) |
|
|
inline |
Deletes the WINDOW pointer and creates a new WINDOW at the class coordinates.
Definition at line 157 of file interface.cpp.
◆ set_active()
void efc::Window::set_active |
( |
const bool |
active | ) |
|
|
inlinenoexcept |
Sets the active boolean to the provided value.
- Parameters
-
active | If it is a active as a const boolean |
Definition at line 133 of file interface.cpp.
◆ set_coords()
void efc::Window::set_coords |
( |
const unsigned int |
y, |
|
|
const unsigned int |
x |
|
) |
| |
|
inlinenoexcept |
Sets the y and x coordinates.
- Parameters
-
y | The y coordinate as a const unsigned int y |
x | The x coordinate as a const unsigned int x |
Definition at line 122 of file interface.cpp.
References y.
◆ set_size()
void efc::Window::set_size |
( |
const unsigned int |
h, |
|
|
const unsigned int |
w |
|
) |
| |
|
inlinenoexcept |
Sets the size.
- Parameters
-
h | The height as a const unsigned int y |
w | The width as a const unsigned int x |
Definition at line 128 of file interface.cpp.
◆ set_title()
void efc::Window::set_title |
( |
const ::std::string && |
title | ) |
|
|
inlinenoexcept |
Sets the title.
- Parameters
-
title | The title as a cons std::string&& |
Definition at line 116 of file interface.cpp.
Two booleans: c for knowing if contents changed, and a for knowing if window is active.
Definition at line 64 of file interface.cpp.
unsigned int efc::Window::h |
|
protected |
Pointer to the curses WINDOW object.
Definition at line 77 of file interface.cpp.
::std::string efc::Window::t |
|
protected |
unsigned int efc::Window::w |
|
protected |
unsigned int efc::Window::x |
|
protected |
unsigned int efc::Window::y |
|
protected |
Four unsigned ints: x and y for the coordinates relative to the console window, w and h for the size of the window.
Definition at line 72 of file interface.cpp.
The documentation for this class was generated from the following file: