-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathZFrame.h
69 lines (59 loc) · 1.67 KB
/
ZFrame.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
61
62
63
64
65
66
67
68
69
#ifndef _ZFRAME_H_
#define _ZFRAME_H_
class CZFrame
{
public:
CZFrame();
~CZFrame();
static LRESULT CALLBACK WndProc(HWND hwnd, UINT iMsg, WPARAM wParam, LPARAM lParam);
static LRESULT CALLBACK ScrollWndProc(HWND hwnd, UINT iMsg, WPARAM wParam, LPARAM lParam);
bool Create(CZEditFrame * pzef, CZDoc * pzd);
bool AttachToMainFrame(CZEditFrame * pzef);
CZView * GetCurrentView()
{ return m_pzvCurrent; }
CZDoc * GetDoc()
{ return m_pzd; }
HWND GetHwnd()
{ return m_hwnd; }
void SetCurrentView(CZView * pzv);
bool ToggleCurrentView();
bool IsBinaryMode()
{ return m_fBinary; }
bool IsSplit()
{ return m_fIsSplit; }
bool SplitWindow(bool fHorizontal, bool fKeepTopLeft = true);
int SetScrollInfo(CZView * pzv, int nBar, SCROLLINFO * psi);
BOOL GetScrollInfo(CZView * pzv, int nBar, SCROLLINFO * psi);
void NotifyDelete(UINT ichMin, UINT ichStop, bool fRedraw = true);
void NotifyInsert(UINT ichMin, UINT cch);
void OnColumnMarkerDrag();
bool OnFontChanged();
LRESULT OnSize(UINT nType, int cx, int cy);
LRESULT OnMouseMove(UINT nFlags, POINT pt);
LRESULT OnLButtonDown(UINT nFlags, POINT pt);
LRESULT OnLButtonUp(UINT nFlags, POINT pt);
LRESULT OnHScroll(UINT nSBCode, UINT nPos, HWND hwndScroll);
LRESULT OnVScroll(UINT nSBCode, UINT nPos, HWND hwndScroll);
LRESULT OnPaint();
protected:
HWND m_hwnd;
HWND m_hwndParent;
CZEditFrame * m_pzef;
CZDoc * m_pzd;
CZView * m_pzvCurrent;
bool m_fBinary;
CZView * m_rgpzv[2];
HWND m_rghwndHScroll[2];
HWND m_rghwndVScroll[2];
RECT m_rgrcClient[2];
bool m_fResizing;
int m_nTopHalfPercent;
bool m_fIsSplit;
bool m_fHorizontalSplit;
enum
{
kdzpSeparator = 5,
kdypSplitter = 7,
};
};
#endif // !_ZFRAME_H_