#ifndef __FRAME_H__
#define __FRAME_H__
using namespace std;

#include <stdio.h>
#include <stdlib.h>
#include <vector>
#include <string>
#include "LineManip.h"

#define FILE_NAME_SIZE 256


extern long bufferSize;
class Frame
{
    private:
        long lines;
        long number;
        long actualBufferSize;
        long prevOpened;
        long totalFrames;
        long startLine;
        long totalFileLines;
        long scrollBackOffset;
        long scrollRightOffset;
        int executable;
        LineManip manip;
        WINDOW *win;

        vector <string> Screen;
        vector <string> ignoreList;

        char fileName[FILE_NAME_SIZE];
        FILE *fin;
        long findPos(long =0);
        int setVariables();
        long findTotalFileLines();

    public:
        Frame();
        ~Frame();
        // Filename, Number in queue, Total number of frames, config file name
        Frame(char* , long , long, string);
        void reSize(long);
        long setScrollBack(long);
        long incrScrollBack(long = 1);
        long decrScrollBack(long = 1);
        long setScrollRight(long);
        long incrScrollRight(long = 1);
        long decrScrollRight(long = 1);
        bool read();
        void print();
        long height(){return lines;};
};
    
#endif //__FRAME_H__
