TSyntaxManager is a library of Lexer Analyzers.
TSyntaxManager = class(TLoadableComponent);
ecSyntAnal
It represents a lexer library with ability of load / save operations (LoadFromFile,SaveToFile methods) and selecting the appropriate lexer for the particular file name (AnalyzerForFile method).
You can use it also for managing lexers menu. Specify LexersMenu that will list all lexers that are managed by the syntax manager and "plain text" menu item (specified by the MenuPlainText property). Use CurentLexer property and OnLexerChanged event handler to control current lexer of the editor.
Note: You can use lexer library at design time, lexers will be saved into the form resource.
Topic |
Description |
The methods of the TLoadableComponent class are listed here. | |
The properties of the TLoadableComponent class are listed here. |
Topic |
Description |
The methods of the TSyntaxManager class are listed here. | |
The properties of the TSyntaxManager class are listed here. | |
The events of the TSyntaxManager class are listed here. |
|
Method |
|
virtual |
|
protected |
|
Property |
|
read only |
|
Event |
TSyntaxManager Class |
Description |
Occurs whenever syntax manager may changes. | |
Occurs whenever user selects new lexer in LexersMenu. |
TLoadableComponent Methods |
Description |
Loads component resource from file. | |
Loads component from resource identified by ResID. | |
Loads component from resource identified by ResName. | |
Loads component resource from stream. | |
Saves component resource to file. | |
Saves component resource to stream. | |
Allows to avoid name conflict when loading component resource. |
TSyntaxManager Class |
Description |
Creates new empty lexer object. | |
Returns Lexer for the FileName. | |
Called when syntax manager may changes. | |
Deletes all lexers. | |
Creates and initializes a TSyntaxManager instance. | |
Displays "Syntax Lexer Library" dialog. | |
Destroys an instance of TSyntaxManager. | |
Looks for analyzer with name LexerName. | |
Returns filter string. | |
Returns filter index for the specified lexer. Filter list should be taken using GetFilesFilter. | |
Loads component resource from file. | |
Moves single lexer to new position in list. | |
Saves component resource to file. |
TLoadableComponent Properties |
Description |
Specifies last used file name in LoadFromFile and SaveToFile functions. |
TSyntaxManager Class |
Description |
Returns count of lexer objects in library. | |
Returns TSyntAnalyzer object at Index position. | |
Specifies current lexer selected in the menu. | |
Specifies last used file name in LoadFromFile and SaveToFile functions. | |
Specifies the Lexers menu for a Syntax Manager. | |
Specifies caption of the "Plain text" menu item. | |
Indicates whether the user has changed library. |
Copyright (c) 2004-2011. All rights reserved.
|
What do you think about this topic? Send feedback!
|