1 /*
2  *  mark.h
3  *
4  *  Copyright (C) 1998  Jiann-Ching Liu
5  */
6 
7 #ifndef __QE_MARK_H_
8 #define __QE_MARK_H_
9 
10 #include "linebuffer.h"
11 
12 class filebuffer;
13 
14 #define MARK_STACK_SIZE   (5)
15 
16 #define UNKNOW_MARK       (0)
17 #define CHAR_MARK         (1)
18 #define LINE_MARK         (2)
19 #define BLOCK_MARK        (3)
20 
21 #define FIX_MARK_INSERT_LINE   (0)
22 #define FIX_MARK_DELETE_LINE   (1)
23 #define FIX_MARK_JOIN_LINE     (2)
24 
25 class mark {
26 protected:
27     int         type;
28 public:
29     filebuffer  *fb;
30     linebuffer  *first;
31     linebuffer  *last;
32     int         fn;
33     int         ln;
34     int         fc;
35     int         lc;
36 
37     mark(void);
38     mark(filebuffer* fbf);
39     mark(filebuffer* fbf, const int  tp);
40     mark(filebuffer* fbf, linebuffer *f, linebuffer *l);
41 
42     int         renumber(void);
43 
44     void        settype(int tp = UNKNOW_MARK);
45     int         gettype(void);
46     operator    int(void);
47     mark        operator = (mark& mk);
48 };
49 
50 #endif
51