-
Notifications
You must be signed in to change notification settings - Fork 175
/
Copy pathCTextDrawer.h
81 lines (63 loc) · 3.06 KB
/
CTextDrawer.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
70
71
72
73
74
75
76
77
78
79
80
81
/*! @file */
/*
Copyright (C) 2008, kobake
Copyright (C) 2018-2021, Sakura Editor Organization
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:
1. The origin of this software must not be misrepresented;
you must not claim that you wrote the original software.
If you use this software in a product, an acknowledgment
in the product documentation would be appreciated but is
not required.
2. Altered source versions must be plainly marked as such,
and must not be misrepresented as being the original software.
3. This notice may not be removed or altered from any source
distribution.
*/
#ifndef SAKURA_CTEXTDRAWER_1AC4291D_DBBD_4A04_8974_26BC505B5318_H_
#define SAKURA_CTEXTDRAWER_1AC4291D_DBBD_4A04_8974_26BC505B5318_H_
#pragma once
class CTextMetrics;
class CTextArea;
class CViewFont;
class CEol;
class CEditView;
class CLayout;
#include "DispPos.h"
class CGraphics;
class CTextDrawer{
public:
CTextDrawer(const CEditView* pEditView) : m_pEditView(pEditView) { }
virtual ~CTextDrawer(){}
// -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- //
// 外部依存 //
// -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- //
//領域のインスタンスを求める
const CTextArea* GetTextArea() const;
// -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- //
// インターフェース //
// -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- //
//2007.08.25 kobake 戻り値を void に変更。引数 x, y を DispPos に変更
//実際には pX と nX が更新される。
void DispText( HDC hdc, DispPos* pDispPos, int marginy, const wchar_t* pData, int nLength, bool bTransparent = false ) const; // テキスト表示
//! ノート線描画
void DispNoteLine( CGraphics& gr, int nTop, int nBottom, int nLeft, int nRight ) const;
// -- -- 指定桁縦線描画 -- -- //
//! 指定桁縦線描画関数 // 2005.11.08 Moca
void DispVerticalLines( CGraphics& gr, int nTop, int nBottom, CLayoutInt nLeftCol, CLayoutInt nRightCol ) const;
static void DispVerticalLinesImpl(HDC hdc, const int *nArrVertLineIdx, int nArrVertLineSize,
bool bBold, bool bDot, int nViewLeftCol, int nWrapLayout, int nRightCol,
int nPosXOffset, int nPosXLeft, int nPosXRight, int nTop, int nBottom, int nDirectY, bool bOddLine,
int nLayoutXDefault, int nCharPx);
// -- -- 折り返し桁縦線描画 -- -- //
void DispWrapLine( CGraphics& gr, int nTop, int nBottom ) const;
// -- -- 行番号 -- -- //
void DispLineNumber( CGraphics& gr, CLayoutInt nLineNum, int y ) const; // 行番号表示
private:
const CEditView* m_pEditView;
};
#endif /* SAKURA_CTEXTDRAWER_1AC4291D_DBBD_4A04_8974_26BC505B5318_H_ */