aboutsummaryrefslogtreecommitdiffstats
path: root/include/screen.h
blob: 6896b725c2579fbe369fca60b82690dc033b172f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#ifndef POSTMODERN_SCREEN_H
#define POSTMODERN_SCREEN_H 1

#include "boxii/window.h"

#include <unordered_map>
#include <deque>
#include <string>
#include <memory>

class Screen {
private:
    bool m_redraw;
protected:
    std::unordered_map<std::string, std::shared_ptr<Boxii::Window>> m_windows;
    std::deque<std::weak_ptr<Boxii::Window>> m_order;
public:
    Screen() {}
    virtual ~Screen() {}

    void addWindow(const std::string &key, std::shared_ptr<Boxii::Window> value);

    virtual void update() {}
    void render();

    void setRedraw() { m_redraw = true; }
};

#endif