2020-02-16 19:25:26 +00:00
|
|
|
//
|
|
|
|
// This is a **build** test - it does nothing else except ensure that all the C++ wrapper classes are included and that
|
|
|
|
// the program builds.
|
|
|
|
//
|
|
|
|
// Once there are demos which exercise all the C++ classes this "test" can be removed
|
|
|
|
//
|
|
|
|
#include <cstdlib>
|
|
|
|
#include <clocale>
|
|
|
|
#include <iostream>
|
|
|
|
#include <ncpp/NotCurses.hh>
|
|
|
|
#include <ncpp/Menu.hh>
|
2020-11-27 22:48:41 +00:00
|
|
|
#include <ncpp/Pile.hh>
|
2020-02-16 19:25:26 +00:00
|
|
|
#include <ncpp/Plane.hh>
|
|
|
|
#include <ncpp/Reel.hh>
|
2020-03-14 23:35:54 +00:00
|
|
|
#include <ncpp/MultiSelector.hh>
|
2020-02-16 19:25:26 +00:00
|
|
|
#include <ncpp/Selector.hh>
|
|
|
|
#include <ncpp/Visual.hh>
|
|
|
|
#include <ncpp/Direct.hh>
|
2020-04-11 22:20:11 +00:00
|
|
|
#include <ncpp/Plot.hh>
|
2020-05-02 21:01:21 +00:00
|
|
|
#include <ncpp/FDPlane.hh>
|
|
|
|
#include <ncpp/Subproc.hh>
|
2021-02-03 18:33:08 +00:00
|
|
|
#include <ncpp/Progbar.hh>
|
2020-02-16 19:25:26 +00:00
|
|
|
|
|
|
|
using namespace ncpp;
|
|
|
|
|
|
|
|
int run ()
|
|
|
|
{
|
|
|
|
NotCurses nc;
|
|
|
|
|
|
|
|
const char *ncver = nc.version ();
|
2020-05-24 12:41:18 +00:00
|
|
|
{
|
2020-09-13 19:17:07 +00:00
|
|
|
Plane p1 (1, 1, 0, 0);
|
|
|
|
Plot plot1 (p1);
|
|
|
|
Plane p2 (1, 1, 0, 0);
|
|
|
|
PlotU plot2 (p2);
|
|
|
|
Plane p3 (1, 1, 0, 0);
|
|
|
|
PlotD plot3 (p3);
|
2020-05-24 12:41:18 +00:00
|
|
|
}
|
2020-02-16 19:25:26 +00:00
|
|
|
|
|
|
|
nc.stop ();
|
|
|
|
|
2021-08-08 04:17:12 +00:00
|
|
|
Direct direct{};
|
2020-09-17 19:34:28 +00:00
|
|
|
direct.set_fg_rgb (0xb5, 0x0d, 0xff);
|
2020-02-16 19:25:26 +00:00
|
|
|
std::cout << "notcurses version: ";
|
2020-09-17 19:34:28 +00:00
|
|
|
direct.set_bg_rgb (0x05, 0x6e, 0xee);
|
|
|
|
direct.set_fg_rgb (0xe2, 0xbf, 0x00);
|
2020-02-16 19:25:26 +00:00
|
|
|
std::cout << ncver << std::endl;
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
int main ()
|
|
|
|
{
|
|
|
|
if (!setlocale (LC_ALL, "")){
|
|
|
|
std::cerr << "Couldn't set locale based on user preferences" << std::endl;
|
|
|
|
return EXIT_FAILURE;
|
|
|
|
}
|
|
|
|
|
|
|
|
try {
|
|
|
|
return run ();
|
|
|
|
} catch (ncpp::init_error &e) {
|
|
|
|
std::cerr << "Initialization error: " << e.what () << std::endl;
|
|
|
|
} catch (ncpp::invalid_state_error &e) {
|
|
|
|
std::cerr << "Invalid state error: " << e.what () << std::endl;
|
|
|
|
} catch (ncpp::invalid_argument &e) {
|
|
|
|
std::cerr << "Invalid argument error: " << e.what () << std::endl;
|
|
|
|
}
|
|
|
|
|
|
|
|
return 1;
|
|
|
|
}
|