Mercurial > octave
comparison libgui/languages/build_ts/octave-qsci/Qsci/qscilexerspice.h @ 31537:5ceb4bfcdb0f stable
add tools and files for updating the gui's language files for translation
* libgui/languages/build_ts/README.md: readme for updating language files
* libgui/languages/build_ts/octave-qsci: QScintilla source files for
languages without translation provided by QScintilla
* libgui/languages/build_ts/octave-qt: Qt source files for languages
without translation provided by Qt
author | Torsten Lilge <ttl-octave@mailbox.org> |
---|---|
date | Thu, 24 Nov 2022 06:48:25 +0100 |
parents | |
children | dd5ece3664ed |
comparison
equal
deleted
inserted
replaced
31535:4b80982e0af8 | 31537:5ceb4bfcdb0f |
---|---|
1 // This defines the interface to the QsciLexerSpice class. | |
2 // | |
3 // Copyright (c) 2019 Riverbank Computing Limited <info@riverbankcomputing.com> | |
4 // | |
5 // This file is part of QScintilla. | |
6 // | |
7 // This file may be used under the terms of the GNU General Public License | |
8 // version 3.0 as published by the Free Software Foundation and appearing in | |
9 // the file LICENSE included in the packaging of this file. Please review the | |
10 // following information to ensure the GNU General Public License version 3.0 | |
11 // requirements will be met: http://www.gnu.org/copyleft/gpl.html. | |
12 // | |
13 // If you do not wish to use this file under the terms of the GPL version 3.0 | |
14 // then you may purchase a commercial license. For more information contact | |
15 // info@riverbankcomputing.com. | |
16 // | |
17 // This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | |
18 // WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | |
19 | |
20 | |
21 #ifndef QSCILEXERSPICE_H | |
22 #define QSCILEXERSPICE_H | |
23 | |
24 #include <QObject> | |
25 | |
26 #include <Qsci/qsciglobal.h> | |
27 #include <Qsci/qscilexer.h> | |
28 | |
29 | |
30 //! \brief The QsciLexerSpice class encapsulates the Scintilla Spice lexer. | |
31 class QSCINTILLA_EXPORT QsciLexerSpice : public QsciLexer | |
32 { | |
33 Q_OBJECT | |
34 | |
35 public: | |
36 //! This enum defines the meanings of the different styles used by the | |
37 //! Spice lexer. | |
38 enum { | |
39 //! The default. | |
40 Default = 0, | |
41 | |
42 //! An identifier. | |
43 Identifier = 1, | |
44 | |
45 //! A command. | |
46 Command = 2, | |
47 | |
48 //! A function. | |
49 Function = 3, | |
50 | |
51 //! A parameter. | |
52 Parameter = 4, | |
53 | |
54 //! A number. | |
55 Number = 5, | |
56 | |
57 //! A delimiter. | |
58 Delimiter = 6, | |
59 | |
60 //! A value. | |
61 Value = 7, | |
62 | |
63 //! A comment. | |
64 Comment = 8 | |
65 }; | |
66 | |
67 //! Construct a QsciLexerSpice with parent \a parent. \a parent is | |
68 //! typically the QsciScintilla instance. | |
69 QsciLexerSpice(QObject *parent = 0); | |
70 | |
71 //! Destroys the QsciLexerSpice instance. | |
72 virtual ~QsciLexerSpice(); | |
73 | |
74 //! Returns the name of the language. | |
75 const char *language() const; | |
76 | |
77 //! Returns the name of the lexer. Some lexers support a number of | |
78 //! languages. | |
79 const char *lexer() const; | |
80 | |
81 //! \internal Returns the style used for braces for brace matching. | |
82 int braceStyle() const; | |
83 | |
84 //! Returns the set of keywords for the keyword set \a set recognised | |
85 //! by the lexer as a space separated string. | |
86 const char *keywords(int set) const; | |
87 | |
88 //! Returns the foreground colour of the text for style number \a style. | |
89 //! | |
90 //! \sa defaultPaper() | |
91 QColor defaultColor(int style) const; | |
92 | |
93 //! Returns the font for style number \a style. | |
94 QFont defaultFont(int style) const; | |
95 | |
96 //! Returns the descriptive name for style number \a style. If the | |
97 //! style is invalid for this language then an empty QString is returned. | |
98 //! This is intended to be used in user preference dialogs. | |
99 QString description(int style) const; | |
100 | |
101 private: | |
102 QsciLexerSpice(const QsciLexerSpice &); | |
103 QsciLexerSpice &operator=(const QsciLexerSpice &); | |
104 }; | |
105 | |
106 #endif |