|
| 1 | +diff --git a/libs/qscintilla/Qt4Qt5/Qsci/qsciscintilla.h b/libs/qscintilla/Qt4Qt5/Qsci/qsciscintilla.h |
| 2 | +index 3b5f185..49ca5cc 100644 |
| 3 | +--- a/libs/qscintilla/Qt4Qt5/Qsci/qsciscintilla.h |
| 4 | ++++ b/libs/qscintilla/Qt4Qt5/Qsci/qsciscintilla.h |
| 5 | +@@ -2009,6 +2009,34 @@ public slots: |
| 6 | + //! \sa zoomIn(), zoomOut() |
| 7 | + virtual void zoomTo(int size); |
| 8 | + |
| 9 | ++ //! For performance, Scintilla does not measure the display width |
| 10 | ++ //! of the document to determine the properties of the horizontal |
| 11 | ++ //! scroll bar. Instead, an assumed width is used. This sets the |
| 12 | ++ //! document width in pixels assumed by Scintilla to \a |
| 13 | ++ //! pixelWidth. The default value is 2000. |
| 14 | ++ //! |
| 15 | ++ //! \sa getScrollWidth(), setScrollWidthTracking() |
| 16 | ++ virtual void setScrollWidth(int pixelWidth); |
| 17 | ++ |
| 18 | ++ //! Gets the document width in pixels assumed by Scintilla. |
| 19 | ++ //! |
| 20 | ++ //! \sa setScrollWidth(), setScrollWidthTracking() |
| 21 | ++ virtual int getScrollWidth() const; |
| 22 | ++ |
| 23 | ++ //! If scroll width tracking is enabled then the scroll width is |
| 24 | ++ //! adjusted to ensure that all of the lines currently displayed |
| 25 | ++ //! can be completely scrolled. This mode never adjusts the scroll |
| 26 | ++ //! width to be narrower. |
| 27 | ++ //! Sets the scroll width tracking to \a enabled. |
| 28 | ++ //! |
| 29 | ++ //! \sa setScrollWidth(), getScrollWidthTracking() |
| 30 | ++ virtual void setScrollWidthTracking(bool enabled); |
| 31 | ++ |
| 32 | ++ //! Gets the current scroll width tracking mode. |
| 33 | ++ //! |
| 34 | ++ //! \sa getScrollWidth(), setScrollWidthTracking() |
| 35 | ++ virtual bool getScrollWidthTracking() const; |
| 36 | ++ |
| 37 | + signals: |
| 38 | + //! This signal is emitted whenever the cursor position changes. \a line |
| 39 | + //! contains the line number and \a index contains the character index |
| 40 | +diff --git a/libs/qscintilla/Qt4Qt5/qsciscintilla.cpp b/libs/qscintilla/Qt4Qt5/qsciscintilla.cpp |
| 41 | +index 4c9fe75..31dc579 100644 |
| 42 | +--- a/libs/qscintilla/Qt4Qt5/qsciscintilla.cpp |
| 43 | ++++ b/libs/qscintilla/Qt4Qt5/qsciscintilla.cpp |
| 44 | +@@ -4481,3 +4481,26 @@ static QColor asQColor(long sci_colour) |
| 45 | + ((int)(sci_colour >> 8)) & 0x00ff, |
| 46 | + ((int)(sci_colour >> 16)) & 0x00ff); |
| 47 | + } |
| 48 | ++ |
| 49 | ++void QsciScintilla::setScrollWidth(int pixelWidth) |
| 50 | ++{ |
| 51 | ++ SendScintilla(SCI_SETSCROLLWIDTH, pixelWidth); |
| 52 | ++} |
| 53 | ++ |
| 54 | ++int QsciScintilla::getScrollWidth() const |
| 55 | ++{ |
| 56 | ++ return SendScintilla(SCI_GETSCROLLWIDTH); |
| 57 | ++} |
| 58 | ++ |
| 59 | ++void QsciScintilla::setScrollWidthTracking(bool enabled) |
| 60 | ++{ |
| 61 | ++ SendScintilla(SCI_SETSCROLLWIDTHTRACKING, enabled); |
| 62 | ++} |
| 63 | ++ |
| 64 | ++bool QsciScintilla::getScrollWidthTracking() const |
| 65 | ++{ |
| 66 | ++ return SendScintilla(SCI_GETSCROLLWIDTHTRACKING); |
| 67 | ++} |
| 68 | ++ |
| 69 | ++ |
| 70 | ++ |
0 commit comments