36 lines
842 B
C++
36 lines
842 B
C++
/**
|
|
* @brief Window manager
|
|
* @author Christian Burger (christian@krikkel.de)
|
|
*/
|
|
|
|
#ifndef C10F5DF3_1DB4_4714_A84D_115F492F5CDC
|
|
#define C10F5DF3_1DB4_4714_A84D_115F492F5CDC
|
|
|
|
#include <ncursesw/cursesw.h>
|
|
#include <list>
|
|
#include <mutex>
|
|
|
|
namespace krikkel::NCurses
|
|
{
|
|
class Window;
|
|
|
|
class VerticalTilingWindowManager
|
|
{
|
|
public:
|
|
VerticalTilingWindowManager(NCursesWindow *rootWindow, std::mutex *ncursesMutex);
|
|
void addWindow(Window *window);
|
|
void refresh();
|
|
void updateLayout();
|
|
|
|
private:
|
|
NCursesWindow *rootWindow;
|
|
std::mutex *ncursesMutex;
|
|
std::list<Window *> stack;
|
|
|
|
void resizeWindowInStack(Window *window, uint16_t y, uint16_t height, uint16_t width);
|
|
};
|
|
}
|
|
|
|
|
|
#endif /* C10F5DF3_1DB4_4714_A84D_115F492F5CDC */
|