4dd7dbd7
—
pyros2097 13 years ago
saving
- Widget/editor.py +4 -4
- Widget/editor.pyc +0 -0
- Widget/lexersquirrel.py +36 -2
Widget/editor.py
CHANGED
|
@@ -335,10 +335,10 @@ class Editor(QsciScintilla):
|
|
|
335
335
|
self.api.add("emo.Net.request?1(MY_REQUEST_NAME_BY_POST, 'http://www.example.com/','POST', 1000, 'key1', 'value1', 'key2', 'value2')")
|
|
336
336
|
self.api.add("onNetCallback?1(name, response, err)")
|
|
337
337
|
#Physics
|
|
338
|
-
self.api.add("_add")
|
|
338
|
+
self.api.add("_add?1()")
|
|
339
|
-
self.api.add("_sub")
|
|
339
|
+
self.api.add("_sub?1()")
|
|
340
|
-
self.api.add("_mul")
|
|
340
|
+
self.api.add("_mul?1()")
|
|
341
|
-
self.api.add("_div")
|
|
341
|
+
self.api.add("_div?1()")
|
|
342
342
|
self.api.add("")
|
|
343
343
|
self.api.add("")
|
|
344
344
|
|
Widget/editor.pyc
CHANGED
|
Binary file
|
Widget/lexersquirrel.py
CHANGED
|
@@ -19,7 +19,7 @@ class LexerSquirrel(QsciLexerCustom):
|
|
|
19
19
|
self.boldFont.setFamily("Courier New")
|
|
20
20
|
self.boldFont.setBold(True)
|
|
21
21
|
self.styles = [
|
|
22
|
-
QsciStyle(0, QString("base"), QColor("#
|
|
22
|
+
QsciStyle(0, QString("base"), QColor("#ffffff"), QColor("#000000"), self.plainFont, False),
|
|
23
23
|
QsciStyle(1, QString("comment"), QColor("#008000"), QColor("#eeffee"), self.marginFont, True),
|
|
24
24
|
QsciStyle(2, QString("keyword"), QColor("#000080"), QColor("#ffffff"), self.boldFont, True),
|
|
25
25
|
QsciStyle(3, QString("string"), QColor("#800000"), QColor("#ffffff"), self.marginFont, True),
|
|
@@ -28,12 +28,46 @@ class LexerSquirrel(QsciLexerCustom):
|
|
|
28
28
|
QsciStyle(6, QString("error"), QColor("#000000"), QColor("#ffd0d0"), self.plainFont, True),
|
|
29
29
|
]
|
|
30
30
|
#print("LexerErlang created")
|
|
31
|
+
|
|
32
|
+
def language(self):
|
|
33
|
+
return 'Squirrel'
|
|
34
|
+
|
|
35
|
+
def foldCompact(self):
|
|
36
|
+
return self._foldcompact
|
|
37
|
+
|
|
38
|
+
def setFoldCompact(self, enable):
|
|
39
|
+
self._foldcompact = bool(enable)
|
|
31
40
|
|
|
32
41
|
def description(self, ix):
|
|
33
42
|
for i in self.styles:
|
|
34
43
|
if i.style() == ix:
|
|
35
|
-
return
|
|
44
|
+
return i.description()
|
|
36
45
|
return QtCore.QString("")
|
|
46
|
+
|
|
47
|
+
def defaultColor(self, ix):
|
|
48
|
+
for i in self.styles:
|
|
49
|
+
if i.style() == ix:
|
|
50
|
+
return i.color()
|
|
51
|
+
return QsciLexerCustom.defaultColor(self, ix)
|
|
52
|
+
|
|
53
|
+
def defaultFont(self, ix):
|
|
54
|
+
for i in self.styles:
|
|
55
|
+
if i.style() == ix:
|
|
56
|
+
return i.font()
|
|
57
|
+
return QsciLexerCustom.defaultFont(self, ix)
|
|
58
|
+
|
|
59
|
+
def defaultPaper(self, ix):
|
|
60
|
+
for i in self.styles:
|
|
61
|
+
if i.style() == ix:
|
|
62
|
+
return i.paper()
|
|
63
|
+
return QsciLexerCustom.defaultPaper(self, ix)
|
|
64
|
+
|
|
65
|
+
def defaultEolFill(self, ix):
|
|
66
|
+
for i in self.styles:
|
|
67
|
+
if i.style() == ix:
|
|
68
|
+
return i.eolFill()
|
|
69
|
+
return QsciLexerCustom.defaultEolFill(self, ix)
|
|
70
|
+
|
|
37
71
|
def setEditor(self, sci):
|
|
38
72
|
self.sci = sci
|
|
39
73
|
Qsci.QsciLexerCustom.setEditor(self, sci)
|