diff options
author | nyamatongwe <unknown> | 2013-03-20 20:37:41 +1100 |
---|---|---|
committer | nyamatongwe <unknown> | 2013-03-20 20:37:41 +1100 |
commit | 2189d4ff82cd7a48802fd5ce545a29d80e198adf (patch) | |
tree | de3c9429efb963c6b9413e9745e3cc03372ab8b5 /src/Editor.h | |
parent | 612bdefb4bb1e41412f76d1a189bf65bc5052a07 (diff) | |
download | scintilla-mirror-2189d4ff82cd7a48802fd5ce545a29d80e198adf.tar.gz |
Add ScrollRange feature.
Diffstat (limited to 'src/Editor.h')
-rw-r--r-- | src/Editor.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/Editor.h b/src/Editor.h index 91cbd59a4..f2b452a77 100644 --- a/src/Editor.h +++ b/src/Editor.h @@ -381,10 +381,19 @@ protected: // ScintillaBase subclass needs access to much of Editor int xOffset; int topLine; XYScrollPosition(int xOffset_, int topLine_) : xOffset(xOffset_), topLine(topLine_) {} + bool operator==(const XYScrollPosition &other) const { + return (xOffset == other.xOffset) && (topLine == other.topLine); + } }; - XYScrollPosition XYScrollToMakeVisible(const bool useMargin, const bool vert, const bool horiz); + enum XYScrollOptions { + xysUseMargin=0x1, + xysVertical=0x2, + xysHorizontal=0x4, + xysDefault=xysUseMargin|xysVertical|xysHorizontal}; + XYScrollPosition XYScrollToMakeVisible(const SelectionRange range, const XYScrollOptions options); void SetXYScroll(XYScrollPosition newXY); void EnsureCaretVisible(bool useMargin=true, bool vert=true, bool horiz=true); + void ScrollRange(SelectionRange range); void ShowCaretAtCurrentPosition(); void DropCaret(); void InvalidateCaret(); |