-
Notifications
You must be signed in to change notification settings - Fork 0
/
uMark.cpp
36 lines (31 loc) · 992 Bytes
/
uMark.cpp
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
//---------------------------------------------------------------------------
#pragma hdrstop
#include "uMark.h"
#include "uBuffer.h"
using namespace SHEdit;
#pragma package(smart_init)
//---------------------------------------------------------------------------
Mark::Mark(SHEdit::Format * format, bool begin, short pos)
{
this->format = format;
this->begin = begin;
this->pos = pos;
}
//---------------------------------------------------------------------------
IMark::IMark(SHEdit::Format * format, bool begin, IPos * itr)
: IPos(itr->buffer, itr->line, itr->linenum, itr->pos)
{
this->type = IPType::iptMark;
this->format = format;
this->begin = begin;
format->AddIM(this);
buffer->RegisterIM(this);
buffer->RegisterF(format);
}
//---------------------------------------------------------------------------
IMark::~IMark()
{
buffer->UnregisterIM(this);
format->RemoveIM(this);
}
//---------------------------------------------------------------------------