x
Yes
No
Do you want to visit DriveHQ English website?
首页
产品服务
价格
免费试用
下载客户端
关于我们
云文件服务
|
云备份服务
|
FTP服务
|
企业邮箱服务
|
网站托管
|
客户端软件
云文件服务
云备份服务
FTP服务
企业级邮箱服务
网站托管
客户端软件
ExternalLexer.h - Hosted on DriveHQ Cloud IT Platform
返回上层目录
上传
下载
共享
发布
新建文件夹
新建文件
复制
剪切
删除
粘贴
评论
升级服务
路径: \\game3dprogramming\materials\GameFactory\GameFactoryDemo\references\scintilla\src\ExternalLexer.h
旋转
特效
属性
历史版本
// Scintilla source code edit control /** @file ExternalLexer.h ** Support external lexers in DLLs. **/ // Copyright 2001 Simon Steele
, portions copyright Neil Hodgson. // The License.txt file describes the conditions under which this software may be distributed. #ifndef EXTERNALLEXER_H #define EXTERNALLEXER_H #if PLAT_WIN #define EXT_LEXER_DECL __stdcall #else #define EXT_LEXER_DECL #endif #ifdef SCI_NAMESPACE namespace Scintilla { #endif // External Lexer function definitions... typedef void (EXT_LEXER_DECL *ExtLexerFunction)(unsigned int lexer, unsigned int startPos, int length, int initStyle, char *words[], WindowID window, char *props); typedef void (EXT_LEXER_DECL *ExtFoldFunction)(unsigned int lexer, unsigned int startPos, int length, int initStyle, char *words[], WindowID window, char *props); typedef void* (EXT_LEXER_DECL *GetLexerFunction)(unsigned int Index); typedef int (EXT_LEXER_DECL *GetLexerCountFn)(); typedef void (EXT_LEXER_DECL *GetLexerNameFn)(unsigned int Index, char *name, int buflength); //class DynamicLibrary; /// Sub-class of LexerModule to use an external lexer. class ExternalLexerModule : protected LexerModule { protected: ExtLexerFunction fneLexer; ExtFoldFunction fneFolder; int externalLanguage; char name[100]; public: ExternalLexerModule(int language_, LexerFunction fnLexer_, const char *languageName_=0, LexerFunction fnFolder_=0) : LexerModule(language_, fnLexer_, 0, fnFolder_){ strncpy(name, languageName_, sizeof(name)); languageName = name; }; virtual void Lex(unsigned int startPos, int lengthDoc, int initStyle, WordList *keywordlists[], Accessor &styler) const; virtual void Fold(unsigned int startPos, int lengthDoc, int initStyle, WordList *keywordlists[], Accessor &styler) const; virtual void SetExternal(ExtLexerFunction fLexer, ExtFoldFunction fFolder, int index); }; /// LexerMinder points to an ExternalLexerModule - so we don't leak them. class LexerMinder { public: ExternalLexerModule *self; LexerMinder *next; }; /// LexerLibrary exists for every External Lexer DLL, contains LexerMinders. class LexerLibrary { DynamicLibrary *lib; LexerMinder *first; LexerMinder *last; public: LexerLibrary(const char* ModuleName); ~LexerLibrary(); void Release(); LexerLibrary *next; SString m_sModuleName; }; /// LexerManager manages external lexers, contains LexerLibrarys. class LexerManager { public: ~LexerManager(); static LexerManager *GetInstance(); static void DeleteInstance(); void Load(const char* path); void Clear(); private: LexerManager(); static LexerManager *theInstance; void LoadLexerLibrary(const char* module); LexerLibrary *first; LexerLibrary *last; }; class LMMinder { public: ~LMMinder(); }; #ifdef SCI_NAMESPACE } #endif #endif
ExternalLexer.h
网页地址
文件地址
上一页
21/122
下一页
下载
( 2 KB )
Comments
Total ratings:
0
Average rating:
无评论
of 10
Would you like to comment?
Join now
, or
Logon
if you are already a member.