39 QsciScintilla incrementally. This class ensures compatibility |
39 QsciScintilla incrementally. This class ensures compatibility |
40 to older versions of QsciScintilla. |
40 to older versions of QsciScintilla. |
41 """ |
41 """ |
42 ArrowFoldStyle = QsciScintilla.BoxedTreeFoldStyle + 1 |
42 ArrowFoldStyle = QsciScintilla.BoxedTreeFoldStyle + 1 |
43 ArrowTreeFoldStyle = ArrowFoldStyle + 1 |
43 ArrowTreeFoldStyle = ArrowFoldStyle + 1 |
|
44 |
|
45 UserSeparator = '\x04' |
44 |
46 |
45 def __init__(self, parent = None): |
47 def __init__(self, parent = None): |
46 """ |
48 """ |
47 Constructor |
49 Constructor |
48 |
50 |
1018 try: |
1020 try: |
1019 return p.getFileName() |
1021 return p.getFileName() |
1020 except AttributeError: |
1022 except AttributeError: |
1021 return "" |
1023 return "" |
1022 |
1024 |
|
1025 ##################################################################################### |
|
1026 # replacements for buggy methods |
|
1027 ##################################################################################### |
|
1028 |
|
1029 def showUserList(self, id, lst): |
|
1030 """ |
|
1031 Public method to show a user supplied list. |
|
1032 |
|
1033 @param id id of the list (integer) |
|
1034 @param lst list to be show (list of strings) |
|
1035 """ |
|
1036 if id <= 0: |
|
1037 return |
|
1038 |
|
1039 self.SendScintilla(QsciScintilla.SCI_AUTOCSETSEPARATOR, |
|
1040 ord(self.UserSeparator)) |
|
1041 if self.isUtf8(): |
|
1042 lst = self.UserSeparator.join(lst).encode("utf-8") |
|
1043 else: |
|
1044 lst = self.UserSeparator.join(lst).encode("latin-1") |
|
1045 self.SendScintilla(QsciScintilla.SCI_USERLISTSHOW, id, lst) |
|
1046 |
1023 ## ##################################################################################### |
1047 ## ##################################################################################### |
1024 ## # methods below have been added to QScintilla starting with version after 2.x |
1048 ## # methods below have been added to QScintilla starting with version after 2.x |
1025 ## ##################################################################################### |
1049 ## ##################################################################################### |
1026 ## |
1050 ## |
1027 ## if "newMethod" not in QsciScintilla.__dict__: |
1051 ## if "newMethod" not in QsciScintilla.__dict__: |