Mercurial > octave-nkf
annotate gui/src/editor/lexeroctavegui.h @ 14674:252a86f8fe62 gui
Restructured source files.
* FileEditor: Moved into editor/.
* lexeroctavegui: Moved into editor/.
* src.pro: Corrected source file entries according to the changes made.
* MainWindow.h: Corrected includes.
author | Jacob Dawid <jacob.dawid@googlemail.com> |
---|---|
date | Wed, 23 May 2012 10:50:08 +0200 |
parents | gui/src/lexer/lexeroctavegui.h@faece6b2ab90 |
children | 79c9a6d06590 |
rev | line source |
---|---|
13559
316108b2dcd7
edtior: better comments in lexer files
ttl <ttl@justmail.de>
parents:
13558
diff
changeset
|
1 /* OctaveGUI - A graphical user interface for Octave |
13674
c0e66d6e3dc8
Updated license headers and moved to AGPLv3.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13665
diff
changeset
|
2 * Copyright (C) 2011 Jacob Dawid (jacob.dawid@googlemail.com) |
13559
316108b2dcd7
edtior: better comments in lexer files
ttl <ttl@justmail.de>
parents:
13558
diff
changeset
|
3 * |
316108b2dcd7
edtior: better comments in lexer files
ttl <ttl@justmail.de>
parents:
13558
diff
changeset
|
4 * This program is free software: you can redistribute it and/or modify |
14290
faece6b2ab90
Corrected license headers in all files to GPL.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13769
diff
changeset
|
5 * it under the terms of the GNU General Public License as |
13674
c0e66d6e3dc8
Updated license headers and moved to AGPLv3.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13665
diff
changeset
|
6 * published by the Free Software Foundation, either version 3 of the |
c0e66d6e3dc8
Updated license headers and moved to AGPLv3.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13665
diff
changeset
|
7 * License, or (at your option) any later version. |
13559
316108b2dcd7
edtior: better comments in lexer files
ttl <ttl@justmail.de>
parents:
13558
diff
changeset
|
8 * |
316108b2dcd7
edtior: better comments in lexer files
ttl <ttl@justmail.de>
parents:
13558
diff
changeset
|
9 * This program is distributed in the hope that it will be useful, |
316108b2dcd7
edtior: better comments in lexer files
ttl <ttl@justmail.de>
parents:
13558
diff
changeset
|
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
316108b2dcd7
edtior: better comments in lexer files
ttl <ttl@justmail.de>
parents:
13558
diff
changeset
|
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
14290
faece6b2ab90
Corrected license headers in all files to GPL.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13769
diff
changeset
|
12 * GNU General Public License for more details. |
13559
316108b2dcd7
edtior: better comments in lexer files
ttl <ttl@justmail.de>
parents:
13558
diff
changeset
|
13 * |
14290
faece6b2ab90
Corrected license headers in all files to GPL.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13769
diff
changeset
|
14 * You should have received a copy of the GNU General Public License |
13674
c0e66d6e3dc8
Updated license headers and moved to AGPLv3.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13665
diff
changeset
|
15 * along with this program. If not, see <http://www.gnu.org/licenses/>. |
13559
316108b2dcd7
edtior: better comments in lexer files
ttl <ttl@justmail.de>
parents:
13558
diff
changeset
|
16 */ |
13558
248b897d9f36
editor: custom lexer, syntax highlighting, auto completion
ttl <ttl@justmail.de>
parents:
diff
changeset
|
17 |
248b897d9f36
editor: custom lexer, syntax highlighting, auto completion
ttl <ttl@justmail.de>
parents:
diff
changeset
|
18 #ifndef LEXEROCTAVE_H |
248b897d9f36
editor: custom lexer, syntax highlighting, auto completion
ttl <ttl@justmail.de>
parents:
diff
changeset
|
19 #define LEXEROCTAVE_H |
248b897d9f36
editor: custom lexer, syntax highlighting, auto completion
ttl <ttl@justmail.de>
parents:
diff
changeset
|
20 |
13665
ddc3c20d0e2f
Implemented highlighting of octave keywords in terminal.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13559
diff
changeset
|
21 #include "ResourceManager.h" |
ddc3c20d0e2f
Implemented highlighting of octave keywords in terminal.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13559
diff
changeset
|
22 #include <QObject> |
13558
248b897d9f36
editor: custom lexer, syntax highlighting, auto completion
ttl <ttl@justmail.de>
parents:
diff
changeset
|
23 |
248b897d9f36
editor: custom lexer, syntax highlighting, auto completion
ttl <ttl@justmail.de>
parents:
diff
changeset
|
24 #include <Qsci/qsciglobal.h> |
248b897d9f36
editor: custom lexer, syntax highlighting, auto completion
ttl <ttl@justmail.de>
parents:
diff
changeset
|
25 #include <Qsci/qscilexer.h> |
248b897d9f36
editor: custom lexer, syntax highlighting, auto completion
ttl <ttl@justmail.de>
parents:
diff
changeset
|
26 |
248b897d9f36
editor: custom lexer, syntax highlighting, auto completion
ttl <ttl@justmail.de>
parents:
diff
changeset
|
27 |
13769
43ffcaee3fea
Fix various issues under Windows (MSVC)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
13674
diff
changeset
|
28 class LexerOctaveGui : public QsciLexer |
13558
248b897d9f36
editor: custom lexer, syntax highlighting, auto completion
ttl <ttl@justmail.de>
parents:
diff
changeset
|
29 { |
248b897d9f36
editor: custom lexer, syntax highlighting, auto completion
ttl <ttl@justmail.de>
parents:
diff
changeset
|
30 Q_OBJECT |
248b897d9f36
editor: custom lexer, syntax highlighting, auto completion
ttl <ttl@justmail.de>
parents:
diff
changeset
|
31 |
248b897d9f36
editor: custom lexer, syntax highlighting, auto completion
ttl <ttl@justmail.de>
parents:
diff
changeset
|
32 public: |
248b897d9f36
editor: custom lexer, syntax highlighting, auto completion
ttl <ttl@justmail.de>
parents:
diff
changeset
|
33 // the used styles |
248b897d9f36
editor: custom lexer, syntax highlighting, auto completion
ttl <ttl@justmail.de>
parents:
diff
changeset
|
34 enum |
248b897d9f36
editor: custom lexer, syntax highlighting, auto completion
ttl <ttl@justmail.de>
parents:
diff
changeset
|
35 { |
248b897d9f36
editor: custom lexer, syntax highlighting, auto completion
ttl <ttl@justmail.de>
parents:
diff
changeset
|
36 Default = 0, |
248b897d9f36
editor: custom lexer, syntax highlighting, auto completion
ttl <ttl@justmail.de>
parents:
diff
changeset
|
37 Comment = 1, |
248b897d9f36
editor: custom lexer, syntax highlighting, auto completion
ttl <ttl@justmail.de>
parents:
diff
changeset
|
38 Command = 2, |
248b897d9f36
editor: custom lexer, syntax highlighting, auto completion
ttl <ttl@justmail.de>
parents:
diff
changeset
|
39 Number = 3, |
248b897d9f36
editor: custom lexer, syntax highlighting, auto completion
ttl <ttl@justmail.de>
parents:
diff
changeset
|
40 Keyword = 4, |
248b897d9f36
editor: custom lexer, syntax highlighting, auto completion
ttl <ttl@justmail.de>
parents:
diff
changeset
|
41 SingleQuotedString = 5, |
248b897d9f36
editor: custom lexer, syntax highlighting, auto completion
ttl <ttl@justmail.de>
parents:
diff
changeset
|
42 Operator = 6, |
248b897d9f36
editor: custom lexer, syntax highlighting, auto completion
ttl <ttl@justmail.de>
parents:
diff
changeset
|
43 Identifier = 7, |
248b897d9f36
editor: custom lexer, syntax highlighting, auto completion
ttl <ttl@justmail.de>
parents:
diff
changeset
|
44 DoubleQuotedString = 8 |
248b897d9f36
editor: custom lexer, syntax highlighting, auto completion
ttl <ttl@justmail.de>
parents:
diff
changeset
|
45 }; |
248b897d9f36
editor: custom lexer, syntax highlighting, auto completion
ttl <ttl@justmail.de>
parents:
diff
changeset
|
46 |
248b897d9f36
editor: custom lexer, syntax highlighting, auto completion
ttl <ttl@justmail.de>
parents:
diff
changeset
|
47 LexerOctaveGui(QObject *parent = 0); |
248b897d9f36
editor: custom lexer, syntax highlighting, auto completion
ttl <ttl@justmail.de>
parents:
diff
changeset
|
48 virtual ~LexerOctaveGui(); |
248b897d9f36
editor: custom lexer, syntax highlighting, auto completion
ttl <ttl@justmail.de>
parents:
diff
changeset
|
49 const char *language() const; |
248b897d9f36
editor: custom lexer, syntax highlighting, auto completion
ttl <ttl@justmail.de>
parents:
diff
changeset
|
50 const char *lexer() const; |
248b897d9f36
editor: custom lexer, syntax highlighting, auto completion
ttl <ttl@justmail.de>
parents:
diff
changeset
|
51 QColor defaultColor(int style) const; |
248b897d9f36
editor: custom lexer, syntax highlighting, auto completion
ttl <ttl@justmail.de>
parents:
diff
changeset
|
52 QFont defaultFont(int style) const; |
248b897d9f36
editor: custom lexer, syntax highlighting, auto completion
ttl <ttl@justmail.de>
parents:
diff
changeset
|
53 const char *keywords(int set) const; |
248b897d9f36
editor: custom lexer, syntax highlighting, auto completion
ttl <ttl@justmail.de>
parents:
diff
changeset
|
54 QString description(int style) const; |
248b897d9f36
editor: custom lexer, syntax highlighting, auto completion
ttl <ttl@justmail.de>
parents:
diff
changeset
|
55 |
248b897d9f36
editor: custom lexer, syntax highlighting, auto completion
ttl <ttl@justmail.de>
parents:
diff
changeset
|
56 private: |
248b897d9f36
editor: custom lexer, syntax highlighting, auto completion
ttl <ttl@justmail.de>
parents:
diff
changeset
|
57 LexerOctaveGui(const LexerOctaveGui &); |
248b897d9f36
editor: custom lexer, syntax highlighting, auto completion
ttl <ttl@justmail.de>
parents:
diff
changeset
|
58 LexerOctaveGui &operator=(const LexerOctaveGui &); |
248b897d9f36
editor: custom lexer, syntax highlighting, auto completion
ttl <ttl@justmail.de>
parents:
diff
changeset
|
59 }; |
248b897d9f36
editor: custom lexer, syntax highlighting, auto completion
ttl <ttl@justmail.de>
parents:
diff
changeset
|
60 |
248b897d9f36
editor: custom lexer, syntax highlighting, auto completion
ttl <ttl@justmail.de>
parents:
diff
changeset
|
61 #endif |