53 lines
1.1 KiB
C++
53 lines
1.1 KiB
C++
/**
|
|
* @author Christian Burger (christian@krikkel.de)
|
|
*/
|
|
|
|
#include <NCurses/Window.hpp>
|
|
#include <NCurses/VerticalTilingWindowManager.hpp>
|
|
|
|
namespace krikkel::NCurses
|
|
{
|
|
Window::Window(VerticalTilingWindowManager *windowManager)
|
|
: NCursesWindow(0, 0, 0, 0)
|
|
{
|
|
windowManager->addWindow(this);
|
|
windowManager->updateLayout();
|
|
}
|
|
|
|
Window::Window(int lines, int columns, int y, int x)
|
|
: NCursesWindow(lines, columns, y, x)
|
|
{}
|
|
|
|
int Window::addnwstr(const wchar_t *wstr, int n)
|
|
{
|
|
return ::waddnwstr(w, wstr, n);
|
|
}
|
|
|
|
int Window::add_wch(const cchar_t *character)
|
|
{
|
|
return ::wadd_wch(w, character);
|
|
}
|
|
|
|
int Window::ins_wch(const cchar_t *character)
|
|
{
|
|
return ::wins_wch(w, character);
|
|
}
|
|
|
|
int Window::get_wch(wint_t *character)
|
|
{
|
|
return ::wget_wch(w, character);
|
|
}
|
|
|
|
SingleUserInput Window::readSingleUserInput()
|
|
{
|
|
wint_t input;
|
|
int result = get_wch(&input);
|
|
return SingleUserInput(result, input);
|
|
}
|
|
|
|
int Window::resize(int rows, int cols)
|
|
{
|
|
return NCursesWindow::wresize(rows, cols);
|
|
}
|
|
|
|
} |