最近太忙, 短時間內(nèi)不會更新了,雖然還有一大堆還不太滿意的地方...
還有來不及調(diào)試, 可能有BUG(必油雞), 大家隨便看看, 并指導(dǎo)一下,
先說一下特色吧, 就是智能換行, 全文掃描標(biāo)點符(分前標(biāo)點后標(biāo)點), 支持多國語言.
實現(xiàn)全模板化, 簡單的實體化如下,
1
#include "ShowDebugInfo.h" //輸出調(diào)試信息
2
#include "..\RcEditDef.h" //預(yù)定義
3
4
#include "..\RcEditFontRecyclel.h" //字體回收站
5
#include "..\RcEditAlgorithm.h" //算法
6
class CFontRecyclel : public CFontRecyclelSimpT<CFontRecyclel>
{};
7
8
#include "RcEditColor.h" //顏色
9
#include "..\RcFontStyle.h" //風(fēng)格
10
class CFontStyle : public CFontStyleT<CFontStyle, CWinColor, CFontRecyclel>
{};
11
12
#include "RcWinDriverInterface.h" //CRcDCInterfaceT 設(shè)備接口
13
class CWinDcInterface : public CRcDCInterfaceT<CWinColor>
{};//Comb ccolor
14
15
#include "RcWinFontInterface.h" //CWinFont
16
#include "..\RcEditDriverInterface.h" //CRcEditDriverInterfaceT
17
class CRcWinDriverInterface : public CRcEditDriverInterfaceT<CRcWinDriverInterface, CWinFont, CWinDcInterface>
{//Comb Font
18
};
19
#include "RcEdit/RcEditStringAnalysis.h" //定義int 與全局屬性不對 需要修改int ixxx to int nxxx
20
class CRcEditDrawInterface : public CRcEditStringAnalysisT< CRcEditDrawInterface, CFontStyle, CRcWinDriverInterface>
{};
21
//內(nèi)容容器
22
#include "..\RcEditTextContainer.h"
23
#include "RcWinTextContainer.h" //ContentManageW
24
//撤銷重做容器
25
#include "..\rcEditUndo.h"
26
class CDoSthBase : public CDoSthBaseT<CDoSthBase>
{};
27
class CRcEditUndoContainer : public CRcEditUndoContainerT<CRcEditUndoContainer, CDoSthBase>
{};
28
//區(qū)域管理
29
#include "..\RcEditAreaManage.h"
30
typedef AutoSortVectorT< AreaMarkHandle, DWORD, std::vector<AreaMarkHandle>, OSTL::CriticalSectionNull, 0, FALSE> CAreaContainer;
31
class CAreaMarkContainer : public CAreaMarkContainerT<CAreaContainer>
{};
32
class CRcAreaManage : public CRcAreaManageBaseT<CRcAreaManage, CAreaMarkContainer>
{};
33
//內(nèi)存池
34
#include "..\rcMemPool.h"
35
class RcMemBufferPool : public RcMemBufferPoolT<4, 1024, 4096, OSTL::CriticalSection>
{};
36
//行分析
37
#include "..\RcEditLineAnlyze.h"
38
//滾動條
39
#include "..\RcEditScrollBase.h"
40
#include "RcWinScroll.h" //定義int 與全局屬性不對 需要修改int ixxx to int nxxx
41
//主編輯器核心
42
#include "..\RcEditBase.h"
43
//編輯器主接口
44
class CRcEditInterface : public TRcEditInterface<ContentManageW, RcMemBufferPool,
45
CRcEditUndoContainer, CRcAreaManage,
46
CRcEditDrawInterface, CWindowScroll>
{};
47
//具體實現(xiàn)
48
template<class T, class TInterface>
49
class CRcEditBaseT : public CLineAnlyzeBaseT<T, TInterface>
{
50
public:
51
typedef typename CLineAnlyzeBaseT<T, TInterface> TLineAnlyze;
52
typedef typename TLineAnlyze::TLineInfo TLineInfo;
53
typedef typename TInterface::TTextContainer CTextContainer, TTextContainer;
54
typedef typename TInterface::TTextContainer::TVal TTextDate, TTextChar;
55
typedef typename TInterface::TTextContainer::iterator TextIterator;
56
typedef typename TInterface::TUndoContainer TUndoContainer, CUndoContainer;
57
typedef typename TInterface::TUndoContainer::CDoSthBase CDoSthBase, CDoSthInfo, TDoSthBase, TDoSthInfo;
58
typedef typename TInterface::TAreaManage TAreaManage, CAreaManage;
59
typedef typename TInterface::TAreaManage::CAreaMarkContainer CAreaMarkContainer, TAreaMarkContainer;
60
typedef typename TInterface::TDrawInterface TDrawInterface, CDrawInterface;
61
typedef typename TInterface::TDrawInterface::TStyle TStyle, TFontStyle, CStyle, CFontStyle;
62
typedef typename TInterface::TDrawInterface::TStyle::TColor TColor, CColor;
63
typedef typename TInterface::CriticalSectionT CriticalSectionT, CCriticalSection;
64
typedef typename TInterface::TMemBufferPool TMemBufferPool, CMemBufferPool;
65
typedef typename TInterface::TEditScrollBar TEditScrollBar, CEditScrollBar;
66


67
};
#include "ShowDebugInfo.h" //輸出調(diào)試信息2
#include "..\RcEditDef.h" //預(yù)定義3

4
#include "..\RcEditFontRecyclel.h" //字體回收站5
#include "..\RcEditAlgorithm.h" //算法6

class CFontRecyclel : public CFontRecyclelSimpT<CFontRecyclel>
{};7

8
#include "RcEditColor.h" //顏色9
#include "..\RcFontStyle.h" //風(fēng)格10

class CFontStyle : public CFontStyleT<CFontStyle, CWinColor, CFontRecyclel>
{};11

12
#include "RcWinDriverInterface.h" //CRcDCInterfaceT 設(shè)備接口13

class CWinDcInterface : public CRcDCInterfaceT<CWinColor>
{};//Comb ccolor14

15
#include "RcWinFontInterface.h" //CWinFont16
#include "..\RcEditDriverInterface.h" //CRcEditDriverInterfaceT17

class CRcWinDriverInterface : public CRcEditDriverInterfaceT<CRcWinDriverInterface, CWinFont, CWinDcInterface>
{//Comb Font18
};19
#include "RcEdit/RcEditStringAnalysis.h" //定義int 與全局屬性不對 需要修改int ixxx to int nxxx20

class CRcEditDrawInterface : public CRcEditStringAnalysisT< CRcEditDrawInterface, CFontStyle, CRcWinDriverInterface>
{};21
//內(nèi)容容器22
#include "..\RcEditTextContainer.h"23
#include "RcWinTextContainer.h" //ContentManageW24
//撤銷重做容器25
#include "..\rcEditUndo.h"26

class CDoSthBase : public CDoSthBaseT<CDoSthBase>
{};27

class CRcEditUndoContainer : public CRcEditUndoContainerT<CRcEditUndoContainer, CDoSthBase>
{};28
//區(qū)域管理29
#include "..\RcEditAreaManage.h"30
typedef AutoSortVectorT< AreaMarkHandle, DWORD, std::vector<AreaMarkHandle>, OSTL::CriticalSectionNull, 0, FALSE> CAreaContainer;31

class CAreaMarkContainer : public CAreaMarkContainerT<CAreaContainer>
{};32

class CRcAreaManage : public CRcAreaManageBaseT<CRcAreaManage, CAreaMarkContainer>
{};33
//內(nèi)存池34
#include "..\rcMemPool.h"35

class RcMemBufferPool : public RcMemBufferPoolT<4, 1024, 4096, OSTL::CriticalSection>
{};36
//行分析37
#include "..\RcEditLineAnlyze.h"38
//滾動條39
#include "..\RcEditScrollBase.h"40
#include "RcWinScroll.h" //定義int 與全局屬性不對 需要修改int ixxx to int nxxx41
//主編輯器核心42
#include "..\RcEditBase.h"43
//編輯器主接口44
class CRcEditInterface : public TRcEditInterface<ContentManageW, RcMemBufferPool, 45
CRcEditUndoContainer, CRcAreaManage,46

CRcEditDrawInterface, CWindowScroll>
{};47
//具體實現(xiàn)48
template<class T, class TInterface>49

class CRcEditBaseT : public CLineAnlyzeBaseT<T, TInterface>
{50
public:51
typedef typename CLineAnlyzeBaseT<T, TInterface> TLineAnlyze;52
typedef typename TLineAnlyze::TLineInfo TLineInfo;53
typedef typename TInterface::TTextContainer CTextContainer, TTextContainer;54
typedef typename TInterface::TTextContainer::TVal TTextDate, TTextChar;55
typedef typename TInterface::TTextContainer::iterator TextIterator;56
typedef typename TInterface::TUndoContainer TUndoContainer, CUndoContainer; 57
typedef typename TInterface::TUndoContainer::CDoSthBase CDoSthBase, CDoSthInfo, TDoSthBase, TDoSthInfo; 58
typedef typename TInterface::TAreaManage TAreaManage, CAreaManage;59
typedef typename TInterface::TAreaManage::CAreaMarkContainer CAreaMarkContainer, TAreaMarkContainer;60
typedef typename TInterface::TDrawInterface TDrawInterface, CDrawInterface;61
typedef typename TInterface::TDrawInterface::TStyle TStyle, TFontStyle, CStyle, CFontStyle; 62
typedef typename TInterface::TDrawInterface::TStyle::TColor TColor, CColor;63
typedef typename TInterface::CriticalSectionT CriticalSectionT, CCriticalSection;64
typedef typename TInterface::TMemBufferPool TMemBufferPool, CMemBufferPool;65
typedef typename TInterface::TEditScrollBar TEditScrollBar, CEditScrollBar;66



67
};
