0.0.3-beta3
The NWindows library is a C++ text user interface (TUI) library for building console applications on Linux. The library uses elements to compose user interfaces using an innovative and concise manipulator system. The library provides a rich set of elements with which to build user interfaces.
Built on top of the ncursesw library, NWindows works on both xterm and raw linux terminal windows, and also works over ssh.
Here is a simple example of an NWindows application that demonstrates the use of NWindow's manipulator syntax to create users interfaces. The program creates a window with a button that closes the window when clicked:
#include "NWindows/NWindows.hpp"
using namespace nwindows;
int main(void) {
NWindow::ptr window = NWindow::create(AUTO_SIZE, AUTO_SIZE);
window
| title("Hello")
| add_child(
NButtonElement::create("Hello world!")
| margin({ 2,1,2,1 })
| on_click([window](int button, NClickedEventArgs& event)
{
event.handled = true;
event.window->close();
}
)
);
window->run();
}
which displays the following output when executed.
2.0 - Installing and Building NWindows
3.0 - Packaging NWindows Applications
NWindows is written by an independent developer. Your support and sponsorship for this, and other Open Source projects by Robin Davies would mean more than you would think. You can make a monthly or a one time donation at Robin Davies' GitHub Sponsorship page