点击下载
最近太忙, 短时间内不会更新了,虽然还有一大堆还不太满意的地方...
还有来不及调试, 可能有BUG(必油鸡), 大家随便看看, 并指导一下,
先说一下特色吧, 就是智能换行, 全文扫描标点符(分前标点后标点), 支持多国语言.
实现全模板化, 简单的实体化如下,
1
#include "ShowDebugInfo.h" //输出调试信息
2
#include "..\RcEditDef.h" //预定义
3![](http://www.cppblog.com/Images/OutliningIndicators/None.gif)
4
#include "..\RcEditFontRecyclel.h" //字体回收站
5
#include "..\RcEditAlgorithm.h" //算法
6![](http://www.cppblog.com/Images/OutliningIndicators/ExpandedBlockStart.gif)
class CFontRecyclel : public CFontRecyclelSimpT<CFontRecyclel>
{};
7![](http://www.cppblog.com/Images/OutliningIndicators/None.gif)
8
#include "RcEditColor.h" //颜色
9
#include "..\RcFontStyle.h" //风格
10![](http://www.cppblog.com/Images/OutliningIndicators/ExpandedBlockStart.gif)
class CFontStyle : public CFontStyleT<CFontStyle, CWinColor, CFontRecyclel>
{};
11![](http://www.cppblog.com/Images/OutliningIndicators/None.gif)
12
#include "RcWinDriverInterface.h" //CRcDCInterfaceT 设备接口
13![](http://www.cppblog.com/Images/OutliningIndicators/ExpandedBlockStart.gif)
class CWinDcInterface : public CRcDCInterfaceT<CWinColor>
{};//Comb ccolor
14![](http://www.cppblog.com/Images/OutliningIndicators/None.gif)
15
#include "RcWinFontInterface.h" //CWinFont
16
#include "..\RcEditDriverInterface.h" //CRcEditDriverInterfaceT
17![](http://www.cppblog.com/Images/OutliningIndicators/ExpandedBlockStart.gif)
class CRcWinDriverInterface : public CRcEditDriverInterfaceT<CRcWinDriverInterface, CWinFont, CWinDcInterface>
{//Comb Font
18
};
19
#include "RcEdit/RcEditStringAnalysis.h" //定义int 与全局属性不对 需要修改int ixxx to int nxxx
20![](http://www.cppblog.com/Images/OutliningIndicators/ExpandedBlockStart.gif)
class CRcEditDrawInterface : public CRcEditStringAnalysisT< CRcEditDrawInterface, CFontStyle, CRcWinDriverInterface>
{};
21
//内容容器
22
#include "..\RcEditTextContainer.h"
23
#include "RcWinTextContainer.h" //ContentManageW
24
//撤销重做容器
25
#include "..\rcEditUndo.h"
26![](http://www.cppblog.com/Images/OutliningIndicators/ExpandedBlockStart.gif)
class CDoSthBase : public CDoSthBaseT<CDoSthBase>
{};
27![](http://www.cppblog.com/Images/OutliningIndicators/ExpandedBlockStart.gif)
class CRcEditUndoContainer : public CRcEditUndoContainerT<CRcEditUndoContainer, CDoSthBase>
{};
28
//区域管理
29
#include "..\RcEditAreaManage.h"
30
typedef AutoSortVectorT< AreaMarkHandle, DWORD, std::vector<AreaMarkHandle>, OSTL::CriticalSectionNull, 0, FALSE> CAreaContainer;
31![](http://www.cppblog.com/Images/OutliningIndicators/ExpandedBlockStart.gif)
class CAreaMarkContainer : public CAreaMarkContainerT<CAreaContainer>
{};
32![](http://www.cppblog.com/Images/OutliningIndicators/ExpandedBlockStart.gif)
class CRcAreaManage : public CRcAreaManageBaseT<CRcAreaManage, CAreaMarkContainer>
{};
33
//内存池
34
#include "..\rcMemPool.h"
35![](http://www.cppblog.com/Images/OutliningIndicators/ExpandedBlockStart.gif)
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![](http://www.cppblog.com/Images/OutliningIndicators/ExpandedBlockStart.gif)
CRcEditDrawInterface, CWindowScroll>
{};
47
//具体实现
48
template<class T, class TInterface>
49![](http://www.cppblog.com/Images/OutliningIndicators/ExpandedBlockStart.gif)
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![](http://www.cppblog.com/Images/OutliningIndicators/InBlock.gif)
![](http://www.cppblog.com/Images/dot.gif)
![](http://www.cppblog.com/Images/dot.gif)
67
};
posted on 2010-11-06 18:50
ROCK 阅读(1434)
评论(2) 编辑 收藏 引用