179 return self.styleAt(self.currentPosition()) |
177 return self.styleAt(self.currentPosition()) |
180 |
178 |
181 def getEndStyled(self): |
179 def getEndStyled(self): |
182 """ |
180 """ |
183 Public method to get the last styled position. |
181 Public method to get the last styled position. |
|
182 |
|
183 @return end position of the last styling run (integer) |
184 """ |
184 """ |
185 return self.SendScintilla(QsciScintilla.SCI_GETENDSTYLED) |
185 return self.SendScintilla(QsciScintilla.SCI_GETENDSTYLED) |
186 |
186 |
187 def startStyling(self, pos, mask): |
187 def startStyling(self, pos, mask): |
188 """ |
188 """ |
533 """ |
533 """ |
534 return self.SendScintilla(QsciScintilla.SCI_GETSELECTIONS) |
534 return self.SendScintilla(QsciScintilla.SCI_GETSELECTIONS) |
535 |
535 |
536 def getSelectionN(self, index): |
536 def getSelectionN(self, index): |
537 """ |
537 """ |
538 Public method to get the start and end of a selection given by its index. |
538 Public method to get the start and end of a selection given by its |
539 |
539 index. |
|
540 |
|
541 @param index index of the selection (integer) |
540 @return tuple with start line and index and end line and index |
542 @return tuple with start line and index and end line and index |
541 (tuple of four int) for the given selection |
543 (tuple of four int) for the given selection |
542 """ |
544 """ |
543 startPos = self.SendScintilla(QsciScintilla.SCI_GETSELECTIONNSTART, index) |
545 startPos = self.SendScintilla(QsciScintilla.SCI_GETSELECTIONNSTART, index) |
544 endPos = self.SendScintilla(QsciScintilla.SCI_GETSELECTIONNEND, index) |
546 endPos = self.SendScintilla(QsciScintilla.SCI_GETSELECTIONNEND, index) |
886 |
888 |
887 @param indicator number of the indicator (integer, |
889 @param indicator number of the indicator (integer, |
888 QsciScintilla.INDIC_CONTAINER .. QsciScintilla.INDIC_MAX) |
890 QsciScintilla.INDIC_CONTAINER .. QsciScintilla.INDIC_MAX) |
889 @param spos position of the indicator start (integer) |
891 @param spos position of the indicator start (integer) |
890 @param length length of the indicator (integer) |
892 @param length length of the indicator (integer) |
891 @exception ValueError the indicator or style are not valid |
|
892 """ |
893 """ |
893 self.setCurrentIndicator(indicator) |
894 self.setCurrentIndicator(indicator) |
894 self.SendScintilla(QsciScintilla.SCI_INDICATORFILLRANGE, spos, length) |
895 self.SendScintilla(QsciScintilla.SCI_INDICATORFILLRANGE, spos, length) |
895 |
896 |
896 def setIndicator(self, indicator, sline, sindex, eline, eindex): |
897 def setIndicator(self, indicator, sline, sindex, eline, eindex): |
901 QsciScintilla.INDIC_CONTAINER .. QsciScintilla.INDIC_MAX) |
902 QsciScintilla.INDIC_CONTAINER .. QsciScintilla.INDIC_MAX) |
902 @param sline line number of the indicator start (integer) |
903 @param sline line number of the indicator start (integer) |
903 @param sindex index of the indicator start (integer) |
904 @param sindex index of the indicator start (integer) |
904 @param eline line number of the indicator end (integer) |
905 @param eline line number of the indicator end (integer) |
905 @param eindex index of the indicator end (integer) |
906 @param eindex index of the indicator end (integer) |
906 @exception ValueError the indicator or style are not valid |
|
907 """ |
907 """ |
908 spos = self.positionFromLineIndex(sline, sindex) |
908 spos = self.positionFromLineIndex(sline, sindex) |
909 epos = self.positionFromLineIndex(eline, eindex) |
909 epos = self.positionFromLineIndex(eline, eindex) |
910 self.setIndicatorRange(indicator, spos, epos - spos) |
910 self.setIndicatorRange(indicator, spos, epos - spos) |
911 |
911 |
1094 |
1094 |
1095 def event(self, evt): |
1095 def event(self, evt): |
1096 """ |
1096 """ |
1097 Protected method to handle events. |
1097 Protected method to handle events. |
1098 |
1098 |
1099 Note: We are not interested in the standard QsciScintilla event handling |
1099 Note: We are not interested in the standard QsciScintilla event |
1100 because we do it our self. |
1100 handling because we do it our self. |
1101 |
1101 |
1102 @param evt event object to handle (QEvent) |
1102 @param evt event object to handle (QEvent) |
|
1103 @return result of the event handling (boolean) |
1103 """ |
1104 """ |
1104 return QsciScintillaBase.event(self, evt) |
1105 return QsciScintillaBase.event(self, evt) |
1105 |
1106 |
1106 ########################################################################### |
1107 ########################################################################### |
1107 # interface methods to the mini editor |
1108 # interface methods to the mini editor |