summaryrefslogtreecommitdiff
path: root/inc/Frame.hpp
blob: 0bfce2cf75da7ede5329ed7e40a4fa8babf9fa26 (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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#ifndef frame_h
#define frame_h

#include <ncurses.h>
#include "Character.hpp"
#include <string>
#include <fstream>
#include <iostream>

using namespace std;

class Frame
{
    public:
        //Frame(int rows, int cols, int nRow, int nCol); // main window test
        Frame(string location, int nRow, int nCol); // main window with seeded map
        Frame(Frame &super, int rows, int cols, int nRow, int nCol); // viewport
        ~Frame();
        WINDOW * getWin();
        WINDOW * getSuper();
        bool getHasSuper();
        int getHeight();
        int getWidth();
        int getRow();
        int getCol();
        void fillWindow();
        void refresh();
        void move(int nRow, int nCol);
        void add(Character &c);
        void add(Character &c, int nRow, int nCol);
        void erase(Character &c);
        void center(Character &ch);

    private:
        int height, width;
        int row, col;
        bool hasSuper;
        WINDOW * w;
        WINDOW * super;
        string m;
};

#endif