lyx_mirror/src/frontends/qt4/LaTeXHighlighter.h
André Pönitz 86af8a2811 move LaTeXHighlighte
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20796 a592a061-630c-0410-9148-cb99ea01b6c8
2007-10-06 19:03:41 +00:00

43 lines
796 B
C++

// -*- C++ -*-
/**
* \file LaTeXHighlighter.h
* This file is part of LyX, the document processor.
* Licence details can be found in the file COPYING.
*
* \author Bo Peng
*
* Full author contact details are available in file CREDITS.
*/
#ifndef LATEXHIGHLIGHTER_H
#define LATEXHIGHLIGHTER_H
#include <QSyntaxHighlighter>
#include <QTextCharFormat>
class QTextDocument;
class QString;
namespace lyx {
namespace frontend {
// used already twice...
class LaTeXHighlighter : public QSyntaxHighlighter
{
public:
LaTeXHighlighter(QTextDocument * parent);
protected:
void highlightBlock(QString const & text);
private:
QTextCharFormat commentFormat;
QTextCharFormat keywordFormat;
QTextCharFormat mathFormat;
};
} // namespace frontend
} // namespace lyx
#endif // LATEXHIGHLIGHTER