-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBinaryCompareDoc.h
60 lines (50 loc) · 1.4 KB
/
BinaryCompareDoc.h
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#pragma once
#include "AlegrDiffDoc.h"
// CBinaryCompareDoc document
class InvalidatedRangeBin : public CObject
{
public:
LONGLONG begin;
LONGLONG end;
};
class CBinaryCompareDoc : public CFilePairDoc
{
DECLARE_DYNCREATE(CBinaryCompareDoc)
typedef CFilePairDoc BaseDoc;
public:
CBinaryCompareDoc();
virtual ~CBinaryCompareDoc();
enum {
CaretPositionChanged = 1,
InvalidateRange,
UpdateMakeCaretCentered,
UpdateMakeCaretVisible,
};
BinaryFilePair* GetFilePair() const noexcept
{
return m_pFilePair;
}
TCHAR m_ComparisonResult[MAX_PATH];
LONGLONG m_CaretPos;
LONGLONG m_SelectionAnchor;
LONGLONG m_OriginalSelectionAnchor;
BinaryFilePair* m_pFilePair;
virtual void SetFilePair(FilePair * pPair) override;
LONGLONG GetFileSize() const noexcept;
//void SetSelection(TextPos CaretPos, TextPos AnchorPos, int flags = SetPositionMakeCentered);
void SetCaretPosition(LONGLONG Addr, int flags);
virtual void Serialize(CArchive& ar); // overridden for document i/o
unsigned FindDataProc(class CDifferenceProgressDialog * pDlg);
#ifdef _DEBUG
virtual void AssertValid() const;
virtual void Dump(CDumpContext& dc) const;
#endif
protected:
afx_msg void OnUpdateCaretPosIndicator(CCmdUI* pCmdUI);
virtual BOOL OnNewDocument();
DECLARE_MESSAGE_MAP()
public:
virtual void OnUpdateAllViews(CView* pSender,
LPARAM lHint = 0L, CObject* pHint = NULL);
afx_msg void OnViewViewastextfiles();
};