2022-04-03 10:16:20 +02:00
|
|
|
/**
|
|
|
|
* @brief demo application for the library
|
|
|
|
* @author Christian Burger (christian@krikkel.de)
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef A3B2AE4E_0A39_468C_8CCA_E6508166702A
|
|
|
|
#define A3B2AE4E_0A39_468C_8CCA_E6508166702A
|
|
|
|
|
|
|
|
#include <cursesapp.h>
|
2022-05-08 21:24:40 +02:00
|
|
|
#include <mutex>
|
2022-04-03 10:16:20 +02:00
|
|
|
|
2022-04-29 20:25:47 +02:00
|
|
|
namespace krikkel::NCurses
|
2022-04-03 10:16:20 +02:00
|
|
|
{
|
2022-05-08 21:24:40 +02:00
|
|
|
class VerticalTilingWindowManager;
|
|
|
|
class Window;
|
|
|
|
class PtyWindow;
|
|
|
|
|
2022-04-29 20:25:47 +02:00
|
|
|
class DemoApp : public NCursesApplication
|
2022-04-03 10:16:20 +02:00
|
|
|
{
|
2022-04-05 10:23:50 +02:00
|
|
|
public:
|
2022-04-29 20:25:47 +02:00
|
|
|
DemoApp();
|
2022-04-05 10:23:50 +02:00
|
|
|
|
|
|
|
private:
|
2022-05-08 21:24:40 +02:00
|
|
|
VerticalTilingWindowManager *windowManager;
|
|
|
|
Window *dummyWindowTop, *dummyWindowBottom;
|
|
|
|
PtyWindow *ptyWindow;
|
|
|
|
std::recursive_mutex ncursesMutex;
|
|
|
|
|
2022-04-05 10:23:50 +02:00
|
|
|
int run() override;
|
2022-05-08 21:24:40 +02:00
|
|
|
void setUpWindows();
|
|
|
|
void mainLoop();
|
2022-04-03 10:16:20 +02:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif /* A3B2AE4E_0A39_468C_8CCA_E6508166702A */
|