aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Editor.h
diff options
context:
space:
mode:
authornyamatongwe <devnull@localhost>2013-03-20 20:37:41 +1100
committernyamatongwe <devnull@localhost>2013-03-20 20:37:41 +1100
commitd123f6bfc56638d3da96d429d80e289adc477178 (patch)
tree19dd367f6ee6dde9eb9c50ea58ef48658c862ede /src/Editor.h
parent71dfc4460f88f3f51de924ec9b313bf91d803991 (diff)
downloadscintilla-mirror-d123f6bfc56638d3da96d429d80e289adc477178.tar.gz
Add ScrollRange feature.
Diffstat (limited to 'src/Editor.h')
-rw-r--r--src/Editor.h11
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();