comparison libgui/languages/build_ts/octave-qsci/Qsci/qscilexerjavascript.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 QsciLexerJavaScript 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 QSCILEXERJSCRIPT_H
22 #define QSCILEXERJSCRIPT_H
23
24 #include <QObject>
25
26 #include <Qsci/qsciglobal.h>
27 #include <Qsci/qscilexercpp.h>
28
29
30 //! \brief The QsciLexerJavaScript class encapsulates the Scintilla JavaScript
31 //! lexer.
32 class QSCINTILLA_EXPORT QsciLexerJavaScript : public QsciLexerCPP
33 {
34 Q_OBJECT
35
36 public:
37 //! Construct a QsciLexerJavaScript with parent \a parent. \a parent is
38 //! typically the QsciScintilla instance.
39 QsciLexerJavaScript(QObject *parent = 0);
40
41 //! Destroys the QsciLexerJavaScript instance.
42 virtual ~QsciLexerJavaScript();
43
44 //! Returns the name of the language.
45 const char *language() const;
46
47 //! Returns the foreground colour of the text for style number \a style.
48 //!
49 //! \sa defaultPaper()
50 QColor defaultColor(int style) const;
51
52 //! Returns the end-of-line fill for style number \a style.
53 bool defaultEolFill(int style) const;
54
55 //! Returns the font for style number \a style.
56 QFont defaultFont(int style) const;
57
58 //! Returns the background colour of the text for style number \a style.
59 //!
60 //! \sa defaultColor()
61 QColor defaultPaper(int style) const;
62
63 //! Returns the set of keywords for the keyword set \a set recognised
64 //! by the lexer as a space separated string.
65 const char *keywords(int set) const;
66
67 //! Returns the descriptive name for style number \a style. If the
68 //! style is invalid for this language then an empty QString is returned.
69 //! This is intended to be used in user preference dialogs.
70 QString description(int style) const;
71
72 private:
73 friend class QsciLexerHTML;
74
75 static const char *keywordClass;
76
77 QsciLexerJavaScript(const QsciLexerJavaScript &);
78 QsciLexerJavaScript &operator=(const QsciLexerJavaScript &);
79 };
80
81 #endif