-
Notifications
You must be signed in to change notification settings - Fork 1
/
TextViewMetrics.h
48 lines (34 loc) · 1.03 KB
/
TextViewMetrics.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
// TextViewMetrics.h
#ifndef TextViewMetrics_h
#define TextViewMetrics_h
#include <Windows.h>
class TextViewMetrics
{
public:
TextViewMetrics();
RECT GutterRect ( HWND ) const;
RECT TextRect ( HWND ) const;
RECT TextOrMarginRect( HWND ) const;
RECT IntersectWithGutter ( RECT, HWND ) const;
RECT IntersectWithText ( RECT, HWND ) const;
RECT IntersectWithTextOrMargin( RECT, HWND ) const;
bool IsInGutter ( POINT, HWND ) const;
bool IsInText ( POINT, HWND ) const;
bool IsInTextOrMargin( POINT, HWND ) const;
HDC ClientToGutter( HDC, POINT* ) const;
RECT ClientToGutter( RECT ) const;
POINT ClientToGutter( POINT ) const;
POINT GutterToClient( POINT ) const;
HDC ClientToText( HDC, POINT* ) const;
RECT ClientToText( RECT ) const;
POINT ClientToText( POINT ) const;
POINT TextToClient( POINT ) const;
int caretWidth;
int marginWidth;
int gutterWidth;
int linesPerPage;
int xOffset;
int yOffset;
RECT clientRect;
};
#endif