1
////////////////////////////////////////////////////////////////////////////
2
// NoteCase notes manager project <http://notecase.sf.net>
4
// This code is licensed under BSD license.See "license.txt" for more details.
6
// File: Stores info for the single hyperlink
7
////////////////////////////////////////////////////////////////////////////
14
#endif // _MSC_VER > 1000
17
#pragma warning(disable:4786)
27
LinkInfo(const LinkInfo &other);
33
void operator = (const LinkInfo &other);
36
std::string m_strText;
37
std::string m_strTargetURL;
40
//position/size in utf8 character (NOT buffer offset)
45
class LinkInfoList : public std::vector<LinkInfo>
49
virtual ~LinkInfoList();
53
int Find(int nCharOffset);
54
bool IsRangeOccupied(int nCharOffset, int nLen); //any link in the range
56
//API to work with ranges
57
static bool RangesOverlap(int nA, int nB, int nC, int nD);
59
//adapt to events within the node text buffer
60
void OnTxtInsert(int nOffset, int nCharsAdded, const char *szTxt);
61
void OnTxtReplaced(int nStart, int nEnd, const char *szTxt);
62
void OnTxtDelete(int nOffset, int nCharsDeleted);
63
void OnLinkCreated(int nOffset, int nLen);