Skip to content

Commit b6aaaf0

Browse files
committedAug 25, 2022
Switch to spaces
1 parent eedf563 commit b6aaaf0

12 files changed

+1747
-1748
lines changed
 

‎BitmapView.cpp

+194-194
Large diffs are not rendered by default.

‎BitmapView.h

+34-34
Original file line numberDiff line numberDiff line change
@@ -10,49 +10,49 @@
1010
class CBitmapView : public CZoomScrollWindowImpl<CBitmapView>
1111
{
1212
public:
13-
friend CZoomScrollImpl<CBitmapView>;
14-
friend CScrollImpl<CBitmapView>;
15-
DECLARE_WND_CLASS_EX(NULL, CS_HREDRAW | CS_VREDRAW, -1)
13+
friend CZoomScrollImpl<CBitmapView>;
14+
friend CScrollImpl<CBitmapView>;
15+
DECLARE_WND_CLASS_EX(NULL, CS_HREDRAW | CS_VREDRAW, -1)
1616

17-
CBitmapView();
17+
CBitmapView();
1818

19-
BOOL PreTranslateMessage(MSG* pMsg);
20-
void SetBitmap(HBITMAP hBitmap, bool bResetOffset = true);
21-
const CBitmap& GetBitmap() const { return m_bmp; }
19+
BOOL PreTranslateMessage(MSG* pMsg);
20+
void SetBitmap(HBITMAP hBitmap, bool bResetOffset = true);
21+
const CBitmap& GetBitmap() const { return m_bmp; }
2222

23-
void ZoomToFit();
23+
void ZoomToFit();
2424
private:
25-
void DoPaint(CDCHandle dc) const;
25+
void DoPaint(CDCHandle dc) const;
2626

27-
bool AdjustScrollOffset(int& x, int& y);
28-
void InvalidateCursor();
27+
bool AdjustScrollOffset(int& x, int& y);
28+
void InvalidateCursor();
2929

30-
BEGIN_MSG_MAP(CBitmapView)
31-
MSG_WM_ERASEBKGND(OnEraseBackground)
32-
MSG_WM_KEYDOWN(OnKeyDown)
33-
MSG_WM_KEYUP(OnKeyUp)
34-
MSG_WM_LBUTTONDOWN(OnLButtonDown)
35-
MSG_WM_LBUTTONUP(OnLButtonUp)
36-
MSG_WM_MOUSEMOVE(OnMouseMove)
37-
MSG_WM_CAPTURECHANGED(OnCaptureChanged)
38-
MSG_WM_SETCURSOR(OnSetCursor)
30+
BEGIN_MSG_MAP(CBitmapView)
31+
MSG_WM_ERASEBKGND(OnEraseBackground)
32+
MSG_WM_KEYDOWN(OnKeyDown)
33+
MSG_WM_KEYUP(OnKeyUp)
34+
MSG_WM_LBUTTONDOWN(OnLButtonDown)
35+
MSG_WM_LBUTTONUP(OnLButtonUp)
36+
MSG_WM_MOUSEMOVE(OnMouseMove)
37+
MSG_WM_CAPTURECHANGED(OnCaptureChanged)
38+
MSG_WM_SETCURSOR(OnSetCursor)
3939

40-
CHAIN_MSG_MAP(CZoomScrollWindowImpl<CBitmapView>);
41-
END_MSG_MAP()
40+
CHAIN_MSG_MAP(CZoomScrollWindowImpl<CBitmapView>);
41+
END_MSG_MAP()
4242

4343
private:
44-
CBitmap m_bmp;
45-
CPoint m_pointDrag;
46-
bool m_bPanning;
47-
48-
BOOL OnEraseBackground(CDCHandle dc);
49-
void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags);
50-
void OnKeyUp(UINT nChar, UINT nRepCnt, UINT nFlags);
51-
void OnLButtonDown(UINT nFlags, CPoint point);
52-
void OnLButtonUp(UINT nFlags, CPoint point);
53-
void OnMouseMove(UINT nFlags, CPoint point);
54-
void OnCaptureChanged(CWindow wnd);
55-
BOOL OnSetCursor(CWindow wnd, UINT nHitTest, UINT message);
44+
CBitmap m_bmp;
45+
CPoint m_pointDrag;
46+
bool m_bPanning;
47+
48+
BOOL OnEraseBackground(CDCHandle dc);
49+
void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags);
50+
void OnKeyUp(UINT nChar, UINT nRepCnt, UINT nFlags);
51+
void OnLButtonDown(UINT nFlags, CPoint point);
52+
void OnLButtonUp(UINT nFlags, CPoint point);
53+
void OnMouseMove(UINT nFlags, CPoint point);
54+
void OnCaptureChanged(CWindow wnd);
55+
BOOL OnSetCursor(CWindow wnd, UINT nHitTest, UINT message);
5656
};
5757

5858
#endif // __VIEW_H__

0 commit comments

Comments
 (0)
Please sign in to comment.