]> git.lyx.org Git - lyx.git/blob - src/frontends/qt4/LaTeXHighlighter.h
Fix the tab ordering of PanelStack and PrefsUi.
[lyx.git] / src / frontends / qt4 / LaTeXHighlighter.h
1 // -*- C++ -*-
2 /**
3  * \file LaTeXHighlighter.h
4  * This file is part of LyX, the document processor.
5  * Licence details can be found in the file COPYING.
6  *
7  * \author Bo Peng
8  *
9  * Full author contact details are available in file CREDITS.
10  */
11
12 #ifndef LATEXHIGHLIGHTER_H
13 #define LATEXHIGHLIGHTER_H
14
15 #include <QSyntaxHighlighter>
16 #include <QTextCharFormat>
17
18 class QTextDocument;
19 class QString;
20
21 namespace lyx {
22 namespace frontend {
23
24 // used already twice...
25 class LaTeXHighlighter : public QSyntaxHighlighter
26 {
27 public:
28         LaTeXHighlighter(QTextDocument * parent);
29
30 protected:
31         void highlightBlock(QString const & text);
32
33 private:
34         QTextCharFormat commentFormat;
35         QTextCharFormat keywordFormat;
36         QTextCharFormat mathFormat;
37         QTextCharFormat warningFormat;
38 };
39
40 } // namespace frontend
41 } // namespace lyx
42
43 #endif // LATEXHIGHLIGHTER