Rogue Wave Views Gadgets Package API Reference Guide |
Rogue Wave Views Documentation Home |
A Parser can read the text content of a CodeEditor and decorate it. More...
#include <ilviews/gadgets/codeedit.h>
Public Member Functions | |
void | associate (const char *ext) |
Associates a parser with a filename extension. More... | |
Static Public Member Functions | |
static Parser * | CreateCPPParser () |
Creates a new parser that can handle C and C++ source code. More... | |
static Parser * | CreateDefaultParser () |
Creates a new parser that can handle raw text. More... | |
static Parser * | CreateHTMLParser () |
Creates a new parser that can handle HTML code. More... | |
static Parser * | CreateJavaParser () |
Creates a new parser that can handle Java source code. More... | |
static Parser * | CreateJavaScriptParser () |
Creates a new parser that can handle JavaScript source code. More... | |
static Parser * | CreateMakefileParser () |
Creates a new parser that can handle Makefile content. More... | |
A Parser can read the text content of a CodeEditor and decorate it.
Library: ilvadvgdt
Predefined parsers can be associated with filename extensions.
void IlvCodeEditor::Parser::associate | ( | const char * | ext | ) |
Associates a parser with a filename extension.
After this method is called, and when the user calls IlvCodeEditor::loadFile()
providing a filename that has this extension, then the associated parser is invoked to decorate the file content.
Once associated with one or several filename extensions, the instance of Parser
is automatically deleted by the library when the application exits. So the user code may typically look like:
The variable cppParser will be deleted on exit.
The predefined parser are:
CreateDefaultParser()
. CreateCPPParser()
. CreateJavaParser()
. CreateJavaScriptParser()
. CreateHTMLParser()
. CreateMakefileParser()
. If the extension has already been associated to another parser, the old association is replaced by the new one
ext | The filename extension, without the leading dot. |
|
static |
Creates a new parser that can handle C and C++ source code.
|
static |
Creates a new parser that can handle raw text.
|
static |
Creates a new parser that can handle HTML code.
|
static |
Creates a new parser that can handle Java source code.
|
static |
Creates a new parser that can handle JavaScript source code.
|
static |
Creates a new parser that can handle Makefile content.
© Copyright 2016, Rogue Wave Software, Inc. All Rights Reserved.
Rogue Wave is a registered trademark of Rogue Wave Software, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.