Preferences/PreferencesLexer.py

Mon, 11 Mar 2019 19:15:34 +0100

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Mon, 11 Mar 2019 19:15:34 +0100
branch
sub_styles
changeset 6853
0922aa829e5e
parent 6645
ad476851d7e0
child 6854
f4dd76230eea
permissions
-rw-r--r--

PreferencesLexer: started to prepare it for handling of sub-style aware lexers.

0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1 # -*- coding: utf-8 -*-
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2
6645
ad476851d7e0 Updated copyright for 2019.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6048
diff changeset
3 # Copyright (c) 2002 - 2019 Detlev Offenbach <detlev@die-offenbachs.de>
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4 #
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6 """
6853
0922aa829e5e PreferencesLexer: started to prepare it for handling of sub-style aware lexers.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6645
diff changeset
7 Module implementing a special QScintilla lexer to handle the preferences.
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
8 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
9
3145
a9de05d4a22f # __IGNORE_WARNING__ added/ removed.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 3058
diff changeset
10 from __future__ import unicode_literals
2525
8b507a9a2d40 Script changes: Future import added, super calls modified and unicode behavior for str.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 2503
diff changeset
11
3658
edcfadf0152d Continued porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3656
diff changeset
12 from PyQt5.QtCore import QCoreApplication
6853
0922aa829e5e PreferencesLexer: started to prepare it for handling of sub-style aware lexers.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6645
diff changeset
13 from PyQt5.Qsci import QsciLexer, QsciScintillaBase
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
14
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
15 import Preferences
2503
3f1fa98e8e03 Changed code to override the QScintilla lexer default fonts to always use a monospaced family.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2408
diff changeset
16 import Globals
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
17
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 791
diff changeset
18
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
19 class PreferencesLexerError(Exception):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
20 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
21 Class defining a special error for the PreferencesLexer class.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
22 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
23 def __init__(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
24 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
25 Constructor
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
26 """
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
27 self._errorMessage = QCoreApplication.translate(
3025
67064c71df21 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2964
diff changeset
28 "PreferencesLexerError",
67064c71df21 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2964
diff changeset
29 "Unspecific PreferencesLexer error.")
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
30
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
31 def __repr__(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
32 """
3591
2f2a4a76dd22 Corrected a bunch of source docu issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3178
diff changeset
33 Special method returning a representation of the exception.
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
34
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
35 @return string representing the error message
6853
0922aa829e5e PreferencesLexer: started to prepare it for handling of sub-style aware lexers.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6645
diff changeset
36 @rtype str
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
37 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
38 return repr(self._errorMessage)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
39
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
40 def __str__(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
41 """
3591
2f2a4a76dd22 Corrected a bunch of source docu issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3178
diff changeset
42 Special method returning a string representation of the exception.
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
43
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
44 @return string representing the error message
6853
0922aa829e5e PreferencesLexer: started to prepare it for handling of sub-style aware lexers.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6645
diff changeset
45 @rtype str
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
46 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
47 return self._errorMessage
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
48
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 791
diff changeset
49
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
50 class PreferencesLexerLanguageError(PreferencesLexerError):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
51 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
52 Class defining a special error for the PreferencesLexer class.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
53 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
54 def __init__(self, language):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
55 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
56 Constructor
2964
84b65fb9e780 Continued correcting doc strings by using the new doc string checker.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2503
diff changeset
57
6853
0922aa829e5e PreferencesLexer: started to prepare it for handling of sub-style aware lexers.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6645
diff changeset
58 @param language lexer language
0922aa829e5e PreferencesLexer: started to prepare it for handling of sub-style aware lexers.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6645
diff changeset
59 @rtype str
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
60 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
61 PreferencesLexerError.__init__(self)
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
62 self._errorMessage = QCoreApplication.translate(
3025
67064c71df21 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2964
diff changeset
63 "PreferencesLexerError",
67064c71df21 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2964
diff changeset
64 'Unsupported Lexer Language: {0}').format(language)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
65
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 791
diff changeset
66
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
67 class PreferencesLexer(QsciLexer):
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 791
diff changeset
68 """
6853
0922aa829e5e PreferencesLexer: started to prepare it for handling of sub-style aware lexers.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6645
diff changeset
69 Subclass of QsciLexer to implement preferences specific lexer methods and
0922aa829e5e PreferencesLexer: started to prepare it for handling of sub-style aware lexers.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6645
diff changeset
70 delegate some methods to the real lexer object.
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
71 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
72 def __init__(self, language, parent=None):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
73 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
74 Constructor
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
75
6853
0922aa829e5e PreferencesLexer: started to prepare it for handling of sub-style aware lexers.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6645
diff changeset
76 @param language language of the lexer
0922aa829e5e PreferencesLexer: started to prepare it for handling of sub-style aware lexers.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6645
diff changeset
77 @type str
0922aa829e5e PreferencesLexer: started to prepare it for handling of sub-style aware lexers.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6645
diff changeset
78 @param parent parent widget of this lexer (QWidget)
2964
84b65fb9e780 Continued correcting doc strings by using the new doc string checker.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2503
diff changeset
79 @exception PreferencesLexerLanguageError raised to indicate an invalid
84b65fb9e780 Continued correcting doc strings by using the new doc string checker.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2503
diff changeset
80 lexer language
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
81 """
2525
8b507a9a2d40 Script changes: Future import added, super calls modified and unicode behavior for str.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 2503
diff changeset
82 super(PreferencesLexer, self).__init__(parent)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
83
2503
3f1fa98e8e03 Changed code to override the QScintilla lexer default fonts to always use a monospaced family.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2408
diff changeset
84 # These default font families are taken from QScintilla
3f1fa98e8e03 Changed code to override the QScintilla lexer default fonts to always use a monospaced family.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2408
diff changeset
85 if Globals.isWindowsPlatform():
3f1fa98e8e03 Changed code to override the QScintilla lexer default fonts to always use a monospaced family.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2408
diff changeset
86 self.__defaultFontFamily = "Courier New"
3f1fa98e8e03 Changed code to override the QScintilla lexer default fonts to always use a monospaced family.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2408
diff changeset
87 elif Globals.isMacPlatform():
3f1fa98e8e03 Changed code to override the QScintilla lexer default fonts to always use a monospaced family.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2408
diff changeset
88 self.__defaultFontFamily = "Courier"
3f1fa98e8e03 Changed code to override the QScintilla lexer default fonts to always use a monospaced family.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2408
diff changeset
89 else:
3f1fa98e8e03 Changed code to override the QScintilla lexer default fonts to always use a monospaced family.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2408
diff changeset
90 self.__defaultFontFamily = "Bitstream Vera Sans Mono"
3f1fa98e8e03 Changed code to override the QScintilla lexer default fonts to always use a monospaced family.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2408
diff changeset
91
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
92 # instantiate a lexer object for the given language
2408
dc3a7c9d8f6e Continued implementing the delayed import.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2302
diff changeset
93 import QScintilla.Lexers
6853
0922aa829e5e PreferencesLexer: started to prepare it for handling of sub-style aware lexers.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6645
diff changeset
94 self.__lex = QScintilla.Lexers.getLexer(language)
0922aa829e5e PreferencesLexer: started to prepare it for handling of sub-style aware lexers.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6645
diff changeset
95 if self.__lex is None:
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
96 raise PreferencesLexerLanguageError(language)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
97
6853
0922aa829e5e PreferencesLexer: started to prepare it for handling of sub-style aware lexers.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6645
diff changeset
98 # TODO: get rid of 'styles' and 'ind2style'
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
99 # define the local store
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
100 self.ind2style = {}
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
101 self.styles = []
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
102 index = 0
6853
0922aa829e5e PreferencesLexer: started to prepare it for handling of sub-style aware lexers.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6645
diff changeset
103 for i in range(QsciScintillaBase.STYLE_MAX):
0922aa829e5e PreferencesLexer: started to prepare it for handling of sub-style aware lexers.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6645
diff changeset
104 desc = self.__lex.description(i)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
105 if desc:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
106 self.styles.append(desc)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
107 self.ind2style[index] = i
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
108 index += 1
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
109
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
110 # read the last stored values from preferences file
6853
0922aa829e5e PreferencesLexer: started to prepare it for handling of sub-style aware lexers.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6645
diff changeset
111 self.__lex.readSettings(Preferences.Prefs.settings, "Scintilla")
0922aa829e5e PreferencesLexer: started to prepare it for handling of sub-style aware lexers.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6645
diff changeset
112 # TODO: add substyles
0922aa829e5e PreferencesLexer: started to prepare it for handling of sub-style aware lexers.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6645
diff changeset
113
0922aa829e5e PreferencesLexer: started to prepare it for handling of sub-style aware lexers.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6645
diff changeset
114 def writeSettings(self):
0922aa829e5e PreferencesLexer: started to prepare it for handling of sub-style aware lexers.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6645
diff changeset
115 """
0922aa829e5e PreferencesLexer: started to prepare it for handling of sub-style aware lexers.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6645
diff changeset
116 Public method to write the lexer settings.
0922aa829e5e PreferencesLexer: started to prepare it for handling of sub-style aware lexers.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6645
diff changeset
117 """
0922aa829e5e PreferencesLexer: started to prepare it for handling of sub-style aware lexers.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6645
diff changeset
118 self.__lex.writeSettings(Preferences.Prefs.settings, "Scintilla")
0922aa829e5e PreferencesLexer: started to prepare it for handling of sub-style aware lexers.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6645
diff changeset
119 # TODO: add substyles
0922aa829e5e PreferencesLexer: started to prepare it for handling of sub-style aware lexers.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6645
diff changeset
120
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
121 def defaultColor(self, style):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
122 """
6853
0922aa829e5e PreferencesLexer: started to prepare it for handling of sub-style aware lexers.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6645
diff changeset
123 Public method to get the default color of a style.
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
124
6853
0922aa829e5e PreferencesLexer: started to prepare it for handling of sub-style aware lexers.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6645
diff changeset
125 @param style style number
0922aa829e5e PreferencesLexer: started to prepare it for handling of sub-style aware lexers.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6645
diff changeset
126 @type int
0922aa829e5e PreferencesLexer: started to prepare it for handling of sub-style aware lexers.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6645
diff changeset
127 @return default color
0922aa829e5e PreferencesLexer: started to prepare it for handling of sub-style aware lexers.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6645
diff changeset
128 @rtype QColor
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
129 """
6853
0922aa829e5e PreferencesLexer: started to prepare it for handling of sub-style aware lexers.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6645
diff changeset
130 return self.__lex.defaultColor(style)
0922aa829e5e PreferencesLexer: started to prepare it for handling of sub-style aware lexers.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6645
diff changeset
131
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
132 def color(self, style):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
133 """
6853
0922aa829e5e PreferencesLexer: started to prepare it for handling of sub-style aware lexers.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6645
diff changeset
134 Public method to get the color of a style.
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
135
6853
0922aa829e5e PreferencesLexer: started to prepare it for handling of sub-style aware lexers.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6645
diff changeset
136 @param style style number
0922aa829e5e PreferencesLexer: started to prepare it for handling of sub-style aware lexers.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6645
diff changeset
137 @type int
0922aa829e5e PreferencesLexer: started to prepare it for handling of sub-style aware lexers.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6645
diff changeset
138 @return color
0922aa829e5e PreferencesLexer: started to prepare it for handling of sub-style aware lexers.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6645
diff changeset
139 @rtype QColor
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
140 """
6853
0922aa829e5e PreferencesLexer: started to prepare it for handling of sub-style aware lexers.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6645
diff changeset
141 return self.__lex.color(style)
0922aa829e5e PreferencesLexer: started to prepare it for handling of sub-style aware lexers.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6645
diff changeset
142
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
143 def setColor(self, c, style):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
144 """
6853
0922aa829e5e PreferencesLexer: started to prepare it for handling of sub-style aware lexers.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6645
diff changeset
145 Public method to set the color for a style.
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
146
6853
0922aa829e5e PreferencesLexer: started to prepare it for handling of sub-style aware lexers.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6645
diff changeset
147 @param c color
0922aa829e5e PreferencesLexer: started to prepare it for handling of sub-style aware lexers.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6645
diff changeset
148 @type QColor
0922aa829e5e PreferencesLexer: started to prepare it for handling of sub-style aware lexers.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6645
diff changeset
149 @param style style number
0922aa829e5e PreferencesLexer: started to prepare it for handling of sub-style aware lexers.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6645
diff changeset
150 @type int
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
151 """
6853
0922aa829e5e PreferencesLexer: started to prepare it for handling of sub-style aware lexers.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6645
diff changeset
152 self.__lex.setColor(c, style)
0922aa829e5e PreferencesLexer: started to prepare it for handling of sub-style aware lexers.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6645
diff changeset
153
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
154 def defaultPaper(self, style):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
155 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
156 Public method to get the default background for a style.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
157
6853
0922aa829e5e PreferencesLexer: started to prepare it for handling of sub-style aware lexers.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6645
diff changeset
158 @param style style number
0922aa829e5e PreferencesLexer: started to prepare it for handling of sub-style aware lexers.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6645
diff changeset
159 @type int
0922aa829e5e PreferencesLexer: started to prepare it for handling of sub-style aware lexers.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6645
diff changeset
160 @return default background color
0922aa829e5e PreferencesLexer: started to prepare it for handling of sub-style aware lexers.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6645
diff changeset
161 @rtype QColor
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
162 """
6853
0922aa829e5e PreferencesLexer: started to prepare it for handling of sub-style aware lexers.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6645
diff changeset
163 return self.__lex.defaultPaper(style)
0922aa829e5e PreferencesLexer: started to prepare it for handling of sub-style aware lexers.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6645
diff changeset
164
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
165 def paper(self, style):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
166 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
167 Public method to get the background for a style.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
168
6853
0922aa829e5e PreferencesLexer: started to prepare it for handling of sub-style aware lexers.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6645
diff changeset
169 @param style the style number
0922aa829e5e PreferencesLexer: started to prepare it for handling of sub-style aware lexers.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6645
diff changeset
170 @type int
0922aa829e5e PreferencesLexer: started to prepare it for handling of sub-style aware lexers.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6645
diff changeset
171 @return background color
0922aa829e5e PreferencesLexer: started to prepare it for handling of sub-style aware lexers.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6645
diff changeset
172 @rtype QColor
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
173 """
6853
0922aa829e5e PreferencesLexer: started to prepare it for handling of sub-style aware lexers.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6645
diff changeset
174 return self.__lex.paper(style)
0922aa829e5e PreferencesLexer: started to prepare it for handling of sub-style aware lexers.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6645
diff changeset
175
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
176 def setPaper(self, c, style):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
177 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
178 Public method to set the background for a style.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
179
6853
0922aa829e5e PreferencesLexer: started to prepare it for handling of sub-style aware lexers.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6645
diff changeset
180 @param c background color
0922aa829e5e PreferencesLexer: started to prepare it for handling of sub-style aware lexers.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6645
diff changeset
181 @type QColor
0922aa829e5e PreferencesLexer: started to prepare it for handling of sub-style aware lexers.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6645
diff changeset
182 @param style style number
0922aa829e5e PreferencesLexer: started to prepare it for handling of sub-style aware lexers.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6645
diff changeset
183 @type int
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
184 """
6853
0922aa829e5e PreferencesLexer: started to prepare it for handling of sub-style aware lexers.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6645
diff changeset
185 self.__lex.setPaper(c, style)
0922aa829e5e PreferencesLexer: started to prepare it for handling of sub-style aware lexers.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6645
diff changeset
186
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
187 def defaulEolFill(self, style):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
188 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
189 Public method to get the default eolFill flag for a style.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
190
6853
0922aa829e5e PreferencesLexer: started to prepare it for handling of sub-style aware lexers.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6645
diff changeset
191 @param style style number
0922aa829e5e PreferencesLexer: started to prepare it for handling of sub-style aware lexers.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6645
diff changeset
192 @type int
0922aa829e5e PreferencesLexer: started to prepare it for handling of sub-style aware lexers.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6645
diff changeset
193 @return default eolFill flag
0922aa829e5e PreferencesLexer: started to prepare it for handling of sub-style aware lexers.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6645
diff changeset
194 @rtype bool
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
195 """
6853
0922aa829e5e PreferencesLexer: started to prepare it for handling of sub-style aware lexers.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6645
diff changeset
196 return self.__lex.defaultEolFill(style)
0922aa829e5e PreferencesLexer: started to prepare it for handling of sub-style aware lexers.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6645
diff changeset
197
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
198 def eolFill(self, style):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
199 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
200 Public method to get the eolFill flag for a style.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
201
6853
0922aa829e5e PreferencesLexer: started to prepare it for handling of sub-style aware lexers.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6645
diff changeset
202 @param style style number
0922aa829e5e PreferencesLexer: started to prepare it for handling of sub-style aware lexers.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6645
diff changeset
203 @type int
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
204 @return eolFill flag
6853
0922aa829e5e PreferencesLexer: started to prepare it for handling of sub-style aware lexers.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6645
diff changeset
205 @rtype bool
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
206 """
6853
0922aa829e5e PreferencesLexer: started to prepare it for handling of sub-style aware lexers.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6645
diff changeset
207 return self.__lex.eolFill(style)
0922aa829e5e PreferencesLexer: started to prepare it for handling of sub-style aware lexers.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6645
diff changeset
208
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
209 def setEolFill(self, eolfill, style):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
210 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
211 Public method to set the eolFill flag for a style.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
212
6853
0922aa829e5e PreferencesLexer: started to prepare it for handling of sub-style aware lexers.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6645
diff changeset
213 @param eolfill eolFill flag
0922aa829e5e PreferencesLexer: started to prepare it for handling of sub-style aware lexers.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6645
diff changeset
214 @type bool
0922aa829e5e PreferencesLexer: started to prepare it for handling of sub-style aware lexers.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6645
diff changeset
215 @param style style number
0922aa829e5e PreferencesLexer: started to prepare it for handling of sub-style aware lexers.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6645
diff changeset
216 @type int
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
217 """
6853
0922aa829e5e PreferencesLexer: started to prepare it for handling of sub-style aware lexers.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6645
diff changeset
218 self.__lex.setEolFill(eolfill, style)
0922aa829e5e PreferencesLexer: started to prepare it for handling of sub-style aware lexers.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6645
diff changeset
219
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
220 def defaultFont(self, style):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
221 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
222 Public method to get the default font for a style.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
223
6853
0922aa829e5e PreferencesLexer: started to prepare it for handling of sub-style aware lexers.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6645
diff changeset
224 @param style style number
0922aa829e5e PreferencesLexer: started to prepare it for handling of sub-style aware lexers.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6645
diff changeset
225 @type int
0922aa829e5e PreferencesLexer: started to prepare it for handling of sub-style aware lexers.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6645
diff changeset
226 @return default font
0922aa829e5e PreferencesLexer: started to prepare it for handling of sub-style aware lexers.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6645
diff changeset
227 @rtype QFont
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
228 """
6853
0922aa829e5e PreferencesLexer: started to prepare it for handling of sub-style aware lexers.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6645
diff changeset
229 return self.__lex.defaultFont(style)
0922aa829e5e PreferencesLexer: started to prepare it for handling of sub-style aware lexers.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6645
diff changeset
230
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
231 def font(self, style):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
232 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
233 Public method to get the font for a style.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
234
6853
0922aa829e5e PreferencesLexer: started to prepare it for handling of sub-style aware lexers.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6645
diff changeset
235 @param style style number
0922aa829e5e PreferencesLexer: started to prepare it for handling of sub-style aware lexers.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6645
diff changeset
236 @type int
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
237 @return font
6853
0922aa829e5e PreferencesLexer: started to prepare it for handling of sub-style aware lexers.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6645
diff changeset
238 @rtype QFont
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
239 """
6853
0922aa829e5e PreferencesLexer: started to prepare it for handling of sub-style aware lexers.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6645
diff changeset
240 return self.__lex.font(style)
0922aa829e5e PreferencesLexer: started to prepare it for handling of sub-style aware lexers.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6645
diff changeset
241
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
242 def setFont(self, f, style):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
243 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
244 Public method to set the font for a style.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
245
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
246 @param f font
6853
0922aa829e5e PreferencesLexer: started to prepare it for handling of sub-style aware lexers.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6645
diff changeset
247 @type QFont
0922aa829e5e PreferencesLexer: started to prepare it for handling of sub-style aware lexers.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6645
diff changeset
248 @param style style number
0922aa829e5e PreferencesLexer: started to prepare it for handling of sub-style aware lexers.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6645
diff changeset
249 @type int
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
250 """
6853
0922aa829e5e PreferencesLexer: started to prepare it for handling of sub-style aware lexers.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6645
diff changeset
251 self.__lex.setFont(f, style)
0922aa829e5e PreferencesLexer: started to prepare it for handling of sub-style aware lexers.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6645
diff changeset
252
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
253 def language(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
254 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
255 Public method to get the lexers programming language.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
256
6853
0922aa829e5e PreferencesLexer: started to prepare it for handling of sub-style aware lexers.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6645
diff changeset
257 @return lexer programming language
0922aa829e5e PreferencesLexer: started to prepare it for handling of sub-style aware lexers.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6645
diff changeset
258 @rtype str
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
259 """
6853
0922aa829e5e PreferencesLexer: started to prepare it for handling of sub-style aware lexers.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6645
diff changeset
260 return self.__lex.language()
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
261
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
262 def description(self, style):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
263 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
264 Public method to get a descriptive string for a style.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
265
6853
0922aa829e5e PreferencesLexer: started to prepare it for handling of sub-style aware lexers.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6645
diff changeset
266 @param style style number
0922aa829e5e PreferencesLexer: started to prepare it for handling of sub-style aware lexers.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6645
diff changeset
267 @type int
0922aa829e5e PreferencesLexer: started to prepare it for handling of sub-style aware lexers.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6645
diff changeset
268 @return description of the style
0922aa829e5e PreferencesLexer: started to prepare it for handling of sub-style aware lexers.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6645
diff changeset
269 @rtype str
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
270 """
6853
0922aa829e5e PreferencesLexer: started to prepare it for handling of sub-style aware lexers.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6645
diff changeset
271 return self.__lex.description(style)

eric ide

mercurial